testsuite: Skip analyzer tests on AIX.
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / malloc-paths-1.c
blob0436928238c2cf6236fe9215f11daa716736331c
1 /* Verify that we emit sane paths for state machine errors. */
3 #include <stdlib.h>
5 void test_1 (void)
7 void *ptr = malloc (1024); /* { dg-line malloc } */
8 free (ptr); /* { dg-line first_free } */
9 free (ptr); /* { dg-line second_free } */
11 /* { dg-warning "double-'free' of 'ptr'" "warning" { target *-*-* } second_free } */
12 /* { dg-message "\\(1\\) allocated here" "event 1" { target *-*-* } malloc } */
13 /* { dg-message "\\(2\\) first 'free' here" "event 2" { target *-*-* } first_free } */
14 /* { dg-message "\\(3\\) second 'free' here; first 'free' was at \\(2\\)" "event 3" { target *-*-* } second_free } */