aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2019-07-11 09:28:59 +0200
committerJohn Högberg <[email protected]>2019-07-11 09:29:33 +0200
commitbb3ab56962bae22e40b51dfce18ef37b465087a7 (patch)
treed8f1799082ab79c8041704c291159c21401a050f /lib/compiler/test
parent0ba1c8db3f593736cdffb1f7d4c45ea276ad6d56 (diff)
parentd2c096de3c677c20d4a149bec6a9346aea9ccf4d (diff)
downloadotp-bb3ab56962bae22e40b51dfce18ef37b465087a7.tar.gz
otp-bb3ab56962bae22e40b51dfce18ef37b465087a7.tar.bz2
otp-bb3ab56962bae22e40b51dfce18ef37b465087a7.zip
Merge branch 'maint'
* maint: compiler: Fix compiler crash introduced by OTP-15952
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/beam_ssa_SUITE.erl15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/compiler/test/beam_ssa_SUITE.erl b/lib/compiler/test/beam_ssa_SUITE.erl
index 11bd5cf07d..9227f56f8c 100644
--- a/lib/compiler/test/beam_ssa_SUITE.erl
+++ b/lib/compiler/test/beam_ssa_SUITE.erl
@@ -196,6 +196,9 @@ recv(_Config) ->
self() ! 2,
b = tricky_recv_5(),
+ %% tricky_recv_6/0 is a compile-time error.
+ tricky_recv_6(),
+
ok.
sync_wait_mon({Pid, Ref}, Timeout) ->
@@ -321,6 +324,18 @@ tricky_recv_5() ->
_:_ -> c
end.
+%% When fixing tricky_recv_5, we introduced a compiler crash when the common
+%% exit block was ?EXCEPTION_BLOCK and floats were in the picture.
+tricky_recv_6() ->
+ RefA = make_ref(),
+ RefB = make_ref(),
+ receive
+ {RefA, Number} -> Number + 1.0;
+ {RefB, Number} -> Number + 2.0
+ after 0 ->
+ ok
+ end.
+
maps(_Config) ->
{'EXIT',{{badmatch,#{}},_}} = (catch maps_1(any)),
ok.