FRIDAY, JULY 10, 2026
gcc/ada
Re-enable suppression of access checks for Ada expanded dispatching calls
Ada compiler re-enables suppressing access checks during analysis of expanded dispatching calls.
The Ada front-end of GCC has been reverted to its previous behavior of suppressing access checks when analyzing expanded dispatching calls. A recent change had erroneously enabled these checks, leading to the generation of unnecessary access checks and impacting performance.
In Details
In gcc/ada/exp_disp.adb, the Expand_Dispatching_Call procedure is modified to re-enable the suppression of access checks during its analysis. Previously, expanded dispatching calls were analyzed with checks disabled. A recent change (') reversed this, causing redundant checks. This commit restores the prior, more efficient behavior.
For Context
- dispatching call
- In object-oriented programming, a call to a virtual method where the specific method to be executed is determined at runtime based on the dynamic type of the object. Ada supports dispatching calls through tagged types.
- access checks
- Runtime checks performed by the compiler to ensure that pointers or references are valid and point to allocated and accessible memory. In Ada, these often relate to null pointer checks or array bounds checks.
- expanded dispatching call
- A specific form of dispatching call in Ada, likely one that has been further processed or transformed by the compiler's internal representations.