[flang-commits] [flang] [Flang] Fix statement-function shadowing to avoid false unresolved-symbol internal error (PR #189360)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Tue Apr 7 11:33:23 PDT 2026


================
@@ -4687,6 +4687,7 @@ bool SubprogramVisitor::HandleStmtFunction(const parser::StmtFunctionStmt &x) {
           "Name '%s' from host scope should have a type declaration before its local statement function definition"_port_en_US,
           name.source);
       MakeSymbol(name, Attrs{}, UnknownDetails{});
+      name.symbol = nullptr;
----------------
eugeneepshteyn wrote:

Please add a few sentences comment why this is done. (Basically, a short version of what you have in PR description.)

https://github.com/llvm/llvm-project/pull/189360


More information about the flang-commits mailing list