Skip to content

Commit ea74bed

Browse files
committed
Add extra test for nondet-static flag and arrays
This extra test is added to ensure that constant arrays, which are known at compile time, do not produce a NONDET instruction to initialise them at the GOTO level, after we use goto-instrument with the --nondet-static flag.
1 parent 5b6eb00 commit ea74bed

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
int var;
2+
const int arr[] = {10, 20, 30};
3+
4+
int main(void)
5+
{
6+
var = arr[2];
7+
return 0;
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
main.c
3+
--nondet-static
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
arr = NONDET\(const signed int \[3ll\]\)
8+
--

0 commit comments

Comments
 (0)