[flang] Accept assumed shape arrays as SHAPE in C_F_POINTER
authorJean Perier <jperier@nvidia.com>
Tue, 6 Sep 2022 12:42:28 +0000 (14:42 +0200)
committerJean Perier <jperier@nvidia.com>
Tue, 6 Sep 2022 12:46:24 +0000 (14:46 +0200)
commit59482586e5927b4e57e275b304e9e17e61af2b9d
tree7edab6a71f095fb9c9aa7f889a49a8b0d5217238
parent3dd861818a68b2e0b21d426ee956ec8d69f89c88
[flang] Accept assumed shape arrays as SHAPE in C_F_POINTER

C_F_POINTER was added in https://reviews.llvm.org/D132303, but the code
assumed that SHAPE would always be an explicit shape with compile time
constant rank. It can actually be an assumed shape, or an explicit shape
with non compile time constant rank. Get the rank from FPTR pointer
instead.

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