This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Mixed INTEGER and LOGICAL
- From: Steve Edwards <edwardss at whl dot co dot uk>
- To: GNU Fortran <fortran at gcc dot gnu dot org>
- Date: Thu, 09 Nov 2006 14:55:49 +0000
- Subject: Mixed INTEGER and LOGICAL
- Reply-to: edwardss at whl dot co dot uk
Hello,
I came across a (very) small problem porting some older software to
gfortran involving mixed LOGICAL and INTEGER in I.O:
program check
logical ifstr
ifstr=.false.
write(6,1000)ifstr,ifstr
1000 format(L1,' ',I1)
end
Although the gfortran manual says it supports mixed logical and integer
with the default -std=gnu this program fails with gfortran runtime
error:
[~]>./check
At line 4 of file logical-check.f
Fortran runtime error: Expected INTEGER for item 3 in formatted
transfer, got LOGICAL
(L1,' ',I1)
^
F
This wasn't a major problem to fix, but I was unsure if this *should* be
a legacy option for gfortran or not. Incidentally, it worked fine with
g77 3.4.6, IBM xlf, HP/UX fort77 and the Sun WorkShop Compiler.
S Edwards
----------------------------------------------------------
----------------------------------------------------------