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

typedef struct Node Node;

struct Node
{
  Node *Pred, *Suc;
  Node *SubBestPred;
  Node *SubBestSuc;
};

void
foo (Node *N)
{
  do
    {
      N->SubBestPred = N->Pred;
      N->SubBestSuc = N->Suc;
    }
  while (N = N->Suc);
}