@@ -11,7 +11,7 @@ dnl University of Stuttgart. All rights reserved.
11
11
dnl Copyright (c) 2004-2005 The Regents of the University of California.
12
12
dnl All rights reserved.
13
13
dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
14
- dnl Copyright (c) 2017 IBM Corporation. All rights reserved.
14
+ dnl Copyright (c) 2017 IBM Corporation. All rights reserved.
15
15
dnl $COPYRIGHT $
16
16
dnl
17
17
dnl Additional copyrights may follow
28
28
AC_DEFUN([OMPI_FORTRAN_CHECK_STORAGE_SIZE],[
29
29
AS_VAR_PUSHDEF([fortran_storage_size_var], [ompi_cv_fortran_have_storage_size])
30
30
31
+ # Re PR: https://github.com/open-mpi/ompi/pull/3822
32
+ # We explored correcting the following syntax to compile with gfortran 4.8
33
+ # - size = storage_size(x) / 8
34
+ # + size = storage_size(x(1)) / 8
35
+ # That allowed gfortran 4.8 to pass this configure test, but fail to
36
+ # correctly handle mpi_sizeof due to the weak test for INTERFACE in
37
+ # ompi_fortran_check_interface.m4. Until we can strengthen that configure
38
+ # check we reverted the commit from PR #3822 to keep the old logic here
39
+ # so that gfortran 4.8 will disqualify itself correctly for mpi_sizeof()
40
+ # support.
41
+ #
31
42
AC_CACHE_CHECK([if Fortran compiler supports STORAGE_SIZE for relevant types],
32
43
fortran_storage_size_var,
33
44
[AC_LANG_PUSH([Fortran])
@@ -62,7 +73,7 @@ SUBROUTINE storage_size_complex32_r1(x, size)
62
73
COMPLEX(REAL32), DIMENSION(* )::x
63
74
INTEGER, INTENT(OUT) :: size
64
75
65
- size = storage_size(x(1) ) / 8
76
+ size = storage_size(x) / 8
66
77
END SUBROUTINE storage_size_complex32_r1
67
78
68
79
SUBROUTINE storage_size_int32_scalar(x, size)
@@ -78,7 +89,7 @@ SUBROUTINE storage_size_int32_r1(x, size)
78
89
INTEGER(INT32), DIMENSION(* )::x
79
90
INTEGER, INTENT(OUT) :: size
80
91
81
- size = storage_size(x(1) ) / 8
92
+ size = storage_size(x) / 8
82
93
END SUBROUTINE storage_size_int32_r1
83
94
84
95
SUBROUTINE storage_size_real32_scalar(x, size)
@@ -94,7 +105,7 @@ SUBROUTINE storage_size_real32_r1(x, size)
94
105
REAL(REAL32), DIMENSION(* )::x
95
106
INTEGER, INTENT(OUT) :: size
96
107
97
- size = storage_size(x(1) ) / 8
108
+ size = storage_size(x) / 8
98
109
END SUBROUTINE storage_size_real32_r1
99
110
]])],
100
111
[AS_VAR_SET(fortran_storage_size_var, yes)],
0 commit comments