aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp23/auto-array4.C
blob: 4385c4a6bf907cba8aa8adda7a5839ec6b886eaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/102414
// PR c++/101874
// { dg-do compile { target c++11 } }
// { dg-options "" }

void
f (int i)
{
  auto x[i] = { 0 }; // { dg-message "variable-length array of .auto." }
  auto(*p)[i] = (int(*)[i])0; // { dg-message "variable-length array of .auto." }
  int a[3];
  auto (*a1)[0/0] = &a; // { dg-message "variable-length array of .auto." }
// { dg-warning "division by zero" "" { target *-*-* } .-1 }
}