> This patch enables the generation of run-time checks during the analysis and
> resolution of expanded dispatching calls. They were previously disabled to
> avoid reporting spurious warnings under the ZFP run-time, but this is no
> longer required.
This generates a lot of additional and useless null access checks, so I have
applied the following adjustment.
* exp_disp.adb (Expand_Dispatching_Call): Reenable the suppression
of access checks during analysis of expanded dispatching calls.
--
Eric Botcazoudiff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb
index 93bc7aef653..bc2ad51c89c 100644
--- a/gcc/ada/exp_disp.adb
+++ b/gcc/ada/exp_disp.adb
@@ -1203,7 +1203,9 @@ package body Exp_Disp is
Set_SCIL_Node (SCIL_Related_Node, SCIL_Node);
end if;
- Analyze_And_Resolve (Call_Node, Call_Typ);
+ -- Suppress null access checks during the analysis of the expanded code
+
+ Analyze_And_Resolve (Call_Node, Call_Typ, Suppress => Access_Check);
Set_Is_Expanded_Dispatching_Call (Call_Node);
end Expand_Dispatching_Call;