From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39398 invoked by alias); 26 Dec 2018 14:03:21 -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 39287 invoked by uid 89); 26 Dec 2018 14:03:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=2018-12-26, H*Ad:D*be, HContent-Transfer-Encoding:8bit X-HELO: mailsec117.isp.belgacom.be Received: from mailsec117.isp.belgacom.be (HELO mailsec117.isp.belgacom.be) (195.238.20.113) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Dec 2018 14:03:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1545832999; x=1577368999; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=F+bU6CdJPuxI2XIW++hwfKxHuRU3ZHaEj2b3R4JEauo=; b=Y7ki0acaPP0ieAnWkEf4EaPrhbw5VMgUAe3zQpjSyscH9G7Ztx2HlCDf 2XA1Au7GL6yHQtLuoVqVzl1bUnFQog==; Received: from 184.205-67-87.adsl-dyn.isp.belgacom.be (HELO md.home) ([87.67.205.184]) by relay.skynet.be with ESMTP/TLS/DHE-RSA-AES128-GCM-SHA256; 26 Dec 2018 15:03:10 +0100 From: Philippe Waroquiers To: gdb-patches@sourceware.org Cc: Philippe Waroquiers Subject: [RFAv2 1/4] Fix gdb.ada/packed_array_assign.exp by using more unique names. Date: Wed, 26 Dec 2018 14:03:00 -0000 Message-Id: <20181226140304.19594-2-philippe.waroquiers@skynet.be> In-Reply-To: <20181226140304.19594-1-philippe.waroquiers@skynet.be> References: <20181226140304.19594-1-philippe.waroquiers@skynet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00323.txt.bz2 The test gdb.ada/packed_array_assign fails due to conflict between component 'w' and system.dim.mks.w: (gdb) print pra := ((x => 2, y => 0, w => 17), pr, (x => 7, y => 1, w => 23)) Unknown component name: system.dim.mks.w. (gdb) FAIL: gdb.ada/packed_array_assign.exp: print pra := ((x => 2, y => 0, w => 17), pr, (x => 7, y => 1, w => 23)) Also, depending on the compiler version, the component w might be reordered and placed before components x and y. So, change the component order in the source, so that both an old compiler (GNATMAKE 6.3.0, gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516) and a new compiler (GNATMAKE Pro 20.0w (20181210-82), based on gcc 8.2.1) produce the same component order (checked by using -gnatR3s). So, update to test the new (more unique) names in the source order. 2018-12-26 Philippe Waroquiers * gdb.ada/packed_array_assign/aggregates.ads (Packed_Rec): Rename components to Packed_Array_Assign_[X|Y|W]. Place component Packed_Array_Assign_W as first component, to ensure old and new compilers have the same representation. All users updated. --- gdb/testsuite/gdb.ada/packed_array_assign.exp | 4 ++-- gdb/testsuite/gdb.ada/packed_array_assign/aggregates.ads | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.ada/packed_array_assign.exp b/gdb/testsuite/gdb.ada/packed_array_assign.exp index 25b20dd223..317a156c8d 100644 --- a/gdb/testsuite/gdb.ada/packed_array_assign.exp +++ b/gdb/testsuite/gdb.ada/packed_array_assign.exp @@ -26,5 +26,5 @@ clean_restart ${testfile} runto "aggregates.run_test" gdb_test \ - "print pra := ((x => 2, y => 0, w => 17), pr, (x => 7, y => 1, w => 23))" \ - " = \\(\\(w => 17, x => 2, y => 0\\), \\(w => 104, x => 2, y => 3\\), \\(w => 23, x => 7, y => 1\\)\\)" + "print pra := ((packed_array_assign_x => 2, packed_array_assign_y => 0, packed_array_assign_w => 17), pr, (packed_array_assign_x => 7, packed_array_assign_y => 1, packed_array_assign_w => 23))" \ + " = \\(\\(packed_array_assign_w => 17, packed_array_assign_x => 2, packed_array_assign_y => 0\\), \\(packed_array_assign_w => 104, packed_array_assign_x => 2, packed_array_assign_y => 3\\), \\(packed_array_assign_w => 23, packed_array_assign_x => 7, packed_array_assign_y => 1\\)\\)" diff --git a/gdb/testsuite/gdb.ada/packed_array_assign/aggregates.ads b/gdb/testsuite/gdb.ada/packed_array_assign/aggregates.ads index b43f70ade7..2648982e0e 100644 --- a/gdb/testsuite/gdb.ada/packed_array_assign/aggregates.ads +++ b/gdb/testsuite/gdb.ada/packed_array_assign/aggregates.ads @@ -17,8 +17,8 @@ package Aggregates is subtype Int is Integer range 0 .. 7; type Packed_Rec is record - X, Y : Int; - W : Integer; + Packed_Array_Assign_W : Integer; + Packed_Array_Assign_X, Packed_Array_Assign_Y : Int; end record; pragma Pack (Packed_Rec); @@ -28,6 +28,8 @@ package Aggregates is procedure Run_Test; private - PR : Packed_Rec := (y => 3, w => 104, x => 2); + PR : Packed_Rec := (Packed_Array_Assign_Y => 3, + Packed_Array_Assign_W => 104, + Packed_Array_Assign_X => 2); PRA : Packed_RecArr (1 .. 3); end Aggregates; -- 2.19.2