This is an archive of the discontinued LLVM Phabricator instance.

[flang] Only deallocate intent(out) allocatable through runtime if allocated
ClosedPublic

Authored by clementval on Jan 10 2023, 1:21 PM.

Details

Summary

Deallocation of intent(out) allocatable was done in D133348. This patch adds
an if guard when the deallocation is done through a runtime call. The runtime
is crashing if the box is not allocated. Call the runtime only if the box is
allocated. This is the case for derived type, polymorphic and unlimited
polymorphic entities.

Diff Detail

Event Timeline

clementval created this revision.Jan 10 2023, 1:21 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 10 2023, 1:21 PM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Jan 10 2023, 1:21 PM
PeteSteinfeld accepted this revision.Jan 10 2023, 3:11 PM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Jan 10 2023, 3:11 PM