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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [special/] [conpr-1.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do run { target init_priority } } */
2
 
3
#include 
4
 
5
class foo_t {
6
    int x;
7
public:
8
    foo_t(void) { x=1; }
9
    int get(void) { return x; }
10
};
11
 
12
static foo_t foo __attribute__((init_priority(5000)));
13
 
14
int main(void) {
15
 
16
    if (foo.get())
17
        exit(0);
18
    else
19
        abort();
20
}

powered by: WebSVN 2.1.0

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