1! PR tree-optimization/89027
2! { dg-do compile }
3! { dg-additional-options "-O2 -fexceptions -fno-tree-dce" }
4
5subroutine bar
6  integer :: a, b
7  a = 1
8  b = 2
9  call foo
10contains
11  subroutine foo
12!$omp simd linear(a:2) linear(b:1)
13    do a = 1, 20, 2
14      b = b + 1
15    end do
16!$omp end simd
17    if (a /= 21 .or. b /= 12) STOP 1
18!$omp task depend(out : a)
19    a = a + 1
20!$omp end task
21  end subroutine foo
22end subroutine bar
23