File tree Expand file tree Collapse file tree 7 files changed +42
-11
lines changed
Expand file tree Collapse file tree 7 files changed +42
-11
lines changed Original file line number Diff line number Diff line change 1- CORE broken-smt-backend
1+ CORE
22link1.c
33link2.c
44^EXIT=0$
Original file line number Diff line number Diff line change 1+ #include "supp.h"
2+ #include <assert.h>
3+
4+ int main ()
5+ {
6+ int entry = A [1 ];
7+ assert (entry == 42 );
8+ return 0 ;
9+ }
Original file line number Diff line number Diff line change 1+ #include "supp.h"
2+
3+ int A [2 ] = {0 , 42 };
Original file line number Diff line number Diff line change 1+ #ifndef SUPP_H
2+ #define SUPP_H
3+
4+ extern int A [];
5+
6+ #endif // SUPP_H
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ supp.c
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ \[main.assertion.1\] line [0-9]+ assertion entry == 42: SUCCESS
7+ ^VERIFICATION SUCCESSFUL$
8+ --
9+ ^warning: ignoring
Original file line number Diff line number Diff line change 55goto_cc=$1
66cbmc=$2
77is_windows=$3
8- entry_point=' generated_entry_function'
98
109main=${*: $# }
1110main=${main% .c}
1211args=${*: 4: $# -4}
1312next=${args% .c}
1413
1514if [[ " ${is_windows} " == " true" ]]; then
16- $goto_cc " ${main} .c"
17- $goto_cc " ${next} .c"
18- mv " ${main} .exe" " ${main} .gb"
19- mv " ${next} .exe" " ${next} .gb"
15+ $goto_cc /c " ${main} .c" " /Fo${main} .gb"
16+ $goto_cc /c " ${next} .c" " /Fo${next} .gb"
17+ $goto_cc " ${main} .gb" " ${next} .gb" " /Fefinal.gb"
2018else
21- $goto_cc -o " ${main} .gb" " ${main} .c"
22- $goto_cc -o " ${next} .gb" " ${next} .c"
19+ $goto_cc -c -o " ${main} .gb" " ${main} .c"
20+ $goto_cc -c -o " ${next} .gb" " ${next} .c"
21+ $goto_cc " ${main} .gb" " ${next} .gb" -o " final.gb"
2322fi
2423
25- $cbmc " ${main} .gb " " ${next} .gb"
24+ $cbmc " final .gb"
Original file line number Diff line number Diff line change @@ -36,8 +36,13 @@ bool casting_replace_symbolt::replace_symbol_expr(symbol_exprt &s) const
3636
3737 const exprt &e = it->second ;
3838
39- typet type = s.type ();
40- static_cast <exprt &>(s) = typecast_exprt::conditional_cast (e, type);
39+ if (e.type ().id () != ID_array)
40+ {
41+ typet type = s.type ();
42+ static_cast <exprt &>(s) = typecast_exprt::conditional_cast (e, type);
43+ }
44+ else
45+ static_cast <exprt &>(s) = e;
4146
4247 return false ;
4348}
You can’t perform that action at this time.
0 commit comments