@@ -409,13 +409,13 @@ void value_set_fit::get_value_set_rec(
409
409
410
410
const typet &type=ns.follow (expr.op0 ().type ());
411
411
412
- DATA_INVARIANT (type.id ()==ID_array ||
413
- type. id ()==ID_incomplete_array ||
414
- type. id ()== " #REF# " ,
415
- " operand 0 of index expression must be an array " );
416
-
417
- get_value_set_rec (expr. op0 (), dest, " [] " +suffix,
418
- original_type, ns, recursion_set );
412
+ if (type.id () == ID_array)
413
+ {
414
+ get_value_set_rec (
415
+ expr. op0 (), dest, " [] " + suffix, original_type, ns, recursion_set );
416
+ }
417
+ else
418
+ insert (dest, exprt (ID_unknown, original_type) );
419
419
420
420
return ;
421
421
}
@@ -1279,12 +1279,9 @@ void value_set_fit::assign_rec(
1279
1279
1280
1280
const typet &type=ns.follow (lhs.op0 ().type ());
1281
1281
1282
- DATA_INVARIANT (type.id ()==ID_array ||
1283
- type.id ()==ID_incomplete_array ||
1284
- type.id ()==" #REF#" ,
1285
- " operand 0 of index expression must be an array" );
1286
-
1287
- assign_rec (lhs.op0 (), values_rhs, " []" +suffix, ns, recursion_set);
1282
+ if (type.id ()==ID_array ||
1283
+ type.id ()==ID_incomplete_array)
1284
+ assign_rec (lhs.op0 (), values_rhs, " []" +suffix, ns, recursion_set);
1288
1285
}
1289
1286
else if (lhs.id ()==ID_member)
1290
1287
{
@@ -1328,9 +1325,9 @@ void value_set_fit::assign_rec(
1328
1325
1329
1326
assign_rec (typecast_expr.op (), values_rhs, suffix, ns, recursion_set);
1330
1327
}
1331
- else if (lhs. id ()== " zero_string " ||
1332
- lhs.id ()== " is_zero_string" ||
1333
- lhs.id ()== " zero_string_length " )
1328
+ else if (
1329
+ lhs. id () == " zero_string " || lhs.id () == " is_zero_string" ||
1330
+ lhs. id () == " zero_string_length " || lhs.id () == ID_address_of )
1334
1331
{
1335
1332
// ignore
1336
1333
}
0 commit comments