1-- { dg-do compile }
2
3procedure Derived_Type4 is
4
5  type Root (D : Positive) is record
6     S : String (1 .. D);
7  end record;
8
9  subtype Short is Positive range 1 .. 10;
10  type Derived (N : Short := 1) is new Root (D => N);
11
12  Obj : Derived;
13
14begin
15  Obj := (N => 5, S => "Hello");
16end;
17