aggr21.adb: New test.
* gnat.dg/aggr21.adb: New test. * gnat.dg/aggr21_pkg.ad[sb]: New helper. From-SVN: r204710
This commit is contained in:
parent
6ab7a3d7c4
commit
e9dc054758
|
@ -1,3 +1,8 @@
|
|||
2013-11-12 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* gnat.dg/aggr21.adb: New test.
|
||||
* gnat.dg/aggr21_pkg.ad[sb]: New helper.
|
||||
|
||||
2013-11-12 Jeff Law <law@redhat.com>
|
||||
|
||||
* gcc.dg/tree-ssa/isolate-1.c: Update expected output.
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
-- { dg-do run }
|
||||
|
||||
with Aggr21_Pkg; use Aggr21_Pkg;
|
||||
|
||||
procedure Aggr21 is
|
||||
V : Rec;
|
||||
begin
|
||||
V.A := 12;
|
||||
V.S (1 .. 10) := "Hello init";
|
||||
V.N := 123;
|
||||
Init (V);
|
||||
-- Probably not reliable, but the compiler is supposed not to modify V.S
|
||||
pragma Assert (V.s (1 .. 5) = "Hello");
|
||||
end;
|
|
@ -0,0 +1,8 @@
|
|||
package body Aggr21_Pkg is
|
||||
|
||||
procedure Init (R : out Rec) is
|
||||
begin
|
||||
R := (A => 5, S => <>, N => 7);
|
||||
end;
|
||||
|
||||
end Aggr21_Pkg;
|
|
@ -0,0 +1,11 @@
|
|||
package Aggr21_Pkg is
|
||||
|
||||
type Rec is record
|
||||
A : Integer;
|
||||
S : String (1 .. 120);
|
||||
N : Natural;
|
||||
end record;
|
||||
|
||||
procedure Init (R : out Rec);
|
||||
|
||||
end Aggr21_Pkg;
|
Loading…
Reference in New Issue