public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5255] c++: is_this_parameter and coroutines proxies
@ 2021-11-15  7:52 Jason Merrill
  0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2021-11-15  7:52 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:daa9c6b015a33fa98af0ee7cd6919120248ab5f9

commit r12-5255-gdaa9c6b015a33fa98af0ee7cd6919120248ab5f9
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 60e0982cc48..15404426bce 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -11382,7 +11382,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;
 }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-15  7:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15  7:52 [gcc r12-5255] c++: is_this_parameter and coroutines proxies Jason Merrill

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).