gcc/testsuite/gcc.c-torture/compile/pr25514.c
raw| 1 | struct node { |
| 2 | struct node *next; |
| 3 | int value; |
| 4 | }; |
| 5 | |
| 6 | struct node *current_node, global_list; |
| 7 | |
| 8 | void foo (struct node *); |
| 9 | |
| 10 | void |
| 11 | bar (void) |
| 12 | { |
| 13 | struct node *node, *next; |
| 14 | |
| 15 | node = current_node; |
| 16 | next = node->next; |
| 17 | if (node != &global_list) |
| 18 | current_node = next; |
| 19 | else |
| 20 | { |
| 21 | node = global_list.next; |
| 22 | global_list.value = node->value; |
| 23 | global_list.next = node->next; |
| 24 | } |
| 25 | foo (node); |
| 26 | } |