gcc/testsuite/gcc.target/i386/naked-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O0" } */ |
| 3 | |
| 4 | /* Verify that __attribute__((naked)) produces a naked function |
| 5 | that does not construct a frame. */ |
| 6 | void |
| 7 | __attribute__((naked)) |
| 8 | foo (void) |
| 9 | { |
| 10 | __asm__ ("# naked"); |
| 11 | } |
| 12 | /* { dg-final { scan-assembler "# naked" } } */ |
| 13 | /* { dg-final { scan-assembler-not "(?n)^\\s*push" } } */ |
| 14 | /* { dg-final { scan-assembler-not "(?n)^\\s*pop" } } */ |