From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2C772385C420; Tue, 13 Sep 2022 11:58:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C772385C420 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663070297; bh=G4+OW0/nCuZi/YpG5JWNm/K5+W9kYmhrEAiO6BDvVmE=; h=From:To:Subject:Date:From; b=X8PkMd6y4GqcWD45S7+fAwyhTtyITH1JDkeGPmgDWGHh4IGSCXBLP/cS58OjuHhRA VJ9zKGQz9Pqof6jFYD7nmZwarpzm8LTwxwW67iBYaFf3MvxBmodYYfWZ/ZgplgLFzX fRbu2qjVMzUJuZLh58Lsb8pwnrB122Z8jHqVZe5M= From: "carlosgalvezp at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106925] New: internal compiler error: Segmentation fault Date: Tue, 13 Sep 2022 11:58: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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carlosgalvezp at gmail dot com 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=3D106925 Bug ID: 106925 Summary: internal compiler error: Segmentation fault Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: carlosgalvezp at gmail dot com Target Milestone: --- The following minimal example leads to a segfault of GCC on latest trunk: #include template struct MyVector { std::array data{}; }; template struct Foo final { T a{0}; }; constexpr std::size_t kSize =3D 1; void foo(MyVector, kSize> input =3D MyVector, kSize>(= )) { } : In instantiation of 'constexpr MyVector, 1>::MyVector(= )': :17:74: required from here :6:25: internal compiler error: Segmentation fault 6 | std::array data{}; | ^~~~ 0x23428ae internal_error(char const*, ...) ???:0 0xb9cae7 maybe_splice_retval_cleanup(tree_node*) ???:0 0xce4fc2 do_poplevel(tree_node*) ???:0 0xce7973 finish_for_stmt(tree_node*) ???:0 0xba5019 build_vec_init(tree_node*, tree_node*, tree_node*, bool, int, int, vec**) ???:0 0xd0ee2e expand_vec_init_expr(tree_node*, tree_node*, int, vec**) ???:0 0xd494d1 digest_nsdmi_init(tree_node*, tree_node*, int) ???:0 0xbaabe5 get_nsdmi(tree_node*, bool, int) ???:0 0xbd282d get_defaulted_eh_spec(tree_node*, int) ???:0 0xc9d42a maybe_instantiate_noexcept(tree_node*, int) ???:0 0xc9d23a maybe_instantiate_noexcept(tree_node*, int) ???:0 0xb85043 mark_used(tree_node*, int) ???:0 0xac7bfb build_new_method_call(tree_node*, tree_node*, vec**, tree_node*, int, tree_node**, int) ???:0 0xac9027 build_special_member_call(tree_node*, tree_node*, vec**, tree_node*, int, int) ???:0 0xba3b2c build_value_init(tree_node*, int) ???:0 0xd4a73a build_functional_cast(unsigned int, tree_node*, tree_node*, int) ???:0 0xc743a7 c_parse_file() ???:0 0xdae9f9 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. Compiler returned: 1 Can be reproduced on Compiler Explorer: https://godbolt.org/z/fconh9nKa=