[flang] Do not include dangling ac-implied-do-index in folded shape inquiry
authorJean Perier <jperier@nvidia.com>
Fri, 24 Feb 2023 08:07:25 +0000 (09:07 +0100)
committerJean Perier <jperier@nvidia.com>
Fri, 24 Feb 2023 08:08:34 +0000 (09:08 +0100)
commitce8dbe3c253147b6229a34899d2adc5bc705157c
treea61e24dffd5d82c9f0b79705618beeddc0224a49
parent91bd4c6e81ac8aebf1089eb52b935484925f2f58
[flang] Do not include dangling ac-implied-do-index in folded shape inquiry

The current code was replacing inquiry to array constructor whose
ac-value shape depends on ac-implied-do-index with an expression
using the ac-implied-do-index without the implied-do (folding the
first case added in the test as in the second case with a regular
symbol).

Differential Revision: https://reviews.llvm.org/D144655
flang/include/flang/Evaluate/shape.h
flang/test/Evaluate/rewrite01.f90