aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020109-1.c
blob: 532fe6de2d589e1d1beed5982b69090cec25eb44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* This testcase ICEd when 2 different successors of a basic block
   were successfully threaded and try_forward_edges was not expecting
   that.  */

typedef struct A
{
  struct A *s, *t;
  unsigned int u;
} A;

void bar (A *);

void
foo (A *x, A *y, A *z)
{
  while (y
	 && (((y && y->t && y->t->u) ? y : z)->t
	     == ((x && x->t && x->t->u) ? x : z)->t))
    y = y->s;

  if (y)
    bar (y);
}