https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80304
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- Compiling the code with -O1 gives 131076.000 6.00000000 10.0000000 6.00000000 131080.000 6.00000000 and with -Os 4.00000000 6.00000000 10.0000000 6.00000000 516.000000 6.00000000 The change occurred between revisions r239317 (2016-08-10, OK) and r239423 (2016-08-12, wrong). The compiled code works with -Og and with -O2 and above.