@@ -14,6 +14,8 @@ dnl Copyright (c) 2007 Los Alamos National Security, LLC. All rights
1414dnl reserved.
1515dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
1616dnl Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
17+ dnl Copyright (c) 2013 Research Organization for Information Science
18+ dnl and Technology (RIST). All rights reserved.
1719dnl $COPYRIGHT $
1820dnl
1921dnl Additional copyrights may follow
@@ -72,40 +74,40 @@ AC_DEFUN([_OMPI_FORTRAN_CHECK_IGNORE_TKR], [
7274
7375 # Vendor-neutral, TYPE(*) syntax
7476 OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB(
75- [! ], [type(* )],
76- [TYPE(* ), DIMENSION(* )],
77+ [! ], [type(* ), DIMENSION(..)],[, ASYNCHRONOUS ],
78+ [TYPE(* ), DIMENSION(.. )],
7779 [internal_ignore_tkr_happy= 1], [internal_ignore_tkr_happy= 0])
7880
7981 # GCC compilers
8082 AS_IF([test $internal_ignore_tkr_happy -eq 0],
8183 [OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB(
82- [! GCC\$ ATTRIBUTES NO_ARG_CHECK ::], [type(* ), dimension(* )],
84+ [! GCC\$ ATTRIBUTES NO_ARG_CHECK ::], [type(* ), dimension(* )],[],
8385 [! GCC\$ ATTRIBUTES NO_ARG_CHECK],
8486 [internal_ignore_tkr_happy= 1], [internal_ignore_tkr_happy= 0])])
8587 # Intel compilers
8688 AS_IF([test $internal_ignore_tkr_happy -eq 0],
8789 [OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB(
88- [! DEC\$ ATTRIBUTES NO_ARG_CHECK ::], [real, dimension(* )],
90+ [! DEC\$ ATTRIBUTES NO_ARG_CHECK ::], [real, dimension(* )],[],
8991 [! DEC\$ ATTRIBUTES NO_ARG_CHECK],
9092 [internal_ignore_tkr_happy= 1], [internal_ignore_tkr_happy= 0])])
9193 # Solaris Studio compilers
9294 # Note that due to a compiler bug, we have been advised by Oracle to
9395 # use the "character(*)" type
9496 AS_IF([test $internal_ignore_tkr_happy -eq 0],
9597 [OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB(
96- [! \$ PRAGMA IGNORE_TKR], [character(* )],
98+ [! \$ PRAGMA IGNORE_TKR], [character(* )],[],
9799 [! \$ PRAGMA IGNORE_TKR],
98100 [internal_ignore_tkr_happy= 1], [internal_ignore_tkr_happy= 0])])
99101 # Cray compilers
100102 AS_IF([test $internal_ignore_tkr_happy -eq 0],
101103 [OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB(
102- [! DIR\$ IGNORE_TKR], [real, dimension(* )],
104+ [! DIR\$ IGNORE_TKR], [real, dimension(* )],[],
103105 [! DIR\$ IGNORE_TKR],
104106 [internal_ignore_tkr_happy= 1], [internal_ignore_tkr_happy= 0])])
105107 # IBM compilers
106108 AS_IF([test $internal_ignore_tkr_happy -eq 0],
107109 [OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB(
108- [! IBM* IGNORE_TKR], [real, dimension(* )],
110+ [! IBM* IGNORE_TKR], [real, dimension(* )],[],
109111 [! IBM* IGNORE_TKR],
110112 [internal_ignore_tkr_happy= 1], [internal_ignore_tkr_happy= 0])])
111113
@@ -124,13 +126,14 @@ AC_DEFUN([_OMPI_FORTRAN_CHECK_IGNORE_TKR], [
124126# functionality
125127# $1: pre-decl qualifier line -- likely a compiler directive
126128# $2: parameter type
127- # $3: message for AC-MSG-CHECKING
128- # $4: action to take if the test passes
129- # $5: action to take if the test fails
129+ # $3: asynchronous keyword
130+ # $4: message for AC-MSG-CHECKING
131+ # $5: action to take if the test passes
132+ # $6: action to take if the test fails
130133AC_DEFUN([OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB], [
131134 OPAL_VAR_SCOPE_PUSH(msg)
132135 AC_LANG_PUSH([Fortran])
133- AC_MSG_CHECKING([for Fortran compiler support of $3 ])
136+ AC_MSG_CHECKING([for Fortran compiler support of $4 ])
134137 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[[!
135138! Autoconf puts " program main" at the top
136139
@@ -184,20 +187,35 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB], [
184187 end program
185188
186189 subroutine force_assumed_shape(a, count)
190+ implicit none
187191 integer :: count
188192 real, dimension(:,:) :: a
189193 call foo(a, count)
190194 end subroutine force_assumed_shape
191195
196+ module mod
197+ interface
198+ subroutine bar(buffer, count)
199+ $2 , intent(in)$3 :: buffer
200+ integer, intent(in) :: count
201+ end subroutine bar
202+ end interface
203+ end module
204+
205+ subroutine bogus(buffer, count)
206+ use mod, only : bar
207+ implicit none
208+ $2 , intent(in)$3 :: buffer
209+ integer, intent(in) :: count
210+ call bar(buffer, count)
192211! Autoconf puts " end" after the last line
193- subroutine bogus
194212]]),
195213 [msg= yes
196214 ompi_fortran_ignore_tkr_predecl= " $1 "
197215 ompi_fortran_ignore_tkr_type= " $2 "
198- $4 ],
216+ $5 ],
199217 [msg= no
200- $5 ])
218+ $6 ])
201219 AC_MSG_RESULT($msg )
202220 AC_LANG_POP([Fortran])
203221 OPAL_VAR_SCOPE_POP
0 commit comments