1! Program to test WHERE on unknown size arrays
2program where_3
3   integer A(10, 2)
4
5   A = 0
6   call sub(A)
7
8contains
9
10subroutine 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
20end subroutine
21end program
22