summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/vla7.C
blob: 5246f9c8c3887a45bdb775808473aaf50455d47f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// PR c++/40013
// { dg-options "" }

template <class T>
struct A
{
  struct B
  {
    struct
    {
      int fn () { return 0; }
    } b;
  };
  void test ();
};

template <class T>
void
A <T>::test ()
{
  B a;
  int vla[a.b.fn ()];
}

int
main ()
{
  A <char> a;
  a.test ();
}