Skip to content
Commit d6b7576f authored by Peter Klausler's avatar Peter Klausler
Browse files

[flang] Fix INQUIRE(PAD=) and (POSITION=) for predefined units

The predefined units were not being initialized with FORM='FORMATTED',
so INQUIRE(PAD=) was failing if no I/O had already been done.

INQUIRE(POSITION=) was returning 'REWIND' on stdin/stdout (which
is somewhat defensible from the definition, and is what Intel Fortran
does), but most implementations return 'ASIS'.  Change the runtime
to return 'REWIND' only for positionable external files, but 'ASIS'
for terminals, sockets, &c.

Differential Revision: https://reviews.llvm.org/D114028
parent adfbb541
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment