https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92024
--- Comment #1 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
This seems to fix the ICE:
Index: pt.c
===================================================================
--- pt.c (revision 276634)
+++ pt.c (working copy)
@@ -10973,6 +10973,9 @@
|| uses_template_parms (type))
return type;
+ if (CLASSTYPE_TEMPLATE_INFO (type) == NULL)
+ return error_mark_node;
+
/* Figure out which template is being instantiated. */
templ = most_general_template (CLASSTYPE_TI_TEMPLATE (type));
gcc_assert (TREE_CODE (templ) == TEMPLATE_DECL);