https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79758
Bug ID: 79758 Summary: ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in store_parm_decls_oldstyle, at c/c-decl.c:8973 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With invalid code on x86_64 GNU/Linux down to at least 4.8 (configured with --enable-checking=yes) : $ cat z1.c void fn1 (int[a]) { }; void fn1 (b) { }; $ gcc-7-20170226 -c z1.c z1.c:1:15: error: 'a' undeclared here (not in a function) void fn1 (int[a]) { }; ^ z1.c: In function 'fn1': z1.c:1:14: error: parameter name omitted void fn1 (int[a]) { }; ^ z1.c: At top level: z1.c:2:6: error: redefinition of 'fn1' void fn1 (b) { }; ^~~ z1.c:1:6: note: previous definition of 'fn1' was here void fn1 (int[a]) { }; ^~~ z1.c: In function 'fn1': z1.c:2:6: warning: type of 'b' defaults to 'int' [-Wimplicit-int] void fn1 (b) { }; ^~~ z1.c:2:1: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in store_parm_decls_oldstyle, at c/c-decl.c:8973 void fn1 (b) { }; ^~~~ 0xea3607 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/tree.c:9866 0x672ead tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) ../../gcc/tree.h:3187 0x672ead store_parm_decls_oldstyle ../../gcc/c/c-decl.c:8973 0x672ead store_parm_decls() ../../gcc/c/c-decl.c:9147 0x6d05af c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:2074 0x6d87fb c_parser_external_declaration ../../gcc/c/c-parser.c:1468 0x6d9259 c_parser_translation_unit ../../gcc/c/c-parser.c:1348 0x6d9259 c_parse_file() ../../gcc/c/c-parser.c:18173 0x737b02 c_common_parse_file() ../../gcc/c-family/c-opts.c:1107