[erlang-bugs] Internal error in beam_dead when using maps in guards
Anthony Ramine
n.oxyde@REDACTED
Mon Mar 3 14:13:27 CET 2014
https://github.com/erlang/otp/pull/260
--
Anthony Ramine
Le 3 mars 2014 à 10:15, Anthony Ramine <n.oxyde@REDACTED> a écrit :
> This one is due to beam_bool not seeing that {f,6} is used in a put_map instruction in the block preceding the one it is trying to optimise.
>
> I have a fix but IRL work is calling me, will submit it later.
>
> --
> Anthony Ramine
>
> Le 3 mars 2014 à 08:41, Ulf Norell <ulf.norell@REDACTED> a écrit :
>
>> Replacing the map #{} makes the error go away.
>>
>> -module(bug).
>> f() when is_map(#{}); false -> ok.
>>
>> $ erl
>> Erlang/OTP 17 [RELEASE CANDIDATE 2] [erts-6.0] [source-a74e66a] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]
>>
>> Eshell V6.0 (abort with ^G)
>> 1> c(bug).
>> Function f/0 refers to undefined label 6
>> bug.erl: internal error in beam_dead;
>> crash reason: {case_clause,{'EXIT',{undefined_label,6}}}
>>
>> in function compile:'-select_passes/2-anonymous-2-'/2 (compile.erl, line 493)
>> in call from compile:'-internal_comp/4-anonymous-1-'/2 (compile.erl, line 290)
>> in call from compile:fold_comp/3 (compile.erl, line 308)
>> in call from compile:internal_comp/4 (compile.erl, line 292)
>> in call from compile:'-do_compile/2-anonymous-0-'/2 (compile.erl, line 153)
>> bug.erl:2: Warning: function f/0 is unused
>> error
>>
>> / Ulf
>> _______________________________________________
>> erlang-bugs mailing list
>> erlang-bugs@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-bugs
>
More information about the erlang-bugs
mailing list