===================================================================
@@ -11725,6 +11725,8 @@ check_elaborated_type_specifier (enum tag_types ta
decl = TYPE_NAME (TREE_TYPE (decl));
type = TREE_TYPE (decl);
+ if (!type)
+ return NULL_TREE;
/* Check TEMPLATE_TYPE_PARM first because DECL_IMPLICIT_TYPEDEF_P
is false for this case as well. */
===================================================================
@@ -0,0 +1,3 @@
+// PR c++/56534
+
+template < struct template rebind < > // { dg-error "expected" }