I would like to detect high values in my program like 1e30. (real*4 or real*8)
With -fpe0 compiler option, the limit to detect overflows are 1e39 (real*4) and 1e69(real*8). Is it possible to configure this limit in order to decrease it ?
With -fpe0 you get an error when a value exceeds the range of the datatype, which is based on the processor detecting an exception. For single precision that is about 1E38 and for double precision, 1E308. You can't control the limit for overflow checking.
You could set -fpe0, then insert into your code
real, parameter :: TooBig = huge(real) - YourUpperLimit
real, volatile :: waste ! ensure compiler does not optimize stores out of the code
waste = TestingNumber + TooBig ! will generate fpe on overflow
Expand on this for negative and real(8)