testsuite: Skip analyzer tests on AIX.
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / data-model-14.c
blob1dbcb70112303d01fa04a539e4c3b42034773b8f
1 #include <stdlib.h>
3 void *global_ptr;
5 void test_1 (int i)
7 global_ptr = malloc (1024); /* { dg-message "allocated here" } */
8 *(int *)&global_ptr = i; /* { dg-warning "leak of 'global_ptr'" } */
11 void test_2 (int i)
13 void *p = malloc (1024); /* { dg-message "allocated here" } */
14 global_ptr = p;
15 *(int *)&p = i;
16 p = global_ptr;
17 free (p);
18 free (global_ptr); /* { dg-warning "double-'free' of 'p'" } */