aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-low.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gimple-low.c')
-rw-r--r--gcc/gimple-low.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index c5a16ac..424ad55 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -991,7 +991,9 @@ lower_builtin_setjmp (gimple_stmt_iterator *gsi)
void
record_vars_into (tree vars, tree fn)
{
- if (fn != current_function_decl)
+ bool change_cfun = fn != current_function_decl;
+
+ if (change_cfun)
push_cfun (DECL_STRUCT_FUNCTION (fn));
for (; vars; vars = DECL_CHAIN (vars))
@@ -1011,7 +1013,7 @@ record_vars_into (tree vars, tree fn)
add_local_decl (cfun, var);
}
- if (fn != current_function_decl)
+ if (change_cfun)
pop_cfun ();
}