Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang] Preserve useResultSymbolShape_ option when folding array cons…
…tructor shape By default evaluate::GetShape(expr) may return a compiler generated expression using symbols that are part of function interfaces if there are function references in "expr". It is not right to replace an inquiry of "expr" with such compiler generated expression since the call context would be lost, along with the meaning of the inquiry expression. Inquiry folding uses GetContextFreeShape(expr) that sets-up useResultSymbolShape_ in GetShapeHelper to prevent such bad rewrites. But this did not work properly with array constructor: GetShapeHelper made a call to GetShape, ignoring and losing the "useResultSymbolShape_" instruction. Differential Revision: https://reviews.llvm.org/D144512
- Loading branch information