http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48182
Summary: ICE: SIGSEGV in try_crossjump_to_edge (cfgcleanup.c:1703) with --param min-crossjump-insns=0 on basic code Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 23706 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23706 reduced testcase Compiler output: $ gcc -fcrossjumping --param min-crossjump-insns=0 testcase.c -fcombine-stack-adjustments ==1021== Invalid read of size 2 ==1021== at 0xF68F3C: try_crossjump_to_edge (cfgcleanup.c:1703) ==1021== by 0xF6AE27: try_crossjump_bb (cfgcleanup.c:1875) ==1021== by 0xF6BDBA: cleanup_cfg (cfgcleanup.c:2475) ==1021== by 0xFAC2F0: rest_of_handle_stack_adjustments (combine-stack-adj.c:554) ==1021== by 0x7F9C45: execute_one_pass (passes.c:1556) ==1021== by 0x7F9F34: execute_pass_list (passes.c:1611) ==1021== by 0x7F9F46: execute_pass_list (passes.c:1612) ==1021== by 0x7F9F46: execute_pass_list (passes.c:1612) ==1021== by 0x93E3F5: tree_rest_of_compilation (tree-optimize.c:422) ==1021== by 0xB0E3E1: cgraph_expand_function (cgraphunit.c:1576) ==1021== by 0xB10E2C: cgraph_optimize (cgraphunit.c:1733) ==1021== by 0xB110B9: cgraph_finalize_compilation_unit (cgraphunit.c:1096) ==1021== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==1021== testcase.c: In function 'foo': testcase.c:7:1: 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. Originally, it crashed with "-O2 --param min-crossjump-insns=0", so this isn't a case of running random passes at -O0. Tested revisions: 171088 - crash 4.0.4 - 4.6 - crash 3.4.6 - doesn't know min-crossjump-insns