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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [special/] [conpr-2.C] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
/* This doesn't work on solaris2 for reasons described in PR 6482.  */
2
/* { dg-do run { xfail *-*-solaris2* } } */
3
/* { dg-additional-sources "conpr-2a.cc" } */
4
 
5
#include 
6
 
7
class foo_t {
8
    int x;
9
    static int count;
10
public:
11
    foo_t(void) { x=++count; }
12
    int get(void) { return x; }
13
};
14
 
15
int foo_t::count;
16
 
17
extern foo_t foo1, foo2;
18
 
19
int main(void) {
20
 
21
    if ( (foo1.get() != 2) || (foo2.get() != 1) )
22
        abort();
23
    exit(0);
24
}

powered by: WebSVN 2.1.0

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