aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr51245.c
blob: e5e2ded1308ea6e79bd922694397b5b2390c212e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile } */

struct S { int s; } a, *b, **c;
int d;

struct S
foo (void)
{
  struct S s = { 0 }, *e = &a;
  if (d)
    **c = *b;
  while (1)
    {
      *b = s;
      *e = *b;
      if (a.s)
	break;
    }
  return **c;
}