summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/pak.adb
blob: 0430482f358f92885c37111b12d8f87b7c6072ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--  { dg-do compile }
package body Pak is
   pragma Suppress (Discriminant_Check);
   --  Suppress discriminant check to prevent the assignment from using
   --  the predefined primitive _assign.
   
   procedure Initialize (X : in out T) is begin null; end Initialize;
   procedure Finalize (X : in out T) is begin null; end Finalize;
   
   procedure Assign (X : out T'Class) is
      Y : T;
   begin
      T (X) := Y;
   end Assign;
end Pak;