mirror of git://gcc.gnu.org/git/gcc.git
Don't crash if append arguments are erroneous.
From-SVN: r168489
This commit is contained in:
parent
d5d4d14e15
commit
c7f15f802a
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue