URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// 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());
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.