[erlang-bugs] Internal error in v3_codegen

Ulf Norell ulf.norell@REDACTED
Mon Mar 24 08:55:42 CET 2014


-module(bug).
f() when false, is_map((true andalso b)#{a => 0}) -> ok.

$ erl
Erlang/OTP 17 [RELEASE CANDIDATE 2] [erts-6.0] [source-c2b4eab] [64-bit]
[smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V6.0  (abort with ^G)
1> c(bug).
Function: f/0
bug.erl: internal error in v3_codegen;
crash reason: {case_clause,{'EXIT',{{badmatch,[]},
                      [{v3_codegen,call_cg,7,
                                   [{file,"v3_codegen.erl"},{line,1123}]},
                       {v3_codegen,guard_cg,5,
                                   [{file,"v3_codegen.erl"},{line,1019}]},
                       {v3_codegen,'-guard_cg_list/6-anonymous-0-',4,
                                   [{file,"v3_codegen.erl"},{line,1062}]},
                       {v3_codegen,flatmapfoldl,3,
                                   [{file,"v3_codegen.erl"},{line,2165}]},
                       {v3_codegen,guard_cg_list,6,
                                   [{file,"v3_codegen.erl"},{line,1060}]},
                       {v3_codegen,protected_cg,7,
                                   [{file,"v3_codegen.erl"},{line,1032}]},
                       {v3_codegen,guard_clause_cg,4,
                                   [{file,"v3_codegen.erl"},{line,999}]},
                       {v3_codegen,match_cg,5,
                                   [{file,"v3_codegen.erl"},{line,282}]}]}}}

  in function  compile:'-select_passes/2-anonymous-2-'/2 (compile.erl, line
495)
  in call from compile:'-internal_comp/4-anonymous-1-'/2 (compile.erl, line
292)
  in call from compile:fold_comp/3 (compile.erl, line 310)
  in call from compile:internal_comp/4 (compile.erl, line 294)
  in call from compile:'-do_compile/2-anonymous-0-'/2 (compile.erl, line
153)
bug.erl:2: Warning: function f/0 is unused
bug.erl:2: Warning: map construction will fail because of a type mismatch
bug.erl:2: Warning: the result of the expression is ignored (suppress the
warning by assigning the expression to the _ variable)
error

/ Ulf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140324/093dc309/attachment.htm>


More information about the erlang-bugs mailing list