From: Eric Botcazou <botcazou@adacore.com>
To: gcc-patches@gcc.gnu.org
Subject: Small tweak to expand_used_vars
Date: Wed, 11 Aug 2021 15:34:59 +0200 [thread overview]
Message-ID: <5639994.MhkbZ0Pkbq@arcturus> (raw)
[-- 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;
reply other threads:[~2021-08-11 13:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5639994.MhkbZ0Pkbq@arcturus \
--to=botcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).