-
- if (TYPE_LENGTH (type) != TYPE_LENGTH (target_type))
- {
- /* Obscure case of range type that has different length from
- its base type. Perform a conversion, or we will get a
- nonsense value. Actually, we could use the same
- code regardless of lengths; I'm just avoiding a cast. */
- struct value *v1
- = value_from_contents_and_address (type, valaddr + offset, 0);
- struct value *v = value_cast (target_type, v1);
-
- val_print (target_type, value_contents_for_printing (v),
- value_embedded_offset (v), 0, stream,
- recurse + 1, v, options, language);
- }
- else
- val_print (TYPE_TARGET_TYPE (type), valaddr, offset,
- address, stream, recurse, original_value,
- options, language);
+ val = value_cast (target_type, val);
+ common_val_print (val, stream, recurse + 1, options,
+ language_def (language_ada));