[all-commits] [llvm/llvm-project] b8e8f6: [flang] Fold instantiated PDT character component ...

jeanPerier via All-commits all-commits at lists.llvm.org
Mon Apr 4 00:48:21 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b8e8f62d5e72c7f4fc61985406fb27714e2c2f7c
      https://github.com/llvm/llvm-project/commit/b8e8f62d5e72c7f4fc61985406fb27714e2c2f7c
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2022-04-04 (Mon, 04 Apr 2022)

  Changed paths:
    M flang/include/flang/Evaluate/check-expression.h
    M flang/lib/Evaluate/check-expression.cpp
    M flang/lib/Semantics/type.cpp
    M flang/test/Lower/derived-types-kind-params.f90
    M flang/test/Semantics/offsets02.f90

  Log Message:
  -----------
  [flang] Fold instantiated PDT character component length when needed

In case a character component PDT length only depends on kind parameters,
fold it while instantiating the PDT. This is especially important if the
component has an initializer because later semantic phases (offset
computation or runtime type info generation) might get confused and
generate offset/type info that will lead to crashes in lowering.

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




More information about the All-commits mailing list