testsuite: Skip analyzer tests on AIX.
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / pr99044-2.c
blobf7badb92f448b0fcfc7b7aed507d81f04f4ba93f
1 /* { dg-additional-options "-Wno-analyzer-symbol-too-complex" } */
3 struct node
5 struct node *next;
6 };
8 void test_1 (struct node *n)
10 while (n)
12 struct node *next = n->next;
13 __builtin_free (n);
14 n = next;
18 extern void *get_ptr (void);
20 void test_2 (void)
22 void *p;
23 while (p = get_ptr ())
24 __builtin_free (p); /* { dg-bogus "double-'free' of 'p'" } */
27 extern void **get_ptr_ptr (void);
29 void test_3 (void)
31 void **p;
32 while (p = get_ptr_ptr ())
33 __builtin_free (*p); /* { dg-bogus "double-'free'" } */
36 void test_4 (void)
38 void *p = (void *)0;
39 while (1)
41 __builtin_free (p); /* { dg-bogus "double-'free' of 'p'" } */
42 p = get_ptr ();