[PATCH] D100065: [flang] Enforce a limit on recursive PDT instantiations

Peter Klausler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 7 13:19:44 PDT 2021


klausler created this revision.
klausler added a reviewer: jeanPerier.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
klausler requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100065

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100065.335917.patch
Type: text/x-patch
Size: 8887 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210407/c783aed4/attachment.bin>


More information about the llvm-commits mailing list