1subroutine foo (x, y)
2  integer :: i, x, y
3  common /i/ i
4  interface
5    function bar (x, y)
6      integer :: x, y, bar
7      !$omp declare simd (bar) linear (ref (x) : 1) linear (uval (y))
8    end function bar
9  end interface
10  !$omp simd linear (x : y + 1)
11  do i = 1, 10
12    x = x + y + 1
13  end do
14  !$omp simd linear (val (x) : y + 1)	! { dg-error "LINEAR clause modifier used on DO or SIMD construct" }
15  do i = 1, 10
16    x = x + y + 1
17  end do
18  !$omp simd linear (ref (x) : y + 1)	! { dg-error "LINEAR clause modifier used on DO or SIMD construct" }
19  do i = 1, 10
20    x = x + y + 1
21  end do
22  !$omp simd linear (uval (x) : y + 1)	! { dg-error "LINEAR clause modifier used on DO or SIMD construct" }
23  do i = 1, 10
24    x = x + y + 1
25  end do
26  !$omp do linear (x : y + 1)
27  do i = 1, 10
28    x = x + y + 1
29  end do
30  !$omp do linear (val (x) : y + 1)	! { dg-error "LINEAR clause modifier used on DO or SIMD construct" }
31  do i = 1, 10
32    x = x + y + 1
33  end do
34  !$omp do linear (ref (x) : y + 1)	! { dg-error "LINEAR clause modifier used on DO or SIMD construct" }
35  do i = 1, 10
36    x = x + y + 1
37  end do
38  !$omp do linear (uval (x) : y + 1)	! { dg-error "LINEAR clause modifier used on DO or SIMD construct" }
39  do i = 1, 10
40    x = x + y + 1
41  end do
42  !$omp do simd linear (x : y + 1)
43  do i = 1, 10
44    x = x + y + 1
45  end do
46  !$omp do simd linear (val (x) : y + 1) ! { dg-error "LINEAR clause modifier used on DO or SIMD construct" }
47  do i = 1, 10
48    x = x + y + 1
49  end do
50  !$omp do simd linear (ref (x) : y + 1) ! { dg-error "LINEAR clause modifier used on DO or SIMD construct" }
51  do i = 1, 10
52    x = x + y + 1
53  end do
54  !$omp do simd linear (uval (x) : y + 1) ! { dg-error "LINEAR clause modifier used on DO or SIMD construct" }
55  do i = 1, 10
56    x = x + y + 1
57  end do
58end
59