OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [pr33833.c] - Rev 689

Compare with Previous | Blame | View Log

/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
/* { dg-do compile } */
 
#define signed
typedef unsigned __PTRDIFF_TYPE__ uintptr_t;
#undef signed
 
struct list_head
{
  struct list_head *prev;
};
struct prio_array
{
  struct list_head queue[100];
};
struct rq
{
  struct prio_array *active, arrays[2];
} per_cpu__runqueues;
 
void sched_init (uintptr_t __ptr)
{
  int j, k;
  struct prio_array *array;
  struct rq *rq;
  rq = (&(*( { (typeof (&per_cpu__runqueues)) (__ptr); } )));
  for (j = 0; j < 2; j++)
  {
    array = rq->arrays + j;
    for (k = 0; k < 100; k++)
        (array->queue + k)->prev = array->queue;
  }
}
 
/* { dg-final { cleanup-tree-dump "vect" } } */
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.