https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100537

--- Comment #5 from Jiu Fu Guo <guojiufu at gcc dot gnu.org> ---
breakpoint at tree-ssa.c:1013 error ("address taken, but ADDRESSABLE bit not
set"); 

            if ((VAR_P (base)
                 || TREE_CODE (base) == PARM_DECL
                 || TREE_CODE (base) == RESULT_DECL)
                && !TREE_ADDRESSABLE (base))
              {
B               error ("address taken, but ADDRESSABLE bit not set");
                err = true;
              }

we can see base:
p base
$1 = <var_decl 0x200000a285e0 go..C479>

And break at ggc_internal_alloc, b ggc-page.c:1455 if result ==  0x200000a285e0
we can see the stack:
Unary_expression::do_get_backend
(expressions.cc:5322)->Gcc_backend::implicit_variable(go-gcc.cc:29239) ->
build_decl->make_node ->...-> ggc_internal_cleared_alloc

Gcc_backend::implicit_variable:
  tree decl = build_decl(BUILTINS_LOCATION, VAR_DECL, ...

Unary_expression::do_get_backend (expressions.cc:5322):
  gogo->backend()->implicit_variable(var_name, "", btype, true, true, false,
0);
where var_name is go..C479


And break at build_fold_addr_expr_loc if t == 0x200000a285e0
Gcc_backend::address_expression (go-gcc:1683) --> build_fold_addr_expr_loc

Reply via email to