1-- { dg-do run }
2-- { dg-options "-O -gnatp" }
3
4with Volatile11_Pkg; use Volatile11_Pkg;
5
6procedure Volatile11 is
7
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);
25
26begin
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);
36
37      -- Check that F is invoked before Bit_Test
38      if B /= True then
39        raise Program_Error;
40      end if;
41end;
42