Debian Codegraph @

gcc/testsuite/gnat.dg/warn26.adb

raw
1 -- { dg-do compile }
2
3 procedure Warn26 is
4
5 Monitor_Period_Min : constant := 5;
6 Monitor_Period_Max : constant := 30;
7
8 type Monitor_Period is range Monitor_Period_Min .. Monitor_Period_Max;
9
10 subtype Period_T is Positive range 5 .. 30;
11
12 function Id (X : Period_T) return Period_T is (X);
13 Input_Period : Period_T := Id (20);
14 begin
15 if Input_Period in
16 Integer (Monitor_Period'First) .. Integer ( Monitor_Period'Last)
17 then
18 null;
19 end if;
20 end Warn26;