[flang] Support PDT declaration with initial comp value in internal procedure
Lowering was crashing with "fatal internal error: node has not been analyzed" if a PDT with initial component value was defined inside an internal procedure. This is because the related expression cannot be analyzed without the component values (which happens at the instatiation). These expression do not need to be visited (the instantiations, if any will be). Use the form of GetExpr that tolerates the parse tree expression to not be analyzed into an evaluate::Expr when looking through the symbols used in an internal procedure. Note that the PDTs TODO will then fire (it happens after the PFT analysis) as expected if the derived type is used. Differential Revision: https://reviews.llvm.org/D127735
parent
7625e01d
Please register or sign in to comment