https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71614
--- Comment #3 from Tim Shen <timshen at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #2) > Two things, try -fno-strict-aliasing first. > Since your main violates C aliasing rules. > Second thing to try is -ffp-contract=off as I am suspecting: > v = a*d; > w = b*c; > tau += v + w; /* Add in other second-order terms. */ > u = t + tau; > > is using an fmadd here. Passing -fno-strict-aliasing doesn't change the -O2 result; -ffp-contract=off does give the consistent result as -O1. What result is __gcc_qmul supposed to give? As a user I'd expect the commutativity here.