ebbe474277fb6bf38ac41ae2a8b0c4ec01f7e14d
[gcc.git] / gcc / testsuite / gnat.dg / finalized.adb
1 -- { dg-do compile }
2
3 pragma Warnings
4 (Off, "anonymous access-to-controlled object will be finalized when its enclosing unit goes out of scope");
5
6 with Ada.Finalization; use Ada.Finalization;
7 procedure finalized is
8 type Rec is new Controlled with null record;
9 Obj : access Rec := new Rec'(Controlled with null record);
10 begin
11 null;
12 end;