aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-05-10 16:39:50 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-05-10 16:39:50 -0400
commitfee0e6c8b9d676ef785aab52d25b19ed64e9adeb (patch)
tree5fe18e735a17f02eda3b7e4119467df37b3c4210 /src
parenta6f7a9ce2b008ff66ab32c8162d64dd77ffe952f (diff)
downloadzig-fee0e6c8b9d676ef785aab52d25b19ed64e9adeb.tar.gz
zig-fee0e6c8b9d676ef785aab52d25b19ed64e9adeb.zip
fix hang for some compile errors
see #2467
Diffstat (limited to 'src')
-rw-r--r--src/ir.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index d1d1c44043..e89d30232e 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -10225,6 +10225,7 @@ static void ir_finish_bb(IrAnalyze *ira) {
ira->instruction_index += 1;
}
+ size_t my_old_bb_index = ira->old_bb_index;
ira->old_bb_index += 1;
bool need_repeat = true;
@@ -10235,7 +10236,7 @@ static void ir_finish_bb(IrAnalyze *ira) {
ira->old_bb_index += 1;
continue;
}
- if (old_bb->other->instruction_list.length != 0) {
+ if (old_bb->other->instruction_list.length != 0 || ira->old_bb_index == my_old_bb_index) {
ira->old_bb_index += 1;
continue;
}