From: Jason Merrill <jason@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: [C++ PATCH] Fix cp_fold dropping TREE_THIS_VOLATILE flag (PR c++/71372)
Date: Thu, 02 Jun 2016 15:15:00 -0000 [thread overview]
Message-ID: <CADzB+2=+DW3=+W6dYNXeG-iPHd2Dccpb86_dxXZ6FVKKx56P=A@mail.gmail.com> (raw)
In-Reply-To: <20160602121327.GD28550@tucnak.redhat.com>
On Thu, Jun 2, 2016 at 8:13 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> When cp_fold is called on INDIRECT_REF and ARRAY*_REF and any of the
> arguments change in the recursive calls, we fail to copy TREE_THIS_VOLATILE
> flag.
>
> PR c++/71372
> * cp-gimplify.c (cp_fold): For INDIRECT_REF, if the folded expression
> is INDIRECT_REF or MEM_REF, copy over TREE_READONLY, TREE_SIDE_EFFECTS
> and TREE_THIS_VOLATILE flags. For ARRAY_REF and ARRAY_RANGE_REF, copy
> over TREE_READONLY, TREE_SIDE_EFFECTS and TREE_THIS_VOLATILE flags
> to the newly built tree.
Hmm, maybe we should be using build_indirect_ref and build_array_ref.
Or perhaps factor the simple build and set flags out of
cp_build_indirect_ref and call that.
If you don't feel like making that change, the patch is also OK as is.
Jason
next prev parent reply other threads:[~2016-06-02 15:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 12:13 Jakub Jelinek
2016-06-02 15:15 ` Jason Merrill [this message]
2016-06-02 15:31 ` Jakub Jelinek
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='CADzB+2=+DW3=+W6dYNXeG-iPHd2Dccpb86_dxXZ6FVKKx56P=A@mail.gmail.com' \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
/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).