[erlang-bugs] Internal error in beam_dead when using maps in guards

Ulf Norell ulf.norell@REDACTED
Wed Mar 5 19:50:42 CET 2014


That doesn't seem to have fixed it completely. The following gives exactly
the same error:

-module(bug).
f() when true; #{} andalso false -> ok.

/ Ulf


On Mon, Mar 3, 2014 at 2:13 PM, Anthony Ramine <n.oxyde@REDACTED> wrote:

> 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
> >
>
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140305/09836567/attachment.htm>


More information about the erlang-bugs mailing list