http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48159
Summary: [4.7 Regression] ICE: SIGSEGV in build2_stat (tree.c:3802) with -O -ftree-loop-distribution -fno-tree-ch -g Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 23687 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23687 reduced testcase (same as tree-ssa/pr39007.c) Compiler output: $ gcc -O -ftree-loop-distribution -fno-tree-ch -g testcase.c ==25254== Invalid read of size 2 ==25254== at 0xA60576: build2_stat (tree.c:3802) ==25254== by 0x5E140C: gimple_assign_rhs_to_tree (cfgexpand.c:78) ==25254== by 0xA0B6F6: insert_debug_temp_for_var_def (tree-ssa.c:398) ==25254== by 0xA0BB7F: insert_debug_temps_for_defs (tree-ssa.c:496) ==25254== by 0x74B7F9: gsi_remove (gimple-iterator.c:511) ==25254== by 0x92D351: distribute_loop (tree-loop-distribution.c:206) ==25254== by 0x92DD2E: tree_loop_distribution (tree-loop-distribution.c:1252) ==25254== by 0x7F8775: execute_one_pass (passes.c:1556) ==25254== by 0x7F8A74: execute_pass_list (passes.c:1611) ==25254== by 0x7F8A86: execute_pass_list (passes.c:1612) ==25254== by 0x7F8A86: execute_pass_list (passes.c:1612) ==25254== by 0x93BA05: tree_rest_of_compilation (tree-optimize.c:422) ==25254== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==25254== testcase.c: In function 'foo': testcase.c:1:6: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Tested revisions: r171047 - crash 4.6 r170955 - OK