https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97578
Zhendong Su <su at cs dot ucdavis.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |su at cs dot ucdavis.edu
--- Comment #4 from Zhendong Su <su at cs dot ucdavis.edu> ---
Another test for the same crash (at -Os and -O2 w/o -g, but not at -O3):
[533] % gcctk -O2 -c small.c
during IPA pass: inline
small.c: In function āeā:
small.c:10:3: internal compiler error: Segmentation fault
10 | b(d);
| ^~~~
0xcf71ef crash_signal
../../gcc-trunk/gcc/toplev.c:330
0x825aad function_summary<clone_info*>::get(cgraph_node*)
../../gcc-trunk/gcc/symbol-summary.h:212
0x825aad clone_info::get(cgraph_node*)
../../gcc-trunk/gcc/symtab-clones.h:70
0x825aad cgraph_edge::redirect_call_stmt_to_callee(cgraph_edge*)
../../gcc-trunk/gcc/cgraph.c:1495
0xd932bf redirect_all_calls(copy_body_data*, basic_block_def*)
../../gcc-trunk/gcc/tree-inline.c:2963
0xd9697e copy_cfg_body
../../gcc-trunk/gcc/tree-inline.c:3118
0xd9697e copy_body
../../gcc-trunk/gcc/tree-inline.c:3294
0xd99ec0 expand_call_inline
../../gcc-trunk/gcc/tree-inline.c:5084
0xd9beb9 gimple_expand_calls_inline
../../gcc-trunk/gcc/tree-inline.c:5274
0xd9beb9 optimize_inline_calls(tree_node*)
../../gcc-trunk/gcc/tree-inline.c:5447
0xa968fb inline_transform(cgraph_node*)
../../gcc-trunk/gcc/ipa-inline-transform.c:763
0xc00f79 execute_one_ipa_transform_pass
../../gcc-trunk/gcc/passes.c:2240
0xc00f79 execute_all_ipa_transforms(bool)
../../gcc-trunk/gcc/passes.c:2287
0x82dbf5 cgraph_node::expand()
../../gcc-trunk/gcc/cgraphunit.c:1822
0x82f596 expand_all_functions
../../gcc-trunk/gcc/cgraphunit.c:1997
0x82f596 symbol_table::compile()
../../gcc-trunk/gcc/cgraphunit.c:2361
0x832b6f symbol_table::compile()
../../gcc-trunk/gcc/cgraphunit.c:2545
0x832b6f symbol_table::finalize_compilation_unit()
../../gcc-trunk/gcc/cgraphunit.c:2542
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.
[534] %
[534] % cat small.c
int printf (const char *, ...);
int a;
static void b(int c) {
if (c)
printf("%d", a);
}
void e() {
int d = 0;
b(d);
}