summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/pr48470.c
blob: 20343e71bb92a109b209c6d8d5f131e75ef9d930 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* { dg-do compile } */
/* { dg-require-effective-target naked_functions } */
/* { dg-options "-O0" } */

extern void g(int *x);

void __attribute__((naked)) f(void)
{
    int x = 0; /* { dg-error "cannot allocate stack for variable" } */
    g(&x);
}