diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-09-12 14:15:07 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-09-12 14:15:07 +0200 |
commit | 58dc03b4c5b6050a0d2d1e9598cd0ddf52877b87 (patch) | |
tree | f92963d98be29cd87f7dbbc4bb3d8cacd849696a /gcc/testsuite/gnat.dg | |
parent | 82da9a9061892726349bceed02c707f8e0479537 (diff) | |
download | gcc-58dc03b4c5b6050a0d2d1e9598cd0ddf52877b87.zip gcc-58dc03b4c5b6050a0d2d1e9598cd0ddf52877b87.tar.gz gcc-58dc03b4c5b6050a0d2d1e9598cd0ddf52877b87.tar.bz2 |
New tests.
From-SVN: r128432
Diffstat (limited to 'gcc/testsuite/gnat.dg')
-rw-r--r-- | gcc/testsuite/gnat.dg/discr_test2.adb | 18 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/regpat1.adb | 13 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/specs/box1.ads | 13 |
3 files changed, 44 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/discr_test2.adb b/gcc/testsuite/gnat.dg/discr_test2.adb new file mode 100644 index 0000000..89f4678 --- /dev/null +++ b/gcc/testsuite/gnat.dg/discr_test2.adb @@ -0,0 +1,18 @@ +-- { dg-do compile } + +procedure Discr_Test2 is + type Ptr is access all integer; + type Ar is array (Integer range <>) of Ptr; + + type Inner (Discr : Integer) is record + Comp : Ar (1..Discr); + end record; + + type Wrapper (Discr : Integer) is record + Comp : Inner (Discr); + end record; + + Val : constant Wrapper := (0, Comp => <>); +begin + null; +end; diff --git a/gcc/testsuite/gnat.dg/regpat1.adb b/gcc/testsuite/gnat.dg/regpat1.adb new file mode 100644 index 0000000..fdd2589 --- /dev/null +++ b/gcc/testsuite/gnat.dg/regpat1.adb @@ -0,0 +1,13 @@ +-- { dg-do run } + +with GNAT.Regpat; use GNAT.Regpat; +procedure regpat1 is +begin + declare + Re : Pattern_Matcher := Compile ("a[]b"); + begin + raise Program_Error; + end; +exception + when Expression_Error => null; +end regpat1; diff --git a/gcc/testsuite/gnat.dg/specs/box1.ads b/gcc/testsuite/gnat.dg/specs/box1.ads new file mode 100644 index 0000000..dad13f3 --- /dev/null +++ b/gcc/testsuite/gnat.dg/specs/box1.ads @@ -0,0 +1,13 @@ +-- { dg-do compile } + +package box1 is + type Root is tagged null record; + type Der1 is new Root with record + B : Boolean; + end record; + + type Der2 is new Der1 with null record; + type Der3 is new Der2 with null record; + + Obj : Der3 := (Der2 with others => <>); +end; |