[flang] Fix reversed comparison in RESHAPE() runtime
authorPeter Klausler <pklausler@nvidia.com>
Tue, 23 Nov 2021 21:37:15 +0000 (13:37 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Fri, 26 Nov 2021 20:34:00 +0000 (12:34 -0800)
commit45a8caf1cdf6a9cbe6dd183df62f22c57e3310ae
tree98ac3f15c688108d59f6af5aea4412540b1ae1fe
parent803cec0268000569051733e0d03b4c51d48ce5a6
[flang] Fix reversed comparison in RESHAPE() runtime

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).

Differential Revision: https://reviews.llvm.org/D114474
flang/runtime/transformational.cpp