aggr4.ads: New test.

* gnat.dg/specs/aggr4.ads: New test.
	* gnat.dg/specs/aggr4_pkg.ads: New helper.

From-SVN: r184122
This commit is contained in:
Eric Botcazou 2012-02-11 00:26:37 +00:00 committed by Eric Botcazou
parent db4c6b79ff
commit edb7412e0e
3 changed files with 40 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2012-02-10 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/specs/aggr4.ads: New test.
* gnat.dg/specs/aggr4_pkg.ads: New helper.
2012-02-10 H.J. Lu <hongjiu.lu@intel.com>
PR target/52146

View File

@ -0,0 +1,9 @@
-- { dg-do compile }
with Aggr4_Pkg; use Aggr4_Pkg;
package Aggr4 is
C : constant Rec3 := (Data => (D => One, Value => Zero));
end Aggr4;

View File

@ -0,0 +1,26 @@
-- { dg-excess-errors "cannot generate code" }
package Aggr4_Pkg is
function F return Integer;
type Rec1 is tagged record
I : Integer;
end record;
Zero : constant Rec1 := (I => F);
type Enum is (One, Two);
type Rec2 (D : Enum := One) is record
case D is
when One => Value : Rec1;
when others => null;
end case;
end record;
type Rec3 is record
Data : Rec2;
end record;
end Aggr4_Pkg;