| 1 |
-- { dg-do compile } |
| 2 |
|
| 3 |
with System; |
| 4 |
|
| 5 |
procedure Volatile_Aggregate is |
| 6 |
|
| 7 |
function GetArrayUpperBound return Integer is |
| 8 |
begin |
| 9 |
return 2; |
| 10 |
end GetArrayUpperBound; |
| 11 |
|
| 12 |
some_value : Integer := GetArrayUpperBound; |
| 13 |
|
| 14 |
type Gp_Element_Type is record |
| 15 |
Element : Integer; |
| 16 |
end record; |
| 17 |
|
| 18 |
type some_type is array (1 .. some_value) of Gp_Element_Type; |
| 19 |
|
| 20 |
type Aligned_Some_Type is record |
| 21 |
Value : aliased some_type; |
| 22 |
end record; |
| 23 |
|
| 24 |
for Aligned_Some_Type'Alignment use 8; |
| 25 |
|
| 26 |
an_aligned_type : aligned_Some_Type; |
| 27 |
my_address : system.address; |
| 28 |
|
| 29 |
pragma Volatile (an_aligned_type); |
| 30 |
|
| 31 |
begin |
| 32 |
my_address := an_aligned_type.value(1)'address; |
| 33 |
end; |