I running into a problem where I get floating point exceptions when my code is compiled -O1, -O2, or -O3 but it works in -g or -O0 mode. I believe there are some optimization associated with floating point operations that is causing my problem. I would like to gradually activated all the optimizations evident in -O# manually to determine which one causes the FPE and just turn that one off.
My question is whether this is even possible.
So far I've tried -O2 -fp-speculation=off -no-fp-port -fp-model precise -fp-stack-check -fpconstant and I still get the same FPE.
Thanks in advance