blob: 38dbde56a814c3edfa234363637ef4ac29efcbc0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
typedef struct
{
short f : 3;
} small;
struct
{
int i;
small s[4];
} x;
main ()
{
int i;
for (i = 0; i < 5; i++)
{
/* Optimization barrier. Prevent gcc from seeing the undefined behavior. */
__asm ("" : "+r" (i));
x.s[i].f = 0;
}
exit (0);
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object.*" } */
/* { dg-output "mudflap object.* x.*" } */
/* { dg-do run { xfail *-*-* } } */
|