OSDN Git Service

PR tree-optimization/35982
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / pr33833.c
1 /* Testcase by Martin Michlmayr <tbm@cyrius.com> */
2 /* { dg-do compile } */
3
4 struct list_head
5 {
6   struct list_head *prev;
7 };
8 struct prio_array
9 {
10   struct list_head queue[100];
11 };
12 struct rq
13 {
14   struct prio_array *active, arrays[2];
15 } per_cpu__runqueues;
16
17 void sched_init (unsigned long __ptr)
18 {
19   int j, k;
20   struct prio_array *array;
21   struct rq *rq;
22   rq = (&(*( { (typeof (&per_cpu__runqueues)) (__ptr); } )));
23   for (j = 0; j < 2; j++)
24   {
25     array = rq->arrays + j;
26     for (k = 0; k < 100; k++)
27         (array->queue + k)->prev = array->queue;
28   }
29 }
30
31 /* { dg-final { cleanup-tree-dump "vect" } } */