We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 827519d + 035ae92 commit 935825eCopy full SHA for 935825e
src/java_bytecode/java_object_factory.cpp
@@ -549,7 +549,10 @@ void java_object_factoryt::gen_nondet_array_init(
549
550
side_effect_exprt java_new_array(ID_java_new_array, expr.type());
551
java_new_array.copy_to_operands(length_sym_expr);
552
- java_new_array.set(ID_skip_initialize, true);
+ // Retain the array_set instruction for the special case of a
553
+ // zero-length array, where this will be the only assignment against
554
+ // the array's identifier.
555
+ java_new_array.set(ID_skip_initialize, false);
556
java_new_array.type().subtype().set(ID_C_element_type, element_type);
557
codet assign=code_assignt(expr, java_new_array);
558
assign.add_source_location()=loc;
@@ -798,4 +801,3 @@ void gen_nondet_init(
798
801
typet(),
799
802
update_in_place);
800
803
}
-
0 commit comments