public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Eric Botcazou <ebotcazou@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-1044] Remove stalled TREE_READONLY flag on automatic variable Date: Tue, 25 May 2021 16:32:12 +0000 (GMT) [thread overview] Message-ID: <20210525163212.947AA393C846@sourceware.org> (raw) https://gcc.gnu.org/g:fd97aeb494cdcffe0d21e7f15ab4593662e065bd commit r12-1044-gfd97aeb494cdcffe0d21e7f15ab4593662e065bd Author: Eric Botcazou <ebotcazou@adacore.com> Date: Tue May 25 18:30:29 2021 +0200 Remove stalled TREE_READONLY flag on automatic variable gcc/ * gimplify.c (gimplify_decl_expr): Clear TREE_READONLY on the DECL when really creating an initialization statement for it. Diff: --- gcc/gimplify.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/gimplify.c b/gcc/gimplify.c index b62ea0efc1c..ed825a93aa1 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -1828,6 +1828,9 @@ gimplify_decl_expr (tree *stmt_p, gimple_seq *seq_p) init = build2 (INIT_EXPR, void_type_node, decl, init); gimplify_and_add (init, seq_p); ggc_free (init); + /* Clear TREE_READONLY if we really have an initialization. */ + if (!DECL_INITIAL (decl)) + TREE_READONLY (decl) = 0; } else /* We must still examine initializers for static variables
reply other threads:[~2021-05-25 16:32 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=20210525163212.947AA393C846@sourceware.org \ --to=ebotcazou@gcc.gnu.org \ --cc=gcc-cvs@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: linkBe 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).