Debian Codegraph @

gcc/testsuite/gnat.dg/biased_subtype.adb

raw
1 -- { dg-do run }
2 -- { dg-options "-gnatws" }
3
4 procedure Biased_Subtype is
5
6 CIM_Max_AA : constant := 9_999_999;
7 CIM_Min_AA : constant := -999_999;
8
9 type TIM_AA is range CIM_Min_AA..CIM_Max_AA + 1;
10 for TIM_AA'Size use 24;
11
12 subtype STIM_AA is TIM_AA range TIM_AA(CIM_Min_AA)..TIM_AA(CIM_Max_AA);
13
14 SAA : STIM_AA := 1;
15
16 begin
17 if Integer(SAA) /= 1 then
18 raise Program_Error;
19 end if;
20 end;