[erlc] internal error in ssa_opt_type_continue
RobinMorisset opened this issue · 1 comments
RobinMorisset commented
Describe the bug
Running erlc on the following testcase:
f(_V0) ->
[ 0 ||
begin bit_size(maybe
[] ?= maybe
0 ?= _V0,
<< 0 || _ <- []>>,
ok
end,
_V0
else
_V0 -> _V0;
ok -> _V0
end),
_V0 end,
_ <- ok].
results in the following error message:
Sub pass ssa_opt_type_continue
Function: '-f/1-lc$^1/1-1-'/1
/home/rmorisset/minimized/test70696.erl: internal error in pass beam_ssa_opt:
exception error: no function clause matching beam_types:join([])
in function beam_ssa_type:join_arg_types/3 (beam_ssa_type.erl, line 446)
in call from beam_ssa_type:opt_continue/4 (beam_ssa_type.erl, line 429)
in call from beam_ssa_opt:ssa_opt_type_continue/1 (beam_ssa_opt.erl, line 437)
in call from compile:run_sub_passes_1/3 (compile.erl, line 411)
in call from beam_ssa_opt:phase/4 (beam_ssa_opt.erl, line 117)
in call from beam_ssa_opt:fixpoint/6 (beam_ssa_opt.erl, line 100)
in call from beam_ssa_opt:run_phases/3 (beam_ssa_opt.erl, line 86)
Affected versions
RobinMorisset commented
Two simpler test cases with the exact same symptom:
f(_V0) ->
<< 0 || erlang:yield() and ([0 || _ <- _V0] =< 9223372036854775807), <<>> <= ok >>.
and
f(_V1) ->
<<
0
|| try
[ 0 || _ := _ <- ok]
catch
_ ->
false
end and _V1,
_ <- ok
>>.