http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59183

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Well, configure tests are usually not prepared for compilers applying a lot of
optimization - especially not assuming that it sees the whole program.

Thus, run configure tests with -O0, not with optimization.

This is hardly a GCC bug, it just optimized away the test which boils down to

char (*f) () = shl_load;
int
main ()
{
return f != shl_load;
}

where obviously the test is always false.  LTO then can eliminate the global
variable 'f' because with -flto it knows it cannot be refered to from
elsewhere and whoops - the reference to shl_load is gone.

Reply via email to