llvm-project/flang/lib
Peter Steinfeld 4e90cad6a6 [flang] Handle undeclared names in EQUIVALENCE statements
Names in EQUIVALENCE statements are only allowed to indicate local
objects as per 19.5.1.4, paragraph 2, item (10).  Thus, a name appearing
in an EQUIVALENCE statement with no corresponding declaration in the
same scope is an implicit declaration of the name.  If that scope
contains an IMPLICIT NONE, it's an error.

I implemented this by adding a state variable to ScopeHandler to
indicate if we're resolving the names in an EQUIVALENCE statement and
then checked this state when resolving names.  I also added a test to
the existing tests for EQUIVALENCE statements.

Differential Revision: https://reviews.llvm.org/D93345
2020-12-16 11:04:27 -08:00
..
Common [flang] Use the Flang cmake-functions to add targets. 2020-04-16 15:51:30 +01:00
Decimal [flang] Readability improvement in binary->decimal conversion 2020-10-01 15:49:27 -07:00
Evaluate [flang] Fix crash in folding (#48437) 2020-12-16 07:55:44 -08:00
Frontend [flang][driver] Fix a small bug (auto vs auto&) 2020-12-14 16:10:07 +00:00
FrontendTool [Flang][Driver] Add PrintPreprocessedInput FrontendAction (`flang-new -E`) 2020-11-02 14:03:35 +00:00
Lower [flang] Use mlir::OpState::operator->() to get to methods of mlir::Operation. 2020-12-14 20:04:53 +01:00
Optimizer [flang] Use mlir::OpState::operator->() to get to methods of mlir::Operation. 2020-12-14 20:04:53 +01:00
Parser [flang] Clean up TODO comments and fix one (DATA constant ambiguity) 2020-12-15 13:36:07 -08:00
Semantics [flang] Handle undeclared names in EQUIVALENCE statements 2020-12-16 11:04:27 -08:00
CMakeLists.txt [flang][driver] Add the new flang compiler and frontend drivers 2020-09-11 10:55:54 +01:00