Command line: $ gcc -O1 -ftree-loop-distribution -fgraphite-identity -fstrict-aliasing -ftree-pre testcase.c or $ gcc -O2 -ftree-loop-distribution -fgraphite-identity testcase.c
Valgrind output: ==28123== Invalid read of size 8 ==28123== at 0x9210E1: instantiate_scev_r (tree-scalar-evolution.c:3391) ==28123== by 0x9213C1: instantiate_scev_r (tree-scalar-evolution.c:2296) ==28123== by 0x92217A: resolve_mixers (tree-scalar-evolution.c:2692) ==28123== by 0x922378: analyze_scalar_evolution_in_loop (tree-scalar-evolution.c:2039) ==28123== by 0x922D2F: simple_iv (tree-scalar-evolution.c:3132) ==28123== by 0x8C9114: dr_analyze_innermost (tree-data-ref.c:767) ==28123== by 0x8C95C9: create_data_ref (tree-data-ref.c:964) ==28123== by 0x8D0EDE: graphite_find_data_references_in_stmt (tree-data-ref.c:4262) ==28123== by 0xF412F9: scopdet_basic_block_info (graphite-scop-detection.c:285) ==28123== by 0xF41D6B: build_scops_1 (graphite-scop-detection.c:750) ==28123== by 0xF418DB: scopdet_basic_block_info (graphite-scop-detection.c:636) ==28123== by 0xF41D6B: build_scops_1 (graphite-scop-detection.c:750) ==28123== Address 0x10 is not stack'd, malloc'd or (recently) free'd ==28123== testcase.c: In function 'foo': testcase.c:8: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. Tested revisions: r163261 - crash r162940 - OK -- Summary: [4.6 Regression] ICE: SIGSEGV in instantiate_scev_r (tree-scalar-evolution.c:3391) with -O2 -ftree-loop- distribution -fgraphite-identity Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: zsojka at seznam dot cz GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45301