https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119393
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >I've attached a reduced reproducer which (unfortunately) still requires LTO, >but it is at least fairly well reduced (only two small TUs). One thing you could do is combine the 2 TUs (since they are small) and then use -fwhole-program or add static on some of the variables. that might be enough to get one TU.