summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2024-02-23 13:57:30 (GMT)
committerGitHub <noreply@github.com>2024-02-23 13:57:30 (GMT)
commite7f41a2fbf9cc123b14edbb73501c19976c514c4 (patch)
tree95e286eb43a0936cb8688b502987b9f46fcabd9e /m4
parentf02ecb21dd96a2445d988e8684a015fac9c30afd (diff)
downloadhdf5-e7f41a2fbf9cc123b14edbb73501c19976c514c4.zip
hdf5-e7f41a2fbf9cc123b14edbb73501c19976c514c4.tar.gz
hdf5-e7f41a2fbf9cc123b14edbb73501c19976c514c4.tar.bz2
Fix the datatype passed to H5*exists_async APIs in tests. (#4033)
Add a new testing function to verify C_BOOL values.
Diffstat (limited to 'm4')
-rw-r--r--m4/aclocal_fc.f9025
-rw-r--r--m4/aclocal_fc.m411
2 files changed, 36 insertions, 0 deletions
diff --git a/m4/aclocal_fc.f90 b/m4/aclocal_fc.f90
index 245da9b..d485f77 100644
--- a/m4/aclocal_fc.f90
+++ b/m4/aclocal_fc.f90
@@ -55,6 +55,31 @@ PROGRAM PROG_FC_HAVE_F2003_REQUIREMENTS
ptr = C_LOC(ichr(1:1))
END PROGRAM PROG_FC_HAVE_F2003_REQUIREMENTS
+!---- START ----- Check to see C_BOOL is different from LOGICAL
+MODULE l_type_mod
+ USE ISO_C_BINDING
+ INTERFACE h5t
+ MODULE PROCEDURE h5t_c_bool
+ MODULE PROCEDURE h5t_logical
+ END INTERFACE
+CONTAINS
+ SUBROUTINE h5t_c_bool(lcb)
+ LOGICAL(KIND=C_BOOL) :: lcb
+ END SUBROUTINE h5t_c_bool
+ SUBROUTINE h5t_logical(l)
+ LOGICAL :: l
+ END SUBROUTINE h5t_logical
+END MODULE l_type_mod
+PROGRAM PROG_FC_C_BOOL_EQ_LOGICAL
+ USE ISO_C_BINDING
+ USE l_type_mod
+ LOGICAL(KIND=C_BOOL) :: lcb
+ LOGICAL :: l
+ CALL h5t(lcb)
+ CALL h5t(l)
+END PROGRAM PROG_FC_C_BOOL_EQ_LOGICAL
+!---- END ------- Check to see C_BOOL is different from LOGICAL
+
!---- START ----- Check to see C_LONG_DOUBLE is different from C_DOUBLE
MODULE type_mod
USE ISO_C_BINDING
diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4
index 5d7bca9..5e47626 100644
--- a/m4/aclocal_fc.m4
+++ b/m4/aclocal_fc.m4
@@ -131,6 +131,17 @@ AC_DEFUN([PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE],[
])
fi
+dnl Check if C_BOOL is different from default LOGICAL
+
+AC_DEFUN([PAC_PROG_FC_C_BOOL_EQ_LOGICAL],[
+ C_BOOL_IS_UNIQUE_FORTRAN="no"
+ AC_MSG_CHECKING([if Fortran C_BOOL is different from default LOGICAL])
+ TEST_SRC="`sed -n '/MODULE l_type_mod/,/END PROGRAM PROG_FC_C_BOOL_EQ_LOGICAL/p' $srcdir/m4/aclocal_fc.f90`"
+ AC_COMPILE_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes])
+ C_BOOL_IS_UNIQUE_FORTRAN="yes"],
+ [AC_MSG_RESULT([no])])
+])
+
dnl Checking if the compiler supports the required Fortran 2003 features and
dnl disable Fortran 2003 if it does not.