Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions regression/cbmc/integer-assignments1/integer-typecheck.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CORE
main.c
--show-goto-functions
^[[:space:]]*ASSIGN main::1::b := main::1::b \* cast\(100, ℤ\)$
^EXIT=0$
^SIGNAL=0$
--
^[[:space:]]*ASSIGN main::1::b := main::1::b \* 100$
--
implicit_typecast_arithmetic previously failed to insert a typecast for the
(mathematical) integer-typed expression. This resulted in a multiplication over
mixed types, which sometimes (!) resulted in an invariant failure during
simplification. This was first observed when compiling with GCC 10, cf.
discussion in #6028.
1 change: 1 addition & 0 deletions regression/validate-trace-xml-schema/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
['xml-interface1', 'test.desc'],
['xml-interface1', 'test_wrong_flag.desc'],
# these want --show-goto-functions instead of producing a trace
['integer-assignments1', 'integer-typecheck.desc'],
['destructors', 'compound_literal.desc'],
['destructors', 'enter_lexical_block.desc'],
['reachability-slice-interproc2', 'test.desc'],
Expand Down
2 changes: 2 additions & 0 deletions src/ansi-c/c_typecast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ c_typecastt::c_typet c_typecastt::get_c_type(

return get_c_type(new_type);
}
else if(type.id() == ID_integer)
return INTEGER;

return OTHER;
}
Expand Down