[committed] Fix PR59846 test

Marek Polacek polacek@redhat.com
Fri Jan 24 10:35:00 GMT 2014


This patch makes the test pass even on -m32, where sizeof (int) ==
sizeof (long).  Committed as obvious.

2014-01-24  Marek Polacek  <polacek@redhat.com>

testsuite/
	* gcc.dg/pr59846.c (fn1, fn2): Use ULL suffix.

--- gcc/testsuite/gcc.dg/pr59846.c.mp	2014-01-24 11:24:49.143033290 +0100
+++ gcc/testsuite/gcc.dg/pr59846.c	2014-01-24 11:31:36.341367712 +0100
@@ -5,13 +5,13 @@
 _Bool
 fn1 (unsigned int p)
 {
-  return 0UL > p; /* { dg-warning "14:comparison is always false due to limited range of data type" } */
+  return 0ULL > p; /* { dg-warning "15:comparison is always false due to limited range of data type" } */
 }
 
 _Bool
 fn2 (unsigned int p)
 {
-  return 0UL <= p; /* { dg-warning "14:comparison is always true due to limited range of data type" } */
+  return 0ULL <= p; /* { dg-warning "15:comparison is always true due to limited range of data type" } */
 }
 
 _Bool

	Marek



More information about the Gcc-patches mailing list