diff options
author | Richard Henderson <rth@gcc.gnu.org> | 2004-09-12 14:40:35 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-09-12 14:40:35 -0700 |
commit | 4c8dad30d21c280eb0ef238c4985252fff94694c (patch) | |
tree | 5304e76103176660b67b2893749e870c6d538abc | |
parent | 373c0e7f04097a50d480846786894883adbf5e45 (diff) | |
download | gcc-4c8dad30d21c280eb0ef238c4985252fff94694c.zip gcc-4c8dad30d21c280eb0ef238c4985252fff94694c.tar.gz gcc-4c8dad30d21c280eb0ef238c4985252fff94694c.tar.bz2 |
Test case for PR 16254.
From-SVN: r87408
-rw-r--r-- | gcc/testsuite/g++.dg/eh/cleanup4.C | 17 |
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 0000000..ba2d891 --- /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)) }; +} |