[flang] Include source information in an invalid file-unit-number message
authorpeter klausler <pklausler@nvidia.com>
Thu, 12 Nov 2020 19:57:23 +0000 (11:57 -0800)
committerpeter klausler <pklausler@nvidia.com>
Thu, 12 Nov 2020 21:12:17 +0000 (13:12 -0800)
commit04a147987a6bde657bcdd505e651b7580cc60a2e
tree125407858a0dcc324add0760150400e36f22e196
parentf897e82bfd86099a5321e3fd50c63598e11e289b
[flang] Include source information in an invalid file-unit-number message

An io-unit that is an internal-file-variable is syntactically identical
to a file-unit-number expression that is a variable reference.  An
ambiguous unit is initially parsed as an internal-file-variable.  If
semantic analysis determines that the unit is not of character type,
it is rewritten as an internal-file-variable.  This modification must
retain source coordinate information.

Differential revision: https://reviews.llvm.org/D91375
flang/lib/Semantics/rewrite-parse-tree.cpp
flang/test/Semantics/io04.f90