File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -4235,10 +4235,16 @@ package body Tree_Walk is
4235
4235
Source_Location => Source_Loc);
4236
4236
4237
4237
-- NEW VARS FOR MALLOC ALLOCATION
4238
- Type_Width : constant Integer :=
4239
- Positive (UI_To_Int (Esize (Element_Type)));
4238
+ -- Type_Width : constant Integer :=
4239
+ -- Positive (UI_To_Int (Esize (Element_Type)));
4240
4240
Member_Size : constant Irep :=
4241
- (Make_Integer_Constant (Type_Width, Index_Type));
4241
+ Make_Constant_Expr (Source_Location => Source_Loc,
4242
+ I_Type => Len_Type,
4243
+ Range_Check => False,
4244
+ Value =>
4245
+ Convert_Uint_To_Hex (Value => Esize (Element_Type) / 8 ,
4246
+ Bit_Width => 32 ));
4247
+ -- (Make_Integer_Constant (Type_Width, Index_Type));
4242
4248
begin
4243
4249
-- Create body (allocate and then call array_copy)
4244
4250
-- --------------------------------------------------
@@ -4248,7 +4254,7 @@ package body Tree_Walk is
4248
4254
Make_Op_Mul (
4249
4255
Lhs => Member_Size,
4250
4256
Rhs => Param_Symbol (Len_Param),
4251
- I_Type => Make_Integer_Type ,
4257
+ I_Type => Len_Type ,
4252
4258
Source_Location => Source_Loc)),
4253
4259
Body_Block, 0 );
4254
4260
-- --------------------------------------------------
You can’t perform that action at this time.
0 commit comments