summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/array7.adb
blob: d83a55a483a7d639e04b91630c41476d80f08043 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- { dg-do compile }
-- { dg-options "-O -gnatp -fdump-tree-optimized" }

package body Array7 is

   package body Range_Subtype is
      function Get_Arr (Nbr : My_Range) return Arr_Acc is
      begin
         return new Arr (1 .. Nbr);
      end;
   end;

   package body Range_Type is
      function Get_Arr (Nbr : My_Range) return Arr_Acc is
      begin
         return new Arr (1 .. Nbr);
      end;
   end;

end Array7;

-- { dg-final { scan-tree-dump-not "MAX_EXPR" "optimized" } }
-- { dg-final { cleanup-tree-dump "optimized" } }