Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gnat.dg / opt26.adb
blob61f8b5b1eb99223c52cd81172098d6e38c4fd764
1 -- { dg-do run }
2 -- { dg-options "-gnato -O" }
4 with Interfaces; use Interfaces;
6 procedure Opt26 is
8 procedure Shift_Left_Bool
9 (Bool : in Boolean;
10 U8 : out Interfaces.Unsigned_8)
12 begin
13 U8 := Shift_Left (Boolean'Pos (Bool), 6);
14 end Shift_Left_Bool;
16 procedure Shift_Left_Not_Bool
17 (Bool : in Boolean;
18 U8 : out Interfaces.Unsigned_8)
20 begin
21 U8 := Shift_Left (Boolean'Pos (not Bool), 6);
22 end Shift_Left_Not_Bool;
24 Bool : constant Boolean := True;
25 Byte1, Byte2 : Interfaces.Unsigned_8;
27 begin
29 Shift_Left_Bool (Bool, Byte1);
31 Shift_Left_Not_Bool (Bool, Byte2);
33 if Byte1 + Byte2 /= 64 then
34 raise Program_Error;
35 end if;
37 end;