Skip to content

Commit 8a3244f

Browse files
committed
use base_name as the suffix instead of the full name
1 parent 733d559 commit 8a3244f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/goto-programs/goto_convert_side_effect.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,11 +315,12 @@ void goto_convertt::remove_post(
315315
{
316316
exprt tmp = op;
317317
std::string suffix = "post";
318-
if (tmp.id() == ID_symbol)
318+
if(auto sym_expr = expr_try_dynamic_cast<symbol_exprt>(tmp))
319319
{
320-
suffix = suffix + "_" + tmp.get(ID_identifier).c_str();
320+
const irep_idt &base_name = ns.lookup(sym_expr->get_identifier()).base_name;
321+
suffix += "_" + id2string(base_name);
321322
}
322-
323+
323324
make_temp_symbol(tmp, suffix, dest, mode);
324325
expr.swap(tmp);
325326
}

0 commit comments

Comments
 (0)