[flang][RFC] Change the interface for non-BIND(C) CPTR type with VALUE attribute
authorPeixin Qiao <qiaopeixin@huawei.com>
Fri, 4 Nov 2022 14:19:38 +0000 (22:19 +0800)
committerPeixin Qiao <qiaopeixin@huawei.com>
Fri, 4 Nov 2022 14:19:38 +0000 (22:19 +0800)
commitfe9409b9fad352bbad7064f6c8be1e1ef0b12586
treeb5387160ed6815ae139aa19e09cfa08585fc3a98
parent749242668885d86a4f8bd6a5e697250b6cdb36d3
[flang][RFC] Change the interface for non-BIND(C) CPTR type with VALUE attribute

When the `type(c_ptr/c_funptr)` argument has value attribute in non-BIND(C)
procedure, it is passed by VALUE in gfortran. ifort does not do this. Be
consistent with gfortran.

Fix #58756.

Reviewed By: PeteSteinfeld, jeanPerier

Differential Revision: https://reviews.llvm.org/D137237
flang/lib/Lower/CallInterface.cpp
flang/test/Lower/call-by-value.f90