Skip to content

Commit c68080a

Browse files
author
Daniel Kroening
committed
test for signature conflict with undeclared function
1 parent 8425bf4 commit c68080a

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

regression/cbmc/return6/f_def.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
unsigned f()
2+
{
3+
return 0x34;
4+
}

regression/cbmc/return6/main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <assert.h>
2+
3+
// Do not declare f().
4+
// This is invalid from C99 upwards, but kind of ok before.
5+
6+
int main()
7+
{
8+
int return_value;
9+
return_value=f();
10+
assert(return_value==0x34);
11+
}

regression/cbmc/return6/test.desc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
main.c
3+
f_def.c
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring

0 commit comments

Comments
 (0)