This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/30936] __builtin_nanf("") != __builtin_nanf("") is false for sh4-linux-gnu
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Feb 2007 09:52:04 -0000
- Subject: [Bug target/30936] __builtin_nanf("") != __builtin_nanf("") is false for sh4-linux-gnu
- References: <bug-30936-14151@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from pinskia at gcc dot gnu dot org 2007-02-26 09:52 -------
>In attach you can find the nanf-test.s that doesn't contains any reference
> to nanf symbol.
That is ok, because nanf("") is foldded into a constant and the function is not
called.
I don't read sh asm that well but it looks like:
mov #0,r1
is wrong, it should be instead:
mov #1, r1
If I changed nanf(") to __builtin_nanf("") on powerpc-darwin, I get:
li r0,1
stw r0,56(r30)
lwz r0,56(r30)
cmpwi cr7,r0,0
So it is doing the correct thing there.
So this still has nothing to do with the nanf prototype really.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|const attribute in nanf |__builtin_nanf("") !=
|prototype causes gcc not |__builtin_nanf("") is false
|producing correct code. |for sh4-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30936