[PATCH] D91560: [flang] Duplicate names for ac-implied-do variables erroneously cause errors

Peter Klausler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 12:24:33 PST 2020


klausler 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) {
----------------
enclosing

ac-implied-do


================
Comment at: flang/test/Semantics/array-constr-values.f90:65
+  real :: realArray(21) = &
+    [ ((1.0, iDuplicate = 1,j), &
+       (0.0, iDuplicate = j,3 ), &
----------------
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.


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