aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/ubsan/cxx1y-vla.C
blob: ca1e922d69a4d4fac288166bfbff411e2d04de57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do run { target c++1y } } */
/* { dg-options "-fsanitize=vla-bound -Wall -Wno-unused-variable" } */
/* { dg-shouldfail "ubsan" } */

int
main (void)
{
  int y = -18;
  int a[y];
  return 0;
}

/* { dg-output "terminate called after throwing an instance" } */