@@ -682,9 +682,10 @@ namespace {
682682 // here via the 'then' branch, so the value established there is still
683683 // definite - keep it known instead of lowering to possible.
684684 bool elseEscape = false ;
685- bool unknownEscape = false ;
686- if (!inLoop && !inElse && hasElse)
685+ if (!inLoop && !inElse && hasElse) {
686+ bool unknownEscape = false ;
687687 elseEscape = isEscapeScope (tok->linkAt (2 ), unknownEscape);
688+ }
688689 if (!condTok->hasKnownIntValue () || inLoop) {
689690 if (!elseEscape && !analyzer->lowerToPossible ())
690691 return Break (Analyzer::Terminate::Bail);
@@ -793,6 +794,9 @@ namespace {
793794 // The branch is traversed below, so don't record its boundary state here.
794795 ft.analyzer ->assume (condTok, true , Analyzer::Assume::Pending);
795796 Progress pThen = ft.updateBranch (thenBranch, depth - 1 );
797+ // Merge the fork's actions so a modification in the then-branch bubbles up
798+ // to the enclosing branch's isModified().
799+ actions |= thenBranch.action ;
796800
797801 // Commit the condition as false on the main path only when the then-branch
798802 // is dead. The else block, if any, is traversed separately (Pending); with
0 commit comments