Message ID | 20240517083207.130391-23-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=CZ/9dw1D; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; 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 [8.43.85.97]) (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 4VggQ90J2vz1ydW for <incoming@patchwork.ozlabs.org>; Fri, 17 May 2024 18:40:17 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 517033849AF5 for <incoming@patchwork.ozlabs.org>; Fri, 17 May 2024 08:40:15 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id 227FD3849ADB for <gcc-patches@gcc.gnu.org>; Fri, 17 May 2024 08:32:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 227FD3849ADB 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 227FD3849ADB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715934777; cv=none; b=lIx9E7YBYVA6a1IO47I78cQRF03a4KRUQWjAQEzcvU+BPnbSXVi2nz6EaW9tun507Wyc+7XPSwwJrNbU5Z9rfww8PQ1T1EMAUxE0Ud8xnmUTYUbjTtagBRQkSG81XvkbgYzM/41Tec172DzZeG+5oc9n2H+sm26KhhmgEhcOnLw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715934777; c=relaxed/simple; bh=4XnqqBTG1IffKylWgAbFPhtBHtzE1Z5Wv7DwRNTUkFY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=LI4JGdm3XaaGfNUAlQS3gWi6PzDlDqzpiExJjPCuzjOHbC9vC6/ssvXLWLDkloNz6ocZYcW9XiYk8d4LG2kcrx55m9SXIQeXbnthUIt0ZqdsvdQ6CAvnlITx0xwd20F9KPk/LeGMZKUr7lcQFaVDmrcndvxPeYiHLrcCLfYwX5A= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-420180b59b7so36436605e9.0 for <gcc-patches@gcc.gnu.org>; Fri, 17 May 2024 01:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1715934758; x=1716539558; 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=REdRhB/N1vF5CSVF+6P9PRPD0MO/SEVahHsHNkS81gE=; b=CZ/9dw1DcwJsCEeTeQmFQlSZnA2bW6vg1LurjAALjsK4y/+pE52OAPXMI1xe6rxifX 67bk6q2SUpmfZvAzctzy9siStBEFcUfX6cHpNtb0zv8YW7k3mR6jvj7r0QkLF3Yaz4Bk JJJ/rR14oeczi3rqN3iO6lTe2V+LViUuL1rPeRV1OfLTW2XRmyjrnevmAR1qym0rTOqB VYAeKt+3phykzSfJ2lyD9f2F2ZYzNrTA/AzKiQhw4z0btu70qFNJBHdeCvaouKQV8pKL caKq/gMFLTx2+Rb8XUCHyvXevJBGutWCXbR7pmKCK11wR+Wn3wfHT7le6cSk5t8AaFSm K3ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715934758; x=1716539558; 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=REdRhB/N1vF5CSVF+6P9PRPD0MO/SEVahHsHNkS81gE=; b=G0LGTl5ZX85qOjpIs9pBfrR/s/d/iytyd2CZH0vcVS0IY7UvG8nip+iuHSWiuUz/3q TQLJdEPxWFQpxW1Jd1O+opf74t7Q5L3i5SQunSDuqu/5GG3LOvRAaM0Nrx/TYgxvoHaq kFD3XaDiIiXUlkZevLAGFGR5vnLpLkSWj1TTx4FGh7F0fu+/Id3ccregciC6J1McAHQT 3ECR0G+8vIBKSX6/oPTxf+rj1CDm2HHY3JY3nMOK1+6vAL5AnsysKP9JyFVqVksyCzII X0dHdLNH3PhTq7o/xcwfIZ05DCR9N9NdQQJZXx7QzLfdWm/RiGEEySp+glxfW6W0uNev 9v2w== X-Gm-Message-State: AOJu0YwjIttkzYxV264rOgB1h/g7oUO8BuRFdCRq7MzQH5Hmhu2p/rKO H2vpCpUhrlMgvEljSJAAiTZNK51wOcSLOs+nqY1BVIg3nXpZ7mjcuvSNJjbr0V3y9mlrAXWUsiU = X-Google-Smtp-Source: AGHT+IGNm1rbynyaZFpe1cct6VCtiCGQ5fsuYrdLYke0HGrT93UwiHf/CyrOGqJDWOdC2HC6CZH+5Q== X-Received: by 2002:a05:600c:1c8d:b0:41f:ed4b:93f9 with SMTP id 5b1f17b1804b1-41fed4b94ffmr144557385e9.19.1715934757792; Fri, 17 May 2024 01:32:37 -0700 (PDT) Received: from poulhies-Precision-5550.lan ([2001:861:3382:1a90:de37:8b1c:1f33:2610]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-420273cff03sm75197045e9.26.2024.05.17.01.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 01:32:37 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Steve Baird <baird@adacore.com> Subject: [COMMITTED 23/35] ada: Disable Equivalent_Array_Aggregate optimization if predicates involved Date: Fri, 17 May 2024 10:31:55 +0200 Message-ID: <20240517083207.130391-23-poulhies@adacore.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240517083207.130391-1-poulhies@adacore.com> References: <20240517083207.130391-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.1 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/35] ada: Add support for 'Object_Size to pragma Compile_Time_{Warning, Error}
|
expand
|
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 5764b22b800..f6314dff285 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -1950,6 +1950,7 @@ package body Exp_Ch3 is or else not Compile_Time_Known_Value (Type_Low_Bound (Comp_Type)) or else not Compile_Time_Known_Value (Type_High_Bound (Comp_Type)) + or else Has_Predicates (Etype (Comp)) then Initialization_Warning (T); return Empty;
From: Steve Baird <baird@adacore.com> In most paths, the function Build_Equivalent_Record_Aggregate was already testing Has_Predicates for a given component type and conditionally returning an Empty result. This is also needed in the case of a scalar component type. Without it, we can build corrupt trees that fail use-before-definition detection checks in gigi. gcc/ada/ * exp_ch3.adb (Build_Equivalent_Record_Aggregate): Add Has_Predicates test for a scalar component to match what is already done for other kinds of components. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch3.adb | 1 + 1 file changed, 1 insertion(+)