[PATCH testsuite] Tweak gcc.c-torture/execute/20101011-1.c
Kaz Kojima
kkojima@rr.iij4u.or.jp
Wed Oct 27 02:52:00 GMT 2010
Hi,
The patch below adds the SH case to the recently added test
gcc.c-torture/execute/20101011-1.c, because SH doesn't trap
with integral division by zero.
The second hunk of the patch changes #ifdef to #if to avoid
an undeclared error for sigfpe which is seen on SH and
powerpc-apple-darwin9.8.0.
Ok for trunk?
Regards,
kaz
--
2010-10-26 Kaz Kojima <kkojima@gcc.gnu.org>
* gcc.c-torture/execute/20101011-1.c: Skip on SH.
Use #if instead of #ifdef.
--- ORIG/trunk/gcc/testsuite/gcc.c-torture/execute/20101011-1.c 2010-10-25 12:47:18.000000000 +0900
+++ trunk/gcc/testsuite/gcc.c-torture/execute/20101011-1.c 2010-10-25 19:57:58.000000000 +0900
@@ -9,6 +9,9 @@
#elif defined (__SPU__)
/* On SPU division by zero does not trap. */
# define DO_TEST 0
+#elif defined (__sh__)
+ /* On SH division by zero does not trap. */
+# define DO_TEST 0
#else
# define DO_TEST 1
#endif
@@ -35,7 +38,7 @@ int k;
int
main ()
{
-#ifdef DO_TEST
+#if DO_TEST
signal (SIGFPE, sigfpe);
k = i / j;
abort ();
More information about the Gcc-patches
mailing list