------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-27 19:13 ------- Another testcase which is a regression (on x86) caused by the same problem: int g (float* g1,float t) { *g1 = 0.0 + t; }
Without -fPIC, fldz movl 4(%esp), %eax fadds 8(%esp) fstps (%eax) ret With -fPIC: g: call __i686.get_pc_thunk.cx addl $_GLOBAL_OFFSET_TABLE_, %ecx movl 4(%esp), %eax flds [EMAIL PROTECTED](%ecx) fadds 8(%esp) fstps (%eax) ret in 2.95.3, we get: g: fldz fadds 8(%esp) movl 4(%esp),%eax fstps (%eax) ret But from 3.0.4 and above we get the same issue as the mainline with -fPIC. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23098