https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51663
--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Tom de Vries from comment #11) > Cross-referencing PR gdb/25684 - "gdb testing with gcc -flto" ( > https://sourceware.org/bugzilla/show_bug.cgi?id=25684 ). > > Ideally there would be a way to enable the lto infrastructure without > actually optimizing, such that when running the gdb testsuite with and > without flto and comparing results, any regression would indicate something > that needs fixing. > > In the current situation, each individual regression needs investigation > whether something needs fixing or whether the failure is just an > optimization artifact. And due to the fact there are optimizations, there > are thousands of such regressions. I suppose we're talking about -O0 -flto here. What kind of transforms are undesirable? I think at -O0 you'll get - more aggressive unused variable/function removal - promotion of variables from global to local some of the transforms are unavoidable due to partitioning(?) but we could default to 1:1 partitioning at -O0 ...