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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [inherit/] [covariant18.C] - Rev 693

Compare with Previous | Blame | View Log

// PR c++/47873
// { dg-do run }

struct Base
{
    virtual ~Base(){}

    virtual Base& This() { return *this; }
};


struct Ent : virtual Base
{
    void *m_Body;

    Ent& This() { return *this; }

    virtual Ent& body()
    {
        return This();
    }

};


struct Msg : virtual Ent
{
    Msg()
    {
        body();
    }

    Msg& This() { return *this; }
};

int main()
{
    Msg m;

    return 0;
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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