| 1 |
/* BTF generation for variables with removed type. |
| 2 |
|
| 3 |
BTF does not support vector types, so no representation for the type |
| 4 |
of 'bar' will be emitted. In this test, we check to also ensure that the |
| 5 |
variable 'bar' is not emitted, as it references a type that is not supported |
| 6 |
in BTF. */ |
| 7 |
|
| 8 |
/* { dg-do compile } */ |
| 9 |
/* { dg-options "-O0 -gbtf -dA" } */ |
| 10 |
|
| 11 |
/* We expect only 3 variables. */ |
| 12 |
/* { dg-final { scan-assembler-times "\[\t \]0xe000000\[\t \]+\[^\n\]*btv_info" 3 } } */ |
| 13 |
|
| 14 |
/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'foo'" 1 } } */ |
| 15 |
/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'baz'" 1 } } */ |
| 16 |
/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'myst'" 1 } } */ |
| 17 |
/* { dg-final { scan-assembler-times "ascii \"foo.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */ |
| 18 |
/* { dg-final { scan-assembler-times "ascii \"baz.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */ |
| 19 |
/* { dg-final { scan-assembler-times "ascii \"myst.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */ |
| 20 |
|
| 21 |
int foo; |
| 22 |
float __attribute__((__vector_size__(16))) bar; |
| 23 |
int baz[10]; |
| 24 |
|
| 25 |
struct st |
| 26 |
{ |
| 27 |
int a; |
| 28 |
int b : 6; |
| 29 |
int c : 2; |
| 30 |
} myst; |