[flang] Allow "non-expandable" scalars in single-element contexts
When a scalar expression is not expandable -- i.e., it would have to be evaluated once and saved in a temporary to avoid changing the semantics of the program if it were to be evaluated more than once -- it affects some aspects of folding and expression semantics. In cases where scalar expansion would not cause multiple evaluations due to the shape of the result having but a single element, however, these "non-expandable" scalar expressions can be safely allowed. Differential Revision: https://reviews.llvm.org/D134476
Loading
Please sign in to comment