gcc/testsuite/g++.dg/cpp0x/lambda/pr94426-1.C
raw| 1 | // { dg-do compile { target c++14 } } |
| 2 | // PR 94426 ICE mangling lambda |
| 3 | // { dg-options {-flto -O2} } |
| 4 | // { dg-require-effective-target lto } |
| 5 | |
| 6 | template <bool> using Void = void; |
| 7 | |
| 8 | template <typename U> bool Init (U) {return true;} |
| 9 | template <typename> bool VAR = Init ([] {}); |
| 10 | |
| 11 | template <typename T> |
| 12 | Void<false && VAR<T>> Foo (T) |
| 13 | {} |
| 14 | |
| 15 | void q () |
| 16 | { |
| 17 | Foo ([] {}); |
| 18 | } |