[COMMITTED,30/30] ada: Fix small thinko in previous change to two-pass aggregate expansion
Message ID | 20250106091819.474637-30-poulhies@adacore.com |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9EB3B3858D28 for <patchwork@sourceware.org>; Mon, 6 Jan 2025 09:51:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9EB3B3858D28 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=ZaaA+MqY X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id D5C143858C66 for <gcc-patches@gcc.gnu.org>; Mon, 6 Jan 2025 09:18:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D5C143858C66 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 D5C143858C66 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::329 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736155127; cv=none; b=gX4VEKx4aoqEr4/AXCmqLVBAf2btpdWCLvFqhMJhxmi2DVLw0FPA5aEgFMlZmVcWHkuTNCeycpqmUu286A/I1b1nglo85snMmKs4Xt9cDSLIp0jZQwzOJUWhB5M7BrV13esdNs/ZOEMSUQ3bT4PsIK3kuz8acFOO4uxicb3aKSw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736155127; c=relaxed/simple; bh=DAvLu2vwYmY6RAM4kTftEMhWc8quyaY3vNEU5btUAMY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=gPNGFTwLHCcfiOSFkI4VEFLZsini8UwgSz8Csx2fXlC3UA/tCCL7Hm8BgkhHO3/Y/EA/FcrB/0wUicAiX0bi9FUxjHWGbVLXTkuxH6aLouBJkRDEBsR0p66W/WjU8Lwz3zgYgyJvOHTlwXCbUZZ/gVq3ScDCgo7TqnLY+LLGUkQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5C143858C66 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4362bae4d7dso100964665e9.1 for <gcc-patches@gcc.gnu.org>; Mon, 06 Jan 2025 01:18:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1736155125; x=1736759925; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iqVy6p810CvuvcLac5RInOw1/oynKHBvLAdQO6zKHgg=; b=ZaaA+MqYD3EBzQUr5HGWs28jzezv1Vvj45UY9ecHaZ0qWTgCE9Gc331oqxuG+tq7+o 1Q5PykHtHfcAV9Y4DmpYy//mXrOnYs6y9afF4VthDrIf9x66WXrwtAVwaWUzmpJFw4iJ WMgBcQ6L3sOHE0PjgYTX4hsjiyDbpkkl1kAJ4i3Im/V7ItrsopJYSFOGbp9M7Hx+yKRH FjiWTw0cHZ8jQ8zjYQ1EcNO8udPdWOwnbC1/ieRTPRqIWzJdwhPwneCHgfQecxap91a6 l3Sbz5s6XVT7EG0S8qyS+xyOfOdgV/QFVku3CgFd3vzxx2MdOFhQ2qYAQY2xbRdh4lYR Lkww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736155125; x=1736759925; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iqVy6p810CvuvcLac5RInOw1/oynKHBvLAdQO6zKHgg=; b=JvmCiAsuQPD9tYcRI+cT4asQ9t3Tvv9GZT0oZWH2ikWgpXKLht50NKAMnzDKQ+CDFG fISbfrpmiT6FxGOf4OXwRah8TI5WUVKqxo5T+qgMbcaJm4XOXXSTjCzutuPXdfmcVfk8 Br3ESFraZ4NmvMyCTKsP/hvmWjMszIkphTbDO+q0lPP7C44ebl6UOyDK5t9fUFQXDM8R GsejPvnmoppMC6l7+tF7g1PVzCHOILULLWntT+BAbOsWj/D51L9tN+U/7zrTmqblWPhL L4sGOnWvm2YHE0W9bsuNncniNLhbPJSxWZCULL8C7DGs+QLkGVaoxr4xxaL/DAJ6TwvY WjMg== X-Gm-Message-State: AOJu0YxDIqu2yd2zTw2V5tx8QjxjhU3Kt3tVwkk0M8ZZyQuMnLGJc7TN zH+cIDRW9vKKuwi2sb8Bnb9Vgk7lx58LxV79RE42+yA8EGRmilf2Hm9XZ1vU3G/pmrIWfw0yftU = X-Gm-Gg: ASbGncuWRMHyykBAOml6WkD7qqN0xxTUX6u27fKYLB107x4r+2573Sd9X1xu9tecbMP iEE9qJnQXLarG+eompjgtyHCPRPrqowl1Wpnkxb3JcMJJKLNNTnr8horGn/I5AjsE9PLEWldQpJ Ttk0uFiEgz9/Sx89TL9aEH2VSK70di1wGyrVX1TBsOptR18Jyx6sn1tcQyDU6szhuuyr0K6iYNb 2b0TP1tMIAyBOKLMgCe8IWSak8w2n/uwRXb5Ydlt1Xuw9HuGR17IteE6I74tJT3MIe8ZbmibCzr 3obdB82/l28C+UCQ74cjjwq1vRPDdAZfQtesf51XFt89X7021+TPs2KtzAolCc7gsVTE4Wla X-Google-Smtp-Source: AGHT+IHR7bz25uqZkIP1GQAoJlljx+CI3Jzmvd2q5TCzFFjofw3H2sscLID1ePGlbNtvuaw6/v1Mbg== X-Received: by 2002:a5d:5f4a:0:b0:385:fdc2:1808 with SMTP id ffacd0b85a97d-38a223f7172mr52221871f8f.40.1736155125538; Mon, 06 Jan 2025 01:18:45 -0800 (PST) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a5524f064sm21367322f8f.101.2025.01.06.01.18.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 01:18:45 -0800 (PST) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou <ebotcazou@adacore.com> Subject: [COMMITTED 30/30] ada: Fix small thinko in previous change to two-pass aggregate expansion Date: Mon, 6 Jan 2025 10:18:18 +0100 Message-ID: <20250106091819.474637-30-poulhies@adacore.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250106091819.474637-1-poulhies@adacore.com> References: <20250106091819.474637-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.7 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
Series |
[COMMITTED,01/30] ada: Remove workaround for RM_Size being unable to represent unknown size
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_gcc_build--master-arm | fail | Patch failed to apply |
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 | fail | Patch failed to apply |
Commit Message
Marc Poulhiès
Jan. 6, 2025, 9:18 a.m. UTC
From: Eric Botcazou <ebotcazou@adacore.com>
We need a type tailored to the base index type to compute the length.
gcc/ada/ChangeLog:
* exp_aggr.adb (Two_Pass_Aggregate_Expansion): Use the base type of
the index type to find the type used to compute the length.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/exp_aggr.adb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index fb5cfc6d1f0..f771660d23a 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -5601,10 +5601,11 @@ package body Exp_Aggr is Comp_Type : constant Entity_Id := Etype (N); Index_Id : constant Entity_Id := Make_Temporary (Loc, 'I', N); Index_Type : constant Entity_Id := Etype (First_Index (Etype (N))); + Index_Base : constant Entity_Id := Base_Type (Index_Type); Size_Id : constant Entity_Id := Make_Temporary (Loc, 'I', N); Size_Type : constant Entity_Id := Integer_Type_For - (Esize (Index_Type), Is_Unsigned_Type (Index_Type)); + (Esize (Index_Base), Is_Unsigned_Type (Index_Base)); TmpE : constant Entity_Id := Make_Temporary (Loc, 'A', N); Assoc : Node_Id := First (Component_Associations (N));