aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr25514.c
blob: 0bf5aa9077dc0f9b8f909f43f217b009e860de36 (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
struct node {
  struct node *next;
  int value;
};

struct node *current_node, global_list;

void
bar (void)
{
  struct node *node, *next;

  node = current_node;
  next = node->next;
  if (node != &global_list)
    current_node = next;
  else
    {
      node = global_list.next;
      global_list.value = node->value;
      global_list.next = node->next;
    }
  foo (node);
}