OSDN Git Service

2009-04-16 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Apr 2009 10:13:09 +0000 (10:13 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Apr 2009 10:13:09 +0000 (10:13 +0000)
* Makefile.rtl: Add entries for s-conca?

* debug.adb: Add debug flags -gnatd.c and -gnatd.C to control behavior
of concatenation expansion

* exp_ch4.adb (Expand_Concatenation): Generate calls for certain
string cases instead of expanding assignments inline.

* opt.ads (Optimize_Size): New flag

* s-conca2.ads, s-conca2.adb, s-conca3.adb, s-conca3.ads,
s-conca4.adb, s-conca4.ads, s-conca5.adb, s-conca5.ads, s-conca6.adb,
s-conca6.ads, s-conca7.ads, s-conca7.adb, s-conca8.adb, s-conca8.ads,
s-conca9.adb, s-conca9.ads: New file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146161 138bc75d-0d04-0410-961f-82ee72b054a4

21 files changed:
gcc/ada/ChangeLog
gcc/ada/Makefile.rtl
gcc/ada/debug.adb
gcc/ada/exp_ch4.adb
gcc/ada/opt.ads
gcc/ada/s-conca2.adb [new file with mode: 0644]
gcc/ada/s-conca2.ads [new file with mode: 0644]
gcc/ada/s-conca3.adb [new file with mode: 0644]
gcc/ada/s-conca3.ads [new file with mode: 0644]
gcc/ada/s-conca4.adb [new file with mode: 0644]
gcc/ada/s-conca4.ads [new file with mode: 0644]
gcc/ada/s-conca5.adb [new file with mode: 0644]
gcc/ada/s-conca5.ads [new file with mode: 0644]
gcc/ada/s-conca6.adb [new file with mode: 0644]
gcc/ada/s-conca6.ads [new file with mode: 0644]
gcc/ada/s-conca7.adb [new file with mode: 0644]
gcc/ada/s-conca7.ads [new file with mode: 0644]
gcc/ada/s-conca8.adb [new file with mode: 0644]
gcc/ada/s-conca8.ads [new file with mode: 0644]
gcc/ada/s-conca9.adb [new file with mode: 0644]
gcc/ada/s-conca9.ads [new file with mode: 0644]

index f395227..62b1f18 100644 (file)
@@ -1,5 +1,22 @@
 2009-04-16  Robert Dewar  <dewar@adacore.com>
 
+       * Makefile.rtl: Add entries for s-conca?
+
+       * debug.adb: Add debug flags -gnatd.c and -gnatd.C to control behavior
+       of concatenation expansion
+
+       * exp_ch4.adb (Expand_Concatenation): Generate calls for certain
+       string cases instead of expanding assignments inline.
+
+       * opt.ads (Optimize_Size): New flag
+
+       * s-conca2.ads, s-conca2.adb, s-conca3.adb, s-conca3.ads,
+       s-conca4.adb, s-conca4.ads, s-conca5.adb, s-conca5.ads, s-conca6.adb,
+       s-conca6.ads, s-conca7.ads, s-conca7.adb, s-conca8.adb, s-conca8.ads,
+       s-conca9.adb, s-conca9.ads: New file.
+
+2009-04-16  Robert Dewar  <dewar@adacore.com>
+
        * exp_ch6.adb: Add comments
 
        * rtsfind.ads: Add entries for s-conca? routines
index 1a85461..66c48e0 100644 (file)
@@ -416,6 +416,14 @@ GNATRTL_NONTASKING_OBJS= \
   s-caun32$(objext) \
   s-caun64$(objext) \
   s-chepoo$(objext) \
+  s-conca2$(objext) \
+  s-conca3$(objext) \
+  s-conca4$(objext) \
+  s-conca5$(objext) \
+  s-conca6$(objext) \
+  s-conca7$(objext) \
+  s-conca8$(objext) \
+  s-conca9$(objext) \
   s-crtl$(objext)   \
   s-crc32$(objext)  \
   s-direio$(objext) \
index 2cc4f74..3dcd414 100644 (file)
@@ -93,7 +93,7 @@ package body Debug is
 
    --  d.a
    --  d.b
-   --  d.c
+   --  d.c  Generate inline concatenation, do not call procedure
    --  d.d
    --  d.e
    --  d.f  Inhibit folding of static expressions
@@ -120,7 +120,7 @@ package body Debug is
 
    --  d.A
    --  d.B
-   --  d.C
+   --  d.C  Generate concatenation call, do not generate inline code
    --  d.D
    --  d.E
    --  d.F
@@ -498,6 +498,10 @@ package body Debug is
    --         - In case of abstract subprograms the text "is abstract" is
    --           added at the end of the line.
 
+   --  d.c  Generate inline concatenation, instead of calling one of the
+   --       System.Concat_n.Str_Concat_n routines in cases where the latter
+   --       routines would normally be called.
+
    --  d.f  Suppress folding of static expressions. This of course results
    --       in seriously non-conforming behavior, but is useful sometimes
    --       when tracking down handling of complex expressions.
@@ -542,6 +546,9 @@ package body Debug is
    --       fully compiled and analyzed, they just get eliminated from the
    --       code generation step.
 
+   --  d.C  Generate call to System.Concat_n.Str_Concat_n routines in cases
+   --       where we would normally generate inline concatenation code.
+
    --  d.I  Inspector mode. Relevant for VM_Target /= None. Try to generate
    --       byte code, even in case of unsupported construct, for the sake
    --       of static analysis tools.
index 39158ec..bf6b3a6 100644 (file)
@@ -25,6 +25,7 @@
 
 with Atree;    use Atree;
 with Checks;   use Checks;
+with Debug;    use Debug;
 with Einfo;    use Einfo;
 with Elists;   use Elists;
 with Errout;   use Errout;
@@ -2757,9 +2758,10 @@ package body Exp_Ch4 is
                 Right_Opnd => Make_Artyp_Literal (1))));
 
       --  Note that calculation of the high bound may cause overflow in some
