@@ -64,11 +64,12 @@ static bool check_renaming_l1(const exprt &expr)
64
64
65
65
if (expr.id ()==ID_symbol)
66
66
{
67
+ const auto &type = expr.type ();
67
68
if (!expr.get_bool (ID_C_SSA_symbol))
68
- return expr. type () .id ()!=ID_code ;
69
+ return type. id () != ID_code && type .id () != ID_mathematical_function ;
69
70
if (!to_ssa_expr (expr).get_level_2 ().empty ())
70
71
return true ;
71
- if (to_ssa_expr (expr).get_original_expr ().type ()!=expr. type () )
72
+ if (to_ssa_expr (expr).get_original_expr ().type () != type)
72
73
return true ;
73
74
}
74
75
else
@@ -102,11 +103,12 @@ static bool check_renaming(const exprt &expr)
102
103
}
103
104
else if (expr.id ()==ID_symbol)
104
105
{
106
+ const auto &type = expr.type ();
105
107
if (!expr.get_bool (ID_C_SSA_symbol))
106
- return expr. type () .id ()!=ID_code ;
108
+ return type. id () != ID_code && type .id () != ID_mathematical_function ;
107
109
if (to_ssa_expr (expr).get_level_2 ().empty ())
108
110
return true ;
109
- if (to_ssa_expr (expr).get_original_expr ().type ()!=expr. type () )
111
+ if (to_ssa_expr (expr).get_original_expr ().type () != type)
110
112
return true ;
111
113
}
112
114
else
@@ -337,8 +339,10 @@ exprt goto_symex_statet::rename(exprt expr, const namespacet &ns)
337
339
}
338
340
else if (expr.id ()==ID_symbol)
339
341
{
342
+ const auto &type = as_const (expr).type ();
343
+
340
344
// we never rename function symbols
341
- if (as_const (expr). type () .id () == ID_code )
345
+ if (type. id () == ID_code || type .id () == ID_mathematical_function )
342
346
rename <level>(expr.type (), to_symbol_expr (expr).get_identifier (), ns);
343
347
else
344
348
expr = rename <level>(ssa_exprt{expr}, ns);
0 commit comments