[patch,testuite]: Fix bad testcase assuming int = int32_t

Georg-Johann Lay avr@gjlay.de
Thu Jan 12 16:44:00 GMT 2012


Again: A test case that fails because it incorrectly assumes int is 32 bits wide.

Ok to apply?

	* gcc.c-torture/execute/20120111-1.c: Fix wrong int = int32_t
	assumption.



Index: gcc.c-torture/execute/20120111-1.c
===================================================================
--- gcc.c-torture/execute/20120111-1.c  (revision 183128)
+++ gcc.c-torture/execute/20120111-1.c  (working copy)
@@ -6,7 +6,7 @@ uint32_t f0a (uint64_t arg2) __attribute
 uint32_t
 f0a (uint64_t arg)
 {
-  return ~(arg > -3);
+  return ~((unsigned) (arg > -3));
 }

 int main() {



More information about the Gcc-patches mailing list