-      --  very weird cases, so in the general case we need an overflow check
-      --  on the high bound. We can avoid this for the common case of string
-      --  types since we chose a wider range for the arithmetic type.
+      --  very weird cases, so in the general case we need an overflow check on
+      --  the high bound. We can avoid this for the common case of string types
+      --  and other types whose index is Positive, since we chose a wider range
+      --  for the arithmetic type.
 
       if Istyp /= Standard_Positive then
          Activate_Overflow_Check (High_Bound);
@@ -2813,6 +2815,82 @@ package body Exp_Ch4 is
 
       --  Now we will generate the assignments to do the actual concatenation
 
+      --  There is one case in which we will not do this, namely when all the
+      --  following conditions are met:
+
+      --    The result type is Standard.String
+
+      --    There are nine or fewer retained (non-null) operands
+
+      --    The optimization level is -O0 or -Os
+
+      --    The corresponding System.Concat_n.Str_Concat_n routine is
+      --    available in the run time.
+
+      --    The debug flag gnatd.c is not set
+
+      --  If all these conditions are met then we generate a call to the
+      --  relevant concatenation routine. The purpose of this is to avoid
+      --  undesirable code bloat at -O0.
+
+      if Atyp = Standard_String
+        and then NN in 2 .. 9
+        and then (Opt.Optimization_Level = 0
+                   or else Opt.Optimize_Size = 1
+                   or else Debug_Flag_Dot_CC)
+        and then not Debug_Flag_Dot_C
+      then
+         declare
+            RR : constant array (Nat range 2 .. 9) of RE_Id :=
+                   (RE_Str_Concat_2,
+                    RE_Str_Concat_3,
+                    RE_Str_Concat_4,
+                    RE_Str_Concat_5,
+                    RE_Str_Concat_6,
+                    RE_Str_Concat_7,
+                    RE_Str_Concat_8,
+                    RE_Str_Concat_9);
+
+         begin
+            if RTE_Available (RR (NN)) then
+               declare
+                  Opnds : constant List_Id :=
+                            New_List (New_Occurrence_Of (Ent, Loc));
+
+               begin
+                  for J in 1 .. NN loop
+                     if Is_List_Member (Operands (J)) then
+                        Remove (Operands (J));
+                     end if;
+
+                     if Base_Type (Etype (Operands (J))) = Ctyp then
+                        Append_To (Opnds,
+                          Make_Aggregate (Loc,
+                            Component_Associations => New_List (
+                              Make_Component_Association (Loc,
+                                Choices => New_List (
+                                  Make_Integer_Literal (Loc, 1)),
+                                Expression => Operands (J)))));
+
+                     else
+                        Append_To (Opnds, Operands (J));
+                     end if;
+                  end loop;
+
+                  Insert_Action (Cnode,
+                    Make_Procedure_Call_Statement (Loc,
+                      Name => New_Reference_To (RTE (RR (NN)), Loc),
+                      Parameter_Associations => Opnds));
+
+                  Result := New_Reference_To (Ent, Loc);
+                  goto Done;
+               end;
+            end if;
+         end;
+      end if;
+
+      --  Not special case so generate the assignments
+
       Known_Non_Null_Operand_Seen := False;
 
       for J in 1 .. NN loop
