aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/ubsan/vla-2.c
blob: 9cd4ddff2196bba3ead0f746824c21a3f9f93b0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do run } */
/* { dg-options "-fsanitize=vla-bound -Wall -Wno-unused-variable -fno-sanitize-recover=vla-bound" } */

int
main (void)
{
  const int t = 0;
  struct s {
    int x;
    /* Don't instrument this one.  */
    int g[t];
  };
  return 0;
}