Skip to content

Commit 48878db

Browse files
committed
---
yaml --- r: 2031 b: refs/heads/master c: f28a9d8 h: refs/heads/master i: 2029: 119b934 2027: 6233dad 2023: 64db226 2015: 5453cae v: v3
1 parent b9d7dc9 commit 48878db

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 009e01dbe74699d137410c13fca70370d376a824
2+
refs/heads/master: f28a9d8f5203fc01c870ec15b44f8156ebc63168

trunk/src/comp/middle/trans.rs

+4
Original file line numberDiff line numberDiff line change
@@ -3892,6 +3892,10 @@ fn trans_index(@block_ctxt cx, &ast.span sp, @ast.expr base,
38923892
elt = next_cx.build.GEP(body, vec(C_int(0), scaled_ix));
38933893
} else {
38943894
elt = next_cx.build.GEP(body, vec(C_int(0), ix_val));
3895+
3896+
// We're crossing a box boundary here, so we may need to pointer cast.
3897+
auto llunitty = type_of(next_cx.fcx.ccx, unit_ty);
3898+
elt = next_cx.build.PointerCast(elt, T_ptr(llunitty));
38953899
}
38963900

38973901
ret lval_mem(next_cx, elt);

0 commit comments

Comments
 (0)