[flang-commits] [PATCH] D132681: [flang] Allow a construct entity as a concurrent-header index
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Thu Aug 25 14:59:55 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGaef6b15744f7: [flang] Allow a construct entity as a concurrent-header index (authored by klausler).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132681/new/
https://reviews.llvm.org/D132681
Files:
flang/lib/Semantics/resolve-names.cpp
flang/test/Semantics/forall01.f90
Index: flang/test/Semantics/forall01.f90
===================================================================
--- flang/test/Semantics/forall01.f90
+++ flang/test/Semantics/forall01.f90
@@ -110,3 +110,25 @@
a(1)%p => b(i)
end forall
end
+
+subroutine forall7(x)
+ integer :: iarr(1)
+ real :: a(10)
+ class(*) :: x
+ associate (j => iarr(1))
+ forall (j=1:size(a))
+ a(j) = a(j) + 1
+ end forall
+ end associate
+ associate (j => iarr(1) + 1)
+ forall (j=1:size(a))
+ a(j) = a(j) + 1
+ end forall
+ end associate
+ select type (j => x)
+ type is (integer)
+ forall (j=1:size(a))
+ a(j) = a(j) + 1
+ end forall
+ end select
+end subroutine
Index: flang/lib/Semantics/resolve-names.cpp
===================================================================
--- flang/lib/Semantics/resolve-names.cpp
+++ flang/lib/Semantics/resolve-names.cpp
@@ -5883,10 +5883,10 @@
} else if (!prev) {
ApplyImplicitRules(symbol);
} else {
- const Symbol &prevRoot{ResolveAssociations(*prev)};
+ const Symbol &prevRoot{prev->GetUltimate()};
// prev could be host- use- or construct-associated with another symbol
if (!prevRoot.has<ObjectEntityDetails>() &&
- !prevRoot.has<EntityDetails>()) {
+ !prevRoot.has<AssocEntityDetails>()) {
Say2(name, "Index name '%s' conflicts with existing identifier"_err_en_US,
*prev, "Previous declaration of '%s'"_en_US);
context().SetError(symbol);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132681.455727.patch
Type: text/x-patch
Size: 1477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220825/93bb5fab/attachment-0001.bin>
More information about the flang-commits
mailing list