[all-commits] [llvm/llvm-project] 509167: [flang] Enforce a limit on recursive PDT instantia...

Peter Klausler via All-commits all-commits at lists.llvm.org
Fri Apr 9 16:38:52 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5091671c9ba2ca42ecede7b05347084b7c2dd974
      https://github.com/llvm/llvm-project/commit/5091671c9ba2ca42ecede7b05347084b7c2dd974
  Author: peter klausler <pklausler at nvidia.com>
  Date:   2021-04-09 (Fri, 09 Apr 2021)

  Changed paths:
    M flang/include/flang/Semantics/tools.h
    M flang/include/flang/Semantics/type.h
    M flang/lib/Semantics/expression.cpp
    M flang/lib/Semantics/resolve-names.cpp
    M flang/lib/Semantics/scope.cpp
    M flang/lib/Semantics/tools.cpp
    M flang/lib/Semantics/type.cpp

  Log Message:
  -----------
  [flang] Enforce a limit on recursive PDT instantiations

For pernicious test cases with explicit non-constant actual
type parameter expressions in components, e.g.:

  type :: t(k)
    integer, kind :: k
    type(t(k+1)), pointer :: p
  end type

we should detect the infinite recursion and complain rather
than looping until the stack overflows.

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




More information about the All-commits mailing list