Fix assertion when loop unrolling failed (#7810)

Partial fix for #7810
This commit is contained in:
Geza Lore 2026-06-21 08:49:11 +01:00
parent e269b914b2
commit e1f1a50327
1 changed files with 2 additions and 0 deletions

View File

@ -375,10 +375,12 @@ class UnrollOneVisitor final : VNVisitor {
process(nodep);
}
void visit(AstJumpGo* nodep) override {
if (!m_ok) return;
// Remove trailing dead code
if (nodep->nextp()) pushDeletep(nodep->nextp()->unlinkFrBackWithNext());
}
void visit(AstLoop* nodep) override {
if (!m_ok) return;
m_bindings.checkpoint();
std::pair<AstNode*, bool> pair = UnrollOneVisitor::apply(m_stats, m_bindings, nodep);