[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
Loading
Please sign in to comment