From 0d4354324c17a15689118d259c069a6ee094dab4 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 26 Mar 2020 12:54:59 -0400 Subject: [PATCH] fix behavior tests compile error on i386-linux --- src/ir.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ir.cpp b/src/ir.cpp index a5b40cd5bc930f84f2139461093d5f5f2ce51e90..4d5cfccabe09fce6f38c3a61d58e62e651c54c7b 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -27759,6 +27759,13 @@ static IrInstGen *ir_align_cast(IrAnalyze *ira, IrInstGen *target, uint32_t alig old_align_bytes = fn_type_id.alignment; fn_type_id.alignment = align_bytes; result_type = get_fn_type(ira->codegen, &fn_type_id); + } else if (target_type->id == ZigTypeIdAnyFrame) { + if (align_bytes >= target_fn_align(ira->codegen->zig_target)) { + result_type = target_type; + } else { + ir_add_error(ira, &target->base, buf_sprintf("sub-aligned anyframe not allowed")); + return ira->codegen->invalid_inst_gen; + } } else if (target_type->id == ZigTypeIdOptional && target_type->data.maybe.child_type->id == ZigTypeIdPointer) { -- 2.54.0