blob: 7e446b40503dc8303af70d035a3e3f310a32c880 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
struct foo {
int bar [10];
};
struct foo *k = (struct foo *) malloc (2 * sizeof(int));
k->bar[5] = 9;
free (k);
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object 1.*" } */
/* { dg-output "mudflap object.*.malloc region.*" } */
/* { dg-do run { xfail *-*-* } } */
|