Problem with bit syntax compilation
Jouni Ryno
jouni.ryno@REDACTED
Mon Apr 16 18:13:08 CEST 2001
>From the following code
-module(test).
error(Test) ->
if
Test == 1 ->
Problem = 1;
Test == 2 ->
Problem = 2
end,
Dummy = 1,
OKbin = <<Test:7, Dummy:9>>, % used only to prove, that it works
normally
MyBin = [<<Test:7, Problem:9>>, OKbin].
I get compilation error from erlc test.erl (eshell V5.0.2
/proj/cosima/egse/test.erl:none: internal error in v3_codegen;
crash reason: {{case_clause,{'EXIT',{function_clause,
[{v3_codegen,fetch_reg,['Problem
',[]]},
{v3_codegen,'-saves/3-fun-0-',3
},
{lists,map,2},
{v3_codegen,adjust_stack,4},
{v3_codegen,match_cg,6},
{v3_codegen,'-cg_list/5-fun-0-'
,3},
{v3_codegen,flatmapfoldl,3},
{v3_codegen,cg_list,5}|
more]}}},
[{compile,'-select_passes/2-fun-2-',2},
{compile,'-internal_comp/4-fun-1-',2},
{compile,fold_comp,3},
{compile,internal_comp,4},
{compile,internal,3}]}
Any way to circumvent this ?
With regards
Jouni
Jouni Rynö mailto://Jouni.Ryno@fmi.fi/
http://www.geo.fmi.fi/~ryno/
Finnish Meteorological Institute http://www.fmi.fi/
Geophysical Research http://www.geo.fmi.fi/
P.O.BOX 503 Tel (+358)-9-19294656
FIN-00101 Helsinki FAX (+358)-9-19294603
Finland priv-GSM (+358)-50-5302903
"It's just zeros and ones, it cannot be hard"
More information about the erlang-questions
mailing list