This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, testsuite] Fix PR37334 - gcc.dg/fastmath-2.c doesn't work on ia32
- From: Victor Kaplansky <VICTORK at il dot ibm dot com>
- To: "Richard Guenther" <richard dot guenther at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, janis187 at us dot ibm dot com
- Date: Thu, 4 Sep 2008 15:12:43 +0300
- Subject: Re: [patch, testsuite] Fix PR37334 - gcc.dg/fastmath-2.c doesn't work on ia32
>
> famous bug 323.
>
> Richard.
Since it was not my intention to hit 323 bug, I've added "volatile"
to the definition of "b" to work-arround it. Additionally -ffast-math
replaced by -ffinite-math-only and name of the test changed as well.
OK for mainline?
Thanks,
-- Victor
testsuite/ChangeLog:
PR testsuite/37334
* gcc/testsuite/gcc.dg/fastmath-2.c: Add volatile to
definition of b, change -ffast-math to -ffinite-math-only
and rename test to ...
* gcc/testsuite/gcc.dg/div-double-1.c: ... this.
Index: gcc/testsuite/gcc.dg/fastmath-2.c
===================================================================
--- gcc/testsuite/gcc.dg/fastmath-2.c (revision 139888)
+++ gcc/testsuite/gcc.dg/fastmath-2.c (working copy)
@@ -1,18 +0,0 @@
-/* { dg-do run } */
-/* { dg-options "-O2 -ffast-math" } */
-
-extern void abort (void);
-
-volatile double a = 2.002083e-146;}
-double b;
-
-int
-main()
-{
- b = 1. / a;
-
- if (b != (1. / 2.002083e-146))
- abort ();.
- return 0;);.
-}
-}
Index: gcc/testsuite/gcc.dg/div-double-1.c
===================================================================
--- gcc/testsuite/gcc.dg/div-double-1.c (revision 0)
+++ gcc/testsuite/gcc.dg/div-double-1.c (revision 0)
@@ -0,0 +1,17 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ffinite-math-only" } */
+
+extern void abort (void);
+
+volatile double a = 2.002083e-146;
+volatile double b;
+
+int
+main()
+{
+ b = 1. / a;
+
+ if (b != (1. / 2.002083e-146))
+ abort ();.
+ return 0;);.
+}