File tree 5 files changed +35
-4
lines changed
regression/goto-cc-file-local
5 files changed +35
-4
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,13 @@ if is_in wall "$ALL_ARGS"; then
47
47
fi
48
48
fi
49
49
50
+ export_flag=" "
51
+ if is_in old-flag " $ALL_ARGS " ; then
52
+ export_flag=" --export-function-local-symbols"
53
+ else
54
+ export_flag=" --export-file-local-symbols"
55
+ fi
56
+
50
57
cnt=0
51
58
for src in ${SRC} ; do
52
59
cnt=$(( cnt + 1 ))
@@ -63,7 +70,7 @@ for src in ${SRC}; do
63
70
64
71
if [[ " ${is_windows} " == " true" ]]; then
65
72
" ${goto_cc} " \
66
- --export-file-local-symbols \
73
+ ${export_flag} \
67
74
--verbosity 10 \
68
75
${wall} \
69
76
${suffix} \
@@ -72,7 +79,7 @@ for src in ${SRC}; do
72
79
73
80
else
74
81
" ${goto_cc} " \
75
- --export-file-local-symbols \
82
+ ${export_flag} \
76
83
--verbosity 10 \
77
84
${wall} \
78
85
${suffix} \
@@ -86,7 +93,7 @@ if is_in final-link "$ALL_ARGS"; then
86
93
rm -f ${OUT_FILE}
87
94
if [[ " ${is_windows} " == " true" ]]; then
88
95
" ${goto_cc} " \
89
- --export-file-local-symbols \
96
+ ${export_flag} \
90
97
--verbosity 10 \
91
98
${wall} \
92
99
${suffix} \
@@ -95,7 +102,7 @@ if is_in final-link "$ALL_ARGS"; then
95
102
96
103
else
97
104
" ${goto_cc} " \
98
- --export-file-local-symbols \
105
+ ${export_flag} \
99
106
--verbosity 10 \
100
107
${wall} \
101
108
${suffix} \
Original file line number Diff line number Diff line change
1
+ static int foo ()
2
+ {
3
+ return 1 ;
4
+ }
Original file line number Diff line number Diff line change
1
+ int __CPROVER_file_local_foo_c_foo ();
2
+
3
+ int main ()
4
+ {
5
+ int x = __CPROVER_file_local_foo_c_foo ();
6
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ final-link assertion-check old-flag
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ ^VERIFICATION SUCCESSFUL$
7
+ ^The `--export-function-local-symbols` flag is deprecated. Please use `--export-file-local-symbols` instead.$
8
+ --
9
+ ^warning: ignoring
10
+ ^\*\*\*\* WARNING: no body for function
11
+ --
12
+ Check that goto-cc emits a warning when using the old command line flag
Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ const char *goto_cc_options_without_argument[]=
53
53
" --validate-goto-model" ,
54
54
" -?" ,
55
55
" --export-file-local-symbols" ,
56
+ // This is deprecated. Currently prints out a deprecation warning.
57
+ " --export-function-local-symbols" ,
56
58
nullptr
57
59
};
58
60
You can’t perform that action at this time.
0 commit comments