[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
Loading
Please register or sign in to comment