aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/gomp/unroll-simd-3.f90
blob: 1c73c149fc88708417f0bf9ff59df1f390d3b429 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
! { dg-options "-fno-openmp -fopenmp-simd" }

subroutine test1
  implicit none
  integer :: i

  !$omp simd
  !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
  do i = 1,100
    call dummy(i)
  end do
end subroutine test1

subroutine test2
  implicit none
  integer :: i

  !$omp simd
  !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
  do i = 1,100
    call dummy(i)
  end do
  !$omp end unroll
end subroutine test2

subroutine test3
  implicit none
  integer :: i

  !$omp simd
  !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
  do i = 1,100
    call dummy(i)
  end do
  !$omp end do
end subroutine test3

subroutine test4
  implicit none
  integer :: i

  !$omp simd
  !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
  do i = 1,100
    call dummy(i)
  end do
  !$omp end unroll
  !$omp end do
end subroutine test4

subroutine test5
  implicit none
  integer :: i

  !$omp unroll
  !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
  do i = 1,100
    call dummy(i)
  end do
end subroutine test5

subroutine test6
  implicit none
  integer :: i

  !$omp unroll
  !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
  do i = 1,100
    call dummy(i)
  end do
  !$omp end unroll
end subroutine test6

subroutine test7
  implicit none
  integer :: i

  !$omp unroll
  !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
  do i = 1,100
    call dummy(i)
  end do
  !$omp end unroll
  !$omp end unroll
end subroutine test7

subroutine test8
  implicit none
  integer :: i

  !$omp simd
  !$omp unroll full ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
  do i = 1,100
    call dummy(i)
  end do
end subroutine test8

subroutine test9
  implicit none
  integer :: i

  !$omp unroll full
  !$omp unroll full ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
  do i = 1,100
    call dummy(i)
  end do
end subroutine test9

subroutine test10
  implicit none
  integer :: i,j

  !$omp simd
  !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
  do i = 1,100
    call dummy(i)
    do j = 1,100
      call dummy2(i,j)
    end do
  end do
end subroutine test10

subroutine test11
  implicit none
  integer :: i,j

  !$omp simd
  !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
  do i = 1,100
    !$omp unroll
    !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
    call dummy(i) ! { dg-error "Unexpected CALL statement at \\\(1\\\)" }
    !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
    do j = 1,100
      call dummy2(i,j)
    end do
  end do
end subroutine test11

subroutine test12
  implicit none
  integer :: i,j

  !$omp simd
  !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
  do i = 1,100
    !$omp unroll
    !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
    !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
    do j = 1,100
      call dummy2(i,j)
    end do
    call dummy(i)
  end do
end subroutine test12

subroutine test13
  implicit none
  integer :: i

  !$omp unroll
  !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
  do i = 1,100
    call dummy(i)
  end do
  !$omp end unroll
  !$omp end unroll
  !$omp end unroll ! { dg-error "Unexpected !\\\$OMP END UNROLL statement at \\\(1\\\)" }
end subroutine test13

subroutine test14
  implicit none
  integer :: i

  !$omp simd
  !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
  !$omp unroll ! { dg-error "Generated loop of UNROLL construct at \\\(1\\\) without PARTIAL clause does not have canonical form" }
  do i = 1,100
    call dummy(i)
  end do
  !$omp end unroll
  !$omp end unroll
  !$omp end unroll ! { dg-error "Unexpected !\\\$OMP END UNROLL statement at \\\(1\\\)" }
end subroutine test14

subroutine test17
  implicit none
  integer :: i

  !$omp simd
  !$omp unroll partial(0) ! { dg-error "PARTIAL clause argument not constant positive integer at \\\(1\\\)" }
  do i = 1,100
    call dummy(i)
  end do
  !$omp end unroll
end subroutine test17

subroutine test18
  implicit none
  integer :: i

  !$omp simd
  !$omp unroll partial(-10) ! { dg-error "PARTIAL clause argument not constant positive integer at \\\(1\\\)" }
  do i = 1,100
    call dummy(i)
  end do
  !$omp end unroll
end subroutine test18