Skip to content

Commit be9741b

Browse files
author
git apple-llvm automerger
committed
Merge commit '29d838310d45' from llvm.org/master into apple/main
2 parents 75aa4c7 + 29d8383 commit be9741b

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)