aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/array19.adb
blob: 8667a3f06502b21feb3480a5f35c6528cf09757e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
-- { dg-do compile }

package body Array19 is

   function N return Integer is
   begin
      return 1;
   end;

   type Array_Type is array (1 .. N) of Float;

   type Enum is (One, Two);

   type Rec (D : Enum := Enum'First) is record
      case D is
         when One => null;
         when Two => A : Array_Type;
      end case;
   end record;

   procedure Proc is

      R : Rec;

      function F return Array_Type is
      begin
         return (others => 0.0);
      end F;

   begin
      R.A := F;
   end;

end Array19;