This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/30936] const attribute in nanf prototype causes gcc not producing correct code.
- 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 08:21:48 -0000
- Subject: [Bug target/30936] const attribute in nanf prototype causes gcc not producing correct code.
- References: <bug-30936-14151@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from pinskia at gcc dot gnu dot org 2007-02-26 08:21 -------
No, the const attribute does not cause to produce wrong code.
On powerpc-darwin with your testcase, I get:
mflr r0
lis r3,ha16(LC0)
la r3,lo16(LC0)(r3)
stw r0,8(r1)
stwu r1,-64(r1)
bl _nanf
li r3,0
fcmpu cr7,f1,f1
bne- cr7,L5
You can see the floating point compare happens but only one call to nanf.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c |target
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30936