public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "anbu1024.me at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/98198] New: [11 Regression] internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in decl_or_type_attrs Date: Tue, 08 Dec 2020 12:28:01 +0000 [thread overview] Message-ID: <bug-98198-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98198 Bug ID: 98198 Summary: [11 Regression] internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in decl_or_type_attrs Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: anbu1024.me at gmail dot com Target Milestone: --- $ cat test-6951.c static inline void sub_1 ( ) { struct struct_1 var_9 , var_10 } static int var_9[1] __attribute__ ( ( section ( ".data" ) ) ) ; -------------------------------------------------------------------------------- $ gcc-11 --version gcc (GCC) 11.0.0 20201129 (experimental) Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -------------------------------------------------------------------------------- $ gcc-11 test-6951.c test-6951.c: In function ‘sub_1’: test-6951.c:3:25: error: storage size of ‘var_9’ isn’t known 3 | struct struct_1 var_9 , var_10 | ^~~~~ test-6951.c:4:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘}’ token 4 | } | ^ test-6951.c:6:1: internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in decl_or_type_attrs, at c-family/c-attribs.c:775 6 | static int var_9[1] __attribute__ ( ( section ( ".data" ) ) ) ; | ^~~~~~ 0x753c11 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc-11-20201129/gcc/tree.c:9860 0x642f30 tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) ../../gcc-11-20201129/gcc/tree.h:3454 0x642f30 decl_or_type_attrs ../../gcc-11-20201129/gcc/c-family/c-attribs.c:775 0x642f30 validate_attr_args ../../gcc-11-20201129/gcc/c-family/c-attribs.c:803 0x90691d validate_attr_arg ../../gcc-11-20201129/gcc/c-family/c-attribs.c:889 0x90691d handle_section_attribute ../../gcc-11-20201129/gcc/c-family/c-attribs.c:2132 0x80d0dc decl_attributes(tree_node**, tree_node*, int, tree_node*) ../../gcc-11-20201129/gcc/attribs.c:723 0x8295f2 start_decl(c_declarator*, c_declspecs*, bool, tree_node*, unsigned int*) ../../gcc-11-20201129/gcc/c/c-decl.c:5188 0x884e32 c_parser_declaration_or_fndef ../../gcc-11-20201129/gcc/c/c-parser.c:2302 0x867ef0 c_parser_compound_statement_nostart ../../gcc-11-20201129/gcc/c/c-parser.c:5700 0x8848f5 c_parser_compound_statement ../../gcc-11-20201129/gcc/c/c-parser.c:5597 0x886378 c_parser_declaration_or_fndef ../../gcc-11-20201129/gcc/c/c-parser.c:2539 0x88dbe3 c_parser_external_declaration ../../gcc-11-20201129/gcc/c/c-parser.c:1777 0x88e629 c_parser_translation_unit ../../gcc-11-20201129/gcc/c/c-parser.c:1650 0x88e629 c_parse_file() ../../gcc-11-20201129/gcc/c/c-parser.c:21877 0x8ebdfd c_common_parse_file() ../../gcc-11-20201129/gcc/c-family/c-opts.c:1198 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. -------------------------------------------------------------------------------- $ gcc-10 --version gcc (GCC) 10.2.1 20201128 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -------------------------------------------------------------------------------- $ gcc-10 test-6951.c test-6951.c: In function ‘sub_1’: test-6951.c:3:18: error: storage size of ‘var_9’ isn’t known 3 | struct struct_1 var_9 , var_10 | ^~~~~ test-6951.c:4:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘}’ token 4 | } | ^ test-6951.c:6:1: error: expected declaration or statement at end of input 6 | static int var_9[1] __attribute__ ( ( section ( ".data" ) ) ) ; | ^~~~~~
next reply other threads:[~2020-12-08 12:28 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-08 12:28 anbu1024.me at gmail dot com [this message] 2020-12-08 12:31 ` [Bug c/98198] " rguenth at gcc dot gnu.org 2020-12-08 19:57 ` marxin at gcc dot gnu.org 2020-12-08 20:28 ` clyon at gcc dot gnu.org 2020-12-08 20:31 ` marxin at gcc dot gnu.org 2020-12-08 23:13 ` clyon at gcc dot gnu.org 2021-01-14 11:02 ` rguenth at gcc dot gnu.org 2021-04-27 11:39 ` [Bug c/98198] [11/12 " jakub at gcc dot gnu.org 2021-07-28 7:05 ` rguenth at gcc dot gnu.org 2022-03-16 23:21 ` cvs-commit at gcc dot gnu.org 2022-03-17 15:15 ` roger at nextmovesoftware dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-98198-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).