From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22260 invoked by alias); 9 Jul 2010 13:03:19 -0000 Received: (qmail 22173 invoked by uid 22791); 9 Jul 2010 13:03:18 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Jul 2010 13:03:13 +0000 Received: (qmail 2360 invoked from network); 9 Jul 2010 13:03:12 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 9 Jul 2010 13:03:12 -0000 Date: Fri, 09 Jul 2010 13:03:00 -0000 From: Daniel Jacobowitz To: Ken Werner Cc: Ulrich Weigand , gdb-patches@sourceware.org Subject: Re: [patch] Small fix for assigning values to vectors Message-ID: <20100709130308.GR8410@caradoc.them.org> References: <201007061558.07312.ken@linux.vnet.ibm.com> <201007071750.o67HoEVU029546@d12av02.megacenter.de.ibm.com> <20100707182610.GK8410@caradoc.them.org> <201007091238.57599.ken@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201007091238.57599.ken@linux.vnet.ibm.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-07/txt/msg00179.txt.bz2 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