Add -gno-strict-dwarf to dg-options in various btf enum tests
[official-gcc.git] / gcc / testsuite / gcc.dg / debug / btf / btf-bitfields-3.c
blob08622b771e67af0304c503c85b96326a24dc023d
1 /* Test BTF generation for enum-type bitfields
3 It is allowed to have a bitfield type be an enum type.
4 We expect the following types:
6 [1] enum 'foo'(1U#B) size=4U#B
7 'BAR' value=0
8 'BAZ' value=1
9 'QUZ' value=2
10 'QUX' value=3
11 [2] int 'unsigned int' size=4 offset=0 bits=32
12 [3] struct 'bitt' size=4
13 member 'f' type=1 bitfield_size=2 bit_offset=0
16 /* { dg-do compile } */
17 /* { dg-options "-O0 -gbtf -gno-strict-dwarf -dA" } */
19 /* Enum with 4 members. */
20 /* { dg-final { scan-assembler-times "\[\t \]0x6000004\[\t \]+\[^\n\]*btt_info" 1 } } */
21 /* Struct with 1 bitfield member. */
22 /* { dg-final { scan-assembler-times "\[\t \]0x84000001\[\t \]+\[^\n\]*btt_info" 1 } } */
24 /* Bitfield "f" points to type ID 1. */
25 /* { dg-final { scan-assembler-times " btm_type: \\(BTF_KIND_ENUM 'foo'" 1 } } */
27 enum foo
29 BAR = 0,
30 BAZ = 1,
31 QUZ = 2,
32 QUX = 3
35 struct bitt
37 enum foo f : 2;
38 } bitty;