Debian Codegraph @

gcc/testsuite/g++.dg/parse/crash79.C

raw
1 // PR c++/117129
2 // { dg-do "compile" { target c++11 } }
3
4 struct Noncopyable {
5 Noncopyable();
6 Noncopyable(const Noncopyable &) = delete; // { dg-note "declared here" }
7 virtual ~Noncopyable();
8 };
9 Noncopyable nrvo() {
10 {
11 Noncopyable A;
12 return A; // { dg-error "use of deleted function" }
13 // { dg-note "display considered" "" { target *-*-* } .-1 }
14 }
15 }