public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-7362] c++: Add fixed test [PR70077]
@ 2022-02-23 17:39 Marek Polacek
  0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2022-02-23 17:39 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:9675ecf7f9beeee340f93c68cf22280f5975a902

commit r12-7362-g9675ecf7f9beeee340f93c68cf22280f5975a902
Author: Marek Polacek <polacek@redhat.com>
Date:   Wed Feb 23 12:37:43 2022 -0500

    c++: Add fixed test [PR70077]
    
    Fixed with r10-1280.
    
            PR c++/70077
    
    gcc/testsuite/ChangeLog:
    
            * g++.dg/cpp0x/noexcept76.C: New test.

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

diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept76.C b/gcc/testsuite/g++.dg/cpp0x/noexcept76.C
new file mode 100644
index 00000000000..fc816477e57
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept76.C
@@ -0,0 +1,17 @@
+// PR c++/70077
+// { dg-do compile { target c++11 } }
+
+struct B {
+    B(int) noexcept { }
+    virtual void f() = 0;
+};
+
+struct D: public B {
+    using B::B;
+    D() noexcept(noexcept(D{42})): B{42} { }
+    void f() override { }
+};
+
+int main() {
+    B *b = new D{};
+}


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

only message in thread, other threads:[~2022-02-23 17:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23 17:39 [gcc r12-7362] c++: Add fixed test [PR70077] Marek Polacek

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