summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/self.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-31 18:20:42 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-31 18:20:42 +0000
commit7f1d06e2d9bc77c03f63ecc57e1f1f41a9a2da54 (patch)
treed761b541ac4e898876b36c14e2f2b0aeef0750e9 /gcc/testsuite/gnat.dg/self.adb
parentf682feb7a5bcd72cf2eb9525b920e06c2f94fb09 (diff)
downloadgcc-7f1d06e2d9bc77c03f63ecc57e1f1f41a9a2da54.tar.gz
Add new Ada test cases.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118332 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gnat.dg/self.adb')
-rw-r--r--gcc/testsuite/gnat.dg/self.adb18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/self.adb b/gcc/testsuite/gnat.dg/self.adb
new file mode 100644
index 00000000000..c95c3ef2b07
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/self.adb
@@ -0,0 +1,18 @@
+package body Self is
+ function G (X : Integer) return Lim is
+ begin
+ return R : Lim := (Comp => X, others => <>);
+ end G;
+
+ procedure Change (X : in out Lim; Incr : Integer) is
+ begin
+ X.Comp := X.Comp + Incr;
+ X.Self_Default.Comp := X.Comp + Incr;
+ X.Self_Anon_Default.Comp := X.Comp + Incr;
+ end Change;
+
+ function Get (X : Lim) return Integer is
+ begin
+ return X.Comp;
+ end;
+end Self;