This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix pr21985.c


Which fails on all 64-bit targets.


r~



        * gcc.dg/tree-ssa/pr21985.c: Use size_t.

Index: gcc.dg/tree-ssa/pr21985.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/pr21985.c,v
retrieving revision 1.1
diff -u -p -d -r1.1 pr21985.c
--- gcc.dg/tree-ssa/pr21985.c	13 Jun 2005 14:59:40 -0000	1.1
+++ gcc.dg/tree-ssa/pr21985.c	19 Jun 2005 23:50:35 -0000
@@ -10,20 +10,21 @@ struct
     } a[100];
 } a;
 
-void foo(unsigned);
-unsigned *bar (void);
+typedef __SIZE_TYPE__ size_t;
+void foo(size_t);
+size_t *bar (void);
 
 int
 main (void)
 {
-  unsigned *b = bar ();
+  size_t *b = bar ();
 
   /* This should be folded.  */
   foo (&a.a[50].a - &a.a[33].b);
-  foo ((unsigned) &a.a[50].b - (unsigned) &a);
+  foo ((size_t) &a.a[50].b - (size_t) &a);
 
   /* And this should not.  */
-  foo ((unsigned) &b - (unsigned) b);
+  foo ((size_t) &b - (size_t) b);
   return 0;
 }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]