Skip to content

Commit 4d1197b

Browse files
committed
KNOWNBUG test for goto-symex' auto-objects feature
This code partly works, though perhaps not quite as intended. The test may serve as basis of discussion for how it actually should work.
1 parent e333b4c commit 4d1197b

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

regression/cbmc/auto_objects1/main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
int main()
2+
{
3+
int x;
4+
int **auto_object_source1;
5+
if(*auto_object_source1) // triggers creating an auto object
6+
{
7+
*auto_object_source1 = &x; // should use the auto object
8+
**auto_object_source1 = 42;
9+
__CPROVER_assert(x == 42, "42");
10+
}
11+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
KNOWNBUG
2+
main.c
3+
--program-only
4+
auto_object1#\d+ == &x!0@1
5+
^EXIT=10$
6+
^SIGNAL=0$
7+
--
8+
^warning: ignoring
9+
auto_object_source1\$object#\d+ == &x!0@1
10+
--
11+
Dereferencing should eventually use the generated auto-object instead of the
12+
dereferencing-generated $object.

regression/validate-trace-xml-schema/check.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
['Pointer_Arithmetic19', 'test.desc'],
3838
['Quantifiers-simplify', 'simplify_not_forall.desc'],
3939
['array-cell-sensitivity15', 'test.desc'],
40+
['auto_objects1', 'test.desc'],
4041
['saturating_arithmetric', 'output-formula.desc'],
4142
# these test for invalid command line handling
4243
['bad_option', 'test_multiple.desc'],

0 commit comments

Comments
 (0)