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

login
register
mail settings
Submitter Andreas Schwab
Date Jan. 15, 2012, 2:51 p.m.
Message ID <m2mx9pc94a.fsf@igel.home>
Download mbox | patch
Permalink /patch/136188/
State New
Headers show

Comments

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

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