This is an archive of the discontinued LLVM Phabricator instance.

[flang] Enforce a limit on recursive PDT instantiations
ClosedPublic

Authored by klausler on Apr 7 2021, 1:19 PM.

Details

Summary

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.

Diff Detail

Event Timeline

klausler created this revision.Apr 7 2021, 1:19 PM
klausler requested review of this revision.Apr 7 2021, 1:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2021, 1:19 PM
This revision is now accepted and ready to land.Apr 8 2021, 12:12 AM
This revision was automatically updated to reflect the committed changes.