public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jwjagersma at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107280] New: ICE: tree check: expected constructor, have view_convert_expr in cxx_eval_store_expression, at cp/constexpr.cc:5928 Date: Sun, 16 Oct 2022 19:16:59 +0000 [thread overview] Message-ID: <bug-107280-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107280 Bug ID: 107280 Summary: ICE: tree check: expected constructor, have view_convert_expr in cxx_eval_store_expression, at cp/constexpr.cc:5928 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jwjagersma at gmail dot com Target Milestone: --- Created attachment 53710 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53710&action=edit output from -freport-bug Ran into this today, while trying to do some basic string manipulation: $ cat ~/ice.cpp struct string { char str[8] = " "; const char* data() { return str; } }; template<bool a, bool b> consteval string test() { string str { }; char* p = str.str; auto append = [&p](const char* s) { while (*s != '\0') *p++ = *s++; ++p; }; if (a) append("abc"); if (b) append("xyz"); return str; } auto f() { return test<true,true>(); } $ g++ -std=c++20 ~/ice.cpp /home/jw/ice.cpp: In function 'auto f()': /home/jw/ice.cpp:24:34: in 'constexpr' expansion of 'test<true, true>()' /home/jw/ice.cpp:19:16: in 'constexpr' expansion of 'append.test<true, true>()::<lambda(const char*)>(((const char*)"abc"))' /home/jw/ice.cpp:24:34: internal compiler error: tree check: expected constructor, have view_convert_expr in cxx_eval_store_expres sion, at cp/constexpr.cc:5928 24 | auto f() { return test<true,true>(); } | ~~~~~~~~~~~~~~~^~ ...
next reply other threads:[~2022-10-16 19:16 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-16 19:16 jwjagersma at gmail dot com [this message] 2022-10-17 11:42 ` [Bug c++/107280] " marxin at gcc dot gnu.org 2022-10-17 20:47 ` mpolacek at gcc dot gnu.org 2023-03-08 22:08 ` [Bug c++/107280] [10/11/12/13 Regression] " mpolacek at gcc dot gnu.org 2023-03-08 22:40 ` mpolacek at gcc dot gnu.org 2023-03-08 22:46 ` mpolacek at gcc dot gnu.org 2023-03-15 18:28 ` cvs-commit at gcc dot gnu.org 2023-03-15 18:29 ` cvs-commit at gcc dot gnu.org 2023-03-15 18:30 ` [Bug c++/107280] [10/11 " mpolacek at gcc dot gnu.org
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-107280-4@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).