Skip to content

Commit 99e4441

Browse files
authored
Merge pull request #13265 from ggouaillardet/topic/v5.0.x/complex_real16
configury: test Fortran complex(real16)
2 parents 7832107 + dd2712b commit 99e4441

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

config/ompi_fortran_check_iso_fortran_env_real16.m4

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,22 @@ end program]])],
2828
[AS_VAR_SET(iso_fortran_env_var_real16, no)])
2929
AC_LANG_POP([Fortran])
3030
])
31+
AS_VAR_IF(iso_fortran_env_var_real16, [yes],
32+
[AC_MSG_CHECKING([if Fortran compiler supports complex(ISO_FORTRAN_ENV:REAL16)])
33+
AC_LANG_PUSH([Fortran])
34+
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[program check_for_iso_fortran_env_real16
35+
use, intrinsic :: iso_fortran_env
36+
complex(REAL16) :: var
37+
var = 12.34
38+
end program]])],
39+
[AC_MSG_RESULT([yes])],
40+
[AC_MSG_RESULT([no])
41+
AC_MSG_WARN([*** Fortran compiler supports real(REAL16) but])
42+
AC_MSG_WARN([*** does *not* support complex(REAL16)])
43+
AC_MSG_WARN([*** Disabling support for ISO_FORTRAN_ENV:REAL16])
44+
AS_VAR_SET(iso_fortran_env_var_real16, no)])
45+
AC_LANG_POP([Fortran])],
46+
[])
3147

3248
AS_VAR_IF(iso_fortran_env_var_real16, [yes], [$1], [$2])
3349
AS_VAR_POPDEF([iso_fortran_env_var_real16])

0 commit comments

Comments
 (0)