1 /* { dg-do compile } */
2 /* { dg-require-effective-target naked_functions } */
3 /* { dg-options "-O0" } */
12 __attribute__((naked
))
14 char aa
[ ] = {}; /* { dg-error "cannot allocate stack for variable" } */
16 char ac
[2] = {}; /* { dg-error "cannot allocate stack for variable" } */
17 char ad
[3] = {}; /* { dg-error "cannot allocate stack for variable" } */
20 __attribute__((naked
))
23 char ab
[2] = {0}; /* { dg-error "cannot allocate stack for variable" } */
24 char ac
[3] = {0}; /* { dg-error "cannot allocate stack for variable" } */
25 char ad
[4] = {0}; /* { dg-error "cannot allocate stack for variable" } */
28 __attribute__((naked
))
30 char aa
[2] = {0,0}; /* { dg-error "cannot allocate stack for variable" } */
32 __attribute__((naked
))
34 char aa
[3] = {0,0,0}; /* { dg-error "cannot allocate stack for variable" } */
37 __attribute__((naked
))
39 char aa
[4] = {0,0,0,0}; /* { dg-error "cannot allocate stack for variable" } */