The following avoids passing down error_mark_node to fold_convert.
PR middle-end/107994
* gimplify.cc (gimplify_expr): Catch errorneous comparison
operand.
Compare scalar mode aggregates as scalar mode values. Using
memcmp for them would be very inefficient at best, and is
plain wrong if bitfields are involved. */
+ if (error_operand_p (TREE_OPERAND (*expr_p, 1)))
+ ret = GS_ERROR;
+ else
{
tree type = TREE_TYPE (TREE_OPERAND (*expr_p, 1));
ret = gimplify_scalar_mode_aggregate_compare (expr_p);
else
ret = gimplify_variable_sized_compare (expr_p);
-
- break;
}
+ break;
/* If *EXPR_P does not need to be special-cased, handle it
according to its class. */