diff options
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/src/H5test_kind.f90 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fortran/src/H5test_kind.f90 b/fortran/src/H5test_kind.f90 index 5849701..e357fea 100644 --- a/fortran/src/H5test_kind.f90 +++ b/fortran/src/H5test_kind.f90 @@ -94,16 +94,16 @@ PROGRAM test_kind jd = 0 WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL :: b(32)" - WRITE(*,*)" INTEGER :: a(1)" + WRITE(*,*)" DOUBLE PRECISION :: b=0" + WRITE(*,*)" INTEGER :: a(8)=0" WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" INTEGER :: double_size" - WRITE(*,*)" a_size = BIT_SIZE(a(1)) ! Size in bits for integer" - WRITE(*,*)" double_size = (SIZE(TRANSFER(b,a))*a_size)/SIZE(b)" - WRITE(*,*)" IF (double_size .EQ. 64) THEN" + WRITE(*,*)" INTEGER :: b_size" + WRITE(*,*)" a_size = BIT_SIZE(a(1))" + WRITE(*,*)" b_size = SIZE(transfer(b,a))*a_size" + WRITE(*,*)" IF (b_size .EQ. 64) THEN" WRITE(*,*)" WRITE(*,*) ""#define H5_FORTRAN_HAS_DOUBLE_NATIVE_8"" " WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (double_size .EQ. 128) THEN" + WRITE(*,*)" IF (b_size .EQ. 128) THEN" WRITE(*,*)" WRITE(*,*) ""#define H5_FORTRAN_HAS_DOUBLE_NATIVE_16"" " WRITE(*,*)" ENDIF" WRITE(*,*)" RETURN" |