Skip to content

Commit c00213b

Browse files
Petr BauchPetr Bauch
authored andcommitted
Test expansion for range check
1 parent 5300e89 commit c00213b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

testsuite/gnat2goto/tests/ranges/ranges.adb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ procedure Ranges is
33
type Int2 is new Int1 range 2 .. 9;
44
subtype Int3 is Int1 range 3 .. 8;
55
A : Int1 := 5;
6+
AA : Int1 := 10;
67
B : Int2;
78
C : Int3;
9+
CC : Int3 := 4;
810
begin
911
B := Int2(A);
1012
C := A;
13+
C := AA;
14+
A := CC;
1115
end;
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
VERIFICATION SUCCESSFUL
1+
[assertion.1] Range Check: FAILURE
2+
[assertion.2] Range Check: FAILURE
3+
VERIFICATION FAILED

0 commit comments

Comments
 (0)