12 call dim1([1, 2, 3], 4*3)
15 call dimd([1, 2, 3], 4*3)
16 call dimd(reshape([1, 4, 2, 3],[2, 2]), 4*4)
18 call tdim1([1, 2, 3], 4*3)
19 call tdim1([1_8, 2_8, 3_8], 8*3)
22 call tdimd([1, 2, 3], 4*3)
23 call tdimd(reshape([1, 4, 2, 3], [2, 2]), 4*4)
25 call tdimd([1_8, 2_8, 3_8], 8*3)
26 call tdimd(reshape([1_8, 4_8, 2_8, 3_8],[2,2]), 8*4)
30 call cdim1([1, 2, 3], 4*3)
33 call cdimd([1, 2, 3], 4*3)
34 call cdimd(reshape([1,4,2,3],[2,2]), 4*4)
36 call cdimd([1_8, 2_8, 3_8], 8*3)
37 call cdimd(reshape([1_8, 4_8, 2_8, 3_8], [2, 2]), 8*4)
41 subroutine dim0(x
, expected_size
)
43 integer, value
:: expected_size
44 if (sizeof(x
) /= expected_size
) STOP 1
45 if (storage_size(x
)/8 /= expected_size
) STOP 2
48 subroutine dim1(x
, expected_size
)
49 integer, dimension(:) :: x
50 integer, value
:: expected_size
51 if (sizeof(x
) /= expected_size
) STOP 3
52 if (storage_size(x
)/8*size(x
) /= expected_size
) STOP 4
55 subroutine dimd(x
, expected_size
)
56 integer, dimension(..) :: x
57 integer, value
:: expected_size
58 if (sizeof(x
) /= expected_size
) STOP 5
59 if (storage_size(x
)/8*size(x
) /= expected_size
) STOP 6
62 subroutine cdim0(x
, expected_size
)
64 integer, value
:: expected_size
65 if (sizeof(x
) /= expected_size
) STOP 7
66 if (storage_size(x
)/8 /= expected_size
) STOP 8
69 subroutine cdim1(x
, expected_size
)
70 class(*), dimension(:) :: x
71 integer, value
:: expected_size
72 if (sizeof(x
) /= expected_size
) STOP 9
73 if (storage_size(x
)/8*size(x
) /= expected_size
) STOP 10
76 subroutine cdimd(x
, expected_size
)
77 class(*), dimension(..) :: x
78 integer, value
:: expected_size
79 if (sizeof(x
) /= expected_size
) STOP 11
80 if (storage_size(x
)/8*size(x
) /= expected_size
) STOP 12
83 subroutine tdim1(x
, expected_size
)
84 type(*), dimension(:) :: x
85 integer, value
:: expected_size
86 if (sizeof(x
) /= expected_size
) STOP 13
89 subroutine tdimd(x
, expected_size
)
90 type(*), dimension(..) :: x
91 integer, value
:: expected_size
92 if (sizeof(x
) /= expected_size
) STOP 14