From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3F6B63945C16; Wed, 18 Mar 2020 22:24:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3F6B63945C16 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584570240; bh=QiQSZlizeq95ch4OrQFle360o9mUvkMDu8eETski+ms=; h=From:To:Subject:Date:From; b=nQO+GxCTdSLi+zJDka/GAbey1v7z7oBdJHo8qdQ9Q3E/9GacbGsrtKPGRj+texhiW lzGABul2CC4EdCRP4zZvdNZSlzwu7lf6HjngM1nyGnKXxS965srMF1gPjiJbKH+RnV ay9a2BDifHc1doehMrL5E4WpkEnDPXkJ1rpAmtfQ= From: "ppalka at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ppalka 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2020 22:24:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94219 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 =3D foo(this); int y; }; constexpr A foo(U *up) { up->y =3D 11; return {42}; } extern constexpr U u =3D {}; static_assert(u.y =3D=3D 11, ""); static_assert(u.a.x =3D=3D 42, ""); $ g++ -std=3Dc++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 =3D {}; | ^ 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**, 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 no= t a regression AFAICT.=