http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57441
Bug ID: 57441 Summary: ICE in gimple-ssa-strength-reduction.c:3447 at -O3 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: dhazeghi at yahoo dot com The following code causes current gcc trunk to ICE when built at -O3 on x86_64-linux. This is a regression from gcc 4.8 which compiles successfully. $ gcc-trunk -v Target: x86_64-unknown-linux-gnu Configured with: ../gcc-trunk/configure --enable-languages=c,c++,objc,obj-c++,fortran,lto --disable-checking --with-gmp=/usr/local/gcc-trunk --with-mpfr=/usr/local/gcc-trunk --with-mpc=/usr/local/gcc-trunk --with-cloog=/usr/local/gcc-trunk --prefix=/usr/local/gcc-trunk Thread model: posix gcc version 4.9.0 20130528 (experimental) [trunk revision 199374] (GCC) $ gcc-trunk -O2 -c crash.c $ gcc-4.8 -O3 -c crash.c $ gcc-trunk -O3 -c crash.c *** glibc detected *** /usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/cc1: free(): invalid next size (fast): 0x0000000001ecd450 *** crash.c: In function ‘func_1’: crash.c:11:1: internal compiler error: Aborted func_1 () ^ 0x7cbaef crash_signal ../../gcc-trunk/gcc/toplev.c:333 0xb3246c analyze_candidates_and_replace ../../gcc-trunk/gcc/gimple-ssa-strength-reduction.c:3398 0xb3246c execute_strength_reduction ../../gcc-trunk/gcc/gimple-ssa-strength-reduction.c:3447 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. --------------------------------- int a, c, d, *e; unsigned char b; char baz (char p1) { return p1 * a; } void func_65 (); func_1 () { func_65 (); func_65 (); } void func_65 () { d = baz (b--); if (*e) b--; c = 0; }