gcc/testsuite/gcc.target/arm/naked-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O0" } */ |
| 3 | /* Check that function arguments aren't assigned and copied to stack slots |
| 4 | in naked functions. This usually happens at -O0 (presumably for |
| 5 | better debugging), but is highly undesirable if we haven't created |
| 6 | a stack frame. */ |
| 7 | void __attribute__((naked)) |
| 8 | foo(int n) |
| 9 | { |
| 10 | __asm__ volatile ("frob r0\n"); |
| 11 | } |
| 12 | /* { dg-final { scan-assembler "\tfrob r0" } } */ |
| 13 | /* { dg-final { scan-assembler-not "\tstr" } } */ |