Avoid expicit builtion list in tree-ssa-dce
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / loop-3.c
bloba07f0f4ce01ce49bbbdb5256ae181dca1dd1c84d
1 /* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
3 #include <stdlib.h>
5 void test(int c)
7 int i;
8 char *buffer = (char*)malloc(256);
10 for (i=0; i<255; i++) {
11 buffer[i] = c; /* { dg-warning "use after 'free' of 'buffer'" "use after free" { xfail *-*-* } } */
12 /* { dg-warning "possibly-NULL 'buffer'" "deref of unchecked" { target *-*-* } .-1 } */
13 free(buffer); /* { dg-warning "double-'free' of 'buffer'" } */