Skip to content

[erlc] internal compiler error in v3_core:'-ibitstr_vars/2-anonymous-1-' #11367

Description

@RobinMorisset

Describe the bug
Running erlc on the following program:

-module(v3_core_ibitstr_vars).
-export([f/0]).

f() ->
    #{ok => ok || #{<<(<<>>)/binary>> := _} <- ok}.

causes the following crash:

Function: f/0
found_bugs/v3_core_ibitstr_vars.erl: internal error in pass core:
exception error: no function clause matching v3_core:'-ibitstr_vars/2-anonymous-1-'(#v3_core:c_bitstr{
     anno = [{segment,1},{16,24},{file,"found_bugs/v3_core_ibitstr_vars.erl"}],
     val =
         #v3_core:c_literal{
             anno = [{16,24},{file,"found_bugs/v3_core_ibitstr_vars.erl"}],
             val = <<>>},
     size =
         #v3_core:c_literal{
             anno =
                 [{16,24},
                  {file,"found_bugs/v3_core_ibitstr_vars.erl"},
                  compiler_generated],
             val = all},
     unit = #v3_core:c_literal{anno = [],val = 8},
     type = #v3_core:c_literal{anno = [],val = binary},
     flags = #v3_core:c_literal{anno = [],val = [unsigned,big]}},
 [1,'_']) 
  in function  lists:foldl/3 (lists.erl:2465)
  in call from v3_core:add_bound_vars/2 (v3_core.erl:4921)
  in call from v3_core:lc_tq1/5 (v3_core.erl:1962)
  in call from v3_core:mc_tq/5 (v3_core.erl:2231)
  in call from v3_core:exprs/2 (v3_core.erl:785)
  in call from v3_core:clause/2 (v3_core.erl:450)
  in call from v3_core:clauses/2 (v3_core.erl:441)

Affected versions
master and PR #11363

Metadata

Metadata

Assignees

Labels

bugIssue is reported as a bugteam:VMAssigned to OTP team VM

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions