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