public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Matthias Kretz <m.kretz@gsi.de>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] c++: don't ICE on NAMESPACE_DECL inside FUNCTION_DECL
Date: Fri, 17 Dec 2021 15:54:56 -0500	[thread overview]
Message-ID: <fe07dec3-1303-4ff8-ebf1-2467339ba69b@redhat.com> (raw)
In-Reply-To: <6912302.kQq0lBPeGt@excalibur>

On 12/15/21 03:53, Matthias Kretz wrote:
> OK for trunk? This fixes several modules.exp failures for me.

OK.

> ────────────────────── ✂ ──────────────────────
> 
> Code like
>    void swap() {
>      namespace __variant = __detail::__variant;
>      ...
>    }
> create a NAMESPACE_DECL where the CP_DECL_CONTEXT is a FUNCTION_DECL.
> DECL_TEMPLATE_INFO fails on NAMESPACE_DECL and therefore must be handled
> first in the assertion.
> 
> Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
> 
> gcc/cp/ChangeLog:
> 
> 	* module.cc (trees_out::get_merge_kind): NAMESPACE_DECLs also
> 	cannot have a DECL_TEMPLATE_INFO.
> ---
>   gcc/cp/module.cc | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> 
> --
> ──────────────────────────────────────────────────────────────────────────
>   Dr. Matthias Kretz                           https://mattkretz.github.io
>   GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
>   stdₓ::simd
> ──────────────────────────────────────────────────────────────────────────


      reply	other threads:[~2021-12-17 20:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15  8:53 Matthias Kretz
2021-12-17 20:54 ` 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=fe07dec3-1303-4ff8-ebf1-2467339ba69b@redhat.com \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=m.kretz@gsi.de \
    /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).