re PR target/71571 ([CRIS] Multiple inheritance non-virtual PIC thunk causes crash)

PR target/71571
	* g++.dg/torture/pr71571.C: New test.

From-SVN: r237616
This commit is contained in:
David B. Robins 2016-06-20 20:02:03 +00:00 committed by Hans-Peter Nilsson
parent b2b4e462a8
commit 3947cf1919
2 changed files with 48 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2016-06-20 David B. Robins <gcc@davidrobins.net>
PR target/71571
* g++.dg/torture/pr71571.C: New test.
2016-06-20 Jakub Jelinek <jakub@redhat.com>
PR target/71559

View file

@ -0,0 +1,43 @@
// { dg-do run }
// { dg-options "-fno-inline" { target { ! fpic } } }
// { dg-options "-fpic -fno-inline" { target fpic } }
class XBase
{
public:
virtual void FuncA() = 0;
};
class Y
{
protected:
virtual void FuncB() {}
};
class X1 : public Y, public XBase
{
public:
void FuncA() {}
};
class X2 : public XBase
{
public:
X2(XBase &xb) : m_xb(xb) { }
void FuncA()
{
m_xb.FuncA();
}
private:
XBase &m_xb;
};
int main()
{
X1 x1;
X2 x2(x1);
XBase *pxb = &x2;
pxb->FuncA();
}