2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gnat.dg / volatile11.adb
blob54031d975af0bbb3315a6d60be4443683b13d6d2
1 -- { dg-do run }
2 -- { dg-options "-O -gnatp" }
4 with Volatile11_Pkg; use Volatile11_Pkg;
6 procedure Volatile11 is
8 Value : Integer := 1;
9 Bit1 : Boolean := false;
10 pragma Volatile (Bit1);
11 Bit2 : Boolean := false;
12 pragma Volatile (Bit2);
13 Bit3 : Boolean := false;
14 pragma Volatile (Bit3);
15 Bit4 : Boolean := false;
16 pragma Volatile (Bit4);
17 Bit5 : Boolean := false;
18 pragma Volatile (Bit5);
19 Bit6 : Boolean := false;
20 pragma Volatile (Bit6);
21 Bit7 : Boolean := false;
22 pragma Volatile (Bit7);
23 Bit8 : Boolean := false;
24 pragma Volatile (Bit8);
26 begin
27 Bit_Test(Input => Value,
28 Output1 => Bit1,
29 Output2 => Bit2,
30 Output3 => Bit3,
31 Output4 => Bit4,
32 Output5 => Bit5,
33 Output6 => Bit6,
34 Output7 => Bit7,
35 Output8 => F.all);
37 -- Check that F is invoked before Bit_Test
38 if B /= True then
39 raise Program_Error;
40 end if;
41 end;