* cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Feb 2010 15:08:23 +0000 (15:08 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Feb 2010 15:08:23 +0000 (15:08 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156803 138bc75d-0d04-0410-961f-82ee72b054a4

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);