[patch] gcc.dg/20020525-1.c: Don't assume the size of int.
Kazu Hirata
kazu@cs.umass.edu
Tue Jun 3 17:15:00 GMT 2003
Hi,
Attached is a patch to remove the assumption about the size of int.
Since the size of int is either 2 or 4 on H8, gcc.dg/20020525-1.c
fails.
Tested on h8300 port. OK to apply?
Kazu Hirata
2003-06-03 Kazu Hirata <kazu@cs.umass.edu>
* gcc.dg/20020525-1.c: Replace int with long.
Index: 20020525-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20020525-1.c,v
retrieving revision 1.2
diff -u -r1.2 20020525-1.c
--- 20020525-1.c 16 May 2003 19:35:43 -0000 1.2
+++ 20020525-1.c 3 Jun 2003 13:26:39 -0000
@@ -6,18 +6,18 @@
extern void abort (void);
extern void exit (int);
-void foo (int *x, int y)
+void foo (long *x, int y)
{
__builtin_memset (x, 0, y);
}
int main ()
{
- int x[2] = { 0x5a5a5a5a, 0x5a5a5a5a };
+ long x[2] = { 0x5a5a5a5a, 0x5a5a5a5a };
if (x[1] != 0x5a5a5a5a)
abort ();
- foo (x, sizeof (int) + 1);
+ foo (x, sizeof (long) + 1);
if (x[1] == 0x5a5a5a5a)
abort ();
exit (0);
More information about the Gcc-patches
mailing list