On 26 April 2018 at 10:26, Jack Andrews wrote: >> > 2. When optimization in gcc are disabled, then there is no > > difference > > This reduces it to a one-platform problem. gcc -O different to gcc > Maybe I'm being idealistic, but why should optimization change results? FP operations are sensitive to the order they're performed in, because FP numbers are not exact. Another possible reason is because optimization changes register usage, causing registers to be spilled to memory, and x86 floating point registers have excess precision (80 bits not 64). This is similar to the effects of the -ffloat-store option: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-ffloat-store