Debian Codegraph @

gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_spread.f90

raw
1 program foo
2 integer, dimension (2, 3) :: a
3 integer, dimension (2, 2, 3) :: b
4 character (len=80) line1, line2, line3
5
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 STOP 1
11 write(line1, 9000) b
12 write(line2, 9000) spread (a, 1, 2)
13 if (line1 /= line2) STOP 2
14 write(line3, 9000) spread (a, 1, 2) + 0
15 if (line1 /= line3) STOP 3
16 9000 format(12I3)
17 end program