Test case for PR 16254.
authorRichard Henderson <rth@gcc.gnu.org>
Sun, 12 Sep 2004 21:40:35 +0000 (14:40 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 12 Sep 2004 21:40:35 +0000 (14:40 -0700)
From-SVN: r87408

gcc/testsuite/g++.dg/eh/cleanup4.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/eh/cleanup4.C b/gcc/testsuite/g++.dg/eh/cleanup4.C
new file mode 100644 (file)
index 0000000..ba2d891
--- /dev/null
@@ -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)) };
+}