[flang] Fix folding of ac-implied-do indices in structure c'tors
Array constructors with implied DO loops that oversee structure constructors were being prematurely folded into invalid constants containing symbolic references to the ac-implied-do indices, because they are indeed "constant expressions" as that term is used in the Fortran standard and implemented as IsConstantExpr(). What's actually needed in structure constructor folding is a test for actual constant values, which is what results from folding them later with repetition in the context of folding an ac-implied-do. Differential Revision: https://reviews.llvm.org/D115470
Loading
Please register or sign in to comment