2 ! { dg-require-effective-target fortran_large_real }
5 integer,parameter :: k
= selected_real_kind (precision (0.0_8
) + 1)
7 real(kind
=k
), dimension(10) :: r_k
8 real(kind
=k
), dimension (2, 3) :: ar_k
9 real(kind
=k
), dimension (2, 2, 3) :: br_k
10 complex(kind
=k
), dimension(10) :: c_k
11 complex(kind
=k
), dimension (2, 3) :: ac_k
12 complex(kind
=k
), dimension (2, 2, 3) :: bc_k
13 character (len
=200) line1
, line2
, line3
15 ar_k
= reshape ((/1._k
, 2._k
, 3._k
, 4._k
, 5._k
, 6._k
/), (/2, 3/))
16 br_k
= spread (ar_k
, 1, 2)
17 if (any (br_k
.ne
. reshape ((/1._k
, 1._k
, 2._k
, 2._k
, 3._k
, 3._k
, &
18 & 4._k
, 4._k
, 5._k
, 5._k
, 6._k
, 6._k
/), (/2, 2, 3/)))) STOP 1
20 write(line1
, 9010) br_k
22 write(line2
, 9010) spread (ar_k
, 1, 2)
23 if (line1
/= line2
) STOP 2
25 write(line3
, 9010) spread (ar_k
, 1, 2) + 0._k
26 if (line1
/= line3
) STOP 3
27 r_k
= spread(1._k
,1,10)
28 if (any(r_k
/= 1._k
)) STOP 4
30 ac_k
= reshape ((/(1._k
,-1._k
), (2._k
,-2._k
), (3._k
, -3._k
), (4._k
, -4._k
), &
31 & (5._k
,-5._k
), (6._k
,-6._k
)/), (/2, 3/))
32 bc_k
= spread (ac_k
, 1, 2)
33 if (any (real(bc_k
) .ne
. reshape ((/1._k
, 1._k
, 2._k
, 2._k
, 3._k
, 3._k
, &
34 & 4._k
, 4._k
, 5._k
, 5._k
, 6._k
, 6._k
/), (/2, 2, 3/)))) STOP 5
35 if (any (-aimag(bc_k
) .ne
. reshape ((/1._k
, 1._k
, 2._k
, 2._k
, 3._k
, 3._k
, &
36 & 4._k
, 4._k
, 5._k
, 5._k
, 6._k
, 6._k
/), (/2, 2, 3/)))) STOP 6
38 write(line1
, 9020) bc_k
40 write(line2
, 9020) spread (ac_k
, 1, 2)
41 if (line1
/= line2
) STOP 7
43 write(line3
, 9020) spread (ac_k
, 1, 2) + 0._k
44 if (line1
/= line3
) STOP 8
45 c_k
= spread((1._k
,-1._k
),1,10)
46 if (any(c_k
/= (1._k
,-1._k
))) STOP 9