RFC: Fix gfortran.dg/do_3.F90

François-Xavier Coudert fxcoudert@gmail.com
Wed Oct 10 09:46:00 GMT 2007


> The other choice is -fno-strict-overflow, both options allow the
> test to pass.  I am not sure to fully understand the difference
> between the two (even after having RTFM!-)

The doc for -fstrict-overflow says:

"See also the -fwrapv option. Using -fwrapv means that signed overflow
is fully defined: it wraps. When -fwrapv is used, there is no
difference between -fstrict-overflow and -fno-strict-overflow. With
-fwrapv certain types of overflow are permitted. For example, if the
compiler gets an overflow when doing arithmetic on constants, the
overflowed value can still be used with -fwrapv, but not otherwise."

In that case, we need signed overflow to be defined *and* to wrap. So,
I think it's definitely -fwrapv.

FX



More information about the Fortran mailing list