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: gcc-patches at gcc dot gnu dot org
- Cc: janis187 at us dot ibm dot com
- Date: Wed, 3 Sep 2008 13:58:01 +0300
- Subject: Re: [patch, testsuite] Fix PR37334 - gcc.dg/fastmath-2.c doesn't work on ia32
Resend with patch.
This patch fixes the testcase gcc.dg/fastmath-2.c. The problem
described in PR37334.
OK for mainline?
Changelog:
2008-09-03 Victor Kaplansky <victork@il.ibm.com>
PR testsuite/37334
* gcc/testsuite/gcc.dg/fastmath-2.c: Propagate result
of division through a memory.
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)
@@ -9,9 +9,10 @@ double b;
int
main()
{
+ double c = (1. / 2.002083e-146);
b = 1. / a;
- if (b != (1. / 2.002083e-146))
+ if (memcmp ((void *)&b, (void *)&c, sizeof (double)) != 0)
abort ();
return 0;
}