summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-12 21:40:35 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-12 21:40:35 +0000
commit79b91333efb11e707fc2d0a7809840bbc0ddf134 (patch)
tree5304e76103176660b67b2893749e870c6d538abc
parent3602d821c747ab6c49adec9dbe11928242b19b22 (diff)
downloadppe42-gcc-79b91333efb11e707fc2d0a7809840bbc0ddf134.tar.gz
ppe42-gcc-79b91333efb11e707fc2d0a7809840bbc0ddf134.zip
Test case for PR 16254.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87408 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/g++.dg/eh/cleanup4.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/eh/cleanup4.C b/gcc/testsuite/g++.dg/eh/cleanup4.C
new file mode 100644
index 00000000000..ba2d891c949
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/cleanup4.C
@@ -0,0 +1,17 @@
+// PR 16254
+// { dg-do compile }
+// We lost a CLEANUP_POINT_EXPR, leading to a crash destroying temp of A.
+
+struct A
+{
+ ~A ();
+ A (int);
+};
+
+int bar (const A &);
+
+void
+foo (int i)
+{
+ int format[1] = { bar (A (i)) };
+}
OpenPOWER on IntegriCloud