Debian Codegraph @

gcc/testsuite/gcc.target/bpf/attr-kernel-helper.c

raw
1 /* Basic test for kernel_helper attribute BTF information. */
2
3 /* { dg-do compile } */
4 /* { dg-options "-O0 -dA -gbtf -masm=normal" } */
5
6 extern int foo_helper(int) __attribute((kernel_helper(42)));
7 extern int foo_nohelper(int);
8
9 int bar (int arg)
10 {
11 return foo_helper (arg) + foo_nohelper (arg);
12 }
13
14 /* { dg-final { scan-assembler-times "BTF_KIND_FUNC 'foo_nohelper'" 1 } } */
15 /* { dg-final { scan-assembler-times "BTF_KIND_FUNC 'foo_helper'" 0 } } */