Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion flang/lib/Semantics/resolve-names-utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,11 @@ void SymbolMapper::MapSymbolExprs(Symbol &symbol) {
proc.set_procInterfaces(
*mappedSymbol, BypassGeneric(mappedSymbol->GetUltimate()));
} else if (const DeclTypeSpec * mappedType{MapType(proc.type())}) {
proc.set_type(*mappedType);
if (proc.type()) {
CHECK(*proc.type() == *mappedType);
} else {
proc.set_type(*mappedType);
}
}
if (proc.init()) {
if (const Symbol * mapped{MapSymbol(*proc.init())}) {
Expand Down
14 changes: 14 additions & 0 deletions flang/test/Semantics/bug124487.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
!RUN: %flang_fc1 -fsyntax-only %s 2>&1 | FileCheck --allow-empty %s
!CHECK-NOT: error:
module m
interface
module subroutine smp(x)
character, external :: x
end
end interface
end
submodule (m) sm
contains
module procedure smp ! crashes here
end
end