]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* gcc.dg/pr14092-1.c: Use intptr_t for the cast.
authorPaolo Bonzini <bonzini@gnu.org>
Wed, 11 Feb 2004 11:53:38 +0000 (11:53 +0000)
committerPaolo Bonzini <bonzini@gcc.gnu.org>
Wed, 11 Feb 2004 11:53:38 +0000 (11:53 +0000)
From-SVN: r77649

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr14092-1.c

index d49569a3833c57f30a5e46fc02b597e662fb8b5c..9f34aae5386db993cb69303e523213e06c26585b 100644 (file)
@@ -1,3 +1,7 @@
+2004-02-11  Paolo Bonzini  <bonzini@gnu.org>
+
+       * gcc.dg/pr14092-1.c: Use intptr_t for the cast.
+
 2004-02-11  Hartmut Penner  <hpenner@de.ibm.com>
 
         * gcc.dg/ppc64-abi-3.c: New test.
index 86076c241e0d606c3f362e998e54af5d2846b514..927ecf6aa3bc7f0295fe3ec9038076e9e32620a4 100644 (file)
@@ -4,14 +4,17 @@
  */
 /* { dg-do compile } */
 
+/* Define this so that we are more portable.  The testcase in the
+   PR failed on 64-bit hosts.  */
+typedef int __attribute__ ((mode (__pointer__))) intptr_t;
+
 typedef struct _PLCI {
   unsigned char x;
   unsigned char buf[1];
 } PLCI;
 
-
 void nl_ind(PLCI * plci)
 {
-  plci->x = -((int)(plci->buf)) & 3;
+  plci->x = -((intptr_t)(plci->buf)) & 3;
 }