Listtree.mcc: add information about SetDropMark
[AROS.git] / compiler / purify / test6.c
blob526aca40bf9b19e1e408e3e8ebf27e0c5bb1b18b
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <stdio.h>
7 #include <stdlib.h>
9 int main (int argc, char ** argv)
11 char * str;
12 int i;
14 str = malloc (8);
16 printf ("str=%p (malloc)\n", str);
18 i = str[3]; /* UMR */
20 str[-1] = 0; /* IWR */
21 str[8] = 0; /* IWR */
23 str = calloc (1, 3); /* MLK */
25 printf ("str=%p (calloc)\n", str);
27 i = str[1]; /* ok */
28 str[4] = 0; /* IWR */
30 str = realloc (str, 7);
32 printf ("str=%p (realloc)\n", str);
34 str[4] = 0; /* ok */
35 i = str[1]; /* ok */
36 i = str[5]; /* UMR */
38 free (str);
40 i = str[1]; /* FMR */
41 str[1] = 1; /* FMW */
43 return 0;