Skip to content

Commit

Permalink
configury: check for modern type(*), dimension(..) syntax
Browse files Browse the repository at this point in the history
First try if "type(*), dimension(..) :: foo" works as-is
(e.g. without any pragma/directive).

Thanks Chris Parrott for bringing this to our attention

Refs. open-mpi#11582

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
  • Loading branch information
ggouaillardet committed Apr 17, 2023
1 parent ca8da54 commit f1efc2b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions config/ompi_fortran_check_ignore_tkr.m4
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ dnl Copyright (c) 2007 Los Alamos National Security, LLC. All rights
dnl reserved.
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
dnl Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2013 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
Expand Down Expand Up @@ -72,8 +74,8 @@ AC_DEFUN([_OMPI_FORTRAN_CHECK_IGNORE_TKR], [

# Vendor-neutral, TYPE(*) syntax
OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB(
[!], [type(*)],
[TYPE(*), DIMENSION(*)],
[!], [type(*), DIMENSION(..)],
[TYPE(*), DIMENSION(..)],
[internal_ignore_tkr_happy=1], [internal_ignore_tkr_happy=0])

# GCC compilers
Expand Down Expand Up @@ -190,7 +192,11 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB], [
end subroutine force_assumed_shape

! Autoconf puts "end" after the last line
subroutine bogus
subroutine bogus(buffer, count)
$1 buffer
$2, intent(in) :: buffer
integer, intent(in) :: count
call foo(buffer, count)
]]),
[msg=yes
ompi_fortran_ignore_tkr_predecl="$1"
Expand Down

0 comments on commit f1efc2b

Please sign in to comment.