Skip to content

Commit e3eb9c4

Browse files
committed
add a test for a union with a large array
This test asserts that unions with large array members work. This works fine with the internal bitvector encoder, but the current SMT encoding hangs.
1 parent 584c24f commit e3eb9c4

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#define LARGE 100000
2+
3+
// This is to test the efficiency of unions that contain a large array.
4+
union U
5+
{
6+
char large_array[LARGE];
7+
int something_else;
8+
};
9+
10+
int main()
11+
{
12+
union U u;
13+
u.something_else = 1234;
14+
__CPROVER_assert(0, "should fail");
15+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE broken-smt-backend
2+
union_large_array.c
3+
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^\[main\.assertion\.1\] line \d+ should fail: FAILURE$
7+
^\*\* 1 of 1 failed
8+
^VERIFICATION FAILED$
9+
--
10+
^warning: ignoring
11+
--

0 commit comments

Comments
 (0)