Debian Codegraph @

gcc/testsuite/gcc.target/bpf/core-builtin-exprlist-4.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
3
4 struct T {
5 int a;
6 int b;
7 struct U {
8 int c;
9 struct V {
10 int d;
11 int e[4];
12 int f;
13 } *v;
14 } u;
15 };
16
17 void func (struct T * foo)
18 {
19 /* Access string: "0:2:1:1:3" */
20 int *x;
21 int *y;
22 __builtin_preserve_access_index (({
23 x = &((foo->u.v)->e[3]);
24 }));
25
26 *x = 17;
27 }
28
29 /* { dg-final { scan-assembler-times "ascii \"0:2:1.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */
30 /* { dg-final { scan-assembler-times "ascii \"0:1:3.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */
31 /* { dg-final { scan-assembler-times "bpfcr_type" 2 } } */