summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/new3.C
blob: 843756841fd03392fee53ce926df092f4402b297 (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
// { dg-do run  }
typedef __SIZE_TYPE__ size_t;

template <class T>
struct A
{
  int size;
  A ()
    {
      size = 20;
      T *p;
      p = new T[size];
      int foo;
      foo = 5 * size;
    }
};

struct B
{
  virtual ~B() { }
  void operator delete [] (void *ptr, size_t size) { }
};

int main ()
{
  A<B> *p = new A<B>;
}