File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
regression/cbmc-incr-smt2/structs Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include <assert.h>
2
+ #include <stdint.h>
3
+
4
+ struct my_struct_type
5
+ {
6
+ int16_t a ;
7
+ int16_t b ;
8
+ };
9
+
10
+ int main ()
11
+ {
12
+ int16_t nondet ;
13
+ struct my_struct_type my_struct ;
14
+ if (nondet == 3 )
15
+ my_struct .a = 10 ;
16
+ else
17
+ my_struct .a = 12 ;
18
+ struct my_struct_type struct_copy ;
19
+ struct_copy = my_struct ;
20
+ assert (my_struct .b != 30 || struct_copy .a != 10 );
21
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ simple.c
3
+ --trace
4
+ Passing problem to incremental SMT2 solving
5
+ line 20 assertion my_struct.b != 30 || struct_copy.a != 10: FAILURE
6
+ nondet=3
7
+ struct_copy.a=10
8
+ struct_copy.b=30
9
+ ^EXIT=10$
10
+ ^SIGNAL=0$
11
+ --
12
+ --
13
+ Test that we support struct values and traces for a trivial example. At the
14
+ time of adding the regression test, this exercised the conversion code specific
15
+ to struct_tag_typet and struct_exprt. Field sensitivity is expected to eliminate
16
+ many of the struct specific expressions before they can reach the decision
17
+ procedure with this simple example.
You can’t perform that action at this time.
0 commit comments