Skip to content

Commit 122afe8

Browse files
Thomas Kileythomasspriggs
authored andcommitted
Add test for checking when no size parameter specified correct type is used
To ensure that the issue is fixed.
1 parent ebc78fe commit 122afe8

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
void test(signed int *arr)
2+
{
3+
arr[0l] = 5;
4+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
example.c
3+
--harness-type call-function --function test --treat-pointer-as-array arr
4+
VERIFICATION SUCCESSFUL
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
type_constructor_ptr_int\(0, &arr, \(signed int \*\)\(void \*\)0\);
8+
--
9+
incompatible pointer types
10+
--
11+
Ensure that the function pointer types match

0 commit comments

Comments
 (0)