aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2021-10-27 17:32:52 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2021-11-09 09:44:48 +0000
commitb5f17bffea261a5fdd7b9a7bd334f21d528d3cfa (patch)
tree5229fc8f8235f092763c096d485a205c58f309c5
parente93e554454d855231f257b3b95f4105b4da60cc0 (diff)
downloadgcc-b5f17bffea261a5fdd7b9a7bd334f21d528d3cfa.zip
gcc-b5f17bffea261a5fdd7b9a7bd334f21d528d3cfa.tar.gz
gcc-b5f17bffea261a5fdd7b9a7bd334f21d528d3cfa.tar.bz2
[Ada] Refine type in expansion of array equality
gcc/ada/ * exp_ch4.adb (Handle_One_Dimension): Parameter N must be always positive, because it is translated into expression of 'First and 'Last.
-rw-r--r--gcc/ada/exp_ch4.adb4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 2699644..3db43dd 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -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 :=