2 -- { dg-options "-O -gnatVT -fdump-tree-optimized" }
4 -- Check that we perform the expected validity checks for
5 -- hardbool-annotated types, even when checking of tests is disabled.
7 package body Hardbool
is
8 function T
return Boolean is (Boolean (X
) and then Boolean (Y
));
17 X
:= HBool1
(if Y
then HBool2
'(False) else HBool2'(True));
22 X
:= (if Y
then HBool1
'(False) else HBool1'(True));
32 Y
:= HBool2
(if X
then HBool1
'(False) else HBool1'(True));
37 Y
:= (if X
then HBool2
'(False) else HBool2'(True));
42 -- One for each type's _rep_to_pos function.
43 -- { dg-final { scan-tree-dump-times "gnat_rcheck_CE_Invalid_Data ..hardbool.ads" 2 "optimized" } }
45 -- One check for each variable used in T, one use in each P* and in each Q*.
46 -- { dg-final { scan-tree-dump-times "gnat_rcheck_CE_Invalid_Data ..hardbool.adb" 8 "optimized" } }