From patchwork Fri May 26 07:36:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 70131 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A97593952523 for ; Fri, 26 May 2023 07:40:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A97593952523 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685086849; 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=N3UNUWCGgW7noHffhfXi++61HYanS2cKqdfOh0r04s41T+w05xhYeaEQMR4250Oh8 4Md95gDxejGmTEkXwY7mJIxMqV+dorgVk94Jm/7XhD6M7LrqMY6pmLQ9Gl9yStzDC2 R+nX3oQLyByfGAOJW/4+9F2S6mzAlYATo8mBstAQ= 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 ; 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 ; 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-Google-Smtp-Source: ACHHUZ5AX8RbimfJ5vTImE+uZxSf/4/GYdDkYqh/ZP4WiImw6ceT6Puu7LnGudyZcNhkHnm5BuUN4g== 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 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= From: =?utf-8?q?Marc_Poulhi=C3=A8s?= Reply-To: =?utf-8?q?Marc_Poulhi=C3=A8s?= Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" From: Eric Botcazou 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;