* Small tweak to expand_used_vars
@ 2021-08-11 13:34 Eric Botcazou
0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2021-08-11 13:34 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 306 bytes --]
This completes the replacement of DECL_ATTRIBUTES (current_function_decl) with
the attribs local variable.
Tested on x86-64/Linux, applied on the mainline as obvious.
2021-08-11 Eric Botcazuo <ebotcazou@adacore.com>
* cfgexpand.c (expand_used_vars): Reuse attribs local variable.
--
Eric Botcazou
[-- Attachment #2: p.diff --]
[-- Type: text/x-patch, Size: 952 bytes --]
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-11 13:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11 13:34 Small tweak to expand_used_vars Eric Botcazou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).