summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/vla4.C
blob: ecec908074d55f725d33743bf345753e70921d3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// PR c++/29318
// { dg-options "" }

#include <typeinfo>

void f(int i) {
  try {
    int a[i];
    throw &a; // { dg-error "variable size" }
  } catch (int (*)[i]) { // { dg-error "variable size" }
  }
}

int main()
{
  int i = 5;
  int va[i];
  const std::type_info& info(typeid(&va)); // { dg-error "variable size" }

  return 0;
}