]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/c-c++-common/gomp/declare-variant-2.c
Merge branch 'master' into devel/modula-2.
[gcc.git] / gcc / testsuite / c-c++-common / gomp / declare-variant-2.c
1 void f0 (void);
2 void f1 (void);
3 #pragma omp declare variant /* { dg-error "expected '\\(' before end of line" } */
4 void f2 (void);
5 #pragma omp declare variant ( /* { dg-error "" } */
6 void f3 (void);
7 #pragma omp declare variant () /* { dg-error "" } */
8 void f4 (void);
9 #pragma omp declare variant match(user={condition(0)}) /* { dg-error "expected '\\(' before 'match'" } */
10 void f5 (void);
11 #pragma omp declare variant (f1) /* { dg-error "expected 'match' before end of line" } */
12 void f6 (void);
13 #pragma omp declare variant (f1) simd /* { dg-error "expected 'match' before 'simd'" } */
14 void f7 (void);
15 #pragma omp declare variant (f1) match /* { dg-error "expected '\\(' before end of line" } */
16 void f8 (void);
17 #pragma omp declare variant (f1) match( /* { dg-error "expected 'construct', 'device', 'implementation' or 'user' before end of line" } */
18 void f9 (void);
19 #pragma omp declare variant (f1) match() /* { dg-error "expected 'construct', 'device', 'implementation' or 'user' before '\\)' token" } */
20 void f10 (void);
21 #pragma omp declare variant (f1) match(foo) /* { dg-error "expected 'construct', 'device', 'implementation' or 'user' before 'foo'" } */
22 void f11 (void);
23 #pragma omp declare variant (f1) match(something={something}) /* { dg-error "expected 'construct', 'device', 'implementation' or 'user' before 'something'" } */
24 void f12 (void);
25 #pragma omp declare variant (f1) match(user) /* { dg-error "expected '=' before '\\)' token" } */
26 void f13 (void);
27 #pragma omp declare variant (f1) match(user=) /* { dg-error "expected '\\\{' before '\\)' token" } */
28 void f14 (void);
29 #pragma omp declare variant (f1) match(user= /* { dg-error "expected '\\\{' before end of line" } */
30 void f15 (void);
31 #pragma omp declare variant (f1) match(user={) /* { dg-error "expected trait selector name before '\\)' token" } */
32 void f16 (void); /* { dg-error "expected '\\\}' before" "" { target c++ } .-1 } */
33 #pragma omp declare variant (f1) match(user={}) /* { dg-error "expected trait selector name before '\\\}' token" } */
34 void f17 (void);
35 #pragma omp declare variant (f1) match(user={condition}) /* { dg-error "expected '\\(' before '\\\}' token" } */
36 void f18 (void);
37 #pragma omp declare variant (f1) match(user={condition(}) /* { dg-error "expected \[^\n\r]*expression before '\\\}' token" } */
38 void f19 (void);
39 #pragma omp declare variant (f1) match(user={condition()}) /* { dg-error "expected \[^\n\r]*expression before '\\)' token" } */
40 void f20 (void);
41 #pragma omp declare variant (f1) match(user={condition(f1)}) /* { dg-error "property must be constant integer expression" "" { target { c || c++11 } } } */
42 void f21 (void); /* { dg-error "cannot appear in a constant-expression" "" { target c++98_only } .-1 } */
43 #pragma omp declare variant (f1) match(user={condition(1, 2, 3)}) /* { dg-error "expected '\\)' before ',' token" } */
44 void f22 (void);
45 #pragma omp declare variant (f1) match(construct={master}) /* { dg-error "selector 'master' not allowed for context selector set 'construct'" } */
46 void f23 (void);
47 #pragma omp declare variant (f1) match(construct={teams,parallel,master,for}) /* { dg-error "selector 'master' not allowed for context selector set 'construct'" } */
48 void f24 (void); /* { dg-error "expected '\\\}' before ',' token" "" { target c } .-1 } */
49 #pragma omp declare variant (f1) match(construct={parallel(1 /* { dg-error "selector 'parallel' does not accept any properties" } */
50 void f25 (void); /* { dg-error "expected '\\\}' before end of line" "" { target c++ } .-1 } */
51 /* { dg-error "expected '\\\}' before '\\(' token" "" { target c } .-2 } */
52 #pragma omp declare variant (f1) match(construct={parallel(1)}) /* { dg-error "selector 'parallel' does not accept any properties" } */
53 void f26 (void); /* { dg-error "expected '\\\}' before '\\(' token" "" { target c } .-1 } */
54 #pragma omp declare variant (f0) match(construct={simd(12)}) /* { dg-error "expected \[^\n\r]* clause before" } */
55 void f27 (void); /* { dg-error "'\\)' before numeric constant" "" { target c++ } .-1 } */
56 #pragma omp declare variant (f1) match(construct={parallel},construct={for}) /* { dg-error "selector set 'construct' specified more than once" } */
57 void f28 (void);
58 #pragma omp declare variant (f1) match(construct={parallel},construct={parallel}) /* { dg-error "selector set 'construct' specified more than once" } */
59 void f29 (void);
60 #pragma omp declare variant (f1) match(user={condition(0)},construct={target},user={condition(0)}) /* { dg-error "selector set 'user' specified more than once" } */
61 void f30 (void);
62 #pragma omp declare variant (f1) match(user={condition(0)},user={condition(1)}) /* { dg-error "selector set 'user' specified more than once" } */
63 void f31 (void);
64 #pragma omp declare variant (f1) match(device={kind}) /* { dg-error "expected '\\(' before '\\\}' token" } */
65 void f32 (void);
66 #pragma omp declare variant (f1) match(device={isa}) /* { dg-error "expected '\\(' before '\\\}' token" } */
67 void f33 (void);
68 #pragma omp declare variant (f1) match(device={arch}) /* { dg-error "expected '\\(' before '\\\}' token" } */
69 void f34 (void);
70 #pragma omp declare variant (f1) match(device={kind,isa,arch}) /* { dg-error "expected '\\(' before ',' token" } */
71 void f35 (void);
72 #pragma omp declare variant (f1) match(device={kind(}) /* { dg-error "expected identifier or string literal before '\\\}' token" } */
73 void f36 (void);
74 #pragma omp declare variant (f1) match(device={kind(unknown)}) /* { dg-warning "unknown property 'unknown' of 'kind' selector" } */
75 void f37 (void);
76 #pragma omp declare variant (f1) match(device={kind(unknown,foobar)}) /* { dg-warning "unknown property 'unknown' of 'kind' selector" } */
77 void f38 (void); /* { dg-warning "unknown property 'foobar' of 'kind' selector" "" { target *-*-* } .-1 } */
78 #pragma omp declare variant (f1) match(device={isa(1)}) /* { dg-error "expected identifier or string literal before numeric constant" } */
79 void f39 (void);
80 #pragma omp declare variant (f1) match(device={arch(17)}) /* { dg-error "expected identifier or string literal before numeric constant" } */
81 void f40 (void);
82 #pragma omp declare variant (f1) match(device={foobar(3)})
83 void f41 (void);
84 #pragma omp declare variant (f1) match(device={arch(x86_64)},device={isa(avx512vl)}) /* { dg-error "selector set 'device' specified more than once" } */
85 void f42 (void);
86 #pragma omp declare variant (f1) match(implementation={foobar(3)})
87 void f43 (void);
88 #pragma omp declare variant (f1) match(implementation={vendor}) /* { dg-error "expected '\\(' before '\\\}' token" } */
89 void f44 (void);
90 #pragma omp declare variant (f1) match(implementation={extension}) /* { dg-error "expected '\\(' before '\\\}' token" } */
91 void f45 (void);
92 #pragma omp declare variant (f1) match(implementation={vendor()}) /* { dg-error "expected identifier or string literal before '\\)' token" } */
93 void f45 (void);
94 #pragma omp declare variant (f1) match(implementation={vendor(123-234)}) /* { dg-error "expected identifier or string literal before numeric constant" } */
95 void f46 (void);
96 #pragma omp declare variant (f1) match(implementation={vendor("foobar")}) /* { dg-warning "unknown property '.foobar.' of 'vendor' selector" } */
97 void f47 (void);
98 #pragma omp declare variant (f1) match(implementation={unified_address(yes)}) /* { dg-error "selector 'unified_address' does not accept any properties" } */
99 void f48 (void); /* { dg-error "expected '\\\}' before '\\(' token" "" { target c } .-1 } */
100 #pragma omp declare variant (f1) match(implementation={unified_shared_memory(no)}) /* { dg-error "selector 'unified_shared_memory' does not accept any properties" } */
101 void f49 (void); /* { dg-error "expected '\\\}' before '\\(' token" "" { target c } .-1 } */
102 #pragma omp declare variant (f1) match(implementation={dynamic_allocators(42)}) /* { dg-error "selector 'dynamic_allocators' does not accept any properties" } */
103 void f50 (void); /* { dg-error "expected '\\\}' before '\\(' token" "" { target c } .-1 } */
104 #pragma omp declare variant (f1) match(implementation={reverse_offload()}) /* { dg-error "selector 'reverse_offload' does not accept any properties" } */
105 void f51 (void); /* { dg-error "expected '\\\}' before '\\(' token" "" { target c } .-1 } */
106 #pragma omp declare variant (f1) match(implementation={atomic_default_mem_order}) /* { dg-error "expected '\\(' before '\\\}' token" } */
107 void f52 (void);
108 #pragma omp declare variant (f1) match(implementation={atomic_default_mem_order(acquire)}) /* { dg-error "incorrect property 'acquire' of 'atomic_default_mem_order' selector" } */
109 void f53 (void);
110 #pragma omp declare variant (f1) match(implementation={atomic_default_mem_order(release)}) /* { dg-error "incorrect property 'release' of 'atomic_default_mem_order' selector" } */
111 void f54 (void);
112 #pragma omp declare variant (f1) match(implementation={atomic_default_mem_order(foobar)}) /* { dg-error "incorrect property 'foobar' of 'atomic_default_mem_order' selector" } */
113 void f55 (void);
114 #pragma omp declare variant (f1) match(implementation={atomic_default_mem_order(relaxed,seq_cst)}) /* { dg-error "expected '\\)' before ',' token" } */
115 void f56 (void);
116 #pragma omp declare variant (f1) match(implementation={atomic_default_mem_order(relaxed)},implementation={atomic_default_mem_order(relaxed)}) /* { dg-error "selector set 'implementation' specified more than once" } */
117 void f57 (void);
118 #pragma omp declare variant (f1) match(user={foobar(3)}) /* { dg-error "selector 'foobar' not allowed for context selector set 'user'" } */
119 void f58 (void); /* { dg-error "expected '\\\}' before '\\(' token" "" { target c } .-1 } */
120 #pragma omp declare variant (f1) match(construct={foobar(3)}) /* { dg-error "selector 'foobar' not allowed for context selector set 'construct'" } */
121 void f59 (void); /* { dg-error "expected '\\\}' before '\\(' token" "" { target c } .-1 } */
122 #pragma omp declare variant (f1) match(construct={parallel},foobar={bar}) /* { dg-error "expected 'construct', 'device', 'implementation' or 'user' before 'foobar'" } */
123 void f60 (void);
124 #pragma omp declare variant (f1) match(construct={parallel,parallel}) /* { dg-error "selector 'parallel' specified more than once in set 'construct'" } */
125 void f61 (void);
126 #pragma omp declare variant (f1) match(construct={target,parallel,for,simd,parallel}) /* { dg-error "selector 'parallel' specified more than once in set 'construct'" } */
127 void f62 (void);
128 #pragma omp declare variant (f1) match(construct={target,teams,teams}) /* { dg-error "selector 'teams' specified more than once in set 'construct'" } */
129 void f63 (void);
130 #pragma omp declare variant (f1) match(construct={single}) /* { dg-error "selector 'single' not allowed for context selector set 'construct'" } */
131 void f64 (void);
132 #pragma omp declare variant (f1) match(construct={taskgroup}) /* { dg-error "selector 'taskgroup' not allowed for context selector set 'construct'" } */
133 void f65 (void);
134 #pragma omp declare variant (f1) match(construct={do}) /* { dg-error "selector 'do' not allowed for context selector set 'construct'" } */
135 void f66 (void);
136 #pragma omp declare variant (f1) match(construct={threadprivate}) /* { dg-error "selector 'threadprivate' not allowed for context selector set 'construct'" } */
137 void f67 (void);
138 #pragma omp declare variant (f1) match(construct={critical}) /* { dg-error "selector 'critical' not allowed for context selector set 'construct'" } */
139 void f68 (void);
140 #pragma omp declare variant (f1) match(construct={task}) /* { dg-error "selector 'task' not allowed for context selector set 'construct'" } */
141 void f69 (void);
142 #pragma omp declare variant (f1) match(construct={taskloop}) /* { dg-error "selector 'taskloop' not allowed for context selector set 'construct'" } */
143 void f70 (void);
144 #pragma omp declare variant (f1) match(construct={sections}) /* { dg-error "selector 'sections' not allowed for context selector set 'construct'" } */
145 void f71 (void);
146 #pragma omp declare variant (f1) match(construct={section}) /* { dg-error "selector 'section' not allowed for context selector set 'construct'" } */
147 void f72 (void);
148 #pragma omp declare variant (f1) match(construct={workshare}) /* { dg-error "selector 'workshare' not allowed for context selector set 'construct'" } */
149 void f73 (void);
150 #pragma omp declare variant (f1) match(construct={requires}) /* { dg-error "selector 'requires' not allowed for context selector set 'construct'" } */
151 void f74 (void);
152 #pragma omp declare variant (f1),match(construct={parallel}) /* { dg-error "expected 'match' before ','" } */
153 void f75 (void);
154 #pragma omp declare variant (f1) match(implementation={atomic_default_mem_order("relaxed")}) /* { dg-error "expected identifier before string constant" } */
155 void f76 (void);
156 #pragma omp declare variant (f1) match(user={condition(score(&f76):1)}) /* { dg-error "score argument must be constant integer expression" "" { target { ! c++98_only } } } */
157 void f77 (void); /* { dg-error "cannot appear in a constant-expression" "" { target c++98_only } .-1 } */
158 #pragma omp declare variant (f1) match(user={condition(score(-130):1)}) /* { dg-error "score argument must be non-negative" } */
159 void f78 (void);
This page took 0.054156 seconds and 5 git commands to generate.