2 -- { dg-options "-gnata" }
4 procedure Predicate11
is
5 type T_BYTES
is new Integer range 0 .. 2**15 - 1 with Size
=> 32;
6 subtype TYPE5_SCALAR
is T_BYTES
7 with Dynamic_Predicate
=> TYPE5_SCALAR
mod 4 = 0;
8 subtype Cond
is Integer
9 with dynamic_predicate
=> (if cond
< 5 then false else True);
11 Thing1
: Type5_Scalar
:= 7; -- { dg-warning "check will fail at run time" }
12 function OK
(C
:Type5_scalar
) return Boolean is (True);
13 Thing2
: Type5_Scalar
;
16 if not OK
(7) then raise Program_Error
; end if; -- { dg-warning "check will fail at run time" }
18 Thing3
:= 1; -- { dg-warning "check will fail at run time" }