public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@acm.org>
To: Patrick Palka <ppalka@redhat.com>, gcc-patches@gcc.gnu.org
Cc: jason@redhat.com
Subject: Re: [PATCH] c++ modules: ICE with class NTTP argument [PR100616]
Date: Thu, 22 Sep 2022 15:13:36 -0400	[thread overview]
Message-ID: <91a5a188-c4f2-39ff-fff4-8a667f515a19@acm.org> (raw)
In-Reply-To: <20220922182502.3218391-1-ppalka@redhat.com>

On 9/22/22 14:25, Patrick Palka wrote:

> index 80467c19254..722b64793ed 100644
> --- a/gcc/cp/decl.cc
> +++ b/gcc/cp/decl.cc
> @@ -18235,9 +18235,11 @@ maybe_register_incomplete_var (tree var)
>   	{
>   	  /* When the outermost open class is complete we can resolve any
>   	     pointers-to-members.  */
> -	  tree context = outermost_open_class ();
> -	  incomplete_var iv = {var, context};
> -	  vec_safe_push (incomplete_vars, iv);
> +	  if (tree context = outermost_open_class ())
> +	    {
> +	      incomplete_var iv = {var, context};
> +	      vec_safe_push (incomplete_vars, iv);
> +	    }

My immediate thought here is eek!  during stream in, the 
outermost_open_class could be anything -- to do with the context that 
wanted to lookup of the thing being streamed in, right?  So, the above 
change is I think just papering over a problem in this case.

not sure how to approach this.

nathan

-- 
Nathan Sidwell


  reply	other threads:[~2022-09-22 19:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 18:25 Patrick Palka
2022-09-22 19:13 ` Nathan Sidwell [this message]
2022-09-23 13:32   ` Patrick Palka
2022-09-26 14:08     ` Nathan Sidwell
2022-09-26 14:46       ` Nathan Sidwell
2022-09-26 18:26         ` Patrick Palka
2022-09-26 19:05           ` Patrick Palka
2022-09-27 11:49             ` Nathan Sidwell
2022-09-28 14:42               ` Patrick Palka
2022-09-28 20:51                 ` Nathan Sidwell

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=91a5a188-c4f2-39ff-fff4-8a667f515a19@acm.org \
    --to=nathan@acm.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --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).