Patchwork [committed] Add a MIPS clause to 20101011-1.c

login
register
mail settings
Submitter Richard Sandiford
Date Oct. 31, 2010, 2:15 p.m.
Message ID <87aaluv46n.fsf@firetop.home>
Download mbox | patch
Permalink /patch/69713/
State New
Headers show

Comments

Richard Sandiford - Oct. 31, 2010, 2:15 p.m.
Hopefully the comment says it all.  I realise !bare-metal doesn't
imply Linux, but the test seems like a good compromise.

Tested on mipsisa64-elf (where the test was failing) and on
mips64-linux-gnu.  Applied.

Richard


gcc/testsuite/
	* gcc.c-torture/execute/20101011-1.c: Skip for MIPS unless running
	the Linux kernel.

Patch

Index: gcc/testsuite/gcc.c-torture/execute/20101011-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20101011-1.c	2010-10-31 13:39:08.000000000 +0000
+++ gcc/testsuite/gcc.c-torture/execute/20101011-1.c	2010-10-31 14:10:40.000000000 +0000
@@ -12,6 +12,12 @@ 
 #elif defined (__sh__)
   /* On SH division by zero does not trap.  */
 # define DO_TEST 0
+#elif defined (__mips__) && !defined(__linux__)
+  /* MIPS divisions do trap by default, but libgloss targets do not
+     intercept the trap and raise a SIGFPE.  The same is probably
+     true of other bare-metal environments, so restrict the test to
+     systems that use the Linux kernel.  */
+# define DO_TEST 0
 #else
 # define DO_TEST 1
 #endif