It has been unused for a very long time.
gcc/ada/ChangeLog:
* einfo.ads (Size_Check_Code): Delete.
* gen_il-fields.ads (Opt_Field_Enum): Remove Size_Check_Code.
* gen_il-gen-gen_entities.adb (Constant_Or_Variable_Kind): Likewise.
* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove call
to Kill_Size_Check_Code.
* sem_prag.adb (Analyze_Pragma): Likewise.
* sem_util.ads (Kill_Size_Check_Code): Delete.
* sem_util.adb (Kill_Size_Check_Code): Likewise.
-- set, in which case this is the entity for the associated instance of
-- System.Shared_Storage.Shared_Var_Procs. See Exp_Smem for full details.
--- Size_Check_Code
--- Defined in constants and variables. Normally Empty. Set if code is
--- generated to check the size of the object. This field is used to
--- suppress this code if a subsequent address clause is encountered.
-
-- Size_Clause (synthesized)
-- Applies to all entities. If a size or value size clause is present in
-- the rep item chain for an entity then that attribute definition clause
-- Actual_Subtype
-- Renamed_Object
-- Renamed_Entity $$$
- -- Size_Check_Code (constants only)
-- Prival_Link (privals only)
-- Interface_Name (constants only)
-- Related_Type (constants only)
-- Renamed_Object
-- Renamed_Entity $$$
-- Discriminal_Link $$$
- -- Size_Check_Code
-- Prival_Link
-- Interface_Name
-- Shared_Var_Procs_Instance
Scope_Depth_Value,
Sec_Stack_Needed_For_Return,
Shared_Var_Procs_Instance,
- Size_Check_Code,
Size_Depends_On_Discriminant,
Size_Known_At_Compile_Time,
Small_Value,
Sm (Prival_Link, Node_Id),
Sm (Related_Type, Node_Id),
Sm (Return_Statement, Node_Id),
- Sm (Size_Check_Code, Node_Id),
Sm (SPARK_Pragma, Node_Id),
Sm (SPARK_Pragma_Inherited, Flag)));
then
Set_Check_Address_Alignment (N);
end if;
-
- -- Kill the size check code, since we are not allocating
- -- the variable, it is somewhere else.
-
- Kill_Size_Check_Code (U_Ent);
end;
-- Not a valid entity for an address clause
end if;
Def_Id := Entity (Def_Id);
- Kill_Size_Check_Code (Def_Id);
if Ekind (Def_Id) /= E_Constant then
Note_Possible_Modification
(Get_Pragma_Arg (Arg1), Sure => False);
-- purposes of legality checks and removal of ignored Ghost code.
Mark_Ghost_Pragma (N, Def_Id);
- Kill_Size_Check_Code (Def_Id);
if Ekind (Def_Id) /= E_Constant then
Note_Possible_Modification
(Get_Pragma_Arg (Arg2), Sure => False);
-- object to be imported.
if Ekind (Def_Id) = E_Variable then
- Kill_Size_Check_Code (Def_Id);
Note_Possible_Modification (Id, Sure => False);
-- Initialization is not allowed for imported variable
end loop Scope_Loop;
end Kill_Current_Values;
- --------------------------
- -- Kill_Size_Check_Code --
- --------------------------
-
- procedure Kill_Size_Check_Code (E : Entity_Id) is
- begin
- if (Ekind (E) = E_Constant or else Ekind (E) = E_Variable)
- and then Present (Size_Check_Code (E))
- then
- Remove (Size_Check_Code (E));
- Set_Size_Check_Code (E, Empty);
- end if;
- end Kill_Size_Check_Code;
-
--------------------
-- Known_Non_Null --
--------------------
-- if the entity Ent is not for an object. Last_Assignment_Only has the
-- same meaning as for the call with no Ent.
- procedure Kill_Size_Check_Code (E : Entity_Id);
- -- Called when an address clause or pragma Import is applied to an entity.
- -- If the entity is a variable or a constant, and size check code is
- -- present, this size check code is killed, since the object will not be
- -- allocated by the program.
-
function Known_Non_Null (N : Node_Id) return Boolean;
-- Given a node N for a subexpression of an access type, determines if
-- this subexpression yields a value that is known at compile time to