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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [pr39041.c] - Rev 298

Go to most recent revision | Compare with Previous | Blame | View Log

int test_bit(int nr, void *addr)
{
  int *a = (int *)addr;
  int mask;
  a += nr;
  mask = 1 << nr;
  return mask & *a;
}
struct {
    struct {
	int disabled;
    } *data[1];
} trace;
struct {
    unsigned bits[1];
} cpumask;
void inc(int *);
void dec(int *);
int foo(void)
{
  int cpu;
  for (cpu = 0; cpu < 1; cpu++) {
      if (test_bit(cpu, cpumask.bits))
	inc(&trace.data[cpu]->disabled);
      if (!test_bit(cpu, cpumask.bits))
	dec(&trace.data[cpu]->disabled);
  }
}
 

Go to most recent revision | 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.