From: Jason Merrill <jason@redhat.com>
To: Patrick Palka <ppalka@redhat.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] c++: another build_new_1 folding fix [PR111929]
Date: Wed, 25 Oct 2023 15:37:25 -0400 [thread overview]
Message-ID: <63c776e5-df5e-4ed0-87eb-05e29f1bf257@redhat.com> (raw)
In-Reply-To: <20231025160345.358175-1-ppalka@redhat.com>
On 10/25/23 12:03, Patrick Palka wrote:
> Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look
> OK for trunk?
>
> -- >8 --
>
> We also need to avoid folding 'outer_nelts_check' when in a template
> context to prevent an ICE on the below testcase. This patch achieves
> this by replacing the fold_build2 call with build2 (cp_fully_fold will
> later fold the overall expression if appropriate).
>
> In passing, this patch removes an unnecessary call to convert on 'nelts'
> since it should always already be a size_t (and 'convert' isn't the best
> conversion entry point to use anyway since it doesn't take a complain
> parameter.)
>
> PR c++/111929
>
> gcc/cp/ChangeLog:
>
> * init.cc (build_new_1): Remove unnecessary call to convert
> on 'nelts'.
OK.
> Use build2 instead of fold_build2 for 'outer_nelts_checks'.
Also OK, but can we skip that whole block when processing_template_decl?
Seems no point to build runtime checks.
Jason
prev parent reply other threads:[~2023-10-25 19:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-25 16:03 Patrick Palka
2023-10-25 19:37 ` Jason Merrill [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=63c776e5-df5e-4ed0-87eb-05e29f1bf257@redhat.com \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=ppalka@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).