This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

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

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]