aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/stack-checking.c
blob: 4b53bedd97b73f8090cbe976ca72c5c11116940e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do run { target { *-*-linux* } } } */
/* { dg-require-stack-check "" } */
/* { dg-options "-fstack-check" } */

int main(void)
{
  char *p;
  if (1)
    {
      char i[48];
      p = __builtin_alloca(8);
      p[0] = 1;
    }

  if (1)
    {
      char i[48], j[64];
      j[48] = 0;
    }

  return !p[0];
}