From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100003 invoked by alias); 24 Apr 2018 12:11:46 -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 99954 invoked by uid 89); 24 Apr 2018 12:11:42 -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=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; Tue, 24 Apr 2018 12:11:40 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C1E84117036; Tue, 24 Apr 2018 08:11:38 -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 npKheDtOWRTk; Tue, 24 Apr 2018 08:11:38 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 9259411702A; Tue, 24 Apr 2018 08:11:38 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id D546783055; Tue, 24 Apr 2018 05:11:36 -0700 (PDT) Date: Tue, 24 Apr 2018 12:11: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: <20180424121136.42oiuprwhfnvslzg@adacore.com> References: <1524505529-79109-1-git-send-email-brobecker@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2018-04/txt/msg00460.txt.bz2 >  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. -- Joel