We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b58ed2 commit 578fcdeCopy full SHA for 578fcde
src/base.rs
@@ -660,7 +660,9 @@ fn codegen_stmt<'tcx>(
660
.val
661
.try_to_bits(fx.tcx.data_layout.pointer_size)
662
.unwrap();
663
- if fx.clif_type(operand.layout().ty) == Some(types::I8) {
+ if operand.layout().size.bytes() == 0 {
664
+ // Do nothing for ZST's
665
+ } else if fx.clif_type(operand.layout().ty) == Some(types::I8) {
666
let times = fx.bcx.ins().iconst(fx.pointer_type, times as i64);
667
// FIXME use emit_small_memset where possible
668
let addr = lval.to_ptr().get_addr(fx);
0 commit comments