This is an archive of the discontinued LLVM Phabricator instance.

[flang] Allow array constructor implied DO loop indices as constant expressions
ClosedPublic

Authored by klausler on Oct 30 2020, 12:59 PM.

Details

Summary

When the bounds of an implied DO loop in an array constructor are
constant, the index variable of that loop is considered a constant
expression and can be used as such in the items in the value list
of the implied DO loop. Since the KIND type parameter values of items
in the value list can depend on the various values taken by such an
index, it is not possible to represent those values with a single
typed expression. So implement such loops by taking multiple passes
over the parse tree of the implied DO loop instead.

Diff Detail

Event Timeline

klausler created this revision.Oct 30 2020, 12:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 30 2020, 12:59 PM
klausler requested review of this revision.Oct 30 2020, 12:59 PM
jeanPerier accepted this revision.Nov 2 2020, 12:46 AM

Looks good to me

This revision is now accepted and ready to land.Nov 2 2020, 12:46 AM