Add testcase for PR 63894

2014-11-17  Markus Trippelsdorf  <markus@trippelsdorf.de>

  PR ipa/63894
  * g++.dg/ipa/pr63894.C: New test.

From-SVN: r217648
This commit is contained in:
Markus Trippelsdorf 2014-11-17 09:21:34 +00:00 committed by Markus Trippelsdorf
parent c121b4b78b
commit 3de943b37a
2 changed files with 51 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2014-11-17 Markus Trippelsdorf <markus@trippelsdorf.de>
PR ipa/63894
* g++.dg/ipa/pr63894.C: New test.
2014-11-17 Terry Guo <terry.guo@arm.com>
* gcc.target/arm/thumb1-ual-1.c: New test.

View File

@ -0,0 +1,46 @@
/* { dg-do compile } */
/* { dg-options "-O3" } */
struct A
{
void *operator new(unsigned long, int);
};
class C
{
public:
C (int);
};
class D
{
public:
enum Type
{
BOX
};
D (int, Type, C);
};
class F
{
public:
virtual void m_fn1 (int, D);
};
class G : public F, public A
{
};
class K : public G
{
public:
K (C, D);
};
class J
{
D m_fn2 (int);
bool m_fn3 (G *);
};
bool
J::m_fn3 (G *p1)
{
p1->m_fn1 (0, D (0, D::BOX, 0));
K *d = new (0) K (0, m_fn2 (0));
m_fn3 (d);
}