[erlang-bugs] Core Erlang compilation problem
Lars-Åke Fredlund
lfredlund@REDACTED
Thu May 21 16:47:31 CEST 2009
The attached Core Erlang module causes the compiler to crash:
1> compile:file("test.core",[return_errors, from_core]).
Function: stop_mp/2
{error,
[{"./test.core",
[{none,compile,
{crash,v3_codegen,
{{case_clause,
{'EXIT',
{function_clause,
[{v3_codegen,bif_cg,
[element,
[{integer,7},{var,'_cor0'}],
[],
{l,{...},...},
[{...}],
{...}|...]},
{v3_codegen,guard_cg,5},
{v3_codegen,'-guard_cg_list/6-anonymous-0-',4},
{v3_codegen,flatmapfoldl,3},
{v3_codegen,guard_cg_list,6},
{v3_codegen,protected_cg,7},
{v3_codegen,guard_clause_cg,4},
{v3_codegen,match_cg,...}]}}},
[{compile,'-select_passes/2-anonymous-2-',2},
{compile,'-internal_comp/4-anonymous-1-',2},
{compile,fold_comp,3},
{compile,internal_comp,4},
{compile,internal,3}]}}}]}],
[{"no_file",[{none,sys_core_fold,result_ignored}]}]}
but core_lint also complains:
2> compile:file("test.core",[return_errors, from_core, clint]).
{error,[{test,[{core_lint,{illegal_guard,{stop_mp,2}}}]}],
[{"no_file",[{none,sys_core_fold,result_ignored}]}]}
Probably it is just a stupid oversight on my part, but I cannot see why
the code is not ok. Simply removing the second case clause, for
instance, causes the compilation to work?
/Lars-Ake Fredlund
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.core
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20090521/46082019/attachment.ksh>
More information about the erlang-bugs
mailing list