https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80581
Qirun Zhang <helloqirun at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |helloqirun at gmail dot com --- Comment #3 from Qirun Zhang <helloqirun at gmail dot com> --- The following smaller code also crashes the current trunk version of gcc. It occurs only at -O2 and -O3 in 32-bit mode. It also starts with r247417. I thought it should be a duplicate. Therefore, I report it here. $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/home/absozero/trunk/root-gcc/libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure --prefix=/home/absozero/trunk/root-gcc --enable-languages=c,c++ --disable-werror --enable-multilib Thread model: posix gcc version 8.0.0 20170501 (experimental) [trunk revision 247436] (GCC) $ gcc-trunk -m32 -O2 abc.c abc.c:14:1: internal compiler error: in estimate_node_size_and_time, at ipa-inline-analysis.c:3425 void fn3() { fn2(b); } ^~~~ 0x98ef05 estimate_node_size_and_time ../../gcc/gcc/ipa-inline-analysis.c:3425 0x991513 do_estimate_edge_time(cgraph_edge*) ../../gcc/gcc/ipa-inline-analysis.c:3935 0x991a67 do_estimate_edge_size(cgraph_edge*) ../../gcc/gcc/ipa-inline-analysis.c:3989 0x991cbf estimate_edge_size ../../gcc/gcc/ipa-inline.h:304 0x991cbf estimate_edge_growth ../../gcc/gcc/ipa-inline.h:315 0x991cbf estimate_size_after_inlining(cgraph_node*, cgraph_edge*) ../../gcc/gcc/ipa-inline-analysis.c:4064 0x1315832 caller_growth_limits ../../gcc/gcc/ipa-inline.c:184 0x1315832 can_inline_edge_p ../../gcc/gcc/ipa-inline.c:382 0x131b622 inline_small_functions ../../gcc/gcc/ipa-inline.c:1822 0x131b622 ipa_inline ../../gcc/gcc/ipa-inline.c:2438 0x131b622 execute ../../gcc/gcc/ipa-inline.c:2849 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. $ cat abc.c int a, g; char b, e; short c, d, f; long long h; void fn1() { for (;;) ; } void fn2(char p1) { b |= 5 > a < (f ?: e); fn1(a % c || (f -= 0) || 0, d < b, c < h % (h > d) ^ g ^ d ? 7 / (c /= b) : (h /= a %= a)); } void fn3() { fn2(b); }