This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add a tetst for PR middle-end/83471


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]