/* This used to ICE (PR c++/29573) */ /* { dg-do compile } */ template struct A {}; template struct B : A {}; /* { dg-error "template argument" } */ template struct C : A {}; /* { dg-error "template argument" } */ int a; template struct D : A {}; /* This used to ICE as well. */ template struct E : A {}; /* This used to ICE as well. */