]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Refine type in expansion of array equality
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 27 Oct 2021 15:32:52 +0000 (17:32 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 9 Nov 2021 09:44:48 +0000 (09:44 +0000)
gcc/ada/

* exp_ch4.adb (Handle_One_Dimension): Parameter N must be always
positive, because it is translated into expression of 'First and
'Last.

gcc/ada/exp_ch4.adb

index 269964447354c967f8b4067a594a9ca21c4b9380..3db43dd870acfc13e58a0b122c02ab04385dd0e5 100644 (file)
@@ -1637,7 +1637,7 @@ package body Exp_Ch4 is
       --  for that argument in the corresponding function formal
 
       function Handle_One_Dimension
-        (N     : Int;
+        (N     : Pos;
          Index : Node_Id) return Node_Id;
       --  This procedure returns the following code
       --
@@ -1786,7 +1786,7 @@ package body Exp_Ch4 is
       ---------------------------
 
       function Handle_One_Dimension
-        (N     : Int;
+        (N     : Pos;
          Index : Node_Id) return Node_Id
       is
          Need_Separate_Indexes : constant Boolean :=