aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/debug/btf/btf-struct-1.c
blob: 79156cd7bcf637f9ce9a998078ccc60e7e678696 (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
/* Test BTF generation of struct type.

   Two BTF_KIND_STRUCT records are expected.
   - struct foo with 3 members
   - struct data with 2 members  */

/* { dg-do compile } */
/* { dg-options "-O0 -gbtf -dA" } */

/* { dg-final { scan-assembler-times "\[\t \]0x4000003\[\t \]+\[^\n\]*btt_info" 1 } } */
/* { dg-final { scan-assembler-times "\[\t \]0x4000002\[\t \]+\[^\n\]*btt_info" 1 } } */
/* { dg-final { scan-assembler-times " btm_type: \\(BTF_KIND_INT" 3 } } */
/* { dg-final { scan-assembler-times " btm_type: \\(BTF_KIND_ARRAY" 1 } } */
/* { dg-final { scan-assembler-times " btm_type: \\(BTF_KIND_STRUCT" 1 } } */

struct foo
{
  int after;
  int before;
  struct {
    unsigned short n_valid;
    int set[10];
  } data;
} my_foo;