[Bug lto/51663] LTO does not reclaim comdat-local statics

hubicka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 20 16:52:00 GMT 2012


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

--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-03-20 16:49:44 UTC ---
OK, the funny inconsistency comes from the fact that we always eliminate COMDAT
variables, but we keep around static variables with -fno-toplevel-reorder.
-O0 imply -fno-toplevel-reorder and -fwhole-program brings COMDAT variables
local, just like in this case.

This all envolved for historical reasons.  I wonder how we really want to
behave here...

I am looking into the LTO case. With new plugin API it should just work.
Honza



More information about the Gcc-bugs mailing list