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