Revert r135493 & r135463
[official-gcc.git] / libmudflap / testsuite / libmudflap.c / fail8-frag.c
blob8309068df474f94f9e3805bcdc595b4c7defd434
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 int main ()
6 char *foo;
7 char *bar;
8 foo = (char *)malloc (10);
9 bar = (char *)malloc (10);
11 free(bar);
13 memcpy(foo, bar, 10);
14 return 0;
16 /* { dg-output "mudflap violation 1.*memcpy source.*" } */
17 /* { dg-output "Nearby object.*" } */
18 /* { dg-output "mudflap dead object.*malloc region.*alloc time.*dealloc time.*" } */
19 /* { dg-do run { xfail *-*-* } } */