From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 994F23858D34; Fri, 3 Jul 2020 03:28:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 994F23858D34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1593746900; bh=0lwOhRm/h3t2I4nxOK+lWoOX2japPGg30SToPckNLCc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jLRZTRn84MD+7M2cTBrWwqrkwwtsVgLpjdrlJnXrmQE3YPN1YOTb3WsmaZvRsgYt4 KttaVetyhCfNu16JzvrMNmW7Vw2cLMW/AWMQdnAbB1ttKoz8MhMEQ/GwWOj31iT+yI uLGLgF3kpXF1Wbza8HLbj7cZ/TyP2dg4yB8m64yc= From: "haoxintu at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95945] ICE in poplevel, at cp/decl.c:585 Date: Fri, 03 Jul 2020 03:28:20 +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: 11.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: haoxintu 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: 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: Fri, 03 Jul 2020 03:28:20 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95945 --- Comment #1 from Haoxin Tu --- Add a more meaningful case $cat p.cc int a ( auto struct x { int b ();}) {} $g++ -w p.cc p.cc:1:23: error: types may not be defined in parameter types 1 | int a ( auto struct x { int b ();}) {} | ^ p.cc:1:32: internal compiler error: in poplevel, at cp/decl.c:585 1 | int a ( auto struct x { int b ();}) {} | ^ 0x683eae poplevel(int, int, int) ../../gcc/cp/decl.c:585 0xa45d68 end_template_decl() ../../gcc/cp/pt.c:4688 0x9f86c2 finish_fully_implicit_template ../../gcc/cp/parser.c:44280 0xa3a12a cp_parser_member_declaration ../../gcc/cp/parser.c:25414 0xa0e061 cp_parser_member_specification_opt ../../gcc/cp/parser.c:24850 0xa0e061 cp_parser_class_specifier_1 ../../gcc/cp/parser.c:23947 0xa10213 cp_parser_class_specifier ../../gcc/cp/parser.c:24254 0xa10213 cp_parser_type_specifier ../../gcc/cp/parser.c:17762 0xa11172 cp_parser_decl_specifier_seq ../../gcc/cp/parser.c:14410 0xa2db8f cp_parser_parameter_declaration ../../gcc/cp/parser.c:22818 0xa2e582 cp_parser_parameter_declaration_list ../../gcc/cp/parser.c:22641 0xa2e95c cp_parser_parameter_declaration_clause ../../gcc/cp/parser.c:22568 0xa1bda7 cp_parser_direct_declarator ../../gcc/cp/parser.c:21245 0xa1bda7 cp_parser_declarator ../../gcc/cp/parser.c:21109 0xa30346 cp_parser_init_declarator ../../gcc/cp/parser.c:20609 0xa11e42 cp_parser_simple_declaration ../../gcc/cp/parser.c:13785 0xa3b0b6 cp_parser_declaration ../../gcc/cp/parser.c:13484 0xa3b7fa cp_parser_translation_unit ../../gcc/cp/parser.c:4761 0xa3b7fa c_parse_file() ../../gcc/cp/parser.c:44043 0xb5473b c_common_parse_file() ../../gcc/c-family/c-opts.c:1190 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. In Clang $clang++ -w p.cc p.cc:1:21: error: 'x' cannot be defined in a parameter type int a ( auto struct x { int b ();}) {} ^ 1 error generated.=