blob: 03c323a6d49b07f186c66f0dc252f4ca61b0bb1b (
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
|
/* Test BTF generation for struct with 0 size bitfield.
We expect a struct with 2 members to be generated. The size 0 bitfield
should not have any entry in the member list. */
/* { dg-do compile ) */
/* { dg-options "-O0 -gbtf -dA" } */
/* Struct with bitfield members, and 2 members. */
/* { dg-final { scan-assembler-times "\[\t \]0x84000002\[\t \]+\[^\n\]*btt_info" 1 } } */
/* Bitfield size 31 (0x1f) at offset 0. */
/* { dg-final { scan-assembler-times "\[\t \]0x1f000000\[\t \]+\[^\n\]*btm_offset" 1 } } */
/* Bitfield size 32 (0x20) at offset 32. */
/* { dg-final { scan-assembler-times "\[\t \]0x20000020\[\t \]+\[^\n\]*btm_offset" 1 } } */
/* Only 2 members. */
/* { dg-final { scan-assembler-times "MEMBER" 2 } } */
struct foo
{
unsigned a : 31;
unsigned : 0;
unsigned c : 32;
} myfoo;
|