From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9F662385041D; Tue, 4 Aug 2020 16:29:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F662385041D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1596558575; bh=aVVLqq7gBxLKvnCGnk48x8nVCJoLd8H0If2eurSfPLg=; h=From:To:Subject:Date:From; b=Npb3/k/RMHEUSyFFMUPJyip9MD8dpcyg0Aekn74s63wP9oqe4Dxz99jrQhzd/wh6r LcnQ14ORwJUaauAoK55mdabeESoW4kCFisHGjtPQKhzjj4hLXQylqreNQU1tUwxwE8 shSxFRxtSN+OG3N9jV2UNNrqyDKg4X+3mb2cUE9s= From: "haoxintu at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96467] New: [8/9/10/11 Regression] in finish_member_declaration, at cp/semantics.c:3240 Date: Tue, 04 Aug 2020 16:29:35 +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: 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: bug_id short_desc product version bug_status keywords 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: Tue, 04 Aug 2020 16:29:35 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96467 Bug ID: 96467 Summary: [8/9/10/11 Regression] in finish_member_declaration, at cp/semantics.c:3240 Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. This code makes GCC-9.1 onwards versions ICE without any error messages. I guess this case is more seriously because this makes released versions ICE rather than "confused by earlier errors". Input: //small.cc union a; a :: b () alignas (enum {c}); Command: g++ small.cc Output: small.cc:2:26: internal compiler error: in finish_member_declaration, at cp/semantics.c:3240 2 | a :: b () alignas (enum {c}); | ^ 0x5c82c0 finish_member_declaration(tree_node*) ../../gcc/cp/semantics.c:3240 0x67d578 build_enumerator(tree_node*, tree_node*, tree_node*, tree_node*, unsigned int) ../../gcc/cp/decl.c:15887 0x6e8b47 cp_parser_enumerator_definition ../../gcc/cp/parser.c:19493 0x6e8b47 cp_parser_enumerator_list ../../gcc/cp/parser.c:19422 0x6e8b47 cp_parser_enum_specifier ../../gcc/cp/parser.c:19353 0x6e8b47 cp_parser_type_specifier ../../gcc/cp/parser.c:17683 0x6fb6f9 cp_parser_type_specifier_seq ../../gcc/cp/parser.c:22386 0x6f5c84 cp_parser_type_id_1 ../../gcc/cp/parser.c:22203 0x6f5ecf cp_parser_type_id ../../gcc/cp/parser.c:22282 0x6f5ecf cp_parser_std_attribute_spec ../../gcc/cp/parser.c:27079 0x6f5ecf cp_parser_std_attribute_spec_seq ../../gcc/cp/parser.c:27142 0x6f3b43 cp_parser_direct_declarator ../../gcc/cp/parser.c:21234 0x6f3b43 cp_parser_declarator ../../gcc/cp/parser.c:21057 0x706577 cp_parser_init_declarator ../../gcc/cp/parser.c:20557 0x6e9c32 cp_parser_simple_declaration ../../gcc/cp/parser.c:13734 0x70f952 cp_parser_declaration ../../gcc/cp/parser.c:13433 0x710074 cp_parser_translation_unit ../../gcc/cp/parser.c:4734 0x710074 c_parse_file() ../../gcc/cp/parser.c:43975 0x7d84fb 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. My GCC version is Using built-in specs. COLLECT_GCC=3Dg++ COLLECT_LTO_WRAPPER=3D/home/haoxin/corpus-compilers/gcc-trunk/gcc-master/bu= ild/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../configure --prefix=3D/home/haoxin/corpus-compilers/gcc-trunk/gcc-master/build/ --enable-languages=3Dc,c++ CC=3Dgcc CXX=3Dg++ Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.0 20200801 (experimental) (GCC)=20 Thanks, Haoxin=