File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -379,8 +379,11 @@ bool IsInitialProcedureTarget(const semantics::Symbol &symbol) {
379379 common::visitors{
380380 [&](const semantics::SubprogramDetails &subp) {
381381 return !subp.isDummy () && !subp.stmtFunction () &&
382- symbol.owner ().kind () != semantics::Scope::Kind::MainProgram &&
383- symbol.owner ().kind () != semantics::Scope::Kind::Subprogram;
382+ ((symbol.owner ().kind () !=
383+ semantics::Scope::Kind::MainProgram &&
384+ symbol.owner ().kind () !=
385+ semantics::Scope::Kind::Subprogram) ||
386+ ultimate.attrs ().test (semantics::Attr::EXTERNAL));
384387 },
385388 [](const semantics::SubprogramNameDetails &x) {
386389 return x.kind () != semantics::SubprogramKind::Internal;
Original file line number Diff line number Diff line change 1+ ! RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s
2+ ! CHECK: TYPE(t) :: x = t(pp=f)
3+ ! CHECK-NOT: error:
4+ interface
5+ function f ()
6+ end
7+ end interface
8+ type t
9+ procedure (f), nopass, pointer :: pp
10+ end type
11+ type (t) :: x = t(pp= f)
12+ end
You can’t perform that action at this time.
0 commit comments