File tree 1 file changed +6
-5
lines changed 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1033,12 +1033,12 @@ typet interpretert::concretise_type(const typet &type) const
1033
1033
computed_size[0 ]>0 &&
1034
1034
computed_size[0 ]<=max_allowed_dynamic_array_size)
1035
1035
{
1036
- message->result () << " Concretised array with size " << computed_size[0 ] << " \n " << messaget::eom;
1036
+ message->result () << " Concretised array with size " << computed_size[0 ] << messaget::eom;
1037
1037
return array_typet (type.subtype (),
1038
1038
constant_exprt::integer_constant (computed_size[0 ].to_ulong ()));
1039
1039
}
1040
1040
else {
1041
- message->error () << " Failed to concretise variable array\n " << messaget::eom;
1041
+ message->error () << " Failed to concretise variable array" << messaget::eom;
1042
1042
}
1043
1043
}
1044
1044
return type;
@@ -1160,9 +1160,10 @@ unsigned interpretert::get_size(const typet &type) const
1160
1160
1161
1161
unsigned subtype_size=get_size (type.subtype ());
1162
1162
1163
- mp_integer i;
1164
- if (!to_integer (size_expr, i))
1165
- return subtype_size*integer2unsigned (i);
1163
+ std::vector<mp_integer> i;
1164
+ evaluate (size_expr,i);
1165
+ if (i.size ()==1 )
1166
+ return subtype_size*integer2unsigned (i[0 ]);
1166
1167
else
1167
1168
return subtype_size;
1168
1169
}
You can’t perform that action at this time.
0 commit comments