c++: Add fixed test [PR70077]

Fixed with r10-1280.

	PR c++/70077

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/noexcept76.C: New test.
This commit is contained in:
Marek Polacek 2022-02-23 12:37:43 -05:00
parent fdc46830f1
commit 9675ecf7f9

View File

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