| 1 |
// Use a small template instantiation depth to speed up testing |
| 2 |
// { dg-options "-ftemplate-depth-5" } |
| 3 |
// { dg-do compile } |
| 4 |
|
| 5 |
// Origin: [email protected] |
| 6 |
// Nathanael Nerode <[email protected]> |
| 7 |
// Wolfgang Bangerth <[email protected]> |
| 8 |
|
| 9 |
// PR c++/6749: Infinite loop generating vtable. |
| 10 |
|
| 11 |
template <class T> struct inner {}; |
| 12 |
|
| 13 |
template <class T> struct parent { |
| 14 |
virtual void f() // { dg-error "depth" } |
| 15 |
{ parent<inner<T> > p; }; |
| 16 |
}; |
| 17 |
|
| 18 |
template struct parent<int>; |
| 19 |
|
| 20 |
// { dg-prune-output "compilation terminated" } |