This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Small fix for assigning values to vectors
On Fri, Jul 09, 2010 at 12:38:57PM +0200, Ken Werner wrote:
> Ok, the attached patch removes coerce_array call as well. Tested on powerpc64-
> *-linux-gnu and i686-*-linux-gnu, no regressions.
I'm confused.
> @@ -1083,13 +1083,6 @@ value_assign (struct value *toval, struc
> toval = value_coerce_to_target (toval);
> fromval = value_cast (type, fromval);
> }
> - else
> - {
> - /* Coerce arrays and functions to pointers, except for arrays
> - which only live in GDB's storage. */
> - if (!value_must_coerce_to_target (fromval))
> - fromval = coerce_array (fromval);
> - }
>
> CHECK_TYPEDEF (type);
>
I thought we were discussing toval, at the top of the context block;
that's the destination. It seems to me like we do need to coerce
fromval here. If this works, maybe somewhere else is coercing it
anyway?
--
Daniel Jacobowitz
CodeSourcery