diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-06-03 00:17:21 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-07-15 09:42:49 -0400 |
commit | 7fe05755eb49f2fd34ce0fe725978c7fadef8ee3 (patch) | |
tree | e119dec8033765498a87ffc9a5bd6860a77aa3a0 /gcc | |
parent | 257baf5ab9693cded2273f32293fdc925aea35c0 (diff) | |
download | gcc-7fe05755eb49f2fd34ce0fe725978c7fadef8ee3.zip gcc-7fe05755eb49f2fd34ce0fe725978c7fadef8ee3.tar.gz gcc-7fe05755eb49f2fd34ce0fe725978c7fadef8ee3.tar.bz2 |
[Ada] Fix for possibly null ranges in 'Update and delta_aggregate
gcc/ada/
* exp_spark.adb (Expand_SPARK_Delta_Or_Update): Apply scalar
range checks against the base type of an index type, not against
the index type itself.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/exp_spark.adb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/exp_spark.adb b/gcc/ada/exp_spark.adb index 40621bd..6454902 100644 --- a/gcc/ada/exp_spark.adb +++ b/gcc/ada/exp_spark.adb @@ -227,9 +227,9 @@ package body Exp_SPARK is if Nkind (Index) = N_Range then Apply_Scalar_Range_Check - (Low_Bound (Index), Etype (Index_Typ)); + (Low_Bound (Index), Base_Type (Etype (Index_Typ))); Apply_Scalar_Range_Check - (High_Bound (Index), Etype (Index_Typ)); + (High_Bound (Index), Base_Type (Etype (Index_Typ))); -- Otherwise the index denotes a single element |