OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [compat/] [struct-layout-1.h] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
#include <limits.h>
2
#include <stdarg.h>
3
#include <stdbool.h>
4
#include <stdlib.h>
5
#include <stdio.h>
6
#include <string.h>
7
#include "../../gcc.dg/compat/compat-common.h"
8
 
9
#ifndef SKIP_ATTRIBUTE
10
# include "../../gcc.dg/compat/vector-defs.h"
11
#else
12
typedef int qi;
13
typedef int hi;
14
typedef int si;
15
typedef int di;
16
typedef float sf;
17
typedef float df;
18
typedef int v8qi;
19
typedef int v16qi;
20
typedef int v2hi;
21
typedef int v4hi;
22
typedef int v8hi;
23
typedef int v2si;
24
typedef int v4si;
25
typedef int v1di;
26
typedef int v2di;
27
typedef int v2sf;
28
typedef int v4sf;
29
typedef int v16sf;
30
typedef int v2df;
31
typedef int u8qi;
32
typedef int u16qi;
33
typedef int u2hi;
34
typedef int u4hi;
35
typedef int u8hi;
36
typedef int u2si;
37
typedef int u4si;
38
typedef int u1di;
39
typedef int u2di;
40
typedef int u2sf;
41
typedef int u4sf;
42
typedef int u16sf;
43
typedef int u2df;
44
#endif
45
#if (defined __i386__ || defined __x86_64__) && !defined SKIP_ATTRIBUTE
46
# ifdef __MMX__
47
#  include <mmintrin.h>
48
# else
49
typedef int __m64;
50
# endif
51
# ifdef __SSE__
52
#  include <xmmintrin.h>
53
# else
54
typedef int __m128;
55
# endif
56
#else
57
typedef int __m64;
58
typedef int __m128;
59
#endif
60
 
61
#define FLDS_MAX        32
62
extern struct Info
63
{
64
  int nfields, nbitfields;
65
  void *sp, *a0p, *a3p;
66
  void *flds[FLDS_MAX];
67
  size_t sz, sizes[FLDS_MAX];
68
  size_t als, ala0, ala3, aligns[FLDS_MAX];
69
} info;
70
 
71
extern int intarray[256];
72
extern int fn0 (void), fn1 (void), fn2 (void), fn3 (void), fn4 (void);
73
extern int fn5 (void), fn6 (void), fn7 (void), fn8 (void), fn9 (void);
74
 
75
#ifdef DBG
76
#define FAIL(n, m) printf ("fail %d.%d\n", n, m), ++fails
77
#else
78
#define FAIL(n, m) ++fails
79
#endif
80
 
81
#ifdef SKIP_ATTRIBUTE
82
# define __attribute__(x)
83
#endif
84
#define atal            __attribute__((aligned))
85
#define atpa            __attribute__((packed))
86
#define atalpa          __attribute__((aligned, packed))
87
#define atpaal          __attribute__((packed, aligned))
88
#define atal1           __attribute__((aligned (1)))
89
#define atal2           __attribute__((aligned (2)))
90
#define atal4           __attribute__((aligned (4)))
91
#define atal8           __attribute__((aligned (8)))
92
#define atal16          __attribute__((aligned (16)))
93
#define atal1pa         __attribute__((aligned (1), packed))
94
#define atal2pa         __attribute__((aligned (2), packed))
95
#define atal4pa         __attribute__((aligned (4), packed))
96
#define atal8pa         __attribute__((aligned (8), packed))
97
#define atal16pa        __attribute__((aligned (16), packed))
98
#define atpaal1         __attribute__((packed, aligned (1)))
99
#define atpaal2         __attribute__((packed, aligned (2)))
100
#define atpaal4         __attribute__((packed, aligned (4)))
101
#define atpaal8         __attribute__((packed, aligned (8)))
102
#define atpaal16        __attribute__((packed, aligned (16)))
103
 
