summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/vla10.C
blob: 17cdb2f9f766a5a6ac45fa90ab09438b7eaf79f6 (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
31
32
// PR c++/48446
// { dg-options "" }

template<typename T>
struct A
{
  ~A ();
  T *operator-> () const;
};

struct B
{
  typedef A <B> P;
  static P foo (int);
};

struct C
{
  typedef A<C> P;
  static const int c = 80;
};

C::P bar ();

void
baz ()
{
  char z[bar ()->c];
  {
    B::P m = B::foo (sizeof (z));
  }
}