From b68a16895f0fc4497c314dbf61a02977b76206d0 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 19 Dec 2017 13:38:29 +0000 Subject: [PATCH] Add a tetst for PR middle-end/83471 PR middle-end/83471 * g++.dg/torture/pr83471.C: New test. From-SVN: r255821 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/torture/pr83471.C | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 gcc/testsuite/g++.dg/torture/pr83471.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5dea098306b..9849fbaa8af 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-12-19 H.J. Lu + + PR middle-end/83471 + * g++.dg/torture/pr83471.C: New test. + 2017-12-19 Martin Liska * gcc.dg/tree-prof/switch-case-1.c: Scan IPA profile dump diff --git a/gcc/testsuite/g++.dg/torture/pr83471.C b/gcc/testsuite/g++.dg/torture/pr83471.C new file mode 100644 index 00000000000..b9687265d77 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr83471.C @@ -0,0 +1,21 @@ +/* { dg-do compile } */ + +class a { +public: + void *operator new(__SIZE_TYPE__, int); +}; +class b : public a { +public: + b(); + virtual void c() {} + void m_fn2(); +}; +int d; +void e() { + long f; + b *g; + (f); + g = new (d) b; + g->c(); + g->m_fn2(); +} -- 2.30.2