1--  { dg-do run }
2
3procedure interface3 is
4--
5   package Pkg is
6      type Foo is interface;
7      subtype Element_Type is Foo'Class;
8--
9      type Element_Access  is access Element_Type;
10      type Elements_Type   is array (1 .. 1) of Element_Access;
11      type Elements_Access is access Elements_Type;
12--
13      type Vector is tagged record
14         Elements : Elements_Access;
15      end record;
16--
17      procedure Test (Obj : Vector);
18   end;
19--
20   package body Pkg is
21      procedure Test (Obj : Vector) is
22         Elements : Elements_Access := new Elements_Type;
23--
24      begin
25         Elements (1) := new Element_Type'(Obj.Elements (1).all);
26      end;
27   end;
28--
29begin
30   null;
31end;
32