https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114487
--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #9) > (In reply to Andrew Pinski from comment #8) > > Created attachment 57823 [details] > > testcase for non-lto > > > > `-W -Wall -m32 -fwhole-program -march=i686 -O1` is enough > > Note the only difference between this and the reduced LTO case is fix up of > SDLTest_RandomUnitFloat return type so it would be more defined and then the > additions of the #pragma and the use of `-fwhole-program` option instead of > LTO (since LTO does a similar thing). You can remove -fwhole-program if you make SDLTest_RandomUnitFloat static too (since that is basically what -fwhole-program is doing after all) and you still get the failure.