Skip to content

Commit 18328db

Browse files
author
Daniel Kroening
authored
Merge pull request #3340 from tautschnig/vs-shadow-size
Do not shadow size variable [blocks: #2310]
2 parents 9860050 + b6fcb94 commit 18328db

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/goto-symex/symex_builtin_functions.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void goto_symext::symex_allocate(
127127
if(object_type.id()==ID_array &&
128128
!to_array_type(object_type).size().is_constant())
129129
{
130-
exprt &size=to_array_type(object_type).size();
130+
exprt &array_size = to_array_type(object_type).size();
131131

132132
auxiliary_symbolt size_symbol;
133133

@@ -137,12 +137,12 @@ void goto_symext::symex_allocate(
137137
size_symbol.type=tmp_size.type();
138138
size_symbol.mode = mode;
139139
size_symbol.type.set(ID_C_constant, true);
140-
size_symbol.value = size;
140+
size_symbol.value = array_size;
141141

142142
state.symbol_table.add(size_symbol);
143143

144-
code_assignt assignment(size_symbol.symbol_expr(), size);
145-
size=assignment.lhs();
144+
code_assignt assignment(size_symbol.symbol_expr(), array_size);
145+
array_size = assignment.lhs();
146146

147147
symex_assign(state, assignment);
148148
}

0 commit comments

Comments
 (0)