Skip to content

Flang demands a FILE specifier when STATUS='NEW' #362

@sscalpone

Description

@sscalpone

From NASTRAN-95/mis/endsys.f

% cat o.f
        OPEN (UNIT=97,ACCESS='SEQUENTIAL',STATUS='NEW',ERR=64)
64      CONTINUE
        END
% gfortran -c o.f
o.f:1:72:

         OPEN (UNIT=97,ACCESS='SEQUENTIAL',STATUS='NEW',ERR=64)
                                                                        1
Warning: The STATUS specified in OPEN statement at (1) is ‘NEW’ and no FILE specifier is present
% ifort -c o.f
% flang -c o.f
o.f:1:9: error: If STATUS='NEW' appears, FILE must also appear
          OPEN (UNIT=97,ACCESS='SEQUENTIAL',STATUS='NEW',ERR=64)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Metadata

Metadata

Assignees

Labels

not a bugFix the upstream code, if the upstream code needs fixingverifyissue may be fixed, but fix needs to be verified

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions