https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91596
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Richard Biener from comment #3) > (In reply to Andrew Pinski from comment #2) > > Previously we have decided this to be invalid. I think it is a mistake to > > consider us to do this really. > > True, but when it's easy then from a QOI perspective I'd rather have > -flto preserve -fno-lto behavior as much as possible. > > I realize we cannot have this fully because partitioning gets in the way > unless we forcefully partition all global ctors/dtors into a single > partition (OTOH it's probably pretty random in which partition they > end up since they are not actually called - do they end up where > refs to the referred to vars end up? probably more where called > ctors/dtors end up, but we'd ship their body for inlining multiple > times anyway). And having ctors (not so much dtors) in a single partition might be desirable to improve code locality during startup as well.