index d35195d..04e22cd 100644 (file)
@@ -908,13 +908,20 @@ package Opt is
    Optimization_Level : Int;
    pragma Import (C, Optimization_Level, "optimize");
    --  Constant reflecting the optimization level (0,1,2,3 for -O0,-O1,-O2,-O3)
+   --  See jmissing.c and aamissing.c for definitions for dotnet/jgnat and
+   --  GNAAMP back ends.
+
+   Optimize_Size : Int;
+   pragma Import (C, Optimize_Size, "optimize_size");
+   --  Constant reflecting setting of -Os (optimize for size). Set to 1 in
+   --  -Os mode and set to 0 otherwise. See jmissing.c and aamissing.c for
+   --  definitions for dotnet/jgnat and GNAAMP backends
 
    Output_File_Name_Present : Boolean := False;
    --  GNATBIND, GNAT, GNATMAKE, GPRMAKE
-   --  Set to True when the output C file name is given with option -o
-   --  for GNATBIND, when the object file name is given with option
-   --  -gnatO for GNAT or when the executable is given with option -o
-   --  for GNATMAKE or GPRMAKE.
+   --  Set to True when the output C file name is given with option -o for
+   --  GNATBIND, when the object file name is given with option -gnatO for GNAT
+   --  or when the executable is given with option -o for GNATMAKE or GPRMAKE.
 
    Output_Linker_Option_List : Boolean := False;
    --  GNATBIND
