[flang-commits] [flang] [flang] Correct dummy argument names for C_ASSOCIATED() for C_FUNPTR (PR #70961)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Wed Nov 1 10:11:10 PDT 2023
https://github.com/klausler created https://github.com/llvm/llvm-project/pull/70961
The dummy argument names used for the interface to C_ASSOCIATED() were wrong.
>From 23cc32c42e09cb753b5e190ab77bfe73d4ea7068 Mon Sep 17 00:00:00 2001
From: Peter Klausler <pklausler at nvidia.com>
Date: Wed, 1 Nov 2023 10:07:10 -0700
Subject: [PATCH] [flang] Correct dummy argument names for C_ASSOCIATED() for
C_FUNPTR
The dummy argument names used for the interface to C_ASSOCIATED()
were wrong.
---
flang/module/__fortran_builtins.f90 | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/flang/module/__fortran_builtins.f90 b/flang/module/__fortran_builtins.f90
index 37907c84b2b72e8..347f8d7b702c137 100644
--- a/flang/module/__fortran_builtins.f90
+++ b/flang/module/__fortran_builtins.f90
@@ -122,13 +122,13 @@ pure logical function c_associated_c_ptr(c_ptr_1, c_ptr_2)
end if
end function c_associated_c_ptr
- pure logical function c_associated_c_funptr(c_funptr_1, c_funptr_2)
- type(__builtin_c_funptr), intent(in) :: c_funptr_1
- type(__builtin_c_funptr), intent(in), optional :: c_funptr_2
- if (c_funptr_1%__address == __builtin_c_null_ptr%__address) then
+ pure logical function c_associated_c_funptr(c_ptr_1, c_ptr_2)
+ type(__builtin_c_funptr), intent(in) :: c_ptr_1
+ type(__builtin_c_funptr), intent(in), optional :: c_ptr_2
+ if (c_ptr_1%__address == __builtin_c_null_ptr%__address) then
c_associated_c_funptr = .false.
- else if (present(c_funptr_2)) then
- c_associated_c_funptr = c_funptr_1%__address == c_funptr_2%__address
+ else if (present(c_ptr_2)) then
+ c_associated_c_funptr = c_ptr_1%__address == c_ptr_2%__address
else
c_associated_c_funptr = .true.
end if
More information about the flang-commits
mailing list