Patchwork Fix PR35634

login
register
mail settings
Submitter Richard Guenther
Date Dec. 3, 2012, 10:40 a.m.
Message ID <alpine.LNX.2.00.1212031140170.5402@zhemvz.fhfr.qr>
Download mbox | patch
Permalink /patch/203317/
State New
Headers show

Comments

Richard Guenther - Dec. 3, 2012, 10:40 a.m.
On Sat, 1 Dec 2012, David Edelsohn wrote:

> Richard,
> 
> The testcases assume default signed char and fail on systems with
> different semantics.  I believe that both testcases need to declare c
> as signed char to consistently test the desired behavior, right?

Fixed as follows.

Richard.

2012-12-03  Richard Biener  <rguenther@suse.de>

	* gcc.dg/torture/pr35634.c: Use signed char.
	* g++.dg/torture/pr35634.C: Likewise.

Patch

Index: gcc/testsuite/gcc.dg/torture/pr35634.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr35634.c	(revision 194077)
+++ gcc/testsuite/gcc.dg/torture/pr35634.c	(working copy)
@@ -14,6 +14,6 @@  void foo (int i)
 
 int main ()
 {
-    char c;
+    signed char c;
     for (c = 0; ; c++) foo (c);
 }
Index: gcc/testsuite/g++.dg/torture/pr35634.C
===================================================================
--- gcc/testsuite/g++.dg/torture/pr35634.C	(revision 194077)
+++ gcc/testsuite/g++.dg/torture/pr35634.C	(working copy)
@@ -14,6 +14,6 @@  void foo (int i)
 
 int main ()
 {
-    char c;
+    signed char c;
     for (c = 0; ; c++) foo (c);
 }