1 /* { dg-additional-options "-O1" } */
2
3 struct list_head {
4 struct list_head *next, *prev;
5 };
6
7 struct mbochs_dmabuf {
8 /* [...snip...] */
9 struct dma_buf *buf;
10 /* [...snip...] */
11 struct list_head next;
12 /* [...snip...] */
13 };
14
15 void mbochs_close(struct list_head *dmabufs,
16 struct mbochs_dmabuf *dmabuf,
17 struct mbochs_dmabuf *tmp)
18 {
19 /* [...snip...] */
20 while (&dmabuf->next != dmabufs)
21 {
22 dmabuf = tmp;
23 tmp = ((struct mbochs_dmabuf *)((void *)(tmp->next.next) - __builtin_offsetof(struct mbochs_dmabuf, next)));
24 }
25
26 /* [...snip...] */
27 }