[Ada] Move Reachable flag to E_Label entities
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 27 Jan 2022 11:59:58 +0000 (12:59 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 11 May 2022 08:53:17 +0000 (08:53 +0000)
An entity flag Reachable is described as "defined in labels". It is only
read and written for entities of kind E_Label (the code has necessary
guards for that). There no need for this flag to be specified for all
entities in the generated AST.

Cleanup related to detection of uninitialized scalars with GOTO
statements.

gcc/ada/

* gen_il-gen-gen_entities.adb (Reachable): Move from
Root_Entity_Type to E_Label.

gcc/ada/gen_il-gen-gen_entities.adb

index 2631045..5b8603b 100644 (file)
@@ -217,7 +217,6 @@ begin -- Gen_IL.Gen.Gen_Entities
         Sm (No_Return, Flag),
         Sm (Overlays_Constant, Flag),
         Sm (Prev_Entity, Node_Id),
-        Sm (Reachable, Flag),
         Sm (Referenced, Flag),
         Sm (Referenced_As_LHS, Flag),
         Sm (Referenced_As_Out_Parameter, Flag),
@@ -1241,6 +1240,7 @@ begin -- Gen_IL.Gen.Gen_Entities
        --  implicit label declaration, not the occurrence of the label itself,
        --  which is simply a direct name referring to the label.
        (Sm (Enclosing_Scope, Node_Id),
+        Sm (Reachable, Flag),
         Sm (Renamed_Or_Alias, Node_Id)));
 
    Cc (E_Loop, Entity_Kind,