This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/30936] const attribute in nanf prototype causes gcc not producing correct code.



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]