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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [pr22488.C] - Diff between revs 154 and 816

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

Rev 154 Rev 816
// PR tree-optimization/22488
// PR tree-optimization/22488
// This testcase is really a C++ FE bug in represnting virtual inheritance
// This testcase is really a C++ FE bug in represnting virtual inheritance
// It gives the appearance to the middle end that the fields exist twice
// It gives the appearance to the middle end that the fields exist twice
// which resulted in a very confused structure analyzer
// which resulted in a very confused structure analyzer
// { dg-do compile }
// { dg-do compile }
// { dg-options "-O" }
// { dg-options "-O" }
struct X
struct X
{
{
    int i0, i1;
    int i0, i1;
      char c;
      char c;
};
};
struct A
struct A
{
{
    int i;
    int i;
      char c0, c1;
      char c0, c1;
        virtual ~A();
        virtual ~A();
};
};
struct B : virtual A {};
struct B : virtual A {};
struct C : B
struct C : B
{
{
    X x;
    X x;
      void bar(X y) { x = y; }
      void bar(X y) { x = y; }
};
};
void foo()
void foo()
{
{
    C().bar(X());
    C().bar(X());
}
}
 
 

powered by: WebSVN 2.1.0

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