Skip to content

Commit

Permalink
Tag return bifurcations too (#93)
Browse files Browse the repository at this point in the history
Fixes a Revise `sigtest.jl` failure,
    LoadError: invalid redefinition of constant RandomDevice
on Windows with Julia 1.6.
  • Loading branch information
timholy authored Jan 2, 2024
1 parent f9d80e2 commit ba9be03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/codeedges.jl
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,8 @@ function add_control_flow!(isrequired, cfg, paths::AbstractVector{Path})
for (ibb, bb) in enumerate(blocks)
r = rng(bb)
if any(view(isrequired, r))
# Check if the exit of this block is a GotoNode
if length(bb.succs) == 1
# Check if the exit of this block is a GotoNode or `return`
if length(bb.succs) < 2 && ibb < nblocks
idxlast = r[end]
_changed |= !isrequired[idxlast]
isrequired[idxlast] = true
Expand Down

0 comments on commit ba9be03

Please sign in to comment.