This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Add a tetst for PR middle-end/83471
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Dec 2017 05:33:01 -0800
- Subject: [PATCH] Add a tetst for PR middle-end/83471
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83471
has been fixed on gcc-7-branch. I am checking this into master and
gcc-7-branch.
H.J.
---
PR middle-end/83471
* g++.dg/torture/pr83471.C: New test.
---
gcc/testsuite/g++.dg/torture/pr83471.C | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 gcc/testsuite/g++.dg/torture/pr83471.C
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.14.3