https://gcc.gnu.org/g:97c8d71fcd48946f2eed8c71e8379df1c07a82f8
commit r16-9256-g97c8d71fcd48946f2eed8c71e8379df1c07a82f8 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 8e0bcce49f90..dbc83859261e 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;
