Skip to content

Commit a8827bf

Browse files
author
git apple-llvm automerger
committed
Merge commit 'be9741b70b4e' from apple/main into swift/next
2 parents 72d9944 + be9741b commit a8827bf

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

flang/lib/Semantics/resolve-names.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3048,7 +3048,8 @@ Symbol *SubprogramVisitor::GetSpecificFromGeneric(const parser::Name &name) {
30483048
details->set_specific(Resolve(name, *specific));
30493049
} else if (isGeneric()) {
30503050
SayAlreadyDeclared(name, *specific);
3051-
} else if (!specific->has<SubprogramDetails>()) {
3051+
}
3052+
if (!specific->has<SubprogramDetails>()) {
30523053
specific->set_details(SubprogramDetails{});
30533054
}
30543055
return specific;

flang/test/Semantics/resolve19.f90

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,14 @@ subroutine s(x)
2222
end subroutine
2323
end interface
2424
end module
25+
26+
module m3
27+
interface s
28+
subroutine s
29+
end
30+
end interface
31+
contains
32+
!ERROR: 's' is already declared in this scoping unit
33+
subroutine s
34+
end subroutine
35+
end

0 commit comments

Comments
 (0)