With a recent gfortran, the following compiles, but generates the wrong
results:

       program write_write
       character(len=20) :: a,b,c
       write (10,"(a,t1,a,a)") "XXXXXXXXX", "ABC", "DEF"
       write (10,"(a,t1,a)",advance='no') "XXXXXXXXX", "ABC"
       write (10,"(a)") "DEF"
       write (10,"(a)") "ABCDEFXXX"
       REWIND(10)
       read(10,*) a
       read(10,*) b
       read(10,*) c
       IF (a.NE.b) CALL ABORT()
       IF (a.NE.c) CALL ABORT()
       end


-- 
           Summary: wrong code generated with gfortran
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk


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

Reply via email to