2 /* { dg-options "-O2" } */
8 struct _Node
*next
, *prev
;
11 void __attribute__ ((noinline
)) append (Node
* q
, Node
* p
)
20 swap (Node
** a
, Node
** b
)
27 /* Miscompilation seems to happen here. If one removes the if condition
28 (which should be true) the program works fine. */
30 ListSwap (Node
* x
, Node
* y
)
35 swap (&x
->next
, &y
->next
);
36 swap (&x
->prev
, &y
->prev
);
37 x
->next
->prev
= x
->prev
->next
= x
;
38 y
->next
->prev
= y
->prev
->next
= y
;
52 if (&A
!= A
.next
->prev
)