This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Fix gfortran.dg/do_3.F90


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]