* semantics.c (finish_id_expression): Check for error_mark_node.
authorJason Merrill <jason@redhat.com>
Fri, 10 Oct 2014 20:24:36 +0000 (16:24 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 10 Oct 2014 20:24:36 +0000 (16:24 -0400)
From-SVN: r216104

gcc/cp/ChangeLog
gcc/cp/semantics.c

index 7b2d09f14026a0a65cab8cbd79f7ce20cd6bef2c..1414f2be2f9ebe845684518f1ad9eaa0b2abfda5 100644 (file)
@@ -1,3 +1,7 @@
+2014-10-10  Jason Merrill  <jason@redhat.com>
+
+       * semantics.c (finish_id_expression): Check for error_mark_node.
+
 2014-10-09  Jason Merrill  <jason@redhat.com>
 
        PR c++/63207
index ab8c82ae5f6603a52674c972b156a64000097e95..08658a7f3057de3faa9248498b7bad0c39269166 100644 (file)
@@ -3272,7 +3272,11 @@ finish_id_expression (tree id_expression,
       /* Disallow uses of local variables from containing functions, except
         within lambda-expressions.  */
       if (outer_automatic_var_p (decl))
-       decl = process_outer_var_ref (decl, tf_warning_or_error);
+       {
+         decl = process_outer_var_ref (decl, tf_warning_or_error);
+         if (decl == error_mark_node)
+           return error_mark_node;
+       }
 
       /* Also disallow uses of function parameters outside the function
         body, except inside an unevaluated context (i.e. decltype).  */