diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-26 13:46:21 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-26 13:46:21 +0000 |
commit | a5c1d80245275834254284311f03d914768cc9a4 (patch) | |
tree | cb65251919658691fb5167e4187841c7b5c3a334 /gcc/testsuite | |
parent | 114baaa47e929b6dc802e4a8fc363fcab29bd0b9 (diff) | |
download | gcc-a5c1d80245275834254284311f03d914768cc9a4.tar.gz |
* gnat.dg/pak.ad[sb]: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135926 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 1 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/pak.adb | 15 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/pak.ads | 7 |
3 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 156ea63a396..5f0d17b26ab 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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> diff --git a/gcc/testsuite/gnat.dg/pak.adb b/gcc/testsuite/gnat.dg/pak.adb new file mode 100644 index 00000000000..0430482f358 --- /dev/null +++ b/gcc/testsuite/gnat.dg/pak.adb @@ -0,0 +1,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; diff --git a/gcc/testsuite/gnat.dg/pak.ads b/gcc/testsuite/gnat.dg/pak.ads new file mode 100644 index 00000000000..e1e2d0d4d63 --- /dev/null +++ b/gcc/testsuite/gnat.dg/pak.ads @@ -0,0 +1,7 @@ +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; |