[COMMITTED] ada: Reorder components in Ada.Containers.Restricted_Doubly_Linked_Lists
Message ID | 20230526073624.2069067-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 k13csp292867vqr; Fri, 26 May 2023 00:47:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6tK+gyEbfN5/k98rEMBsgHqg/zOz+r120IxVVnJD8e1QuBCq2DCBvKx/6Dvj1SOCiu14M7 X-Received: by 2002:a17:907:7f88:b0:966:5a6c:7549 with SMTP id qk8-20020a1709077f8800b009665a6c7549mr1392606ejc.14.1685087232191; Fri, 26 May 2023 00:47:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685087232; cv=none; d=google.com; s=arc-20160816; b=UnExN2a1eDZ0pyV2rLp9WxXUl0VUpVJvKK05aRu8I89IkMRDzPJAe/Msba3Wl2tGpj 5C5SpkW48D/QOlJbg51rGehpv+UqwbeHBFwC7t7Soxnz8wolbO/S9aLEOKym6PxjUh1z 7vzbKyVz6J16rOg+yZj4YkTq0YgZEB+8yepVIw79i/Sc/Qab+eVwpl/CS0qUlABpuhg8 hTWiQPr0Wbr+n/P5IO4NB3LwrKSDA3kCI7yp/dIGDwk0nErRFu90hDbCVDbEEOPqQrOw 93my1BdIcY37ffHqzFse0FBU2NLc2h6GvF6brBAqHDKewhjt2XB36/+NUXJ+nzHyn0Ox 3tew== 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=KOzWHN/FzbYsXql6/+kaHZ5Ce+Mm203bkGXJfSSPQys=; b=Y5w61WSIz1R/H4ioSRweQ0nb9UWxoGSWyqWTbtB0PTOp0k3tPKoJBjfE6aipbW1bqj +Cxet3hPbFdcYUzDkd6Jmk5T6jqvFYfdaY30dRoX5mh+NU/vMxxWny6ylxqFjsMD9ceR 9bokkl1ntTYH/8Jlj9e3BapzhgvqaGnTUWU5gwVN2bjJQhlPuKiB3oz1RSKTzNi8yayc ZslJNoyrHt8UWBBWeFGrGaRmJ2WpHknil4pIcrjUGQ7R6zXfM7HcwocuKhJPqnzDu/wa 1ZVBo9/NF1HCZpdJS+CLxpYSk/wchDBia8B5QyxiLqSttXjXFveAfbzX3xSoOALDbNAD FEqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="F35lXtq/"; 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 gj29-20020a170907741d00b0096a1fc77ccasi1923554ejc.449.2023.05.26.00.47.11 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 00:47:12 -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="F35lXtq/"; 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 B52E33954449 for <ouuuleilei@gmail.com>; Fri, 26 May 2023 07:41:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B52E33954449 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685086865; bh=KOzWHN/FzbYsXql6/+kaHZ5Ce+Mm203bkGXJfSSPQys=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=F35lXtq/kf6KPU3SFpR5qs2svLNCH38Sz9dgLox4k0RIJI4VMJ3TAVqG3kVFBHCdV 82EOvcnrgA1okPcC0i7yGb5NYCef8aw7+pTqBpFb6exiz2iBEStLM/XEovRNX2IXi7 aAcgHOo3tSaXwExK5sJoHuRUpMUJJS+ooqj/uzNU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id A346938323EE for <gcc-patches@gcc.gnu.org>; Fri, 26 May 2023 07:36:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A346938323EE Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-30a1fdde3d6so357014f8f.0 for <gcc-patches@gcc.gnu.org>; Fri, 26 May 2023 00:36:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685086586; x=1687678586; 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=KOzWHN/FzbYsXql6/+kaHZ5Ce+Mm203bkGXJfSSPQys=; b=eGBIJK/fBUfCIH/R5fiZFu3O/RRQ3/MXc3n5aUNO+TrwD6JoFB4me3SvOx1BHkf3Ec /Ty2Ha5PI8No8NJTVXIpmBYeW7DgZizus7jzWZfukVO3JadIfGKS8MPyLpOQQ5N7QgYl Upwz500EMQvW0x6pLpqqt9qHvhNODh7pvWNVXrPRc3GPG3/ZPUOyEsxP7Ns1/YnRgneD wE7Vh2m8xCjMVd7xjbxddySX+u1VEm2s8hUpOQvw+inVyq07dgOQ/gQF8msAfQFsltNm GwhcDJF42pCqaPan8KbnngokV2tcussAbPLnNbTCv6kpYr5tNOu5qJhds1AqKtnv34fp OLTg== X-Gm-Message-State: AC+VfDy2UnRrKfbHAdOU2O19AfkxlluzS39erybyebPwaWK3qxgk8DdB n/hkkq2uoKSVbzehF7CgEkmZC3jt1Aw7NxtISWOl3w== X-Received: by 2002:a5d:5148:0:b0:307:8694:44e0 with SMTP id u8-20020a5d5148000000b00307869444e0mr623516wrt.55.1685086586575; Fri, 26 May 2023 00:36:26 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:777b:eef4:6f79:f26f]) by smtp.gmail.com with ESMTPSA id e8-20020a5d65c8000000b0030649242b72sm4087308wrw.113.2023.05.26.00.36.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 00:36:25 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou <ebotcazou@adacore.com> Subject: [COMMITTED] ada: Reorder components in Ada.Containers.Restricted_Doubly_Linked_Lists Date: Fri, 26 May 2023 09:36:24 +0200 Message-Id: <20230526073624.2069067-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.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, T_SCC_BODY_TEXT_LINE, WEIRD_PORT 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?1766942029858083391?= X-GMAIL-MSGID: =?utf-8?q?1766942029858083391?= |
Series |
[COMMITTED] ada: Reorder components in Ada.Containers.Restricted_Doubly_Linked_Lists
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Marc Poulhiès
May 26, 2023, 7:36 a.m. UTC
From: Eric Botcazou <ebotcazou@adacore.com>
An instantiation of the package compiled with -gnatw.q yields:
warning: in instantiation at a-crdlli.ads:317 [-gnatw.q]
warning: record layout may cause performance issues [-gnatw.q]
warning: in instantiation at a-crdlli.ads:317 [-gnatw.q]
warning:
component "Nodes" whose length depends on a discriminant [-gnatw.q]
warning: in instantiation at a-crdlli.ads:317 [-gnatw.q]
warning: comes too early and was moved down [-gnatw.q]
gcc/ada/
* libgnat/a-crdlli.ads (List): Move Nodes component to the end.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/libgnat/a-crdlli.ads | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/ada/libgnat/a-crdlli.ads b/gcc/ada/libgnat/a-crdlli.ads index d9c45177ddd..fa4fe15e420 100644 --- a/gcc/ada/libgnat/a-crdlli.ads +++ b/gcc/ada/libgnat/a-crdlli.ads @@ -314,11 +314,11 @@ private type Node_Array is array (Count_Type range <>) of Node_Type; type List (Capacity : Count_Type) is tagged limited record - Nodes : Node_Array (1 .. Capacity); Free : Count_Type'Base := -1; First : Count_Type := 0; Last : Count_Type := 0; Length : Count_Type := 0; + Nodes : Node_Array (1 .. Capacity); end record; type List_Access is access all List;