Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gnat.dg/lto2.adb @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
-- { dg-do compile } -- { dg-options "-flto" { target lto } } procedure Lto2 (Nbytes : Natural) is type Message_T (Length : Natural) is record case Length is when 0 => null; when others => Id : Natural; end case; end record; type Local_Message_T is new Message_T (Nbytes); function One_message return Local_Message_T is M : Local_Message_T; begin if M.Length > 0 then M.Id := 1; end if; return M; end; procedure Process (X : Local_Message_T) is begin null; end; begin Process (One_Message); end;