https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83322
--- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Another variant:
struct A {
void foo();
};
struct B {
bool foo;
};
struct C : A, B {
__attribute__((warn_unused_result)) int foo();
};
trippels@gcc67 ~ % g++ -Wall -c nsHttpHandler.ii
nsHttpHandler.ii:8:47: internal compiler error: tree check: expected class
‘type’, have ‘exceptional’ (tree_list) in diag_attr_exclusions, at
attribs.c:393
__attribute__((warn_unused_result)) int foo();
^
0x82f443 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
../../gcc/gcc/tree.c:9153
0x66892f tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
../../gcc/gcc/tree.h:3242
0x66892f diag_attr_exclusions
../../gcc/gcc/attribs.c:393
0xac239f diag_attr_exclusions
../../gcc/gcc/attribs.c:376
0xac415f decl_attributes(tree_node**, tree_node*, int, tree_node*)
../../gcc/gcc/attribs.c:702
0x97fe70 cplus_decl_attributes(tree_node**, tree_node*, int)
../../gcc/gcc/cp/decl2.c:1508
0x96703c grokfndecl
../../gcc/gcc/cp/decl.c:8844
0x978dfc grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
../../gcc/gcc/cp/decl.c:11987
0x984d78 grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*,
bool, tree_node*, tree_node*)
../../gcc/gcc/cp/decl2.c:829
0x9f9e6a cp_parser_member_declaration
../../gcc/gcc/cp/parser.c:23842
0x9fadaa cp_parser_member_specification_opt
../../gcc/gcc/cp/parser.c:23316
0x9fadaa cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:22458
0x9fce09 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:22710
0x9fce09 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:16718
0xa09f1c cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:13579
0xa0f810 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:12888
0xa107e8 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:12835
0xa14732 cp_parser_declaration
../../gcc/gcc/cp/parser.c:12733
0xa14b71 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:12609
0xa14e64 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4558