| ... | @@ -11873,10 +11873,15 @@ static ConstCastOnly types_match_const_cast_only(IrAnalyze *ira, ZigType *wanted | ... | @@ -11873,10 +11873,15 @@ static ConstCastOnly types_match_const_cast_only(IrAnalyze *ira, ZigType *wanted |
| 11873 | } | 11873 | } |
| 11874 | | 11874 | |
| 11875 | if (wanted_type->id == ZigTypeIdInt && actual_type->id == ZigTypeIdInt) { | 11875 | if (wanted_type->id == ZigTypeIdInt && actual_type->id == ZigTypeIdInt) { |
| 11876 | result.id = ConstCastResultIdIntShorten; | 11876 | if (wanted_type->data.integral.is_signed != actual_type->data.integral.is_signed || |
| 11877 | result.data.int_shorten = heap::c_allocator.allocate_nonzero<ConstCastIntShorten>(1); | 11877 | wanted_type->data.integral.bit_count != actual_type->data.integral.bit_count) |
| 11878 | result.data.int_shorten->wanted_type = wanted_type; | 11878 | { |
| 11879 | result.data.int_shorten->actual_type = actual_type; | 11879 | result.id = ConstCastResultIdIntShorten; |
| | 11880 | result.data.int_shorten = heap::c_allocator.allocate_nonzero<ConstCastIntShorten>(1); |
| | 11881 | result.data.int_shorten->wanted_type = wanted_type; |
| | 11882 | result.data.int_shorten->actual_type = actual_type; |
| | 11883 | return result; |
| | 11884 | } |
| 11880 | return result; | 11885 | return result; |
| 11881 | } | 11886 | } |
| 11882 | | 11887 | |