1! { dg-additional-options "-O2" }
2! { dg-require-effective-target pthread }
3! { dg-additional-options "-ftree-parallelize-loops=2" }
4! { dg-additional-options "-fdump-tree-parloops2-details" }
5
6! Variable bound, vector addition.
7
8subroutine foo (nr)
9  integer, intent(in) :: nr
10  integer, parameter :: n = 1000
11  integer, dimension (0:n-1) :: a, b, c
12  common a, b, c
13  integer :: ii
14
15  do ii = 0, nr - 1
16     c(ii) = a(ii) + b(ii) + 25
17  end do
18end subroutine foo
19
20! { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 1 "parloops2" } }
21
22