+2014-04-14 Sanimir Agovic <sanimir.agovic@intel.com>
+
+ * ada-lang.c (ada_value_primitive_packed_val): Re-fetch type from
+ value.
+ (ada_template_to_fixed_record_type_1): Likewise.
+ (ada_to_fixed_type_1): Likewise.
+ * cp-valprint.c (cp_print_value_fields_rtti): Likewise.
+ (cp_print_value): Likewise.
+ * d-valprint.c (dynamic_array_type): Likewise.
+ * findvar.c (address_of_variable): Likewise.
+ * jv-valprint.c (java_value_print): Likewise.
+ * valops.c (value_ind): Likewise.
+ * value.c (coerce_ref): Likewise.
+
2014-04-14 Sanimir Agovic <sanimir.agovic@intel.com>
* eval.c (evaluate_subexp_for_sizeof) <UNOP_IND>: Create an indirect
else if (VALUE_LVAL (obj) == lval_memory && value_lazy (obj))
{
v = value_at (type, value_address (obj));
+ type = value_type (v);
bytes = (unsigned char *) alloca (len);
read_memory (value_address (v) + offset, bytes, len);
}
size first before creating the value. */
check_size (rtype);
dval = value_from_contents_and_address (rtype, valaddr, address);
+ rtype = value_type (dval);
}
else
dval = dval0;
off = TYPE_FIELD_BITPOS (rtype, variant_field);
if (dval0 == NULL)
- dval = value_from_contents_and_address (rtype, valaddr, address);
+ {
+ dval = value_from_contents_and_address (rtype, valaddr, address);
+ rtype = value_type (dval);
+ }
else
dval = dval0;
return type;
if (dval0 == NULL)
- dval = value_from_contents_and_address (type, valaddr, address);
+ {
+ dval = value_from_contents_and_address (type, valaddr, address);
+ type = value_type (dval);
+ }
else
dval = dval0;
value_from_contents_and_address (fixed_record_type,
valaddr,
address);
+ fixed_record_type = value_type (obj);
if (real_type != NULL)
return to_fixed_record_type
(real_type, NULL,
/* Ugh, we have to convert back to a value here. */
value = value_from_contents_and_address (type, valaddr + offset,
address + offset);
+ type = value_type (value);
/* We don't actually care about most of the result here -- just
the type. We already have the correct offset, due to how
val_print was initially called. */
base_val = value_from_contents_and_address (baseclass,
buf,
address + boffset);
+ baseclass = value_type (base_val);
thisoffset = 0;
boffset = 0;
thistype = baseclass;
true_type = lookup_array_range_type (true_type, 0, length - 1);
ival = value_at (true_type, addr);
+ true_type = value_type (ival);
d_val_print (true_type,
value_contents_for_printing (ival),
type = lookup_pointer_type (type);
val = value_at (type, address);
+ type = value_type (val);
}
}
{
v = value_full_object (v2, real_type, full, top, using_enc);
v = value_at_lazy (real_type, value_address (v));
+ real_type = value_type (v);
/* We might be trying to cast to the outermost enclosing
type, in which case search_struct_field won't work. */
return value_at_lazy (type, addr);
tem = value_at (type, addr);
+ type = value_type (tem);
/* The first dynamic check specified in 5.2.7. */
if (is_public_ancestor (arg_type, TYPE_TARGET_TYPE (resolved_type)))
Lazy evaluation pays off here. */
val = value_of_variable (var, b);
+ type = value_type (val);
if ((VALUE_LVAL (val) == lval_memory && value_lazy (val))
|| TYPE_CODE (type) == TYPE_CODE_FUNC)
(value_as_address (arg1)
- value_pointed_to_offset (arg1)));
+ enc_type = value_type (arg2);
return readjust_indirect_value_type (arg2, enc_type, base_type, arg1);
}
retval = value_at_lazy (enc_type,
unpack_pointer (value_type (arg),
value_contents (arg)));
+ enc_type = value_type (retval);
return readjust_indirect_value_type (retval, enc_type,
value_type_arg_tmp, arg);
}