Fabian Hänsel <fabta...@gmx.de> writes: > You could try to set optimizations more fine-grained. Every > -Osomething stands for a certain set of optimizations. Start with > e.g. "gcc -Q -O2 --help=optimizers" to see all available optimizations > and which are enabled at -O2. Read about them on the gcc > manpage. Disable those that decrease accuracy.
There are none which `decrease accuracy' or violate the IEEE floating point rules (modulo rather rare bugs). I was willing to take bets on problems being in the user's code rather than GCC when I was a maintainer. -ffast-math, for instance, is chosen explicitly. This surely isn't the place to talk about it, though.