File tree 2 files changed +14
-6
lines changed
regression/cbmc/enum-trace1 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --xml-ui --function test --trace
4
+ activate-multi-line-match
5
+ EXIT=10
6
+ SIGNAL=0
7
+ VERIFICATION FAILED
8
+ <input hidden="false" step_nr="\d+" thread="0">\n\s*<input_id>e</input_id>\n\s*<value>.*E(1|2|3)</value>\n\s*<value_expression>\n\s*<integer binary="000000000000000000000000000000(0|1){2}" c_type="enum" width="32">(0|1|2)</integer>\n\s*</value_expression>
9
+ <input hidden="false" step_nr="\d+" thread="0">\n\s*<input_id>t</input_id>\n\s*<value>.*T(1|2|3)</value>\n\s*<value_expression>\n\s*<integer binary="000000000000000000000000000000(0|1){2}" c_type="enum" width="32">(0|1|2)</integer>\n\s*</value_expression>
10
+ --
11
+ ^warning: ignoring
Original file line number Diff line number Diff line change @@ -179,16 +179,13 @@ xmlt xml(const exprt &expr, const namespacet &ns)
179
179
const auto width =
180
180
to_bitvector_type (to_c_enum_type (type).subtype ()).get_width ();
181
181
182
+ const auto integer_value = bvrep2integer (value, width, false );
182
183
result.name = " integer" ;
183
- result.set_attribute (
184
- " binary" ,
185
- integer2binary (numeric_cast_v<mp_integer>(constant_expr), width));
184
+ result.set_attribute (" binary" , integer2binary (integer_value, width));
186
185
result.set_attribute (" width" , width);
187
186
result.set_attribute (" c_type" , " enum" );
188
187
189
- mp_integer i;
190
- if (!to_integer (constant_expr, i))
191
- result.data = integer2string (i);
188
+ result.data = integer2string (integer_value);
192
189
}
193
190
else if (type.id () == ID_c_enum_tag)
194
191
{
You can’t perform that action at this time.
0 commit comments