dec inLoop after exiting the while scope in computeLiveRanges [backport] (#19918)
* dec inLoop after exiting the while scope in computeLiveRanges * add testcase
This commit is contained in:
parent
8a344cb25b
commit
bcff13debc
2 changed files with 46 additions and 1 deletions
|
|
@ -851,7 +851,7 @@ proc computeLiveRanges(c: var Partitions; n: PNode) =
|
|||
# connect(graph, cursorVar)
|
||||
inc c.inLoop
|
||||
for child in n: computeLiveRanges(c, child)
|
||||
inc c.inLoop
|
||||
dec c.inLoop
|
||||
of nkElifBranch, nkElifExpr, nkElse, nkOfBranch:
|
||||
inc c.inConditional
|
||||
for child in n: computeLiveRanges(c, child)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue