repo.or.cz
/
valgrind.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
drd: Add a consistency check
[valgrind.git]
/
drd
/
tests
/
new_delete.cpp
blob
45664c1633385059abc317c7d06adeb080075198
1
/** Simple regression test triggering the C++ operators new and delete. */
2
3
#include <stdio.h>
4
5
int
main
(
int
argc
,
char
**
argv
)
6
{
7
int
zero
=
0
;
8
int
*
p
=
new
int
;
9
int
*
q
=
new
int
[
733
];
10
delete
[]
q
;
11
delete
p
;
12
13
q
=
new
int
[
zero
];
14
delete
q
;
15
16
fprintf
(
stderr
,
"Success.
\n
"
);
17
18
return
0
;
19
}