Commit ac64c7b9 authored by Jean Perier's avatar Jean Perier
Browse files

[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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment