Compiler crash with abstract modules...

Mark Scandariato mscandar@REDACTED
Fri Jan 7 21:35:09 CET 2005


Hi,

Interesting crash when compiling the following snippet:

%%%----------------------
-module(foo, [N]).
-compile(export_all).

bug(<<V:N/unit:8>>) -> V.
%%%----------------------

This is equivalent to:
%%%----------------------
-module(foo).
-compile(export_all).

bug(<<V:N/unit:8>>, {foo, N}) -> V.
%%%----------------------

Which would normally just complain that "variable 'N' is unbound".

Here's the crash:

foo.erl:none: internal error in v3_codegen;
crash reason: {{case_clause,{'EXIT',{function_clause,
                                         [{v3_codegen,fetch_stack,['N',[],0]},
                                          {v3_codegen,select_extract_bin,10},
                                          {v3_codegen,select_bin_seg,5},
                                          {v3_codegen,select_binary,6},
                                          {v3_codegen,match_cg,5},
                                          {v3_codegen,match_cg,6},
                                          {v3_codegen,
                                              '-cg_list/5-anonymous-0-',
                                              3},
                                          {v3_codegen,flatmapfoldl,3},
                                          {v3_codegen,cg_list,5},
                                          {v3_codegen,cg_fun,4}]}}},
                [{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}]}




More information about the erlang-bugs mailing list