diff --git a/src/stage1/ir.cpp b/src/stage1/ir.cpp index 7906df3b0..566f5f83f 100644 --- a/src/stage1/ir.cpp +++ b/src/stage1/ir.cpp @@ -30687,8 +30687,8 @@ static IrInstGen *ir_analyze_bit_cast(IrAnalyze *ira, IrInst* source_instr, IrIn const bool src_is_ptr = handle_is_ptr(ira->codegen, src_type); const bool dest_is_ptr = handle_is_ptr(ira->codegen, dest_type); - const uint64_t dest_size_bytes = type_size(ira->codegen, dest_type); - const uint64_t src_size_bytes = type_size(ira->codegen, src_type); + const uint64_t dest_size_bytes = type_size_bits(ira->codegen, dest_type); + const uint64_t src_size_bytes = type_size_bits(ira->codegen, src_type); if (dest_size_bytes != src_size_bytes) { ir_add_error(ira, source_instr, buf_sprintf("destination type '%s' has size %" ZIG_PRI_u64 " but source type '%s' has size %" ZIG_PRI_u64,