anchor.diff:      {ok,Size,Bt} = erl_bits:set_bit_type(Size, Type0),
       {Size,erl_bits:as_list(Bt)}.
   
  -expr_lc_bc({Tag,Anno,E0,Gs0}) ->
  +expr_lc_bc({Tag,Anno,E0,Gs0}, St) ->
       Gs = lists:map(fun ({generate,L,P0,Qs}) ->
  -			   {generate,L,pattern(P0),expr(Qs, false)};
  +			   {generate,L,pattern(P0, St),expr(Qs, false, St)};
   		       ({b_generate,L,P0,Qs}) -> %R12.
  -			   {b_generate,L,pattern(P0),expr(Qs, false)};
  +			   {b_generate,L,pattern(P0, St),expr(Qs, false, St)};
   		       (Expr) ->
  -			   case is_guard_test(Expr) of
  -			       true -> {guard,guard([[Expr]])};
  -			       false -> expr(Expr, false)
  +			   case is_guard_test(Expr, St) of
  +			       true -> {guard,guard([[Expr]], St)};
  +			       false -> expr(Expr, false, St)
   			   end
   		   end, Gs0),
  -    {Tag,ln(Anno),expr(E0, false),Gs}.
  -
  -is_guard_test(Expr) ->
  +    {Tag,ln(Anno),expr(E0, false, St),Gs}.
  +
  +is_guard_test(Expr, _St) ->
       IsOverridden = fun({_,_}) -> true end,
       erl_lint:is_guard_test(Expr, [], IsOverridden).
   
  
