From f3ea2236bc8d11dd09b7eaaec3f175361e4771d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Sat, 26 Oct 2013 16:04:29 +0200 Subject: compiler: Fix get_map_element bug with allocate The instruction get_map_element has a faillabel so you may not use the instruction within a allocate/deallocate block. --- lib/compiler/src/beam_block.erl | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/compiler/src/beam_block.erl b/lib/compiler/src/beam_block.erl index d5f2ffc444..3723cc19e1 100644 --- a/lib/compiler/src/beam_block.erl +++ b/lib/compiler/src/beam_block.erl @@ -240,6 +240,7 @@ move_allocates_2(Alloc, [], Acc) -> alloc_may_pass({set,_,_,{alloc,_,_}}) -> false; alloc_may_pass({set,_,_,{set_tuple_element,_}}) -> false; +alloc_may_pass({set,_,_,{get_map_element,_,_}}) -> false; alloc_may_pass({set,_,_,put_list}) -> false; alloc_may_pass({set,_,_,put}) -> false; alloc_may_pass({set,_,_,_}) -> true. -- cgit v1.2.3