[flang-commits] [flang] [flang] Implement check for statement function dummy argument names (PR #204417)
via flang-commits
flang-commits at lists.llvm.org
Thu Jun 18 08:03:02 PDT 2026
kwyatt-ext wrote:
Further "Description" that might be helpful for reviewers, but not necessary for the PR description:
The check is placed in `AnalyzeStmtFunctionStmt`, which runs from
`FinishSpecificationPart` after all declarations and implicit typing in the
specification part are complete. This matters because a name used as a function
call later in the same specification part is resolved to a procedure only after
that call is walked — placing the check earlier would misclassify it as a scalar.
The lookup uses `Scope::FindSymbol`, which walks the host chain up to (but not
into) the global scope, so host-associated and USE-associated names are covered
alongside locally declared ones. The scalar-variable exception accepts both
`ObjectEntityDetails` and bare `EntityDetails`, since explicitly-typed scalars
(`real :: x`) remain as the latter throughout name resolution.
https://github.com/llvm/llvm-project/pull/204417
More information about the flang-commits
mailing list