positive.code: %%  These patterns are processed "in parallel" for purposes of variable
  %%  definition etc.
  
  pattern_list([P0|Ps]) ->
      P1 = pattern(P0),
      [P1|pattern_list(Ps)];
  pattern_list([]) -> [].
  
  guard([G0|Gs]) ->
      G1 = and_guard(G0),
      [G1|guard(Gs)];
  guard([]) -> [].
  
  and_guard([G0|Gs]) ->
      G1 = guard_test(G0),
      [G1|and_guard(Gs)];
  and_guard([]) -> [].
  
  guard_test({call,Anno,{remote,_,{atom,_,erlang},{atom,_,F}},As0}) ->
      As = gexpr_list(As0),
      {safe_bif,ln(Anno),erlang,F,As};
  guard_test({op,Anno,Op,L0}) ->
      true = erl_internal:arith_op(Op, 1) orelse %Assertion.
  	erl_internal:bool_op(Op, 1),
      L1 = gexpr(L0),
      {safe_bif,ln(Anno),erlang,Op,[L1]};
  guard_test({op,Anno,Op,L0,R0}) when Op =:= 'andalso'; Op =:= 'orelse' ->
      L1 = gexpr(L0),
      R1 = gexpr(R0),				%They see the same variables
      {Op,ln(Anno),L1,R1};
  guard_test({op,Anno,Op,L0,R0}) ->
      true = erl_internal:comp_op(Op, 2) orelse	%Assertion.
  	erl_internal:bool_op(Op, 2) orelse
          erl_internal:arith_op(Op, 2),
      L1 = gexpr(L0),
      R1 = gexpr(R0),				%They see the same variables
      {safe_bif,ln(Anno),erlang,Op,[L1,R1]};
  guard_test({var,_,_}=V) ->V;    % Boolean var
  guard_test({atom,Anno,true}) -> {value,ln(Anno),true};
  %% All other constants at this level means false.
  guard_test({atom,Anno,_}) -> {value,ln(Anno),false};
  guard_test({integer,Anno,_}) -> {value,ln(Anno),false};
  guard_test({char,Anno,_}) -> {value,ln(Anno),false};
  guard_test({float,Anno,_}) -> {value,ln(Anno),false};
  guard_test({string,Anno,_}) -> {value,ln(Anno),false};
  guard_test({nil,Anno}) -> {value,ln(Anno),false};
  guard_test({cons,Anno,_,_}) -> {value,ln(Anno),false};
  guard_test({tuple,Anno,_}) -> {value,ln(Anno),false};
  guard_test({map,Anno,_}) -> {value,ln(Anno),false};
  guard_test({map,Anno,_,_}) -> {value,ln(Anno),false};
  guard_test({bin,Anno,_}) ->  {value,ln(Anno),false}.
  
  gexpr({var,Anno,V}) -> {var,ln(Anno),V};
  gexpr({integer,Anno,I}) -> {value,ln(Anno),I};
  gexpr({char,Anno,I}) -> {value,ln(Anno),I};
  gexpr({float,Anno,F}) -> {value,ln(Anno),F};
  gexpr({atom,Anno,A}) -> {value,ln(Anno),A};
  gexpr({string,Anno,S}) -> {value,ln(Anno),S};
  gexpr({nil,Anno}) -> {value,ln(Anno),[]};
  gexpr({cons,Anno,H0,T0}) ->
      case {gexpr(H0),gexpr(T0)} of
  	{{value,Line,H1},{value,Line,T1}} -> {value,Line,[H1|T1]};
  	{H1,T1} -> {cons,ln(Anno),H1,T1}
      end;
  gexpr({tuple,Anno,Es0}) ->
      Es1 = gexpr_list(Es0),
      {tuple,ln(Anno),Es1};
  gexpr({map,Anno,Fs0}) ->
      new_map(Fs0, Anno, fun gexpr/1);
  gexpr({map,Anno,E0,Fs0}) ->
      E1 = gexpr(E0),
      Fs1 = map_fields(Fs0, fun gexpr/1),
      {map,ln(Anno),E1,Fs1};
  gexpr({bin,Anno,Flds0}) ->
      Flds = gexpr_list(bin_expand_strings(Flds0)),
      {bin,ln(Anno),Flds};
  gexpr({bin_element,Anno,Expr0,Size0,Type0}) ->
      {Size1,Type} = make_bit_type(Anno, Size0, Type0),
      Expr = gexpr(Expr0),
      Size = gexpr(Size1),
      {bin_element,ln(Anno),Expr,Size,Type};
  %%% The erl_expand_records pass has added the module name 'erlang' to
  %%% all BIF calls, even in guards.
  gexpr({call,Anno,{remote,_,{atom,_,erlang},{atom,_,self}},[]}) ->
      {dbg,ln(Anno),self,[]};
  gexpr({call,Anno,{remote,_,{atom,_,erlang},{atom,_,F}},As0}) ->
      As = gexpr_list(As0),
      {safe_bif,ln(Anno),erlang,F,As};
  gexpr({op,Anno,Op,A0}) ->
      erl_internal:arith_op(Op, 1),
      A1 = gexpr(A0),
      {safe_bif,ln(Anno),erlang,Op,[A1]};
  gexpr({op,Anno,Op,L0,R0}) when Op =:= 'andalso'; Op =:= 'orelse' ->
      L1 = gexpr(L0),
      R1 = gexpr(R0),			%They see the same variables
      {Op,ln(Anno),L1,R1};
  gexpr({op,Anno,Op,L0,R0}) ->
      true = erl_internal:arith_op(Op, 2) orelse erl_internal:comp_op(Op, 2)
  	orelse erl_internal:bool_op(Op, 2),
      L1 = gexpr(L0),
      R1 = gexpr(R0),			%They see the same variables
      {safe_bif,ln(Anno),erlang,Op,[L1,R1]}.
  
  %%  These expressions are processed "in parallel" for purposes of variable
  %%  definition etc.
  
  gexpr_list([E0|Es]) ->
      E1 = gexpr(E0),
      [E1|gexpr_list(Es)];
  gexpr_list([]) -> [].
  
  %%  These expressions are processed "sequentially" for purposes of variable
  %%  definition etc.
  
  exprs([E], Lc) ->
      [expr(E, Lc)];
  exprs([E0|Es], Lc) ->
      E1 = expr(E0, false),
      [E1|exprs(Es, Lc)];
  exprs([], _Lc) -> [].
  
  expr({var,Anno,V}, _Lc) -> {var,ln(Anno),V};
  expr({integer,Anno,I}, _Lc) -> {value,ln(Anno),I};
  expr({char,Anno,I}, _Lc) -> {value,ln(Anno),I};
  expr({float,Anno,F}, _Lc) -> {value,ln(Anno),F};
  expr({atom,Anno,A}, _Lc) -> {value,ln(Anno),A};
  expr({string,Anno,S}, _Lc) -> {value,ln(Anno),S};
  expr({nil,Anno}, _Lc) -> {value,ln(Anno),[]};
  expr({cons,Anno,H0,T0}, _Lc) ->
      case {expr(H0, false),expr(T0, false)} of
  	{{value,Line,H1},{value,Line,T1}} -> {value,Line,[H1|T1]};
  	{H1,T1} -> {cons,ln(Anno),H1,T1}
      end;
  expr({tuple,Anno,Es0}, _Lc) ->
      Es1 = expr_list(Es0),
      {tuple,ln(Anno),Es1};
  expr({map,Anno,Fs}, _Lc) ->
      new_map(Fs, Anno, fun (E) -> expr(E, false) end);
  expr({map,Anno,E0,Fs0}, _Lc) ->
      E1 = expr(E0, false),
      Fs1 = map_fields(Fs0),
      {map,ln(Anno),E1,Fs1};
  expr({block,Anno,Es0}, Lc) ->
      %% Unfold block into a sequence.
      Es1 = exprs(Es0, Lc),
      {block,ln(Anno),Es1};
  expr({'if',Anno,Cs0}, Lc) ->
      Cs1 = icr_clauses(Cs0, Lc),
      {'if',ln(Anno),Cs1};
  expr({'case',Anno,E0,Cs0}, Lc) ->
      E1 = expr(E0, false),
      Cs1 = icr_clauses(Cs0, Lc),
      {'case',ln(Anno),E1,Cs1};
  expr({'receive',Anno,Cs0}, Lc) ->
      Cs1 = icr_clauses(Cs0, Lc),
      {'receive',ln(Anno),Cs1};
  expr({'receive',Anno,Cs0,To0,ToEs0}, Lc) ->
      To1 = expr(To0, false),
      ToEs1 = exprs(ToEs0, Lc),
      Cs1 = icr_clauses(Cs0, Lc),
      {'receive',ln(Anno),Cs1,To1,ToEs1};
  expr({'fun',Anno,{clauses,Cs0}}, _Lc) ->
      %% New R10B-2 format (abstract_v2).
      Cs = fun_clauses(Cs0),
      Name = new_fun_name(),
      {make_fun,ln(Anno),Name,Cs};
  expr({'fun',Anno,{function,F,A}}, _Lc) ->
      %% New R8 format (abstract_v2).
      Line = ln(Anno),
      As = new_vars(A, Line),
      Name = new_fun_name(),
      Cs = [{clause,Line,As,[],[{local_call,Line,F,As,true}]}],
      {make_fun,Line,Name,Cs};
  expr({named_fun,Anno,FName,Cs0}, _Lc) ->
      Cs = fun_clauses(Cs0),
      Name = new_fun_name(),
      {make_named_fun,ln(Anno),Name,FName,Cs};
  expr({'fun',Anno,{function,{atom,_,M},{atom,_,F},{integer,_,A}}}, _Lc)
    when 0 =< A, A =< 255 ->
      %% New format in R15 for fun M:F/A (literal values).
      {value,ln(Anno),erlang:make_fun(M, F, A)};
  expr({'fun',Anno,{function,M,F,A}}, _Lc) ->
      %% New format in R15 for fun M:F/A (one or more variables).
      MFA = expr_list([M,F,A]),
      {make_ext_fun,ln(Anno),MFA};
  expr({call,Anno,{remote,_,{atom,_,erlang},{atom,_,self}},[]}, _Lc) ->
      {dbg,ln(Anno),self,[]};
  expr({call,Anno,{remote,_,{atom,_,erlang},{atom,_,throw}},[_]=As}, _Lc) ->
      {dbg,ln(Anno),throw,expr_list(As)};
  expr({call,Anno,{remote,_,{atom,_,erlang},{atom,_,error}},[_]=As}, _Lc) ->
      {dbg,ln(Anno),error,expr_list(As)};
  expr({call,Anno,{remote,_,{atom,_,erlang},{atom,_,exit}},[_]=As}, _Lc) ->
      {dbg,ln(Anno),exit,expr_list(As)};
  expr({call,Anno,{remote,_,{atom,_,erlang},{atom,_,raise}},[_,_,_]=As}, _Lc) ->
      {dbg,ln(Anno),raise,expr_list(As)};
  expr({call,Anno,{remote,_,{atom,_,erlang},{atom,_,apply}},[_,_,_]=As0}, Lc) ->
      As = expr_list(As0),
      {apply,ln(Anno),As,Lc};
  expr({call,Anno,{remote,_,{atom,_,Mod},{atom,_,Func}},As0}, Lc) ->
      As = expr_list(As0),
      case erlang:is_builtin(Mod, Func, length(As)) of
  	false ->
  	    {call_remote,ln(Anno),Mod,Func,As,Lc};
  
negative.code: %%  These expressions are processed "in parallel" for purposes of variable
  %%  definition etc.
  
  expr_list([E0|Es], St) ->
      E1 = expr(E0, false, St),
      [E1|expr_list(Es, St)];
  expr_list([], _St) -> [].
  
  icr_clauses([C0|Cs], Lc, St) ->
      C1 = clause(C0, Lc, St),
      [C1|icr_clauses(Cs, Lc, St)];
  icr_clauses([], _, _St) -> [].
  
  fun_clauses([{clause,A,H,G,B}|Cs], St) ->
      [{clause,ln(A),head(H, St),guard(G, St),exprs(B, true, St)}|fun_clauses(Cs, St)];
  fun_clauses([], _St) -> [].
  
  new_map(Fs0, Anno, St, F) ->
      Line = ln(Anno),
      Fs1 = map_fields(Fs0, St, F),
      Fs2 = [{L,K,V} || {map_field_assoc,L,K,V} <- Fs1],
      try
  	{value,Line,map_literal(Fs2, #{})}
  