From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 835153858D3C; Sun, 16 Oct 2022 19:16:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 835153858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665947819; bh=FaiMZjDcdcNFcZTt+iRKBcF9pnrJMkp2yqqig/bN+ac=; h=From:To:Subject:Date:From; b=oV89c8hpU2ZoaVD+t5HkvrbLvKgEGmbx5hoBRTRwEuwoDh1xrq84TeV1ZSV9qAzs8 kL7aOsvZ1OeLN+Oz8UNn33UGP0vagXzNSrzcop1+OH4zpXSxAn3N3lQ4B6Jwk2ohHr ujFbdz807BvcKaHk9O5RySHE/nJ6I30mYN1z8NhE= From: "jwjagersma at gmail dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jwjagersma at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107280 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=3D53710&action=3Dedit output from -freport-bug Ran into this today, while trying to do some basic string manipulation: $ cat ~/ice.cpp struct string { char str[8] =3D " "; const char* data() { return str; } }; template consteval string test() { string str { }; char* p =3D str.str; auto append =3D [&p](const char* s) { while (*s !=3D '\0') *p++ =3D *s++; ++p; }; if (a) append("abc"); if (b) append("xyz"); return str; } auto f() { return test(); } $ g++ -std=3Dc++20 ~/ice.cpp /home/jw/ice.cpp: In function 'auto f()': /home/jw/ice.cpp:24:34: in 'constexpr' expansion of 'test= ()' /home/jw/ice.cpp:19:16: in 'constexpr' expansion of 'append.test()::(((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(); } | ~~~~~~~~~~~~~~~^~ ...=