This is an archive of the discontinued LLVM Phabricator instance.

[flang] prevent rewrite of CMPLX with dynamically optional Y argument
ClosedPublic

Authored by jeanPerier on Feb 2 2022, 6:21 AM.

Details

Summary

CMPLX was always rewritten as a complex constructor, but the second operand
of a complex constructor cannot be dynamically absent (i.e., a
disassociated pointer, an unallocated allocatable or an absent OPTIONAL
dummy argument), while the second argument of CMPLX can be dynamically
absent.

To avoid having to generate branches in complex constructor lowering
when Y is a pointer, keep the distinction between CMPLX and a complex
constructor when Y is a pointer, an allocatable, or an OPTIONAL entity.

Diff Detail

Event Timeline

jeanPerier created this revision.Feb 2 2022, 6:21 AM
jeanPerier requested review of this revision.Feb 2 2022, 6:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2022, 6:21 AM
klausler accepted this revision.Feb 2 2022, 8:10 AM
This revision is now accepted and ready to land.Feb 2 2022, 8:10 AM