Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/inh-ctor21.C

raw
1 // PR c++/70972
2 // { dg-do run { target c++11 } }
3
4 struct abort_on_copy{
5 abort_on_copy(abort_on_copy&&) = default;
6 abort_on_copy(const abort_on_copy&) { __builtin_abort(); }
7 abort_on_copy() = default;
8 };
9
10 struct A {
11 A(abort_on_copy) {}
12 };
13 struct B : A {
14 using A::A;
15 };
16
17 int main() {
18 B b(abort_on_copy{});
19 }