diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2009-06-03 10:52:40 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2009-06-03 10:52:40 +0000 |
commit | cdaa0e0b8c1cd7569b50ab50819401f7d399983b (patch) | |
tree | 814533141d2c4d825ded89a4f5223f2bb99676da /gcc/testsuite | |
parent | a6a29d0c39e207cf1ec8ad94ec44744ae9814660 (diff) | |
download | gcc-cdaa0e0b8c1cd7569b50ab50819401f7d399983b.zip gcc-cdaa0e0b8c1cd7569b50ab50819401f7d399983b.tar.gz gcc-cdaa0e0b8c1cd7569b50ab50819401f7d399983b.tar.bz2 |
decl.c (gnat_to_gnu_entity): When adjusting the discriminant nodes in an extension...
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When
adjusting the discriminant nodes in an extension, use the full view
of the parent subtype if it is of a private kind.
From-SVN: r148125
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/specs/root-level_1-level_2.ads | 7 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/specs/root-level_1.ads | 14 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/specs/root-level_2.ads | 9 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/specs/root.ads | 9 |
5 files changed, 46 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dcab467..981a891 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2009-06-03 Eric Botcazou <ebotcazou@adacore.com> + + * gnat.dg/specs/root.ads: New test. + * gnat.dg/specs/root-level_1.ads: Likewise. + * gnat.dg/specs/root-level_2.ads: Likewise. + * gnat.dg/specs/root-level_1-level_2.ads: Likewise. + 2009-06-02 Mark Mitchell <mark@codesourcery.com> * g++.dg/init/ref15.C: Require unwrapped targets. diff --git a/gcc/testsuite/gnat.dg/specs/root-level_1-level_2.ads b/gcc/testsuite/gnat.dg/specs/root-level_1-level_2.ads new file mode 100644 index 0000000..9687208 --- /dev/null +++ b/gcc/testsuite/gnat.dg/specs/root-level_1-level_2.ads @@ -0,0 +1,7 @@ +package Root.Level_1.Level_2 is + + type Level_2_Type (First : Natural; + Second : Natural) is new + Level_1.Level_1_Type (First => First, Second => Second) with null record; + +end Root.Level_1.Level_2; diff --git a/gcc/testsuite/gnat.dg/specs/root-level_1.ads b/gcc/testsuite/gnat.dg/specs/root-level_1.ads new file mode 100644 index 0000000..6bcb125 --- /dev/null +++ b/gcc/testsuite/gnat.dg/specs/root-level_1.ads @@ -0,0 +1,14 @@ +package Root.Level_1 is + + type Level_1_Type (First : Natural; + Second : Natural) is new Root_Type with private; + +private + + type Level_1_Type (First : Natural; + Second : Natural) is new Root_Type (First => First) + with record + Buffer_1 : Buffer_Type (1 .. Second); + end record; + +end Root.Level_1; diff --git a/gcc/testsuite/gnat.dg/specs/root-level_2.ads b/gcc/testsuite/gnat.dg/specs/root-level_2.ads new file mode 100644 index 0000000..c4f812e --- /dev/null +++ b/gcc/testsuite/gnat.dg/specs/root-level_2.ads @@ -0,0 +1,9 @@ +with Root.Level_1; + +package Root.Level_2 is + + type Level_2_Type (First : Natural; + Second : Natural) is new + Level_1.Level_1_Type (First => First, Second => Second) with null record; + +end Root.Level_2; diff --git a/gcc/testsuite/gnat.dg/specs/root.ads b/gcc/testsuite/gnat.dg/specs/root.ads new file mode 100644 index 0000000..e80ab88 --- /dev/null +++ b/gcc/testsuite/gnat.dg/specs/root.ads @@ -0,0 +1,9 @@ +package Root is + + type Buffer_Type is array (Positive range <>) of Natural; + + type Root_Type (First : Natural) is abstract tagged record + Buffer_Root : Buffer_Type (1 .. First); + end record; + +end Root; |