Skip to content

Commit a5f66f7

Browse files
author
Daniel Kroening
committed
simple test for mismatching return types accross compilation units
1 parent 0e695d0 commit a5f66f7

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
KNOWNBUG
2+
return_type1.c
3+
return_type2.c
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring
9+
--
10+
Note issue #3081
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include <assert.h>
2+
3+
struct S
4+
{
5+
int i;
6+
};
7+
8+
struct S *function();
9+
10+
int main()
11+
{
12+
assert(function() != 0);
13+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
struct S
2+
{
3+
int i;
4+
int j; // extra member
5+
} some_var;
6+
7+
struct S *function()
8+
{
9+
return &some_var;
10+
}

0 commit comments

Comments
 (0)