1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 int main () 5 { 6 volatile int foo[10]; 7 int sz = sizeof (int); 8 9 volatile char *bar = (char *)foo; 10 bar [sz * 10] = 0; 11 return 0; 12 } 13 /* { dg-output "mudflap violation 1.*" } */ 14 /* { dg-output "Nearby object 1.*" } */ 15 /* { dg-output "mudflap object.*.main. foo.*" } */ 16 /* { dg-do run { xfail *-*-* } } */ 17