[Ada] Tune comment about expansion of array equality

Message ID 20211109094548.GA830071@adacore.com
State Committed
Commit 1275c4031a7d3b55e127cab53f31362469f8c89b
Headers
Series [Ada] Tune comment about expansion of array equality |

Commit Message

Pierre-Marie de Rodat Nov. 9, 2021, 9:45 a.m. UTC
  Cleanup related to expansion of dispatching equality for GNATprove.
Semantics is unaffected.

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

gcc/ada/

	* exp_ch4.adb (Arr_Attr): Refine type of the parameter from Int
	to Pos; refine name of the parameter from Num to Dim; fix
	reference to "Expr" in comment.
  

Patch

diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -1625,8 +1625,8 @@  package body Exp_Ch4 is
       function Arr_Attr
         (Arr : Entity_Id;
          Nam : Name_Id;
-         Num : Int) return Node_Id;
-      --  This builds the attribute reference Arr'Nam (Expr)
+         Dim : Pos) return Node_Id;
+      --  This builds the attribute reference Arr'Nam (Dim)
 
       function Component_Equality (Typ : Entity_Id) return Node_Id;
       --  Create one statement to compare corresponding components, designated
@@ -1691,14 +1691,14 @@  package body Exp_Ch4 is
       function Arr_Attr
         (Arr : Entity_Id;
          Nam : Name_Id;
-         Num : Int) return Node_Id
+         Dim : Pos) return Node_Id
       is
       begin
          return
            Make_Attribute_Reference (Loc,
              Attribute_Name => Nam,
              Prefix         => New_Occurrence_Of (Arr, Loc),
-             Expressions    => New_List (Make_Integer_Literal (Loc, Num)));
+             Expressions    => New_List (Make_Integer_Literal (Loc, Dim)));
       end Arr_Attr;
 
       ------------------------