diff options
author | Arnaud Charlet <charlet@adacore.com> | 2020-07-10 08:21:53 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-10-19 05:53:41 -0400 |
commit | 86b3d0d55f947d8c5328a25b113bb52ae3ac89fa (patch) | |
tree | 2217c62272ee1b0bbee6bf68bcbb7190e19630bf /gcc/ada/exp_ch4.adb | |
parent | 84adfddd0e703c20203a2414c1a2f0fde3f540b7 (diff) | |
download | gcc-86b3d0d55f947d8c5328a25b113bb52ae3ac89fa.zip gcc-86b3d0d55f947d8c5328a25b113bb52ae3ac89fa.tar.gz gcc-86b3d0d55f947d8c5328a25b113bb52ae3ac89fa.tar.bz2 |
[Ada] Missing check on array concatenation
gcc/ada/
* exp_ch4.adb (Expand_Concatenate): Enable needed range checks.
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r-- | gcc/ada/exp_ch4.adb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 7139e49..526bec2 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -3524,12 +3524,13 @@ package body Exp_Ch4 is -- Note that we have arranged that the result will not be treated as -- a static constant, so we won't get an illegality during this -- insertion. + -- We also enable checks (in particular range checks) in case the + -- bounds of Subtyp_Ind are out of range. Insert_Action (Cnode, Make_Object_Declaration (Loc, Defining_Identifier => Ent, - Object_Definition => Subtyp_Ind), - Suppress => All_Checks); + Object_Definition => Subtyp_Ind)); end if; -- If the result of the concatenation appears as the initializing |