OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* gcc.c-torture/compile/20080625-1.c: Skip for M32C.
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
compile
/
pr39041.c
1
int test_bit(int nr, void *addr)
2
{
3
int *a = (int *)addr;
4
int mask;
5
a += nr;
6
mask = 1 << nr;
7
return mask & *a;
8
}
9
struct {
10
struct {
11
int disabled;
12
} *data[1];
13
} trace;
14
struct {
15
unsigned bits[1];
16
} cpumask;
17
void inc(int *);
18
void dec(int *);
19
int foo(void)
20
{
21
int cpu;
22
for (cpu = 0; cpu < 1; cpu++) {
23
if (test_bit(cpu, cpumask.bits))
24
inc(&trace.data[cpu]->disabled);
25
if (!test_bit(cpu, cpumask.bits))
26
dec(&trace.data[cpu]->disabled);
27
}
28
}