From 8ed88280a62f2a400d00b5ac20618539693dad36 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 18 Jun 2019 11:18:53 -0400 Subject: [PATCH] Revert "fixes resolving aligment of child type in slice" This reverts commit aa60d2a688c965dcccf8e2c42afe5c180daba8fc. The copyright ownership of this 10 line patch is under dispute. See #2701 for details. So I'll revert it and then fix it myself without looking at this patch. --- src/ir.cpp | 2 +- test/stage1/behavior.zig | 1 - test/stage1/behavior/bugs/2689.zig | 7 ------- 3 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 test/stage1/behavior/bugs/2689.zig diff --git a/src/ir.cpp b/src/ir.cpp index 5c09e48b2..21751b9a9 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -16794,7 +16794,7 @@ static IrInstruction *ir_analyze_instruction_slice_type(IrAnalyze *ira, case ZigTypeIdPromise: case ZigTypeIdVector: { - if ((err = type_resolve(ira->codegen, child_type, ResolveStatusAlignmentKnown))) + if ((err = type_resolve(ira->codegen, child_type, ResolveStatusZeroBitsKnown))) return ira->codegen->invalid_instruction; ZigType *slice_ptr_type = get_pointer_to_type_extra(ira->codegen, child_type, is_const, is_volatile, PtrLenUnknown, align_bytes, 0, 0, is_allow_zero); diff --git a/test/stage1/behavior.zig b/test/stage1/behavior.zig index 707d46fd8..f477bb64e 100644 --- a/test/stage1/behavior.zig +++ b/test/stage1/behavior.zig @@ -27,7 +27,6 @@ comptime { _ = @import("behavior/bugs/2114.zig"); _ = @import("behavior/bugs/2346.zig"); _ = @import("behavior/bugs/2578.zig"); - _ = @import("behavior/bugs/2689.zig"); _ = @import("behavior/bugs/394.zig"); _ = @import("behavior/bugs/421.zig"); _ = @import("behavior/bugs/529.zig"); diff --git a/test/stage1/behavior/bugs/2689.zig b/test/stage1/behavior/bugs/2689.zig deleted file mode 100644 index d1c1062ad..000000000 --- a/test/stage1/behavior/bugs/2689.zig +++ /dev/null @@ -1,7 +0,0 @@ -test "slice with alignment" { - const S = packed struct { - a: u8, - }; - - var a: []align(8) S = undefined; -}