| author | |
| committer | |
| log | b6c8fead00aa5d7b39697aedb0cb1eef53010b83 |
| tree | 1c91dd3aff35d3334f8fdf8b1f37d6246974a564 |
| parent | fbcee58cfcabddd3e0842e22141a983a8169502f |
| signature |
3 files changed, 4 insertions(+), 1 deletions(-)
src/analyze.cpp+2| ... | @@ -9303,7 +9303,9 @@ bool type_has_optional_repr(ZigType *ty) { | ... | @@ -9303,7 +9303,9 @@ bool type_has_optional_repr(ZigType *ty) { |
| 9303 | } | 9303 | } |
| 9304 | 9304 | ||
| 9305 | void copy_const_val(ZigValue *dest, ZigValue *src) { | 9305 | void copy_const_val(ZigValue *dest, ZigValue *src) { |
| 9306 | uint32_t prev_align = dest->llvm_align; | ||
| 9306 | memcpy(dest, src, sizeof(ZigValue)); | 9307 | memcpy(dest, src, sizeof(ZigValue)); |
| 9308 | dest->llvm_align = prev_align; | ||
| 9307 | if (src->special != ConstValSpecialStatic) | 9309 | if (src->special != ConstValSpecialStatic) |
| 9308 | return; | 9310 | return; |
| 9309 | dest->parent.id = ConstParentIdNone; | 9311 | dest->parent.id = ConstParentIdNone; |
src/ir.cpp+1| ... | @@ -17052,6 +17052,7 @@ static IrInstruction *ir_analyze_alloca(IrAnalyze *ira, IrInstruction *source_in | ... | @@ -17052,6 +17052,7 @@ static IrInstruction *ir_analyze_alloca(IrAnalyze *ira, IrInstruction *source_in |
| 17052 | 17052 | ||
| 17053 | ZigValue *pointee = create_const_vals(1); | 17053 | ZigValue *pointee = create_const_vals(1); |
| 17054 | pointee->special = ConstValSpecialUndef; | 17054 | pointee->special = ConstValSpecialUndef; |
| 17055 | pointee->llvm_align = align; | ||
| 17055 | 17056 | ||
| 17056 | IrInstructionAllocaGen *result = ir_build_alloca_gen(ira, source_inst, align, name_hint); | 17057 | IrInstructionAllocaGen *result = ir_build_alloca_gen(ira, source_inst, align, name_hint); |
| 17057 | result->base.value->special = ConstValSpecialStatic; | 17058 | result->base.value->special = ConstValSpecialStatic; |
test/stage1/behavior.zig+1-1| ... | @@ -24,7 +24,7 @@ comptime { | ... | @@ -24,7 +24,7 @@ comptime { |
| 24 | _ = @import("behavior/bugs/1500.zig"); | 24 | _ = @import("behavior/bugs/1500.zig"); |
| 25 | _ = @import("behavior/bugs/1607.zig"); | 25 | _ = @import("behavior/bugs/1607.zig"); |
| 26 | _ = @import("behavior/bugs/1735.zig"); | 26 | _ = @import("behavior/bugs/1735.zig"); |
| 27 | //_ = @import("behavior/bugs/1741.zig"); | 27 | _ = @import("behavior/bugs/1741.zig"); |
| 28 | _ = @import("behavior/bugs/1851.zig"); | 28 | _ = @import("behavior/bugs/1851.zig"); |
| 29 | _ = @import("behavior/bugs/1914.zig"); | 29 | _ = @import("behavior/bugs/1914.zig"); |
| 30 | _ = @import("behavior/bugs/2006.zig"); | 30 | _ = @import("behavior/bugs/2006.zig"); |