OSDN Git Service

PR c++/43076
[pf3gnuchains/gcc-fork.git] / gcc / cp / pt.c
index a58dba2..a8e1b78 100644 (file)
@@ -4548,6 +4548,9 @@ push_template_decl_real (tree decl, bool is_friend)
 
            if (current == decl)
              current = ctx;
+           else if (current == NULL_TREE)
+             /* Can happen in erroneous input.  */
+             break;
            else
              current = (TYPE_P (current)
                         ? TYPE_CONTEXT (current)