@@ -14,6 +14,8 @@ dnl Copyright (c) 2007 Los Alamos National Security, LLC. All rights
14
14
dnl reserved.
15
15
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
16
16
dnl Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
17
+ dnl Copyright (c) 2024 Research Organization for Information Science
18
+ dnl and Technology (RIST). All rights reserved.
17
19
dnl $COPYRIGHT $
18
20
dnl
19
21
dnl Additional copyrights may follow
@@ -82,6 +84,12 @@ AC_DEFUN([_OMPI_FORTRAN_CHECK_IGNORE_TKR], [
82
84
[! GCC\$ ATTRIBUTES NO_ARG_CHECK ::], [type(* ), dimension(* )],
83
85
[! GCC\$ ATTRIBUTES NO_ARG_CHECK],
84
86
[internal_ignore_tkr_happy= 1], [internal_ignore_tkr_happy= 0])])
87
+ # LLVM compilers
88
+ AS_IF([test $internal_ignore_tkr_happy -eq 0],
89
+ [OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB(
90
+ [! DIR\$ IGNORE_TKR], [type(* )],
91
+ [! DIR\$ IGNORE_TKR],
92
+ [internal_ignore_tkr_happy= 1], [internal_ignore_tkr_happy= 0])])
85
93
# Intel compilers
86
94
AS_IF([test $internal_ignore_tkr_happy -eq 0],
87
95
[OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB(
@@ -133,6 +141,7 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB], [
133
141
AC_MSG_CHECKING([for Fortran compiler support of $3 ])
134
142
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[[!
135
143
! Autoconf puts " program main" at the top
144
+ implicit none
136
145
137
146
interface
138
147
subroutine force_assumed_shape(a, count)
@@ -157,6 +166,7 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB], [
157
166
complex, pointer, dimension(:,:) :: ptr
158
167
target :: buffer3
159
168
integer :: buffer4
169
+ integer :: a
160
170
ptr => buffer3
161
171
162
172
! Set some known values (somewhat irrelevant for this test, but just be
@@ -189,8 +199,23 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB], [
189
199
call foo(a, count)
190
200
end subroutine force_assumed_shape
191
201
202
+ module check_ignore_tkr
203
+ interface
204
+ subroutine foobar(buffer, count)
205
+ $1 buffer
206
+ $2 , intent(in) :: buffer
207
+ integer, intent(in) :: count
208
+ end subroutine foobar
209
+ end interface
210
+ end module
211
+
212
+ subroutine bar(var)
213
+ use check_ignore_tkr
214
+ implicit none
215
+ real, intent(inout) :: var(:, :, :)
216
+
217
+ call foobar(var(1,1,1), 1)
192
218
! Autoconf puts " end" after the last line
193
- subroutine bogus
194
219
]]),
195
220
[msg= yes
196
221
ompi_fortran_ignore_tkr_predecl= " $1 "
0 commit comments