[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
Mon Apr 13 08:51:57 PDT 2026


================
@@ -4687,6 +4687,10 @@ 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' may still point to a host-associated SubprogramNameDetails
+      // symbol. Reset it so statement-function processing
+      //  re-resolves to the new local SubprogramDetails.
----------------
eugeneepshteyn wrote:

Nit: extra space before 're-resolves'.

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


More information about the flang-commits mailing list