Skip to content

Commit 49db716

Browse files
committed
[flang] Add a TODO for calls to procedures declared in outer scopes
When an internal procedure calls a dummy procedure which is declared in an outer scope, we raise an assertion. This change simply changes that assertion to a "TODO" so that users will know that this is not yet implemented rather than an internal error. An example program can be seen in issue #1186.
1 parent ce062ca commit 49db716

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flang/lib/Lower/ConvertExpr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,8 +1898,8 @@ class ScalarExprLowering {
18981898
bool addHostAssociations = false;
18991899
if (const auto *sym = caller.getIfIndirectCallSymbol()) {
19001900
funcPointer = symMap.lookupSymbol(*sym).getAddr();
1901-
assert(funcPointer &&
1902-
"dummy procedure or procedure pointer not in symbol map");
1901+
if (!funcPointer)
1902+
TODO(loc, "calling a dummy procedure declared in an outer scope");
19031903
} else {
19041904
auto funcOpType = caller.getFuncOp().getType();
19051905
auto symbolAttr = builder.getSymbolRefAttr(caller.getMangledName());

0 commit comments

Comments
 (0)