The Fortran standard states that when you have list directed input, and a
forward slash (/) appears at the end of a line of input, that any variables in
the read statement that have not been initialized should simply be skipped over
(ignored). 

When gfortran encounters a slash at the beginning of a line, it does not
exhibit the correct behavior. For example, this data:

6.34 1.34 4345.34534
/

with this read statement

read(50, *)r1,r2,r3,r4

should set r1 to 6.34, r2 to 1.34, r3 to 4345.34534, and leave r4 unchanged.
But gfortran code issues the following run time error:

Fortran runtime error: Bad real number in item 4 of list input

All other fortran compilers that I use (xlf, ifort, etc) handle this case
correctly.


-- 
           Summary: Slash at end of input not recognized according to
                    standard
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: drewmccormack at mac dot com
 GCC build triplet: Configured with: ../gcc-4.3-20061223/configure --enable-
                    language
  GCC host triplet: gcc version 4.3.0 20061223 (experimental)
GCC target triplet: Target: powerpc-apple-darwin8.8.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30435

Reply via email to