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++.old-deja/] [g++.jason/] [access8.C] - Diff between revs 149 and 154

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

Rev 149 Rev 154
// { dg-do assemble  }
// { dg-do assemble  }
// From: smidt@dd.chalmers.se (Peter Smidt)
// From: smidt@dd.chalmers.se (Peter Smidt)
// Date: 25 Jan 1994 23:41:33 -0500
// Date: 25 Jan 1994 23:41:33 -0500
// Bug: g++ forgets access decls after the definition.
// Bug: g++ forgets access decls after the definition.
class inh { // { dg-error "" } inaccessible
class inh { // { dg-error "" } inaccessible
        int a;
        int a;
protected:
protected:
        void myf(int);
        void myf(int);
};
};
class mel : private inh {
class mel : private inh {
protected:
protected:
        int t;
        int t;
        inh::myf;
        inh::myf;
};
};
class top_t : protected mel {
class top_t : protected mel {
public:
public:
        void myf(int);
        void myf(int);
};
};
void inh::myf(int i) {
void inh::myf(int i) {
        a = i;
        a = i;
}
}
void top_t::myf(int i) {
void top_t::myf(int i) {
        inh::myf(i);            // { dg-error "" } cannot convert to inh
        inh::myf(i);            // { dg-error "" } cannot convert to inh
        mel::myf(i);
        mel::myf(i);
}
}
 
 

powered by: WebSVN 2.1.0

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