Debian Codegraph @

gcc/testsuite/g++.dg/template/builtin-atomic-overloads5.C

raw
1 /* Check that overloaded builtins still error when not in SFINAE context. */
2 // { dg-do compile { target c++17 } }
3 #include <type_traits>
4
5 /* Should error here due to the fully specified (and invalid) builtin calls. */
6 #define SFINAE_TYPE_CHECK(NAME, PARAMS, NONPOINTER_PARAMS) \
7 template <typename T, typename = void> \
8 struct is_##NAME##_available : std::false_type {}; \
9 template <typename T> \
10 struct is_##NAME##_available<T, \
11 std::void_t<decltype(__atomic_##NAME (int())) >> \
12 : std::true_type {}; \
13 template <typename T> \
14 struct is_##NAME##_available<T, \
15 std::void_t<decltype(__atomic_##NAME (int(), int())) >> \
16 : std::true_type {}; \
17 template <typename T> \
18 struct is_##NAME##_available<T, \
19 std::void_t<decltype(__atomic_##NAME (int(), int(), int())) >> \
20 : std::true_type {}; \
21 template <typename T> \
22 struct is_##NAME##_available<T, \
23 std::void_t<decltype(__atomic_##NAME (int(), int(), int(), int())) >> \
24 : std::true_type {}; \
25 template <typename T> \
26 struct is_##NAME##_available<T, \
27 std::void_t<decltype(__atomic_##NAME (int(), int(), int(), int(), int())) >> \
28 : std::true_type {}; \
29 template <typename T> \
30 struct is_##NAME##_available<T, \
31 std::void_t<decltype(__atomic_##NAME (int(), int(), int(), int(), int(), int())) >> \
32 : std::true_type {}; \
33 template <typename T> \
34 struct is_##NAME##_available<T, \
35 std::void_t<decltype(__atomic_##NAME (X(), int())) >> \
36 : std::true_type {}; \
37 template <typename T> \
38 struct is_##NAME##_available<T, \
39 std::void_t<decltype(__atomic_##NAME (Incomplete(), int())) >> \
40 : std::true_type {}; \
41 template <typename T> \
42 struct is_##NAME##_available<T, \
43 std::void_t<decltype(__atomic_##NAME (int(), int(), int(), int(), \
44 int(), int(), int())) >> \
45 : std::true_type {}; \
46 template <typename T> \
47 struct is_##NAME##_available<T, \
48 std::void_t<decltype(__atomic_##NAME (std::declval<int*>(), int(), int(), int(), \
49 int(), int(), int())) >> \
50 : std::true_type {}; \
51 template <typename T> \
52 struct is_##NAME##_available<T, \
53 std::void_t<decltype(__atomic_##NAME ()) >> \
54 : std::true_type {};
55
56 /* All the errors that are emitted. We don't check that the errors directly
57 correspond to the relevant scenarios because validation that the correct
58 errors are generated for the relevant problems is done in other tests.
59
60 This test is checking that all the error types below are still emitted
61 when the problem occurs in templates for fully specified calls.
62
63 NOTE: We are missing some of the errors that could be emitted because the
64 above doesn't generate all invalid calls.
65 Things that could be added:
66 - pointer to incomplete type
67 - pointer to type of non-constant size
68 - pointer to type of zero size
69 - arguments after the first one:
70 - not pointers
71 - pointers to non-constant sized type
72 - pointers to function
73 - pointer to type of different size to the first one.
74 - pointer to const type
75 - pointer to volatile type
76 - memory model argument is not an integral type
77 - all errors around bitint
78 */
79
80 /* { dg-error "argument 1 of '__atomic_compare_exchange' must be a non-void pointer type" "" { target *-*-* } 31 } */
81 /* { dg-error "argument 1 of '__atomic_exchange' must be a non-void pointer type" "" { target *-*-* } 23 } */
82 /* { dg-error "argument 1 of '__atomic_load' must be a non-void pointer type" "" { target *-*-* } 19 } */
83 /* { dg-error "argument 1 of '__atomic_store' must be a non-void pointer type" "" { target *-*-* } 19 } */
84 /* { dg-error "incorrect number of arguments to function '__atomic_compare_exchange'" "" { target *-*-* } 11 } */
85 /* { dg-error "incorrect number of arguments to function '__atomic_compare_exchange'" "" { target *-*-* } 15 } */
86 /* { dg-error "incorrect number of arguments to function '__atomic_compare_exchange'" "" { target *-*-* } 19 } */
87 /* { dg-error "incorrect number of arguments to function '__atomic_compare_exchange'" "" { target *-*-* } 23 } */
88 /* { dg-error "incorrect number of arguments to function '__atomic_compare_exchange'" "" { target *-*-* } 27 } */
89 /* { dg-error "incorrect number of arguments to function '__atomic_compare_exchange'" "" { target *-*-* } 35 } */
90 /* { dg-error "incorrect number of arguments to function '__atomic_compare_exchange'" "" { target *-*-* } 39 } */
91 /* { dg-error "incorrect number of arguments to function '__atomic_compare_exchange'" "" { target *-*-* } 43 } */
92 /* { dg-error "incorrect number of arguments to function '__atomic_compare_exchange'" "" { target *-*-* } 48 } */
93 /* { dg-error "incorrect number of arguments to function '__atomic_compare_exchange'" "" { target *-*-* } 53 } */
94 /* { dg-error "incorrect number of arguments to function '__atomic_exchange'" "" { target *-*-* } 11 } */
95 /* { dg-error "incorrect number of arguments to function '__atomic_exchange'" "" { target *-*-* } 15 } */
96 /* { dg-error "incorrect number of arguments to function '__atomic_exchange'" "" { target *-*-* } 19 } */
97 /* { dg-error "incorrect number of arguments to function '__atomic_exchange'" "" { target *-*-* } 27 } */
98 /* { dg-error "incorrect number of arguments to function '__atomic_exchange'" "" { target *-*-* } 31 } */
99 /* { dg-error "incorrect number of arguments to function '__atomic_exchange'" "" { target *-*-* } 35 } */
100 /* { dg-error "incorrect number of arguments to function '__atomic_exchange'" "" { target *-*-* } 39 } */
101 /* { dg-error "incorrect number of arguments to function '__atomic_exchange'" "" { target *-*-* } 43 } */
102 /* { dg-error "incorrect number of arguments to function '__atomic_exchange'" "" { target *-*-* } 48 } */
103 /* { dg-error "incorrect number of arguments to function '__atomic_exchange'" "" { target *-*-* } 53 } */
104 /* { dg-error "incorrect number of arguments to function '__atomic_load'" "" { target *-*-* } 11 } */
105 /* { dg-error "incorrect number of arguments to function '__atomic_load'" "" { target *-*-* } 15 } */
106 /* { dg-error "incorrect number of arguments to function '__atomic_load'" "" { target *-*-* } 23 } */
107 /* { dg-error "incorrect number of arguments to function '__atomic_load'" "" { target *-*-* } 27 } */
108 /* { dg-error "incorrect number of arguments to function '__atomic_load'" "" { target *-*-* } 31 } */
109 /* { dg-error "incorrect number of arguments to function '__atomic_load'" "" { target *-*-* } 35 } */
110 /* { dg-error "incorrect number of arguments to function '__atomic_load'" "" { target *-*-* } 39 } */
111 /* { dg-error "incorrect number of arguments to function '__atomic_load'" "" { target *-*-* } 43 } */
112 /* { dg-error "incorrect number of arguments to function '__atomic_load'" "" { target *-*-* } 48 } */
113 /* { dg-error "incorrect number of arguments to function '__atomic_load'" "" { target *-*-* } 53 } */
114 /* { dg-error "incorrect number of arguments to function '__atomic_store'" "" { target *-*-* } 11 } */
115 /* { dg-error "incorrect number of arguments to function '__atomic_store'" "" { target *-*-* } 15 } */
116 /* { dg-error "incorrect number of arguments to function '__atomic_store'" "" { target *-*-* } 23 } */
117 /* { dg-error "incorrect number of arguments to function '__atomic_store'" "" { target *-*-* } 27 } */
118 /* { dg-error "incorrect number of arguments to function '__atomic_store'" "" { target *-*-* } 31 } */
119 /* { dg-error "incorrect number of arguments to function '__atomic_store'" "" { target *-*-* } 35 } */
120 /* { dg-error "incorrect number of arguments to function '__atomic_store'" "" { target *-*-* } 39 } */
121 /* { dg-error "incorrect number of arguments to function '__atomic_store'" "" { target *-*-* } 43 } */
122 /* { dg-error "incorrect number of arguments to function '__atomic_store'" "" { target *-*-* } 48 } */
123 /* { dg-error "incorrect number of arguments to function '__atomic_store'" "" { target *-*-* } 53 } */
124 /* { dg-error "operand type 'Incomplete' is incompatible with argument 1 of '__atomic_add_fetch'" "" { target *-*-* } 39 } */
125 /* { dg-error "operand type 'Incomplete' is incompatible with argument 1 of '__atomic_and_fetch'" "" { target *-*-* } 39 } */
126 /* { dg-error "operand type 'Incomplete' is incompatible with argument 1 of '__atomic_compare_exchange_n'" "" { target *-*-* } 39 } */
127 /* { dg-error "operand type 'Incomplete' is incompatible with argument 1 of '__atomic_exchange_n'" "" { target *-*-* } 39 } */
128 /* { dg-error "operand type 'Incomplete' is incompatible with argument 1 of '__atomic_fetch_add'" "" { target *-*-* } 39 } */
129 /* { dg-error "operand type 'Incomplete' is incompatible with argument 1 of '__atomic_fetch_and'" "" { target *-*-* } 39 } */
130 /* { dg-error "operand type 'Incomplete' is incompatible with argument 1 of '__atomic_fetch_nand'" "" { target *-*-* } 39 } */
131 /* { dg-error "operand type 'Incomplete' is incompatible with argument 1 of '__atomic_fetch_or'" "" { target *-*-* } 39 } */
132 /* { dg-error "operand type 'Incomplete' is incompatible with argument 1 of '__atomic_fetch_sub'" "" { target *-*-* } 39 } */
133 /* { dg-error "operand type 'Incomplete' is incompatible with argument 1 of '__atomic_fetch_xor'" "" { target *-*-* } 39 } */
134 /* { dg-error "operand type 'Incomplete' is incompatible with argument 1 of '__atomic_load_n'" "" { target *-*-* } 39 } */
135 /* { dg-error "operand type 'Incomplete' is incompatible with argument 1 of '__atomic_nand_fetch'" "" { target *-*-* } 39 } */
136 /* { dg-error "operand type 'Incomplete' is incompatible with argument 1 of '__atomic_or_fetch'" "" { target *-*-* } 39 } */
137 /* { dg-error "operand type 'Incomplete' is incompatible with argument 1 of '__atomic_store_n'" "" { target *-*-* } 39 } */
138 /* { dg-error "operand type 'Incomplete' is incompatible with argument 1 of '__atomic_sub_fetch'" "" { target *-*-* } 39 } */
139 /* { dg-error "operand type 'Incomplete' is incompatible with argument 1 of '__atomic_xor_fetch'" "" { target *-*-* } 39 } */
140 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_add_fetch'" "" { target *-*-* } 11 } */
141 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_add_fetch'" "" { target *-*-* } 15 } */
142 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_add_fetch'" "" { target *-*-* } 19 } */
143 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_add_fetch'" "" { target *-*-* } 23 } */
144 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_add_fetch'" "" { target *-*-* } 27 } */
145 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_add_fetch'" "" { target *-*-* } 31 } */
146 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_add_fetch'" "" { target *-*-* } 43 } */
147 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_and_fetch'" "" { target *-*-* } 11 } */
148 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_and_fetch'" "" { target *-*-* } 15 } */
149 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_and_fetch'" "" { target *-*-* } 19 } */
150 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_and_fetch'" "" { target *-*-* } 23 } */
151 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_and_fetch'" "" { target *-*-* } 27 } */
152 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_and_fetch'" "" { target *-*-* } 31 } */
153 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_and_fetch'" "" { target *-*-* } 43 } */
154 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_compare_exchange_n'" "" { target *-*-* } 11 } */
155 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_compare_exchange_n'" "" { target *-*-* } 15 } */
156 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_compare_exchange_n'" "" { target *-*-* } 19 } */
157 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_compare_exchange_n'" "" { target *-*-* } 23 } */
158 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_compare_exchange_n'" "" { target *-*-* } 27 } */
159 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_compare_exchange_n'" "" { target *-*-* } 31 } */
160 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_compare_exchange_n'" "" { target *-*-* } 43 } */
161 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_exchange_n'" "" { target *-*-* } 11 } */
162 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_exchange_n'" "" { target *-*-* } 15 } */
163 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_exchange_n'" "" { target *-*-* } 19 } */
164 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_exchange_n'" "" { target *-*-* } 23 } */
165 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_exchange_n'" "" { target *-*-* } 27 } */
166 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_exchange_n'" "" { target *-*-* } 31 } */
167 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_exchange_n'" "" { target *-*-* } 43 } */
168 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_add'" "" { target *-*-* } 11 } */
169 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_add'" "" { target *-*-* } 15 } */
170 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_add'" "" { target *-*-* } 19 } */
171 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_add'" "" { target *-*-* } 23 } */
172 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_add'" "" { target *-*-* } 27 } */
173 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_add'" "" { target *-*-* } 31 } */
174 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_add'" "" { target *-*-* } 43 } */
175 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_and'" "" { target *-*-* } 11 } */
176 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_and'" "" { target *-*-* } 15 } */
177 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_and'" "" { target *-*-* } 19 } */
178 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_and'" "" { target *-*-* } 23 } */
179 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_and'" "" { target *-*-* } 27 } */
180 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_and'" "" { target *-*-* } 31 } */
181 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_and'" "" { target *-*-* } 43 } */
182 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_nand'" "" { target *-*-* } 11 } */
183 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_nand'" "" { target *-*-* } 15 } */
184 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_nand'" "" { target *-*-* } 19 } */
185 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_nand'" "" { target *-*-* } 23 } */
186 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_nand'" "" { target *-*-* } 27 } */
187 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_nand'" "" { target *-*-* } 31 } */
188 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_nand'" "" { target *-*-* } 43 } */
189 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_or'" "" { target *-*-* } 11 } */
190 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_or'" "" { target *-*-* } 15 } */
191 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_or'" "" { target *-*-* } 19 } */
192 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_or'" "" { target *-*-* } 23 } */
193 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_or'" "" { target *-*-* } 27 } */
194 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_or'" "" { target *-*-* } 31 } */
195 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_or'" "" { target *-*-* } 43 } */
196 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_sub'" "" { target *-*-* } 11 } */
197 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_sub'" "" { target *-*-* } 15 } */
198 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_sub'" "" { target *-*-* } 19 } */
199 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_sub'" "" { target *-*-* } 23 } */
200 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_sub'" "" { target *-*-* } 27 } */
201 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_sub'" "" { target *-*-* } 31 } */
202 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_sub'" "" { target *-*-* } 43 } */
203 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_xor'" "" { target *-*-* } 11 } */
204 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_xor'" "" { target *-*-* } 15 } */
205 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_xor'" "" { target *-*-* } 19 } */
206 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_xor'" "" { target *-*-* } 23 } */
207 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_xor'" "" { target *-*-* } 27 } */
208 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_xor'" "" { target *-*-* } 31 } */
209 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_fetch_xor'" "" { target *-*-* } 43 } */
210 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_load_n'" "" { target *-*-* } 11 } */
211 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_load_n'" "" { target *-*-* } 15 } */
212 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_load_n'" "" { target *-*-* } 19 } */
213 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_load_n'" "" { target *-*-* } 23 } */
214 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_load_n'" "" { target *-*-* } 27 } */
215 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_load_n'" "" { target *-*-* } 31 } */
216 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_load_n'" "" { target *-*-* } 43 } */
217 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_nand_fetch'" "" { target *-*-* } 11 } */
218 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_nand_fetch'" "" { target *-*-* } 15 } */
219 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_nand_fetch'" "" { target *-*-* } 19 } */
220 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_nand_fetch'" "" { target *-*-* } 23 } */
221 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_nand_fetch'" "" { target *-*-* } 27 } */
222 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_nand_fetch'" "" { target *-*-* } 31 } */
223 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_nand_fetch'" "" { target *-*-* } 43 } */
224 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_or_fetch'" "" { target *-*-* } 11 } */
225 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_or_fetch'" "" { target *-*-* } 15 } */
226 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_or_fetch'" "" { target *-*-* } 19 } */
227 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_or_fetch'" "" { target *-*-* } 23 } */
228 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_or_fetch'" "" { target *-*-* } 27 } */
229 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_or_fetch'" "" { target *-*-* } 31 } */
230 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_or_fetch'" "" { target *-*-* } 43 } */
231 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_store_n'" "" { target *-*-* } 11 } */
232 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_store_n'" "" { target *-*-* } 15 } */
233 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_store_n'" "" { target *-*-* } 19 } */
234 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_store_n'" "" { target *-*-* } 23 } */
235 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_store_n'" "" { target *-*-* } 27 } */
236 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_store_n'" "" { target *-*-* } 31 } */
237 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_store_n'" "" { target *-*-* } 43 } */
238 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_sub_fetch'" "" { target *-*-* } 11 } */
239 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_sub_fetch'" "" { target *-*-* } 15 } */
240 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_sub_fetch'" "" { target *-*-* } 19 } */
241 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_sub_fetch'" "" { target *-*-* } 23 } */
242 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_sub_fetch'" "" { target *-*-* } 27 } */
243 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_sub_fetch'" "" { target *-*-* } 31 } */
244 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_sub_fetch'" "" { target *-*-* } 43 } */
245 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_xor_fetch'" "" { target *-*-* } 11 } */
246 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_xor_fetch'" "" { target *-*-* } 15 } */
247 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_xor_fetch'" "" { target *-*-* } 19 } */
248 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_xor_fetch'" "" { target *-*-* } 23 } */
249 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_xor_fetch'" "" { target *-*-* } 27 } */
250 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_xor_fetch'" "" { target *-*-* } 31 } */
251 /* { dg-error "operand type 'int' is incompatible with argument 1 of '__atomic_xor_fetch'" "" { target *-*-* } 43 } */
252 /* { dg-error "operand type 'X' is incompatible with argument 1 of '__atomic_add_fetch'" "" { target *-*-* } 35 } */
253 /* { dg-error "operand type 'X' is incompatible with argument 1 of '__atomic_and_fetch'" "" { target *-*-* } 35 } */
254 /* { dg-error "operand type 'X' is incompatible with argument 1 of '__atomic_compare_exchange_n'" "" { target *-*-* } 35 } */
255 /* { dg-error "operand type 'X' is incompatible with argument 1 of '__atomic_exchange_n'" "" { target *-*-* } 35 } */
256 /* { dg-error "operand type 'X' is incompatible with argument 1 of '__atomic_fetch_add'" "" { target *-*-* } 35 } */
257 /* { dg-error "operand type 'X' is incompatible with argument 1 of '__atomic_fetch_and'" "" { target *-*-* } 35 } */
258 /* { dg-error "operand type 'X' is incompatible with argument 1 of '__atomic_fetch_nand'" "" { target *-*-* } 35 } */
259 /* { dg-error "operand type 'X' is incompatible with argument 1 of '__atomic_fetch_or'" "" { target *-*-* } 35 } */
260 /* { dg-error "operand type 'X' is incompatible with argument 1 of '__atomic_fetch_sub'" "" { target *-*-* } 35 } */
261 /* { dg-error "operand type 'X' is incompatible with argument 1 of '__atomic_fetch_xor'" "" { target *-*-* } 35 } */
262 /* { dg-error "operand type 'X' is incompatible with argument 1 of '__atomic_load_n'" "" { target *-*-* } 35 } */
263 /* { dg-error "operand type 'X' is incompatible with argument 1 of '__atomic_nand_fetch'" "" { target *-*-* } 35 } */
264 /* { dg-error "operand type 'X' is incompatible with argument 1 of '__atomic_or_fetch'" "" { target *-*-* } 35 } */
265 /* { dg-error "operand type 'X' is incompatible with argument 1 of '__atomic_store_n'" "" { target *-*-* } 35 } */
266 /* { dg-error "operand type 'X' is incompatible with argument 1 of '__atomic_sub_fetch'" "" { target *-*-* } 35 } */
267 /* { dg-error "operand type 'X' is incompatible with argument 1 of '__atomic_xor_fetch'" "" { target *-*-* } 35 } */
268 /* { dg-error "too few arguments to function '__atomic_add_fetch'" "" { target *-*-* } 53 } */
269 /* { dg-error "too few arguments to function '__atomic_and_fetch'" "" { target *-*-* } 53 } */
270 /* { dg-error "too few arguments to function '__atomic_compare_exchange_n'" "" { target *-*-* } 53 } */
271 /* { dg-error "too few arguments to function '__atomic_exchange_n'" "" { target *-*-* } 53 } */
272 /* { dg-error "too few arguments to function '__atomic_fetch_add'" "" { target *-*-* } 53 } */
273 /* { dg-error "too few arguments to function '__atomic_fetch_and'" "" { target *-*-* } 53 } */
274 /* { dg-error "too few arguments to function '__atomic_fetch_nand'" "" { target *-*-* } 53 } */
275 /* { dg-error "too few arguments to function '__atomic_fetch_or'" "" { target *-*-* } 53 } */
276 /* { dg-error "too few arguments to function '__atomic_fetch_sub'" "" { target *-*-* } 53 } */
277 /* { dg-error "too few arguments to function '__atomic_fetch_xor'" "" { target *-*-* } 53 } */
278 /* { dg-error "too few arguments to function '__atomic_load_n'" "" { target *-*-* } 53 } */
279 /* { dg-error "too few arguments to function '__atomic_nand_fetch'" "" { target *-*-* } 53 } */
280 /* { dg-error "too few arguments to function '__atomic_or_fetch'" "" { target *-*-* } 53 } */
281 /* { dg-error "too few arguments to function '__atomic_store_n'" "" { target *-*-* } 53 } */
282 /* { dg-error "too few arguments to function '__atomic_sub_fetch'" "" { target *-*-* } 53 } */
283 /* { dg-error "too few arguments to function '__atomic_xor_fetch'" "" { target *-*-* } 53 } */
284 /* { dg-error "too many arguments to function '__atomic_add_fetch'" "" { target *-*-* } 48 } */
285 /* { dg-error "too many arguments to function '__atomic_and_fetch'" "" { target *-*-* } 48 } */
286 /* { dg-error "too many arguments to function '__atomic_compare_exchange_n'" "" { target *-*-* } 48 } */
287 /* { dg-error "too many arguments to function '__atomic_exchange_n'" "" { target *-*-* } 48 } */
288 /* { dg-error "too many arguments to function '__atomic_fetch_add'" "" { target *-*-* } 48 } */
289 /* { dg-error "too many arguments to function '__atomic_fetch_and'" "" { target *-*-* } 48 } */
290 /* { dg-error "too many arguments to function '__atomic_fetch_nand'" "" { target *-*-* } 48 } */
291 /* { dg-error "too many arguments to function '__atomic_fetch_or'" "" { target *-*-* } 48 } */
292 /* { dg-error "too many arguments to function '__atomic_fetch_sub'" "" { target *-*-* } 48 } */
293 /* { dg-error "too many arguments to function '__atomic_fetch_xor'" "" { target *-*-* } 48 } */
294 /* { dg-error "too many arguments to function '__atomic_load_n'" "" { target *-*-* } 48 } */
295 /* { dg-error "too many arguments to function '__atomic_nand_fetch'" "" { target *-*-* } 48 } */
296 /* { dg-error "too many arguments to function '__atomic_or_fetch'" "" { target *-*-* } 48 } */
297 /* { dg-error "too many arguments to function '__atomic_store_n'" "" { target *-*-* } 48 } */
298 /* { dg-error "too many arguments to function '__atomic_sub_fetch'" "" { target *-*-* } 48 } */
299 /* { dg-error "too many arguments to function '__atomic_xor_fetch'" "" { target *-*-* } 48 } */
300
301
302 /* { dg-error "template argument 1 is invalid" "" { target *-*-* } 11 } */
303 /* { dg-error "template argument 1 is invalid" "" { target *-*-* } 15 } */
304 /* { dg-error "template argument 1 is invalid" "" { target *-*-* } 19 } */
305 /* { dg-error "template argument 1 is invalid" "" { target *-*-* } 23 } */
306 /* { dg-error "template argument 1 is invalid" "" { target *-*-* } 27 } */
307 /* { dg-error "template argument 1 is invalid" "" { target *-*-* } 31 } */
308 /* { dg-error "template argument 1 is invalid" "" { target *-*-* } 35 } */
309 /* { dg-error "template argument 1 is invalid" "" { target *-*-* } 39 } */
310 /* { dg-error "template argument 1 is invalid" "" { target *-*-* } 43 } */
311 /* { dg-error "template argument 1 is invalid" "" { target *-*-* } 48 } */
312 /* { dg-error "template argument 1 is invalid" "" { target *-*-* } 53 } */
313 /* { dg-error "template argument 2 is invalid" "" { target *-*-* } 11 } */
314 /* { dg-error "template argument 2 is invalid" "" { target *-*-* } 15 } */
315 /* { dg-error "template argument 2 is invalid" "" { target *-*-* } 19 } */
316 /* { dg-error "template argument 2 is invalid" "" { target *-*-* } 23 } */
317 /* { dg-error "template argument 2 is invalid" "" { target *-*-* } 27 } */
318 /* { dg-error "template argument 2 is invalid" "" { target *-*-* } 31 } */
319 /* { dg-error "template argument 2 is invalid" "" { target *-*-* } 35 } */
320 /* { dg-error "template argument 2 is invalid" "" { target *-*-* } 39 } */
321 /* { dg-error "template argument 2 is invalid" "" { target *-*-* } 44 } */
322 /* { dg-error "template argument 2 is invalid" "" { target *-*-* } 49 } */
323 /* { dg-error "template argument 2 is invalid" "" { target *-*-* } 53 } */
324
325 /* Just avoid generating anything for the assertions (not what we're testing
326 here). */
327 #define MAKE_ATOMIC_ASSERT(NAME, TYPE, SUCCESS)
328
329 #include "builtin-atomic-overloads.def"