Debian Codegraph @

gcc/testsuite/gnat.dg/opt85.adb

raw
1 -- { dg-do compile }
2 -- { dg-options "-O" }
3
4 package body Opt85 is
5
6 function Conversion_Of (Value : Integer) return Data_Type is
7 begin
8 return (Value => Interfaces.Integer_16 (Value));
9 end;
10
11 function Create (Value : Integer) return Record_Type is
12 Rec : constant Record_Type :=
13 (Ada.Finalization.Controlled with
14 Header => (others => False),
15 Data => Conversion_Of (Value));
16 begin
17 return Rec;
18 end;
19
20 end Opt85;