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