mirror of
https://github.com/odin-lang/Odin.git
synced 2026-05-25 21:28:13 +00:00
fix #6344: field-first index writes on #soa[dynamic]T and #soa[]T
This commit is contained in:
@@ -4654,6 +4654,8 @@ gb_internal lbAddr lb_build_addr_index_expr(lbProcedure *p, Ast *expr) {
|
||||
}
|
||||
}
|
||||
lbValue val = lb_emit_ptr_offset(p, field, index);
|
||||
// make sure it's ^T and not [^]T
|
||||
val.type = alloc_type_multi_pointer_to_pointer(val.type);
|
||||
return lb_addr(val);
|
||||
}
|
||||
|
||||
@@ -5795,8 +5797,8 @@ gb_internal lbAddr lb_build_addr_internal(lbProcedure *p, Ast *expr) {
|
||||
if (sub_sel.index.count > 0) {
|
||||
item = lb_emit_deep_field_gep(p, item, sub_sel);
|
||||
}
|
||||
// make sure it's ^T and not [^]T
|
||||
item.type = alloc_type_multi_pointer_to_pointer(item.type);
|
||||
// make sure it's ^T and not [^]T
|
||||
item.type = alloc_type_multi_pointer_to_pointer(item.type);
|
||||
|
||||
return lb_addr(item);
|
||||
} else if (addr.kind == lbAddr_Swizzle) {
|
||||
|
||||
Reference in New Issue
Block a user