From: Richard Henderson Date: Sun, 12 Sep 2004 21:40:35 +0000 (-0700) Subject: Test case for PR 16254. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c8dad30d21c280eb0ef238c4985252fff94694c;p=gcc.git Test case for PR 16254. From-SVN: r87408 --- 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)) }; +}