This is an archive of the discontinued LLVM Phabricator instance.

[flang] Add AllocatableInit functions for use in allocate lowering
ClosedPublic

Authored by clementval on Mar 17 2023, 5:36 AM.

Details

Summary

AllocatableInitIntrinsic, AllocatableInitCharacter and
AllocatableInitDerived are meant to be used to initialize a
descriptor when it is instantiated and not to be used multiple
times in a scope.
Add AllocatableInitDerivedForAllocate, AllocatableInitCharacterForAllocate
and AllocatableInitDerivedForAllocate to be used for the allocation
in allocate statement.
These new functions are meant to be used on an initialized descriptor
and will return directly if the descriptor is allocated so the
error handling is done by the call to AllocatableAllocate.

Diff Detail

Event Timeline

clementval created this revision.Mar 17 2023, 5:36 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 17 2023, 5:36 AM
Herald added a subscriber: sunshaoce. · View Herald Transcript
clementval requested review of this revision.Mar 17 2023, 5:36 AM
PeteSteinfeld accepted this revision.Mar 17 2023, 6:20 AM

All builds and tests correctly and looks good.

Note that the x64 Debian build failed, but the failures don't seem related to this patch.

This revision is now accepted and ready to land.Mar 17 2023, 6:20 AM
This revision was landed with ongoing or failed builds.Mar 20 2023, 2:00 AM
This revision was automatically updated to reflect the committed changes.