From: Arnaud Charlet Date: Fri, 10 Jul 2020 12:21:53 +0000 (-0400) Subject: [Ada] Missing check on array concatenation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=86b3d0d55f947d8c5328a25b113bb52ae3ac89fa;p=gcc.git [Ada] Missing check on array concatenation gcc/ada/ * exp_ch4.adb (Expand_Concatenate): Enable needed range checks. --- diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 7139e4948b3..526bec2fcca 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