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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-10-09 
13:28:40 UTC ---
The problem here is different than one in PR50620.
What happens is that we ship constructors of const static variables into every
partition that reffers to that to aid possible folding of loads from the var.
The constructor of variable pointing to g_331 gets shipped to ltrans1 even when
it is otherwise in other partition. Eventually we fold and place direct
reference to g_331 into code, but the logic promoting symbols hidden doesn't
really consider this posibility, so we end up with undefined reference.

I guess the whole promotion code will need some cleanups and updating - first
the logic is all duplicated in between lto.c and lto-cgraph.c and it is O(n^2),
and second it is not really easy to tweak it to solve this problem - it is
based on the fact that only funcions/variable sin the partition may cause
promotion, while the variable pointing to g_331 is not in ltrans1.

Honza

Reply via email to