1 /* Test -fdump-go-specs option. */
3 /* { dg-options "-c -fdump-go-spec=godump-1.out" } */
4 /* { dg-do compile } */
5 /* { dg-skip-if "not supported for target" { ! "alpha*-*-* s390*-*-* i?86-*-* x86_64-*-*" } } */
6 /* { dg-skip-if "not supported for target" { ! lp64 } } */
10 /* Necessary quoting in the regexp patters:
12 (?n) at beginning of pattern to make ^ and $ work.
16 (, ) -> "\[(\]", "\[)\]"
20 /*** integer based types ***/
22 /* { dg-final { scan-file godump-1.out "(?n)^type _c_t u?int8$" } } */
25 /* { dg-final { scan-file godump-1.out "(?n)^var _c_v1 u?int\[0-9\]*$" } } */
28 /* { dg-final { scan-file godump-1.out "(?n)^var _c_v2 _c_t$" } } */
31 /* { dg-final { scan-file godump-1.out "(?n)^type _s_t int\[0-9\]*$" } } */
34 /* { dg-final { scan-file godump-1.out "(?n)^var _s_v1 int\[0-9\]*$" } } */
37 /* { dg-final { scan-file godump-1.out "(?n)^var _s_v2 _s_t$" } } */
40 /* { dg-final { scan-file godump-1.out "(?n)^type _i_t int\[0-9\]*$" } } */
43 /* { dg-final { scan-file godump-1.out "(?n)^var _i_v1 int\[0-9\]*$" } } */
46 /* { dg-final { scan-file godump-1.out "(?n)^var _i_v2 _i_t$" } } */
49 /* { dg-final { scan-file godump-1.out "(?n)^type _l_t int\[0-9\]*$" } } */
52 /* { dg-final { scan-file godump-1.out "(?n)^var _l_v1 int\[0-9\]*$" } } */
55 /* { dg-final { scan-file godump-1.out "(?n)^var _l_v2 _l_t$" } } */
57 typedef long long ll_t
;
58 /* { dg-final { scan-file godump-1.out "(?n)^type _ll_t int\[0-9\]*$" } } */
61 /* { dg-final { scan-file godump-1.out "(?n)^var _ll_v1 int\[0-9\]*$" } } */
64 /* { dg-final { scan-file godump-1.out "(?n)^var _ll_v2 _ll_t$" } } */
66 typedef unsigned char uc_t
;
67 /* { dg-final { scan-file godump-1.out "(?n)^type _uc_t uint8$" } } */
70 /* { dg-final { scan-file godump-1.out "(?n)^var _uc_v1 uint\[0-9\]*$" } } */
73 /* { dg-final { scan-file godump-1.out "(?n)^var _uc_v2 _uc_t$" } } */
75 typedef unsigned short us_t
;
76 /* { dg-final { scan-file godump-1.out "(?n)^type _us_t uint\[0-9\]*$" } } */
79 /* { dg-final { scan-file godump-1.out "(?n)^var _us_v1 uint\[0-9\]*$" } } */
82 /* { dg-final { scan-file godump-1.out "(?n)^var _us_v2 _us_t$" } } */
84 typedef unsigned int ui_t
;
85 /* { dg-final { scan-file godump-1.out "(?n)^type _ui_t uint\[0-9\]*$" } } */
88 /* { dg-final { scan-file godump-1.out "(?n)^var _ui_v1 uint\[0-9\]*$" } } */
91 /* { dg-final { scan-file godump-1.out "(?n)^var _ui_v2 _ui_t$" } } */
93 typedef unsigned long ul_t
;
94 /* { dg-final { scan-file godump-1.out "(?n)^type _ul_t uint\[0-9\]*$" } } */
97 /* { dg-final { scan-file godump-1.out "(?n)^var _ul_v1 uint\[0-9\]*$" } } */
100 /* { dg-final { scan-file godump-1.out "(?n)^var _ul_v2 _ul_t$" } } */
102 typedef unsigned long long ull_t
;
103 /* { dg-final { scan-file godump-1.out "(?n)^type _ull_t uint\[0-9\]*$" } } */
105 unsigned long long ull_v1
;
106 /* { dg-final { scan-file godump-1.out "(?n)^var _ull_v1 uint\[0-9\]*$" } } */
109 /* { dg-final { scan-file godump-1.out "(?n)^var _ull_v2 _ull_t$" } } */
111 typedef signed char sc_t
;
112 /* { dg-final { scan-file godump-1.out "(?n)^type _sc_t int8$" } } */
115 /* { dg-final { scan-file godump-1.out "(?n)^var _sc_v1 int\[0-9\]*$" } } */
118 /* { dg-final { scan-file godump-1.out "(?n)^var _sc_v2 _sc_t$" } } */
120 typedef signed short ss_t
;
121 /* { dg-final { scan-file godump-1.out "(?n)^type _ss_t int\[0-9\]*$" } } */
124 /* { dg-final { scan-file godump-1.out "(?n)^var _ss_v1 int\[0-9\]*$" } } */
127 /* { dg-final { scan-file godump-1.out "(?n)^var _ss_v2 _ss_t$" } } */
129 typedef signed int si_t
;
130 /* { dg-final { scan-file godump-1.out "(?n)^type _si_t int\[0-9\]*$" } } */
133 /* { dg-final { scan-file godump-1.out "(?n)^var _si_v1 int\[0-9\]*$" } } */
136 /* { dg-final { scan-file godump-1.out "(?n)^var _si_v2 _si_t$" } } */
138 typedef signed long sl_t
;
139 /* { dg-final { scan-file godump-1.out "(?n)^type _sl_t int\[0-9\]*$" } } */
142 /* { dg-final { scan-file godump-1.out "(?n)^var _sl_v1 int\[0-9\]*$" } } */
145 /* { dg-final { scan-file godump-1.out "(?n)^var _sl_v2 _sl_t$" } } */
147 typedef signed long long sll_t
;
148 /* { dg-final { scan-file godump-1.out "(?n)^type _sll_t int\[0-9\]*$" } } */
150 signed long long sll_v1
;
151 /* { dg-final { scan-file godump-1.out "(?n)^var _sll_v1 int\[0-9\]*$" } } */
154 /* { dg-final { scan-file godump-1.out "(?n)^var _sll_v2 _sll_t$" } } */
157 /* { dg-final { scan-file godump-1.out "(?n)^type _i8_t int8$" } } */
160 /* { dg-final { scan-file godump-1.out "(?n)^var _i8_v1 _int8_t$" } } */
163 /* { dg-final { scan-file godump-1.out "(?n)^var _i8_v2 _i8_t$" } } */
165 typedef int16_t i16_t
;
166 /* { dg-final { scan-file godump-1.out "(?n)^type _i16_t int16$" } } */
169 /* { dg-final { scan-file godump-1.out "(?n)^var _i16_v1 _int16_t$" } } */
172 /* { dg-final { scan-file godump-1.out "(?n)^var _i16_v2 _i16_t$" } } */
174 typedef int32_t i32_t
;
175 /* { dg-final { scan-file godump-1.out "(?n)^type _i32_t int32$" } } */
178 /* { dg-final { scan-file godump-1.out "(?n)^var _i32_v1 _int32_t$" } } */
181 /* { dg-final { scan-file godump-1.out "(?n)^var _i32_v2 _i32_t$" } } */
183 typedef int64_t i64_t
;
184 /* { dg-final { scan-file godump-1.out "(?n)^type _i64_t int64$" } } */
187 /* { dg-final { scan-file godump-1.out "(?n)^var _i64_v1 _int64_t$" } } */
190 /* { dg-final { scan-file godump-1.out "(?n)^var _i64_v2 _i64_t$" } } */
192 typedef uint8_t ui8_t
;
193 /* { dg-final { scan-file godump-1.out "(?n)^type _ui8_t uint8$" } } */
196 /* { dg-final { scan-file godump-1.out "(?n)^var _ui8_v1 _uint8_t$" } } */
199 /* { dg-final { scan-file godump-1.out "(?n)^var _ui8_v2 _ui8_t$" } } */
201 typedef uint16_t iu16_t
;
202 /* { dg-final { scan-file godump-1.out "(?n)^type _iu16_t uint16$" } } */
205 /* { dg-final { scan-file godump-1.out "(?n)^var _iu16_v1 _uint16_t$" } } */
208 /* { dg-final { scan-file godump-1.out "(?n)^var _iu16_v2 _iu16_t$" } } */
210 typedef uint32_t iu32_t
;
211 /* { dg-final { scan-file godump-1.out "(?n)^type _iu32_t uint32$" } } */
214 /* { dg-final { scan-file godump-1.out "(?n)^var _iu32_v1 _uint32_t$" } } */
217 /* { dg-final { scan-file godump-1.out "(?n)^var _iu32_v2 _iu32_t$" } } */
219 typedef uint64_t iu64_t
;
220 /* { dg-final { scan-file godump-1.out "(?n)^type _iu64_t uint64$" } } */
223 /* { dg-final { scan-file godump-1.out "(?n)^var _iu64_v1 _uint64_t$" } } */
226 /* { dg-final { scan-file godump-1.out "(?n)^var _iu64_v2 _iu64_t$" } } */
228 typedef const char cc_t
;
229 /* { dg-final { scan-file godump-1.out "(?n)^type _cc_t u?int8$" } } */
232 /* { dg-final { scan-file godump-1.out "(?n)^var _cc_v1 u?int8$" } } */
235 /* { dg-final { scan-file godump-1.out "(?n)^var _cc_v2 _cc_t$" } } */
238 /*** pointer and array types ***/
240 /* { dg-final { scan-file godump-1.out "(?n)^type _vp_t \\*byte$" } } */
243 /* { dg-final { scan-file godump-1.out "(?n)^var _vp_v1 \\*byte$" } } */
246 /* { dg-final { scan-file godump-1.out "(?n)^var _vp_v2 _vp_t$" } } */
249 /* { dg-final { scan-file godump-1.out "(?n)^type _ipp_t \\*\\*int\[0-9\]*$" } } */
252 /* { dg-final { scan-file godump-1.out "(?n)^var _ipp_v1 \\*\\*int\[0-9\]*$" } } */
255 /* { dg-final { scan-file godump-1.out "(?n)^var _ipp_v2 _ipp_t$" } } */
258 /* { dg-final { scan-file godump-1.out "(?n)^type _ca_t \\\[0\\\]u?int8$" } } */
260 char ca_v1
[]; /* { dg-warning "array 'ca_v1' assumed to have one element" } */
261 /* { dg-final { scan-file godump-1.out "(?n)^var _ca_v1 \\\[0\\+1\\\]u?int8$" } } */
264 /* { dg-final { scan-file godump-1.out "(?n)^var _ca_v1b \\\[1\\+1\\\]u?int8$" } } */
266 ca_t ca_v2
; /* { dg-warning "array 'ca_v2' assumed to have one element" } */
267 /* { dg-final { scan-file godump-1.out "(?n)^var _ca_v2 \\\[0\\+1\\\]u?int8$" } } */
269 typedef short sa2_t
[2];
270 /* { dg-final { scan-file godump-1.out "(?n)^type _sa2_t \\\[1\\+1\\\]int\[0-9\]*$" } } */
273 /* { dg-final { scan-file godump-1.out "(?n)^var _sa2_v1 \\\[1\\+1\\\]int\[0-9\]*$" } } */
276 /* { dg-final { scan-file godump-1.out "(?n)^var _sa2_v2 _sa2_t$" } } */
279 /*** floating point types ***/
281 /* { dg-final { scan-file godump-1.out "(?n)^type _f_t float\[0-9\]*$" } } */
284 /* { dg-final { scan-file godump-1.out "(?n)^var _f_v1 float\[0-9\]*$" } } */
287 /* { dg-final { scan-file godump-1.out "(?n)^var _f_v2 _f_t$" } } */
290 /* { dg-final { scan-file godump-1.out "(?n)^type _d_t float\[0-9\]*$" } } */
293 /* { dg-final { scan-file godump-1.out "(?n)^var _d_v1 float\[0-9\]*$" } } */
296 /* { dg-final { scan-file godump-1.out "(?n)^var _d_v2 _d_t$" } } */
298 typedef long double ld_t
;
299 /* { dg-final { scan-file godump-1.out "(?n)^// type _ld_t INVALID-float-\[0-9\]*$" } } */
302 /* { dg-final { scan-file godump-1.out "(?n)^// var _ld_v1 INVALID-float-\[0-9\]*$" } } */
305 /* { dg-final { scan-file godump-1.out "(?n)^// var _ld_v2 INVALID-float-\[0-9\]*$" } } */
307 /*** complex types ***/
308 typedef _Complex cx_t
;
309 /* { dg-final { scan-file godump-1.out "(?n)^type _cx_t complex\[0-9\]*$" } } */
312 /* { dg-final { scan-file godump-1.out "(?n)^var _cx_v1 complex\[0-9\]*$" } } */
315 /* { dg-final { scan-file godump-1.out "(?n)^var _cx_v2 _cx_t$" } } */
317 typedef float _Complex fcx_t
;
318 /* { dg-final { scan-file godump-1.out "(?n)^type _fcx_t complex\[0-9\]*$" } } */
320 float _Complex fcx_v1
;
321 /* { dg-final { scan-file godump-1.out "(?n)^var _fcx_v1 complex\[0-9\]*$" } } */
324 /* { dg-final { scan-file godump-1.out "(?n)^var _fcx_v2 _fcx_t$" } } */
326 typedef double _Complex dcx_t
;
327 /* { dg-final { scan-file godump-1.out "(?n)^type _dcx_t complex\[0-9\]*$" } } */
329 double _Complex dcx_v1
;
330 /* { dg-final { scan-file godump-1.out "(?n)^var _dcx_v1 complex\[0-9\]*$" } } */
333 /* { dg-final { scan-file godump-1.out "(?n)^var _dcx_v2 _dcx_t$" } } */
335 typedef long double _Complex ldcx_t
;
336 /* { dg-final { scan-file godump-1.out "(?n)^// type _ldcx_t INVALID-complex-\[0-9\]*$" } } */
338 long double _Complex ldcx_v1
;
339 /* { dg-final { scan-file godump-1.out "(?n)^// var _ldcx_v1 INVALID-complex-\[0-9\]*$" } } */
342 /* { dg-final { scan-file godump-1.out "(?n)^// var _ldcx_v2 INVALID-complex-\[0-9\]*$" } } */
344 typedef int _Complex icx_t
;
345 /* { dg-final { scan-file godump-1.out "(?n)^// type _icx_t INVALID-complex-non-real$" } } */
348 /* { dg-final { scan-file godump-1.out "(?n)^// var _icx_v1 INVALID-complex-non-real$" } } */
351 /* { dg-final { scan-file godump-1.out "(?n)^// var _icx_v2 INVALID-complex-non-real$" } } */
354 /*** nested typedefs ***/
355 typedef int32_t ni_t
;
356 /* { dg-final { scan-file godump-1.out "(?n)^type _ni_t int32$" } } */
359 /* { dg-final { scan-file godump-1.out "(?n)^type _ni2_t int32$" } } */
362 /* { dg-final { scan-file godump-1.out "(?n)^var _ni2_v2 _ni2_t$" } } */
365 /* { dg-final { scan-file godump-1.out "(?n)^type _ni3_t int32$" } } */
368 /* { dg-final { scan-file godump-1.out "(?n)^var _ni3_v2 _ni3_t$" } } */
373 /* { dg-final { scan-file godump-1.out "(?n)^const _E11 = 0$" } } */
376 /* { dg-final { scan-file godump-1.out "(?n)^var _e1_v1 u?int\[0-9\]*$" } } */
377 /* { dg-final { scan-file godump-1.out "(?n)^const _EV11 = 0$" } } */
380 /* { dg-final { scan-file godump-1.out "(?n)^const _E21 = 0$" } } */
381 /* { dg-final { scan-file godump-1.out "(?n)^const _E22 = 1$" } } */
383 enum { EV21
, EV22
} e2_v1
;
384 /* { dg-final { scan-file godump-1.out "(?n)^var _e2_v1 u?int\[0-9\]*$" } } */
385 /* { dg-final { scan-file godump-1.out "(?n)^const _EV21 = 0$" } } */
386 /* { dg-final { scan-file godump-1.out "(?n)^const _EV22 = 1$" } } */
388 enum { EN1
= 3, EN2
= 77, EN3
= -1, EN4
};
389 /* { dg-final { scan-file godump-1.out "(?n)^const _EN1 = 3$" } } */
390 /* { dg-final { scan-file godump-1.out "(?n)^const _EN2 = 77$" } } */
391 /* { dg-final { scan-file godump-1.out "(?n)^const _EN3 = -1$" } } */
392 /* { dg-final { scan-file godump-1.out "(?n)^const _EN4 = 0$" } } */
394 typedef enum { ET1
, ET2
} et_t
;
395 /* { dg-final { scan-file godump-1.out "(?n)^type _et_t u?int\[0-9\]*$" } } */
396 /* { dg-final { scan-file godump-1.out "(?n)^const _ET1 = 0$" } } */
397 /* { dg-final { scan-file godump-1.out "(?n)^const _ET2 = 1$" } } */
399 enum { ETV1
, ETV2
} et_v1
;
400 /* { dg-final { scan-file godump-1.out "(?n)^var _et_v1 u?int\[0-9\]*$" } } */
401 /* { dg-final { scan-file godump-1.out "(?n)^const _ETV1 = 0$" } } */
402 /* { dg-final { scan-file godump-1.out "(?n)^const _ETV2 = 1$" } } */
405 /* { dg-final { scan-file godump-1.out "(?n)^var _et_v2 _et_t$" } } */
408 /*** simple structs ***/
409 typedef struct { } ts0e
;
410 /* { dg-final { scan-file godump-1.out "(?n)^type _ts0e struct \{ \}$" } } */
413 /* { dg-final { scan-file godump-1.out "(?n)^var _s0e struct \{ \}$" } } */
415 typedef struct { int8_t e1
; } ts1e
;
416 /* { dg-final { scan-file godump-1.out "(?n)^type _ts1e struct \{ e1 int8; \}$" } } */
418 struct { int8_t e1
; } s1e
;
419 /* { dg-final { scan-file godump-1.out "(?n)^var _s1e struct \{ e1 int8; \}$" } } */
421 typedef struct { int8_t e1
; void *e2
; } ts2el
;
422 /* { dg-final { scan-file godump-1.out "(?n)^type _ts2el struct \{ e1 int8; e2 \\*byte; \}$" } } */
424 struct { int8_t e1
; void *e2
; } s2el
;
425 /* { dg-final { scan-file godump-1.out "(?n)^var _s2el struct \{ e1 int8; e2 \\*byte; \}$" } } */
427 typedef struct { void *e1
; int8_t e2
; } ts2eg
;
428 /* { dg-final { scan-file godump-1.out "(?n)^type _ts2eg struct \{ e1 \\*byte; e2 int8; Godump_0_pad \\\[.\\\]byte; \}$" } } */
430 struct { void *e1
; int8_t e2
; } s2eg
;
431 /* { dg-final { scan-file godump-1.out "(?n)^var _s2eg struct \{ e1 \\*byte; e2 int8; Godump_0_pad \\\[.\\\]byte; \}$" } } */
433 typedef struct { int64_t l
; int8_t c
; int32_t i
; int16_t s
; } tsme
;
434 /* { dg-final { scan-file godump-1.out "(?n)^type _tsme struct \{ l int64; c int8; i int32; s int16; Godump_0_pad \\\[.\\\]byte; \}$" } } */
436 struct { int64_t l
; int8_t c
; int32_t i
; int16_t s
; } sme
;
437 /* { dg-final { scan-file godump-1.out "(?n)^var _sme struct \{ l int64; c int\8; i int32; s int16; Godump_0_pad \\\[.\\\]byte; \}$" } } */
439 typedef struct { int16_t sa
[3]; int8_t ca
[3]; } tsae
;
440 /* { dg-final { scan-file godump-1.out "(?n)^type _tsae struct \{ sa \\\[2\\+1\\\]int16; ca \\\[2\\+1\\\]int8; Godump_0_pad \\\[.\\\]byte; \}$" } } */
442 struct { int16_t sa
[3]; int8_t ca
[3]; } sae
;
443 /* { dg-final { scan-file godump-1.out "(?n)^var _sae struct \{ sa \\\[2\\+1\\\]int16; ca \\\[2\\+1\\\]int8; Godump_0_pad \\\[.\\\]byte; \}$" } } */
445 typedef struct { float f
; } tsf_equiv
;
446 /* { dg-final { scan-file godump-1.out "(?n)^type _tsf_equiv struct \{ f float\[0-9\]*; \}$" } } */
448 struct { float f
; } sf_equiv
;
449 /* { dg-final { scan-file godump-1.out "(?n)^var _sf_equiv struct \{ f float\[0-9\]*; \}$" } } */
451 typedef struct { float f
; uint8_t : 0; } tsf_not_equiv
;
452 /* { dg-final { scan-file godump-1.out "(?n)^type _tsf_not_equiv struct \{ f float\[0-9\]*; \}$" } } */
454 struct { float f
; uint8_t : 0; } sf_not_equiv
;
455 /* { dg-final { scan-file godump-1.out "(?n)^var _sf_not_equiv struct \{ f float\[0-9\]*; \}$" } } */
457 typedef struct { double d
; } tsd_equiv
;
458 /* { dg-final { scan-file godump-1.out "(?n)^type _tsd_equiv struct \{ d float\[0-9\]*; \}$" } } */
460 struct { double d
; } sd_equiv
;
461 /* { dg-final { scan-file godump-1.out "(?n)^var _sd_equiv struct \{ d float\[0-9\]*; \}$" } } */
463 typedef struct { double d
; uint8_t : 0; } tsd_not_equiv
;
464 /* { dg-final { scan-file godump-1.out "(?n)^type _tsd_not_equiv struct \{ d float\[0-9\]*; \}$" } } */
466 struct { double d
; uint8_t : 0; } sd_not_equiv
;
467 /* { dg-final { scan-file godump-1.out "(?n)^var _sd_not_equiv struct \{ d float\[0-9\]*; \}$" } } */
469 typedef struct s_undef_t s_undef_t2
;
472 /*** nested structs ***/
473 typedef struct { struct { uint8_t ca
[3]; } s
; uint32_t i
; } tsn
;
474 /* { dg-final { scan-file godump-1.out "(?n)^type _tsn struct \{ s struct \{ ca \\\[2\\+1\\\]uint8; \}; i uint32; \}$" } } */
476 struct { struct { uint8_t ca
[3]; } s
; uint32_t i
; } sn
;
477 /* { dg-final { scan-file godump-1.out "(?n)^var _sn struct \{ s struct \{ ca \\\[2\\+1\\\]uint8; \}; i uint32; \}$" } } */
479 typedef struct { struct { uint8_t a
; uint16_t s
; }; uint8_t b
; } tsn_anon
;
480 /* { dg-final { scan-file godump-1.out "(?n)^type _tsn_anon struct \{ a uint8; s uint16; b uint8; Godump_0_pad \\\[.\\\]byte; Godump_1_align \\\[0\\\]int16; \}$" } } */
482 struct { struct { uint8_t a
; uint16_t s
; }; uint8_t b
; } sn_anon
;
483 /* { dg-final { scan-file godump-1.out "(?n)^var _sn_anon struct \{ a uint8; s uint16; b uint8; Godump_0_pad \\\[.\\\]byte; Godump_1_align \\\[0\\\]int16; \}$" } } */
486 /*** structs with bitfields ***/
487 typedef struct { uint8_t : 0; uint8_t c
; } tsbf_anon_pad1
;
488 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_anon_pad1 struct \{ c uint8; \}$" } } */
490 struct { uint8_t : 0; uint8_t c
; } sbf_anon_pad1
;
491 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_anon_pad1 struct \{ c uint8; \}$" } } */
493 typedef struct { uint8_t : 1; uint8_t c
; } tsbf_anon_pad2
;
494 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_anon_pad2 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; \}$" } } */
496 struct { uint8_t : 1; uint8_t c
; } sbf_anon_pad2
;
497 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_anon_pad2 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; \}$" } } */
499 typedef struct { uint8_t : 7; uint8_t c
; } tsbf_anon_pad3
;
500 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_anon_pad3 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; \}$" } } */
502 struct { uint8_t : 7; uint8_t c
; } sbf_anon_pad3
;
503 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_anon_pad3 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; \}$" } } */
505 typedef struct { uint8_t : 8; uint8_t c
; } tsbf_anon_pad4
;
506 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_anon_pad4 struct \{ Godump_0 uint8; c uint8; \}$" } } */
508 struct { uint8_t : 8; uint8_t c
; } sbf_anon_pad4
;
509 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_anon_pad4 struct \{ Godump_0 uint8; c uint8; \}$" } } */
511 typedef struct { uint64_t : 0; uint8_t c
; } tsbf_anon_pad5
;
512 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_anon_pad5 struct \{ c uint8; \}$" } } */
514 struct { uint64_t : 0; uint8_t c
; } sbf_anon_pad5
;
515 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_anon_pad5 struct \{ c uint8; \}$" } } */
517 typedef struct { uint64_t : 1; uint8_t c
; } tsbf_anon_pad6
;
518 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_anon_pad6 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; \}$" } } */
520 struct { uint64_t : 1; uint8_t c
; } sbf_anon_pad6
;
521 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_anon_pad6 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; \}$" } } */
523 typedef struct { uint64_t : 63; uint8_t c
; } tsbf_anon_pad7
;
524 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_anon_pad7 struct \{ Godump_0_pad \\\[8\\\]byte; c uint8; \}$" } } */
526 struct { uint64_t : 63; uint8_t c
; } sbf_anon_pad7
;
527 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_anon_pad7 struct \{ Godump_0_pad \\\[8\\\]byte; c uint8; \}$" } } */
529 typedef struct { uint64_t : 64; uint8_t c
; } tsbf_anon_pad8
;
530 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_anon_pad8 struct \{ Godump_0 uint64; c uint8; \}$" } } */
532 struct { uint64_t : 64; uint8_t c
; } sbf_anon_pad8
;
533 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_anon_pad8 struct \{ Godump_0 uint64; c uint8; \}$" } } */
535 typedef struct { uint8_t bf
: 1; uint8_t c
; } tsbf_pad8_1
;
536 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad8_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; \}$" } } */
538 struct { uint8_t bf
: 1; uint8_t c
; } sbf_pad8_1
;
539 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad8_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; \}$" } } */
541 typedef struct { uint8_t bf
: 7; uint8_t c
; } tsbf_pad8_2
;
542 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad8_2 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; \}$" } } */
544 struct { uint8_t bf
: 7; uint8_t c
; } sbf_pad8_2
;
545 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad8_2 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; \}$" } } */
547 typedef struct { uint8_t bf
: 8; uint8_t c
; } tsbf_pad8_3
;
548 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad8_3 struct \{ bf uint8; c uint8; \}$" } } */
550 struct { uint8_t bf
: 8; uint8_t c
; } sbf_pad8_3
;
551 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad8_3 struct \{ bf uint8; c uint8; \}$" } } */
553 typedef struct { uint16_t bf
: 1; uint8_t c
; } tsbf_pad16_1
;
554 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad16_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; Godump_1_align \\\[0\\\]int16; \}$" } } */
556 struct { uint16_t bf
: 1; uint8_t c
; } sbf_pad16_1
;
557 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad16_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; Godump_1_align \\\[0\\\]int16; \}$" } } */
559 typedef struct { uint16_t bf
: 15; uint8_t c
; } tsbf_pad16_2
;
560 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad16_2 struct \{ Godump_0_pad \\\[2\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int16; \}$" } } */
562 struct { uint16_t bf
: 15; uint8_t c
; } sbf_pad16_2
;
563 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad16_2 struct \{ Godump_0_pad \\\[2\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int16; \}$" } } */
565 typedef struct { uint16_t bf
: 16; uint8_t c
; } tsbf_pad16_3
;
566 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad16_3 struct \{ bf uint16; c uint8; Godump_0_pad \\\[.\\\]byte; \}$" } } */
568 struct { uint16_t bf
: 16; uint8_t c
; } sbf_pad16_3
;
569 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad16_3 struct \{ bf uint16; c uint8; Godump_0_pad \\\[.\\\]byte; \}$" } } */
571 typedef struct { uint32_t bf
: 1; uint8_t c
; } tsbf_pad32_1
;
572 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad32_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int32; \}$" } } */
574 struct { uint32_t bf
: 1; uint8_t c
; } sbf_pad32_1
;
575 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad32_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int32; \}$" } } */
577 typedef struct { uint32_t bf
: 31; uint8_t c
; } tsbf_pad32_2
;
578 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad32_2 struct \{ Godump_0_pad \\\[4\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int32; \}$" } } */
580 struct { uint32_t bf
: 31; uint8_t c
; } sbf_pad32_2
;
581 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad32_2 struct \{ Godump_0_pad \\\[4\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int32; \}$" } } */
583 typedef struct { uint32_t bf
: 32; uint8_t c
; } tsbf_pad32_3
;
584 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad32_3 struct \{ bf uint32; c uint8; Godump_0_pad \\\[.\\\]byte; \}$" } } */
586 struct { uint32_t bf
: 32; uint8_t c
; } sbf_pad32_3
;
587 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad32_3 struct \{ bf uint32; c uint8; Godump_0_pad \\\[.\\\]byte; \}$" } } */
589 typedef struct { uint64_t bf
: 1; uint8_t c
; } tsbf_pad64_1
;
590 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad64_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int64; \}$" } } */
592 struct { uint64_t bf
: 1; uint8_t c
; } sbf_pad64_1
;
593 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad64_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int64; \}$" } } */
595 typedef struct { uint64_t bf
: 63; uint8_t c
; } tsbf_pad64_2
;
596 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad64_2 struct \{ Godump_0_pad \\\[8\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int64; \}$" } } */
598 struct { uint64_t bf
: 63; uint8_t c
; } sbf_pad64_2
;
599 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad64_2 struct \{ Godump_0_pad \\\[8\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int64; \}$" } } */
601 typedef struct { uint64_t bf
: 64; uint8_t c
; } tsbf_pad64_3
;
602 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad64_3 struct \{ bf uint\[0-9\]*; c uint8; Godump_0_pad \\\[.\\\]byte; \}$" } } */
604 struct { uint64_t bf
: 64; uint8_t c
; } sbf_pad64_3
;
605 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad64_3 struct \{ bf uint\[0-9\]*; c uint8; Godump_0_pad \\\[.\\\]byte; \}$" } } */
607 typedef struct { uint8_t b1
: 1; } tsbf_1b
;
608 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_1b struct \{ Godump_0_pad \\\[1\\\]byte; \}$" } } */
610 struct { uint8_t b1
: 1; } sbf_1b
;
611 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_1b struct \{ Godump_0_pad \\\[1\\\]byte; \}$" } } */
615 uint8_t b1
: 1; uint8_t b2
: 1; uint8_t b3
: 1; uint8_t b4
: 1;
616 uint8_t b5
: 1; uint8_t b6
: 1; uint8_t b7
: 1; uint8_t b8
: 1;
618 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_8b struct \{ Godump_0_pad \\\[1\\\]byte; \}$" } } */
622 uint8_t b1
: 1; uint8_t b2
: 1; uint8_t b3
: 1; uint8_t b4
: 1;
623 uint8_t b5
: 1; uint8_t b6
: 1; uint8_t b7
: 1; uint8_t b8
: 1;
625 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_8b struct \{ Godump_0_pad \\\[1\\\]byte; \}$" } } */
628 uint8_t b1
: 1; uint8_t b2
: 1; uint8_t b3
: 1; uint8_t b4
: 1;
629 uint8_t b5
: 1; uint8_t b6
: 1; uint8_t b7
: 1; uint8_t b8
: 1;
632 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_9b struct \{ Godump_0_pad \\\[2\\\]byte; \}$" } } */
635 uint8_t b1
: 1; uint8_t b2
: 1; uint8_t b3
: 1; uint8_t b4
: 1;
636 uint8_t b5
: 1; uint8_t b6
: 1; uint8_t b7
: 1; uint8_t b8
: 1;
639 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_9b struct \{ Godump_0_pad \\\[2\\\]byte; \}$" } } */
642 uint8_t b1
: 7; uint8_t b2
: 7; uint8_t b3
: 2;
644 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_18b struct \{ Godump_0_pad \\\[3\\\]byte; \}$" } } */
647 uint8_t b1
: 7; uint8_t b2
: 7; uint8_t b3
: 2;
649 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_18b struct \{ Godump_0_pad \\\[3\\\]byte; \}$" } } */
659 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_gaps struct \{ bf1 uint8; c uint8; bf2 uint8; Godump_0_pad \\\[2\\\]byte; s uint16; Godump_1_align \\\[0\\\]int32; \}$" } } */
669 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_gaps struct \{ bf1 uint8; c uint8; bf2 uint8; Godump_0_pad \\\[2\\\]byte; s uint16; Godump_1_align \\\[0\\\]int32; \}$" } } */
687 /* { dg-final { scan-file godump-1.out "(?n)^type _ts_nested struct \{ u struct \{ s int16; Godump_0_pad \\\[2\\\]byte; Godump_1_align \\\[0\\\]u?int32; \}; \}$" } } */
705 /* { dg-final { scan-file godump-1.out "(?n)^var _s_nested struct \{ u struct \{ s int16; Godump_0_pad \\\[2\\\]byte; Godump_1_align \\\[0\\\]u?int32; \}; \}$" } } */
723 /* { dg-final { scan-file godump-1.out "(?n)^type _ts_nested2 struct \{ u struct \{ Godump_0_pad \\\[4\\\]byte; Godump_1_pad \\\[2\\\]byte; s int16; c int8; Godump_2_pad \\\[1\\\]byte; Godump_3_pad \\\[2\\\]byte; Godump_4_align \\\[0\\\]u?int32; \}; \}$" } } */
741 /* { dg-final { scan-file godump-1.out "(?n)^var _s_nested2 struct \{ u struct \{ Godump_0_pad \\\[4\\\]byte; Godump_1_pad \\\[2\\\]byte; s int16; c int8; Godump_2_pad \\\[1\\\]byte; Godump_3_pad \\\[2\\\]byte; Godump_4_align \\\[0\\\]u?int32; \}; \}$" } } */
745 typedef union { } tue
;
746 /* { dg-final { scan-file godump-1.out "(?n)^type _tue struct \{ \}$" } } */
749 /* { dg-final { scan-file godump-1.out "(?n)^var _ue struct \{ \}$" } } */
751 typedef union { uint8_t c
; uint64_t l
; } tu1
;
752 /* { dg-final { scan-file godump-1.out "(?n)^type _tu1 struct \{ c uint8; Godump_0_pad \\\[.\\\]byte; Godump_1_align \\\[0\\\]u?int64; \}$" } } */
754 union { uint8_t c
; uint64_t l
; } u1
;
755 /* { dg-final { scan-file godump-1.out "(?n)^var _u1 struct \{ c uint8; Godump_0_pad \\\[.\\\]byte; Godump_1_align \\\[0\\\]u?int64; \}$" } } */
757 typedef union { uint64_t l
; uint8_t c
; } tu2
;
758 /* { dg-final { scan-file godump-1.out "(?n)^type _tu2 struct \{ l uint64; \}$" } } */
760 union { uint64_t l
; uint8_t c
; } u2
;
761 /* { dg-final { scan-file godump-1.out "(?n)^var _u2 struct \{ l uint64; \}$" } } */
763 typedef union { uint64_t l
[3]; uint8_t c
; } tu3
;
764 /* { dg-final { scan-file godump-1.out "(?n)^type _tu3 struct \{ l \\\[2\\+1\\\]uint64; \}$" } } */
766 union { uint64_t l
[3]; uint8_t c
; } u3
;
767 /* { dg-final { scan-file godump-1.out "(?n)^var _u3 struct \{ l \\\[2\\+1\\\]uint64; \}$" } } */
769 typedef struct { union { uint8_t c
; uint64_t l
; }; } tsu_anon
;
770 /* { dg-final { scan-file godump-1.out "(?n)^type _tsu_anon struct \{ c uint8; Godump_0_pad \\\[7\\\]byte; Godump_1_align \\\[0\\\]u?int64; \}$" } } */
772 struct { union { uint8_t c
; uint64_t l
; }; } su_anon
;
773 /* { dg-final { scan-file godump-1.out "(?n)^var _su_anon struct \{ c uint8; Godump_0_pad \\\[7\\\]byte; Godump_1_align \\\[0\\\]u?int64; \}$" } } */
775 typedef union { uint64_t bf
: 1; uint8_t ca
[5]; } tu_size
;
776 /* { dg-final { scan-file godump-1.out "(?n)^type _tu_size struct \{ ca \\\[4\\+1\\\]uint8; Godump_0_pad \\\[.\\\]byte; Godump_1_align \\\[0\\\]u?int64; \}$" } } */
778 union { uint64_t bf
: 1; uint8_t ca
[5]; } u_size
;
779 /* { dg-final { scan-file godump-1.out "(?n)^var _u_size struct \{ ca \\\[4\\+1\\\]uint8; Godump_0_pad \\\[.\\\]byte; Godump_1_align \\\[0\\\]u?int64; \}$" } } */
781 typedef union { uint64_t : 1; uint8_t ca
[5]; } tu2_size
;
782 /* { dg-final { scan-file godump-1.out "(?n)^type _tu2_size struct \{ ca \\\[4\\+1\\\]uint8; \}$" } } */
784 union { uint64_t : 1; uint8_t ca
[5]; } u2_size
;
785 /* { dg-final { scan-file godump-1.out "(?n)^var _u2_size struct \{ ca \\\[4\\+1\\\]uint8; \}$" } } */
787 typedef union u_undef_t u_undef_t2
;
789 typedef union { uint64_t b
: 1; uint8_t ca
[5]; } tu3_size
;
790 /* { dg-final { scan-file godump-1.out "(?n)^type _tu3_size struct \{ ca \\\[4\\+1\\\]uint8; Godump_0_pad \\\[.\\\]byte; Godump_1_align \\\[0\\\]u?int64; \}$" } } */
792 union { uint64_t b
: 1; uint8_t ca
[5]; } u3_size
;
793 /* { dg-final { scan-file godump-1.out "(?n)^var _u3_size struct \{ ca \\\[4\\+1\\\]uint8; Godump_0_pad \\\[.\\\]byte; Godump_1_align \\\[0\\\]u?int64; \}$" } } */
811 /* { dg-final { scan-file godump-1.out "(?n)^type _tu_nested struct \{ u struct \{ s int16; Godump_0_pad \\\[2\\\]byte; Godump_1_align \\\[0\\\]u?int32; \}; \}$" } } */
829 /* { dg-final { scan-file godump-1.out "(?n)^var _u_nested struct \{ u struct \{ s int16; Godump_0_pad \\\[2\\\]byte; Godump_1_align \\\[0\\\]u?int32; \}; \}$" } } */
847 /* { dg-final { scan-file godump-1.out "(?n)^type _tu_nested2 struct \{ u struct \{ Godump_0_pad \\\[4\\\]byte; Godump_1_pad \\\[2\\\]byte; s int16; c int8; Godump_2_pad \\\[1\\\]byte; Godump_3_pad \\\[2\\\]byte; Godump_4_align \\\[0\\\]u?int32; \}; \}$" } } */
865 /* { dg-final { scan-file godump-1.out "(?n)^var _u_nested2 struct \{ u struct \{ Godump_0_pad \\\[4\\\]byte; Godump_1_pad \\\[2\\\]byte; s int16; c int8; Godump_2_pad \\\[1\\\]byte; Godump_3_pad \\\[2\\\]byte; Godump_4_align \\\[0\\\]u?int32; \}; \}$" } } */
869 extern uint32_t func1(uint8_t c
);
870 /* { dg-final { scan-file godump-1.out "(?n)^func _func1 \[(\]uint\[0-9\]*\[)\] uint\[0-9\]* __asm__\[(\]\"func1\"\[)\]$" } } */
872 typedef int8_t (*func_t
)(void *p
);
873 /* { dg-final { scan-file godump-1.out "(?n)^type _func_t func\[(\]\\*byte\[)\] int\[0-9\]*$" } } */
875 /* { dg-final { remove-build-file "godump-1.out" } } */