mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-16 04:20:26 +08:00
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:
parent
fdc46830f1
commit
9675ecf7f9
17
gcc/testsuite/g++.dg/cpp0x/noexcept76.C
Normal file
17
gcc/testsuite/g++.dg/cpp0x/noexcept76.C
Normal 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{};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user