PR target/83368
[official-gcc.git] / gcc / testsuite / gcc.misc-tests / godump-1.c
blobee984e5b574f0bd284bc1b0da74f0d067371592e
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 } } */
8 #include <stdint.h>
10 /* Necessary quoting in the regexp patters:
12 (?n) at beginning of pattern to make ^ and $ work.
13 " -> \"
14 *, + -> "*", "+"
15 [, ] -> "\[", "\]"
16 (, ) -> "\[(\]", "\[)\]"
17 {, } -> "\{", "\}"
20 /*** integer based types ***/
21 typedef char c_t;
22 /* { dg-final { scan-file godump-1.out "(?n)^type _c_t u?int8$" } } */
24 char c_v1;
25 /* { dg-final { scan-file godump-1.out "(?n)^var _c_v1 u?int\[0-9\]*$" } } */
27 c_t c_v2;
28 /* { dg-final { scan-file godump-1.out "(?n)^var _c_v2 _c_t$" } } */
30 typedef short s_t;
31 /* { dg-final { scan-file godump-1.out "(?n)^type _s_t int\[0-9\]*$" } } */
33 short s_v1;
34 /* { dg-final { scan-file godump-1.out "(?n)^var _s_v1 int\[0-9\]*$" } } */
36 s_t s_v2;
37 /* { dg-final { scan-file godump-1.out "(?n)^var _s_v2 _s_t$" } } */
39 typedef int i_t;
40 /* { dg-final { scan-file godump-1.out "(?n)^type _i_t int\[0-9\]*$" } } */
42 int i_v1;
43 /* { dg-final { scan-file godump-1.out "(?n)^var _i_v1 int\[0-9\]*$" } } */
45 i_t i_v2;
46 /* { dg-final { scan-file godump-1.out "(?n)^var _i_v2 _i_t$" } } */
48 typedef long l_t;
49 /* { dg-final { scan-file godump-1.out "(?n)^type _l_t int\[0-9\]*$" } } */
51 long l_v1;
52 /* { dg-final { scan-file godump-1.out "(?n)^var _l_v1 int\[0-9\]*$" } } */
54 l_t l_v2;
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\]*$" } } */
60 long long ll_v1;
61 /* { dg-final { scan-file godump-1.out "(?n)^var _ll_v1 int\[0-9\]*$" } } */
63 ll_t ll_v2;
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$" } } */
69 unsigned char uc_v1;
70 /* { dg-final { scan-file godump-1.out "(?n)^var _uc_v1 uint\[0-9\]*$" } } */
72 uc_t uc_v2;
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\]*$" } } */
78 unsigned short us_v1;
79 /* { dg-final { scan-file godump-1.out "(?n)^var _us_v1 uint\[0-9\]*$" } } */
81 us_t us_v2;
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\]*$" } } */
87 unsigned int ui_v1;
88 /* { dg-final { scan-file godump-1.out "(?n)^var _ui_v1 uint\[0-9\]*$" } } */
90 ui_t ui_v2;
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\]*$" } } */
96 unsigned long ul_v1;
97 /* { dg-final { scan-file godump-1.out "(?n)^var _ul_v1 uint\[0-9\]*$" } } */
99 ul_t ul_v2;
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\]*$" } } */
108 ull_t ull_v2;
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$" } } */
114 signed char sc_v1;
115 /* { dg-final { scan-file godump-1.out "(?n)^var _sc_v1 int\[0-9\]*$" } } */
117 sc_t sc_v2;
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\]*$" } } */
123 signed short ss_v1;
124 /* { dg-final { scan-file godump-1.out "(?n)^var _ss_v1 int\[0-9\]*$" } } */
126 ss_t ss_v2;
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\]*$" } } */
132 signed int si_v1;
133 /* { dg-final { scan-file godump-1.out "(?n)^var _si_v1 int\[0-9\]*$" } } */
135 si_t si_v2;
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\]*$" } } */
141 signed long sl_v1;
142 /* { dg-final { scan-file godump-1.out "(?n)^var _sl_v1 int\[0-9\]*$" } } */
144 sl_t sl_v2;
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\]*$" } } */
153 sll_t sll_v2;
154 /* { dg-final { scan-file godump-1.out "(?n)^var _sll_v2 _sll_t$" } } */
156 typedef int8_t i8_t;
157 /* { dg-final { scan-file godump-1.out "(?n)^type _i8_t int8$" } } */
159 int8_t i8_v1;
160 /* { dg-final { scan-file godump-1.out "(?n)^var _i8_v1 _int8_t$" } } */
162 i8_t i8_v2;
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$" } } */
168 int16_t i16_v1;
169 /* { dg-final { scan-file godump-1.out "(?n)^var _i16_v1 _int16_t$" } } */
171 i16_t i16_v2;
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$" } } */
177 int32_t i32_v1;
178 /* { dg-final { scan-file godump-1.out "(?n)^var _i32_v1 _int32_t$" } } */
180 i32_t i32_v2;
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$" } } */
186 int64_t i64_v1;
187 /* { dg-final { scan-file godump-1.out "(?n)^var _i64_v1 _int64_t$" } } */
189 i64_t i64_v2;
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$" } } */
195 uint8_t ui8_v1;
196 /* { dg-final { scan-file godump-1.out "(?n)^var _ui8_v1 _uint8_t$" } } */
198 ui8_t ui8_v2;
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$" } } */
204 uint16_t iu16_v1;
205 /* { dg-final { scan-file godump-1.out "(?n)^var _iu16_v1 _uint16_t$" } } */
207 iu16_t iu16_v2;
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$" } } */
213 uint32_t iu32_v1;
214 /* { dg-final { scan-file godump-1.out "(?n)^var _iu32_v1 _uint32_t$" } } */
216 iu32_t iu32_v2;
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$" } } */
222 uint64_t iu64_v1;
223 /* { dg-final { scan-file godump-1.out "(?n)^var _iu64_v1 _uint64_t$" } } */
225 iu64_t iu64_v2;
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$" } } */
231 const char cc_v1;
232 /* { dg-final { scan-file godump-1.out "(?n)^var _cc_v1 u?int8$" } } */
234 cc_t cc_v2;
235 /* { dg-final { scan-file godump-1.out "(?n)^var _cc_v2 _cc_t$" } } */
238 /*** pointer and array types ***/
239 typedef void *vp_t;
240 /* { dg-final { scan-file godump-1.out "(?n)^type _vp_t \\*byte$" } } */
242 void *vp_v1;
243 /* { dg-final { scan-file godump-1.out "(?n)^var _vp_v1 \\*byte$" } } */
245 vp_t vp_v2;
246 /* { dg-final { scan-file godump-1.out "(?n)^var _vp_v2 _vp_t$" } } */
248 typedef int **ipp_t;
249 /* { dg-final { scan-file godump-1.out "(?n)^type _ipp_t \\*\\*int\[0-9\]*$" } } */
251 int **ipp_v1;
252 /* { dg-final { scan-file godump-1.out "(?n)^var _ipp_v1 \\*\\*int\[0-9\]*$" } } */
254 ipp_t ipp_v2;
255 /* { dg-final { scan-file godump-1.out "(?n)^var _ipp_v2 _ipp_t$" } } */
257 typedef char ca_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$" } } */
263 char ca_v1b[2];
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\]*$" } } */
272 short sa2_v1[2];
273 /* { dg-final { scan-file godump-1.out "(?n)^var _sa2_v1 \\\[1\\+1\\\]int\[0-9\]*$" } } */
275 sa2_t sa2_v2;
276 /* { dg-final { scan-file godump-1.out "(?n)^var _sa2_v2 _sa2_t$" } } */
279 /*** floating point types ***/
280 typedef float f_t;
281 /* { dg-final { scan-file godump-1.out "(?n)^type _f_t float\[0-9\]*$" } } */
283 float f_v1;
284 /* { dg-final { scan-file godump-1.out "(?n)^var _f_v1 float\[0-9\]*$" } } */
286 f_t f_v2;
287 /* { dg-final { scan-file godump-1.out "(?n)^var _f_v2 _f_t$" } } */
289 typedef double d_t;
290 /* { dg-final { scan-file godump-1.out "(?n)^type _d_t float\[0-9\]*$" } } */
292 double d_v1;
293 /* { dg-final { scan-file godump-1.out "(?n)^var _d_v1 float\[0-9\]*$" } } */
295 d_t d_v2;
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\]*$" } } */
301 long double ld_v1;
302 /* { dg-final { scan-file godump-1.out "(?n)^// var _ld_v1 INVALID-float-\[0-9\]*$" } } */
304 ld_t ld_v2;
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\]*$" } } */
311 _Complex cx_v1;
312 /* { dg-final { scan-file godump-1.out "(?n)^var _cx_v1 complex\[0-9\]*$" } } */
314 cx_t cx_v2;
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\]*$" } } */
323 fcx_t fcx_v2;
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\]*$" } } */
332 dcx_t dcx_v2;
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\]*$" } } */
341 ldcx_t ldcx_v2;
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$" } } */
347 int _Complex icx_v1;
348 /* { dg-final { scan-file godump-1.out "(?n)^// var _icx_v1 INVALID-complex-non-real$" } } */
350 icx_t icx_v2;
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$" } } */
358 typedef ni_t ni2_t;
359 /* { dg-final { scan-file godump-1.out "(?n)^type _ni2_t int32$" } } */
361 ni2_t ni2_v2;
362 /* { dg-final { scan-file godump-1.out "(?n)^var _ni2_v2 _ni2_t$" } } */
364 typedef ni2_t ni3_t;
365 /* { dg-final { scan-file godump-1.out "(?n)^type _ni3_t int32$" } } */
367 ni3_t ni3_v2;
368 /* { dg-final { scan-file godump-1.out "(?n)^var _ni3_v2 _ni3_t$" } } */
371 /*** enums ***/
372 enum { E11 };
373 /* { dg-final { scan-file godump-1.out "(?n)^const _E11 = 0$" } } */
375 enum { EV11 } e1_v1;
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$" } } */
379 enum { E21, E22 };
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$" } } */
404 et_t et_v2;
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 \{ \}$" } } */
412 struct { } s0e;
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; \}$" } } */
613 typedef struct
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;
617 } tsbf_8b;
618 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_8b struct \{ Godump_0_pad \\\[1\\\]byte; \}$" } } */
620 struct
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;
624 } sbf_8b;
625 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_8b struct \{ Godump_0_pad \\\[1\\\]byte; \}$" } } */
627 typedef struct {
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;
630 uint8_t b9 : 1;
631 } tsbf_9b;
632 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_9b struct \{ Godump_0_pad \\\[2\\\]byte; \}$" } } */
634 struct {
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;
637 uint8_t b9 : 1;
638 } sbf_9b;
639 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_9b struct \{ Godump_0_pad \\\[2\\\]byte; \}$" } } */
641 typedef struct {
642 uint8_t b1 : 7; uint8_t b2 : 7; uint8_t b3 : 2;
643 } tsbf_18b;
644 /* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_18b struct \{ Godump_0_pad \\\[3\\\]byte; \}$" } } */
646 struct {
647 uint8_t b1 : 7; uint8_t b2 : 7; uint8_t b3 : 2;
648 } sbf_18b;
649 /* { dg-final { scan-file godump-1.out "(?n)^var _sbf_18b struct \{ Godump_0_pad \\\[3\\\]byte; \}$" } } */
651 struct
653 uint16_t bf1 : 8;
654 uint8_t c;
655 uint16_t bf2 : 8;
656 uint32_t bf3 : 12;
657 uint16_t s;
658 } sbf_gaps;
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; \}$" } } */
661 typedef struct
663 uint16_t bf1 : 8;
664 uint8_t c;
665 uint16_t bf2 : 8;
666 uint32_t bf3 : 12;
667 uint16_t s;
668 } tsbf_gaps;
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; \}$" } } */
671 typedef struct
673 union
675 int64_t : 1;
676 union
678 int32_t bf : 1;
679 union
681 int16_t s;
682 int8_t c;
685 } u;
686 } ts_nested;
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; \}; \}$" } } */
689 struct
691 union
693 int64_t : 1;
694 union
696 int32_t bf : 1;
697 union
699 int16_t s;
700 int8_t c;
703 } u;
704 } s_nested;
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; \}; \}$" } } */
707 typedef struct
709 struct
711 int64_t : 1;
712 struct
714 int32_t bf : 1;
715 struct
717 int16_t s;
718 int8_t c;
721 } u;
722 } ts_nested2;
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; \}; \}$" } } */
725 struct
727 struct
729 int64_t : 1;
730 struct
732 int32_t bf : 1;
733 struct
735 int16_t s;
736 int8_t c;
739 } u;
740 } s_nested2;
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; \}; \}$" } } */
744 /*** unions ***/
745 typedef union { } tue;
746 /* { dg-final { scan-file godump-1.out "(?n)^type _tue struct \{ \}$" } } */
748 union { } ue;
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; \}$" } } */
795 typedef union
797 union
799 int64_t : 1;
800 union
802 int32_t bf : 1;
803 union
805 int16_t s;
806 int8_t c;
809 } u;
810 } tu_nested;
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; \}; \}$" } } */
813 union
815 union
817 int64_t : 1;
818 union
820 int32_t bf : 1;
821 union
823 int16_t s;
824 int8_t c;
827 } u;
828 } u_nested;
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; \}; \}$" } } */
831 typedef union
833 struct
835 int64_t : 1;
836 struct
838 int32_t bf : 1;
839 struct
841 int16_t s;
842 int8_t c;
845 } u;
846 } tu_nested2;
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; \}; \}$" } } */
849 union
851 struct
853 int64_t : 1;
854 struct
856 int32_t bf : 1;
857 struct
859 int16_t s;
860 int8_t c;
863 } u;
864 } u_nested2;
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; \}; \}$" } } */
868 /*** functions ***/
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" } } */