__builtin_constant_p(&global)

Toshiyasu Morita tm@netcom.com
Tue Mar 9 18:23:00 GMT 1999


version: egcs-1.1.2-pre3
   host: i386-linux
 target: sh-hms

The compiler is failing a c-torture test "bcp-1.c" because of this function:

  14:bcp-1.c       **** int bad10(void) { return 
__builtin_constant_p(&global); }
  95 004c 2FE6                  mov.l   r14,@-r15
  96 004e E001                  mov     #1,r0
  97 0050 6EF3                  mov     r15,r14
  98 0052 6FE3                  mov     r14,r15
  99 0054 000B                  rts
 100 0056 6EF6                  mov.l   @r15+,r14

is __builtin_constant_p(&global) supposed to evaluate to false?

Toshi



More information about the Gcc-bugs mailing list