File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed
testsuite/gnat2goto/tests/size_mod_type Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ procedure Check_Size_Mod is
2+ S1 : constant := 39 - 7 ;
3+ S2 : constant Integer := -100 + 164 ;
4+
5+ type Unsigned_8 is mod 2 ** 8 ;
6+ for Unsigned_8'Size use S1;
7+
8+ type Unsigned_4 is mod 2 ** 4 ;
9+ for Unsigned_4'Size use S2;
10+
11+ V1 : Unsigned_8;
12+ V2 : Unsigned_4;
13+ begin
14+ V1 := 255 ;
15+ V2 := 15 ;
16+
17+ pragma Assert (V1 + 1 = 0 );
18+ pragma Assert (V2 + 2 = 1 );
19+ end Check_Size_Mod ;
Original file line number Diff line number Diff line change 1+ [1] file check_size_mod.adb line 17 assertion: SUCCESS
2+ [2] file check_size_mod.adb line 18 assertion: SUCCESS
3+ VERIFICATION SUCCESSFUL
Original file line number Diff line number Diff line change 1+ from test_support import *
2+
3+ prove ()
You can’t perform that action at this time.
0 commit comments