Message ID | 20240520074858.222435-28-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=I5Uq6wej; 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 4VjVQs5sC8z20KG for <incoming@patchwork.ozlabs.org>; Mon, 20 May 2024 18:02:13 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B448A3858CD1 for <incoming@patchwork.ozlabs.org>; Mon, 20 May 2024 08:02:11 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id 81DE83858294 for <gcc-patches@gcc.gnu.org>; Mon, 20 May 2024 07:49:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 81DE83858294 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 81DE83858294 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716191379; cv=none; b=mnJ48fQnkX7FTh5NftI7aiUwgaotUkK6Wl3bJ3MydFOkjl+VSaalZFrPUJDXBn9NGPVH0NX2GbBE4Bhl/sHne3jHX1MaZYCMEF6ST+a+TLziVq8BZATTGdSnUSfC2ZDXIiT0Lou3HCPeQ7Kj62ueETNW7+m7T7c+RRDWCwvxIJE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716191379; c=relaxed/simple; bh=Qa/szz73jOi3I7nhxbJM5VuONatI0r7LGbOfju9ACIA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=q/7Jv4nW4mARjRIV88z5Kfmmaw01Bf8p91Df/U80XRhHoFZK0+l5e1MnzTVA7Q0YZngm/CWry0YPACS+YNsaeTK21wikqQa82jxe9JktP0xbcN0lFyFIua5U5ENjbi3uOjNaQKrrB13KpJuJgJ81YXVW6oxprZPTGBxpomeSyC8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-42016c8db2aso17578455e9.0 for <gcc-patches@gcc.gnu.org>; Mon, 20 May 2024 00:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1716191373; x=1716796173; 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=rBphI6Iv9w1cqzegpUUm8n502yNVmntdIY8vJu7K6I8=; b=I5Uq6wejsFCBe5KnVccywigxXu6LfIZAkH5Y8ftFbR6GUepsp4BPGh1ru3DWVi3OaE tn+r1vO1oFP9ZVWULUAUrhWuPt2R0REGY+XTejTCMMlM5mTB3QdNv203DgP+MOEwI+sD 0lySF5CxwqOUSLLP08D/TRL5gfux/iW6IbFlIcQANSGzcbVwkd8NQ0f6V3082qTR1V5+ YDuOAgwWfVPI/94xl1/vIaUTgUZgqWnW3BbZ7/Q9OQNrBmhoiuZYtcAZXiyMzx19uTm8 NZEXjGvt3fJuU++M1wmVosgrmDWQcUXyuajgC0ApSl23nw4kyIxZqwLugUz9tMJ+VtyV NMQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716191373; x=1716796173; 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=rBphI6Iv9w1cqzegpUUm8n502yNVmntdIY8vJu7K6I8=; b=RYNGCxtBocB40zZnPOPfsox5CylEAbqe1vdd0eeF3oIYYS7jr+Ii60ZvoSSBTyG/UE bXOCHw+pSxsJ9OYO/uq0ovQAQMjGtxuT9L8iPX73mQYAsUpPIbimNqfy9Md9XW0qP2t0 RCXvaXummkgj+LA0Fzwu1NS6kV8Z7fuJB95IfNFucBvzmn/v3nsrm/rDqUw5eFbLfZwT c8hj5y4OXchTFy7UkYrnE7j5SfiohkTJT0IyapolippUj1LHEGKg9yLts9Im3O7Pocdh rxNSkD3CwzgIyCER5Hntq8A3ykY8T/mlCI6BsmgFTR2aju/V2pHg0F2BaJhyCLmRnCP7 atgA== X-Gm-Message-State: AOJu0YwtY1GTEykMovP0GYjoZucznQ3SSb3YcNwMH77ATDOoElSGNHiy 2UmDYrEcNdnr3K4aoYSee2drqz/K9efupz0mKHv9PvCEAduJ61rIegRhh7RcNETmaSR2nUlO1sg = X-Google-Smtp-Source: AGHT+IEsQdwIRoqRRHcsm0mEsrG9CEfOcp5hzBOTxEk0IjUipamttAfwcj5MwDRZc+6enff1i2dJ+A== X-Received: by 2002:a05:600c:4589:b0:420:1fa6:a3ee with SMTP id 5b1f17b1804b1-4201fa6a619mr135697785e9.27.1716191373354; Mon, 20 May 2024 00:49:33 -0700 (PDT) Received: from poulhies-Precision-5550.lan ([2001:861:3382:1a90:de37:8b1c:1f33:2610]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41f88111033sm446892175e9.34.2024.05.20.00.49.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 00:49:33 -0700 (PDT) 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 28/30] ada: Fix internal error on nested aggregate in conditional expression Date: Mon, 20 May 2024 09:48:54 +0200 Message-ID: <20240520074858.222435-28-poulhies@adacore.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240520074858.222435-1-poulhies@adacore.com> References: <20240520074858.222435-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.9 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: Rework and augment documentation on strict aliasing
|
expand
|
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index a386aa85ae4..796b0f1e0de 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -8376,7 +8376,9 @@ package body Exp_Aggr is Static_Components := False; return False; - elsif Is_Delayed_Aggregate (Expr_Q) then + elsif Is_Delayed_Aggregate (Expr_Q) + or else Is_Delayed_Conditional_Expression (Expr_Q) + then Static_Components := False; return False;
From: Eric Botcazou <ebotcazou@adacore.com> This plugs a loophole in the change improving code generation for nested aggregates present in conditional expressions: once the delayed expansion is chosen for the nested aggregate, the expansion of the parent aggregate cannot be left to the back-end and the test must be adjusted to implement this in the presence of conditional expressions too. gcc/ada/ * exp_aggr.adb (Expand_Record_Aggregate.Component_OK_For_Backend): Also return False for a delayed conditional expression. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_aggr.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)