summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gcc.dg/cpp/assert4.c
blob: c43ba2fae9633a438f7b2af8b84a042073ee3559 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
/* Copyright (C) 2003, 2006, 2008 Free Software Foundation, Inc.
   Test builtin preprocessor assertions.
   By Kaveh Ghazi <ghazi@caip.rutgers.edu>.  */

/* { dg-do preprocess } */
/* { dg-options "-ansi -Wno-deprecated" } */

/* Check for #system assertions.  */

#if defined __gnu_linux__
# if !#system(linux) || !#system(unix) || !#system(posix)
#  error
# endif
#elif #system(linux)
# error
#endif

#if defined __gnu_hurd__
# if !#system(gnu) || !#system(unix) || !#system(posix) || !#system(mach)
#  error
# endif
#elif #system(gnu)
# error
#endif

#if defined __FreeBSD__
# if !#system(FreeBSD) || !#system(unix) || !#system(bsd)
#  error
# endif
#elif #system(FreeBSD)
# error
#endif

#if defined __NetBSD__
# if !#system(NetBSD) || !#system(unix) || !#system(bsd)
#  error
# endif
#elif #system(NetBSD)
# error
#endif

#if defined __OpenBSD__
# if !#system(OpenBSD) || !#system(unix) || !#system(bsd)
#  error
# endif
#elif #system(OpenBSD)
# error
#endif

#if defined __svr4__ || defined __SYSTYPE_SVR4__
# if !#system(svr4) || !#system(unix)
#  error
# endif
#elif #system(svr4)
# error
#endif

#if defined __hpux__
# if !#system(hpux) || !#system(unix)
#  error
# endif
#elif #system(hpux)
# error
#endif

#if defined _AIX
# if !#system(aix) || !#system(unix)
#  error
# endif
#elif #system(aix)
# error
#endif

#if defined __lynx__
# if !#system(lynx) || !#system(unix)
#  error
# endif
#elif #system(lynx)
# error
#endif

#if ( defined __unix__ && !defined __CYGWIN__ ) || defined _AIX \
    || defined __vxworks
# if !#system(unix)
#  error
# endif
#elif #system(unix)
# error
#endif

#if defined __rtems__
# if !#system(rtems)
#  error
# endif
#elif #system(rtems)
# error
#endif

#if defined __vms__
# if !#system(vms)
#  error
# endif
#elif #system(vms)
# error
#endif

#if defined __mvs__
# if !#system(mvs)
#  error
# endif
#elif #system(mvs)
# error
#endif

#if defined __MSDOS__
# if !#system(msdos)
#  error
# endif
#elif #system(msdos)
# error
#endif

#if defined __WINNT__ || defined __CYGWIN__
# if !#system(winnt)
#  error
# endif
#elif #system(winnt)
# error
#endif

#if defined __BEOS__
# if !#system(beos)
#  error
# endif
#elif #system(beos)
# error
#endif

#if defined __netware__
# if !#system(netware)
#  error
# endif
#elif #system(netware)
# error
#endif


/* Check for #cpu and #machine assertions.  */

#if defined __arc__
# if !#cpu(arc) || !#machine(arc)
#  error
# endif
#elif #cpu(arc) || #machine(arc)
# error
#endif

