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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [pr39041.c] - Rev 688

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);
  }
}
 

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.