aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/sem_res.adb11
2 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 160ca99..9bb3413 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2018-12-03 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_res.adb (Set_Slice_Subtype): The index type of a slice is
+ constrained.
+
2018-11-26 Matthias Klose <doko@ubuntu.com>
PR ada/88191
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index eb17098..b15be8e 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -11855,11 +11855,12 @@ package body Sem_Res is
-- for the subtype, but not in the context of a loop iteration
-- scheme).
- Set_Scalar_Range (Index_Subtype, New_Copy_Tree (Drange));
- Set_Parent (Scalar_Range (Index_Subtype), Index_Subtype);
- Set_Etype (Index_Subtype, Index_Type);
- Set_Size_Info (Index_Subtype, Index_Type);
- Set_RM_Size (Index_Subtype, RM_Size (Index_Type));
+ Set_Scalar_Range (Index_Subtype, New_Copy_Tree (Drange));
+ Set_Parent (Scalar_Range (Index_Subtype), Index_Subtype);
+ Set_Etype (Index_Subtype, Index_Type);
+ Set_Size_Info (Index_Subtype, Index_Type);
+ Set_RM_Size (Index_Subtype, RM_Size (Index_Type));
+ Set_Is_Constrained (Index_Subtype);
end if;
Slice_Subtype := Create_Itype (E_Array_Subtype, N);