Veikka Tuominen

Results 363 comments of Veikka Tuominen

Reduction: ```zig test { var b: u32 = 1; _ = blk: { const a = 1; b = a; break :blk a; }; } ```

Related #12812, stage1 handles both cases correctly by using `insertelement`/`extractelement` instead of `getelementptr` like stage2 does: ```llvm ; stage2 define dso_local i32 @main() { Entry: %0 = alloca , align...

Might be fixed by #13017

I suspect this to be yet another case of #12215

Missing compile error and corrupt memory suggests that this might be fixed by #13017

Stage1 also works as expected on Linux.

IMO the bug is the LLVM backend not handling the possibility of namespace like packed structs.

> another way, call resolveStructLayout in LLVM.dbg_var instead of Sema.field_val ? Backends should not do any semantic analysis.

`lowerDebugTypeImpl` for packed structs should check `haveFieldTypes` as is done for regular structs a few lines down.