summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/delete7.C
blob: e55af6a8d15199b5bf914721de1ffae72c047771 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// { dg-do run  }
// Test that we call a class-specific vector op delete.

#include <new>

int r = 1;

struct A
{
  void operator delete[](void *p) { r = 0; ::operator delete (p); }
};

int main ()
{
  A (*p)[2] = new A[2][2];
  delete [] p;
  return r;
}