1--  { dg-do compile }
2
3package body Discr53 is
4
5   function F return Rec is
6      Data : Rec;
7   begin
8      return Data;
9   end;
10
11   type Ptr is access Rec;
12
13   procedure Proc is
14      Local : Ptr;
15   begin
16      Local := new Rec'(F);
17   end;
18
19end Discr53;
20