This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/37334] gcc.dg/fastmath-2.c doesn't work
- From: "victork at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Sep 2008 10:20:56 -0000
- Subject: [Bug middle-end/37334] gcc.dg/fastmath-2.c doesn't work
- References: <bug-37334-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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