https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79755
Bug ID: 79755
Summary: ICE: segfault in cgraph_node::get, at cgraph.h:1261
Product: gcc
Version: 7.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
Affects versions down to 4.9 (configured with --enable-checking=yes) :
$ cat z1.c
void foo () {}
#pragma weak foo = _foo
int _foo = 0;
$ gcc-7-20170226 -c z1.c
z1.c:1:6: error: 'foo' defined both normally and as 'alias' attribute
void foo () {}
^~~
z1.c:1:6: error: 'foo' alias in between function and variable is not supported
z1.c:3:5: warning: '_foo' aliased declaration
int _foo = 0;
^~~~
z1.c:1:6: internal compiler error: Segmentation fault
void foo () {}
^~~
0xbf9f9f crash_signal
../../gcc/toplev.c:337
0x7f25e2 cgraph_node::get(tree_node const*)
../../gcc/cgraph.h:1261
0x7f25e2 cgraph_node::analyze()
../../gcc/cgraphunit.c:630
0x7f5d93 analyze_functions
../../gcc/cgraphunit.c:1118
0x7f68da symbol_table::finalize_compilation_unit()
../../gcc/cgraphunit.c:2599