Skip to content

Commit e324de6

Browse files
authored
Merge pull request #1656 from tautschnig/double-preproc
Type consistent string preprocessing for floating-point expressions
2 parents cf187c8 + 18f9079 commit e324de6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

regression/jbmc-strings/StringValueOf09/test.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
THOROUGH
1+
CORE
22
StringValueOf09.class
33
--refine-strings --string-max-length 1000
44
^EXIT=10$

src/java_bytecode/java_string_library_preprocess.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ codet java_string_library_preprocesst::make_float_to_string_code(
971971
exprt str=allocate_fresh_string(type.return_type(), loc, symbol_table, code);
972972

973973
// Expression representing 0.0
974-
ieee_float_spect float_spec=ieee_float_spect::single_precision();
974+
ieee_float_spect float_spec(to_floatbv_type(params[0].type()));
975975
ieee_floatt zero_float(float_spec);
976976
zero_float.from_float(0.0);
977977
constant_exprt zero=zero_float.to_expr();

0 commit comments

Comments
 (0)