Skip to content

Commit

Permalink
configury: harden IGNORE_TKR check
Browse files Browse the repository at this point in the history
NVIDIA HPC Compiler (e.g. nvfortran) incorrectly selected the GCC
style pragmas to support IGNORE_TKR. Harden the test by mimicking
exactly the mpi f08 bindings in order to fix that false positive.

Thanks Chris Parrot for the report.

Refs. #11582

Signed-off-by: Gilles Gouaillardet <[email protected]>
bot:notacherrypick
(back-ported from commit 600df6a)
  • Loading branch information
ggouaillardet committed Jul 25, 2024
1 parent 184c32a commit 903055c
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion config/ompi_fortran_check_ignore_tkr.m4
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,31 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB], [
call foo(a, count)
end subroutine force_assumed_shape

module check_ignore_tkr
interface foobar
subroutine foobar_x(buffer, count)
$1 buffer
$2, intent(in) :: buffer
integer, intent(in) :: count
end subroutine foobar_x
end interface
end module

subroutine bar(var)
use check_ignore_tkr
implicit none
real, intent(inout) :: var(:, :, :)

call foobar(var(1,1,1), 1)
! Autoconf puts "end" after the last line
subroutine bogus
]]),
[msg=yes
ompi_fortran_ignore_tkr_predecl="$1"
ompi_fortran_ignore_tkr_type="$2"
$4],
[msg=no
$5])
rm -f *.mod
AC_MSG_RESULT($msg)
AC_LANG_POP([Fortran])
OPAL_VAR_SCOPE_POP
Expand Down

0 comments on commit 903055c

Please sign in to comment.