public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.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 [thread overview] Message-ID: <bug-110997-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110997 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 worked on // P2564. consteval int f (int); struct S { int a = 0; int b = f (a); }; constexpr bool g (auto i) { S s{i}; return s.b == 2 *i; } consteval int f (int i) { return 2 * i; } void test () { static_assert(g(42)); } $ ./cc1plus -quiet -std=c++20 consteval-prop4.C consteval-prop4.C: In instantiation of ‘constexpr bool g(auto:1) [with auto:1 = int]’: 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*, 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*> >*)) /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<tree_node*, va_gc, vl_embed>**, int) /home/mpolacek/src/gcc/gcc/cp/typeck2.cc:848 0xe4f3af check_initializer /home/mpolacek/src/gcc/gcc/cp/decl.cc:7595
next reply other threads:[~2023-08-11 21:21 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-08-11 21:21 mpolacek at gcc dot gnu.org [this message] 2023-08-11 21:22 ` [Bug c++/110997] " mpolacek at gcc dot gnu.org 2023-08-11 21:22 ` mpolacek at gcc dot gnu.org 2023-08-31 20:36 ` mpolacek at gcc dot gnu.org 2023-09-19 17:02 ` mpolacek at gcc dot gnu.org 2023-12-05 0:42 ` cvs-commit at gcc dot gnu.org 2023-12-05 0:44 ` mpolacek at gcc dot gnu.org 2024-01-12 7:32 ` pinskia at gcc dot gnu.org 2024-01-12 7:38 ` [Bug c++/110997] [13 " rguenth at gcc dot gnu.org 2024-01-13 1:14 ` pinskia at gcc dot gnu.org 2024-01-15 16:14 ` mpolacek at gcc dot gnu.org 2024-05-21 9:16 ` jakub 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-110997-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).