[erlang-bugs] R15B02 HiPE can't compile modules with on_load attribute

José Valim jose.valim@REDACTED
Sun Nov 25 20:16:16 CET 2012


HiPE can't compile a module with on_load attribute. This sample module
fails:

-module(foo).
-on_load(do_nothing/0).

%% Exporting the function doesn't affect the outcome
%% -exports([do_nothing/0]).

do_nothing() -> ok.


When compiled via command line or via compile:forms.
A snippet of the error message is:

=ERROR REPORT==== 25-Nov-2012::18:48:29 ===
Error in process <0.88.0> with exit value:
{{badmatch,{'EXIT',{{hipe_beam_to_icode,1103,{'trans_fun/2',on_load}},[{hipe_beam_to_icode,trans_fun,2,[{file,"hipe_beam_to_icode.erl"},{line,1103}]},{hipe_beam_to_icode,trans_fun,2,[{file,"hipe_beam_to_icode.erl"},{line,253}]},{hipe_beam_to_icode...

I have put the full stack in a gist:

https://gist.github.com/9ae21eb51928d7de5f23

Using R15B02 on Mac OS X Snow Leopard installed from homebrew.
Let me know if you need more information, thanks!


*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Lead Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20121125/09c3af25/attachment.htm>


More information about the erlang-bugs mailing list