| ... | @@ -27759,6 +27759,13 @@ static IrInstGen *ir_align_cast(IrAnalyze *ira, IrInstGen *target, uint32_t alig | ... | @@ -27759,6 +27759,13 @@ static IrInstGen *ir_align_cast(IrAnalyze *ira, IrInstGen *target, uint32_t alig |
| 27759 | old_align_bytes = fn_type_id.alignment; | 27759 | old_align_bytes = fn_type_id.alignment; |
| 27760 | fn_type_id.alignment = align_bytes; | 27760 | fn_type_id.alignment = align_bytes; |
| 27761 | result_type = get_fn_type(ira->codegen, &fn_type_id); | 27761 | result_type = get_fn_type(ira->codegen, &fn_type_id); |
| | 27762 | } else if (target_type->id == ZigTypeIdAnyFrame) { |
| | 27763 | if (align_bytes >= target_fn_align(ira->codegen->zig_target)) { |
| | 27764 | result_type = target_type; |
| | 27765 | } else { |
| | 27766 | ir_add_error(ira, &target->base, buf_sprintf("sub-aligned anyframe not allowed")); |
| | 27767 | return ira->codegen->invalid_inst_gen; |
| | 27768 | } |
| 27762 | } else if (target_type->id == ZigTypeIdOptional && | 27769 | } else if (target_type->id == ZigTypeIdOptional && |
| 27763 | target_type->data.maybe.child_type->id == ZigTypeIdPointer) | 27770 | target_type->data.maybe.child_type->id == ZigTypeIdPointer) |
| 27764 | { | 27771 | { |