public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "public.melg8 at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98056] coroutines: ICE tree check: expected record_type or union_type or qual_union_type, have array_type since r11-2183-g0f66b8486cea8668 Date: Thu, 09 May 2024 21:01:43 +0000 [thread overview] Message-ID: <bug-98056-4-1ClrvbAh5J@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-98056-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98056 melg melg <public.melg8 at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |public.melg8 at gmail dot com --- Comment #26 from melg melg <public.melg8 at gmail dot com> --- I think i found regression of this bug. Or maybe similar type of bug, but with slightly different reproducible. Using std::vector as container and std::string as elements of vector, when you take std::vector<std::string> as argument by value to the coroutine and on call side initialize that argument with single std::string value using initializer list - you get ICE. Affected versions (tested on godbolt.org): x86-64 gcc: - 11.1, 11.2, 11.4 - 12.3 - 13.1, 13.2 Luckily 14.1 version of gcc doesn't have this error. Minimal reproducer online: https://godbolt.org/z/drnf3PWsY Compilation flags: "-std=c++20" Minimal reproducer source code: #include <coroutine> #include <vector> #include <string> auto use_vector_of_strings(std::vector<std::string> values) { struct awaitable { bool await_ready() { return false; } void await_suspend(std::coroutine_handle<> h) { h.resume(); } void await_resume() {} }; return awaitable{}; } struct task { struct promise_type { task get_return_object() { return {}; } std::suspend_never initial_suspend() { return {}; } std::suspend_never final_suspend() noexcept { return {}; } void return_void() {} void unhandled_exception() {} }; }; task string_test_1() { std::string test = "hello"; co_await use_vector_of_strings({test}); // ICE here. } task string_test_2() { std::string test = "hello"; std::vector<std::string> container{test}; // No problem here. co_await use_vector_of_strings(container); // No problem here. } int main() { string_test_1(); string_test_2(); } ICE error message: <source>: In function 'task string_test_1()': <source>:29:1: internal compiler error: in build_special_member_call, at cp/call.cc:11093 29 | } | ^ 0x1ce62bc internal_error(char const*, ...) ???:0 0x71ee4d fancy_abort(char const*, int, char const*) ???:0 0x10f5a63 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*)) ???:0 0x10f5a63 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*)) ???:0
prev parent reply other threads:[~2024-05-09 21:01 UTC|newest] Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-29 20:15 [Bug c++/98056] New: internal compiler error: tree check: expected record_type or union_type or qual_union_type, have array_type in build_special_member_call, at cp/call.c:9862 lemourin at gmail dot com 2020-11-29 20:17 ` [Bug c++/98056] " lemourin at gmail dot com 2020-11-30 8:38 ` marxin at gcc dot gnu.org 2020-11-30 10:09 ` [Bug c++/98056] ICE tree check: expected record_type or union_type or qual_union_type, have array_type in build_special_member_call, at cp/call.c:9862 since r11-2183-g0f66b8486cea8668 marxin at gcc dot gnu.org 2021-03-06 9:52 ` nilsgladitz at gmail dot com 2021-03-06 10:04 ` iains at gcc dot gnu.org 2021-03-30 13:13 ` iains at gcc dot gnu.org 2021-04-08 12:02 ` rguenth at gcc dot gnu.org 2021-04-23 15:47 ` jakub at gcc dot gnu.org 2021-06-19 11:21 ` iains at gcc dot gnu.org 2021-07-12 9:01 ` iains at gcc dot gnu.org 2021-08-16 8:11 ` iains at gcc dot gnu.org 2021-09-30 20:18 ` iains at gcc dot gnu.org 2021-10-06 10:56 ` [Bug c++/98056] coroutines: ICE tree check: expected record_type or union_type or qual_union_type, have array_type " avi@cloudius-systems.com 2021-10-06 11:48 ` iains at gcc dot gnu.org 2021-10-25 11:41 ` iains at gcc dot gnu.org 2021-12-06 14:56 ` iains at gcc dot gnu.org 2022-03-20 12:25 ` sks_f at mail dot ru 2022-04-18 19:05 ` iains at gcc dot gnu.org 2022-06-28 10:42 ` jakub at gcc dot gnu.org 2022-07-05 11:36 ` charles at yubo dot live 2023-03-15 22:29 ` cvs-commit at gcc dot gnu.org 2023-03-15 23:03 ` avi at scylladb dot com 2023-04-18 20:45 ` cvs-commit at gcc dot gnu.org 2023-04-22 0:22 ` cvs-commit at gcc dot gnu.org 2023-07-07 9:14 ` rguenth at gcc dot gnu.org 2024-05-09 21:01 ` public.melg8 at gmail dot com [this message]
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=bug-98056-4-1ClrvbAh5J@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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: linkBe 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).