2004-05-13 08:41:07 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2009-07-01 14:27:33 +02:00
|
|
|
int *y;
|
2004-05-13 08:41:07 +02:00
|
|
|
int main ()
|
|
|
|
{
|
|
|
|
int i = 10;
|
|
|
|
int *x = (int *) malloc (i * sizeof (int));
|
2009-07-01 14:27:33 +02:00
|
|
|
y = x;
|
2004-05-13 08:41:07 +02:00
|
|
|
while (i--)
|
|
|
|
{
|
|
|
|
++x;
|
|
|
|
*x = 0;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
/* { dg-output "mudflap violation 1.*" } */
|
|
|
|
/* { dg-output "Nearby object 1.*" } */
|
|
|
|
/* { dg-output "mudflap object.*malloc region.*" } */
|
|
|
|
/* { dg-do run { xfail *-*-* } } */
|