diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-16 13:51:43 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-16 13:51:43 +0000 |
commit | 15b4578f4bff02e555c9fa98c6d8f39b9b8f1b9f (patch) | |
tree | ce1f9dbdd1ec6ab23c32a4ac499c5a1911dfe3fe /gcc | |
parent | c6ed11628dd9f8eda5ed1d0ae9d516bf71dc895d (diff) | |
download | gcc-15b4578f4bff02e555c9fa98c6d8f39b9b8f1b9f.tar.gz |
Add new tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127555 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gnat.dg/deref1.ads | 4 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/deref2.ads | 13 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/deref3.adb | 10 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/discr_test.adb | 31 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/elim1.adb | 6 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/elim1.ads | 5 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/elim2.adb | 7 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/specs/limited1.ads | 12 |
8 files changed, 88 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/deref1.ads b/gcc/testsuite/gnat.dg/deref1.ads new file mode 100644 index 00000000000..3da99ab0ae5 --- /dev/null +++ b/gcc/testsuite/gnat.dg/deref1.ads @@ -0,0 +1,4 @@ +package deref1 is + type T is tagged limited null record; + procedure Op (Obj : in out T); +end deref1; diff --git a/gcc/testsuite/gnat.dg/deref2.ads b/gcc/testsuite/gnat.dg/deref2.ads new file mode 100644 index 00000000000..84d509f9151 --- /dev/null +++ b/gcc/testsuite/gnat.dg/deref2.ads @@ -0,0 +1,13 @@ +with deref1; +package deref2 is + type NT is tagged limited private; + + function PT_View (Obj : not null access NT) + return not null access deref1.T'Class; +private + type PT (Obj : not null access NT) is new deref1.T with null record; + + type NT is tagged limited record + PT_View : aliased PT (NT'Access); + end record; +end; diff --git a/gcc/testsuite/gnat.dg/deref3.adb b/gcc/testsuite/gnat.dg/deref3.adb new file mode 100644 index 00000000000..b0edb18fb52 --- /dev/null +++ b/gcc/testsuite/gnat.dg/deref3.adb @@ -0,0 +1,10 @@ +-- { dg-do compile } + +with deref2; +procedure deref3 is + Obj : aliased deref2.NT; +begin + deref2.PT_View (Obj'Access).Op; + Obj.PT_View.all.Op; + Obj.PT_View.Op; +end; diff --git a/gcc/testsuite/gnat.dg/discr_test.adb b/gcc/testsuite/gnat.dg/discr_test.adb new file mode 100644 index 00000000000..1a6a4d21d8d --- /dev/null +++ b/gcc/testsuite/gnat.dg/discr_test.adb @@ -0,0 +1,31 @@ +-- { dg-do compile } + +procedure Discr_Test is + procedure P is begin null; end P; + + task type Tsk1 is + entry rvT; + end Tsk1; + + task body Tsk1 is + begin + accept rvT; + end Tsk1; + + task type Tsk2 (pS : not null access procedure) is + entry rvT; + end Tsk2; + + task body Tsk2 is + tskT : Tsk1; + begin + accept rvT do + requeue tskT.rvT; + end rvT; + pS.all; + end; + + Obj : Tsk2 (P'access); +begin + Obj.rvT; +end; diff --git a/gcc/testsuite/gnat.dg/elim1.adb b/gcc/testsuite/gnat.dg/elim1.adb new file mode 100644 index 00000000000..7d2ddd193d9 --- /dev/null +++ b/gcc/testsuite/gnat.dg/elim1.adb @@ -0,0 +1,6 @@ +package body elim1 is + procedure d (a : t) is + begin + null; + end; +end; diff --git a/gcc/testsuite/gnat.dg/elim1.ads b/gcc/testsuite/gnat.dg/elim1.ads new file mode 100644 index 00000000000..7a7bd3588b4 --- /dev/null +++ b/gcc/testsuite/gnat.dg/elim1.ads @@ -0,0 +1,5 @@ +pragma Eliminate (p, d); +package elim1 is + type t is tagged null record; + procedure d (a : t); +end; diff --git a/gcc/testsuite/gnat.dg/elim2.adb b/gcc/testsuite/gnat.dg/elim2.adb new file mode 100644 index 00000000000..a816f089030 --- /dev/null +++ b/gcc/testsuite/gnat.dg/elim2.adb @@ -0,0 +1,7 @@ +-- { dg-do run } + +with elim1; +procedure elim2 is +begin + null; +end; diff --git a/gcc/testsuite/gnat.dg/specs/limited1.ads b/gcc/testsuite/gnat.dg/specs/limited1.ads new file mode 100644 index 00000000000..268eb227a32 --- /dev/null +++ b/gcc/testsuite/gnat.dg/specs/limited1.ads @@ -0,0 +1,12 @@ +-- { dg-do compile } + +package limited1 is + pragma Pure; + + type Buffer is limited interface; + type Synchronous_Buffer_Type is synchronized interface and Buffer; + type Client_Buffer_Type is new Synchronous_Buffer_Type with private; + +private + type Client_Buffer_Type is new Synchronous_Buffer_Type with null record; +end limited1; |