gcc/testsuite/g++.dg/lto/pr118817_0.C
raw| 1 | // { dg-lto-do link } |
| 2 | // { dg-lto-options { { -O3 -fPIC -flto -shared -std=c++20 -Wall } } } |
| 3 | // { dg-require-effective-target fpic } |
| 4 | // { dg-require-effective-target shared } |
| 5 | |
| 6 | #include <memory> |
| 7 | #include <vector> |
| 8 | #include <string> |
| 9 | |
| 10 | int func() |
| 11 | { |
| 12 | auto strVec = std::make_unique<std::vector<std::string>>(); |
| 13 | strVec->emplace_back("One"); |
| 14 | strVec->emplace_back("Two"); |
| 15 | strVec->emplace_back("Three"); |
| 16 | return 0; |
| 17 | } |