aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/loop_optimization4_pkg.adb
blob: ba372f6bddd32ed8b1cadb633f99ebcf1177d1c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package body Loop_Optimization4_Pkg is

   procedure Add (Phrase : String) is
   begin
      if Debug_Buffer_Len = Max_Debug_Buffer_Len then
         return;
      end if;
      for I in Phrase'Range loop
         Debug_Buffer_Len := Debug_Buffer_Len + 1;
         Debug_Buffer (Debug_Buffer_Len) := Phrase (I);
         if Debug_Buffer_Len = Max_Debug_Buffer_Len then
            exit;
         end if;
      end loop;
   end Add;

end Loop_Optimization4_Pkg;