From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53744 invoked by alias); 30 Apr 2018 22:58:23 -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 53732 invoked by uid 89); 30 Apr 2018 22:58:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1316, HContent-Transfer-Encoding:8bit X-HELO: aserp2130.oracle.com Received: from aserp2130.oracle.com (HELO aserp2130.oracle.com) (141.146.126.79) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Apr 2018 22:58:21 +0000 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w3UMu74F157986; Mon, 30 Apr 2018 22:58:16 GMT Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2hmeg5p588-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Apr 2018 22:58:16 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w3UMwGC8007704 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Apr 2018 22:58:16 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w3UMwFFh004872; Mon, 30 Apr 2018 22:58:15 GMT Received: from [192.168.86.56] (/98.234.104.47) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 30 Apr 2018 15:58:15 -0700 Subject: Re: [RFA/commit] (SPARC/LEON) fix incorrect array return value printed by "finish" To: Joel Brobecker Cc: gdb-patches@sourceware.org References: <1524505529-79109-1-git-send-email-brobecker@adacore.com> <20180424121136.42oiuprwhfnvslzg@adacore.com> <20180430225120.cufq23swioh6qtkc@adacore.com> From: vladimir.mezentsev@oracle.com Message-ID: <53b56f54-4550-2fb8-1c1c-4c15ab459abe@oracle.com> Date: Mon, 30 Apr 2018 22:58:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20180430225120.cufq23swioh6qtkc@adacore.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8879 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=953 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804300221 X-SW-Source: 2018-04/txt/msg00673.txt.bz2 Hi Joel, On 04/30/2018 03:51 PM, Joel Brobecker wrote: > 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?   yes.  Your fix looks good to me. -Vladimir > Did you want to test my change > on Solaris before we decide whether to go for this patch or not? >