From patchwork Fri Jan 7 16:27:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Marie de Rodat X-Patchwork-Id: 49718 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 0DC753857C77 for ; Fri, 7 Jan 2022 16:52:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0DC753857C77 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1641574353; bh=bkTZB3jQJmck1ZGis9AcnLISh4NYYulkyTRZSfvpVi8=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=ACqwNz1kIqdmjIDxwdeo7f662ZaXL+mMUpeBKR2PGHUSfIcQS0l8n2a1BvckR34QG LLhBeisuhsfHvq98/sT9uIbiv8r6AKudx3AyqX9/d0YviOpft1jUzy96Lxp9voTICI b5zkakFNCm5W0YOZ7H6bL/QVgtDsXLnDum3OTfco= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 5969A3857C6C for ; Fri, 7 Jan 2022 16:27:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5969A3857C6C Received: by mail-wr1-x431.google.com with SMTP id s1so12071077wra.6 for ; Fri, 07 Jan 2022 08:27:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=bkTZB3jQJmck1ZGis9AcnLISh4NYYulkyTRZSfvpVi8=; b=y9l4ek2LVcRLRVu2sTBzHtvxgWoQhpf92AQEJJFkxf9WZxRpcDyAgTH0cmR/MdOPf1 XIrc9xbLorQG9i2hsrNhP6CGT+X/unRKy/TjQPGoKBkOmnH9qtR6k1Jj41Gat35CDFJH I50Jenqi3SsOGHg7d0sK0Y9tohJsEmt4hL/As4/dubS+9wh3YRrSj24zwRIgNxdg9n2l 9woipDfpIJAiNDkX+JNmRWHbqUjtOdsBgNa03zMJbG6PI0VilExoGl3fBfnAMF0kPVOh mMjjZDkV1nX2R4aPSHCMDy4xfmd/z+XcxsicegoYkcsNx+AXCmPUYATCSGPPr3Yur1ZX HNkg== X-Gm-Message-State: AOAM532Qb6ZtQbvSnjqugN73wEPEaaBhO/GVB6aPVz2BEINtRfGpUdrq 6OYkXakpDkagiVtaOxjcx25eSZt8j9KC6A== X-Google-Smtp-Source: ABdhPJzoIEn1rf0ElcRspUGQ607Gl2lOgO0ZPCVgn1Yc6nX6KRMZAL6KayQY4bGkbqCiOikDspFYdA== X-Received: by 2002:a05:6000:1e08:: with SMTP id bj8mr11513737wrb.10.1641572844434; Fri, 07 Jan 2022 08:27:24 -0800 (PST) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id b13sm5221201wrh.32.2022.01.07.08.27.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jan 2022 08:27:23 -0800 (PST) Date: Fri, 7 Jan 2022 16:27:23 +0000 To: gcc-patches@gcc.gnu.org Subject: [Ada] Fix style in expansion of multi-dimensional array aggregates Message-ID: <20220107162723.GA948836@adacore.com> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-13.1 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Pierre-Marie de Rodat via Gcc-patches From: Pierre-Marie de Rodat Reply-To: Pierre-Marie de Rodat Cc: Piotr Trojanek Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Cleanup; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_aggr.adb (Build_Array_Aggr_Code): Fix inconsistent style in comments and code. diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -1021,7 +1021,7 @@ package body Exp_Aggr is -- 2. If the aggregate contains positional elements we - -- (a) translate the positional elements in a series of assignments + -- (a) Translate the positional elements in a series of assignments -- (b) Generate a final loop to cover the others choice if any. -- Note that this final loop has to be a while loop since the case @@ -1032,7 +1032,7 @@ package body Exp_Aggr is -- cannot be handled by a for loop. Thus for the following - -- array (L .. H) := (.. positional elements.., others =>E); + -- array (L .. H) := (.. positional elements.., others => E); -- we always generate something like: @@ -2063,11 +2063,9 @@ package body Exp_Aggr is -- Construct "for L_J in Index_Base range L .. H" L_Iteration_Scheme := - Make_Iteration_Scheme - (Loc, + Make_Iteration_Scheme (Loc, Loop_Parameter_Specification => - Make_Loop_Parameter_Specification - (Loc, + Make_Loop_Parameter_Specification (Loc, Defining_Identifier => L_J, Discrete_Subtype_Definition => L_Range));