aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2021-08-11 15:31:32 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2021-08-11 15:34:15 +0200
commitcecdff844ac3a4a1790794ce4aa17d7fa50ee3eb (patch)
treea9718425b70cab250dd9fca4e2fcbe1316953941
parent9851a1631f2915fafdc733539b6c8b5fb81e7ae5 (diff)
Small tweak to expand_used_vars
This completes the replacement of DECL_ATTRIBUTES (current_function_decl) with the attribs local variable. gcc/ * cfgexpand.c (expand_used_vars): Reuse attribs local variable.
-rw-r--r--gcc/cfgexpand.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 818328071db..03260b019e5 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -2294,22 +2294,19 @@ expand_used_vars (bitmap forced_stack_vars)
if (gen_stack_protect_signal
|| cfun->calls_alloca
|| has_protected_decls
- || lookup_attribute ("stack_protect",
- DECL_ATTRIBUTES (current_function_decl)))
+ || lookup_attribute ("stack_protect", attribs))
create_stack_guard ();
break;
case SPCT_FLAG_DEFAULT:
if (cfun->calls_alloca
|| has_protected_decls
- || lookup_attribute ("stack_protect",
- DECL_ATTRIBUTES (current_function_decl)))
+ || lookup_attribute ("stack_protect", attribs))
create_stack_guard ();
break;
case SPCT_FLAG_EXPLICIT:
- if (lookup_attribute ("stack_protect",
- DECL_ATTRIBUTES (current_function_decl)))
+ if (lookup_attribute ("stack_protect", attribs))
create_stack_guard ();
break;