[Bug ipa/103080] LTO alters the ordering of static constructors/destructors in pass_ipa_cdtor_merge.

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 4 14:55:46 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103080

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
IIRC there is also an older bug about CTOR/DTOR order across multiple TUs where
with -flto be behave differently than without where I said it might be nice to
preserve linker command line order (we have that order available somewhere at
WPA time as well).

OTOH, it might be nice to diagnose CTOR/DTOR dependences between TUs as
that is really UB and at WPA time we should have IPA REFs providing such
dependences.


More information about the Gcc-bugs mailing list