aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/array35.adb
blob: 1c0f998551d398ebf9af2d0e0f6cec3564db62b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--  { dg-do run }

procedure Array35 is

   subtype Str is String (1 .. 3);

   type T is record
      B : Boolean;
      S : Str;
   end record;

   for T use record
      B at 0 range 0 .. 0;
      S at 0 range 1 .. 24;
   end record;

   X : T := (B => True, S => "123");

begin
   X.B := False;
   if X.S /= "123" then
      raise Program_Error;
   end if;
end;