public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103319] New: [coroutines] ICE in is_this_parameter, at cp/semantics.c:10672
@ 2021-11-18 16:28 avi@cloudius-systems.com
2021-11-18 16:41 ` [Bug c++/103319] " iains at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: avi@cloudius-systems.com @ 2021-11-18 16:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103319
Bug ID: 103319
Summary: [coroutines] ICE in is_this_parameter, at
cp/semantics.c:10672
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: avi@cloudius-systems.com
Target Milestone: ---
Possibly related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102489
A very large test case gives me this:
distcc[3605276] ERROR: compile /home/avi/scylla/db/commitlog/commitlog.cc on
localhost failed
/home/avi/scylla/db/commitlog/commitlog.cc: In function ‘void
db::commitlog::segment::cycle(bool,
bool)::<lambda()>::operator()(db::commitlog::segment::cycle(bool,
bool)::<lambda()>::_ZZN2db9commitlog7segment5cycleEbbENKUlvE_clEv.frame*)’:
/home/avi/scylla/db/commitlog/commitlog.cc:901:9: internal compiler error: in
is_this_parameter, at cp/semantics.c:10672
901 | }, [&]() -> future<> {
It is accepted by clang.
gcc 12 accepts the code, and gcc 11 with this patch backported:
commit daa9c6b015a33fa98af0ee7cd6919120248ab5f9 (tag: is_this_parameter)
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 --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
@@ -11380,11 +11380,12 @@ float_const_decimal64_p (void)
bool
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;
}
/* Insert the deduced return type for an auto function. */
Also works. Requesting this backport for gcc 11 (I don't know if this is a
regression or not since I'm attempting to migrate from clang).
I don't have a reduced test case. I can try to reduce it, but perhaps knowledge
of the fix will make coming up with a small test case simple.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/103319] [coroutines] ICE in is_this_parameter, at cp/semantics.c:10672
2021-11-18 16:28 [Bug c++/103319] New: [coroutines] ICE in is_this_parameter, at cp/semantics.c:10672 avi@cloudius-systems.com
@ 2021-11-18 16:41 ` iains at gcc dot gnu.org
2021-11-29 11:09 ` avi at scylladb dot com
2021-12-01 18:26 ` jason at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: iains at gcc dot gnu.org @ 2021-11-18 16:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103319
--- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> ---
ah, incidentally, that patch is likely also a fix for 96517.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/103319] [coroutines] ICE in is_this_parameter, at cp/semantics.c:10672
2021-11-18 16:28 [Bug c++/103319] New: [coroutines] ICE in is_this_parameter, at cp/semantics.c:10672 avi@cloudius-systems.com
2021-11-18 16:41 ` [Bug c++/103319] " iains at gcc dot gnu.org
@ 2021-11-29 11:09 ` avi at scylladb dot com
2021-12-01 18:26 ` jason at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: avi at scylladb dot com @ 2021-11-29 11:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103319
--- Comment #2 from Avi Kivity <avi at scylladb dot com> ---
A gentle ping, can we backport this?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/103319] [coroutines] ICE in is_this_parameter, at cp/semantics.c:10672
2021-11-18 16:28 [Bug c++/103319] New: [coroutines] ICE in is_this_parameter, at cp/semantics.c:10672 avi@cloudius-systems.com
2021-11-18 16:41 ` [Bug c++/103319] " iains at gcc dot gnu.org
2021-11-29 11:09 ` avi at scylladb dot com
@ 2021-12-01 18:26 ` jason at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu.org @ 2021-12-01 18:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103319
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
Target Milestone|--- |11.3
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Avi Kivity from comment #2)
> A gentle ping, can we backport this?
Done.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-12-01 18:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 16:28 [Bug c++/103319] New: [coroutines] ICE in is_this_parameter, at cp/semantics.c:10672 avi@cloudius-systems.com
2021-11-18 16:41 ` [Bug c++/103319] " iains at gcc dot gnu.org
2021-11-29 11:09 ` avi at scylladb dot com
2021-12-01 18:26 ` jason at gcc dot gnu.org
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).