summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/nest16.C
blob: 72c0078be761a5782f5151a5a4ba0cc4dc6bed9f (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
37
38
39
40
41
// { dg-do assemble  }
// GROUPS passed nested-classes
class BDDHeap {
public:
    BDDHeap();
    BDDHeap(const BDDHeap&);

    class Page {
    public:
	int i;
    };
    struct Pointer {
	Page *page;
	unsigned index;

	Pointer();
	Pointer(const BDDHeap& heap);
    };

    struct Half {
	struct {
	    Page *top;
	    Page **tail;
	} inuse;

	Half();
    };

    Half half[2];
    unsigned halfspace;
};

inline
BDDHeap::Pointer::Pointer(const BDDHeap& heap):
page(0),
index(0)
{
    Page *x = heap.half[heap.halfspace].inuse.top;
    page = x;
}