1 /* Copyright (C) 2003, 2006, 2008, 2009, 2011, 2012
2 Free Software Foundation, Inc.
4 Test builtin preprocessor assertions.
5 By Kaveh Ghazi <ghazi@caip.rutgers.edu>. */
7 /* { dg-do preprocess } */
8 /* { dg-options "-ansi -Wno-deprecated" } */
10 /* Check for #system assertions. */
13 # if !#system(linux) || !#system(unix) || !#system(posix)
20 #if defined __gnu_hurd__
21 # if !#system(gnu) || !#system(unix) || !#system(posix) || !#system(mach)
28 #if defined __FreeBSD__
29 # if !#system(FreeBSD) || !#system(unix) || !#system(bsd)
32 #elif #system(FreeBSD)
36 #if defined __NetBSD__
37 # if !#system(NetBSD) || !#system(unix) || !#system(bsd)
44 #if defined __OpenBSD__
45 # if !#system(OpenBSD) || !#system(unix) || !#system(bsd)
48 #elif #system(OpenBSD)
52 #if defined __svr4__ || defined __SYSTYPE_SVR4__
53 # if !#system(svr4) || !#system(unix)
61 # if !#system(hpux) || !#system(unix)
69 # if !#system(aix) || !#system(unix)
77 # if !#system(lynx) || !#system(unix)
84 #if ( defined __unix__ && !defined __CYGWIN__ ) || defined _AIX \
117 #if defined __MSDOS__
125 #if defined __WINNT__ || defined __CYGWIN__
134 /* Check for #cpu and #machine assertions. */
136 #if defined __alpha__
137 # if !#cpu(alpha) || !#machine(alpha) \
138 || (defined __alpha_cix__ && !#cpu(cix)) \
139 || (!defined __alpha_cix__ && #cpu(cix)) \
140 || (defined __alpha_fix__ && !#cpu(fix)) \
141 || (!defined __alpha_fix__ && #cpu(fix)) \
142 || (defined __alpha_bwx__ && !#cpu(bwx)) \
143 || (!defined __alpha_bwx__ && #cpu(bwx)) \
144 || (defined __alpha_max__ && !#cpu(max)) \
145 || (!defined __alpha_max__ && #cpu(max)) \
146 || (defined __alpha_ev6__ && !#cpu(ev6)) \
147 || (!defined __alpha_ev6__ && #cpu(ev6)) \
148 || (defined __alpha_ev5__ && !#cpu(ev5)) \
149 || (!defined __alpha_ev5__ && #cpu(ev5)) \
150 || (defined __alpha_ev4__ && !#cpu(ev4)) \
151 || (!defined __alpha_ev4__ && #cpu(ev4))
154 #elif #cpu(alpha) || #machine(alpha) || #cpu(cix) || #cpu(fix) || #cpu(bwx) \
155 || #cpu(max) || #cpu(ev6) || #cpu(ev5) || #cpu(ev4)
160 # if !#cpu(arm) || !#machine(arm)
163 #elif #cpu(arm) || #machine(arm)
168 # if !#cpu(cris) || !#machine(cris)
171 #elif #cpu(cris) || #machine(cris)
176 # if !#cpu(fr30) || !#machine(fr30)
179 #elif #cpu(fr30) || #machine(fr30)
184 # if !#cpu(frv) || !#machine(frv)
187 #elif #cpu(frv) || #machine(frv)
191 #if defined __H8300__
192 # if !#cpu(h8300) || !#machine(h8300) \
193 || (defined __H8300__ && (!#cpu(h8300) || !#machine(h8300))) \
194 || (defined __H8300H__ && (!#cpu(h8300h) || !#machine(h8300h))) \
195 || (!defined __H8300H__ && (#cpu(h8300h) || #machine(h8300h))) \
196 || (defined __H8300S__ && (!#cpu(h8300s) || !#machine(h8300s))) \
197 || (!defined __H8300S__ && (#cpu(h8300s) || #machine(h8300s)))
200 #elif #cpu(h8300) || #machine(h8300) || #cpu(h8300h) || #machine(h8300h) || \
201 #cpu(h8300s) || #machine(h8300s)
206 # if !#cpu(hppa) || !#machine(hppa)
209 #elif #cpu(hppa) || #machine(hppa)
214 # if !#cpu(i370) || !#machine(i370)
217 #elif #cpu(i370) || #machine(i370)
221 #if defined __x86_64__
222 # if !#cpu(x86_64) || !#machine(x86_64)
225 #elif #cpu(x86_64) || #machine(x86_64)
230 # if !#cpu(i386) || !#machine(i386)
233 #elif #cpu(i386) || #machine(i386)
238 # if !#cpu(ia64) || !#machine(ia64)
241 #elif #cpu(ia64) || #machine(ia64)
245 #if defined __iq2000__
246 # if !#cpu(iq2000) || !#machine(iq2000)
249 #elif #cpu(iq2000) || #machine(iq2000)
254 # if !#cpu(m32r) || !#machine(m32r)
257 #elif #cpu(m32r) || #machine(m32r)
262 # if !#cpu(m68k) || !#machine(m68k)
265 #elif #cpu(m68k) || #machine(m68k)
269 #if defined __mcore__
270 # if !#cpu(mcore) || !#machine(mcore)
273 #elif #cpu(mcore) || #machine(mcore)
281 #elif #cpu(mips) || #machine(mips)
285 #if defined __mn10300__
286 # if !#cpu(mn10300) || !#machine(mn10300)
289 #elif #cpu(mn10300) || #machine(mn10300)
293 #if defined __pdp11__
294 # if !#cpu(pdp11) || !#machine(pdp11)
297 #elif #cpu(pdp11) || #machine(pdp11)
301 #if defined __powerpc__ || defined __PPC__
302 # if defined __powerpc64__
303 # if (#cpu(powerpc) || #machine(powerpc) \
304 || !#cpu(powerpc64) || !#machine(powerpc64))
308 # if (!#cpu(powerpc) || !#machine(powerpc) \
309 || #cpu(powerpc64) || #machine(powerpc64))
313 #elif (#cpu(powerpc) || #machine(powerpc) \
314 || #cpu(powerpc64) || #machine(powerpc64))
318 #if defined __rs6000__
319 # if !#cpu(rs6000) || !#machine(rs6000)
322 #elif #cpu(rs6000) || #machine(rs6000)
327 # if !#cpu(s390) || !#machine(s390)
330 #elif #cpu(s390) || #machine(s390)
335 # if !#cpu(sh) || !#machine(sh)
338 #elif #cpu(sh) || #machine(sh)
342 #if defined __sparc__
343 # if (defined __arch64__ \
344 && (!#cpu(sparc64) || !#machine(sparc64) || #cpu(sparc) || #machine(sparc)))
345 || (!defined __arch64__ \
346 && (#cpu(sparc64) || #machine(sparc64) || !#cpu(sparc) || !#machine(sparc)))
349 #elif #cpu(sparc64) || #machine(sparc64) || #cpu(sparc) || #machine(sparc)
353 #if defined __xstormy16__
354 # if !#cpu(xstormy16) || !#machine(xstormy16)
357 #elif #cpu(xstormy16) || #machine(xstormy16)
362 # if !#cpu(v850) || !#machine(v850)
365 #elif #cpu(v850) || #machine(v850)
370 # if !#cpu(vax) || !#machine(vax)
373 #elif #cpu(vax) || #machine(vax)
377 #if defined __XTENSA__
378 # if !#cpu(xtensa) || !#machine(xtensa)
381 #elif #cpu(xtensa) || #machine(xtensa)