Fixed with r10-1280.

Tested x86_64-pc-linux-gnu, applying to trunk.

        PR c++/70077

gcc/testsuite/ChangeLog:

        * g++.dg/cpp0x/noexcept76.C: New test.
---
 gcc/testsuite/g++.dg/cpp0x/noexcept76.C | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/cpp0x/noexcept76.C

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{};
+}

base-commit: fdc46830f1b793dc791099acfadc3f0f8cc24c0e
-- 
2.35.1

Reply via email to