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]

Mixed INTEGER and LOGICAL


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
----------------------------------------------------------
----------------------------------------------------------


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