[flang] Warn about construct names that are not distinct in the inclusive scope
authorPeter Klausler <pklausler@nvidia.com>
Thu, 2 Feb 2023 20:11:01 +0000 (12:11 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Sun, 12 Feb 2023 19:42:38 +0000 (11:42 -0800)
commit594700c12247e64a623043164fc10a93d59f5068
tree13125dd7aebf1480e9a5594e808cf89c764aac83
parent129eb5bcab91a12ed3c4712279f201834ae2d8e1
[flang] Warn about construct names that are not distinct in the inclusive scope

f18 implements BLOCK scoping for construct names, like most but not all Fortran
compilers, but in the 2018 standard such names are defined to be local identifiers
whose scope is the inclusive scope -- i.e., the subprogram or main program.
Detect usage that depends on this extension and emit a portability warning.

Differential Revision: https://reviews.llvm.org/D143776
flang/docs/Extensions.md
flang/lib/Semantics/resolve-names.cpp
flang/test/Semantics/OpenACC/acc-branch.f90