Fix PR35634

Submitted by Richard Guenther on Dec. 3, 2012, 10:40 a.m.

Details

Message ID alpine.LNX.2.00.1212031140170.5402@zhemvz.fhfr.qr
State New
Headers show

Commit Message

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 hide | download patch | download mbox

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);
 }