* values.c (value_primitive_field): Add embedded_offset to the

address of structure members.
        * gnu-v3-abi.c (gnuv3_rtti_type): Cast to base type before
        attempting to access vtable pointer.  Set using_enc_p if we cast.
        (gnuv3_virtual_fn_field): Call value_cast with structure rather than
        structure pointer.  Cast to base type before attempting to access
        vtable pointer.
This commit is contained in:
Daniel Jacobowitz
2001-11-30 17:47:51 +00:00
parent 215007a648
commit 21cfb3b661
3 changed files with 30 additions and 8 deletions

View File

@@ -929,7 +929,8 @@ value_primitive_field (register value_ptr arg1, int offset,
memcpy (VALUE_CONTENTS_RAW (v),
VALUE_CONTENTS_RAW (arg1) + offset,
TYPE_LENGTH (type));
VALUE_OFFSET (v) = VALUE_OFFSET (arg1) + offset;
VALUE_OFFSET (v) = VALUE_OFFSET (arg1) + offset
+ VALUE_EMBEDDED_OFFSET (arg1);
}
VALUE_LVAL (v) = VALUE_LVAL (arg1);
if (VALUE_LVAL (arg1) == lval_internalvar)