Disable FPE trapping when using unsafe maths.
Modern compilers (icx/gcc>11) optimize unsafe maths operations so that FPEs can be generated from SIMD instructions with padded vectors. This means that we cannot trap FPE signals when optimizing and get reliable alerts to issues.
This MR changes that so that we only offer FPE trapping when doing un-optimized builds. These are only enabled by default in the unit tests, so as long as we make sure to include one un-optimized build in the CI we are still checking for genuine FPEs. The SWIFT binaries use the -e flag, so that will abort most of the time with an error.
One wart is that the default optimization level of Intel compilers
is -O2
, not -O0
so we also need to make sure that debugging
is also enabled as that changes the default to -O0
.