PRIVATE_ANALYSIS_IR: handle unreachable loops #75

Merged
Alexander_KS merged 1 commits from fix_private_scalars_analysis into master 2026-02-19 08:32:13 +03:00

View File

@@ -321,6 +321,12 @@ static set<SAPFOR::BasicBlock*> analyzeLoop(LoopGraph* loop, const set<SAPFOR::B
} }
} }
if (currentLoop.empty()) // can't find loop IR - loop unreachable!
{
__spf_print(1, "Unreachable loop on %s:%d\n", current_file->filename(), loop_operator->lineNumber());
return currentLoop;
}
if (!head_block) if (!head_block)
printInternalError(convertFileName(__FILE__).c_str(), __LINE__); printInternalError(convertFileName(__FILE__).c_str(), __LINE__);