OSDN Git Service

cp/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / special / conpr-2.C
1 /* 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 <stdlib.h>
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 }