URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [access4.C] - Rev 154
Compare with Previous | Blame | View Log
// { dg-do assemble }
// GROUPS passed access
// (Message bugs/access:3)
// From: jamshid@ses.com (Jamshid Afshar)
// Date: Wed, 2 Mar 94 18:24:22 CST
// Subject: g++ 2.5.5 doesn't warn about inaccessible virtual base ctor
// Message-ID: <9403030024.AA04534@ses.com>
class ForceLeafSterile { // { dg-error "" }
friend class Sterile;
ForceLeafSterile() {} // { dg-error "" }
};
class Sterile : private virtual ForceLeafSterile {
public:
Sterile() {}
Sterile(const char* /*blah*/) {}
};
class Illegitimate : public Sterile {
public:
Illegitimate() {} // { dg-error "" } can't access virtual base deflt ctor
Illegitimate(const char* /*blah*/)
: ForceLeafSterile() {} // { dg-error "" } can't access default ctor
Illegitimate(const Illegitimate&)
{} // { dg-error "" } can't access default ctor
};