File tree 1 file changed +14
-11
lines changed
1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -837,17 +837,20 @@ void goto_convertt::do_java_new_array(
837
837
t_p->source_location =location;
838
838
839
839
// zero-initialize the data
840
- exprt zero_element=
841
- zero_initializer (
842
- data.type ().subtype (),
843
- location,
844
- ns,
845
- get_message_handler ());
846
- codet array_set (ID_array_set);
847
- array_set.copy_to_operands (data, zero_element);
848
- goto_programt::targett t_d=dest.add_instruction (OTHER);
849
- t_d->code =array_set;
850
- t_d->source_location =location;
840
+ if (!rhs.get_bool (ID_skip_initialize))
841
+ {
842
+ exprt zero_element=
843
+ zero_initializer (
844
+ data.type ().subtype (),
845
+ location,
846
+ ns,
847
+ get_message_handler ());
848
+ codet array_set (ID_array_set);
849
+ array_set.copy_to_operands (data, zero_element);
850
+ goto_programt::targett t_d=dest.add_instruction (OTHER);
851
+ t_d->code =array_set;
852
+ t_d->source_location =location;
853
+ }
851
854
852
855
// multi-dimensional?
853
856
You can’t perform that action at this time.
0 commit comments