Clean up some minor white space issues in trans-decl.c and trans-expr.c
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr52772.C
blob810e6579fba8698bff6351fb73c7d2705460c9ce
1 // { dg-do compile }
3 typedef __SIZE_TYPE__ size_t;
5 class c1;
7 class c2 {
8   public: c2() { };
9   void *operator new(size_t size, const c1 & crc1);
12 class c3 {
13   public: c3() { _Obj = 0; }
14   ~c3() { if (_Obj) delete _Obj; }
15   void set(c2 *pObj);
16   protected: c2 *_Obj;
19 void c3::set(c2 *pObj) { _Obj = pObj; };
21 template<class TYPE> class tc1 : public c2 {
22   public: tc1(int n=0){};
23   int get() const;
24   TYPE& operator[] (int id);
25   TYPE * _data;
26   int _size;
29 template<class TYPE> TYPE & tc1<TYPE>::operator[] (int id) {
30   return _data[id];
33 template<class TYPE> int tc1<TYPE>::get() const {
34   return _size;
37 class c4 {
38   public: c4();
41 class c5 : public c2 {
42   protected: c2 * _own;
43   public: c5(c2 *o) : _own(o) { }
44   c5(const c4 & box);
45   int add(const c4 & ext);
48 class c6 {
49   public: int get() const {};
52 class c7 {
53   friend class c8;
54   int find(c6 * loop) const;
57 class c8 {
58   const c1 & _rc1;
59   int tria(c7 * face, c5 * vtree0 = 0);
62 int c8::tria(c7 * face, c5 * vtree0) {
63   c6 *sLData[64];
64   tc1<c6*> loops(64);
65   while (loops.get() > 1) { 
66     c6 *iloop = 0; 
67     for (int j=1; j<loops.get(); j++) { 
68       if (loops[j]->get() < 32) { 
69         iloop = loops[j];
70       }
71     }
72     face->find(iloop);
73   }
74   c4 box;
75   c3 ctree;
76   c5 *vtree = vtree0;
77   if (!vtree) { 
78     vtree = new (_rc1) c5(box); 
79     ctree.set(vtree); 
80     for (int j=0; j<1; j++) { 
81       c4 sVBBox; 
82       vtree->add(sVBBox);
83     }
84   }