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