Fix gcc.dg/torture/pr8081.c char signedness assumption

Submitted by Andreas Schwab on Jan. 15, 2012, 2:51 p.m.

Details

Message ID m2mx9pc94a.fsf@igel.home
State New
Headers show

Commit Message

Andreas Schwab Jan. 15, 2012, 2:51 p.m.
The condition was always optimized to 1. Tested on powerpc-linux and
checked in as obvious.

Andreas.

2012-01-15  Andreas Schwab  <schwab@linux-m68k.org>

	* gcc.dg/torture/pr8081.c: Fix char signedness assumption.

Patch hide | download patch | download mbox

Index: gcc.dg/torture/pr8081.c
===================================================================
--- gcc.dg/torture/pr8081.c	(revision 183191)
+++ gcc.dg/torture/pr8081.c	(working copy)
@@ -16,11 +16,11 @@  main (int argc, char **argv)
     {
       return *(block *) &b;
     }
-  b.val[0] = -1;
-  b.val[9] = -2;
+  b.val[0] = 1;
+  b.val[9] = 2;
   a=retframe_block ();
-  if (a.val[0] != -1
-      || a.val[9] != -2)
+  if (a.val[0] != 1
+      || a.val[9] != 2)
     abort ();
   return 0;
 }