From: Piotr Trojanek Date: Wed, 19 Jan 2022 12:29:46 +0000 (+0100) Subject: [Ada] Fix comment about building names in task arrays X-Git-Tag: basepoints/gcc-14~6982 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3d9e2004fe4e15b133bd8472c4bf46cbff809583;p=thirdparty%2Fgcc.git [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 --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