public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jason Merrill <jason@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r11-9345] c++: is_this_parameter and coroutines proxies
Date: Wed,  1 Dec 2021 03:11:30 +0000 (GMT)	[thread overview]
Message-ID: <20211201031130.A4E1A3858C60@sourceware.org> (raw)

https://gcc.gnu.org/g:047b700fb08dfdc6c8ce2ae6554822cac0cd85b5

commit r11-9345-g047b700fb08dfdc6c8ce2ae6554822cac0cd85b5
Author: Jason Merrill <jason@redhat.com>
Date:   Sat Nov 13 17:16:46 2021 -0500

    c++: is_this_parameter and coroutines proxies
    
    Compiling coroutines/pr95736.C with the implicit constexpr patch broke
    because is_this_parameter didn't recognize the coroutines proxy for 'this'.
    
    gcc/cp/ChangeLog:
    
            * semantics.c (is_this_parameter): Check DECL_HAS_VALUE_EXPR_P
            instead of is_capture_proxy.

Diff:
---
 gcc/cp/semantics.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 6da30d12c53..9dc10e7d759 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -10669,7 +10669,8 @@ is_this_parameter (tree t)
 {
   if (!DECL_P (t) || DECL_NAME (t) != this_identifier)
     return false;
-  gcc_assert (TREE_CODE (t) == PARM_DECL || is_capture_proxy (t)
+  gcc_assert (TREE_CODE (t) == PARM_DECL
+	      || (TREE_CODE (t) == VAR_DECL && DECL_HAS_VALUE_EXPR_P (t))
 	      || (cp_binding_oracle && TREE_CODE (t) == VAR_DECL));
   return true;
 }


                 reply	other threads:[~2021-12-01  3:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20211201031130.A4E1A3858C60@sourceware.org \
    --to=jason@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /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).