[all-commits] [llvm/llvm-project] ac64c7: [flang] Support PDT declaration with initial comp ...

jeanPerier via All-commits all-commits at lists.llvm.org
Tue Jun 14 05:47:03 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ac64c7b987f15bcce09b616c1ee0deaf2b7b587e
      https://github.com/llvm/llvm-project/commit/ac64c7b987f15bcce09b616c1ee0deaf2b7b587e
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M flang/lib/Lower/PFTBuilder.cpp
    M flang/test/Lower/host-associated.f90

  Log Message:
  -----------
  [flang] Support PDT declaration with initial comp value in internal procedure

Lowering was crashing with "fatal internal error: node has not been analyzed"
if a PDT with initial component value was defined inside an internal
procedure. This is because the related expression cannot be analyzed
without the component values (which happens at the instatiation).
These expression do not need to be visited (the instantiations, if any
will be). Use the form of GetExpr that tolerates the parse tree expression
to not be analyzed into an evaluate::Expr when looking through the
symbols used in an internal procedure.

Note that the PDTs TODO will then fire (it happens after the PFT
analysis) as expected if the derived type is used.

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




More information about the All-commits mailing list