gcc/testsuite/gcc.dg/debug/btf/btf-function-7.c
raw| 1 | /* Test BTF for inlined functions. |
| 2 | |
| 3 | See PR/112656 - btf: function prototypes generated with name |
| 4 | BTF_KIND_FUNC_PROTO must be anonymous. */ |
| 5 | |
| 6 | /* { dg-do compile } */ |
| 7 | /* { dg-options "-O2 -gbtf -dA" } */ |
| 8 | |
| 9 | /* { dg-final { scan-assembler-times "BTF_KIND_FUNC_PROTO ''\\(\[0-9a-z\]*\\)'" 0 } } */ |
| 10 | |
| 11 | static int log_event(const char *event_name, void *dev_ptr) |
| 12 | { |
| 13 | return 666; |
| 14 | } |
| 15 | |
| 16 | int foo () |
| 17 | { |
| 18 | return log_event ("foobar", ((void *)0)); |
| 19 | } |