From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +Wv8K+Ee/mlpOyQAWB0awg (envelope-from ) for ; Fri, 08 May 2026 13:35:29 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=NLqGDn/U; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B0B9C1E0BA; Fri, 08 May 2026 13:35:29 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 172CA1E067 for ; Fri, 08 May 2026 13:35:29 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 88B084BA23C8 for ; Fri, 8 May 2026 17:35:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 88B084BA23C8 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=NLqGDn/U Received: from mail-oa1-x2b.google.com (mail-oa1-x2b.google.com [IPv6:2001:4860:4864:20::2b]) by sourceware.org (Postfix) with ESMTPS id 21D034BA5435 for ; Fri, 8 May 2026 17:34:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 21D034BA5435 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 21D034BA5435 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2001:4860:4864:20::2b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778261662; cv=none; b=F+uTXmDI1AiHq+oaMDBGpCu3jhXAOh2NY3YjShLOhlffTTVCpf26/9KkYoDjisIDqB8Rq+q06DHNxEXfm3rhtBuyRXO/c+eQAnzTjzbRgrLHac5EY/UgWtflrVHk3/Y7vnmG7Nvwhb3u8F6gJzIuPRPE47NIlHNCIYZcNwtfaHI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778261662; c=relaxed/simple; bh=zg9MFf6zLtwKx/P5O4NfL4sUvsUo3n7KlhVT0oKuljw=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=F/CE4QSQrsKKV2xkiQGN3hJm4HAqJUGccVxO0IuuOU4bJxZN9zL/1BQPRlODY3QQvBLAX6LpAzDzGa7/qmrRAszxj47QBWH6KkkQvqejj0G4wIcBzlo8a7+IdE4uaUyZgfiDB6NludI6BzpNMfKyEiH4lCkFHZlfZw0zTJf/MZA= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=NLqGDn/U DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21D034BA5435 Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-42c08cbae4cso1762893fac.2 for ; Fri, 08 May 2026 10:34:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1778261661; x=1778866461; darn=sourceware.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YDqrBmBShiwwBMZLRf/feLOSECRDo8ZFEsP1ULJ0x/o=; b=NLqGDn/UkTxM0+x8hcx3R1NA7Mscec9nBArlxG+3mQiAdHUqUR+vevRrpm5223tYas 8j+xZH8bacrGYl0p677N6zeGeGqYuuZa8Uv4JaBqXHzi+x26bsMNj8cs6C20OxWaW5as RtxflVs3VCK2OW3LUpBLJqs4KCBtAe/G8zA/wvQeMNyggTJDvRG1iCYSwi+i7qwLuD6V cpbfdyeqTL3ww59FQGzNDqy6hJnFacdC8uQzXZ7x4VW+qiuOJ1W7Sw4N8KxReotiKcO0 X0Ztp6JjrjG8RgegQaOtVVP9/uOX2VjoBXtaKTpMV/qwKOoYMZywcD8+6/EYDIUsnvet BQgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778261661; x=1778866461; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=YDqrBmBShiwwBMZLRf/feLOSECRDo8ZFEsP1ULJ0x/o=; b=pAU2RlNMGFri08mAUsG5yebFVjm2cEE6sRSFce989rhhly9Jqu8d8ocJ2MUG2cA/Go pJGnPBQzVs4wo2GFmGOO2BBo12RL3vdsVUO9OnCWdUj4ys+fAfU7gmnqTjxNcLtRQzod 2Dgi1SWg76qDka3rjCZhYJSFdid1mKa/nIRd01sfa+lAeOfDh54HRV0kG7W+DUydjb+S ZmmWStw8nSF4cjdoQKyPpDvUZNfhQ4ezGdXKRI/j3t4AUGrCOX6qXZqAzwXOkV3CJyRY hVNZT1DRaBbkGoa5j/CDowocK3bMqjfwRQgfn6mlc8c8Ti7xWAsf1QN8oQyFljN08cVw O1Dw== X-Gm-Message-State: AOJu0YxdcmHSA2BHoiXc4DZzKpXbfAiBmEG/plLXEjqa3l5HadwddvDE EAFLB/Gz+1MF2l+WHaLXDK0XKO/wCMFpVtiK3F1mMHliQ4ebMF73SGo+OiCLF/F0E3eN4X8WYCe EvM8= X-Gm-Gg: AeBDievyzgZMfqA19ZflKaIZAa1ss52RVG/YzP8dVEQa/FbkI4No4/dRVUi79gMWeps +YCn1sHuif/xngxx2GMGVMR0BTQmP/bYU9RkNFuyIKDajWTzcoKUxUmHFZvu4qy+CgKNBPq3Kdu CXmzx65qS7EnthoijqnSSDzFAZmgXX8F61P4leoNlkQWxzMJyKLZE5OZu3F70gslFM9t0nVL3op fvyjUrT8aU1bM0LMB0t9V9IsB9Ws/QIBk4Daps3rxY80yuSjtj1Q33LV+e/nVrW18/catnxk17m EvOl8Gs8/QMHSuWZdU0LNdop3imP5iv5PeESPBb7WfKQWf0MDFA3UxdZ4/D+2kc6tRP3xRMsK53 TAzjl75XpJEOB1V6hbwOcO4S71UookasxyiWgao+2yi9eL1A/ZAm+NfHQpJeUVIQkHqLzI1npCK rIw1vlX+TjFxbC6JxtUcVycfc2Y95PWOVrl7362QtzteanEbcp4ppWZ+JQCJBqhmsY X-Received: by 2002:a05:6820:1c9a:b0:696:233b:20fa with SMTP id 006d021491bc7-69998c8f453mr7029069eaf.1.1778261661307; Fri, 08 May 2026 10:34:21 -0700 (PDT) Received: from [192.168.0.26] (75-166-225-82.hlrn.qwest.net. [75.166.225.82]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-69b25cb58b2sm1425242eaf.8.2026.05.08.10.34.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 10:34:20 -0700 (PDT) From: Tom Tromey Date: Fri, 08 May 2026 11:34:18 -0600 Subject: [PATCH 3/3] Add test for Ada abs operator MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260508-ada-unop-atr-v1-3-6951c4566b82@adacore.com> References: <20260508-ada-unop-atr-v1-0-6951c4566b82@adacore.com> In-Reply-To: <20260508-ada-unop-atr-v1-0-6951c4566b82@adacore.com> To: gdb-patches@sourceware.org Cc: Tom Tromey X-Mailer: b4 0.14.3 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org There were no tests in the tree for the Ada abs operator, meaning that ada_abs was never invoked during a test. This patch adds a new basic test for this. Note that operator overloading of 'abs' does seem to be tested. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34042 --- gdb/testsuite/gdb.ada/abs.exp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/gdb/testsuite/gdb.ada/abs.exp b/gdb/testsuite/gdb.ada/abs.exp new file mode 100644 index 00000000000..5035604fa86 --- /dev/null +++ b/gdb/testsuite/gdb.ada/abs.exp @@ -0,0 +1,29 @@ +# Copyright 2026 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Simple tests of the 'abs' operator. + +load_lib "ada.exp" + +require allow_ada_tests + +clean_restart + +gdb_test_no_output "set language ada" + +gdb_test "print abs -5" [quotemeta {@DECIMAL = 5}] +gdb_test "print abs 5" [quotemeta {@DECIMAL = 5}] +gdb_test "print abs(-5)" [quotemeta {@DECIMAL = 5}] +gdb_test "print abs(5)" [quotemeta {@DECIMAL = 5}] -- 2.54.0