| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-effective-target naked_functions } */ |
| 3 |
/* { dg-options "-O0" } */ |
| 4 |
|
| 5 |
struct s { |
| 6 |
char a; |
| 7 |
int b; |
| 8 |
}; |
| 9 |
|
| 10 |
__attribute__((naked)) |
| 11 |
void foo () { |
| 12 |
struct s x = {}; /* { dg-error "cannot allocate stack for variable" } */ |
| 13 |
} |