This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fold comparisons against Inf and NaN
- From: Roger Sayle <roger at www dot eyesopen dot com>
- To: Eric Botcazou <ebotcazou at libertysurf dot fr>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 28 Mar 2003 14:20:18 -0700 (MST)
- Subject: Re: [PATCH] Fold comparisons against Inf and NaN
On Fri, 28 Mar 2003, Eric Botcazou wrote:
> > * gcc.c-torture/execute/ieee/fp-cmp-6.c: New test case.
>
> This testcase fails at -O0 on i586-redhat-linux-gnu:
> http://gcc.gnu.org/ml/gcc-testresults/2003-03/msg01697.html
Hi Eric,
Sorry! I've now commited the following patch to fix the test
case as "obviously correct". My apologies for not catching
this earlier.
2003-03-28 Roger Sayle <roger at eyesopen dot com>
* gcc.c-torture/execute/ieee/fp-cmp-6.c: Correct test for -O0.
Index: gcc.c-torture/execute/ieee/fp-cmp-6.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-6.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 fp-cmp-6.c
*** gcc.c-torture/execute/ieee/fp-cmp-6.c 28 Mar 2003 02:41:14 -0000 1.1
--- gcc.c-torture/execute/ieee/fp-cmp-6.c 28 Mar 2003 22:09:46 -0000
***************
*** 2,8 ****
const double dnan = 1.0/0.0 - 1.0/0.0;
double x = 1.0;
! extern void link_error ();
main ()
{
--- 2,9 ----
const double dnan = 1.0/0.0 - 1.0/0.0;
double x = 1.0;
! extern void link_error (void);
! extern void abort (void);
main ()
{
*************** main ()
*** 28,31 ****
--- 29,39 ----
#endif
exit (0);
}
+
+ #ifndef __OPTIMIZE__
+ void link_error (void)
+ {
+ abort ();
+ }
+ #endif
Roger
--