Debian Codegraph @

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

raw
1 ! Program to test WHERE on unknown size arrays
2 program where_3
3 integer A(10, 2)
4
5 A = 0
6 call sub(A)
7
8 contains
9
10 subroutine sub(B)
11 integer, dimension(:, :) :: B
12
13 B(1:5, 1) = 0
14 B(6:10, 1) = 5
15 where (B(:,1)>0)
16 B(:,1) = B(:,1) + 10
17 endwhere
18 if (any (B .ne. reshape ((/0, 0, 0, 0, 0, 15, 15, 15, 15, 15, &
19 0, 0, 0, 0, 0, 0, 0, 0, 0, 0/), (/10, 2/)))) STOP 1
20 end subroutine
21 end program