Add a tetst for PR middle-end/83471

Message ID 20171219133301.GA15592@intel.com
State New
Headers show
Series
  • Add a tetst for PR middle-end/83471
Related show

Commit Message

H.J. Lu Dec. 19, 2017, 1:33 p.m.
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

-- 
2.14.3

Patch

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();
+}