104
#if UCHAR_MAX == 255 && USHORT_MAX == 65535 && UINT_MAX == 4294967295U \
105
    && ULLONG_MAX == 18446744073709551615ULL
106
/* For ILP32 and LP64 targets, assume float is at least 32-bit
107
   and double plus long double at least 64-bit.  */
108
# define atalx1         atal1
109
# define atalx2         atal2
110
# define atalx4         atal4
111
# define atalx8         atal8
112
# define atalx16        atal16
113
# define atalx1pa       atal1pa
114
# define atalx2pa       atal2pa
115
# define atalx4pa       atal4pa
116
# define atalx8pa       atal8pa
117
# define atalx16pa      atal16pa
118
# define atpaalx1       atpaal1
119
# define atpaalx2       atpaal2
120
# define atpaalx4       atpaal4
121
# define atpaalx8       atpaal8
122
# define atpaalx16      atpaal16
123
# if ULONG_MAX > 4294967295UL
124
#  define ataly8        atal8
125
#  define ataly8pa      atal8pa
126
#  define atpaaly8      atpaal8
127
#  define ataly16       atal16
128
#  define ataly16pa     atal16pa
129
#  define atpaaly16     atpaal16
130
# else
131
#  define ataly8
132
#  define ataly8pa
133
#  define atpaaly8
134
#  define ataly16
135
#  define ataly16pa
136
#  define atpaaly16
137
# endif
138
#else
139
# define atalx1
140
# define atalx2
141
# define atalx4
142
# define atalx8
143
# define atalx16
144
# define atalx1pa
145
# define atalx2pa
146
# define atalx4pa
147
# define atalx8pa
148
# define atalx16pa
149
# define atpaalx1
150
# define atpaalx2
151
# define atpaalx4
152
# define atpaalx8
153
# define atpaalx16
154
# define ataly8
155
# define ataly8pa
156
# define atpaaly8
157
# define ataly16
158
# define ataly16pa
159
# define atpaaly16
160
#endif
161
 
162
#define atQI            __attribute__((mode (QI)))
163
#define atHI            __attribute__((mode (HI)))
164
#define atSI            __attribute__((mode (SI)))
165
#define atDI            __attribute__((mode (DI)))
166
 
167
enum E0 { e0_0 };
168
enum E1 { e1_0, e1_1 };
169
enum E2 { e2_m3 = -3, e2_m2, e2_m1, e2_0, e2_1, e2_2, e2_3 };
170
enum E3 { e3_m127 = -127, e3_m126, e3_m125, e3_0 = 0, e3_125 = 125, e3_126, e3_127 };
171
enum E4 { e4_0, e4_1, e4_2, e4_3, e4_253 = 253, e4_254, e4_255 };
172
enum E5 { e5_m32767 = -32767, e5_m32766, e5_m32765, e5_0 = 0, e5_32765 = 32765, e5_32766, e5_32767 };
173
enum E6 { e6_0, e6_1, e6_2, e6_3, e6_65533 = 65533, e6_65534, e6_65535 };
174
enum E7 { e7_m2147483647 = -2147483647, e7_m2147483646, e7_m2147483645,
175
          e7_0, e7_2147483645 = 2147483645, e7_2147483646, e7_2147483647 };
176
enum E8 { e8_0, e8_1, e8_2, e8_3, e8_4294967293 = 4294967293U, e8_4294967294, e8_4294967295 };
177
enum E9 { e9_m1099511627775 = -1099511627775LL, e9_m1099511627774, e9_m1099511627773,
178
          e9_0, e9_1099511627773 = 1099511627773LL, e9_1099511627774, e9_1099511627775 };
179
 
