summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/thin_pointer2_pkg.adb
blob: 22500773cdc5e79739f564186fbbe9b90e05a072 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package body Thin_Pointer2_Pkg is

   type SB is access constant String;

   function Inner (S : SB) return Character is
   begin
      if S /= null and then S'Length > 0 then
         return S (S'First);
      end if;
      return '*';
   end;

   function F return Character is
   begin
      return Inner (SB (S));
   end;

end Thin_Pointer2_Pkg;