From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48167 invoked by alias); 30 Apr 2018 22:51:25 -0000 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 Received: (qmail 48151 invoked by uid 89); 30 Apr 2018 22:51:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=SPARC, HContent-Transfer-Encoding:8bit X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Apr 2018 22:51:24 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B1BE91170FD; Mon, 30 Apr 2018 18:51:22 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ZRNeoOdZkpe7; Mon, 30 Apr 2018 18:51:22 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 823A91170F2; Mon, 30 Apr 2018 18:51:22 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id C2E2083055; Mon, 30 Apr 2018 15:51:20 -0700 (PDT) Date: Mon, 30 Apr 2018 22:51:00 -0000 From: Joel Brobecker To: vladimir.mezentsev@oracle.com Cc: gdb-patches@sourceware.org Subject: Re: [RFA/commit] (SPARC/LEON) fix incorrect array return value printed by "finish" Message-ID: <20180430225120.cufq23swioh6qtkc@adacore.com> References: <1524505529-79109-1-git-send-email-brobecker@adacore.com> <20180424121136.42oiuprwhfnvslzg@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180424121136.42oiuprwhfnvslzg@adacore.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2018-04/txt/msg00672.txt.bz2 Hi Vladimir, On Tue, Apr 24, 2018 at 05:11:36AM -0700, Joel Brobecker wrote: > >  I never used  ada and it looks like a bug in ada compiler not in gdb. > > Probably ada generates incorrect code for function which returns a small > > array. > > > > The similar c  test works: > > % cat r.c > > #include > > > > typedef int __attribute__ ((vector_size (2 * sizeof(int)))) I2; > > A vector and an array are not treated the same. So your example > is actually not quite equivalent. And this is the reason behind > the first part of my analysis that said we need to both check > TYPE_CODE_ARRAY *and* the TYPE_VECTOR flag. > > You'll also note that I explicitly made sure that gnu_vectors.exp > still passes for me, and so I'm fairly sure that the "similar C test" > you cooked up above still works as well. But if you could give my patch > a try on Solaris to double-check (eg: by running gnu_vector.exp after > applying it), that would be a second confirmation. Was my explanation satisfactory to you? Did you want to test my change on Solaris before we decide whether to go for this patch or not? -- Joel