Commit e94a8385 by Arnaud Charlet Committed by Arnaud Charlet

* gnat.dg/pak.ad[sb]: New test.

From-SVN: r135926
parent ad89bc8d
......@@ -12,6 +12,7 @@
* 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>
......
-- { 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;
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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment