value_primitive_field copies the subrange of a non-lazy value into
the new value for a subobject. However, the value of outer objects
never contain tags. Instead, always mark new values as lazy if they
are a capability or are a structure containing a capability member.
else
boffset = arg_type->field (fieldno).loc_bitpos () / 8;
- if (value_lazy (arg1))
+ if (value_lazy (arg1) || type->contains_capability ())
v = allocate_value_lazy (value_enclosing_type (arg1));
else
{
if (VALUE_LVAL (arg1) == lval_register && value_lazy (arg1))
value_fetch_lazy (arg1);
- if (value_lazy (arg1))
+ if (value_lazy (arg1) || type->code () == TYPE_CODE_CAPABILITY
+ || TYPE_CAPABILITY (type))
v = allocate_value_lazy (type);
else
{