From: Piotr Trojanek <troja...@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(-) diff --git a/gcc/ada/gen_il-fields.ads b/gcc/ada/gen_il-fields.ads index fe2da80c548..789fb76875d 100644 --- a/gcc/ada/gen_il-fields.ads +++ b/gcc/ada/gen_il-fields.ads @@ -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, diff --git a/gcc/ada/gen_il-gen-gen_nodes.adb b/gcc/ada/gen_il-gen-gen_nodes.adb index c3a97e6e16e..b361aeeca1d 100644 --- a/gcc/ada/gen_il-gen-gen_nodes.adb +++ b/gcc/ada/gen_il-gen-gen_nodes.adb @@ -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), diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 2beb6b95daf..00489722921 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -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)); diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index e9b2f0f3c5c..94bbb2f974e 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -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 -- 2.43.0