[Patch, Fortran] Support -finit-real=snan
Daniel Kraft
d@domob.eu
Thu Dec 4 18:31:00 GMT 2008
Tobias Burnus wrote:
> Hello,
>
> the following patch is rather for GCC 4.5 and will be also useful for
> Fortran 2003's IEEE.
>
> Using -finit-real=snan -ffpe-trap=invalid, one can detect certain kind
> of expressions of uninitialized variables, e.g.:
>
> ! y be not initialized
> x = y ! Not detected
> x = y + 1 ! SIGFPE
> x = cos(y) ! SIGF
> print *, y ! Not detected, prints "NaN"
>
> OK for the trunk (i.e. 4.5 - or should this already go to 4.4?)?
> Build & tested on x86-64-linux
Hi Tobias,
ok from me for 4.5 (maybe we should in general do a re-regtest on all
4.5 patches before check-in in case something changed over time, though?).
Hope I didn't miss anything for my first "offical" review... :D
Cheers,
Daniel
More information about the Gcc-patches
mailing list