A workaround for a bug in expansion of Enum_Rep attribute in the
GNATprove mode was to expand First and Last attributes. Now with
handling of Enum_Rep fixed we don't need this workaround anymore.

Tested on x86_64-pc-linux-gnu, committed on trunk

2020-06-10  Piotr Trojanek  <troja...@adacore.com>

gcc/ada/

        * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Remove
        expansion of First and Last attributes.
--- gcc/ada/exp_spark.adb
+++ gcc/ada/exp_spark.adb
@@ -52,14 +52,13 @@ package body Exp_SPARK is
    -----------------------
 
    procedure Expand_SPARK_N_Attribute_Reference (N : Node_Id);
-   --  Replace occurrences of System'To_Address by calls to
-   --  System.Storage_Elements.To_Address
+   --  Perform attribute-reference-specific expansion
 
    procedure Expand_SPARK_N_Freeze_Type (E : Entity_Id);
    --  Build the DIC procedure of a type when needed, if not already done
 
    procedure Expand_SPARK_N_Loop_Statement (N : Node_Id);
-   --  Perform loop statement-specific expansion
+   --  Perform loop-statement-specific expansion
 
    procedure Expand_SPARK_N_Object_Declaration (N : Node_Id);
    --  Perform object-declaration-specific expansion
@@ -266,12 +265,6 @@ package body Exp_SPARK is
             Analyze_And_Resolve (N, Standard_Boolean);
          end if;
 
-      --  For attributes First and Last simply reuse the standard expansion
-
-      elsif Attr_Id = Attribute_First
-        or else Attr_Id = Attribute_Last
-      then
-         Exp_Attr.Expand_N_Attribute_Reference (N);
       end if;
    end Expand_SPARK_N_Attribute_Reference;
 

Reply via email to