aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr51957-1.c
blob: d899771ad001ba253dc093f3c2e1ae92164b1b15 (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
27
28
29
/* PR target/51957 */
/* { dg-do link } */
/* { dg-options "-O2 -g -fprofile-use" } */
/* { dg-additional-sources "pr51957-2.c" } */

int v[128];
#include "pr51957-1.h"

void
foo (U *x)
{
  T *a = x->u;
  while (1)
    {
      union R *b;
      b = fn1 ();
      if (b != w[0] && !(v[b->p->c] == 1))
	{
	  fn2 (a->t, "foobar", b->p);
	  b = w[0];
	}
      if (b != w[0])
	fn3 ();
      if (w[0] && b != w[0])
	fn4 (b->p);
      if (b != w[0] && (v[b->p->c] == 1) && fn4 (b->p))
	break;
    }
}