180
typedef char Tchar;
181
typedef signed char Tschar;
182
typedef unsigned char Tuchar;
183
typedef short int Tshort;
184
typedef unsigned short int Tushort;
185
typedef int Tint;
186
typedef unsigned int Tuint;
187
typedef long int Tlong;
188
typedef unsigned long int Tulong;
189
typedef long long int Tllong;
190
typedef unsigned long long int Tullong;
191
typedef float Tfloat;
192
typedef double Tdouble;
193
typedef long double Tldouble;
194
typedef _Complex float Tcfloat;
195
typedef _Complex double Tcdouble;
196
typedef _Complex long double Tcldouble;
197
typedef bool Tbool;
198
typedef enum E0 TE0;
199
typedef enum E1 TE1;
200
typedef enum E2 TE2;
201
typedef enum E3 TE3;
202
typedef enum E4 TE4;
203
typedef enum E5 TE5;
204
typedef enum E6 TE6;
205
typedef enum E7 TE7;
206
typedef enum E8 TE8;
207
typedef enum E9 TE9;
208
typedef void *Tptr;
209
typedef char *Tcptr;
210
typedef int *Tiptr;
211
typedef char Talchar atal;
212
typedef signed char Talschar atal;
213
typedef unsigned char Taluchar atal;
214
typedef short int Talshort atal;
215
typedef unsigned short int Talushort atal;
216
typedef int Talint atal;
217
typedef unsigned int Taluint atal;
218
typedef long int Tallong atal;
219
typedef unsigned long int Talulong atal;
220
typedef long long int Talllong atal;
221
typedef unsigned long long int Talullong atal;
222
typedef float Talfloat atal;
223
typedef double Taldouble atal;
224
typedef long double Talldouble atal;
225
typedef _Complex float Talcfloat atal;
226
typedef _Complex double Talcdouble atal;
227
typedef _Complex long double Talcldouble atal;
228
typedef bool Talbool atal;
229
typedef enum E0 TalE0 atal;
230
typedef enum E1 TalE1 atal;
231
typedef enum E2 TalE2 atal;
232
typedef enum E3 TalE3 atal;
233
typedef enum E4 TalE4 atal;
234
typedef enum E5 TalE5 atal;
235
typedef enum E6 TalE6 atal;
236
typedef enum E7 TalE7 atal;
237
typedef enum E8 TalE8 atal;
238
typedef enum E9 TalE9 atal;
239
typedef void *Talptr atal;
240
typedef char *Talcptr atal;
241
typedef int *Taliptr atal;
242
typedef char Tal1char atal1;
243
typedef signed char Tal1schar atal1;
244
typedef unsigned char Tal1uchar atal1;
245
typedef short int Tal1short atal1;
246
typedef unsigned short int Tal1ushort atal1;
247
typedef int Tal1int atal1;
248
typedef unsigned int Tal1uint atal1;
249
typedef long int Tal1long atal1;
250
typedef unsigned long int Tal1ulong atal1;
251
typedef long long int Tal1llong atal1;
252
typedef unsigned long long int Tal1ullong atal1;
253
typedef float Tal1float atal1;
254
typedef double Tal1double atal1;
255
typedef long double Tal1ldouble atal1;
256
typedef _Complex float Tal1cfloat atal1;
257
typedef _Complex double Tal1cdouble atal1;
258
typedef _Complex long double Tal1cldouble atal1;
259
typedef bool Tal1bool atal1;
260
typedef enum E0 Tal1E0 atal1;
261
typedef enum E1 Tal1E1 atal1;
262
typedef enum E2 Tal1E2 atal1;
263
typedef enum E3 Tal1E3 atal1;
264
typedef enum E4 Tal1E4 atal1;
265
typedef enum E5 Tal1E5 atal1;
266
typedef enum E6 Tal1E6 atal1;
267
typedef enum E7 Tal1E7 atal1;
268
typedef enum E8 Tal1E8 atal1;
269
typedef enum E9 Tal1E9 atal1;
270
typedef void *Tal1ptr atal1;
271
typedef char *Tal1cptr atal1;
272
typedef int *Tal1iptr atal1;
273
typedef char Tal2char atal2;
274
typedef signed char Tal2schar atal2;
275
typedef unsigned char Tal2uchar atal2;
276
typedef short int Tal2short atal2;
277
typedef unsigned short int Tal2ushort atal2;
278
typedef int Tal2int atal2;
279
typedef unsigned int Tal2uint atal2;
280
typedef long int Tal2long atal2;
281
typedef unsigned long int Tal2ulong atal2;
282
typedef long long int Tal2llong atal2;
283
typedef unsigned long long int Tal2ullong atal2;
284
typedef float Tal2float atal2;
285
typedef double Tal2double atal2;
286
typedef long double Tal2ldouble atal2;
287
typedef _Complex float Tal2cfloat atal2;
288
typedef _Complex double Tal2cdouble atal2;
289
typedef _Complex long double Tal2cldouble atal2;
290
typedef bool Tal2bool atal2;
291
typedef enum E0 Tal2E0 atal2;
292
typedef enum E1 Tal2E1 atal2;
293
typedef enum E2 Tal2E2 atal2;
294
typedef enum E3 Tal2E3 atal2;
295
typedef enum E4 Tal2E4 atal2;
296
typedef enum E5 Tal2E5 atal2;
297
typedef enum E6 Tal2E6 atal2;
298
typedef enum E7 Tal2E7 atal2;
299
typedef enum E8 Tal2E8 atal2;
300
typedef enum E9 Tal2E9 atal2;
301
typedef void *Tal2ptr atal2;
302
typedef char *Tal2cptr atal2;
303
typedef int *Tal2iptr atal2;
304
typedef char Tal4char atal4;
305
typedef signed char Tal4schar atal4;
306
typedef unsigned char Tal4uchar atal4;
307
typedef short int Tal4short atal4;
308
typedef unsigned short int Tal4ushort atal4;
309
typedef int Tal4int atal4;
310
typedef unsigned int Tal4uint atal4;
311
typedef long int Tal4long atal4;
312
typedef unsigned long int Tal4ulong atal4;
313
typedef long long int Tal4llong atal4;
314
typedef unsigned long long int Tal4ullong atal4;
315
typedef float Tal4float atal4;
316
typedef double Tal4double atal4;
317
typedef long double Tal4ldouble atal4;
318
typedef _Complex float Tal4cfloat atal4;
319
typedef _Complex double Tal4cdouble atal4;
320
typedef _Complex long double Tal4cldouble atal4;
321
typedef bool Tal4bool atal4;
322
typedef enum E0 Tal4E0 atal4;
323
typedef enum E1 Tal4E1 atal4;
324
typedef enum E2 Tal4E2 atal4;
325
typedef enum E3 Tal4E3 atal4;
326
typedef enum E4 Tal4E4 atal4;
327
typedef enum E5 Tal4E5 atal4;
328
typedef enum E6 Tal4E6 atal4;
329
typedef enum E7 Tal4E7 atal4;
330
typedef enum E8 Tal4E8 atal4;
331
typedef enum E9 Tal4E9 atal4;
332
typedef void *Tal4ptr atal4;
333
typedef char *Tal4cptr atal4;
334
typedef int *Tal4iptr atal4;
335
typedef char Tal8char atal8;
336
typedef signed char Tal8schar atal8;
337
typedef unsigned char Tal8uchar atal8;
338
typedef short int Tal8short atal8;
339
typedef unsigned short int Tal8ushort atal8;
340
typedef int Tal8int atal8;
341
typedef unsigned int Tal8uint atal8;
342
typedef long int Tal8long atal8;
343
typedef unsigned long int Tal8ulong atal8;
344
typedef long long int Tal8llong atal8;
345
typedef unsigned long long int Tal8ullong atal8;
346
typedef float Tal8float atal8;
347
typedef double Tal8double atal8;
348
typedef long double Tal8ldouble atal8;
349
typedef _Complex float Tal8cfloat atal8;
350
typedef _Complex double Tal8cdouble atal8;
351
typedef _Complex long double Tal8cldouble atal8;
352
typedef bool Tal8bool atal8;
353
typedef enum E0 Tal8E0 atal8;
354
typedef enum E1 Tal8E1 atal8;
355
typedef enum E2 Tal8E2 atal8;
356
typedef enum E3 Tal8E3 atal8;
357
typedef enum E4 Tal8E4 atal8;
358
typedef enum E5 Tal8E5 atal8;
359
typedef enum E6 Tal8E6 atal8;
360
typedef enum E7 Tal8E7 atal8;
361
typedef enum E8 Tal8E8 atal8;
362
typedef enum E9 Tal8E9 atal8;
363
typedef void *Tal8ptr atal8;
364
typedef char *Tal8cptr atal8;
365
typedef int *Tal8iptr atal8;
366
typedef char Tal16char atal16;
367
typedef signed char Tal16schar atal16;
368
typedef unsigned char Tal16uchar atal16;
369
typedef short int Tal16short atal16;
370
typedef unsigned short int Tal16ushort atal16;
371
typedef int Tal16int atal16;
372
typedef unsigned int Tal16uint atal16;
373
typedef long int Tal16long atal16;
374
typedef unsigned long int Tal16ulong atal16;
375
typedef long long int Tal16llong atal16;
376
typedef unsigned long long int Tal16ullong atal16;
377
typedef float Tal16float atal16;
378
typedef double Tal16double atal16;
379
typedef long double Tal16ldouble atal16;
380
typedef _Complex float Tal16cfloat atal16;
381
typedef _Complex double Tal16cdouble atal16;
382
typedef _Complex long double Tal16cldouble atal16;
383
typedef bool Tal16bool atal16;
384
typedef enum E0 Tal16E0 atal16;
385
typedef enum E1 Tal16E1 atal16;
386
typedef enum E2 Tal16E2 atal16;
387
typedef enum E3 Tal16E3 atal16;
388
typedef enum E4 Tal16E4 atal16;
389
typedef enum E5 Tal16E5 atal16;
390
typedef enum E6 Tal16E6 atal16;
391
typedef enum E7 Tal16E7 atal16;
392
typedef enum E8 Tal16E8 atal16;
393
typedef enum E9 Tal16E9 atal16;
394
typedef void *Tal16ptr atal16;
395
typedef char *Tal16cptr atal16;
396
typedef int *Tal16iptr atal16;
397
typedef char Talx1char atalx1;
398
typedef signed char Talx1schar atalx1;
399
typedef unsigned char Talx1uchar atalx1;
400
typedef short int Talx1short atalx1;
401
typedef unsigned short int Talx1ushort atalx1;
402
typedef int Talx1int atalx1;
403
typedef unsigned int Talx1uint atalx1;
404
typedef long int Talx1long atalx1;
405
typedef unsigned long int Talx1ulong atalx1;
406
typedef long long int Talx1llong atalx1;
407
typedef unsigned long long int Talx1ullong atalx1;
408
typedef float Talx1float atalx1;
409
typedef double Talx1double atalx1;
410
typedef long double Talx1ldouble atalx1;
411
typedef _Complex float Talx1cfloat atalx1;
412
typedef _Complex double Talx1cdouble atalx1;
413
typedef _Complex long double Talx1cldouble atalx1;
414
typedef bool Talx1bool atalx1;
415
typedef enum E0 Talx1E0 atalx1;
416
typedef enum E1 Talx1E1 atalx1;
417
typedef enum E2 Talx1E2 atalx1;
418
typedef enum E3 Talx1E3 atalx1;
419
typedef enum E4 Talx1E4 atalx1;
420
typedef enum E5 Talx1E5 atalx1;
421
typedef enum E6 Talx1E6 atalx1;
422
typedef enum E7 Talx1E7 atalx1;
423
typedef enum E8 Talx1E8 atalx1;
424
typedef enum E9 Talx1E9 atalx1;
425
typedef void *Talx1ptr atalx1;
426
typedef char *Talx1cptr atalx1;
427
typedef int *Talx1iptr atalx1;
428
typedef short int Talx2short atalx2;
429
typedef unsigned short int Talx2ushort atalx2;
430
typedef int Talx2int atalx2;
431
typedef unsigned int Talx2uint atalx2;
432
typedef long int Talx2long atalx2;
433
typedef unsigned long int Talx2ulong atalx2;
434
typedef long long int Talx2llong atalx2;
435
typedef unsigned long long int Talx2ullong atalx2;
436
typedef float Talx2float atalx2;
437
typedef double Talx2double atalx2;
438
typedef long double Talx2ldouble atalx2;
439
typedef _Complex float Talx2cfloat atalx2;
440
typedef _Complex double Talx2cdouble atalx2;
441
typedef _Complex long double Talx2cldouble atalx2;
442
typedef enum E0 Talx2E0 atalx2;
443
typedef enum E1 Talx2E1 atalx2;
444
typedef enum E2 Talx2E2 atalx2;
445
typedef enum E3 Talx2E3 atalx2;
446
typedef enum E4 Talx2E4 atalx2;
447
typedef enum E5 Talx2E5 atalx2;
448
typedef enum E6 Talx2E6 atalx2;
449
typedef enum E7 Talx2E7 atalx2;
450
typedef enum E8 Talx2E8 atalx2;
451
typedef enum E9 Talx2E9 atalx2;
452
typedef void *Talx2ptr atalx2;
453
typedef char *Talx2cptr atalx2;
454
typedef int *Talx2iptr atalx2;
455
typedef int Talx4int atalx4;
456
typedef unsigned int Talx4uint atalx4;
457
typedef long int Talx4long atalx4;
458
typedef unsigned long int Talx4ulong atalx4;
459
typedef long long int Talx4llong atalx4;
460
typedef unsigned long long int Talx4ullong atalx4;
461
typedef float Talx4float atalx4;
462
typedef double Talx4double atalx4;
463
typedef long double Talx4ldouble atalx4;
464
typedef _Complex float Talx4cfloat atalx4;
465
typedef _Complex double Talx4cdouble atalx4;
466
typedef _Complex long double Talx4cldouble atalx4;
467
typedef enum E0 Talx4E0 atalx4;
468
typedef enum E1 Talx4E1 atalx4;
469
typedef enum E2 Talx4E2 atalx4;
470
typedef enum E3 Talx4E3 atalx4;
471
typedef enum E4 Talx4E4 atalx4;
472
typedef enum E5 Talx4E5 atalx4;
473
typedef enum E6 Talx4E6 atalx4;
474
typedef enum E7 Talx4E7 atalx4;
475
typedef enum E8 Talx4E8 atalx4;
476
typedef enum E9 Talx4E9 atalx4;
477
typedef void *Talx4ptr atalx4;
478
typedef char *Talx4cptr atalx4;
479
typedef int *Talx4iptr atalx4;
480
typedef long int Taly8long ataly8;
481
typedef unsigned long int Taly8ulong ataly8;
482
typedef long long int Talx8llong atalx8;
483
typedef unsigned long long int Talx8ullong atalx8;
484
typedef double Talx8double atalx8;
485
typedef long double Talx8ldouble atalx8;
486
typedef _Complex float Talx8cfloat atalx8;
487
typedef _Complex double Talx8cdouble atalx8;
488
typedef _Complex long double Talx8cldouble atalx8;
489
typedef void *Taly8ptr ataly8;
490
typedef char *Taly8cptr ataly8;
491
typedef int *Taly8iptr ataly8;
492
typedef _Complex double Talx16cdouble atalx16;
493
typedef _Complex long double Talx16cldouble atalx16;
494
typedef int (*Tfnptr) (void);
495
 
496
#define T(n, fields, ops) TX(n, struct, , fields, ({ ops });)
497
#define U(n, fields, ops) TX(n, union, , fields, ({ ops });)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.