* gnat.dg/specs/aggr4_pkg.ads: New helper.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184122
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
--- /dev/null
+-- { dg-do compile }
+
+with Aggr4_Pkg; use Aggr4_Pkg;
+
+package Aggr4 is
+
+ C : constant Rec3 := (Data => (D => One, Value => Zero));
+
+end Aggr4;
--- /dev/null
+-- { 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;