https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63671
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- It gets worse with -flto: markus@x4 ~ % g++ -w -Ofast -flto=4 tramp3d-v4.cpp markus@x4 ~ % ./a.out --cartvis 1.0 0.0 --rhomin 1e-8 -n 20 ... Time spent in iteration: 4.6181 For "-fno-devirtualize -flto=4" the result is the same as without -flto.