This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix reversed comparison in RESHAPE() runtime
ClosedPublic

Authored by klausler on Nov 23 2021, 1:41 PM.

Details

Summary

RESHAPE() fails inappropriately at runtime if the source array
is larger than the result -- which is perfectly valid -- because
of an obviously reversed comparison of their numbers of elements
is activating the runtime asserts meant for the opposite case
(source smaller than result).

Diff Detail

Event Timeline

klausler created this revision.Nov 23 2021, 1:41 PM
klausler requested review of this revision.Nov 23 2021, 1:41 PM
PeteSteinfeld accepted this revision.Nov 23 2021, 2:17 PM

All builds, tests, and looks good.

This revision is now accepted and ready to land.Nov 23 2021, 2:17 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptNov 26 2021, 12:34 PM