From: Piotr Trojanek <trojanek@adacore.com>
Flag Address_Warning_Posted was only read and never written, so it can be
safely removed.
gcc/ada/ChangeLog:
* gen_il-fields.ads (Opt_Field_Enum): Remove flag.
* gen_il-gen-gen_nodes.adb (N_Attribute_Definition_Clause): Remove
field.
* sem_ch13.adb (Validate_Address_Clauses): Remove read of the flag.
* sinfo.ads (Address_Warning_Posted): Remove flag description.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/gen_il-fields.ads | 1 -
gcc/ada/gen_il-gen-gen_nodes.adb | 1 -
gcc/ada/sem_ch13.adb | 6 ++----
gcc/ada/sinfo.ads | 6 ------
4 files changed, 2 insertions(+), 12 deletions(-)
@@ -65,7 +65,6 @@ package Gen_IL.Fields is
Activation_Chain_Entity,
Acts_As_Spec,
Actual_Designated_Subtype,
- Address_Warning_Posted,
Aggregate_Bounds_Or_Ancestor_Type,
Aliased_Present,
All_Others,
@@ -98,7 +98,6 @@ begin -- Gen_IL.Gen.Gen_Nodes
(Sy (Name, Node_Id, Default_Empty),
Sy (Chars, Name_Id, Default_No_Name),
Sy (Expression, Node_Id, Default_Empty),
- Sm (Address_Warning_Posted, Flag),
Sm (Check_Address_Alignment, Flag),
Sm (Entity_Or_Associated_Node, Node_Id), -- just Entity
Sm (From_Aspect_Specification, Flag),
@@ -18055,11 +18055,9 @@ package body Sem_Ch13 is
X_Offs : Uint;
begin
- -- Skip processing of this entry if warning already posted, or if
- -- alignments are not set.
+ -- Skip processing of this entry if alignments are not set
- if not Address_Warning_Posted (ACCR.N)
- and then Known_Alignment (ACCR.X)
+ if Known_Alignment (ACCR.X)
and then Known_Alignment (ACCR.Y)
then
Expr := Original_Node (Expression (ACCR.N));
@@ -788,11 +788,6 @@ package Sinfo is
-- created for the expansion of an allocator with a subtype_indication
-- and the designated subtype is an unconstrained composite type.
- -- Address_Warning_Posted
- -- Present in N_Attribute_Definition nodes. Set to indicate that we have
- -- posted a warning for the address clause regarding size or alignment
- -- issues. Used to inhibit multiple redundant messages.
-
-- Aggregate_Bounds
-- Present in array N_Aggregate nodes. If the bounds of the aggregate are
-- known at compile time, this field points to an N_Range node with those
@@ -7549,7 +7544,6 @@ package Sinfo is
-- Check_Address_Alignment
-- From_Aspect_Specification
-- Is_Delayed_Aspect
- -- Address_Warning_Posted
-- Note: if From_Aspect_Specification is set, then Sloc points to the
-- aspect name, and Entity is resolved already to reference the entity