]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
20010327-1.c: Use __SIZE_TYPE__ instead of unsigned long.
authorAlexandre Oliva <aoliva@redhat.com>
Fri, 28 Feb 2003 09:38:40 +0000 (09:38 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Fri, 28 Feb 2003 09:38:40 +0000 (09:38 +0000)
* gcc.c-torture/compile/20010327-1.c: Use __SIZE_TYPE__ instead of
unsigned long.

From-SVN: r63551

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20010327-1.c

index a4e96d5ab5b9d902e1d3e109c112c956a0af0280..a510a72b61f4b9493869b5470578e4ab1aae5bac 100644 (file)
@@ -1,5 +1,8 @@
 2003-02-28  Alexandre Oliva  <aoliva@redhat.com>
 
+       * gcc.c-torture/compile/20010327-1.c: Use __SIZE_TYPE__ instead of
+       unsigned long.
+
        * gcc.c-torture/compile/simd-3.c: Do nothing if double is not
        wider than float.
 
index fc31a6e68c26f78d82912789dc35f56e024c4103..711cd7151ef9b0e0643a986bab84708e53414acd 100644 (file)
@@ -1,2 +1,6 @@
 extern void _text;
-static unsigned long x = (unsigned long) &_text - 0x10000000L - 1;
+/* We use __SIZE_TYPE__ here because it's as wide as a pointer, so we
+   know we won't have a non-constant because of extension or
+   truncation of the pointer to fit.  */
+static __SIZE_TYPE__ x
+  = (__SIZE_TYPE__) &_text - (__SIZE_TYPE__) 0x10000000L - 1;