Ok, I guess the following excerpts from cp/typechk.c show a discrepancy:
tree
build_address (tree t)
{
tree addr;
if (error_operand_p (t) || !cxx_mark_addressable (t))
return error_mark_node;
addr = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (t)), t);
return addr;
}
1381 (decay_conversion)
ptrtype = build_pointer_type (TREE_TYPE (type));
if (TREE_CODE (exp) == VAR_DECL)
{
if (!cxx_mark_addressable (exp))
return error_mark_node;
adr = build_nop (ptrtype, build_address (exp));
return adr;
}
where of course we are doing redundant work, but we are also
building an ADDR_EXPR with the wrong type. I guess the above
should rather read
if (TREE_CODE (exp) == VAR_DECL)
{
if (!cxx_mark_addressable (exp))
return error_mark_node;
adr = build1 (ADDR_EXPR, ptrtype, exp);
return adr;
}
no? At least this let's my bootstrap continue.