[flang] Added missing type cast for the implied-do index.
authorSlava Zakharin <szakharin@nvidia.com>
Tue, 9 May 2023 15:41:03 +0000 (08:41 -0700)
committerSlava Zakharin <szakharin@nvidia.com>
Tue, 9 May 2023 20:26:32 +0000 (13:26 -0700)
commit9a7b363eeb867974aeb511c6ce0cfad723523aed
tree6fd498dfa6daa3ecf783406b23ce8fbaf4bdfbc4
parentfdce1b7ed3a625e32ec18d0f0caecd733f95b704
[flang] Added missing type cast for the implied-do index.

The implied-do index value has 'index' type, and it has to be
converted to the original ac-do-variable's data type.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D150150
flang/lib/Lower/ConvertExpr.cpp
flang/lib/Lower/ConvertExprToHLFIR.cpp
flang/test/Lower/HLFIR/array-ctor-as-elemental.f90
flang/test/Lower/HLFIR/array-ctor-as-inlined-temp.f90
flang/test/Lower/HLFIR/array-ctor-as-runtime-temp.f90
flang/test/Lower/HLFIR/array-ctor-index.f90 [new file with mode: 0644]
flang/test/Lower/array-constructor-index.f90 [new file with mode: 0644]