2006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR middle-end/27384
+ * fold-const.c (size_binop): Move sanity check for arguments to
+ the beginning of the function.
+
PR middle-end/27488
* fold-const.c (tree_expr_nonnegative_p): Return early on invalid
expression.
{
tree type = TREE_TYPE (arg0);
+ if (arg0 == error_mark_node || arg1 == error_mark_node)
+ return error_mark_node;
+
gcc_assert (TREE_CODE (type) == INTEGER_TYPE && TYPE_IS_SIZETYPE (type)
&& type == TREE_TYPE (arg1));
return int_const_binop (code, arg0, arg1, 0);
}
- if (arg0 == error_mark_node || arg1 == error_mark_node)
- return error_mark_node;
-
return fold_build2 (code, type, arg0, arg1);
}