Message ID | 20240801151738.400796-11-poulhies@adacore.com |
---|---|
State | New |
Headers | show
Return-Path: <gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=Kb2ITpn8; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WZYKf5z87z1yZv for <incoming@patchwork.ozlabs.org>; Fri, 2 Aug 2024 01:48:54 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E4279384AB59 for <incoming@patchwork.ozlabs.org>; Thu, 1 Aug 2024 15:48:52 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by sourceware.org (Postfix) with ESMTPS id 3DD1F385E44D for <gcc-patches@gcc.gnu.org>; Thu, 1 Aug 2024 15:18:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3DD1F385E44D 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 3DD1F385E44D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::233 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722525503; cv=none; b=pmGnb3o2hN9xEp++mCCihv6jkTBmRpTWdG89Z5WIRp7bq1PxWtFiWZFIRyBayPc7cT1cRR6w8DOy77S0z4JCpHQXHOVTuonskiuimgRaIr2k24KfjTbj47OYk5u+FyICA3/kQOgkXKO2TapcI6E/G/64NnMOlFfxOykR3KSLx+E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722525503; c=relaxed/simple; bh=POuQg2fCMrCZX4o0kW6C10SOjWk3fp/7pnDLivmpjd0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=EPrbnUobsFXbSZOqaacNQ3luz3MTGZ820ZfuIOzuCJtt8ikY/lqO/TmOlb55Bs4spSsaqJElQW5r0BYC6WcBzrbpZEgZDREv7qV7cQCFJxE4uxSRI2eU2ytsSn1OQZYPF5UDEng73GzK2e9s6kxlu9lvsmJQwH41Qdb7IkhyUsc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2ef2d582e31so84330891fa.2 for <gcc-patches@gcc.gnu.org>; Thu, 01 Aug 2024 08:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1722525499; x=1723130299; 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=VHlG2PfjHS3kKOyga7VWOC6CEQO3TdCNGmHT9McLCNg=; b=Kb2ITpn8g7bN/r8sfw0gDj24yvTOl34Vjzqs+d/XlbGltSagIrgEnAT5XLN4hDqkO+ 4yNvUhjUjyg5oTL82POE1Ar1JUrrA4nZvgX7BsYgyOxAJfEJQwsZPIue3D3nB7WZS4VV /xVz20R1VUXONXyGp+6Ht+Uz1Cw4wcqmF6aY2zRu+beyUu4Uz/DG3h8/jId2rSNdu8vH enxfHb784ezYg30/ZUmITFiW3Jue2+HBufJkx68BsrCRumTng1/GDdBa+xrU185AIHwI TjvVQb9hJ6vlunIw2ufO+8RmxImSvw4/jvpwj5nd1doE6dPlSkz4b/zmDjQJih3CA9Pe cy3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722525499; x=1723130299; 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=VHlG2PfjHS3kKOyga7VWOC6CEQO3TdCNGmHT9McLCNg=; b=Lzei+BG+V/BME4Fq3tBdYTDhtekfBQ7HeLCmXYFTk0XVyTo8xuTpl7c/P0Gsjutta1 f2oj/vz4ZUBATj+G33CESJ1Db99PmFN7duBkfBvJSEnDEFgQdRYLA171l+pFjEKuC6n3 VN3xmwgclXgpA56qfx20TtT8O5O+e6KCp16APNG4l8ZN3ZwJfS67d9ouBf7/faryGZl/ yc37WXkyj06jujkvdhdAAh6etR8H0Mv43n2e3ArBOOinX7HC3e2LOWZzRupRvtCaIlgV xCISHd9g0Tr7uCbErXhC0H5LDwrwaF/R7OSzP9TCpjaO5MShFTHWgAnILqH+wnf8kaW7 PUGA== X-Gm-Message-State: AOJu0Yy181IjXNUPV+FrPxIWb5zCBd7+7jG90pI+5zjzBfKb8YHqW4ky PUaYRr+aGl5Qk+shIAW3wYc6w/QqvFcjonjlIboMD4djeKoQv/DIGyMURsqZTciUVBFq7xGRZx2 9xQ== X-Google-Smtp-Source: AGHT+IF6yjNMInF3iun8gd1xq1S74btRHBnFLL3l/y7Cbpym7nYpe8wVv59tYE2Q6q7tWUInF4BwyQ== X-Received: by 2002:a2e:9296:0:b0:2f1:59ed:879d with SMTP id 38308e7fff4ca-2f15aa84d1bmr4867431fa.1.1722525480316; Thu, 01 Aug 2024 08:18:00 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:b6aa:4751:9ea1:da1e]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b36857fdesm20065995f8f.75.2024.08.01.08.17.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 08:17:59 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Javier Miranda <miranda@adacore.com> Subject: [COMMITTED 11/30] ada: Miscomputed bounds for inner null array aggregates Date: Thu, 1 Aug 2024 17:17:19 +0200 Message-ID: <20240801151738.400796-11-poulhies@adacore.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801151738.400796-1-poulhies@adacore.com> References: <20240801151738.400796-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.6 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~incoming=patchwork.ozlabs.org@gcc.gnu.org |
Series |
[COMMITTED,01/30] ada: Remove obsolete workaround
|
expand
|
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index bddfbecf46d..5f7c7321f4f 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -569,10 +569,9 @@ package body Sem_Aggr is end if; -- For null aggregates, build the bounds of their inner dimensions - -- (if not previously done). They are required for building the - -- aggregate itype. + -- since they are required for building the aggregate itype. - elsif No (Aggr_Range (Dim + 1)) then + else declare Loc : constant Source_Ptr := Sloc (N); Typ : constant Entity_Id := Etype (N); @@ -622,7 +621,6 @@ package body Sem_Aggr is Null_Range := Make_Range (Loc, New_Copy_Tree (Lo), Hi); Analyze_And_Resolve (Null_Range, Index_Typ); - pragma Assert (No (Aggr_Range (Num_Dim))); Aggr_Low (Num_Dim) := Low_Bound (Null_Range); Aggr_High (Num_Dim) := High_Bound (Null_Range); Aggr_Range (Num_Dim) := Null_Range;
From: Javier Miranda <miranda@adacore.com> gcc/ada/ * sem_aggr.adb (Collect_Aggr_Bounds): Adjust previous patch to store the bounds of inner null aggregates in the itype; required generate the runtime check of ARM 4.3.3(30). Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_aggr.adb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)