[PATCH] D91560: [flang] Duplicate names for ac-implied-do variables erroneously cause errors
Pete Steinfeld via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 16 13:27:54 PST 2020
PeteSteinfeld added inline comments.
================
Comment at: flang/lib/Semantics/resolve-names.cpp:4999
+// Section 19.4, paragraph 5 says that each ac-do-variable has the scope of the
+// enclocing ac-impled-do
bool ConstructVisitor::Pre(const parser::AcImpliedDo &x) {
----------------
tskeith wrote:
> klausler wrote:
> > enclosing
> >
> > ac-implied-do
> enclosing
Ay-yi-yi. I'll fix these.
================
Comment at: flang/test/Semantics/array-constr-values.f90:65
+ real :: realArray(21) = &
+ [ ((1.0, iDuplicate = 1,j), &
+ (0.0, iDuplicate = j,3 ), &
----------------
klausler wrote:
> You should probably use the duplicated ac-implied-do names in the body and loop control expressions of the nested implied DO loop, and verify that a correct constant array is created.
Good idea. I'll create a constant folding test.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91560/new/
https://reviews.llvm.org/D91560
More information about the llvm-commits
mailing list