Debian Codegraph @

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

raw
1 /* Test BTF generation for pointer types.
2
3 Two pointer types are expected:
4 - int *
5 - struct st *
6 */
7
8 /* { dg-do compile } */
9 /* { dg-options "-O0 -gbtf -dA" } */
10
11 /* { dg-final { scan-assembler-times "\[\t \]0x2000000\[\t \]+\[^\n\]*btt_info" 2 } } */
12 /* { dg-final { scan-assembeler-times " BTF_KIND_PTR ''\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_INT 'int'"}} */
13 /* { dg-final { scan-assembeler-times " BTF_KIND_PTR ''\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_STRUCT 'st'"}} */
14
15 /* { dg-final { scan-assembler-times "ascii \"int.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */
16 /* { dg-final { scan-assembler-times "ascii \"st.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */
17
18 int foo = 10;
19 int *pfoo = &foo;
20
21 struct st
22 {
23 int a;
24 int *pb;
25 struct st * next;
26 };
27
28 struct st * bar;