| 1 |
-- { dg-do compile } |
| 2 |
|
| 3 |
with System; with Ada.Unchecked_Conversion; |
| 4 |
procedure Test_Call is |
| 5 |
type F_ACC is access function (Str : String) return String; |
| 6 |
|
| 7 |
function Do_Something (V : F_Acc) return System.Address is |
| 8 |
begin |
| 9 |
return System.Null_Address; |
| 10 |
end Do_Something; |
| 11 |
|
| 12 |
function BUG_1 (This : access Integer) return F_Acc is |
| 13 |
begin |
| 14 |
return null; |
| 15 |
end BUG_1; |
| 16 |
|
| 17 |
function Unch is new Ada.Unchecked_Conversion (F_Acc, System.Address); |
| 18 |
Func : System.Address := Unch (BUG_1 (null)); |
| 19 |
|
| 20 |
V : System.Address := Do_Something (BUG_1 (null)); |
| 21 |
|
| 22 |
begin |
| 23 |
null; |
| 24 |
end Test_Call; |