I want to use gfortran compiling options -g -fbacktrace -ffpe-trap=zero,overflow,underflow,invalid,denormal -Wall -fcheck=all
to compile the test code which has invalid IEEE_XXXX_FLAG.
compiler: WSL ubuntu 20.04 gfortran 9.3
The code like this
program main
implicit none
real::a,b,c
a=0.0
b=0.0
c=a/b
write(*,*)c
pause
end program main
If I don’t use these options, the output shows below (pause
is important)
$ gfortran test.f90 && ./a.out
test.f90:8:9:
8 | pause
| 1
Warning: Deleted feature: PAUSE statement at (1)
NaN
PAUSE
To resume execution, type go. Other input will terminate the job.
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG
If I use these options
$ gfortran -g -fbacktrace -ffpe-trap=zero,overflow,underflow,invalid,denormal -Wall -fcheck=all test.f90 && ./a.out
test.f90:8:9:
8 | pause
| 1
Warning: Deleted feature: PAUSE statement at (1)
just show this.
However ,When I use these compiling options on godbolt,
Its output
The more important information .f90:6 shows.
So Can personal computer show the same error info?
Thanks