Commit a047abca authored by dbarbera's avatar dbarbera
Browse files

Fixed size and align in memcpy call for sequence assignment

parent 3c6dd88d
......@@ -477,8 +477,8 @@ def _generate_assign(left, right):
# This is extracted as an standalone function because is used by
# multiple generation rules
if left.type.kind == core.TYPE_POINTER and left.type.pointee.kind == core.TYPE_STRUCT:
size = core.Constant.int(g.i64, 2)
align = core.Constant.int(g.i32, 1)
size = core.Constant.sizeof(left.type.pointee)
align = core.Constant.int(g.i32, 0)
volatile = core.Constant.int(g.i1, 0)
right_ptr = g.builder.bitcast(right, g.i8_ptr)
......
Supports Markdown
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