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]

Re: [patch] gcc.dg/20021018-1.c: Disable if the sizeof (int) < 4.


Kazu Hirata wrote:
Hi,

Attached is a patch to disable 20021018.c if the sizeof (int) < 4.

On h8300, the user can choose the sizeof (int) to be either 2 or 4.
When sizeof (int) == 2, the testcase fails because an integer that
does not fit in 2 bytes is passed as an int argument.

The patch also removes the dg-error line because #if should take care
of everything on xstormy16 as well.

Tested on h8300 port. OK to apply?

Kazu Hirata

2003-07-05 Kazu Hirata <kazu@cs.umass.edu>

* gcc.dg/20021018-1.c: Disable if the sizeof (int) < 4.

Index: 20021018-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20021018-1.c,v
retrieving revision 1.2
diff -u -r1.2 20021018-1.c
--- 20021018-1.c 8 May 2003 23:38:04 -0000 1.2
+++ 20021018-1.c 5 Jul 2003 18:18:28 -0000
@@ -1,10 +1,10 @@
/* { dg-do run } */
/* { dg-options "-O2 -fpic" } */
-/* { dg-error "overflow" "16-bit target" { target xstormy16-*-* } 0 } */
extern void abort (void);
extern void exit (int);
+#if __INT_MAX__ >= 2147483647L
static const long foo [10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
long __attribute__((noinline))
@@ -20,3 +20,10 @@
abort ();
exit (0);
}
+#else
+int
+main (void)
+{
+ exit (0);
+}
+#endif






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