https://gcc.gnu.org/g:df310aab0e1f56da10382a68ddd46d3fa0aa89a4
commit r16-1218-gdf310aab0e1f56da10382a68ddd46d3fa0aa89a4 Author: Eric Botcazou <ebotca...@adacore.com> Date: Tue Feb 18 11:24:15 2025 +0100 ada: Tweak definition of Modulus field of entities The compiler may build modular integer subtypes whose base type is private in the context of instantiations, but we want to be able to get the Modulus. gcc/ada/ChangeLog: * einfo.ads (Modulus): Change to implementation base type only. * gen_il-gen-gen_entities.adb (Modular_Integer_Kind): Change type of Modulus field to Impl_Base_Type_Only. Diff: --- gcc/ada/einfo.ads | 2 +- gcc/ada/gen_il-gen-gen_entities.adb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index c07de681045a..05ce8beca764 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -3626,7 +3626,7 @@ package Einfo is -- subprogram or the formal's Extra_Accessibility - whichever one is -- lesser. The Minimum_Accessibility field then points to this object. --- Modulus [base type only] +-- Modulus [implementation base type only] -- Defined in modular types. Contains the modulus. For the binary case, -- this will be a power of 2, but if Non_Binary_Modulus is set, then it -- will not be a power of 2. diff --git a/gcc/ada/gen_il-gen-gen_entities.adb b/gcc/ada/gen_il-gen-gen_entities.adb index 4548789383e2..2dc255c78c8a 100644 --- a/gcc/ada/gen_il-gen-gen_entities.adb +++ b/gcc/ada/gen_il-gen-gen_entities.adb @@ -572,7 +572,7 @@ begin -- Gen_IL.Gen.Gen_Entities -- created for the base type, and this is the first named subtype). Ab (Modular_Integer_Kind, Integer_Kind, - (Sm (Modulus, Uint, Base_Type_Only), + (Sm (Modulus, Uint, Impl_Base_Type_Only), Sm (Original_Array_Type, Node_Id))); Cc (E_Modular_Integer_Type, Modular_Integer_Kind);