Merge branches/gcc-4_8-branch rev 216856
[official-gcc.git] / gcc-4_8-branch / gcc / testsuite / gcc.target / mips / pr62030-octeon.c
blob5e3d3b3b635ee1d34d095043feb08e2f62bcc649
1 /* { dg-do run } */
2 /* { dg-options "-march=octeon" } */
4 extern void abort (void);
6 struct node
8 struct node *next;
9 struct node *prev;
12 struct node node;
14 struct head
16 struct node *first;
19 struct head heads[5];
21 int k = 2;
23 struct head *head = &heads[2];
25 static int __attribute__((noinline))
26 foo (void)
28 node.prev = (void *)head;
29 head->first = &node;
31 struct node *n = head->first;
32 struct head *h = &heads[k];
33 struct node *next = n->next;
35 if (n->prev == (void *)h)
36 h->first = next;
37 else
38 n->prev->next = next;
40 n->next = h->first;
41 return n->next == &node;
44 int
45 main (void)
47 if (foo ())
48 abort ();
49 return 0;