summaryrefslogtreecommitdiff
path: root/libmudflap/testsuite/libmudflap.c/fail34-frag.c
blob: f6572b019a4f382055857d09a2685b79dfa7ec91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdlib.h>

struct s
{
  int a1[4];
};

struct s a, b;
int idx = 7; /* should pass to the next object */

int
main ()
{
  int i, j=0;
  int a_before_b = (& a < & b);
  j = (a_before_b ? a.a1[idx] : b.a1[idx]);
  return j;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object.*" } */
/* { dg-output "mudflap object.*\[ab\]" } */
/* { dg-do run { xfail *-*-* } } */