Debian Codegraph @

gcc/testsuite/gnat.dg/specs/unchecked_convert2.ads

raw
1 -- { dg-do compile }
2 -- { dg-options "-gnatws" }
3
4 with Ada.Unchecked_Conversion;
5
6 package Unchecked_Convert2 is
7
8 type Address is access String;
9 for Address'Size use Standard'Address_Size;
10
11 type Rec is record
12 A : Address;
13 end record;
14
15 function To_Integer is new Ada.Unchecked_Conversion (Address, Integer);
16
17 function F (R : Rec) return Integer is (To_Integer (R.A));
18
19 end Unchecked_Convert2;