aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2018-04-05 13:02:21 +0200
committerGitHub <[email protected]>2018-04-05 13:02:21 +0200
commit1328163db6d64d4a8309306cd4caeb43ffd5ecbb (patch)
treeea7fe430ab9e25a462e4928e6b61d38f700bc761 /lib/compiler/src
parenta5dc5af3fe3b1e25f0596d71d3ac36291b0099dc (diff)
parent282fb67730e1bafe722e7149a35e272398f88b34 (diff)
downloadotp-1328163db6d64d4a8309306cd4caeb43ffd5ecbb.tar.gz
otp-1328163db6d64d4a8309306cd4caeb43ffd5ecbb.tar.bz2
otp-1328163db6d64d4a8309306cd4caeb43ffd5ecbb.zip
Merge pull request #1769 from bjorng/bjorn/compiler/beam_utils
Fix unsafe optimization of record test
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/beam_utils.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/compiler/src/beam_utils.erl b/lib/compiler/src/beam_utils.erl
index 047cd5a569..1ddad30328 100644
--- a/lib/compiler/src/beam_utils.erl
+++ b/lib/compiler/src/beam_utils.erl
@@ -655,9 +655,8 @@ check_liveness_at(R, Lbl, #live{lbl=Ll,res=ResMemorized}=St0) ->
{Res,St#live{res=gb_trees:insert(Lbl, Res, St#live.res)}}
end.
-not_used({exit_not_used,St}) -> {not_used,St};
-not_used({killed,St}) -> {not_used,St};
-not_used({_,_}=Res) -> Res.
+not_used({used,_}=Res) -> Res;
+not_used({_,St}) -> {not_used,St}.
check_liveness_ret(R, R, St) -> {used,St};
check_liveness_ret(_, _, St) -> {killed,St}.