public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-800] testsuite: Add testcase for already fixed PR [PR94616] Date: Fri, 14 May 2021 13:36:07 +0000 (GMT) [thread overview] Message-ID: <20210514133607.394EC3944817@sourceware.org> (raw) https://gcc.gnu.org/g:3cafe627d6c8bce7e7f46bdbdef3d14e9701ce9d commit r12-800-g3cafe627d6c8bce7e7f46bdbdef3d14e9701ce9d Author: Jakub Jelinek <jakub@redhat.com> Date: Fri May 14 15:34:12 2021 +0200 testsuite: Add testcase for already fixed PR [PR94616] 2021-05-14 Jakub Jelinek <jakub@redhat.com> PR c++/94616 * g++.dg/cpp0x/pr94616.C: New test. Diff: --- gcc/testsuite/g++.dg/cpp0x/pr94616.C | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gcc/testsuite/g++.dg/cpp0x/pr94616.C b/gcc/testsuite/g++.dg/cpp0x/pr94616.C new file mode 100644 index 00000000000..a8fe700a9db --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr94616.C @@ -0,0 +1,23 @@ +// PR c++/94616 +// { dg-do compile { target c++11 } } + +struct Bar { + Bar(int n) { if (n > 0) throw 2; } + ~Bar() {} +}; + +struct Foo { + Bar b1 = 0; + Bar b2 = 1; + Foo() {} + ~Foo() {} +}; + +int +main() +{ + try { + Foo f; + } catch(int) { + } +}
reply other threads:[~2021-05-14 13:36 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210514133607.394EC3944817@sourceware.org \ --to=jakub@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).