From: Markus Trippelsdorf <markus@trippelsdorf.de>
To: Patrick Palka <patrick@parcs.ath.cx>
Cc: Richard Biener <richard.guenther@gmail.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Jason Merrill <jason@redhat.com>
Subject: Re: [PATCH] Avoid needless unsharing during constexpr evaluation (PR c++/70452)
Date: Fri, 08 Apr 2016 07:12:00 -0000 [thread overview]
Message-ID: <20160408071201.GA310@x4> (raw)
In-Reply-To: <alpine.DEB.2.20.11.1604061819540.2715@idea>
On 2016.04.06 at 18:25 -0400, Patrick Palka wrote:
> On Wed, 6 Apr 2016, Patrick Palka wrote:
> Here is a safer and simpler approach that just walks the expression
> being unshared to try to find a CONSTRUCTOR node. If it finds one, then
> we unshare the whole expression. Otherwise we return the original
> expression. It should be completely safe to avoid unsharing an
> expression if it contains no CONSTRUCTOR nodes.
>
> gcc/cp/ChangeLog:
>
> PR c++/70452
> * constexpr.c (find_constructor): New function.
> (unshare_constructor): New function.
> (cxx_eval_call_expression): Use unshare_constructor instead of
> unshare_expr.
> (find_array_ctor_elt): Likewise.
> (cxx_eval_vec_init_1): Likewise.
> (cxx_eval_store_expression): Likewise.
> (cxx_eval_constant_expression): Likewise.
This patch causes: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70590
--
Markus
prev parent reply other threads:[~2016-04-08 7:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-06 16:52 Patrick Palka
2016-04-06 17:17 ` Richard Biener
2016-04-06 17:36 ` Patrick Palka
2016-04-06 22:25 ` Patrick Palka
2016-04-07 12:44 ` Jason Merrill
2016-04-08 7:12 ` Markus Trippelsdorf [this message]
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=20160408071201.GA310@x4 \
--to=markus@trippelsdorf.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=patrick@parcs.ath.cx \
--cc=richard.guenther@gmail.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).