Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / template / vtable2.C
blob3bcc1ac3f8a687b2037af00eb5e8f7271a6741b3
1 // Use a small template instantiation depth to speed up testing 
2 // { dg-options "-ftemplate-depth-5" }
3 // { dg-do compile }
5 // Origin: rullo.pat@tiscalinet.it
6 //         Nathanael Nerode <neroden@gcc.gnu.org>
7 //         Wolfgang Bangerth <bangerth@dealii.org>
9 // PR c++/6749: Infinite loop generating vtable.
11 template <class T> struct inner {};
13 template <class T> struct parent {
14   virtual void f()                      // { dg-error "instantiation depth" }
15     { parent<inner<T> > p; };
18 template struct parent<int>;