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.

Tested on x86_64-pc-linux-gnu, committed on trunk

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
--- 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


Reply via email to