This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/50199] [4.7 Regression] wrong code with -flto -fno-merge-constants


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

--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-01-03 18:06:28 UTC ---
Hmm, adding CONST_DECLs into varpool would be fun: we would have to ensure that
most of target machinery is ready to output CONST_DECLs promoted to hidden vars
by ltrans partitioning + there will be some additional surprises for sure (i.e.
CONST_DECLs being constructed very late in optimization).

The problem is not specific to ipa-cp, ale ipa-split and inlining can migrate
same CONST_DECL across function bodies that can end up in different ltrans
partitions.

I wonder if we should not simply promote CONST_DECLs into initialized const
vars for this purpose by local tree pass running just before early inliner?  I
don't see much of downsides of this transform at them moment, except for lack
of sharing of const pool in between early and late const decls.

Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]