OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [special/] [conpr-3.C] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
/* { dg-do run } */
/* { dg-do run } */
/* { dg-additional-sources "conpr-3a.cc conpr-3b.cc" } */
/* { dg-additional-sources "conpr-3a.cc conpr-3b.cc" } */
#include 
#include 
class foo_t {
class foo_t {
    int x;
    int x;
    static int count;
    static int count;
public:
public:
    foo_t(void) { x=++count; }
    foo_t(void) { x=++count; }
    int get(void) { return x; }
    int get(void) { return x; }
};
};
int foo_t::count;
int foo_t::count;
extern foo_t foo1, foo2;
extern foo_t foo1, foo2;
int main(void) {
int main(void) {
    if ( (foo1.get() != 2) || (foo2.get() != 1) )
    if ( (foo1.get() != 2) || (foo2.get() != 1) )
        abort();
        abort();
    exit(0);
    exit(0);
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.