diff options
author | Björn Gustavsson <[email protected]> | 2018-08-14 16:06:52 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2018-08-14 16:24:30 +0200 |
commit | ec8ae4b539bcb4b4eedf8dd3eb1e7bcdfe558580 (patch) | |
tree | 9e5b28477fb01ddbad9e71297e45e94a7af2512d /lib/compiler/src/beam_utils.erl | |
parent | 4fc61aa178faa80290356a63d8e38d93697b9669 (diff) | |
download | otp-ec8ae4b539bcb4b4eedf8dd3eb1e7bcdfe558580.tar.gz otp-ec8ae4b539bcb4b4eedf8dd3eb1e7bcdfe558580.tar.bz2 otp-ec8ae4b539bcb4b4eedf8dd3eb1e7bcdfe558580.zip |
Fix compiler crash when compiling double receives
The compiler would crash when compiling a function with two
receive statements.
https://bugs.erlang.org/browse/ERL-703
Diffstat (limited to 'lib/compiler/src/beam_utils.erl')
-rw-r--r-- | lib/compiler/src/beam_utils.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_utils.erl b/lib/compiler/src/beam_utils.erl index 3bb671f034..5580d2f123 100644 --- a/lib/compiler/src/beam_utils.erl +++ b/lib/compiler/src/beam_utils.erl @@ -1164,7 +1164,7 @@ defs([{loop_rec,{f,L},{x,0}}=I|Is], _Regs, D0) -> D = update_regs(L, RegsAtLabel, D0), [I|defs(Is, init_def_regs(1), D)]; defs([{loop_rec_end,_}=I|Is], _Regs, D) -> - [I|defs(Is, 0, D)]; + [I|defs_unreachable(Is, D)]; defs([{make_fun2,_,_,_,_}=I|Is], _Regs, D) -> [I|defs(Is, 1, D)]; defs([{move,_,Dst}=I|Is], Regs0, D) -> |