Message ID | 20230529082931.2410398-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 k13csp1365707vqr; Mon, 29 May 2023 01:43:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5tLPGtNmIr/kJj3aK3S4ltP2bkheRf1aNThFLqs1/k7P8egeCfmKN20vbB7j3t5kN4Z7H3 X-Received: by 2002:a17:906:58c4:b0:961:78c2:1d27 with SMTP id e4-20020a17090658c400b0096178c21d27mr10362133ejs.19.1685349831031; Mon, 29 May 2023 01:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685349831; cv=none; d=google.com; s=arc-20160816; b=gIKv4mxQIFKMJKWHZFLw3OxY+1Xz1CGFlaiNohRF0wpSxj38NZiybX9A6q2LI0grsJ LeO9CvgethwocBJ933bVfjgZgJwzrmny8ufDjSO2v2L9M8H49y9hezc/6X0r3hptS7j2 Jqc8b496js6gMEOjABTZdVZVI8kQxTCID5A953cd7SoHHBP+6O7yKT9i8d7Kq7UjMQv0 ht7OldmQi6VZZ5JLRDnwhFQojcSv+Nn3LKaxNc+74rJadQDSHn525/8GSnAHJXTWcfPu 7sJY7smVPtc9v/jfmEzSwKQ6gcnk8L766byuc+BkNXjDQoHp7y4Y1RsOvCUG2iIX+xrF DWfg== 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=OkeGlqpTLlDccSPZ9w1+TaxqNjcwj/uONRhS3DSgUNk=; b=O3Y3ziTkMl7fdXEhY++EEdxn68HZW172OPof3GfW632ugunbCJYozqvXzNtBQ+N+Tg RxkZuGKuqbn9cY3jsRd/9MvbNPcCIsszDr6Gqe788aV/zdBqYRdgrXXlvPTUVQ15YRDe parqzEPHBVrFvNrcu1Bxyg/u+uVffk4VyA+yg7pDsqIIQj7I0CQKnrsiAk4gW/83Gs8R dag5Wxv9bfKHEUGUfezqVn7JhFozv3gXI6oCJUpF9W3IaLx/UXrIoPmLPPLlQ2iLO7HM TnLu/QmYCEO/Cyr8+NC+P+vgRo8ImLeMNxb1XOZPIVhQkqpukdCO1tc7XPaFzmSumJWe jK6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=iXBgF0dC; 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 cb7-20020a170906a44700b0094f712dac4csi5920764ejb.846.2023.05.29.01.43.50 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 01:43:51 -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=iXBgF0dC; 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 9338B38983B7 for <ouuuleilei@gmail.com>; Mon, 29 May 2023 08:37:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9338B38983B7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685349426; bh=OkeGlqpTLlDccSPZ9w1+TaxqNjcwj/uONRhS3DSgUNk=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=iXBgF0dC3N+ut2bCzWUGfIcentZb/othntHxtrp5J017wTEH4Wr7rAbLv1j2aE0t4 ZR1PdfWT5NbvLW7W6SG+rLxMYI/iAizaETM3wxxocsV782IOSD+5L0c87vo9H0HJKX Ab4fJyfivgRthNvmVsWtHZRObL19rF0ZnSqSb+HA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id A77C538498DD for <gcc-patches@gcc.gnu.org>; Mon, 29 May 2023 08:29:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A77C538498DD Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3063433fa66so1801089f8f.3 for <gcc-patches@gcc.gnu.org>; Mon, 29 May 2023 01:29:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685348972; x=1687940972; 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=OkeGlqpTLlDccSPZ9w1+TaxqNjcwj/uONRhS3DSgUNk=; b=VFxXR/GYIackocy9QbUImFH0aUIGCqxqvxEx3akJaeO13pFjB0KU6TX4d5RzbDi61T zQkSOT1pV/yHt30DhU+WzFv2dIEPNYDvUPzWPMwaU5xbYoaxs92iXPLWGqMtPjtlTb5N kxT9jDedK1Jafb5eVLb6WZzxbyMwiIS4QZefTySKJ9a1uVuqcruT9m+8HbdndrxiD8OA +1Fyg5ehSQI3B0NYypW4LVPp5wQzZCFTGXq3+szhVrZdb1mAPxsFE4LgCH4ZOCObHoWT qGab7rjIOlP4cFiJX9rvNwAbGlm9jbGxZnqT/RockePZZ7HemQGI5FKPYb1YxfEDRcq9 BC+Q== X-Gm-Message-State: AC+VfDyw0tCnZAy4X/+9JyDh/sx7ODzZ/AvA5X9+K+FhbkghuVpGXPh+ SkWV6c4/+8NWdnrFHDDWgjyzxDJxi0EHhtyPXFdRPA== X-Received: by 2002:a05:6000:180f:b0:309:38af:91c6 with SMTP id m15-20020a056000180f00b0030938af91c6mr7709830wrh.68.1685348972635; Mon, 29 May 2023 01:29:32 -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 e7-20020a056000194700b00307bc4e39e5sm12936565wry.117.2023.05.29.01.29.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 01:29:32 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou <ebotcazou@adacore.com> Subject: [COMMITTED] ada: Fix memory leak in multi-dimensional array aggregate of Vector Date: Mon, 29 May 2023 10:29:31 +0200 Message-Id: <20230529082931.2410398-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?1767217384191379416?= X-GMAIL-MSGID: =?utf-8?q?1767217384191379416?= |
Series |
[COMMITTED] ada: Fix memory leak in multi-dimensional array aggregate of Vector
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Marc Poulhiès
May 29, 2023, 8:29 a.m. UTC
From: Eric Botcazou <ebotcazou@adacore.com>
It comes from a superfluous adjustment for subarray components.
gcc/ada/
* exp_aggr.adb (Initialize_Array_Component): Fix condition detecting
the nested case that requires an adjustment.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/exp_aggr.adb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 75e5e1402df..c4a016ed3d4 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -1459,7 +1459,7 @@ package body Exp_Aggr is and then not Is_Build_In_Place_Function_Call (Init_Expr) and then not (Is_Array_Type (Comp_Typ) - and then Is_Controlled (Component_Type (Comp_Typ)) + and then Needs_Finalization (Component_Type (Comp_Typ)) and then Nkind (Expr) = N_Aggregate) then Adj_Call :=