[flang] Prevent character length setting with dangling ac-do-variable.
authorSlava Zakharin <szakharin@nvidia.com>
Mon, 8 May 2023 23:21:14 +0000 (16:21 -0700)
committerSlava Zakharin <szakharin@nvidia.com>
Mon, 8 May 2023 23:57:07 +0000 (16:57 -0700)
commitc8b50b860068bb9116c17ad3d8b616285eb68c71
tree89368190180015c8660b69d8bc80bcaa4ae2575f
parent6fe46219631fda60e2dc25ca285f30957ba6d3c7
[flang] Prevent character length setting with dangling ac-do-variable.

This fixes LEN inquiry on array constructors where the length
expression includes references to the ac-do-variable.

Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D150149
flang/lib/Semantics/expression.cpp
flang/test/Evaluate/rewrite01.f90