https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92725
Bug ID: 92725 Summary: ICE: Segmentation fault during GIMPLE pass Product: gcc Version: 8.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: anbu1024.me at gmail dot com Target Milestone: --- $ cat 0.c int global ; void foo() ; __attribute__((returns_twice)) int bar() ; void baz(int, int); void main ( ) { int x; for ( ; ; ) foo(); baz(bar(), global); } -------------------------------------------------------------------------------- $ gcc-snapshot8 --version gcc (GCC) 8.3.1 20191122 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -------------------------------------------------------------------------------- $ gcc-snapshot8 0.c during GIMPLE pass: *build_cgraph_edges 0.c: In function ‘main’: 0.c:10:6: internal compiler error: Segmentation fault void main ( ) ^~~~ 0xa654af crash_signal ../../gcc-8-20191122/gcc/toplev.c:325 0x8275a0 useless_type_conversion_p(tree_node*, tree_node*) ../../gcc-8-20191122/gcc/gimple-expr.c:70 0x70606d types_compatible_p ../../gcc-8-20191122/gcc/gimple-expr.h:66 0x70606d gimple_check_call_args ../../gcc-8-20191122/gcc/cgraph.c:3798 0x70606d gimple_check_call_matching_types(gimple*, tree_node*, bool) ../../gcc-8-20191122/gcc/cgraph.c:3848 0x708346 symbol_table::create_edge(cgraph_node*, cgraph_node*, gcall*, profile_count, bool) ../../gcc-8-20191122/gcc/cgraph.c:879 0x708544 cgraph_node::create_edge(cgraph_node*, gcall*, profile_count) ../../gcc-8-20191122/gcc/cgraph.c:914 0x70df6e execute ../../gcc-8-20191122/gcc/cgraphbuild.c:322 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.