aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/inline13.adb
blob: 4be6514aab03f21010354e5cf3e6e728d1c190fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- { dg-do compile }
-- { dg-options "-O -gnatn" }

package body Inline13 is

  function F (L : Arr) return String is
    Local : Arr (1 .. L'Length);
    Ret : String (1 .. L'Length);
    Pos : Natural := 1;
  begin
    Local (1 .. L'Length) := L;
    for I in 1 .. Integer (L'Length) loop
       Ret (Pos .. Pos + 8) := " " & Inline13_Pkg.Padded (Local (I));
       Pos := Pos + 9;
    end loop;
    return Ret;
  end;

end Inline13;