[Ada] Code clean up
authorArnaud Charlet <charlet@adacore.com>
Mon, 13 Jul 2020 16:28:31 +0000 (18:28 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 20 Oct 2020 07:21:29 +0000 (03:21 -0400)
gcc/ada/

* exp_attr.adb (Expand_N_Attribute_Reference): Merge handling of
Simple_Storage_Pool and Storage_Pool.

gcc/ada/exp_attr.adb

index 70f353fe3c39a9981b4a4177a1c9b033cdacc7d3..49888d1469928b8ce29aed6efb462602d49268a3 100644 (file)
@@ -6037,11 +6037,11 @@ package body Exp_Attr is
       when Attribute_Scaling =>
          Expand_Fpt_Attribute_RI (N);
 
-      -------------------------
-      -- Simple_Storage_Pool --
-      -------------------------
+      ----------------------------------------
+      -- Simple_Storage_Pool & Storage_Pool --
+      ----------------------------------------
 
-      when Attribute_Simple_Storage_Pool =>
+      when Attribute_Simple_Storage_Pool | Attribute_Storage_Pool =>
          Rewrite (N,
            Make_Type_Conversion (Loc,
              Subtype_Mark => New_Occurrence_Of (Etype (N), Loc),
@@ -6177,17 +6177,6 @@ package body Exp_Attr is
             Expand_Size_Attribute (N);
          end Size;
 
-      ------------------
-      -- Storage_Pool --
-      ------------------
-
-      when Attribute_Storage_Pool =>
-         Rewrite (N,
-           Make_Type_Conversion (Loc,
-             Subtype_Mark => New_Occurrence_Of (Etype (N), Loc),
-             Expression   => New_Occurrence_Of (Entity (N), Loc)));
-         Analyze_And_Resolve (N, Typ);
-
       ------------------
       -- Storage_Size --
       ------------------