testsuite: Skip analyzer tests on AIX.
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / malloc-ipa-3.c
blob3dcfae8f0a296118d4c98c4885ea211695ef3d2b
1 #include <stdlib.h>
3 void *
4 calls_malloc (void)
6 void *result = malloc (1024);
7 return result;
10 void
11 calls_free (void *victim)
13 free (victim); /* { dg-warning "double-'free' of 'victim'" } */
14 /* TODO: this would be better emitted at the callsite,
15 for such a simple wrapper. */
18 void test (void)
20 void *ptr = calls_malloc ();
21 calls_free (ptr);
22 calls_free (ptr); /* BUG: double-'free'. */