| 1 |
module main |
| 2 |
implicit none |
| 3 |
contains |
| 4 |
subroutine f0 () |
| 5 |
end subroutine |
| 6 |
subroutine f1 () |
| 7 |
end subroutine |
| 8 |
subroutine f2 () |
| 9 |
!$omp declare variant ! { dg-error "expected '\\(' at .1." } |
| 10 |
end subroutine |
| 11 |
subroutine f3 () |
| 12 |
!$omp declare variant ( ! { dg-error "" } |
| 13 |
end subroutine |
| 14 |
subroutine f4 () |
| 15 |
!$omp declare variant () ! { dg-error "" } |
| 16 |
end subroutine |
| 17 |
subroutine f5 () |
| 18 |
!$omp declare variant match(user={condition(.false.)}) ! { dg-error "expected '\\(' at .1." } |
| 19 |
end subroutine |
| 20 |
subroutine f6 () |
| 21 |
!$omp declare variant (f1) ! { dg-error "expected 'match', 'adjust_args' or 'append_args' at .1." } |
| 22 |
end subroutine |
| 23 |
subroutine f7 () |
| 24 |
!$omp declare variant (f1) simd ! { dg-error "expected 'match', 'adjust_args' or 'append_args' at .1." } |
| 25 |
end subroutine |
| 26 |
subroutine f8 () |
| 27 |
!$omp declare variant (f1) match ! { dg-error "expected '\\(' at .1." } |
| 28 |
end subroutine |
| 29 |
subroutine f9 () |
| 30 |
!$omp declare variant (f1) match( ! { dg-error "expected context selector set name at .1." } |
| 31 |
end subroutine |
| 32 |
subroutine f10 () |
| 33 |
!$omp declare variant (f1) match() ! { dg-error "expected context selector set name at .1." } |
| 34 |
end subroutine |
| 35 |
subroutine f11 () |
| 36 |
!$omp declare variant (f1) match(foo) ! { dg-error "expected context selector set name at .1." } |
| 37 |
end subroutine |
| 38 |
subroutine f12 () |
| 39 |
!$omp declare variant (f1) match(something={something}) ! { dg-error "expected context selector set name at .1." } |
| 40 |
end subroutine |
| 41 |
subroutine f13 () |
| 42 |
!$omp declare variant (f1) match(user) ! { dg-error "expected '=' at .1." } |
| 43 |
end subroutine |
| 44 |
subroutine f14 () |
| 45 |
!$omp declare variant (f1) match(user=) ! { dg-error "expected '\\\{' at .1." } |
| 46 |
end subroutine |
| 47 |
subroutine f15 () |
| 48 |
!$omp declare variant (f1) match(user= ! { dg-error "expected '\\\{' at .1." } |
| 49 |
end subroutine |
| 50 |
subroutine f16 () |
| 51 |
!$omp declare variant (f1) match(user={) ! { dg-error "expected trait selector name at .1." } |
| 52 |
end subroutine |
| 53 |
subroutine f17 () |
| 54 |
!$omp declare variant (f1) match(user={}) ! { dg-error "expected trait selector name at .1." } |
| 55 |
end subroutine |
| 56 |
subroutine f18 () |
| 57 |
!$omp declare variant (f1) match(user={condition}) ! { dg-error "expected '\\(' at .1." } |
| 58 |
end subroutine |
| 59 |
subroutine f19 () |
| 60 |
!$omp declare variant (f1) match(user={condition(}) ! { dg-error "expected expression at .1." } |
| 61 |
end subroutine |
| 62 |
subroutine f20 () |
| 63 |
!$omp declare variant (f1) match(user={condition()}) ! { dg-error "expected expression at .1." } |
| 64 |
end subroutine |
| 65 |
subroutine f21 () |
| 66 |
!$omp declare variant (f1) match(user={condition(f1)}) ! { dg-error "expected expression at .1." } |
| 67 |
end subroutine |
| 68 |
subroutine f22 () |
| 69 |
!$omp declare variant (f1) match(user={condition(.false., .true., .false.)}) ! { dg-error "expected '\\)' at .1." } |
| 70 |
end subroutine |
| 71 |
subroutine f23 () |
| 72 |
!$omp declare variant (f1) match(construct={master}) ! { dg-warning "unknown selector 'master' for context selector set 'construct'" } |
| 73 |
end subroutine |
| 74 |
subroutine f24 () |
| 75 |
!$omp declare variant (f1) match(construct={teams,parallel,master,do}) ! { dg-warning "unknown selector 'master' for context selector set 'construct'" } |
| 76 |
end subroutine |
| 77 |
subroutine f25 () |
| 78 |
!$omp declare variant (f1) match(construct={parallel(1 ! { dg-error "selector 'parallel' does not accept any properties at .1." } |
| 79 |
end subroutine |
| 80 |
subroutine f26 () |
| 81 |
!$omp declare variant (f1) match(construct={parallel(1)}) ! { dg-error "selector 'parallel' does not accept any properties at .1." } |
| 82 |
end subroutine |
| 83 |
subroutine f27 () |
| 84 |
!$omp declare variant (f0) match(construct={simd(12)}) ! { dg-error "expected simd clause at .1." } |
| 85 |
end subroutine |
| 86 |
subroutine f32 () |
| 87 |
!$omp declare variant (f1) match(device={kind}) ! { dg-error "expected '\\(' at .1." } |
| 88 |
end subroutine |
| 89 |
subroutine f33 () |
| 90 |
!$omp declare variant (f1) match(device={isa}) ! { dg-error "expected '\\(' at .1." } |
| 91 |
end subroutine |
| 92 |
subroutine f34 () |
| 93 |
!$omp declare variant (f1) match(device={arch}) ! { dg-error "expected '\\(' at .1." } |
| 94 |
end subroutine |
| 95 |
subroutine f35 () |
| 96 |
!$omp declare variant (f1) match(device={kind,isa,arch}) ! { dg-error "expected '\\(' at .1." } |
| 97 |
end subroutine |
| 98 |
subroutine f36 () |
| 99 |
!$omp declare variant (f1) match(device={kind(}) ! { dg-error "expected identifier or string literal at .1." } |
| 100 |
end subroutine |
| 101 |
subroutine f39 () |
| 102 |
!$omp declare variant (f1) match(device={isa(1)}) ! { dg-error "expected identifier or string literal at .1." } |
| 103 |
end subroutine |
| 104 |
subroutine f40 () |
| 105 |
!$omp declare variant (f1) match(device={arch(17)}) ! { dg-error "expected identifier or string literal at .1." } |
| 106 |
end subroutine |
| 107 |
subroutine f41 () |
| 108 |
!$omp declare variant (f1) match(device={foobar(3)}) ! { dg-warning "unknown selector 'foobar' for context selector set 'device' at .1." } |
| 109 |
end subroutine |
| 110 |
subroutine f43 () |
| 111 |
!$omp declare variant (f1) match(implementation={foobar(3)}) ! { dg-warning "unknown selector 'foobar' for context selector set 'implementation' at .1." } |
| 112 |
end subroutine |
| 113 |
subroutine f44 () |
| 114 |
!$omp declare variant (f1) match(implementation={vendor}) ! { dg-error "expected '\\(' at .1." } |
| 115 |
end subroutine |
| 116 |
subroutine f45 () |
| 117 |
!$omp declare variant (f1) match(implementation={extension}) ! { dg-error "expected '\\(' at .1." } |
| 118 |
end subroutine |
| 119 |
subroutine f45a () |
| 120 |
!$omp declare variant (f1) match(implementation={vendor()}) ! { dg-error "expected identifier or string literal at .1." } |
| 121 |
end subroutine |
| 122 |
subroutine f46 () |
| 123 |
!$omp declare variant (f1) match(implementation={vendor(123-234)}) ! { dg-error "expected identifier or string literal at .1." } |
| 124 |
end subroutine |
| 125 |
subroutine f48 () |
| 126 |
!$omp declare variant (f1) match(implementation={unified_address(yes)}) ! { dg-error "selector 'unified_address' does not accept any properties at .1." } |
| 127 |
end subroutine |
| 128 |
subroutine f49 () |
| 129 |
!$omp declare variant (f1) match(implementation={unified_shared_memory(no)}) ! { dg-error "selector 'unified_shared_memory' does not accept any properties at .1." } |
| 130 |
end subroutine |
| 131 |
subroutine f50 () |
| 132 |
!$omp declare variant (f1) match(implementation={dynamic_allocators(42)}) ! { dg-error "selector 'dynamic_allocators' does not accept any properties at .1." } |
| 133 |
end subroutine |
| 134 |
subroutine f51 () |
| 135 |
!$omp declare variant (f1) match(implementation={reverse_offload()}) ! { dg-error "selector 'reverse_offload' does not accept any properties at .1." } |
| 136 |
end subroutine |
| 137 |
subroutine f52 () |
| 138 |
!$omp declare variant (f1) match(implementation={atomic_default_mem_order}) ! { dg-error "expected '\\('" } |
| 139 |
end subroutine |
| 140 |
subroutine f56 () |
| 141 |
!$omp declare variant (f1) match(implementation={atomic_default_mem_order(relaxed,seq_cst)}) ! { dg-error "expected '\\)' at .1." } |
| 142 |
end subroutine |
| 143 |
subroutine f58 () |
| 144 |
!$omp declare variant (f1) match(user={foobar(3)}) ! { dg-warning "unknown selector 'foobar' for context selector set 'user' at .1." } |
| 145 |
end subroutine |
| 146 |
subroutine f59 () |
| 147 |
!$omp declare variant (f1) match(construct={foobar(3)}) ! { dg-warning "unknown selector 'foobar' for context selector set 'construct' at .1." } |
| 148 |
end subroutine |
| 149 |
subroutine f60 () |
| 150 |
!$omp declare variant (f1) match(construct={parallel},foobar={bar}) ! { dg-error "expected context selector set name at .1." } |
| 151 |
end subroutine |
| 152 |
subroutine f64 () |
| 153 |
!$omp declare variant (f1) match(construct={single}) ! { dg-warning "unknown selector 'single' for context selector set 'construct' at .1." } |
| 154 |
end subroutine |
| 155 |
subroutine f65 () |
| 156 |
!$omp declare variant (f1) match(construct={taskgroup}) ! { dg-warning "unknown selector 'taskgroup' for context selector set 'construct' at .1." } |
| 157 |
end subroutine |
| 158 |
subroutine f66 () |
| 159 |
!$omp declare variant (f1) match(construct={for}) ! { dg-warning "unknown selector 'for' for context selector set 'construct' at .1." } |
| 160 |
end subroutine |
| 161 |
subroutine f67 () |
| 162 |
!$omp declare variant (f1) match(construct={threadprivate}) ! { dg-warning "unknown selector 'threadprivate' for context selector set 'construct' at .1." } |
| 163 |
end subroutine |
| 164 |
subroutine f68 () |
| 165 |
!$omp declare variant (f1) match(construct={critical}) ! { dg-warning "unknown selector 'critical' for context selector set 'construct' at .1." } |
| 166 |
end subroutine |
| 167 |
subroutine f69 () |
| 168 |
!$omp declare variant (f1) match(construct={task}) ! { dg-warning "unknown selector 'task' for context selector set 'construct' at .1." } |
| 169 |
end subroutine |
| 170 |
subroutine f70 () |
| 171 |
!$omp declare variant (f1) match(construct={taskloop}) ! { dg-warning "unknown selector 'taskloop' for context selector set 'construct' at .1." } |
| 172 |
end subroutine |
| 173 |
subroutine f71 () |
| 174 |
!$omp declare variant (f1) match(construct={sections}) ! { dg-warning "unknown selector 'sections' for context selector set 'construct' at .1." } |
| 175 |
end subroutine |
| 176 |
subroutine f72 () |
| 177 |
!$omp declare variant (f1) match(construct={section}) ! { dg-warning "unknown selector 'section' for context selector set 'construct' at .1." } |
| 178 |
end subroutine |
| 179 |
subroutine f73 () |
| 180 |
!$omp declare variant (f1) match(construct={workshare}) ! { dg-warning "unknown selector 'workshare' for context selector set 'construct' at .1." } |
| 181 |
end subroutine |
| 182 |
subroutine f74 () |
| 183 |
!$omp declare variant (f1) match(construct={requires}) ! { dg-warning "unknown selector 'requires' for context selector set 'construct' at .1." } |
| 184 |
end subroutine |
| 185 |
subroutine f75a () |
| 186 |
!$omp declare variant(f1) ,,match(construct={dispatch}) adjust_args(need_device_ptr : c) ! { dg-error "expected 'match', 'adjust_args' or 'append_args' at .1." } |
| 187 |
end subroutine |
| 188 |
subroutine f75b () |
| 189 |
!$omp declare variant(f1) match(construct={dispatch}),,adjust_args(need_device_ptr : c) ! { dg-error "expected 'match', 'adjust_args' or 'append_args' at .1." } |
| 190 |
end subroutine |
| 191 |
subroutine f75c () |
| 192 |
!$omp declare variant(f1) match(construct={dispatch}),nowait(a) ! { dg-error "expected 'match', 'adjust_args' or 'append_args' at .1." } |
| 193 |
end subroutine |
| 194 |
subroutine f76 () |
| 195 |
!$omp declare variant (f1) match(implementation={atomic_default_mem_order("relaxed")}) ! { dg-error "expected identifier at .1." } |
| 196 |
end subroutine |
| 197 |
subroutine f77 () |
| 198 |
!$omp declare variant (f1) match(user={condition(score(f76):.true.)}) ! { dg-error ".score. argument must be constant integer expression at .1." } |
| 199 |
end subroutine |
| 200 |
subroutine f78 () |
| 201 |
!$omp declare variant (f1) match(user={condition(score(-130):.true.)}) ! { dg-error ".score. argument must be non-negative" } |
| 202 |
end subroutine |
| 203 |
end module |