Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / gnat.dg / lto2.adb
blob7981097f85347f25b12b1d0766326ac516ba8e52
1 -- { dg-do compile }
2 -- { dg-options "-flto" { target lto } }
4 procedure Lto2 (Nbytes : Natural) is
6 type Message_T (Length : Natural) is record
7 case Length is
8 when 0 => null;
9 when others => Id : Natural;
10 end case;
11 end record;
13 type Local_Message_T is new Message_T (Nbytes);
15 function One_message return Local_Message_T is
16 M : Local_Message_T;
17 begin
18 if M.Length > 0 then
19 M.Id := 1;
20 end if;
21 return M;
22 end;
24 procedure Process (X : Local_Message_T) is begin null; end;
26 begin
27 Process (One_Message);
28 end;