| 1 |
! Taken from execute/where_2.f90, but with special flags. |
| 2 |
! { dg-additional-options "-fno-tree-loop-vectorize" } |
| 3 |
|
| 4 |
! Program to test the WHERE constructs |
| 5 |
program where_2 |
| 6 |
integer temp(10), reduce(10) |
| 7 |
|
| 8 |
temp = 10 |
| 9 |
reduce(1:3) = -1 |
| 10 |
reduce(4:6) = 0 |
| 11 |
reduce(7:8) = 5 |
| 12 |
reduce(9:10) = 10 |
| 13 |
|
| 14 |
WHERE (reduce < 0) |
| 15 |
temp = 100 |
| 16 |
ELSE WHERE (reduce .EQ. 0) |
| 17 |
temp = 200 + temp |
| 18 |
ELSE WHERE |
| 19 |
WHERE (reduce > 6) temp = temp + sum(reduce) |
| 20 |
temp = 300 + temp |
| 21 |
END WHERE |
| 22 |
|
| 23 |
if (any (temp .ne. (/100, 100, 100, 210, 210, 210, 310, 310, 337, 337/))) & |
| 24 |
STOP 1 |
| 25 |
end program |