[PATCH] D89829: [flang] Fix call to CHECK() on erroneous subroutine declaration
Pete Steinfeld via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 20 18:12:18 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG29d838310d45: [flang] Fix call to CHECK() on erroneous subroutine declaration (authored by PeteSteinfeld).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89829/new/
https://reviews.llvm.org/D89829
Files:
flang/lib/Semantics/resolve-names.cpp
flang/test/Semantics/resolve19.f90
Index: flang/test/Semantics/resolve19.f90
===================================================================
--- flang/test/Semantics/resolve19.f90
+++ flang/test/Semantics/resolve19.f90
@@ -22,3 +22,14 @@
end subroutine
end interface
end module
+
+module m3
+ interface s
+ subroutine s
+ end
+ end interface
+contains
+ !ERROR: 's' is already declared in this scoping unit
+ subroutine s
+ end subroutine
+end
Index: flang/lib/Semantics/resolve-names.cpp
===================================================================
--- flang/lib/Semantics/resolve-names.cpp
+++ flang/lib/Semantics/resolve-names.cpp
@@ -3048,7 +3048,8 @@
details->set_specific(Resolve(name, *specific));
} else if (isGeneric()) {
SayAlreadyDeclared(name, *specific);
- } else if (!specific->has<SubprogramDetails>()) {
+ }
+ if (!specific->has<SubprogramDetails>()) {
specific->set_details(SubprogramDetails{});
}
return specific;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89829.299530.patch
Type: text/x-patch
Size: 991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201021/d8ce1773/attachment.bin>
More information about the llvm-commits
mailing list