Message ID | 20230627120745.3419192-1-poulhies@adacore.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp8144309vqr; Tue, 27 Jun 2023 05:09:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5F/qG7Mp/NE/E7MpptnnA3l6ETrkhYPi5aIPBEFG7POskEA6Qs16jzBTkmyiu7vbCaYMc/ X-Received: by 2002:a17:907:6292:b0:988:f559:47b with SMTP id nd18-20020a170907629200b00988f559047bmr18165093ejc.31.1687867780441; Tue, 27 Jun 2023 05:09:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687867780; cv=none; d=google.com; s=arc-20160816; b=VNNkM7seA6klfQJ1npstx4qe3t06DMz/1LL1Fb1UDx8nD0BIeU7ChE8VsaU912eFkM fWgrAzbHLI2AGgF3wHEkz7Kcrjw1TGhAOJ/pAoeGga0nadOFnd8wjKsLJw5Xx//+jWzh YBy3j6sgT8caGCSDjIWCaOx1eCLMCrAv0f/uPbudoz/QoOd4QsuoixGqzCvtH+5+TsTu k8gZrKGwTEh9fSVDYj/x29LcrpT+QRZywmqpRDUpHc6BkK0F+SOyq9Hp6qQtOW1gRlC1 U1Qk9DbsyKN46GX4IkmKzQ9dvgAQdcZjvEDaj1UKF5xt6i+IT3Q2t3y+MM4MU9INWRXE Odgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=oSPKuSQ3ZPu9HKjcwijIIIrAmvHKOL3MKalnfY6qOn0=; fh=V3FUX71dhq7uYqp2NU3QsSvdKCASDvtMIqKaZekiAR8=; b=Gn5TNnZOeEw6rbyGfQV+98Vj4OW0ohvHB058bykdyECLJ+a9l1uifoJIqofqmbdSRD 8MqHQCRFB0KyEXraCnoaFE5YWtFp4Y+dV7boUrcnjwQ0U0py4nArHopeiV3aYL+uHdHs ZM/zbfrmRzV9c/spb4UqLWmHq7n60z9bcXwbMm6WQ6NeQgVrHauf1phEfIgYuxvFWPTl ZPIesOMZY+71As244FbL5oA9Qz4msFSTVMp6E1z4Y3a8FJF4gSenYtyXOkbaH0hRfaMR brJiH9y/CZY3cLr5VV7qo5pIpH8tVUhIcAOCrLfg//7ibKCvQUkZ6tUd2W7UvnMepvRj SB0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=P2c3jr8P; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id y9-20020a170906914900b0098894bc585fsi3919202ejw.654.2023.06.27.05.09.40 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jun 2023 05:09:40 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=P2c3jr8P; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E5403385483C for <ouuuleilei@gmail.com>; Tue, 27 Jun 2023 12:08:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E5403385483C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687867729; bh=oSPKuSQ3ZPu9HKjcwijIIIrAmvHKOL3MKalnfY6qOn0=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=P2c3jr8PTCwIyqrkNJjC3DdpLERS5wsuLyGAOskACIOzaMkBGnRFzwixq2RA7HzBI DGw7VXbBMHYFaCJ1mgCmsjiUmwPFprVH01w6Y0Iv8jJC1N33QgZY7tt0rf8SpeaxZ2 chhovMYLdRViRSIypoWC7XszpeARlp+GREpL5zng= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id 068703858C2F for <gcc-patches@gcc.gnu.org>; Tue, 27 Jun 2023 12:07:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 068703858C2F Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3fa96fd7a01so25603045e9.1 for <gcc-patches@gcc.gnu.org>; Tue, 27 Jun 2023 05:07:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687867678; x=1690459678; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oSPKuSQ3ZPu9HKjcwijIIIrAmvHKOL3MKalnfY6qOn0=; b=fWtxsjnp9vkzEtJm6v/jo2eoyvCJqTl50O7j4xG0Ak03V/wD/c+zIpMOXUhFFIHVeB pHOzBckIHpXlEQueaCPMSTgwyPRi14WAiYnl2yxeAAg1o7lMLc4XAx1wUY70HMRin/Rm R1P/AAb7BhWYE06G9iVjP5KpZfBc9NA53gwdOrBl8QhVmsFExv6OXQGHTZ+/tE72W+J+ j+LUgT0adQRY/POfXVY2cRtKg5DMcqH9Y/t970BCU0Q9SiVpEs0yOp3Cef/oaxWitgLN KBQsFDNBgvjWwOIdCeoOC24DEN/jAXvh3f8zFwnSZa5QqbLUJvxtpxkQZS6msNVRkNUG XfbA== X-Gm-Message-State: AC+VfDw2JDKOsBJ5DGCLqIJjLEV54sCLQ87/OfYlmvRxOCNA+ltBl7n1 b5zmKT+OuWSfxZIs6spGUgfj+eVrzxvdxvuEUYL0cA== X-Received: by 2002:a7b:c459:0:b0:3fa:9538:963e with SMTP id l25-20020a7bc459000000b003fa9538963emr4802703wmi.36.1687867677575; Tue, 27 Jun 2023 05:07:57 -0700 (PDT) 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 a7-20020adfe5c7000000b0030c6751a49dsm802128wrn.115.2023.06.27.05.07.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jun 2023 05:07:56 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Viljar Indus <indus@adacore.com> Subject: [COMMITTED] ada: Fix expanding container aggregates Date: Tue, 27 Jun 2023 14:07:45 +0200 Message-Id: <20230627120745.3419192-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 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, T_SCC_BODY_TEXT_LINE 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.29 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> From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= <gcc-patches@gcc.gnu.org> Reply-To: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769857645738997244?= X-GMAIL-MSGID: =?utf-8?q?1769857645738997244?= |
Series |
[COMMITTED] ada: Fix expanding container aggregates
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Marc Poulhiès
June 27, 2023, 12:07 p.m. UTC
From: Viljar Indus <indus@adacore.com>
Ensure that that container aggregate expressions are expanded as
such and not as records even if the type of the expression is a
record.
gcc/ada/
* exp_aggr.adb (Expand_N_Aggregate): Ensure that container
aggregate expressions do not get expanded as records but instead
as container aggregates.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/exp_aggr.adb | 1 +
1 file changed, 1 insertion(+)
Comments
> Ensure that that container aggregate expressions are expanded as > such and not as records even if the type of the expression is a > record. > > gcc/ada/ > > * exp_aggr.adb (Expand_N_Aggregate): Ensure that container > aggregate expressions do not get expanded as records but instead > as container aggregates. This is not a regression but the problem is quite visible in Ada 2022 so I backported the fix onto the 13 branch.
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 5e22fefbc1d..d922c3bf1a4 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -6463,6 +6463,7 @@ package body Exp_Aggr is if Is_Record_Type (T) and then not Is_Private_Type (T) + and then not Is_Homogeneous_Aggregate (N) then Expand_Record_Aggregate (N);