Skip to content

Commit 96e2a84

Browse files
committed
Fixed the issue with a single static function in a translation unit selected as the entry point and changed the tests to CORE rather than KNOWNBUG
1 parent 18b33b8 commit 96e2a84

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

regression/ansi-c/static1/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
static int fun(int a)
2+
{
3+
return a+1;
4+
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
KNOWNBUG
1+
CORE
22
main.c
33
--function fun
44
^EXIT=0$
55
^SIGNAL=0$
6-
^VERIFICATION SUCCESSFUL$
76
--
87
^warning: ignoring
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
KNOWNBUG
1+
CORE
22
main.c
33

44
^EXIT=0$
55
^SIGNAL=0$
6-
^VERIFICATION SUCCESSFUL$
76
--
87
^warning: ignoring

regression/ansi-c/static_inline2/main.c

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/linking/remove_internal_symbols.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Author: Daniel Kroening
1111
#include <util/find_symbols.h>
1212
#include <util/std_types.h>
1313
#include <util/cprover_prefix.h>
14+
#include <util/config.h>
1415

1516
#include "remove_internal_symbols.h"
1617

@@ -149,7 +150,8 @@ void remove_internal_symbols(
149150
else if(is_function)
150151
{
151152
// body? not local (i.e., "static")?
152-
if(has_body && !is_file_local)
153+
if(has_body &&
154+
(!is_file_local || (config.main==symbol.name.c_str())))
153155
get_symbols_rec(ns, symbol, exported);
154156
}
155157
else

0 commit comments

Comments
 (0)