drd: Add a consistency check
[valgrind.git] / drd / tests / new_delete.cpp
blob45664c1633385059abc317c7d06adeb080075198
1 /** Simple regression test triggering the C++ operators new and delete. */
3 #include <stdio.h>
5 int main(int argc, char** argv)
7 int zero = 0;
8 int* p = new int;
9 int* q = new int[733];
10 delete[] q;
11 delete p;
13 q = new int[zero];
14 delete q;
16 fprintf(stderr, "Success.\n");
18 return 0;