From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 646513858D28; Fri, 11 Aug 2023 21:21:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 646513858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691788876; bh=qXZZO689LX1UeJpgI7FoggfC2Y/+jVqofMvo+GoEgCQ=; h=From:To:Subject:Date:From; b=xJJacqV0tDlw4DoeW1suFgLCVceJ22KSpjptlvcSW5z4JIfmuU4agkQpV/V/2k5Na daenLPd2Gbz1ZW1ppj8yVKx+m7CP3zfbPb39IRsxtby12i07i2Vw36n2S6JjzH7zts dIwCL4s0y9E7roKQ+9F4jvlEVlDgtmT5Vy2jlOYs= From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110997] New: [13/14 Regression] internal compiler error: in cxx_eval_constant_expression, at cp/constexpr.cc:8005 Date: Fri, 11 Aug 2023 21:21:15 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org 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 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=3D110997 Bug ID: 110997 Summary: [13/14 Regression] internal compiler error: in cxx_eval_constant_expression, at cp/constexpr.cc:8005 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- While workin' on P2564 I found this ICE: // P2564R3 // { dg-do compile { target c++20 } } // From clang's cxx2b-consteval-propagate.cpp. This test ICEd when I worke= d on // P2564. consteval int f (int); struct S { int a =3D 0; int b =3D f (a); }; constexpr bool g (auto i) { S s{i}; return s.b =3D=3D 2 *i; } consteval int f (int i) { return 2 * i; } void test () { static_assert(g(42)); } $ ./cc1plus -quiet -std=3Dc++20 consteval-prop4.C consteval-prop4.C: In instantiation of =E2=80=98constexpr bool g(auto:1) [w= ith auto:1 =3D int]=E2=80=99: consteval-prop4.C:29:18: required from here consteval-prop4.C:16:5: internal compiler error: in cxx_eval_constant_expression, at cp/constexpr.cc:8005 16 | S s{i}; | ^ 0xdb5f20 cxx_eval_constant_expression /home/mpolacek/src/gcc/gcc/cp/constexpr.cc:8005 0xdac220 cxx_eval_indirect_ref /home/mpolacek/src/gcc/gcc/cp/constexpr.cc:5735 0xdb3a7a cxx_eval_constant_expression /home/mpolacek/src/gcc/gcc/cp/constexpr.cc:7471 0xda66a6 cxx_eval_component_reference /home/mpolacek/src/gcc/gcc/cp/constexpr.cc:4363 0xdb4109 cxx_eval_constant_expression /home/mpolacek/src/gcc/gcc/cp/constexpr.cc:7644 0xd9bc4a cxx_bind_parameters_in_call /home/mpolacek/src/gcc/gcc/cp/constexpr.cc:1830 0xda093c cxx_eval_call_expression /home/mpolacek/src/gcc/gcc/cp/constexpr.cc:2926 0xdb2626 cxx_eval_constant_expression /home/mpolacek/src/gcc/gcc/cp/constexpr.cc:7196 0xdb8143 cxx_eval_outermost_constant_expr /home/mpolacek/src/gcc/gcc/cp/constexpr.cc:8438 0xdb8dc8 cxx_constant_value(tree_node*, tree_node*, int) /home/mpolacek/src/gcc/gcc/cp/constexpr.cc:8594 0x1133fda bot_replace /home/mpolacek/src/gcc/gcc/cp/tree.cc:3302 0x1df1281 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*)) /home/mpolacek/src/gcc/gcc/tree.cc:11341 0x113410d break_out_target_exprs(tree_node*, bool) /home/mpolacek/src/gcc/gcc/cp/tree.cc:3337 0xeca1b1 get_nsdmi(tree_node*, bool, int) /home/mpolacek/src/gcc/gcc/cp/init.cc:693 0x1189148 process_init_constructor_record /home/mpolacek/src/gcc/gcc/cp/typeck2.cc:1827 0x118a406 process_init_constructor /home/mpolacek/src/gcc/gcc/cp/typeck2.cc:2094 0x11874da digest_init_r /home/mpolacek/src/gcc/gcc/cp/typeck2.cc:1358 0x11876e9 digest_init_flags(tree_node*, tree_node*, int, int) /home/mpolacek/src/gcc/gcc/cp/typeck2.cc:1404 0x11852ac store_init_value(tree_node*, tree_node*, vec**, int) /home/mpolacek/src/gcc/gcc/cp/typeck2.cc:848 0xe4f3af check_initializer /home/mpolacek/src/gcc/gcc/cp/decl.cc:7595=