This is the mail archive of the gcc-bugs@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]

[Bug middle-end/37334] gcc.dg/fastmath-2.c doesn't work



------- Comment #2 from victork at gcc dot gnu dot org  2008-09-03 10:20 -------
Yes, looks like a problem in testcase. This patch should fix it:

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


-- 

victork at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |victork at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-09-03 10:20:55
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37334


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