OSDN Git Service

* gcc.dg/pr14092-1.c: Use intptr_t for the cast.
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Feb 2004 11:53:38 +0000 (11:53 +0000)
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Feb 2004 11:53:38 +0000 (11:53 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77649 138bc75d-0d04-0410-961f-82ee72b054a4

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

index d49569a..9f34aae 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 86076c2..927ecf6 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;
 }