From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id D36A6388703B; Tue, 10 May 2022 08:20:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D36A6388703B MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Pierre-Marie de Rodat To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-225] [Ada] Fix comment about building names in task arrays X-Act-Checkin: gcc X-Git-Author: Piotr Trojanek X-Git-Refname: refs/heads/master X-Git-Oldrev: 0e38fbfe1415e29d98bcdadc7307d589f496546b X-Git-Newrev: 3d9e2004fe4e15b133bd8472c4bf46cbff809583 Message-Id: <20220510082050.D36A6388703B@sourceware.org> Date: Tue, 10 May 2022 08:20:50 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2022 08:20:50 -0000 https://gcc.gnu.org/g:3d9e2004fe4e15b133bd8472c4bf46cbff809583 commit r13-225-g3d9e2004fe4e15b133bd8472c4bf46cbff809583 Author: Piotr Trojanek Date: Wed Jan 19 13:29:46 2022 +0100 [Ada] Fix comment about building names in task arrays Cleanup related to handling of character values in SPARK counterexamples, which just like the code for names in task arrays create N_Character_Literal nodes. gcc/ada/ * exp_util.adb (Build_Task_Array_Image): Fix style in the structure of generated code; add Pref'Length as the component of the Sum initialization expression. Diff: --- gcc/ada/exp_util.adb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 263b42f7586..b3d1fdf3cdf 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -4048,13 +4048,13 @@ package body Exp_Util is -- The generated function has the following structure: -- function F return String is - -- Pref : string renames Task_Name; + -- Pref : String renames Task_Name; -- T1 : String := Index1'Image (Val1); -- ... - -- Tn : String := indexn'image (Valn); - -- Len : Integer := T1'Length + ... + Tn'Length + n + 1; - -- -- Len includes commas and the end parentheses. - -- Res : String (1..Len); + -- Tn : String := Indexn'Image (Valn); + -- Len : Integer := Pref'Length + T1'Length + ... + Tn'Length + n + 1; + -- -- Len includes commas and the end parentheses + -- Res : String (1 .. Len); -- Pos : Integer := Pref'Length; -- -- begin