[flang-commits] [flang] e4589ea - [flang] Correct dummy argument names for C_ASSOCIATED() for C_FUNPTR (#70961)

via flang-commits flang-commits at lists.llvm.org
Mon Nov 13 13:53:49 PST 2023


Author: Peter Klausler
Date: 2023-11-13T13:53:46-08:00
New Revision: e4589ea2a5d7268a998811d1ca574523ee5e464f

URL: https://github.com/llvm/llvm-project/commit/e4589ea2a5d7268a998811d1ca574523ee5e464f
DIFF: https://github.com/llvm/llvm-project/commit/e4589ea2a5d7268a998811d1ca574523ee5e464f.diff

LOG: [flang] Correct dummy argument names for C_ASSOCIATED() for C_FUNPTR (#70961)

The dummy argument names used for the interface to C_ASSOCIATED() were
wrong.

Added: 
    

Modified: 
    flang/module/__fortran_builtins.f90

Removed: 
    


################################################################################
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