Skip to content

Commit a736488

Browse files
author
Enrico Steffinlongo
committed
Add regression test for missing lowering in new SMT backend
1 parent 7727009 commit a736488

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include <assert.h>
2+
#include <stdint.h>
3+
4+
struct F
5+
{
6+
uint16_t w;
7+
uint16_t x;
8+
};
9+
10+
static struct F a = {0xdeadbeef};
11+
static struct F b = {0xbeefdead};
12+
13+
int main()
14+
{
15+
struct F *p;
16+
if(nondet_int())
17+
p = &a;
18+
else
19+
p = &b;
20+
21+
assert(p->w != 0xdead);
22+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
struct_static_init.c
3+
4+
Passing problem to incremental SMT2 solving
5+
line \d+ assertion p->w != 0xdead: FAILURE
6+
^EXIT=10$
7+
^SIGNAL=0$
8+
--
9+
--
10+
Test that statically initialised variables of struct type (whose values are
11+
stored in the symbolt_table) are lowered correctly.

0 commit comments

Comments
 (0)