public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105301] New: [12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516
@ 2022-04-18 6:19 asolokha at gmx dot com
2022-04-18 9:47 ` [Bug c++/105301] " iains at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: asolokha at gmx dot com @ 2022-04-18 6:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105301
Bug ID: 105301
Summary: [12 Regression] ICE: tree check: expected tree that
contains 'decl minimal' structure, have 'overload' in
coro_promise_type_found_p, at cp/coroutines.cc:516
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: C++-Coroutine, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
CC: iains at gcc dot gnu.org
Target Milestone: ---
Created attachment 52825
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52825&action=edit
Testcase
g++ 12.0.1 20220417 snapshot (g:000c1b89d259fadb466e1f2e63c79da45fd17372) ICEs
when compiling the attached testcase, reduced from
clang/testsuite/SemaCXX/coroutines.cpp from the clang 14.0.1 test suite, w/
-fcoroutines:
% g++-12.0.1 -fcoroutines -c lvhljakz.cpp
lvhljakz.cpp: In function 'coro<bad_promise_6> bad_implicit_return()':
lvhljakz.cpp:43:21: error: the coroutine promise type
'std::coroutine_traits<coro<bad_promise_6> >::promise_type' {aka
'bad_promise_6'} declares both 'return_value' and 'return_void'
43 | coro<bad_promise_6> bad_implicit_return() { co_await a; }
| ^~~~~~~~~~~~~~~~~~~
lvhljakz.cpp:39:8: note: 'return_void' declared here
39 | void return_void();
| ^~~~~~~~~~~
lvhljakz.cpp:43:54: internal compiler error: tree check: expected tree that
contains 'decl minimal' structure, have 'overload' in
coro_promise_type_found_p, at cp/coroutines.cc:516
43 | coro<bad_promise_6> bad_implicit_return() { co_await a; }
| ^
0x8796d0 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/tree.cc:8972
0x692cd6 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/tree.h:3571
0x692cd6 coro_promise_type_found_p
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/coroutines.cc:516
0x9b2693 finish_co_await_expr(unsigned int, tree_node*)
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/coroutines.cc:1165
0xaf9271 cp_parser_unary_expression
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:8866
0xac7237 cp_parser_binary_expression
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:10035
0xac7e2e cp_parser_assignment_expression
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:10339
0xac991c cp_parser_expression
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:10509
0xacd017 cp_parser_expression_statement
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:12705
0xada2ca cp_parser_statement
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:12501
0xadb45d cp_parser_statement_seq_opt
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:12850
0xadb537 cp_parser_compound_statement
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:12802
0xafc145 cp_parser_function_body
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:25069
0xafc145 cp_parser_ctor_initializer_opt_and_function_body
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:25120
0xafd0fa cp_parser_function_definition_after_declarator
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:31251
0xafe3b8 cp_parser_function_definition_from_specifiers_and_declarator
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:31167
0xafe3b8 cp_parser_init_declarator
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:22591
0xad7ee9 cp_parser_simple_declaration
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:15280
0xb09675 cp_parser_declaration
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:14966
0xb0a039 cp_parser_toplevel_declaration
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:14987
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/105301] [12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516
2022-04-18 6:19 [Bug c++/105301] New: [12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516 asolokha at gmx dot com
@ 2022-04-18 9:47 ` iains at gcc dot gnu.org
2022-04-18 12:36 ` [Bug c++/105301] [11/12 " jakub at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: iains at gcc dot gnu.org @ 2022-04-18 9:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105301
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-04-18
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |iains at gcc dot gnu.org
Status|UNCONFIRMED |NEW
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/105301] [11/12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516
2022-04-18 6:19 [Bug c++/105301] New: [12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516 asolokha at gmx dot com
2022-04-18 9:47 ` [Bug c++/105301] " iains at gcc dot gnu.org
@ 2022-04-18 12:36 ` jakub at gcc dot gnu.org
2022-04-18 14:07 ` iains at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-04-18 12:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105301
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.3
Summary|[12 Regression] ICE: tree |[11/12 Regression] ICE:
|check: expected tree that |tree check: expected tree
|contains 'decl minimal' |that contains 'decl
|structure, have 'overload' |minimal' structure, have
|in |'overload' in
|coro_promise_type_found_p, |coro_promise_type_found_p,
|at cp/coroutines.cc:516 |at cp/coroutines.cc:516
CC| |jakub at gcc dot gnu.org
Priority|P3 |P2
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started to ICE with r11-431-g29f0e90d9904d8e0965443d4da4c95ddde5edb1e in
fold_builtin*, and since r11-4076-gb003c4b14b3f889e6707db68d2c6545eda7a203b
ICEs in checking from coro_promise_type_found_p.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/105301] [11/12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516
2022-04-18 6:19 [Bug c++/105301] New: [12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516 asolokha at gmx dot com
2022-04-18 9:47 ` [Bug c++/105301] " iains at gcc dot gnu.org
2022-04-18 12:36 ` [Bug c++/105301] [11/12 " jakub at gcc dot gnu.org
@ 2022-04-18 14:07 ` iains at gcc dot gnu.org
2022-04-21 7:51 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: iains at gcc dot gnu.org @ 2022-04-18 14:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105301
--- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> ---
candidate patch.
https://gcc.gnu.org/pipermail/gcc-patches/2022-April/593318.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/105301] [11/12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516
2022-04-18 6:19 [Bug c++/105301] New: [12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516 asolokha at gmx dot com
` (2 preceding siblings ...)
2022-04-18 14:07 ` iains at gcc dot gnu.org
@ 2022-04-21 7:51 ` rguenth at gcc dot gnu.org
2022-04-28 12:52 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-21 7:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105301
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.3 |11.4
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.3 is being released, retargeting bugs to GCC 11.4.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/105301] [11/12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516
2022-04-18 6:19 [Bug c++/105301] New: [12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516 asolokha at gmx dot com
` (3 preceding siblings ...)
2022-04-21 7:51 ` rguenth at gcc dot gnu.org
@ 2022-04-28 12:52 ` cvs-commit at gcc dot gnu.org
2022-04-28 13:00 ` [Bug c++/105301] [11 " iains at gcc dot gnu.org
2023-05-29 10:06 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-28 12:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105301
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>:
https://gcc.gnu.org/g:6cae3bb65c873a2191613f7888fe949553a21f9e
commit r12-8309-g6cae3bb65c873a2191613f7888fe949553a21f9e
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Mon Apr 18 09:21:52 2022 +0100
c++, coroutines: Account for overloaded promise return_value() [PR105301].
Whether it was intended or not, it is possible to define a coroutine
promise
with multiple return_value() methods [which need not even have the same
type].
We were not accounting for this possibility in the check to see whether
both
return_value and return_void are specifier (which is prohibited by the
standard). Fixed thus and provided an adjusted diagnostic for the case
that
multiple return_value() methods are present.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
PR c++/105301
gcc/cp/ChangeLog:
* coroutines.cc (coro_promise_type_found_p): Account for possible
mutliple overloads of the promise return_value() method.
gcc/testsuite/ChangeLog:
* g++.dg/coroutines/pr105301.C: New test.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/105301] [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516
2022-04-18 6:19 [Bug c++/105301] New: [12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516 asolokha at gmx dot com
` (4 preceding siblings ...)
2022-04-28 12:52 ` cvs-commit at gcc dot gnu.org
@ 2022-04-28 13:00 ` iains at gcc dot gnu.org
2023-05-29 10:06 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: iains at gcc dot gnu.org @ 2022-04-28 13:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105301
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[11/12 Regression] ICE: |[11 Regression] ICE: tree
|tree check: expected tree |check: expected tree that
|that contains 'decl |contains 'decl minimal'
|minimal' structure, have |structure, have 'overload'
|'overload' in |in
|coro_promise_type_found_p, |coro_promise_type_found_p,
|at cp/coroutines.cc:516 |at cp/coroutines.cc:516
--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> ---
fixed for gcc-12 so far.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/105301] [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516
2022-04-18 6:19 [Bug c++/105301] New: [12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516 asolokha at gmx dot com
` (5 preceding siblings ...)
2022-04-28 13:00 ` [Bug c++/105301] [11 " iains at gcc dot gnu.org
@ 2023-05-29 10:06 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-29 10:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105301
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.4 |11.5
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.4 is being released, retargeting bugs to GCC 11.5.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-05-29 10:06 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18 6:19 [Bug c++/105301] New: [12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516 asolokha at gmx dot com
2022-04-18 9:47 ` [Bug c++/105301] " iains at gcc dot gnu.org
2022-04-18 12:36 ` [Bug c++/105301] [11/12 " jakub at gcc dot gnu.org
2022-04-18 14:07 ` iains at gcc dot gnu.org
2022-04-21 7:51 ` rguenth at gcc dot gnu.org
2022-04-28 12:52 ` cvs-commit at gcc dot gnu.org
2022-04-28 13:00 ` [Bug c++/105301] [11 " iains at gcc dot gnu.org
2023-05-29 10:06 ` jakub 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).