Here we were winding up in get_tinfo_decl with a template type that was still incomplete because nothing else had required it to be complete. So we initially decide to treat it as a class with no bases. But then the process of creating the initializer for the type_info node causes the type to be complete, so we generate an initializer for a class with bases, which doesn't match the type we already gave it. Fixed by instantiating the type in get_tinfo_decl. Tested x86_64-pc-linux-gnu, applying to trunk.