From: Jason Merrill Date: Sat, 13 Nov 2021 22:16:46 +0000 (-0500) Subject: c++: is_this_parameter and coroutines proxies X-Git-Tag: basepoints/gcc-13~3058 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=daa9c6b015a33fa98af0ee7cd6919120248ab5f9;p=thirdparty%2Fgcc.git 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 --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 60e0982cc480..15404426bce6 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; }