From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4F6A23857C52; Mon, 3 Aug 2020 16:55:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F6A23857C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1596473714; bh=DrLpjRITm1kyFE2MJcRylO68rKIY4hN+jBnNBmBIfPA=; h=From:To:Subject:Date:From; b=ry869Vg5UAOofaVHOzgFVieqIlXtPzKYaNBbdfLiI4TODZ3dKfj87hMbiz056cBCx 3y5AJpCe+nJifQHwtYPd0InMf/VMhGMHNl1gyM0JsEjmk9wcGi0qZvhp/bkjS+TTsZ RQ9IpiyLkzEawddLHadle0cMuKcqq9Ds0axaHn0E= From: "haoxintu at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96440] New: ICE in tree check: expected tree_list, have error_mark in get_attribute_name, at attribs.c:841 Date: Mon, 03 Aug 2020 16:55:14 +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: error-recovery, 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: Mon, 03 Aug 2020 16:55:14 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96440 Bug ID: 96440 Summary: ICE in tree check: expected tree_list, have error_mark in get_attribute_name, at attribs.c:841 Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: error-recovery, 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, reduced by C-Vise, makes GCC-trunk ICE and makes released GCC versions "confused by early errors". Input: //small.cc auto alignas a [[]] [[const]] (); Command: g++ small.cc Output: small.cc:1:14: error: expected =E2=80=98(=E2=80=99 before =E2=80=98a=E2=80= =99 1 | auto alignas a [[]] [[const]] (); | ^ | ( small.cc:1:29: internal compiler error: tree check: expected tree_list, have error_mark in get_attribute_name, at attribs.c:841 1 | auto alignas a [[]] [[const]] (); | ^ 0x7c7fd7 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/tree.c:9687 0x6a0bd3 tree_check(tree_node const*, char const*, int, char const*, tree_c= ode) ../../gcc/tree.h:3559 0x6a0bd3 get_attribute_name(tree_node const*) ../../gcc/attribs.c:841 0xa9e159 private_lookup_attribute(char const*, unsigned long, tree_node*) ../../gcc/attribs.c:1812 0x911518 lookup_attribute ../../gcc/attribs.h:179 0x911518 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**) ../../gcc/cp/decl.c:11384 0x91d418 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**) ../../gcc/cp/decl.c:5233 0x9cbd7d cp_parser_init_declarator ../../gcc/cp/parser.c:20858 0x9ac3cc cp_parser_simple_declaration ../../gcc/cp/parser.c:13811 0x9d763e cp_parser_declaration ../../gcc/cp/parser.c:13510 0x9d7d2b cp_parser_translation_unit ../../gcc/cp/parser.c:4793 0x9d7d2b c_parse_file() ../../gcc/cp/parser.c:44081 0xaf2e9d c_common_parse_file() ../../gcc/c-family/c-opts.c:1188 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=