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

Subversion Repositories openrisc

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

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
/* { dg-additional-sources "conpr-2a.cc" } */
3
 
4
#include 
5
 
6
class foo_t {
7
    int x;
8
    static int count;
9
public:
10
    foo_t(void) { x=++count; }
11
    int get(void) { return x; }
12
};
13
 
14
int foo_t::count;
15
 
16
extern foo_t foo1, foo2;
17
 
18
int main(void) {
19
 
20
    if ( (foo1.get() != 2) || (foo2.get() != 1) )
21
        abort();
22
    exit(0);
23
}

powered by: WebSVN 2.1.0

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