1 /* Copyright (C) 2003 Free Software Foundation, Inc.
2 Test builtin preprocessor assertions.
3 By Kaveh Ghazi <ghazi@caip.rutgers.edu>. */
5 /* { dg-do preprocess } */
7 /* Check for #system assertions. */
9 #if defined __gnu_linux__
10 # if !#system(linux) || !#system(unix) || !#system(posix)
17 #if defined __gnu_hurd__
18 # if !#system(gnu) || !#system(unix) || !#system(posix) || !#system(mach)
25 #if defined __FreeBSD__
26 # if !#system(FreeBSD) || !#system(unix) || !#system(bsd)
29 #elif #system(FreeBSD)
33 #if defined __NetBSD__
34 # if !#system(NetBSD) || !#system(unix) || !#system(bsd)
41 #if defined __OpenBSD__
42 # if !#system(OpenBSD) || !#system(unix) || !#system(bsd)
45 #elif #system(OpenBSD)
49 #if defined __svr4__ || defined __SYSTYPE_SVR4__
50 # if !#system(svr4) || !#system(unix)
58 # if !#system(hpux) || !#system(unix)
66 # if !#system(aix) || !#system(unix)
74 # if !#system(lynx) || !#system(unix)
81 #if ( defined __unix__ && !defined __CYGWIN__ ) || defined _AIX
113 #if defined __MSDOS__
121 #if defined __WINNT__ || defined __CYGWIN__
137 #if defined __netware__
138 # if !#system(netware)
141 #elif #system(netware)
146 /* Check for #cpu and #machine assertions. */
149 # if !#cpu(arc) || !#machine(arc)
152 #elif #cpu(arc) || #machine(arc)
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))
174 #elif #cpu(alpha) || #machine(alpha) || #cpu(cix) || #cpu(fix) || #cpu(bwx) \
175 || #cpu(max) || #cpu(ev6) || #cpu(ev5) || #cpu(ev4)
180 # if !#cpu(arm) || !#machine(arm)
183 #elif #cpu(arm) || #machine(arm)
188 # if !#cpu(cris) || !#machine(cris)
191 #elif #cpu(cris) || #machine(cris)
196 # if !#cpu(fr30) || !#machine(fr30)
199 #elif #cpu(fr30) || #machine(fr30)
204 # if !#cpu(frv) || !#machine(frv)
207 #elif #cpu(frv) || #machine(frv)
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)))
220 #elif #cpu(h8300) || #machine(h8300) || #cpu(h8300h) || #machine(h8300h) || \
221 #cpu(h8300s) || #machine(h8300s)
226 # if !#cpu(hppa) || !#machine(hppa)
229 #elif #cpu(hppa) || #machine(hppa)
234 # if !#cpu(i370) || !#machine(i370)
237 #elif #cpu(i370) || #machine(i370)
241 #if defined __x86_64__
242 # if !#cpu(x86_64) || !#machine(x86_64)
245 #elif #cpu(x86_64) || #machine(x86_64)
250 # if !#cpu(i386) || !#machine(i386)
253 #elif #cpu(i386) || #machine(i386)
258 # if !#cpu(ia64) || !#machine(ia64)
261 #elif #cpu(ia64) || #machine(ia64)
265 #if defined __iq2000__
266 # if !#cpu(iq2000) || !#machine(iq2000)
269 #elif #cpu(iq2000) || #machine(iq2000)
274 # if !#cpu(m32r) || !#machine(m32r)
277 #elif #cpu(m32r) || #machine(m32r)
282 # if !#cpu(m68k) || !#machine(m68k)
285 #elif #cpu(m68k) || #machine(m68k)
289 #if defined __mcore__
290 # if !#cpu(mcore) || !#machine(mcore)
293 #elif #cpu(mcore) || #machine(mcore)
298 # if !#cpu(mips) || (defined __sgi__ && !#machine(sgi)) \
299 || (!defined __sgi__ && !#machine(mips))
302 #elif #cpu(mips) || #machine(sgi) || #machine(mips)
306 #if defined __mn10300__
307 # if !#cpu(mn10300) || !#machine(mn10300)
310 #elif #cpu(mn10300) || #machine(mn10300)
314 #if defined __pdp11__
315 # if !#cpu(pdp11) || !#machine(pdp11)
318 #elif #cpu(pdp11) || #machine(pdp11)
322 #if defined __powerpc__
323 # if defined __powerpc64__
324 # if (#cpu(powerpc) || #machine(powerpc) \
325 || !#cpu(powerpc64) || !#machine(powerpc64))
329 # if (!#cpu(powerpc) || !#machine(powerpc) \
330 || #cpu(powerpc64) || #machine(powerpc64))
334 #elif (#cpu(powerpc) || #machine(powerpc) \
335 || #cpu(powerpc64) || #machine(powerpc64))
339 #if defined __rs6000__
340 # if !#cpu(rs6000) || !#machine(rs6000)
343 #elif #cpu(rs6000) || #machine(rs6000)
348 # if !#cpu(s390) || !#machine(s390)
351 #elif #cpu(s390) || #machine(s390)
356 # if !#cpu(sh) || !#machine(sh)
359 #elif #cpu(sh) || #machine(sh)
363 #if defined __sparc__
364 # if (defined __arch64__ \
365 && (!#cpu(sparc64) || !#machine(sparc64) || #cpu(sparc) || #machine(sparc)))
366 || (!defined __arch64__ \
367 && (#cpu(sparc64) || #machine(sparc64) || !#cpu(sparc) || !#machine(sparc)))
370 #elif #cpu(sparc64) || #machine(sparc64) || #cpu(sparc) || #machine(sparc)
374 #if defined __xstormy16__
375 # if !#cpu(xstormy16) || !#machine(xstormy16)
378 #elif #cpu(xstormy16) || #machine(xstormy16)
383 # if !#cpu(v850) || !#machine(v850)
386 #elif #cpu(v850) || #machine(v850)
391 # if !#cpu(vax) || !#machine(vax)
394 #elif #cpu(vax) || #machine(vax)
398 #if defined __XTENSA__
399 # if !#cpu(xtensa) || !#machine(xtensa)
402 #elif #cpu(xtensa) || #machine(xtensa)