* gnat.dg/set_in_pproc.adb: New test.
* gnat.dg/modular2.adb: New test.
+ * gnat.dg/pak.ad[sb]: New test.
2008-05-25 Eric Botcazou <ebotcazou@adacore.com>
--- /dev/null
+-- { 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;
--- /dev/null
+with Ada.Finalization;
+package Pak is
+ type T is new Ada.Finalization.Controlled with null record;
+ procedure Initialize (X : in out T);
+ procedure Finalize (X : in out T);
+ procedure Assign (X : out T'Class);
+end Pak;