aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2003-02-28 09:38:40 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2003-02-28 09:38:40 +0000
commite459243b87904cd66d4bb85892eb831d9e006c2c (patch)
tree28b3deab3f618540cd9210da3eb878811aa539cb /gcc
parent13082c80c1d78e01911d01e5163061b83e6c553f (diff)
downloadgcc-e459243b87904cd66d4bb85892eb831d9e006c2c.zip
gcc-e459243b87904cd66d4bb85892eb831d9e006c2c.tar.gz
gcc-e459243b87904cd66d4bb85892eb831d9e006c2c.tar.bz2
20010327-1.c: Use __SIZE_TYPE__ instead of unsigned long.
* gcc.c-torture/compile/20010327-1.c: Use __SIZE_TYPE__ instead of unsigned long. From-SVN: r63551
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20010327-1.c6
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a4e96d5..a510a72 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20010327-1.c b/gcc/testsuite/gcc.c-torture/compile/20010327-1.c
index fc31a6e..711cd71 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20010327-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20010327-1.c
@@ -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;