fix hang for some compile errors

see #2467
master
Andrew Kelley 2019-05-10 16:39:50 -04:00
parent a6f7a9ce2b
commit fee0e6c8b9
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}