From fa286020920c03e15c5201e801e38f4a7c178ddb Mon Sep 17 00:00:00 2001 From: h-murai Date: Tue, 18 Feb 2020 23:08:37 +0900 Subject: an argument 'buf_size' of 'h5fget_file_image_c' should be intent(out). (#15011) * an argument 'buf_size' of 'h5fget_file_image_c' should be intent(out). * correct format errors * some modifications based on the comments from the reviewer --- var/spack/repos/builtin/packages/hdf5/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index cbc445edf0..3c62d46f0d 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -117,6 +117,22 @@ class Hdf5(AutotoolsPackage): patch('h5public-skip-mpicxx.patch', when='@:1.8.21,1.10.0:1.10.5+mpi~cxx', sha256='b61e2f058964ad85be6ee5ecea10080bf79e73f83ff88d1fa4b602d00209da9c') + # The argument 'buf_size' of the C function 'h5fget_file_image_c' is + # declared as intent(in) though it is modified by the invocation. As a + # result, aggressive compilers such as Fujitsu's may do a wrong + # optimization to cause an error. + def patch(self): + filter_file( + 'INTEGER(SIZE_T), INTENT(IN) :: buf_size', + 'INTEGER(SIZE_T), INTENT(OUT) :: buf_size', + 'fortran/src/H5Fff.F90', + string=True, ignore_absent=True) + filter_file( + 'INTEGER(SIZE_T), INTENT(IN) :: buf_size', + 'INTEGER(SIZE_T), INTENT(OUT) :: buf_size', + 'fortran/src/H5Fff_F03.f90', + string=True, ignore_absent=True) + filter_compiler_wrappers('h5cc', 'h5c++', 'h5fc', relative_root='bin') def url_for_version(self, version): -- cgit v1.2.3-70-g09d2