[erlang-bugs] Core Erlang compilation problem

Lars-Åke Fredlund <>
Fri May 22 10:30:26 CEST 2009


Lars-Åke Fredlund wrote:
> 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
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> erlang-bugs mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-bugs
Oops. A buggy bug report. The correct (failing :-) core module is the 
following, with the second case still there:

And the Erlang/OTP version is:

Erlang R13B (erts-5.7.1) [source] [smp:4:4] [rq:4] [async-threads:0] 
[hipe] [kernel-poll:false]

Sorry for the confusion earlier.

/Lars-Ake






-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.core
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20090522/977fadaf/attachment.ksh>


More information about the erlang-bugs mailing list