This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]