summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr68680.c
blob: 5524e156362ef94b0ba9a165581181ce13a57854 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* PR tree-optimization/68680 */
/* { dg-do compile } */
/* { dg-options "-O2 -fstack-protector-strong" } */

int foo (char *);

int
bar (unsigned long x)
{
  char a[x];
  return foo (a);
}

/* Verify that this function is stack protected.  */
/* { dg-final { scan-assembler "stack_chk_fail" } } */