[flang][runtime] Detect NEWUNIT= without FILE= or STATUS='SCRATCH'
authorPeter Klausler <pklausler@nvidia.com>
Wed, 19 Jul 2023 00:05:47 +0000 (17:05 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Fri, 21 Jul 2023 20:13:08 +0000 (13:13 -0700)
commitafdbf1b731ef582008e9ad08ecf787b2b6c2dd88
tree13730fbce4544cc27f3ecc42be9e92a5a717be18
parent25d34215bb80459dd328d6f8eb86c43684375d88
[flang][runtime] Detect NEWUNIT= without FILE= or STATUS='SCRATCH'

It is an error to open a new unit with OPEN(NEWUNIT=) and have
neither a file name nor a scratch status.  Catch it, and report a
new error code.

Differential Revision: https://reviews.llvm.org/D155967
flang/include/flang/Runtime/iostat.h
flang/runtime/io-api.cpp
flang/runtime/io-stmt.cpp
flang/runtime/io-stmt.h
flang/runtime/iostat.cpp