[all-commits] [llvm/llvm-project] b38539: [flang] Add support for lowering intrinsic module ...
PeixinQiao via All-commits
all-commits at lists.llvm.org
Tue Oct 25 18:10:36 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b385395c97e1422ddd83e9cd3b93c6b15fbadc6e
https://github.com/llvm/llvm-project/commit/b385395c97e1422ddd83e9cd3b93c6b15fbadc6e
Author: Peixin-Qiao <qiaopeixin at huawei.com>
Date: 2022-10-26 (Wed, 26 Oct 2022)
Changed paths:
M flang/include/flang/Optimizer/Builder/FIRBuilder.h
M flang/lib/Lower/IntrinsicCall.cpp
M flang/lib/Optimizer/Builder/FIRBuilder.cpp
A flang/test/Lower/Intrinsics/c_associated.f90
Log Message:
-----------
[flang] Add support for lowering intrinsic module procedure C_ASSOCIATED
As Fortran 2018 18.2.3.2, the arguments of C_ASSOCIATED have the same
type, a scalar of type C_PTR or C_FUNPTR, and the result has the default
logical scalar type. The interface is defined with two module procedures
c_associated_c_ptr/c_associated_c_funptr in flang/module/iso_c_binding.
The result is false if the first argument is a C null pointer. If the
second argument is present, the result is true only if the two arguments
are equal. Support the lowering by comparing the C pointer address
values of two arguments if the second argument is dynamically present
and comparing the C pointer address value of the first argument with the
value 0.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D136419
More information about the All-commits
mailing list