gcc/testsuite/g++.dg/lto/pr66180_0.C
raw| 1 | // { dg-lto-do link } |
| 2 | // { dg-require-effective-target lto_incremental } |
| 3 | // { dg-lto-options { { -flto -std=c++14 -r -nostdlib } } } |
| 4 | /* { dg-skip-if "requires hosted libstdc++ for memory make_unique" { ! hostedlib } } */ |
| 5 | |
| 6 | #include <memory> |
| 7 | namespace { |
| 8 | class A { |
| 9 | int i; |
| 10 | }; |
| 11 | } |
| 12 | class G { |
| 13 | std::unique_ptr<A> foo() const; |
| 14 | }; |
| 15 | std::unique_ptr<A> G::foo() const { return std::make_unique<A>(); } |
| 16 |