| 1 |
/* BTF generation for variables. */ |
| 2 |
|
| 3 |
/* { dg-do compile } */ |
| 4 |
/* { dg-options "-O0 -gbtf -dA" } */ |
| 5 |
|
| 6 |
/* We expect 6 variables */ |
| 7 |
/* { dg-final { scan-assembler-times "\[\t \]0xe000000\[\t \]+\[^\n\]*btv_info" 6 } } */ |
| 8 |
/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'x1'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_INT" 1 } } */ |
| 9 |
/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'bar'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_UNION" 1 } } */ |
| 10 |
/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'lala'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_ENUM" 1 } } */ |
| 11 |
/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'arr'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_ARRAY" 1 } } */ |
| 12 |
/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'plong'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_PTR" 1 } } */ |
| 13 |
/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'st_inst'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_STRUCT 'st'" 1 } } */ |
| 14 |
|
| 15 |
unsigned int x1; |
| 16 |
|
| 17 |
struct st |
| 18 |
{ |
| 19 |
int a; |
| 20 |
int b; |
| 21 |
}; |
| 22 |
|
| 23 |
union { |
| 24 |
long int value; |
| 25 |
struct st * pointer; |
| 26 |
} bar; |
| 27 |
|
| 28 |
enum |
| 29 |
{ |
| 30 |
FOO = 0, |
| 31 |
BAR = 2, |
| 32 |
BAZ, |
| 33 |
} lala; |
| 34 |
|
| 35 |
int arr[10][20]; |
| 36 |
|
| 37 |
unsigned long * plong; |
| 38 |
|
| 39 |
struct st st_inst; |