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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [pr46856.c] - Blame information for rev 715

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

Line No. Rev Author Line
1 688 jeremybenn
struct data {
2
    int prio;
3
    signed char status;
4
};
5
 
6
struct base {
7
    unsigned _num;
8
    struct data vec[10];
9
};
10
 
11
static struct data *ix(struct base *base, unsigned i)
12
{
13
    return &base->vec[i];
14
}
15
 
16
struct heap {
17
    struct base base;
18
};
19
 
20
struct heap *heap;
21
 
22
void increase_insn_priority (int *fld, int amount)
23
{
24
    if (ix(heap ? &heap->base : 0, *fld)->status > 0)
25
        ix(heap ? &heap->base : 0, *fld)->prio += amount;
26
}

powered by: WebSVN 2.1.0

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