* init.c (build_vec_init): Call ubsan_instrument_bounds to check
[official-gcc.git] / gcc / testsuite / g++.dg / ubsan / vla-1.C
blobe7f24945f7ae1ccdec2abe7209596b3d9e2cb4b0
1 // { dg-do run }
2 // { dg-options "-Wno-vla -fsanitize=undefined" }
3 // { dg-shouldfail "ubsan" }
4 // { dg-output "index 1 out of bounds" }
6 void f(int i) {
7   int ar[i] = { 42, 24 };
10 int main()
12   f(1);