This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: PowerPC Floating Point compare bug?
- To: Becky Gill <bgill at ibmoto dot com>
- Subject: Re: PowerPC Floating Point compare bug?
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: 16 May 2001 17:52:59 -0700
- CC: gcc-bugs at gcc dot gnu dot org
- References: <3B0307E3.5E4936CB@ibmoto.com>
Becky Gill <bgill@ibmoto.com> writes:
> I noticed today that the following code:
>
> static float f1 = 1.10000E+000;
> static double d2;
> static int a;
>
> d2 = (f1 == 2);
> if (d2 != 0.0)
> printf ("FAIL == %f\n", d2);
>
> fails under the gcc 2.95.3 20010315 release (and on the gcc version 3.0
> 20010220 prerelease) whenever the -mcpu=750 option is specified, passing
> whenever no cpu option is given.
>
> Can someone take a look at this? My entire compile line is included below.
>
> gcc -funroll-loops -funroll-all-loops -O3 -fno-inline-functions
> -fomit-frame-pointer -mcpu=750 -o test test.c
Yup, it's a bug. I think it's related to the generation of fsel.
--
- Geoffrey Keating <geoffk@geoffk.org>