* gcc.dg/stack-check-5.c: Skip with -fstack-protector.
[official-gcc.git] / gcc / testsuite / gnat.dg / interface3.adb
blobda38a1fb798d44aea247fdc58a2a990cc3b0b0c0
1 -- { dg-do run }
3 procedure 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;
29 begin
30 null;
31 end;