From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3DBBE3858D35; Thu, 10 Feb 2022 06:02:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3DBBE3858D35 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/104470] internal compiler error: Segmentation fault compiling std::variant with -std=c++20 Date: Thu, 10 Feb 2022 06:02:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.3.0 X-Bugzilla-Keywords: needs-reduction X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: Message-ID: In-Reply-To: References: 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: Thu, 10 Feb 2022 06:02:18 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104470 --- Comment #2 from Andrew Pinski --- here is the full backtrace: In file included from t.cc:2: /home/apinski/upstream-gcc/include/c++/12.0.1/variant: In substitution of =E2=80=98template template using __acce= pted_type =3D std::variant<_Types>::__to_type<__accepted_index<_Tp> > [with _Tp =3D _Tp&&; =3D typename std::enable_if, B= ar >::__not_self<_Tp&&>, void>::type; _Types =3D {Foo, Bar}]=E2=80=99: t.cc:21:15: required from here /home/apinski/upstream-gcc/include/c++/12.0.1/variant:1384:43: internal compiler error: Segmentation fault 1384 | using __accepted_type =3D __to_type<__accepted_index<_Tp>>; | ^~~~~~~~~~~~~~~~~~~~ 0x11fceef crash_signal /home/apinski/src/upstream-gcc-git/gcc/gcc/toplev.cc:322 0xba5a12 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, boo= l, bool) /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:19883 0xbb95df tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:19316 0xbc306e tsubst_template_args(tree_node*, tree_node*, int, tree_node*) /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:13423 0xbc3292 tsubst_template_args(tree_node*, tree_node*, int, tree_node*) /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:13405 0xbb4a9e tsubst(tree_node*, tree_node*, int, tree_node*) /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:15461 0xbc4197 tsubst_decl /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:14815 0xbb3792 instantiate_template_1 /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:21470 0xbb4b7f instantiate_template(tree_node*, tree_node*, int) /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:21529 0xbb4b7f instantiate_alias_template /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:21567 0xbb4b7f tsubst(tree_node*, tree_node*, int, tree_node*) /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:15462 0xbd278e rewrite_tparm_list /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:29006 0xbddce4 alias_ctad_tweaks /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:29484 0xb9e9aa deduction_guides_for /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:29646 0xb9ec34 do_class_deduction /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:29777 0xb9ec34 do_auto_deduction(tree_node*, tree_node*, tree_node*, int, auto_deduction_context, tree_node*, int) /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:29934 0xa84b86 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/decl.cc:7947 0xb767e4 cp_parser_init_declarator /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/parser.cc:22811 0xb51428 cp_parser_simple_declaration /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/parser.cc:15284 0xb531d0 cp_parser_declaration_statement /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/parser.cc:14365 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.=