https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67330
Bug ID: 67330 Summary: ICE handling weak attributes Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sasha.levin at oracle dot com Target Milestone: --- Created attachment 36248 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36248&action=edit Preprocessed source Hi, I'm seeing the following ICE when compiling the kernel's kernel/sched/core.c: kernel/sched/core.c:5925:1: note: in expansion of macro ‘DEFINE_PER_CPU’ DEFINE_PER_CPU(struct sched_domain *, sd_llc); ^ 0x63552c symtab_node::get(tree_node const*) ../../gcc/cgraph.h:370 0x63552c handle_weak_attribute ../../gcc/c-family/c-common.c:8332 0x5af16b decl_attributes(tree_node**, tree_node*, int) ../../gcc/attribs.c:557 0x5cb3da start_decl(c_declarator*, c_declspecs*, bool, tree_node*) ../../gcc/c/c-decl.c:4547 0x61d140 c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:1828 0x62168d c_parser_compound_statement_nostart ../../gcc/c/c-parser.c:4622 0x621cbe c_parser_compound_statement ../../gcc/c/c-parser.c:4533 0x61dc27 c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:1966 0x627e1f c_parser_external_declaration ../../gcc/c/c-parser.c:1436 0x6286d9 c_parser_translation_unit ../../gcc/c/c-parser.c:1323 0x6286d9 c_parse_file() ../../gcc/c/c-parser.c:15449 0x684fa2 c_common_parse_file() ../../gcc/c-family/c-opts.c:1058 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. I've bisected it down to: commit 8e857c4151f8f0aae992f9b5f22ee5b4c1cc1c73 Author: hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Fri Sep 19 23:56:52 2014 +0000 PR c++/61825 * c-family/c-common.c (handle_alias_ifunc_attribute): Check that visibility change is possible (handle_weakref_attribute): Likewise. * cgraph.h (symtab_node): Add method get_create and field refuse_visibility_changes. (symtab_node::get_create): New method. * fold-const.c (tree_single_nonzero_warnv_p): Use get_create. * varasm.c (mark_weak): Verify that visibility change is possible. * gcc.dg/tree-ssa/nonzero-1.c: Require error to be output. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215409 138bc75d-0d04-0410-961f-82ee72b054a4 Attached a preprocessed source file.