This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [gfortran] Support INTEGER<->LOGICAL conversion (take 3)
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: Paul Brook <paul at codesourcery dot com>, fortran at gcc dot gnu dot org,gcc-patches at gcc dot gnu dot org
- Date: Sun, 29 May 2005 11:48:38 +0200
- Subject: Re: [gfortran] Support INTEGER<->LOGICAL conversion (take 3)
- References: <Pine.LNX.4.44.0505281532310.8116-100000@www.eyesopen.com>
Roger Sayle wrote:
> To address Tobias' concerns about possible adverse interactions with
> fortran's arithmetic if I've double checked that there's run-time
> testing of this construct in gfortran.fortran-torture/arithmeticif.f90
> and gfortran.dg/pr17229.f, and that both of these tests continue to
> pass with this patch.
I'm sorry that I didn't think of this yesterday and only focused on arithmetic
if, but there are more possible interactions with the IF statement. Is this
extension intended to support something like
integer i
if (i) then
dostuff
end if
or
logical l
if (l) 100, 200, 300 ! label 100 is never jumped to
?
This won't work with the patch, as the matcher for IF expects a logical /
integer expression and rejects the code otherwise, whereas the implicit
conversions are inserted during resolution, i.e. much later in the process.
- Tobi