repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
special
/
conpr-4.C
blob
c04d188ad70e48cff6e7ca05247900ee23fbc153
1
/* { dg-do run } */
2
/* { dg-additional-sources "conpr-3b.cc conpr-3a.cc" } */
3
4
#include <stdlib.h>
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
}