[flang] fix LBOUND lowering with KIND and no DIM arguments
authorJean Perier <jperier@nvidia.com>
Mon, 25 Apr 2022 07:20:07 +0000 (09:20 +0200)
committerJean Perier <jperier@nvidia.com>
Mon, 25 Apr 2022 07:20:51 +0000 (09:20 +0200)
commitfca52e82185a9eb49da47372ac92b7a4107b0fc9
tree97caeaafcc15490963082f89d0a94130e39669bb
parent34312f1f0c4f56ae78577783ec62bee3fb5dab90
[flang] fix LBOUND lowering with KIND and no DIM arguments

The lowering code was mistakenly assuming that the second argument
in the signature provided by semantics is the DIM argument. This
caused calls with a KIND argument but no DIM to be lowered as if the
KIND argument was DIM.

Differential Revision: https://reviews.llvm.org/D124243
flang/lib/Lower/IntrinsicCall.cpp
flang/test/Lower/Intrinsics/lbound.f90