aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-06-10 16:32:53 +0100
committergingerBill <bill@gingerbill.org>2020-06-10 16:32:53 +0100
commite641d714a01c7949e5d41c2fb0be80f7f05b38bc (patch)
tree99620227097d4e6192b515295e0f232fb6746ccc /src/ir.cpp
parentf3057260159ff49aafb1d24845bf2b38543be239 (diff)
Fix #677
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 9ded36ca4..5a24c8c3d 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -10025,7 +10025,8 @@ void ir_build_stmt_internal(irProcedure *proc, Ast *node) {
Ast *name = vd->names[i];
irAddr lval = ir_addr(nullptr);
if (!is_blank_ident(name)) {
- ir_add_local_for_identifier(proc, name, false);
+ // NOTE(bill, 2020-06-10): This must be zero initialize because of weird LLVM optimization behaviours
+ ir_add_local_for_identifier(proc, name, true);
lval = ir_build_addr(proc, name);
}
array_add(&lvals, lval);