Debian Codegraph @

gcc/testsuite/gcc.dg/debug/btf/btf-struct-1.c

raw
1 /* Test BTF generation of struct type.
2
3 Two BTF_KIND_STRUCT records are expected.
4 - struct foo with 3 members
5 - struct data with 2 members */
6
7 /* { dg-do compile } */
8 /* { dg-options "-O0 -gbtf -dA" } */
9
10 /* { dg-final { scan-assembler-times "\[\t \]0x4000003\[\t \]+\[^\n\]*btt_info" 1 } } */
11 /* { dg-final { scan-assembler-times "\[\t \]0x4000002\[\t \]+\[^\n\]*btt_info" 1 } } */
12 /* { dg-final { scan-assembler-times " btm_type: \\(BTF_KIND_INT" 3 } } */
13 /* { dg-final { scan-assembler-times " btm_type: \\(BTF_KIND_ARRAY" 1 } } */
14 /* { dg-final { scan-assembler-times " btm_type: \\(BTF_KIND_STRUCT" 1 } } */
15
16 struct foo
17 {
18 int after;
19 int before;
20 struct {
21 unsigned short n_valid;
22 int set[10];
23 } data;
24 } my_foo;