From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 28A803858415; Wed, 6 Oct 2021 08:51:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 28A803858415 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/102624] testcase lambda-uneval11.C causes cc1plus segment fault Date: Wed, 06 Oct 2021 08:51:54 +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: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW 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_status everconfirmed keywords cf_reconfirmed_on 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: Wed, 06 Oct 2021 08:51:54 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102624 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Keywords| |ice-on-valid-code Last reconfirmed| |2021-10-06 --- Comment #1 from Richard Biener --- Confirmed. (gdb) bt #0 0x0000000000b2716e in tree_check (__t=3D,=20 __f=3D0x2ed9770 "/home/rguenther/src/gcc3/gcc/cp/decl.c", __l=3D17190,= =20 __g=3D0x2ee3250 "do_push_parm_decls", __c=3DFUNCTION_DECL) at /home/rguenther/src/gcc3/gcc/tree.h:3432 #1 0x0000000000c66f69 in do_push_parm_decls (decl=3D,=20 args=3D, nonparms=3D0x7fffffffd7f8) at /home/rguenther/src/gcc3/gcc/cp/decl.c:17190 #2 0x0000000000c6701e in store_parm_decls ( current_function_parms=3D) at /home/rguenther/src/gcc3/gcc/cp/decl.c:17222 #3 0x0000000000c660b0 in start_preparsed_function ( decl1=3D, attrs=3D, flags= =3D1) at /home/rguenther/src/gcc3/gcc/cp/decl.c:17078 #4 0x0000000000e8a6ad in instantiate_body ( pattern=3D,=20 args=3D, d=3D,=20 nested_p=3Dfalse) at /home/rguenther/src/gcc3/gcc/cp/pt.c:26037 #5 0x0000000000e8c3f9 in instantiate_decl ( d=3D, defer_ok=3Dfalse,=20 expl_inst_class_mem_p=3Dfalse) at /home/rguenther/src/gcc3/gcc/cp/pt.c:= 26344 #6 0x0000000000e8c7a6 in instantiate_pending_templates (retries=3D0) at /home/rguenther/src/gcc3/gcc/cp/pt.c:26423 #7 0x0000000000c89a19 in c_parse_final_cleanups () at /home/rguenther/src/gcc3/gcc/cp/decl2.c:5009 #8 0x0000000000fdcd32 in c_common_parse_file () at /home/rguenther/src/gcc3/gcc/c-family/c-opts.c:1259 #9 0x00000000017adc20 in compile_file () at /home/rguenther/src/gcc3/gcc/toplev.c:456 #10 0x00000000017b0dcb in do_compile (no_backend=3Dfalse) at /home/rguenther/src/gcc3/gcc/toplev.c:2215 #11 0x00000000017b117f in toplev::main (this=3D0x7fffffffdd1a, argc=3D5,=20 argv=3D0x7fffffffde28) at /home/rguenther/src/gcc3/gcc/toplev.c:2363 #12 0x0000000002d9c73e in main (argc=3D5, argv=3D0x7fffffffde28) at /home/rguenther/src/gcc3/gcc/main.c:39 fndecl is current_function_decl but that's NULLed when we do #0 finish_function (inline_p=3Dtrue) at /home/rguenther/src/gcc3/gcc/cp/decl.c:17817 #1 0x0000000000cd203a in maybe_add_lambda_conv_op ( type=3D) at /home/rguenther/src/gcc3/gcc/cp/lambda.c:1294 #2 0x0000000000e6d868 in tsubst_lambda_expr (t=3D,=20 args=3D, complain=3D3,=20 in_decl=3D) at /home/rguenther/src/gcc3/gcc/cp/pt.c:19568 #3 0x0000000000e74cab in tsubst_copy_and_build ( t=3D, args=3D,=20 complain=3D0, in_decl=3D, function_p=3Dfalse,=20 integral_constant_expression_p=3Dfalse) at /home/rguenther/src/gcc3/gcc/cp/pt.c:20992 #4 0x0000000000e58d68 in tsubst (t=3D,=20 args=3D, complain=3D0, in_decl=3D) at /home/rguenther/src/gcc3/gcc/cp/pt.c:16159 #5 0x0000000000c94947 in dump_template_bindings ( pp=3D0x406eb80 , parms=3D,=20 args=3D, typenames=3D0x7ffff66abfa0 =3D {...}) at /home/rguenther/src/gcc3/gcc/cp/error.c:482 #6 0x0000000000c9ad5d in dump_substitution ( pp=3D0x406eb80 ,=20 t=3D,=20 template_parms=3D,=20 template_args=3D, flags=3D4) at /home/rguenther/src/gcc3/gcc/cp/error.c:1638 #7 0x0000000000c9c906 in dump_function_decl ( pp=3D0x406eb80 ,=20 t=3D, flags=3D4) at /home/rguenther/src/gcc3/gcc/cp/error.c:1796 #8 0x0000000000c99c3b in dump_decl (pp=3D0x406eb80 = ,=20 t=3D, flags=3D4) at /home/rguenther/src/gcc3/gcc/cp/error.c:1369 #9 0x0000000000ca3340 in decl_as_string ( decl=3D, flags=3D4) at /home/rguenther/src/gcc3/gcc/cp/error.c:3117 #10 0x0000000000ca3418 in lang_decl_name ( decl=3D, v=3D2, translate=3Dfalse) at /home/rguenther/src/gcc3/gcc/cp/error.c:3151 #11 0x0000000000efabc1 in cxx_printable_name_internal ( decl=3D, v=3D2, translate=3Dfalse) at /home/rguenther/src/gcc3/gcc/cp/tree.c:2678 #12 0x0000000000efac61 in cxx_printable_name ( decl=3D, v=3D2) at /home/rguenther/src/gcc3/gcc/cp/tree.c:2687 #13 0x00000000017ad599 in announce_function ( decl=3D) at /home/rguenther/src/gcc3/gcc/toplev.c:234 #14 0x0000000000c6496f in start_preparsed_function ( decl1=3D, attrs=3D, flags= =3D1) at /home/rguenther/src/gcc3/gcc/cp/decl.c:16905 so it looks like some diagnostics affect current_function_decl, the key is omitting -quiet from the command-line that's usually added by the driver= .=