This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/51663] LTO does not reclaim comdat-local statics
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 20 Mar 2012 16:49:44 +0000
- Subject: [Bug lto/51663] LTO does not reclaim comdat-local statics
- Auto-submitted: auto-generated
- References: <bug-51663-4@http.gcc.gnu.org/bugzilla/>
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