File tree Expand file tree Collapse file tree 3 files changed +33
-3
lines changed
regression/cbmc/empty_compound_type4 Expand file tree Collapse file tree 3 files changed +33
-3
lines changed Original file line number Diff line number Diff line change 1+ struct empty
2+ {
3+ };
4+
5+ struct non_empty
6+ {
7+ int x ;
8+ };
9+
10+ union U
11+ {
12+ struct empty e ;
13+ struct non_empty n ;
14+ };
15+
16+ int main ()
17+ {
18+ union U u ;
19+ struct empty e = u .e ;
20+ __CPROVER_assert (0 , "dummy assertion" );
21+ }
Original file line number Diff line number Diff line change 1+ CORE broken-smt-backend
2+ main.c
3+ --trace
4+ ^VERIFICATION FAILED$
5+ ^EXIT=10$
6+ ^SIGNAL=0$
7+ --
8+ ^warning: ignoring
9+ Invariant check failed
10+ --
11+ Byte-extracting (which is what union operations yield) an empty struct should
12+ not result in a conversion warning in the flattening back-end.
Original file line number Diff line number Diff line change @@ -59,9 +59,6 @@ bvt boolbvt::convert_byte_extract(const byte_extract_exprt &expr)
5959 }
6060 #endif
6161
62- if (width==0 )
63- return conversion_failed (expr);
64-
6562 // see if the byte number is constant and within bounds, else work from the
6663 // root object
6764 const auto op_bytes_opt = pointer_offset_size (expr.op ().type (), ns);
You can’t perform that action at this time.
0 commit comments