[all-commits] [llvm/llvm-project] e8f968: [flang] Allow array constructor implied DO loop in...

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Nov 2 11:00:46 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e8f96899e17b11292940d8826338e2e0a64a22b9
      https://github.com/llvm/llvm-project/commit/e8f96899e17b11292940d8826338e2e0a64a22b9
  Author: peter klausler <pklausler at nvidia.com>
  Date:   2020-11-02 (Mon, 02 Nov 2020)

  Changed paths:
    M flang/include/flang/Parser/message.h
    M flang/include/flang/Semantics/expression.h
    M flang/lib/Semantics/expression.cpp
    A flang/test/Evaluate/folding13.f90
    M flang/test/Semantics/array-constr-values.f90

  Log Message:
  -----------
  [flang] Allow array constructor implied DO loop indices as constant expressions

When the bounds of an implied DO loop in an array constructor are
constant, the index variable of that loop is considered a constant
expression and can be used as such in the items in the value list
of the implied DO loop.  Since the KIND type parameter values of items
in the value list can depend on the various values taken by such an
index, it is not possible to represent those values with a single
typed expression.  So implement such loops by taking multiple passes
over the parse tree of the implied DO loop instead.

Differential revision: https://reviews.llvm.org/D90494




More information about the All-commits mailing list