gcc/testsuite/gcc.target/bpf/naked-1.c
raw| 1 | /* Verify that __attribute__((naked)) is accepted and |
| 2 | produces a naked function. Also, the compiler must not |
| 3 | warn for the lack of return statement. */ |
| 4 | /* { dg-do compile } */ |
| 5 | /* { dg-options "-O0 -Wreturn-type" } */ |
| 6 | |
| 7 | int __attribute__((naked)) foo() |
| 8 | { |
| 9 | __asm__ volatile ("@ naked"); |
| 10 | } |
| 11 | /* { dg-final { scan-assembler "\t@ naked" } } */ |