#if defined __alpha__
# if !#cpu(alpha) || !#machine(alpha) \
	|| (defined __alpha_cix__ && !#cpu(cix)) \
	|| (!defined __alpha_cix__ && #cpu(cix)) \
	|| (defined __alpha_fix__ && !#cpu(fix)) \
	|| (!defined __alpha_fix__ && #cpu(fix)) \
	|| (defined __alpha_bwx__ && !#cpu(bwx)) \
	|| (!defined __alpha_bwx__ && #cpu(bwx)) \
	|| (defined __alpha_max__ && !#cpu(max)) \
	|| (!defined __alpha_max__ && #cpu(max)) \
	|| (defined __alpha_ev6__ && !#cpu(ev6)) \
	|| (!defined __alpha_ev6__ && #cpu(ev6)) \
	|| (defined __alpha_ev5__ && !#cpu(ev5)) \
	|| (!defined __alpha_ev5__ && #cpu(ev5)) \
	|| (defined __alpha_ev4__ && !#cpu(ev4)) \
	|| (!defined __alpha_ev4__ && #cpu(ev4))
#  error
# endif
#elif #cpu(alpha) || #machine(alpha) || #cpu(cix) || #cpu(fix) || #cpu(bwx) \
	|| #cpu(max) || #cpu(ev6) || #cpu(ev5) || #cpu(ev4)
# error
#endif

#if defined __arm__
# if !#cpu(arm) || !#machine(arm)
#  error
# endif
#elif #cpu(arm) || #machine(arm)
# error
#endif

#if defined __cris__
# if !#cpu(cris) || !#machine(cris)
#  error
# endif
#elif #cpu(cris) || #machine(cris)
# error
#endif

#if defined __fr30__
# if !#cpu(fr30) || !#machine(fr30)
#  error
# endif
#elif #cpu(fr30) || #machine(fr30)
# error
#endif

#if defined __frv__
# if !#cpu(frv) || !#machine(frv)
#  error
# endif
#elif #cpu(frv) || #machine(frv)
# error
#endif

#if defined __H8300__ 
# if !#cpu(h8300) || !#machine(h8300) \
  || (defined __H8300__ && (!#cpu(h8300) || !#machine(h8300))) \
  || (defined __H8300H__ && (!#cpu(h8300h) || !#machine(h8300h))) \
  || (!defined __H8300H__ && (#cpu(h8300h) || #machine(h8300h))) \
  || (defined __H8300S__ && (!#cpu(h8300s) || !#machine(h8300s))) \
  || (!defined __H8300S__ && (#cpu(h8300s) || #machine(h8300s)))
#  error
# endif
#elif #cpu(h8300) || #machine(h8300) || #cpu(h8300h) || #machine(h8300h) || \
  #cpu(h8300s) || #machine(h8300s)
# error
#endif

#if defined __hppa__
# if !#cpu(hppa) || !#machine(hppa)
#  error
# endif
#elif #cpu(hppa) || #machine(hppa)
# error
#endif

#if defined __i370__
# if !#cpu(i370) || !#machine(i370)
#  error
# endif
#elif #cpu(i370) || #machine(i370)
# error
#endif

#if defined __x86_64__
# if !#cpu(x86_64) || !#machine(x86_64)
#  error
# endif
#elif #cpu(x86_64) || #machine(x86_64)
# error
#endif

#if defined __i386__
# if !#cpu(i386) || !#machine(i386)
#  error
# endif
#elif #cpu(i386) || #machine(i386)
# error
#endif

#if defined __ia64__
# if !#cpu(ia64) || !#machine(ia64)
#  error
# endif
#elif #cpu(ia64) || #machine(ia64)
# error
#endif

#if defined __iq2000__
# if !#cpu(iq2000) || !#machine(iq2000)
#  error
# endif
#elif #cpu(iq2000) || #machine(iq2000)
# error
#endif

#if defined __M32R__
# if !#cpu(m32r) || !#machine(m32r)
#  error
# endif
#elif #cpu(m32r) || #machine(m32r)
# error
#endif

#if defined __m68k__
# if !#cpu(m68k) || !#machine(m68k)
#  error
# endif
#elif #cpu(m68k) || #machine(m68k)
# error
#endif

#if defined __mcore__
# if !#cpu(mcore) || !#machine(mcore)
#  error
# endif
#elif #cpu(mcore) || #machine(mcore)
# error
#endif

#if defined __mips__
# if !#cpu(mips) || (defined __sgi__ && !#machine(sgi)) \
  || (!defined __sgi__ && !#machine(mips))
#  error
# endif
#elif #cpu(mips) || #machine(sgi) || #machine(mips)
# error
#endif

#if defined __mn10300__
# if !#cpu(mn10300) || !#machine(mn10300)
#  error
# endif
#elif #cpu(mn10300) || #machine(mn10300)
# error
#endif

#if defined __pdp11__
# if !#cpu(pdp11) || !#machine(pdp11)
#  error
# endif
#elif #cpu(pdp11) || #machine(pdp11)
# error
#endif

#if defined __powerpc__
# if defined __powerpc64__
#  if (#cpu(powerpc) || #machine(powerpc) \
       || !#cpu(powerpc64) || !#machine(powerpc64))
#   error
#  endif
# else
#  if (!#cpu(powerpc) || !#machine(powerpc) \
       || #cpu(powerpc64) || #machine(powerpc64))
#   error
#  endif
# endif
#elif (#cpu(powerpc) || #machine(powerpc) \
       || #cpu(powerpc64) || #machine(powerpc64))
# error
#endif

#if defined __rs6000__
# if !#cpu(rs6000) || !#machine(rs6000)
#  error
# endif
#elif #cpu(rs6000) || #machine(rs6000)
# error
#endif

#if defined __s390__
# if !#cpu(s390) || !#machine(s390)
#  error
# endif
#elif #cpu(s390) || #machine(s390)
# error
#endif

#if defined __sh__
# if !#cpu(sh) || !#machine(sh)
#  error
# endif
#elif #cpu(sh) || #machine(sh)
# error
#endif

#if defined __sparc__
# if (defined __arch64__ \
      && (!#cpu(sparc64) || !#machine(sparc64) || #cpu(sparc) || #machine(sparc)))
  || (!defined __arch64__ \
      && (#cpu(sparc64) || #machine(sparc64) || !#cpu(sparc) || !#machine(sparc)))
#  error
# endif
#elif #cpu(sparc64) || #machine(sparc64) || #cpu(sparc) || #machine(sparc)
# error
#endif

#if defined __xstormy16__
# if !#cpu(xstormy16) || !#machine(xstormy16)
#  error
# endif
#elif #cpu(xstormy16) || #machine(xstormy16)
# error
#endif

#if defined __v850__
# if !#cpu(v850) || !#machine(v850)
#  error
# endif
#elif #cpu(v850) || #machine(v850)
# error
#endif

#if defined __vax__
# if !#cpu(vax) || !#machine(vax)
#  error
# endif
#elif #cpu(vax) || #machine(vax)
# error
#endif

#if defined __XTENSA__
# if !#cpu(xtensa) || !#machine(xtensa)
#  error
# endif
#elif #cpu(xtensa) || #machine(xtensa)
# error
#endif

OpenPOWER on IntegriCloud