1#include <stdio.h>
2#include <stdlib.h>
3#include "leak.h"
4#include "../memcheck.h"
5
6// Live 0-sized blocks were being reported as leaked.
7// Also, test that a pointer in a register is handled correctly.
8int main()
9{
10	DECLARE_LEAK_COUNTERS;
11
12	register char *foo;
13
14        GET_INITIAL_LEAK_COUNTS;
15
16	foo = malloc(0);
17
18	GET_FINAL_LEAK_COUNTS;
19
20	PRINT_LEAK_COUNTS(stderr);
21
22	free(foo);
23	return 0;
24}
25