8sa1-gcc/gcc/testsuite/g++.dg/special/conpr-3.C
Jonathan Larmour 561cb39b35 new
From-SVN: r25071
1999-02-07 10:40:17 -05:00

21 lines
288 B
C

/* { dg-do run } */
class foo_t {
int x;
static int count;
public:
foo_t(void) { x=++count; }
int get(void) { return x; }
};
int foo_t::count;
extern foo_t foo1, foo2;
int main(void) {
if ( (foo1.get() != 2) || (foo2.get() != 1) )
abort();
exit(0);
}