public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ppalka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94219] New: ICE in cxx_eval_bare_aggregate, at cp/constexpr.c:3790 Date: Wed, 18 Mar 2020 22:24:00 +0000 [thread overview] Message-ID: <bug-94219-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94219 Bug ID: 94219 Summary: ICE in cxx_eval_bare_aggregate, at cp/constexpr.c:3790 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ppalka at gcc dot gnu.org Target Milestone: --- $ cat 94066-struct.C struct A { long x; }; struct U; constexpr A foo(U *up); struct U { // struct instead of union A a = foo(this); int y; }; constexpr A foo(U *up) { up->y = 11; return {42}; } extern constexpr U u = {}; static_assert(u.y == 11, ""); static_assert(u.a.x == 42, ""); $ g++ -std=c++14 94066-struct.C 94066-modified.C:15:25: internal compiler error: in cxx_eval_bare_aggregate, at cp/constexpr.c:3790 18 | extern constexpr U u = {}; | ^ 0x602956 cxx_eval_bare_aggregate /home/patrick/code/gcc-master/gcc/cp/constexpr.c:3790 0x941caf cxx_eval_constant_expression /home/patrick/code/gcc-master/gcc/cp/constexpr.c:5895 0x944914 cxx_eval_outermost_constant_expr /home/patrick/code/gcc-master/gcc/cp/constexpr.c:6451 0x9498c4 maybe_constant_init_1 /home/patrick/code/gcc-master/gcc/cp/constexpr.c:6908 0xb1919c store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, int) /home/patrick/code/gcc-master/gcc/cp/typeck2.c:889 0x9acc22 check_initializer /home/patrick/code/gcc-master/gcc/cp/decl.c:6838 0x9ae917 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) /home/patrick/code/gcc-master/gcc/cp/decl.c:7764 0xa57a9d cp_parser_init_declarator /home/patrick/code/gcc-master/gcc/cp/parser.c:20837 0xa378f3 cp_parser_simple_declaration /home/patrick/code/gcc-master/gcc/cp/parser.c:13689 0xa5fd97 cp_parser_declaration /home/patrick/code/gcc-master/gcc/cp/parser.c:13388 0xa60517 cp_parser_translation_unit /home/patrick/code/gcc-master/gcc/cp/parser.c:4731 0xa60517 c_parse_file() /home/patrick/code/gcc-master/gcc/cp/parser.c:43758 0xb70dcb c_common_parse_file() /home/patrick/code/gcc-master/gcc/c-family/c-opts.c:1186 This is closely related to PR c++/94066, but unlike that PR, this one is not a regression AFAICT.
next reply other threads:[~2020-03-18 22:24 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-18 22:24 ppalka at gcc dot gnu.org [this message] 2020-03-19 8:17 ` [Bug c++/94219] " marxin at gcc dot gnu.org 2020-04-01 21:41 ` ppalka at gcc dot gnu.org 2020-04-04 16:18 ` cvs-commit at gcc dot gnu.org 2020-04-04 16:21 ` ppalka 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-94219-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).