From: Markus Trippelsdorf Date: Mon, 17 Nov 2014 09:21:34 +0000 (+0000) Subject: Add testcase for PR 63894 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3de943b37a97df67488226bd8f78ef24f33f5893;p=gcc.git Add testcase for PR 63894 2014-11-17 Markus Trippelsdorf PR ipa/63894 * g++.dg/ipa/pr63894.C: New test. From-SVN: r217648 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e4b0d9cc930..e0333c9fa7c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-11-17 Markus Trippelsdorf + + PR ipa/63894 + * g++.dg/ipa/pr63894.C: New test. + 2014-11-17 Terry Guo * gcc.target/arm/thumb1-ual-1.c: New test. diff --git a/gcc/testsuite/g++.dg/ipa/pr63894.C b/gcc/testsuite/g++.dg/ipa/pr63894.C new file mode 100644 index 00000000000..d0ba96bc5a3 --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/pr63894.C @@ -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); +}