public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-800] testsuite: Add testcase for already fixed PR [PR94616]
@ 2021-05-14 13:36 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2021-05-14 13:36 UTC (permalink / raw)
To: gcc-cvs
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) {
+ }
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-14 13:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14 13:36 [gcc r12-800] testsuite: Add testcase for already fixed PR [PR94616] Jakub Jelinek
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).