We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 591cb65 commit 64883acCopy full SHA for 64883ac
gnat2goto/driver/arrays.adb
@@ -392,8 +392,15 @@ package body Arrays is
392
-- of the subtype have to be obtained - which should be a range.
393
Bound_Range : constant Node_Id :=
394
(if Nkind (Idx) = N_Range
395
- then Idx
396
- else Scalar_Range (Entity (Idx)));
+ then
+ -- It is a range
397
+ Idx
398
+ elsif Nkind (Idx) = N_Subtype_Indication then
399
+ -- It is an anonymous subtype
400
+ Scalar_Range (Etype (Idx))
401
+ else
402
+ -- It is an explicitly declared subtype
403
+ Scalar_Range (Entity (Idx)));
404
405
Lbound : constant Irep :=
406
Typecast_If_Necessary (Do_Expression (Low_Bound (Bound_Range)),
0 commit comments