Skip to content

Commit a1c9386

Browse files
committed
Add failing test
changing the component size is still unsupported.
1 parent a23be29 commit a1c9386

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
procedure Test is
2+
Storage_Unit : constant := 8;
3+
Storage_Unit_Size : constant := 16;
4+
5+
type Storage_Offset is range
6+
-(2 ** (Integer'(Standard'Address_Size) - 1)) ..
7+
+(2 ** (Integer'(Standard'Address_Size) - 1)) - Long_Long_Integer'(1);
8+
9+
type Storage_Element is mod 2 ** Storage_Unit;
10+
11+
type Storage_Array is
12+
array (Storage_Offset range <>) of aliased Storage_Element;
13+
for Storage_Array'Component_Size use Storage_Unit_Size;
14+
15+
My_Storage_Array : constant Storage_Array (1..5) := (1,2,3,4,5);
16+
begin
17+
pragma Assert (My_Storage_Array(2)=2);
18+
end Test;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALL XFAIL gnat2goto fails with changing component size unsupported
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from test_support import *
2+
3+
prove()

0 commit comments

Comments
 (0)