diff --git a/gcc/ada/s-conca2.adb b/gcc/ada/s-conca2.adb
new file mode 100644 (file)
index 0000000..c1e8115
--- /dev/null
@@ -0,0 +1,57 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
+--                                                                          --
+--                      S Y S T E M . C O N C A T _ 2                       --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--            Copyright (C) 2008-2009, Free Software Foundation, Inc.       --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+pragma Warnings (Off);
+pragma Compiler_Unit;
+pragma Warnings (On);
+
+package body System.Concat_2 is
+
+   pragma Suppress (All_Checks);
+
+   ------------------
+   -- Str_Concat_2 --
+   ------------------
+
+   procedure Str_Concat_2 (R : out String; S1, S2 : String) is
+      F, L : Natural;
+
+   begin
+      F := R'First;
+      L := F + S1'Length - 1;
+      R (F .. L) := S1;
+
+      F := L + 1;
+      L := R'Last;
+      R (F .. L) := S2;
+   end Str_Concat_2;
+
+end System.Concat_2;
diff --git a/gcc/ada/s-conca2.ads b/gcc/ada/s-conca2.ads
new file mode 100644 (file)
index 0000000..2ea8397
--- /dev/null
@@ -0,0 +1,47 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
+--                                                                          --
+--                      S Y S T E M . C O N C A T _ 2                       --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--            Copyright (C) 2008-2009, Free Software Foundation, Inc.       --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+--  This package contains a procedure for runtime concatenation of two string
+--  operands. It is used when we want to save space in the generated code.
+
+pragma Warnings (Off);
+pragma Compiler_Unit;
+pragma Warnings (On);
+
+package System.Concat_2 is
+
+   procedure Str_Concat_2 (R : out String; S1, S2 : String);
+   --  Performs the operation R := S1 & S2. The bounds of R are known to be
+   --  correct, so no bounds checks are required, and it is known that none
+   --  of the input operands overlaps R. No assumptions can be made about
+   --  the lower bounds of any of the operands.
+
+end System.Concat_2;
diff --git a/gcc/ada/s-conca3.adb b/gcc/ada/s-conca3.adb
new file mode 100644 (file)
index 0000000..eee12fc
--- /dev/null
@@ -0,0 +1,61 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
+--                                                                          --
+--                      S Y S T E M . C O N C A T _ 3                       --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--            Copyright (C) 2008-2009, Free Software Foundation, Inc.       --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+pragma Warnings (Off);
+pragma Compiler_Unit;
+pragma Warnings (On);
+
+package body System.Concat_3 is
+
+   pragma Suppress (All_Checks);
+
+   ------------------
+   -- Str_Concat_3 --
+   ------------------
+
+   procedure Str_Concat_3 (R : out String; S1, S2, S3 : String) is
+      F, L : Natural;
+
+   begin
+      F := R'First;
+      L := F + S1'Length - 1;
+      R (F .. L) := S1;
+
+      F := L + 1;
+      L := F + S2'Length - 1;
+      R (F .. L) := S2;
+
+      F := L + 1;
+      L := R'Last;
+      R (F .. L) := S3;
+   end Str_Concat_3;
+
+end System.Concat_3;
diff --git a/gcc/ada/s-conca3.ads b/gcc/ada/s-conca3.ads
new file mode 100644 (file)
index 0000000..66005a2
--- /dev/null
@@ -0,0 +1,47 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
+--                                                                          --
+--                      S Y S T E M . C O N C A T _ 3                       --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--            Copyright (C) 2008-2009, Free Software Foundation, Inc.       --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+--  This package contains a procedure for runtime concatenation of three string
+--  operands. It is used when we want to save space in the generated code.
+
+pragma Warnings (Off);
+pragma Compiler_Unit;
+pragma Warnings (On);
+
+package System.Concat_3 is
+
+   procedure Str_Concat_3 (R : out String; S1, S2, S3 : String);
+   --  Performs the operation R := S1 & S2 & S3. The bounds of R are known to
+   --  be correct, so no bounds checks are required, and it is known that none
+   --  of the input operands overlaps R. No assumptions can be made about
+   --  the lower bounds of any of the operands.
+
+end System.Concat_3;
diff --git a/gcc/ada/s-conca4.adb b/gcc/ada/s-conca4.adb
new file mode 100644 (file)
index 0000000..0a9d2c5
--- /dev/null
@@ -0,0 +1,65 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
+--                                                                          --
+--                      S Y S T E M . C O N C A T _ 4                       --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--            Copyright (C) 2008-2009, Free Software Foundation, Inc.       --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+pragma Warnings (Off);
+pragma Compiler_Unit;
+pragma Warnings (On);
+
+package body System.Concat_4 is
+
+   pragma Suppress (All_Checks);
+
+   ------------------
+   -- Str_Concat_4 --
+   ------------------
+
+   procedure Str_Concat_4 (R : out String; S1, S2, S3, S4 : String) is
+      F, L : Natural;
+
+   begin
+      F := R'First;
+      L := F + S1'Length - 1;
+      R (F .. L) := S1;
+
+      F := L + 1;
+      L := F + S2'Length - 1;
+      R (F .. L) := S2;
+
+      F := L + 1;
+      L := F + S3'Length - 1;
+      R (F .. L) := S3;
+
+      F := L + 1;
+      L := R'Last;
+      R (F .. L) := S4;
+   end Str_Concat_4;
+
+end System.Concat_4;
diff --git a/gcc/ada/s-conca4.ads b/gcc/ada/s-conca4.ads
new file mode 100644 (file)
index 0000000..c49f507
--- /dev/null
@@ -0,0 +1,47 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
+--                                                                          --
+--                      S Y S T E M . C O N C A T _ 4                       --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--            Copyright (C) 2008-2009, Free Software Foundation, Inc.       --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+--  This package contains a procedure for runtime concatenation of four string
+--  operands. It is used when we want to save space in the generated code.
+
+pragma Warnings (Off);
+pragma Compiler_Unit;
+pragma Warnings (On);
+
+package System.Concat_4 is
+
+   procedure Str_Concat_4 (R : out String; S1, S2, S3, S4 : String);
+   --  Performs the operation R := S1 & S2 & S3 & S4. The bounds of R are known
+   --  to be correct, so no bounds checks are required, and it is known that
+   --  none of the input operands overlaps R. No assumptions can be made about
+   --  the lower bounds of any of the operands.
+
+end System.Concat_4;
diff --git a/gcc/ada/s-conca5.adb b/gcc/ada/s-conca5.adb
new file mode 100644 (file)
index 0000000..3aa9e0a
--- /dev/null
@@ -0,0 +1,69 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
+--                                                                          --
+--                      S Y S T E M . C O N C A T _ 5                       --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--            Copyright (C) 2008-2009, Free Software Foundation, Inc.       --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+pragma Warnings (Off);
+pragma Compiler_Unit;
+pragma Warnings (On);
+
+package body System.Concat_5 is
+
+   pragma Suppress (All_Checks);
+
+   ------------------
+   -- Str_Concat_5 --
+   ------------------
+
+   procedure Str_Concat_5 (R : out String; S1, S2, S3, S4, S5 : String) is
+      F, L : Natural;
+
+   begin
+      F := R'First;
+      L := F + S1'Length - 1;
+      R (F .. L) := S1;
+
+      F := L + 1;
+      L := F + S2'Length - 1;
+      R (F .. L) := S2;
+
+      F := L + 1;
+      L := F + S3'Length - 1;
+      R (F .. L) := S3;
+
+      F := L + 1;
+      L := F + S4'Length - 1;
+      R (F .. L) := S4;
+
+      F := L + 1;
+      L := R'Last;
+      R (F .. L) := S5;
+   end Str_Concat_5;
+
+end System.Concat_5;
diff --git a/gcc/ada/s-conca5.ads b/gcc/ada/s-conca5.ads
new file mode 100644 (file)
index 0000000..227b700
--- /dev/null
@@ -0,0 +1,47 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
+--                                                                          --
+--                      S Y S T E M . C O N C A T _ 5                       --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--            Copyright (C) 2008-2009, Free Software Foundation, Inc.       --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+--  This package contains a procedure for runtime concatenation of five string
+--  operands. It is used when we want to save space in the generated code.
+
+pragma Warnings (Off);
+pragma Compiler_Unit;
+pragma Warnings (On);
+
+package System.Concat_5 is
+
+   procedure Str_Concat_5 (R : out String; S1, S2, S3, S4, S5 : String);
+   --  Performs the operation R := S1 & S2 & S3 & S4 & S5. The bounds of R are
+   --  known to be correct, so no bounds checks are required, and it is known
+   --  that none of the input operands overlaps R. No assumptions can be made
+   --  about the lower bounds of any of the operands.
+
+end System.Concat_5;
diff --git a/gcc/ada/s-conca6.adb b/gcc/ada/s-conca6.adb
new file mode 100644 (file)
index 0000000..0caeb09
--- /dev/null
@@ -0,0 +1,73 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
+--                                                                          --
+--                      S Y S T E M . C O N C A T _ 6                       --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--            Copyright (C) 2008-2009, Free Software Foundation, Inc.       --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+pragma Warnings (Off);
+pragma Compiler_Unit;
+pragma Warnings (On);
+
+package body System.Concat_6 is
+
+   pragma Suppress (All_Checks);
+
+   ------------------
+   -- Str_Concat_6 --
+   ------------------
+
+   procedure Str_Concat_6 (R : out String; S1, S2, S3, S4, S5, S6 : String) is
+      F, L : Natural;
+
+   begin
+      F := R'First;
+      L := F + S1'Length - 1;
+      R (F .. L) := S1;
+
+      F := L + 1;
+      L := F + S2'Length - 1;
+      R (F .. L) := S2;
+
+      F := L + 1;
+      L := F + S3'Length - 1;
+      R (F .. L) := S3;
+
+      F := L + 1;
+      L := F + S4'Length - 1;
+      R (F .. L) := S4;
+
+      F := L + 1;
+      L := F + S5'Length - 1;
+      R (F .. L) := S5;
+
+      F := L + 1;
+      L := R'Last;
+      R (F .. L) := S6;
+   end Str_Concat_6;
+
+end System.Concat_6;
diff --git a/gcc/ada/s-conca6.ads b/gcc/ada/s-conca6.ads
new file mode 100644 (file)
index 0000000..6376e67
--- /dev/null
@@ -0,0 +1,47 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
+--                                                                          --
+--                      S Y S T E M . C O N C A T _ 6                       --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--            Copyright (C) 2008-2009, Free Software Foundation, Inc.       --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+--  This package contains a procedure for runtime concatenation of six string
+--  operands. It is used when we want to save space in the generated code.
+
+pragma Warnings (Off);
+pragma Compiler_Unit;
+pragma Warnings (On);
+
+package System.Concat_6 is
+
+   procedure Str_Concat_6 (R : out String; S1, S2, S3, S4, S5, S6 : String);
+   --  Performs the operation R := S1 & S2 & S3 & S4 & S5 & S6. The bounds of
+   --  R are known to be correct, so no bounds checks are required, and it is
+   --  known that none of the input operands overlaps R. No assumptions can be
+   --  made about the lower bounds of any of the operands.
+
+end System.Concat_6;
diff --git a/gcc/ada/s-conca7.adb b/gcc/ada/s-conca7.adb
new file mode 100644 (file)
index 0000000..38741d5
--- /dev/null
@@ -0,0 +1,80 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
+--                                                                          --
+--                      S Y S T E M . C O N C A T _ 7                       --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--            Copyright (C) 2008-2009, Free Software Foundation, Inc.       --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+pragma Warnings (Off);
+pragma Compiler_Unit;
+pragma Warnings (On);
+
+package body System.Concat_7 is
+
+   pragma Suppress (All_Checks);
+
+   ------------------
+   -- Str_Concat_7 --
+   ------------------
+
+   procedure Str_Concat_7
+     (R                          : out String;
+      S1, S2, S3, S4, S5, S6, S7 : String)
+   is
+      F, L : Natural;
+
+   begin
+      F := R'First;
+      L := F + S1'Length - 1;
+      R (F .. L) := S1;
+
+      F := L + 1;
+      L := F + S2'Length - 1;
+      R (F .. L) := S2;
+
+      F := L + 1;
+      L := F + S3'Length - 1;
+      R (F .. L) := S3;
+
+      F := L + 1;
+      L := F + S4'Length - 1;
+      R (F .. L) := S4;
+
+      F := L + 1;
+      L := F + S5'Length - 1;
+      R (F .. L) := S5;
+
+      F := L + 1;
+      L := F + S6'Length - 1;
+      R (F .. L) := S6;
+
+      F := L + 1;
+      L := R'Last;
+      R (F .. L) := S7;
+   end Str_Concat_7;
+
+end System.Concat_7;
diff --git a/gcc/ada/s-conca7.ads b/gcc/ada/s-conca7.ads
new file mode 100644 (file)
index 0000000..e592760
--- /dev/null
@@ -0,0 +1,49 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
+--                                                                          --
+--                      S Y S T E M . C O N C A T _ 7                       --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--            Copyright (C) 2008-2009, Free Software Foundation, Inc.       --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+--  This package contains a procedure for runtime concatenation of seven string
+--  operands. It is used when we want to save space in the generated code.
+
+pragma Warnings (Off);
+pragma Compiler_Unit;
+pragma Warnings (On);
+
+package System.Concat_7 is
+
+   procedure Str_Concat_7
+     (R                          : out String;
+      S1, S2, S3, S4, S5, S6, S7 : String);
+   --  Performs the operation R := S1 & S2 & S3 & S4 & S5 & S6 & S7. The bounds
+   --  of R are known to be correct, so no bounds checks are required, and it
+   --  is known that none of the input operands overlaps R. No assumptions can
+   --  be made about the lower bounds of any of the operands.
+
+end System.Concat_7;
diff --git a/gcc/ada/s-conca8.adb b/gcc/ada/s-conca8.adb
new file mode 100644 (file)
index 0000000..764fd98
--- /dev/null
@@ -0,0 +1,84 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
+--                                                                          --
+--                      S Y S T E M . C O N C A T _ 8                       --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--            Copyright (C) 2008-2009, Free Software Foundation, Inc.       --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+pragma Warnings (Off);
+pragma Compiler_Unit;
+pragma Warnings (On);
+
+package body System.Concat_8 is
+
+   pragma Suppress (All_Checks);
+
+   ------------------
+   -- Str_Concat_8 --
+   ------------------
+
+   procedure Str_Concat_8
+     (R                              : out String;
+      S1, S2, S3, S4, S5, S6, S7, S8 : String)
+   is
+      F, L : Natural;
+
+   begin
+      F := R'First;
+      L := F + S1'Length - 1;
+      R (F .. L) := S1;
+
+      F := L + 1;
+      L := F + S2'Length - 1;
+      R (F .. L) := S2;
+
+      F := L + 1;
+      L := F + S3'Length - 1;
+      R (F .. L) := S3;
+
+      F := L + 1;
+      L := F + S4'Length - 1;
+      R (F .. L) := S4;
+
+      F := L + 1;
+      L := F + S5'Length - 1;
+      R (F .. L) := S5;
+
+      F := L + 1;
+      L := F + S6'Length - 1;
+      R (F .. L) := S6;
+
+      F := L + 1;
+      L := F + S7'Length - 1;
+      R (F .. L) := S7;
+
+      F := L + 1;
+      L := R'Last;
+      R (F .. L) := S8;
+   end Str_Concat_8;
+
+end System.Concat_8;
diff --git a/gcc/ada/s-conca8.ads b/gcc/ada/s-conca8.ads
new file mode 100644 (file)
index 0000000..173edbf
--- /dev/null
@@ -0,0 +1,49 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
+--                                                                          --
+--                      S Y S T E M . C O N C A T _ 8                       --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--            Copyright (C) 2008-2009, Free Software Foundation, Inc.       --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+--  This package contains a procedure for runtime concatenation of eight string
+--  operands. It is used when we want to save space in the generated code.
+
+pragma Warnings (Off);
+pragma Compiler_Unit;
+pragma Warnings (On);
+
+package System.Concat_8 is
+
+   procedure Str_Concat_8
+     (R                              : out String;
+      S1, S2, S3, S4, S5, S6, S7, S8 : String);
+   --  Performs the operation R := S1 & S2 & S3 & S4 & S5 & S6 & S7 & S8. The
+   --  bounds of R are known to be correct, so no bounds checks are required,
+   --  and it is known that none of the input operands overlaps R. No
+   --  assumptions can be made about the lower bounds of any of the operands.
+
+end System.Concat_8;
diff --git a/gcc/ada/s-conca9.adb b/gcc/ada/s-conca9.adb
new file mode 100644 (file)
index 0000000..34fcd9d
--- /dev/null
@@ -0,0 +1,88 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
+--                                                                          --
+--                      S Y S T E M . C O N C A T _ 9                       --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--            Copyright (C) 2008-2009, Free Software Foundation, Inc.       --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+pragma Warnings (Off);
+pragma Compiler_Unit;
+pragma Warnings (On);
+
+package body System.Concat_9 is
+
+   pragma Suppress (All_Checks);
+
+   ------------------
+   -- Str_Concat_9 --
+   ------------------
+
+   procedure Str_Concat_9
+     (R                                  : out String;
+      S1, S2, S3, S4, S5, S6, S7, S8, S9 : String)
+   is
+      F, L : Natural;
+
+   begin
+      F := R'First;
+      L := F + S1'Length - 1;
+      R (F .. L) := S1;
+
+      F := L + 1;
+      L := F + S2'Length - 1;
+      R (F .. L) := S2;
+
+      F := L + 1;
+      L := F + S3'Length - 1;
+      R (F .. L) := S3;
+
+      F := L + 1;
+      L := F + S4'Length - 1;
+      R (F .. L) := S4;
+
+      F := L + 1;
+      L := F + S5'Length - 1;
+      R (F .. L) := S5;
+
+      F := L + 1;
+      L := F + S6'Length - 1;
+      R (F .. L) := S6;
+
+      F := L + 1;
+      L := F + S7'Length - 1;
+      R (F .. L) := S7;
+
+      F := L + 1;
+      L := F + S8'Length - 1;
+      R (F .. L) := S8;
+
+      F := L + 1;
+      L := R'Last;
+      R (F .. L) := S9;
+   end Str_Concat_9;
+
+end System.Concat_9;
diff --git a/gcc/ada/s-conca9.ads b/gcc/ada/s-conca9.ads
new file mode 100644 (file)
index 0000000..23172ec
--- /dev/null
@@ -0,0 +1,49 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
+--                                                                          --
+--                      S Y S T E M . C O N C A T _ 9                       --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--            Copyright (C) 2008-2009, Free Software Foundation, Inc.       --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+--  This package contains a procedure for runtime concatenation of eight string
+--  operands. It is used when we want to save space in the generated code.
+
+pragma Warnings (Off);
+pragma Compiler_Unit;
+pragma Warnings (On);
+
+package System.Concat_9 is
+
+   procedure Str_Concat_9
+     (R                                  : out String;
+      S1, S2, S3, S4, S5, S6, S7, S8, S9 : String);
+   --  Performs the operation R := S1 & S2 & S3 & S4 & S5 & S6 & S7 & S8 & S9.
+   --  The bounds of R are known to be correct, so no bounds checks are
+   --  required, and it is known that none of the input operands overlaps R. No
+   --  assumptions can be made about the lower bounds of any of the operands.
+
+end System.Concat_9;