public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8401] c++: add test [PR113347]
@ 2024-01-24 19:42 Jason Merrill
  0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2024-01-24 19:42 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:aedfdd340cbb4a97a8f6d432720a4df374c1e467

commit r14-8401-gaedfdd340cbb4a97a8f6d432720a4df374c1e467
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Jan 23 16:09:15 2024 -0500

    c++: add test [PR113347]
    
    The patch for this PR is unneeded on trunk, but let's add the test.
    
            PR c++/113347
    
    gcc/testsuite/ChangeLog:
    
            * g++.dg/eh/return3.C: New test.

Diff:
---
 gcc/testsuite/g++.dg/eh/return3.C | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gcc/testsuite/g++.dg/eh/return3.C b/gcc/testsuite/g++.dg/eh/return3.C
new file mode 100644
index 00000000000..76aa50d523d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/return3.C
@@ -0,0 +1,17 @@
+// PR c++/113347
+
+#if __cplusplus < 201103L
+#define THROWS
+#else
+#define THROWS noexcept(false)
+#endif
+
+struct A { ~A(); };
+struct B { ~B() THROWS; };
+
+A f()
+{
+  A a;
+  return a;
+  B();
+}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-24 19:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-24 19:42 [gcc r14-8401] c++: add test [PR113347] Jason Merrill

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).