From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id F40723858D20 for ; Mon, 28 Feb 2022 20:43:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F40723858D20 Received: by mail-il1-x134.google.com with SMTP id i1so10983466ila.7 for ; Mon, 28 Feb 2022 12:43:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LjhFyNixn6dPaJDjBMS9gulhFZb9Fhccf+DXNRj9ifM=; b=asMC/XzxvSpP5D6zS9ieaX0ugUcWh4QLUH0PvgqIaW+F2Ha1NxzOe56xF8JxCqr/Cu UJVuaogRpuWCXt/7dl3loB1CAfou0UP2I/8kBdzDQh8L3bURR/DQVbn9DLY16o6+qBKg fiJUuAqZq/LbPChXrdQy0E/laatcZTQt7AS7tFazacw1fywvYch97oPCM6f0O6IKWrCr vwM9MOpQqZ8Hzk9dojeZMaoQfW/TkDYYeS3gh+AQEQG39uAwHlX9+iyC0Iy8eQSBcqOe DPAAOLRZ/al20VA4JAjrKp7jvRl7eJ84GeTYXKTrwMhm9LyQrjIcq1BHEEFoNW2euH6P Q2zw== X-Gm-Message-State: AOAM5331/QldhF2XIv2Wbpdt3gyRYHPqqsSFJlPAwzjITQHxONQ4lJzs lLcofwFrQwo49PktFHCw/RSJ1J3eKMoB+Q== X-Google-Smtp-Source: ABdhPJzWe/UeGBN3O9+y43xawtZNbZ2ba/1VP7ypC8ov8fCXqOkdK2HHoLyu+PMCoLplPcz4GIZMGA== X-Received: by 2002:a92:c691:0:b0:2be:8eab:9f7d with SMTP id o17-20020a92c691000000b002be8eab9f7dmr20463718ilg.26.1646081034260; Mon, 28 Feb 2022 12:43:54 -0800 (PST) Received: from murgatroyd.Home (75-166-141-253.hlrn.qwest.net. [75.166.141.253]) by smtp.gmail.com with ESMTPSA id z4-20020a92d184000000b002b7bdf53db1sm6567882ilz.39.2022.02.28.12.43.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 12:43:53 -0800 (PST) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Fix gdb.ada/arrayptr.exp results Date: Mon, 28 Feb 2022 13:43:52 -0700 Message-Id: <20220228204352.1175094-1-tromey@adacore.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2022 20:43:56 -0000 PR ada/28115 points out that gdb.ada/arrayptr.exp works with GNAT 12, but fails with minimal encodings in earlier versions. This patch updates the test to try to report the results correctly. I tried this with the Fedora 34 system gcc (GCC 11) and with a GCC 12 built from git trunk sometime relatively recently. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28115 --- gdb/testsuite/gdb.ada/arrayptr.exp | 37 +++++++++++------------------- 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/gdb/testsuite/gdb.ada/arrayptr.exp b/gdb/testsuite/gdb.ada/arrayptr.exp index 0e188bf9943..23e89759666 100644 --- a/gdb/testsuite/gdb.ada/arrayptr.exp +++ b/gdb/testsuite/gdb.ada/arrayptr.exp @@ -54,33 +54,22 @@ foreach_with_prefix scenario {all minimal} { set kfail_packed_array_range_re \ "cannot subscript or call something of type `foo__packed_array_ptr'" - gdb_test_multiple "print pa_ptr.all" "" { - -re -wrap " = \\(10, 20, 30, 40, 50, 60, 62, 63, -23, 42\\)" { - pass $gdb_test_name - } - -re -wrap $kfail_int128support_re { - kfail gdb/20991 $gdb_test_name - } + # GNAT >= 12.0 has the needed fix here. + if {$scenario == "minimal" && ![test_compiler_info {gcc-1[2-9]-*}]} { + setup_kfail "minimal encodings" *-*-* } + gdb_test "print pa_ptr.all" \ + " = \\(10, 20, 30, 40, 50, 60, 62, 63, -23, 42\\)" - gdb_test_multiple "print pa_ptr(3)" "" { - -re -wrap " = 30" { - pass $gdb_test_name - } - -re -wrap $kfail_int128support_re { - kfail gdb/20991 $gdb_test_name - } - -re -wrap $kfail_packed_array_range_re { - kfail gdb/28115 $gdb_test_name - } + # GNAT >= 12.0 has the needed fix here. + if {$scenario == "minimal" && ![test_compiler_info {gcc-1[2-9]-*}]} { + setup_kfail "minimal encodings" *-*-* } + gdb_test "print pa_ptr(3)" " = 30" - gdb_test_multiple "print pa_ptr.all(3)" "" { - -re -wrap " = 30" { - pass $gdb_test_name - } - -re -wrap $kfail_int128support_re { - kfail gdb/20991 $gdb_test_name - } + # GNAT >= 12.0 has the needed fix here. + if {$scenario == "minimal" && ![test_compiler_info {gcc-1[2-9]-*}]} { + setup_kfail "minimal encodings" *-*-* } + gdb_test "print pa_ptr.all(3)" " = 30" } -- 2.31.1