[all-commits] [llvm/llvm-project] 3a1afd: Rework DATA statement semantics to use typed expre...

Peter Klausler via All-commits all-commits at lists.llvm.org
Sat Apr 25 10:30:51 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3a1afd8c3d4bb5ded8262697c1aaebfd96e2a319
      https://github.com/llvm/llvm-project/commit/3a1afd8c3d4bb5ded8262697c1aaebfd96e2a319
  Author: peter klausler <pklausler at nvidia.com>
  Date:   2020-04-25 (Sat, 25 Apr 2020)

  Changed paths:
    M flang/include/flang/Evaluate/check-expression.h
    M flang/include/flang/Evaluate/expression.h
    M flang/include/flang/Evaluate/tools.h
    M flang/include/flang/Evaluate/variable.h
    M flang/include/flang/Parser/dump-parse-tree.h
    M flang/include/flang/Parser/parse-tree.h
    M flang/include/flang/Parser/tools.h
    M flang/include/flang/Semantics/expression.h
    M flang/lib/Evaluate/check-expression.cpp
    M flang/lib/Evaluate/variable.cpp
    M flang/lib/Parser/Fortran-parsers.cpp
    M flang/lib/Semantics/check-data.cpp
    M flang/lib/Semantics/check-data.h
    M flang/lib/Semantics/expression.cpp
    M flang/lib/Semantics/resolve-names.cpp
    M flang/test/Semantics/assign04.f90
    M flang/test/Semantics/data03.f90

  Log Message:
  -----------
  Rework DATA statement semantics to use typed expressions

Summary:
Updates recent work on DATA statement semantic checking in
flang/lib/Semantics/check-data.{h,cpp} to use the compiler's
internal representation for typed expressions rather than working
on the raw parse tree.  Saves the analyzed expressions for DATA
statement values as parse tree decorations because they'll soon be
needed in lowering.  Corrects wording of some error messages.

Fixes a bug in constant expression checking: structure constructors
are not constant expressions if they set an allocatable component
to anything other than NULL.

Includes infrastructure changes to make this work, some renaming
to reflect the fact that the implied DO loop indices tracked by
expression analysis are not (just) from array constructors, remove
some dead code, and improve some comments.

Reviewers: tskeith, sscalpone, jdoerfert, DavidTruby, anchu-rajendran, schweitz

Reviewed By: tskeith, anchu-rajendran, schweitz

Subscribers: llvm-commits, flang-commits

Tags: #flang, #llvm

Differential Revision: https://reviews.llvm.org/D78834




More information about the All-commits mailing list