Skip to content

Commit 621fe05

Browse files
authored
Merge pull request #8312 from qinheping/bugfixes/make_going_var_cprover_prefixed
Make `going_to` variable cprover-prefixed
2 parents 52c3dbb + f993f8c commit 621fe05

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Diff for: regression/cbmc/destructors/enter_lexical_block.desc

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ CORE
22
main.c
33
--unwind 10 --show-goto-functions
44
activate-multi-line-match
5-
(?P<comment_block>\/\/ [0-9]+ file main\.c line [0-9]+ function main)[\s]*6: .*newAlloc4 : struct tag-test[\s]*(?P>comment_block)[\s]*.*newAlloc4 := \{ 4 \}[\s]*(?P>comment_block)[\s]*.*newAlloc6 : struct tag-test[\s]*(?P>comment_block)[\s]*.*newAlloc6 := \{ 6 \}[\s]*(?P>comment_block)[\s]*.*newAlloc7 : struct tag-test[\s]*(?P>comment_block)[\s]*.*newAlloc7 := \{ 7 \}[\s]*(?P>comment_block)[\s]*.*DEAD main::1::2::2::newAlloc7[\s]*(?P>comment_block)[\s]*.*DEAD main::1::2::2::newAlloc6[\s]*(?P>comment_block)[\s]*.*DEAD main::1::2::2::newAlloc4[\s]*(?P>comment_block)[\s]*.*ASSIGN going_to::nested_if := true[\s]*(?P>comment_block)[\s]*.*GOTO 3
5+
(?P<comment_block>\/\/ [0-9]+ file main\.c line [0-9]+ function main)[\s]*6: .*newAlloc4 : struct tag-test[\s]*(?P>comment_block)[\s]*.*newAlloc4 := \{ 4 \}[\s]*(?P>comment_block)[\s]*.*newAlloc6 : struct tag-test[\s]*(?P>comment_block)[\s]*.*newAlloc6 := \{ 6 \}[\s]*(?P>comment_block)[\s]*.*newAlloc7 : struct tag-test[\s]*(?P>comment_block)[\s]*.*newAlloc7 := \{ 7 \}[\s]*(?P>comment_block)[\s]*.*DEAD main::1::2::2::newAlloc7[\s]*(?P>comment_block)[\s]*.*DEAD main::1::2::2::newAlloc6[\s]*(?P>comment_block)[\s]*.*DEAD main::1::2::2::newAlloc4[\s]*(?P>comment_block)[\s]*.*ASSIGN __CPROVER_going_to::nested_if := true[\s]*(?P>comment_block)[\s]*.*GOTO 3
66
^EXIT=0$
77
^SIGNAL=0$
88
--
@@ -28,7 +28,7 @@ Checks for:
2828
// 49 file main.c line 39 function main
2929
DEAD main::1::2::2::newAlloc4
3030
// 50 file main.c line 39 function main
31-
ASSIGN going_to::nested_if := true
31+
ASSIGN __CPROVER_going_to::nested_if := true
3232
// 51 file main.c line 39 function main
3333
GOTO 3
3434

Diff for: src/ansi-c/goto-conversion/goto_convert.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -127,27 +127,27 @@ void goto_convertt::build_declaration_hops(
127127
// }
128128
// to code which looks like -
129129
// {
130-
// __CPROVER_bool going_to::user_label;
131-
// going_to::user_label = false;
130+
// __CPROVER_bool __CPROVER_going_to::user_label;
131+
// __CPROVER_going_to::user_label = false;
132132
// statement_block_a();
133133
// if(...)
134134
// {
135-
// going_to::user_label = true;
135+
// __CPROVER_going_to::user_label = true;
136136
// goto scope_x_label;
137137
// }
138138
// statement_block_b();
139139
// scope_x_label:
140140
// int x;
141-
// if going_to::user_label goto scope_y_label:
141+
// if __CPROVER_going_to::user_label goto scope_y_label:
142142
// x = 0;
143143
// statement_block_c();
144144
// scope_y_label:
145145
// int y;
146-
// if going_to::user_label goto user_label:
146+
// if __CPROVER_going_to::user_label goto user_label:
147147
// y = 0;
148148
// statement_block_d();
149149
// user_label:
150-
// going_to::user_label = false;
150+
// __CPROVER_going_to::user_label = false;
151151
// statement_block_e();
152152
// }
153153

@@ -162,7 +162,7 @@ void goto_convertt::build_declaration_hops(
162162
label_location.set_hide();
163163
const symbolt &new_flag = get_fresh_aux_symbol(
164164
bool_typet{},
165-
"going_to",
165+
CPROVER_PREFIX "going_to",
166166
id2string(inputs.label),
167167
label_location,
168168
inputs.mode,

0 commit comments

Comments
 (0)