blob: 45664c1633385059abc317c7d06adeb080075198 [file] [log] [blame]
bart3d4c3322008-05-10 08:48:14 +00001/** Simple regression test triggering the C++ operators new and delete. */
2
3#include <stdio.h>
4
5int main(int argc, char** argv)
6{
bartfd680492008-05-13 16:16:14 +00007 int zero = 0;
bart3d4c3322008-05-10 08:48:14 +00008 int* p = new int;
9 int* q = new int[733];
10 delete[] q;
11 delete p;
12
bartfd680492008-05-13 16:16:14 +000013 q = new int[zero];
14 delete q;
15
bart3d4c3322008-05-10 08:48:14 +000016 fprintf(stderr, "Success.\n");
17
18 return 0;
19}