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
|
! Verify column location information.
! See also 'c-c++-common/goacc/pr92793-1.c'.
! { dg-additional-options "-fdump-tree-original-lineno" }
! { dg-additional-options "-fdump-tree-gimple-lineno" }
! No tabs. Funny indentation/spacing for a reason.
subroutine check ()
implicit none (type, external)
integer :: i, j, sum, diff
!$acc parallel &
!$acc & & ! Fortran location information points to the last line, and last character of the directive.
!$acc && ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:18:123\\\] #pragma acc parallel" 1 "original" } }
!$acc & ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:18:123\\\] #pragma omp target oacc_parallel" 1 "gimple" } }
!$acc loop &
!$acc & & ! Fortran location information points to the last line, and last character of the directive.
!$acc & & ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:26:22\\\] #pragma acc loop" 1 "original" } }
!$acc & & ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:26:22\\\] #pragma acc loop" 1 "gimple" } }
!$acc& reduction ( + : sum ) & ! { dg-line sum1 }
!$acc && ! Fortran location information points to the ':' in 'reduction(+:sum)'.
!$acc & & ! { dg-message "36: location of the previous reduction for 'sum'" "" { target *-*-* } sum1 }
!$acc& independent
do i = 1, 10
!$acc loop &
!$acc & & ! Fortran location information points to the last line, and last character of the directive.
!$acc & & ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:36:34\\\] #pragma acc loop" 1 "original" } }
!$acc & & ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:36:34\\\] #pragma acc loop" 1 "gimple" } }
!$acc & reduction(-: diff ) &
!$acc&reduction(- : sum) & ! { dg-line sum2 }
!$acc & & ! Fortran location information points to the ':' in 'reduction(-:sum)'.
!$acc& & ! { dg-warning "32: conflicting reduction operations for 'sum'" "" { target *-*-* } sum2 }
!$acc &independent
do j = 1, 10
sum &
& = &
& 1
! Fortran location information points to the last line, and last character of the statement.
! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:40:9\\\] sum = 1" 1 "original" } }
! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:40:9\\\] sum = 1" 1 "gimple" } }
end do
end do
!$acc end parallel
end subroutine check
subroutine gwv_sl_1 ()
implicit none (type, external)
integer :: i
!$acc serial loop &
!$acc & gang(num:5) & ! { dg-error "25: argument not permitted on 'gang' clause" }
!$acc & worker(num:5) & ! { dg-error "24: argument not permitted on 'worker' clause" }
!$acc & vector(length:5) ! { dg-error "28: argument not permitted on 'vector' clause" }
! { dg-message "93: enclosing parent compute construct" "" { target *-*-* } .-1 }
do i = 0, 10
end do
!$acc end serial loop
end subroutine gwv_sl_1
subroutine gwv_sl_2 ()
implicit none (type, external)
integer :: i, j, k
!$acc serial loop ! { dg-message "77: enclosing parent compute construct" }
do i = 0, 10
!$acc loop ! { dg-bogus "enclosing parent compute construct" }
do j = 0, 10
!$acc loop &
!$acc & gang(num:5) & ! { dg-error "35: argument not permitted on 'gang' clause" }
!$acc & worker(num:5) & ! { dg-error "32: argument not permitted on 'worker' clause" }
!$acc & vector(length:5) ! { dg-error "33: argument not permitted on 'vector' clause" }
do k = 0, 10
end do
end do
end do
!$acc end serial loop
end subroutine gwv_sl_2
subroutine gwv_s_l ()
implicit none (type, external)
integer :: i, j, k
!$acc serial ! { dg-message "72: enclosing parent compute construct" }
!$acc loop &
!$acc & gang(num:5) & ! { dg-error "27: argument not permitted on 'gang' clause" }
!$acc & worker(num:5) & ! { dg-error "23: argument not permitted on 'worker' clause" }
!$acc & vector(length:5) ! { dg-error "29: argument not permitted on 'vector' clause" }
do i = 0, 10
end do
!$acc loop
do i = 0, 10
!$acc loop ! { dg-bogus "enclosing parent compute construct" }
do j = 0, 10
!$acc loop &
!$acc & gang(num:5) & ! { dg-error "35: argument not permitted on 'gang' clause" }
!$acc & worker(num:5) & ! { dg-error "32: argument not permitted on 'worker' clause" }
!$acc & vector(length:5) ! { dg-error "37: argument not permitted on 'vector' clause" }
do k = 0, 10
end do
end do
end do
!$acc end serial
end subroutine gwv_s_l
subroutine gwv_r () ! { dg-message "16: enclosing routine" }
implicit none (type, external)
integer :: i, j, k
!$acc routine(gwv_r)
!$acc loop &
!$acc & gang(num:5) & ! { dg-error "23: argument not permitted on 'gang' clause" }
!$acc & worker(num:5) & ! { dg-error "26: argument not permitted on 'worker' clause" }
!$acc & vector(length:5) ! { dg-error "27: argument not permitted on 'vector' clause" }
do i = 0, 10
end do
!$acc loop
do i = 0, 10
!$acc loop
do j = 0, 10
!$acc loop &
!$acc & gang(num:5) & ! { dg-error "31: argument not permitted on 'gang' clause" }
!$acc & worker(num:5) & ! { dg-error "31: argument not permitted on 'worker' clause" }
!$acc & vector(length:5) ! { dg-error "36: argument not permitted on 'vector' clause" }
do k = 0, 10
end do
end do
end do
end subroutine gwv_r
|