repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
FSF GCC merge 02/23/03
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
special
/
conpr-3.C
blob
c5fc235e779bed9a38848526fd090ccb12107198
1
/* { dg-do run } */
2
3
#include <stdlib.h>
4
5
class foo_t {
6
int x;
7
static int count;
8
public:
9
foo_t(void) { x=++count; }
10
int get(void) { return x; }
11
};
12
13
int foo_t::count;
14
15
extern foo_t foo1, foo2;
16
17
int main(void) {
18
19
if ( (foo1.get() != 2) || (foo2.get() != 1) )
20
abort();
21
exit(0);
22
}