From 4c8dad30d21c280eb0ef238c4985252fff94694c Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 12 Sep 2004 14:40:35 -0700 Subject: [PATCH] Test case for PR 16254. From-SVN: r87408 --- gcc/testsuite/g++.dg/eh/cleanup4.C | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 gcc/testsuite/g++.dg/eh/cleanup4.C 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)) }; +} -- 2.30.2