[flang] Check constraint C1577 for statement functions
authorPeter Klausler <pklausler@nvidia.com>
Thu, 10 Nov 2022 18:24:38 +0000 (10:24 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Sat, 3 Dec 2022 23:43:47 +0000 (15:43 -0800)
commit1623aee41a5c7088954b7f8f890ee3a618f0e8c8
treee3a6b2e1196a1cc0fb5b2fd5ace8c27b950e4445
parentc95922c717973889ee669066abfc2e8be07050bf
[flang] Check constraint C1577 for statement functions

Check most of the requiremens of constraint C1577 for statement functions.
The restrictions that prevent recursion are hard errors; the others seem
to be benign legacies and are caught as portability warnings.

Differential Revision: https://reviews.llvm.org/D139136
flang/include/flang/Evaluate/check-expression.h
flang/include/flang/Semantics/expression.h
flang/include/flang/Semantics/symbol.h
flang/lib/Evaluate/check-expression.cpp
flang/lib/Evaluate/tools.cpp
flang/lib/Semantics/check-declarations.cpp
flang/lib/Semantics/expression.cpp
flang/lib/Semantics/resolve-names.cpp
flang/test/Semantics/stmt-func01.f90 [new file with mode: 0644]