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
2
2
link1.c
3
3
link2.c
4
4
^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 5
5
goto_cc=$1
6
6
cbmc=$2
7
7
is_windows=$3
8
- entry_point=' generated_entry_function'
9
8
10
9
main=${*: $# }
11
10
main=${main% .c}
12
11
args=${*: 4: $# -4}
13
12
next=${args% .c}
14
13
15
14
if [[ " ${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"
20
18
else
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"
23
22
fi
24
23
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
36
36
37
37
const exprt &e = it->second ;
38
38
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;
41
46
42
47
return false ;
43
48
}
You can’t perform that action at this time.
0 commit comments