Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gnat.dg / varsize1.adb
blob55ee34a500f1df7fc2ed3657f345ba99304ebf41
1 -- { dg-do compile }
3 procedure Varsize1 (Nbytes : Natural) is
5 type Message_T (Length : Natural) is record
6 case Length is
7 when 0 => null;
8 when others => Id : Natural;
9 end case;
10 end record;
12 type Local_Message_T is new Message_T (Nbytes);
14 function One_message return Local_Message_T is
15 M : Local_Message_T;
16 begin
17 if M.Length > 0 then
18 M.Id := 1;
19 end if;
20 return M;
21 end;
23 procedure Process (X : Local_Message_T) is begin null; end;
25 begin
26 Process (One_Message);
27 end;