------- Comment #5 from filippo dot arcidiacono at gmail dot com 2007-02-26 09:29 ------- Created an attachment (id=13112) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13112&action=view) assembler code of nanf-test.c
Following a piece of the objdump of the nanf-test: : : int main (void) { 0: e6 2f mov.l r14,@-r15 2: 22 4f sts.l pr,@-r15 4: f8 7f add #-8,r15 6: f3 6e mov r15,r14 int op; op = (nanf ("") != nanf ("") ); 8: e3 62 mov r14,r2 a: c8 72 add #-56,r2 c: 00 e1 mov #0,r1 e: 1f 12 mov.l r1,@(60,r2) if (!op) { 10: e3 61 mov r14,r1 12: c8 71 add #-56,r1 14: 1f 51 mov.l @(60,r1),r1 16: 18 21 tst r1,r1 18: 08 8b bf 2c <main+0x2c> printf ("Test NAN Failed!\n"); 1a: 09 d1 mov.l 40 <main+0x40>,r1 ! 0x0 <main> 1c: 13 64 mov r1,r4 1e: 09 d1 mov.l 44 <main+0x44>,r1 ! 0x0 <main> 20: 0b 41 jsr @r1 22: 09 00 nop return (1); 24: 01 e1 mov #1,r1 26: 12 2e mov.l r1,@r14 28: 02 a0 bra 30 <main+0x30> 2a: 09 00 nop } : : Note that I using sh4 architecture. In attach you can find the nanf-test.s that doesn't contains any reference to nanf symbol. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30936