OSDN Git Service

* gcc.dg/darwin-longlong.c: Only use r0 in asm for darwin.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / cpp / assert4.c
1 /* Copyright (C) 2003 Free Software Foundation, Inc.
2    Test builtin preprocessor assertions.
3    By Kaveh Ghazi <ghazi@caip.rutgers.edu>.  */
4
5 /* { dg-do preprocess } */
6
7 /* Check for #system assertions.  */
8
9 #if defined __gnu_linux__
10 # if !#system(linux) || !#system(unix) || !#system(posix)
11 #  error
12 # endif
13 #elif #system(linux)
14 # error
15 #endif
16
17 #if defined __gnu_hurd__
18 # if !#system(gnu) || !#system(unix) || !#system(posix) || !#system(mach)
19 #  error
20 # endif
21 #elif #system(gnu)
22 # error
23 #endif
24
25 #if defined __FreeBSD__
26 # if !#system(FreeBSD) || !#system(unix) || !#system(bsd)
27 #  error
28 # endif
29 #elif #system(FreeBSD)
30 # error
31 #endif
32
33 #if defined __NetBSD__
34 # if !#system(NetBSD) || !#system(unix) || !#system(bsd)
35 #  error
36 # endif
37 #elif #system(NetBSD)
38 # error
39 #endif
40
41 #if defined __OpenBSD__
42 # if !#system(OpenBSD) || !#system(unix) || !#system(bsd)
43 #  error
44 # endif
45 #elif #system(OpenBSD)
46 # error
47 #endif
48
49 #if defined __svr4__ || defined __SYSTYPE_SVR4__
50 # if !#system(svr4) || !#system(unix)
51 #  error
52 # endif
53 #elif #system(svr4)
54 # error
55 #endif
56
57 #if defined __hpux__
58 # if !#system(hpux) || !#system(unix)
59 #  error
60 # endif
61 #elif #system(hpux)
62 # error
63 #endif
64
65 #if defined _AIX
66 # if !#system(aix) || !#system(unix)
67 #  error
68 # endif
69 #elif #system(aix)
70 # error
71 #endif
72
73 #if defined __lynx__
74 # if !#system(lynx) || !#system(unix)
75 #  error
76 # endif
77 #elif #system(lynx)
78 # error
79 #endif
80
81 #if defined __unix__
82 # if !#system(unix)
83 #  error
84 # endif
85 #elif #system(unix)
86 # error
87 #endif
88
89 #if defined __rtems__
90 # if !#system(rtems)
91 #  error
92 # endif
93 #elif #system(rtems)
94 # error
95 #endif
96
97 #if defined __vms__
98 # if !#system(vms)
99 #  error
100 # endif
101 #elif #system(vms)
102 # error
103 #endif
104
105 #if defined __mvs__
106 # if !#system(mvs)
107 #  error
108 # endif
109 #elif #system(mvs)
110 # error
111 #endif
112
113 #if defined __MSDOS__
114 # if !#system(msdos)
115 #  error
116 # endif
117 #elif #system(msdos)
118 # error
119 #endif
120
121 #if defined __WINNT__
122 # if !#system(winnt)
123 #  error
124 # endif
125 #elif #system(winnt)
126 # error
127 #endif
128
129 #if defined __BEOS__
130 # if !#system(beos)
131 #  error
132 # endif
133 #elif #system(beos)
134 # error
135 #endif
136
137 #if defined __netware__
138 # if !#system(netware)
139 #  error
140 # endif
141 #elif #system(netware)
142 # error
143 #endif
144
145
146 /* Check for #cpu and #machine assertions.  */
147
148 #if defined __arc__
149 # if !#cpu(arc) || !#machine(arc)
150 #  error
151 # endif
152 #elif #cpu(arc) || #machine(arc)
153 # error
154 #endif
155
156 #if defined __alpha__
157 # if !#cpu(alpha) || !#machine(alpha) \
158         || (defined __alpha_cix__ && !#cpu(cix)) \
159         || (!defined __alpha_cix__ && #cpu(cix)) \
160         || (defined __alpha_fix__ && !#cpu(fix)) \
161         || (!defined __alpha_fix__ && #cpu(fix)) \
162         || (defined __alpha_bwx__ && !#cpu(bwx)) \
163         || (!defined __alpha_bwx__ && #cpu(bwx)) \
164         || (defined __alpha_max__ && !#cpu(max)) \
165         || (!defined __alpha_max__ && #cpu(max)) \
166         || (defined __alpha_ev6__ && !#cpu(ev6)) \
167         || (!defined __alpha_ev6__ && #cpu(ev6)) \
168         || (defined __alpha_ev5__ && !#cpu(ev5)) \
169         || (!defined __alpha_ev5__ && #cpu(ev5)) \
170         || (defined __alpha_ev4__ && !#cpu(ev4)) \
171         || (!defined __alpha_ev4__ && #cpu(ev4))
172 #  error
173 # endif
174 #elif #cpu(alpha) || #machine(alpha) || #cpu(cix) || #cpu(fix) || #cpu(bwx) \
175         || #cpu(max) || #cpu(ev6) || #cpu(ev5) || #cpu(ev4)
176 # error
177 #endif
178
179 #if defined __arm__
180 # if !#cpu(arm) || !#machine(arm)
181 #  error
182 # endif
183 #elif #cpu(arm) || #machine(arm)
184 # error
185 #endif
186
187 #if defined __cris__
188 # if !#cpu(cris) || !#machine(cris)
189 #  error
190 # endif
191 #elif #cpu(cris) || #machine(cris)
192 # error
193 #endif
194
195 #if defined __fr30__
196 # if !#cpu(fr30) || !#machine(fr30)
197 #  error
198 # endif
199 #elif #cpu(fr30) || #machine(fr30)
200 # error
201 #endif
202
203 #if defined __frv__
204 # if !#cpu(frv) || !#machine(frv)
205 #  error
206 # endif
207 #elif #cpu(frv) || #machine(frv)
208 # error
209 #endif
210
211 #if defined __h8300__ 
212 # if !#cpu(h8300) || !#machine(h8300) \
213   || (defined __H8300__ && (!#cpu(h8300) || !#machine(h8300))) \
214   || (defined __H8300H__ && (!#cpu(h8300h) || !#machine(h8300h))) \
215   || (!defined __H8300H__ && (#cpu(h8300h) || #machine(h8300h))) \
216   || (defined __H8300S__ && (!#cpu(h8300s) || !#machine(h8300s))) \
217   || (!defined __H8300S__ && (#cpu(h8300s) || #machine(h8300s)))
218 #  error
219 # endif
220 #elif #cpu(h8300) || #machine(h8300) || #cpu(h8300h) || #machine(h8300h) || \
221   #cpu(h8300s) || #machine(h8300s)
222 # error
223 #endif
224
225 #if defined __hppa__
226 # if !#cpu(hppa) || !#machine(hppa)
227 #  error
228 # endif
229 #elif #cpu(hppa) || #machine(hppa)
230 # error
231 #endif
232
233 #if defined __i370__
234 # if !#cpu(i370) || !#machine(i370)
235 #  error
236 # endif
237 #elif #cpu(i370) || #machine(i370)
238 # error
239 #endif
240
241 #if defined __x86_64__
242 # if !#cpu(x86_64) || !#machine(x86_64)
243 #  error
244 # endif
245 #elif #cpu(x86_64) || #machine(x86_64)
246 # error
247 #endif
248
249 #if defined __i386__
250 # if !#cpu(i386) || !#machine(i386)
251 #  error
252 # endif
253 #elif #cpu(i386) || #machine(i386)
254 # error
255 #endif
256
257 #if defined __i860__
258 # if !#cpu(i860) || !#machine(i860)
259 #  error
260 # endif
261 #elif #cpu(i860) || #machine(i860)
262 # error
263 #endif
264
265 #if defined __ia64__
266 # if !#cpu(ia64) || !#machine(ia64)
267 #  error
268 # endif
269 #elif #cpu(ia64) || #machine(ia64)
270 # error
271 #endif
272
273 #if defined __iq2000__
274 # if !#cpu(iq2000) || !#machine(iq2000)
275 #  error
276 # endif
277 #elif #cpu(iq2000) || #machine(iq2000)
278 # error
279 #endif
280
281 #if defined __M32R__
282 # if !#cpu(m32r) || !#machine(m32r)
283 #  error
284 # endif
285 #elif #cpu(m32r) || #machine(m32r)
286 # error
287 #endif
288
289 #if defined __m68k__
290 # if !#cpu(m68k) || !#machine(m68k)
291 #  error
292 # endif
293 #elif #cpu(m68k) || #machine(m68k)
294 # error
295 #endif
296
297 #if defined __mcore__
298 # if !#cpu(mcore) || !#machine(mcore)
299 #  error
300 # endif
301 #elif #cpu(mcore) || #machine(mcore)
302 # error
303 #endif
304
305 #if defined __mips__
306 # if !#cpu(mips) || (defined __sgi__ && !#machine(sgi)) \
307   || (!defined __sgi__ && !#machine(mips))
308 #  error
309 # endif
310 #elif #cpu(mips) || #machine(sgi) || #machine(mips)
311 # error
312 #endif
313
314 #if defined __mmix__
315 # if !#cpu(mmix) || !#machine(mmix)
316 #  error
317 # endif
318 #elif #cpu(mmix) || #machine(mcore)
319 # error
320 #endif
321
322 #if defined __mn10300__
323 # if !#cpu(mn10300) || !#machine(mn10300)
324 #  error
325 # endif
326 #elif #cpu(mn10300) || #machine(mn10300)
327 # error
328 #endif
329
330 #if defined __ns32k__
331 # if !#cpu(ns32k) || !#machine(ns32k)
332 #  error
333 # endif
334 #elif #cpu(ns32k) || #machine(ns32k)
335 # error
336 #endif
337
338 #if defined __pdp11__
339 # if !#cpu(pdp11) || !#machine(pdp11)
340 #  error
341 # endif
342 #elif #cpu(pdp11) || #machine(pdp11)
343 # error
344 #endif
345
346 #if defined __powerpc__
347 # if defined __powerpc64__
348 #  if (#cpu(powerpc) || #machine(powerpc) \
349        || !#cpu(powerpc64) || !#machine(powerpc64))
350 #   error
351 # else
352 #  if (!#cpu(powerpc) || !#machine(powerpc) \
353        || #cpu(powerpc64) || #machine(powerpc64))
354 #   error
355 #  endif
356 # endif
357 #elif (#cpu(powerpc) || #machine(powerpc) \
358        || #cpu(powerpc64) || #machine(powerpc64))
359 # error
360 #endif
361
362 #if defined __rs6000__
363 # if !#cpu(rs6000) || !#machine(rs6000)
364 #  error
365 # endif
366 #elif #cpu(rs6000) || #machine(rs6000)
367 # error
368 #endif
369
370 #if defined __s390__
371 # if !#cpu(s390) || !#machine(s390)
372 #  error
373 # endif
374 #elif #cpu(s390) || #machine(s390)
375 # error
376 #endif
377
378 #if defined __sh__
379 # if !#cpu(sh) || !#machine(sh)
380 #  error
381 # endif
382 #elif #cpu(sh) || #machine(sh)
383 # error
384 #endif
385
386 #if defined __sparc__
387 # if (defined __arch64__ \
388       && (!#cpu(sparc64) || !#machine(sparc64) || #cpu(sparc) || #machine(sparc)))
389   || (!defined __arch64__ \
390       && (#cpu(sparc64) || #machine(sparc64) || !#cpu(sparc) || !#machine(sparc)))
391 #  error
392 # endif
393 #elif #cpu(sparc64) || #machine(sparc64) || #cpu(sparc) || #machine(sparc)
394 # error
395 #endif
396
397 #if defined __xstormy16__
398 # if !#cpu(xstormy16) || !#machine(xstormy16)
399 #  error
400 # endif
401 #elif #cpu(xstormy16) || #machine(xstormy16)
402 # error
403 #endif
404
405 #if defined __v850__
406 # if !#cpu(v850) || !#machine(v850)
407 #  error
408 # endif
409 #elif #cpu(v850) || #machine(v850)
410 # error
411 #endif
412
413 #if defined __vax__
414 # if !#cpu(vax) || !#machine(vax)
415 #  error
416 # endif
417 #elif #cpu(vax) || #machine(vax)
418 # error
419 #endif
420
421 #if defined __XTENSA__
422 # if !#cpu(xtensa) || !#machine(xtensa)
423 #  error
424 # endif
425 #elif #cpu(xtensa) || #machine(xtensa)
426 # error
427 #endif
428