aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/g++.dg/other/str_empty.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/str_empty.C b/gcc/testsuite/g++.dg/other/str_empty.C
new file mode 100644
index 0000000..ba9f89d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/str_empty.C
@@ -0,0 +1,16 @@
+// PR c++/31617
+// Segfault in integer_rezop
+// Origin: Andrew Pinski <andrew_pinski@playstation.sony.com>
+// { dg-do compile }
+// { dg-options "-O2" }
+
+struct polynomial {
+ ~polynomial ();
+};
+
+void spline_rep1 ()
+{
+ new polynomial[0];
+}
+
+