Use the desination type for moves in assign_expr.

for <struct> = nil; the source type is void and thus probably the wrong
size.
This commit is contained in:
Bill Currie 2012-12-13 14:05:24 +09:00
parent 503154257c
commit 821081c9c8

View file

@ -2637,7 +2637,7 @@ assign_expr (expr_t *e1, expr_t *e2)
}
}
if (is_struct (get_type (e1))) {
return new_move_expr (e1, e2, get_type (e2), 0);
return new_move_expr (e1, e2, get_type (e1), 0);
}
if (!type)
internal_error (e1, 0);