gfortran rejects the following due to the extra (), the same is accepted for
PRINT. I believe this is valid (or if it is invalid, it is also invalid for
PRINT).

print('a'), 'Hello'
write(*,('(a)')) 'Hello'
read (*,('(f3.3)')) a
read '(f3'//'.3)', a
read ('(f3.3)'), a ! Rejected
end

read ('(f3.3)'), a ! Rejected
     1
Error: UNIT specification at (1) must be an INTEGER expression or a CHARACTER
variable

ifort behaves the same as gfortran; NAG f95 accept it.


-- 
           Summary: read ('(f3.3)'), a  rejected due to the extra (...)
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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

Reply via email to