This is an archive of the discontinued LLVM Phabricator instance.

[flang] Handle DATA initialization of EQUIVALENCE'd objects
ClosedPublic

Authored by klausler on Aug 7 2020, 2:41 PM.

Details

Summary

Objects that are storage associated by EQUIVALENCE and
initialized with DATA are initialized by creating a
compiler temporary data object in the same scope,
assigning it an offset, type, and size that covers the
transitive closure of the associated initialized original
symbols, and combining their initializers into one common
initializer for the temporary.

Some problems with offset assignment of EQUIVALENCE'd objects
in COMMON were exposed and corrected, and some more error
cases are checked.

Diff Detail

Event Timeline

klausler created this revision.Aug 7 2020, 2:41 PM
Herald added a project: Restricted Project. · View Herald Transcript
klausler requested review of this revision.Aug 7 2020, 2:41 PM
tskeith added inline comments.Aug 7 2020, 3:33 PM
flang/lib/Semantics/data-to-inits.h
19
klausler updated this revision to Diff 284073.Aug 7 2020, 3:42 PM

Fixed warning (class vs struct).

klausler marked an inline comment as done.Aug 7 2020, 3:43 PM
tskeith accepted this revision.Aug 7 2020, 4:01 PM
This revision is now accepted and ready to land.Aug 7 2020, 4:01 PM
sscalpone accepted this revision.Aug 7 2020, 4:24 PM