[flang] Fix ISHFTC argument value check
authorPeter Klausler <pklausler@nvidia.com>
Wed, 15 Feb 2023 00:07:24 +0000 (16:07 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Thu, 2 Mar 2023 17:17:09 +0000 (09:17 -0800)
commite0daa2ebd39c5ce542a6af87e1e3ce68e91604d8
treefa3d89af25ecbcf06bd68aa0ae894ea9fa6253d7
parentfee3f0bd4acb8497d21f8030a62f30d8c6ea0f96
[flang] Fix ISHFTC argument value check

The code that visits all pairs of constant SHIFT= and SIZE= arguments
in an array-valued call to the ISHFTC intrinsic function had a bad loop
test that affected the case where one of these arguments was scalar and
the other was not.  Fix it, and add tests.

Differential Revision: https://reviews.llvm.org/D145092
flang/lib/Evaluate/fold-integer.cpp
flang/test/Semantics/ishftc.f90