URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [special/] [conpr-4.C] - Rev 308
Go to most recent revision | Compare with Previous | Blame | View Log
/* { dg-do run { target init_priority } } */
/* { dg-additional-sources "conpr-3b.cc conpr-3a.cc" } */
#include <stdlib.h>
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);
}
Go to most recent revision | Compare with Previous | Blame | View Log