http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50133

             Bug #: 50133
           Summary: [4.7 Regression] ICE: SIGSEGV in
                    vect_finish_stmt_generation (gimple.h:4821) with
                    -ftree-vectorize -fno-tree-loop-im
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: zso...@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 25057
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25057
testcase (gcc.dg/pr46184.c)

Compiler output:
$ gcc -O -ftree-vectorize -fno-tree-loop-im testcase.c
==6443== Invalid read of size 8
==6443==    at 0xB053E1: vect_finish_stmt_generation(gimple_statement_d*,
gimple_statement_d*, gimple_stmt_iterator*) (gimple.h:4821)
==6443==    by 0xB05C8E: vect_init_vector(gimple_statement_d*, tree_node*,
tree_node*, gimple_stmt_iterator*) (tree-vect-stmts.c:1082)
==6443==    by 0xB07625: vectorizable_load(gimple_statement_d*,
gimple_stmt_iterator*, gimple_statement_d**, _slp_tree*, _slp_instance*)
(tree-vect-stmts.c:4626)
==6443==    by 0xB1268C: vect_transform_stmt(gimple_statement_d*,
gimple_stmt_iterator*, bool*, _slp_tree*, _slp_instance*)
(tree-vect-stmts.c:5197)
==6443==    by 0xB2270B: vect_transform_loop(_loop_vec_info*)
(tree-vect-loop.c:5332)
==6443==    by 0xB2F678: vectorize_loops() (tree-vectorizer.c:205)
==6443==    by 0x8A6046: execute_one_pass(opt_pass*) (passes.c:2063)
==6443==    by 0x8A63B4: execute_pass_list(opt_pass*) (passes.c:2118)
==6443==    by 0x8A63C6: execute_pass_list(opt_pass*) (passes.c:2119)
==6443==    by 0x8A63C6: execute_pass_list(opt_pass*) (passes.c:2119)
==6443==    by 0x9FE69D: tree_rest_of_compilation(tree_node*)
(tree-optimize.c:420)
==6443==    by 0x653A55: cgraph_expand_function(cgraph_node*)
(cgraphunit.c:1797)
==6443==    by 0x6557BA: cgraph_optimize() (cgraphunit.c:1856)
==6443==    by 0x655E49: cgraph_finalize_compilation_unit() (cgraphunit.c:1310)
==6443==    by 0x537367: c_write_global_declarations() (c-decl.c:9881)
==6443==    by 0x99C191: toplev_main(int, char**) (toplev.c:564)
==6443==    by 0x6734D2C: (below main) (in /lib64/libc-2.12.2.so)
==6443==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==6443== 
testcase.c: In function 'foo':
testcase.c:4: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:
r177889 - crash
r177543 - crash
r173150 - OK

Reply via email to