From faf8a5f7f39235b059c7fe7994dc909b1ad856bd Mon Sep 17 00:00:00 2001 From: bstarynk Date: Wed, 4 Apr 2012 13:28:27 +0000 Subject: 2012-04-04 Basile Starynkevitch 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 --- gcc/testsuite/gnat.dg/controlled6.adb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 gcc/testsuite/gnat.dg/controlled6.adb (limited to 'gcc/testsuite/gnat.dg/controlled6.adb') 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; -- cgit v1.2.1