aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-06-18 11:32:31 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-06-18 11:32:31 -0400
commit3ca4925709ac6369391eb40616de33051e0bb1f1 (patch)
tree61b0e83b961a8e5f7f13a0d4ec92f5b3730101fd /src/ir.cpp
parent99112b5d4ac885f63a79c6f7926f92ff4f3ce819 (diff)
parent9050a07540b7387dade8184d3a3daf957e805e4f (diff)
downloadzig-3ca4925709ac6369391eb40616de33051e0bb1f1.tar.gz
zig-3ca4925709ac6369391eb40616de33051e0bb1f1.zip
Merge branch 'kristate-you-are-banned-please-fuck-off'
closes #2701
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 5c09e48b2d..b74a99b37d 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -16794,7 +16794,9 @@ static IrInstruction *ir_analyze_instruction_slice_type(IrAnalyze *ira,
case ZigTypeIdPromise:
case ZigTypeIdVector:
{
- if ((err = type_resolve(ira->codegen, child_type, ResolveStatusAlignmentKnown)))
+ ResolveStatus needed_status = (align_bytes == 0) ?
+ ResolveStatusZeroBitsKnown : ResolveStatusAlignmentKnown;
+ if ((err = type_resolve(ira->codegen, child_type, needed_status)))
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);