PR rtl-optimization/82913
[official-gcc.git] / gcc / testsuite / gfortran.fortran-torture / execute / intrinsic_spread.f90
blob8a89b2d731a67c127817a5b96faf4b79f04a9463
1 program foo
2 integer, dimension (2, 3) :: a
3 integer, dimension (2, 2, 3) :: b
4 character (len=80) line1, line2, line3
6 a = reshape ((/1, 2, 3, 4, 5, 6/), (/2, 3/))
7 b = spread (a, 1, 2)
8 if (any (b .ne. reshape ((/1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6/), &
9 (/2, 2, 3/)))) &
10 call abort
11 write(line1, 9000) b
12 write(line2, 9000) spread (a, 1, 2)
13 if (line1 /= line2) call abort
14 write(line3, 9000) spread (a, 1, 2) + 0
15 if (line1 /= line3) call abort
16 9000 format(12I3)
17 end program