@@ -410,17 +410,18 @@ void value_set_fit::get_value_set_rec(
410
410
{
411
411
const typet &type = to_index_expr (expr).array ().type ();
412
412
413
- DATA_INVARIANT (type.id ()==ID_array ||
414
- type.id ()==" #REF#" ,
415
- " operand 0 of index expression must be an array" );
416
-
417
- get_value_set_rec (
418
- to_index_expr (expr).array (),
419
- dest,
420
- " []" + suffix,
421
- original_type,
422
- ns,
423
- recursion_set);
413
+ if (type.id () == ID_array)
414
+ {
415
+ get_value_set_rec (
416
+ to_index_expr (expr).array (),
417
+ dest,
418
+ " []" + suffix,
419
+ original_type,
420
+ ns,
421
+ recursion_set);
422
+ }
423
+ else
424
+ insert (dest, exprt (ID_unknown, original_type));
424
425
425
426
return ;
426
427
}
@@ -1192,12 +1193,15 @@ void value_set_fit::assign_rec(
1192
1193
{
1193
1194
const typet &type = to_index_expr (lhs).array ().type ();
1194
1195
1195
- DATA_INVARIANT (type.id ()==ID_array ||
1196
- type.id ()==" #REF#" ,
1197
- " operand 0 of index expression must be an array" );
1198
-
1199
- assign_rec (
1200
- to_index_expr (lhs).array (), values_rhs, " []" + suffix, ns, recursion_set);
1196
+ if (type.id () == ID_array)
1197
+ {
1198
+ assign_rec (
1199
+ to_index_expr (lhs).array (),
1200
+ values_rhs,
1201
+ " []" + suffix,
1202
+ ns,
1203
+ recursion_set);
1204
+ }
1201
1205
}
1202
1206
else if (lhs.id ()==ID_member)
1203
1207
{
@@ -1239,9 +1243,9 @@ void value_set_fit::assign_rec(
1239
1243
1240
1244
assign_rec (typecast_expr.op (), values_rhs, suffix, ns, recursion_set);
1241
1245
}
1242
- else if (lhs. id ()== " zero_string " ||
1243
- lhs.id ()== " is_zero_string" ||
1244
- lhs.id ()== " zero_string_length " )
1246
+ else if (
1247
+ lhs. id () == " zero_string " || lhs.id () == " is_zero_string" ||
1248
+ lhs. id () == " zero_string_length " || lhs.id () == ID_address_of )
1245
1249
{
1246
1250
// ignore
1247
1251
}
0 commit comments