diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-04 13:28:27 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-04 13:28:27 +0000 |
commit | faf8a5f7f39235b059c7fe7994dc909b1ad856bd (patch) | |
tree | 5cd1d9847625ae6fa60e392483a1ca0f224b8bd3 /gcc/testsuite/gnat.dg/controlled6.adb | |
parent | c486bd8cad61831663994e24c0e8fe205369a810 (diff) | |
download | gcc-faf8a5f7f39235b059c7fe7994dc909b1ad856bd.tar.gz |
2012-04-04 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 186135 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@186137 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gnat.dg/controlled6.adb')
-rw-r--r-- | gcc/testsuite/gnat.dg/controlled6.adb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/controlled6.adb b/gcc/testsuite/gnat.dg/controlled6.adb new file mode 100644 index 00000000000..88640de7bea --- /dev/null +++ b/gcc/testsuite/gnat.dg/controlled6.adb @@ -0,0 +1,24 @@ +-- { dg-do compile } +-- { dg-options "-O -gnatn" } + +with Ada.Text_IO; use Ada.Text_IO; +with Controlled6_Pkg; +with Controlled6_Pkg.Iterators; + +procedure Controlled6 is + + type String_Access is access String; + + package My_Q is new Controlled6_Pkg (String_Access); + package My_Iterators is new My_Q.Iterators (0); + use My_Iterators; + + Iterator : Iterator_Type := Find; + +begin + loop + exit when Is_Null (Iterator); + Put (Current (Iterator).all & ' '); + Find_Next (Iterator); + end loop; +end; |