https://gcc.gnu.org/g:bcde988003026d127541c0fd2f750c6612af81bd
commit r17-2298-gbcde988003026d127541c0fd2f750c6612af81bd Author: Eric Botcazou <[email protected]> Date: Fri Jul 10 08:37:12 2026 +0200 Ada: Suppress access checks during analysis of expanded dispatching calls Expanded dispatching calls had been historically analyzed with all checks disabled, but this was recently changed, thus causing the generation of a lot of additional and useless access checks. gcc/ada/ * exp_disp.adb (Expand_Dispatching_Call): Reenable the suppression of access checks during analysis of expanded dispatching calls. Diff: --- gcc/ada/exp_disp.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb index 93bc7aef653d..bc2ad51c89c4 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;
