PR debug/66535
[official-gcc.git] / gcc / testsuite / gnat.dg / test_call.adb
blobf1ea10f73b4d18c662d66d3d1bfb27d02adc665a
1 -- { dg-do compile }
3 with System; with Ada.Unchecked_Conversion;
4 procedure Test_Call is
5 type F_ACC is access function (Str : String) return String;
7 function Do_Something (V : F_Acc) return System.Address is
8 begin
9 return System.Null_Address;
10 end Do_Something;
12 function BUG_1 (This : access Integer) return F_Acc is
13 begin
14 return null;
15 end BUG_1;
17 function Unch is new Ada.Unchecked_Conversion (F_Acc, System.Address);
18 Func : System.Address := Unch (BUG_1 (null));
20 V : System.Address := Do_Something (BUG_1 (null));
22 begin
23 null;
24 end Test_Call;