fp-cmp-1.c: Set up signal handler earlier.
authorPeter Leven <leven@lpr.e-technik.tu-muenchen.de>
Fri, 29 May 1998 00:12:03 +0000 (00:12 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 29 May 1998 00:12:03 +0000 (18:12 -0600)
        * gcc.c-torture/execute/ieee/fp-cmp-1.c: Set up signal handler
        earlier.

From-SVN: r20132

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-1.c

index cb47012a190fd4385c8ee0815898575da3e9600e..39f2655f0612d94c087f3df9a4ad15071ed24170 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 29 01:10:12 1998  Peter Leven <leven@lpr.e-technik.tu-muenchen.de>
+
+       * gcc.c-torture/execute/ieee/fp-cmp-1.c: Set up signal handler
+       earlier.
+
 Thu May 28 00:17:42 1998  Catherine Moore <clm@cygnus.com>
 
        * gcc.c-torture/execute/980526-3.c: New test.
index 3c3ccb65c09a5d9f5b66a9362fdc8504312bb1d9..4794efcb53b95c5442498c39de10c6b63af0c14e 100644 (file)
@@ -11,6 +11,13 @@ void leave ()
 main ()
 {
 #if ! defined (__vax__) && ! defined (_CRAY)
+  /* Move this line earlier, for architectures (like alpha) that issue 
+     SIGFPE on the first comparisons. */
+#ifndef SIGNAL_SUPPRESS
+  /* Some machines catches a SIGFPE when a NaN is compared.
+     Let this test succeed o such machines.  */
+  signal (SIGFPE, leave);
+#endif
   /* NaN is an IEEE unordered operand.  All these test should be false.  */
   if (nan == nan)
     abort ();
@@ -19,12 +26,6 @@ main ()
   else
     abort ();
 
-#ifndef SIGNAL_SUPPRESS
-  /* Some machines catches a SIGFPE when a NaN is compared.
-     Let this test succeed o such machines.  */
-  signal (SIGFPE, leave);
-#endif
-
   if (nan < x)
     abort ();
   if (nan > x)