https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89341
Bug ID: 89341 Summary: ICE in get, at cgraph.h:1332 Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- With option -O0 down to at least gcc-5 : $ cat z1.c __attribute__((weakref("bar"))) static void foo () { } void foo (); $ gcc-9-20190210 -c z1.c -O1 $ $ gcc-9-20190210 -c z1.c -O0 z1.c:2:13: internal compiler error: Segmentation fault 2 | static void foo () { } | ^~~ 0xa8aa9f crash_signal ../../gcc/toplev.c:326 0x70c90a cgraph_node* dyn_cast<cgraph_node*, symtab_node>(symtab_node*) ../../gcc/is-a.h:227 0x70c90a cgraph_node::get(tree_node const*) ../../gcc/cgraph.h:1333 0x70c90a cgraph_node::analyze() ../../gcc/cgraphunit.c:640 0x70f457 analyze_functions ../../gcc/cgraphunit.c:1126 0x70fd92 symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2834