[Ada] Missing check on array concatenation
gcc/ada/ * exp_ch4.adb (Expand_Concatenate): Enable needed range checks.
This commit is contained in:
parent
84adfddd0e
commit
86b3d0d55f
1 changed files with 3 additions and 2 deletions
|
@ -3524,12 +3524,13 @@ package body Exp_Ch4 is
|
||||||
-- Note that we have arranged that the result will not be treated as
|
-- 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
|
-- a static constant, so we won't get an illegality during this
|
||||||
-- insertion.
|
-- insertion.
|
||||||
|
-- We also enable checks (in particular range checks) in case the
|
||||||
|
-- bounds of Subtyp_Ind are out of range.
|
||||||
|
|
||||||
Insert_Action (Cnode,
|
Insert_Action (Cnode,
|
||||||
Make_Object_Declaration (Loc,
|
Make_Object_Declaration (Loc,
|
||||||
Defining_Identifier => Ent,
|
Defining_Identifier => Ent,
|
||||||
Object_Definition => Subtyp_Ind),
|
Object_Definition => Subtyp_Ind));
|
||||||
Suppress => All_Checks);
|
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
-- If the result of the concatenation appears as the initializing
|
-- If the result of the concatenation appears as the initializing
|
||||||
|
|
Loading…
Add table
Reference in a new issue