| 1 |
-- { dg-options "-gnatws" } |
| 2 |
|
| 3 |
package body Aggr35_Pkg is |
| 4 |
|
| 5 |
procedure Proc1 is |
| 6 |
R : Rec := (D => 32, Data => (others => 0)); -- mutable => too large |
| 7 |
begin |
| 8 |
null; |
| 9 |
end; |
| 10 |
|
| 11 |
procedure Proc2 is |
| 12 |
R : constant Rec := (D => 32, Data => (others => 0)); -- immutable |
| 13 |
begin |
| 14 |
null; |
| 15 |
end; |
| 16 |
|
| 17 |
function Func1 (D : Storage_Offset) return Rec is |
| 18 |
begin |
| 19 |
return R : Rec := (D => D, Data => (others => 0)); -- mutable => too large |
| 20 |
end; |
| 21 |
|
| 22 |
function Func2 (D : Storage_Offset) return Rec is |
| 23 |
begin |
| 24 |
return R : constant Rec := (D => D, Data => (others => 0)); -- immutable |
| 25 |
end; |
| 26 |
|
| 27 |
function Func3 (D : Storage_Offset) return Rec is |
| 28 |
begin |
| 29 |
return (D => D, Data => (others => 0)); -- immutable |
| 30 |
end; |
| 31 |
|
| 32 |
end Aggr35_Pkg; |