Commit c7f15f80 by Ian Lance Taylor

Don't crash if append arguments are erroneous.

From-SVN: r168489
parent d5d4d14e
...@@ -7965,14 +7965,14 @@ Builtin_call_expression::do_get_tree(Translate_context* context) ...@@ -7965,14 +7965,14 @@ Builtin_call_expression::do_get_tree(Translate_context* context)
Expression* arg1 = args->front(); Expression* arg1 = args->front();
Expression* arg2 = args->back(); Expression* arg2 = args->back();
Array_type* at = arg1->type()->array_type();
Type* element_type = at->element_type();
tree arg1_tree = arg1->get_tree(context); tree arg1_tree = arg1->get_tree(context);
tree arg2_tree = arg2->get_tree(context); tree arg2_tree = arg2->get_tree(context);
if (arg1_tree == error_mark_node || arg2_tree == error_mark_node) if (arg1_tree == error_mark_node || arg2_tree == error_mark_node)
return error_mark_node; return error_mark_node;
Array_type* at = arg1->type()->array_type();
Type* element_type = at->element_type();
arg2_tree = Expression::convert_for_assignment(context, at, arg2_tree = Expression::convert_for_assignment(context, at,
arg2->type(), arg2->type(),
arg2_tree, arg2_tree,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment