summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/p8483.C
blob: 08b5161bae9969f358ae2f6088ea820ef1c03f1a (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
33
34
35
36
// { dg-do run  }
// prms-id: 8483

int count;

class A {
public:
  A() { ++count; }
  ~A() { }
};

class B {
private:
  A b[2];  
};

class C {
public:
private:
  A c[2][2];
};

class D {
public:
private:
  A d[2][2][2];
};

int main() {
  { A a; }
  { B b; }
  { C c; }
  { D d; }
  if (count != 15)
    return 1;
}