hdf5: patch for BOZ literal constant error when compiled with GCC 10. (#22509)

This commit is contained in:
Robert Mijakovic 2021-04-06 09:13:11 +02:00 committed by GitHub
parent 26c7f02873
commit fc5a50aa83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,12 @@
diff -Naur hdf5.orig/fortran/test/tH5T_F03.f90 hdf5/fortran/test/tH5T_F03.f90
--- hdf5.orig/fortran/test/tH5T_F03.f90 2021-01-19 13:23:11.298000000 +0100
+++ hdf5/fortran/test/tH5T_F03.f90 2021-01-19 13:19:17.637000000 +0100
@@ -1541,7 +1541,7 @@
INTEGER :: A, B, C, D
INTEGER :: Aw, Bw, Cw, Dw
INTEGER :: i, j
- INTEGER, PARAMETER :: hex = Z'00000003'
+ INTEGER, PARAMETER :: hex = INT(Z'00000003')
TYPE(C_PTR) :: f_ptr
INTEGER :: error ! Error flag
!

View file

@ -139,6 +139,11 @@ class Hdf5(AutotoolsPackage):
patch('h5public-skip-mpicxx.patch', when='@:1.8.21,1.10.0:1.10.5+mpi~cxx',
sha256='b61e2f058964ad85be6ee5ecea10080bf79e73f83ff88d1fa4b602d00209da9c')
# Fixes BOZ literal constant error when compiled with GCC 10.
# The issue is described here: https://github.com/spack/spack/issues/18625
patch('hdf5_1.8_gcc10.patch', when='@:1.8.21',
sha256='0e20187cda3980a4fdff410da92358b63de7ebef2df1d7a425371af78e50f666')
# 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