https://gcc.gnu.org/g:5b989e91c5f5abd634f7d7ee6d3ac47d95e2e067

commit r17-1169-g5b989e91c5f5abd634f7d7ee6d3ac47d95e2e067
Author: Ronan Desplanques <[email protected]>
Date:   Tue Mar 31 12:27:57 2026 +0200

    ada: Restrict Is_Limited_Composite field to (sub)types
    
    Is_Limited_Composite was set on all entities during the migration to
    Gen_IL, but it's only used on types and subtypes. This moves the field
    to the appropriate entity kind.
    
    gcc/ada/ChangeLog:
    
            * gen_il-gen-gen_entities.adb (Gen_Entities): Move
            Is_Limited_Composite.
            * einfo.ads (Is_Limited_Composite): Update documentation.

Diff:
---
 gcc/ada/einfo.ads                   | 8 ++++----
 gcc/ada/gen_il-gen-gen_entities.adb | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads
index dc75d6f1bc75..b0283e2a0b1e 100644
--- a/gcc/ada/einfo.ads
+++ b/gcc/ada/einfo.ads
@@ -3041,10 +3041,10 @@ package Einfo is
 --       about them.
 
 --    Is_Limited_Composite
---       Defined in all entities. Set for composite types that have a limited
---       component. Used to enforce the rule that operations on the composite
---       type that depend on the full view of the component do not become
---       visible until the immediate scope of the composite type itself
+--       Defined in types and subtypes. Set for composite types that have a
+--       limited component. Used to enforce the rule that operations on the
+--       composite type that depend on the full view of the component do not
+--       become visible until the immediate scope of the composite type itself
 --       (RM 7.3.1 (5)).
 
 --    Is_Limited_Interface
diff --git a/gcc/ada/gen_il-gen-gen_entities.adb 
b/gcc/ada/gen_il-gen-gen_entities.adb
index 2d358929b5ff..84bcc429642c 100644
--- a/gcc/ada/gen_il-gen-gen_entities.adb
+++ b/gcc/ada/gen_il-gen-gen_entities.adb
@@ -173,7 +173,6 @@ begin -- Gen_IL.Gen.Gen_Entities
         Sm (Is_Known_Non_Null, Flag),
         Sm (Is_Known_Null, Flag),
         Sm (Is_Known_Valid, Flag),
-        Sm (Is_Limited_Composite, Flag),
         Sm (Is_Limited_Interface, Flag),
         Sm (Is_Limited_Record, Flag),
         Sm (Is_Link_Once, Flag),
@@ -508,6 +507,7 @@ begin -- Gen_IL.Gen.Gen_Entities
         Sm (Is_Fixed_Lower_Bound_Index_Subtype, Flag),
         Sm (Is_Generic_Actual_Type, Flag),
         Sm (Is_Implicit_Full_View, Flag),
+        Sm (Is_Limited_Composite, Flag),
         Sm (Is_Mutably_Tagged_Type, Flag),
         Sm (Is_Non_Static_Subtype, Flag),
         Sm (Is_Private_Composite, Flag),

Reply via email to