[PATCH] D92501: [flang] Fix bogus message on interface procedure argument names
Pete Steinfeld via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 3 12:09:23 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf24c642178a5: [flang] Fix bogus message on interface procedure argument names (authored by PeteSteinfeld).
Changed prior to commit:
https://reviews.llvm.org/D92501?vs=309266&id=309331#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92501/new/
https://reviews.llvm.org/D92501
Files:
flang/lib/Semantics/resolve-names.cpp
flang/test/Semantics/equivalence01.f90
Index: flang/test/Semantics/equivalence01.f90
===================================================================
--- flang/test/Semantics/equivalence01.f90
+++ flang/test/Semantics/equivalence01.f90
@@ -1,4 +1,4 @@
-! RUN: %S/test_errors.sh %s %t %f18
+!RUN: %S/test_errors.sh %s %t %f18
subroutine s1
integer i, j
real r(2)
@@ -182,3 +182,18 @@
!ERROR: 'a(3_8)' and 'a(1_8)' cannot have the same first storage unit
equivalence(b(2),a(1))
end module
+
+subroutine s16
+
+ integer var, dupName
+
+ ! There should be no error message for the following
+ equivalence (dupName, var)
+
+ interface
+ subroutine interfaceSub (dupName)
+ integer dupName
+ end subroutine interfaceSub
+ end interface
+
+end subroutine s16
Index: flang/lib/Semantics/resolve-names.cpp
===================================================================
--- flang/lib/Semantics/resolve-names.cpp
+++ flang/lib/Semantics/resolve-names.cpp
@@ -6194,7 +6194,11 @@
// TODO: what about instantiations in BLOCK?
CheckSaveStmts();
CheckCommonBlocks();
- CheckEquivalenceSets();
+ if (!inInterfaceBlock()) {
+ // TODO: warn for the case where the EQUIVALENCE statement is in a
+ // procedure declaration in an interface block
+ CheckEquivalenceSets();
+ }
}
// Analyze the bodies of statement functions now that the symbols in this
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92501.309331.patch
Type: text/x-patch
Size: 1354 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201203/c3c5f55c/attachment.bin>
More information about the llvm-commits
mailing list