summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.robertl/eb71.C
blob: b1288e238b5d3a2543ad48e0909857a290ad3470 (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
// { dg-do assemble  }
typedef __SIZE_TYPE__ size_t;

class   A {

public:
  void          operator delete(void*, size_t);
  void*         operator new(size_t);
};

class   B   : public A  {
friend class   D;

  B();
  unsigned      counter;
};

class   D {

  int                   ins( B*&);
};

int
D::ins( B*& tempN)
{
  unsigned i;

  if (i == 10) {
  }
  else {
  }

  tempN = new B();
  tempN->counter = 20;

  return 0;
}