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:
parent
db4c6b79ff
commit
edb7412e0e
3 changed files with 40 additions and 0 deletions
|
@ -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
|
||||
|
|
9
gcc/testsuite/gnat.dg/specs/aggr4.ads
Normal file
9
gcc/testsuite/gnat.dg/specs/aggr4.ads
Normal 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;
|
26
gcc/testsuite/gnat.dg/specs/aggr4_pkg.ads
Normal file
26
gcc/testsuite/gnat.dg/specs/aggr4_pkg.ads
Normal 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;
|
Loading…
Add table
Reference in a new issue