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