* cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
authorJason Merrill <jason@redhat.com>
Tue, 16 Feb 2010 15:08:23 +0000 (10:08 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 16 Feb 2010 15:08:23 +0000 (10:08 -0500)
From-SVN: r156803

gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c

index 5b433f0..4a7b125 100644 (file)
@@ -1,5 +1,7 @@
 2010-02-16  Jason Merrill  <jason@redhat.com>
 
+       * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
+
        PR c++/43031
        * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
        VIEW_CONVERT_EXPR for conversions between structural equality types
index 7dc79b2..cf81350 100644 (file)
@@ -560,8 +560,10 @@ cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
        tree op0 = TREE_OPERAND (*expr_p, 0);
        tree op1 = TREE_OPERAND (*expr_p, 1);
 
-       if ((TYPE_STRUCTURAL_EQUALITY_P (TREE_TYPE (op0))
-            || TYPE_STRUCTURAL_EQUALITY_P (TREE_TYPE (op1)))
+       if (!error_operand_p (op0)
+           && !error_operand_p (op1)
+           && (TYPE_STRUCTURAL_EQUALITY_P (TREE_TYPE (op0))
+               || TYPE_STRUCTURAL_EQUALITY_P (TREE_TYPE (op1)))
            && !useless_type_conversion_p (TREE_TYPE (op1), TREE_TYPE (op0)))
          TREE_OPERAND (*expr_p, 1) = build1 (VIEW_CONVERT_EXPR,
                                              TREE_TYPE (op0), op1);