gcc/testsuite/g++.dg/parse/crash13.C
raw| 1 | // { dg-do compile } |
| 2 | |
| 3 | // Origin: Giovanni Bajo <[email protected]> |
| 4 | |
| 5 | // PR c++/10583: ICE using template function with invalid signature. |
| 6 | |
| 7 | template <typename> |
| 8 | struct A |
| 9 | { |
| 10 | struct B |
| 11 | {}; |
| 12 | }; |
| 13 | |
| 14 | template <typename T> |
| 15 | void func(A<T>::B* ) // { dg-error "6:variable or field .func. declared void" } |
| 16 | // { dg-error "expected" "" { target *-*-* } .-1 } |
| 17 | { |
| 18 | } |
| 19 | |
| 20 | int main() |
| 21 | { |
| 22 | func<void>(0); // { dg-error "not declared|expression|;" } |
| 23 | } |