summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.bob/delete1.C
blob: 9de2a227a923659be615a803eaf9801b70c294ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// { dg-do run  }
// prms-id: 7330
#include <stddef.h>
int size = 0; 

struct X {
    int x;
    void *operator new[](size_t sz) throw()  {
         size = sz;
         return 0;  
    }
    void operator delete[] (void *vp) { ::operator delete(vp); }  
};
int main()
{
     X (*px) [10];

     px = new X[5][10];

     delete [] px;

     return 0;
}