[flang-commits] [PATCH] D115470: [flang] Fix folding of ac-implied-do indices in structure c'tors
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Thu Dec 9 14:14:57 PST 2021
klausler created this revision.
klausler added a reviewer: vdonaldson.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a reviewer: sscalpone.
klausler requested review of this revision.
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.
https://reviews.llvm.org/D115470
Files:
flang/lib/Evaluate/fold-implementation.h
flang/lib/Evaluate/fold.cpp
flang/test/Evaluate/folding30.f90
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115470.393284.patch
Type: text/x-patch
Size: 3804 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20211209/6ecc678c/attachment.bin>
More information about the flang-commits
mailing list