This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: RFC: Fix gfortran.dg/do_3.F90
- From: "François-Xavier Coudert" <fxcoudert at gmail dot com>
- To: "Dominique Dhumieres" <dominiq at lps dot ens dot fr>
- Cc: fortran at gcc dot gnu dot org
- Date: Wed, 10 Oct 2007 10:46:20 +0100
- Subject: Re: RFC: Fix gfortran.dg/do_3.F90
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=gH6jquxr1muAn0zYCv6Nyc6+NiY2lz9pttt+iqm5KlE=; b=esdfOE99yj9GPpNMqKwePIT3jsEKLH1G2PKK0kE854PBAksavBIs1yVrC/Q90HbZqvlxqyie2fl2WCsCgh5IEjSLkR2PJmzHyOe1ywiD21ziDg0Zk2SOY8JY96mcCo+yKVBK/RG1aG61z6BQMqOTA1QSU1KpcNuSRWbj03guOBc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UkLwhwChJ3xHGB3mN+KhXYG2LPg9do/BW4yx4v1qEsmsRPlhJciMySGgzuHN5MGf9j4SSHkGVrruPbnsqdFjBpB2Blc7ElTkKVIWLPZu2dM4cEMibZJmCfwd4zSIvrOsz5LruDQcRGEzDUwcPJUzEDDWFdTkw8bih1t1QbUTxVE=
- References: <20071010062917.E1CC55BB9F@mailhost.lps.ens.fr>
> 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