This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix crash in shape analysis of PACK()
ClosedPublic

Authored by klausler on Jun 5 2023, 5:00 PM.

Details

Summary

A CHECK() was firing when a call to the PACK intrinsic does not have a
VECTOR= argument and at least one dimension of the shape of the ARRAY=
argument could not be determined. The CHECK was inappropriate, since
this can of course happen, such as when that argument is the result
of the SPREAD() intrinsic with non-constant DIM= or NCOPIES= arguments.
Replace with an if() statement.

Diff Detail

Event Timeline

klausler created this revision.Jun 5 2023, 5:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 5 2023, 5:00 PM
klausler requested review of this revision.Jun 5 2023, 5:00 PM
PeteSteinfeld accepted this revision.Jun 5 2023, 5:46 PM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Jun 5 2023, 5:46 PM
This revision was automatically updated to reflect the committed changes.