gcc/testsuite/g++.dg/template/local-fn3.C
raw| 1 | // PR c++/97171 |
| 2 | |
| 3 | // { dg-require-effective-target lto } |
| 4 | // { dg-additional-options -flto } |
| 5 | |
| 6 | template <typename _UnaryOperation> |
| 7 | void transform(_UnaryOperation); |
| 8 | |
| 9 | template <typename T> |
| 10 | void Apply () |
| 11 | { |
| 12 | extern T Maker (void); // block-scope extern with dependent type |
| 13 | |
| 14 | transform (Maker); |
| 15 | } |
| 16 | |
| 17 | template void Apply<int> (); |