[flang] Fix crash from PDT component init in module file
authorPeter Klausler <pklausler@nvidia.com>
Mon, 25 Apr 2022 23:00:01 +0000 (16:00 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Tue, 26 Apr 2022 17:49:05 +0000 (10:49 -0700)
commitf4bb211a3b1600bd56edf17479f77f86ab402d7b
treeafea05a26eb416286a7699dce583a0d6fdfdb912
parent6753bb2c41264aed432ffb90d2b0291d0cdb9289
[flang] Fix crash from PDT component init in module file

Semantics now needs to preserve the parse trees from module files,
in case they contain parameterized derived type definitions with
component initializers that may require re-analysis during PDT
instantiation.  Save them in the SemanticsContext.

Differential Revision: https://reviews.llvm.org/D124467
flang/include/flang/Semantics/semantics.h
flang/lib/Semantics/mod-file.cpp
flang/lib/Semantics/semantics.cpp