PR debug/66535
[official-gcc.git] / gcc / testsuite / gnat.dg / bit_packed_array5.adb
blob1f93c6bf7d4a12b1d2d3c08496ede45429ad9dfa
1 -- { dg-do compile }
3 with System;
5 package body Bit_Packed_Array5 is
7 function Inv (Word : Word_Type) return Word_Type is
8 W : Word_Type := Word;
9 pragma Volatile (W);
11 A_W : constant System.Address := W'Address;
13 V : Short_Bit_Array_Type;
14 for V'Address use A_W;
15 pragma Volatile (V);
16 begin
17 for I in V'Range loop
18 V (I) := not V (I);
19 end loop;
20 return W;
21 end;
23 end Bit_Packed_Array5;