From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A76E2383302E; Wed, 16 Dec 2020 18:39:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A76E2383302E From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98332] New: [10/11 Regression] ICE in unshare_constructor, at cp/constexpr.c:1527 Date: Wed, 16 Dec 2020 18:39:16 +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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gscfq@t-online.de 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, 16 Dec 2020 18:39:16 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98332 Bug ID: 98332 Summary: [10/11 Regression] ICE in unshare_constructor, at cp/constexpr.c:1527 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gscfq@t-online.de Target Milestone: --- Changed between 20190609 and 20190616 : $ cat z1.cc struct S { int a =3D 2147483647 + 1; }; struct { S b[2][1][1][1]; } c; $ cat z2.cc #include struct S { int a =3D INT_MAX + 1; }; struct { S b[2][1][1][1]; } c; $ g++-11-20201213 -c z1.cc z1.cc:1:31: warning: integer overflow in expression of type 'int' results in '-2147483648' [-Woverflow] 1 | struct S { int a =3D 2147483647 + 1; }; | ~~~~~~~~~~~^~~ z1.cc:2:29: in 'constexpr' expansion of 'c.::()' z1.cc:2:29: internal compiler error: Segmentation fault 2 | struct { S b[2][1][1][1]; } c; | ^ 0xc8f5ff crash_signal ../../gcc/toplev.c:327 0x67c3e8 unshare_constructor(tree_node*) ../../gcc/cp/constexpr.c:1527 0x68a51a cxx_eval_vec_init_1 ../../gcc/cp/constexpr.c:4575 0x681d76 cxx_eval_vec_init ../../gcc/cp/constexpr.c:4599 0x681d76 cxx_eval_constant_expression ../../gcc/cp/constexpr.c:6584 0x6883c8 cxx_eval_store_expression ../../gcc/cp/constexpr.c:5406 0x6811ca cxx_eval_constant_expression ../../gcc/cp/constexpr.c:6226 0x680737 cxx_eval_constant_expression ../../gcc/cp/constexpr.c:6609 0x680b8c cxx_eval_constant_expression ../../gcc/cp/constexpr.c:6284 0x680cde cxx_eval_constant_expression ../../gcc/cp/constexpr.c:6295 0x680d70 cxx_eval_constant_expression ../../gcc/cp/constexpr.c:6788 0x67f58f cxx_eval_call_expression ../../gcc/cp/constexpr.c:2701 0x680f5a cxx_eval_constant_expression ../../gcc/cp/constexpr.c:6117 0x683eab cxx_eval_outermost_constant_expr ../../gcc/cp/constexpr.c:7126 0x686e7f maybe_constant_init_1 ../../gcc/cp/constexpr.c:7578 0x6ea7b6 expand_default_init ../../gcc/cp/init.c:1998 0x6ea7b6 expand_aggr_init_1 ../../gcc/cp/init.c:2101 0x6ec475 build_aggr_init(tree_node*, tree_node*, int, int) ../../gcc/cp/init.c:1835 0x6cb20d build_aggr_init_full_exprs ../../gcc/cp/decl.c:6803 0x6cb20d check_initializer ../../gcc/cp/decl.c:6964=