https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
--- Comment #15 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Kai Tietz from comment #14) > (In reply to H.J. Lu from comment #13) > > (In reply to Kai Tietz from comment #12) > > > Hmm, just retested it for gcc's trunk. Can't reproduce it. I will retest > > > with current trunk, I might have a different patch in tree, which makes > > > the > > > difference here. > > > Additionally, what target you are using? > > > > Also happened on 4.9 branch: > > So for me it doesn't happen on trunk, so the "Also" seems to me something > special for you. I will recheck 4.9, as here we might have a regression I > didn't caught ... I don't know why you didn't see it: Starting program: /export/build/gnu/gcc-4.9/build-x86_64-linux/gcc/cc1 -fpreprocessed /tmp/x.i -quiet -dumpbase x.i -mtune=generic -march=x86-64 -auxbase x -O -version -ftree-vectorize -o x.i GNU C (GCC) version 4.9.3 20150225 (prerelease) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.8.3 20140911 (Red Hat 4.8.3-7), GMP version 5.1.2, MPFR version 3.1.2, MPC version 1.0.1 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C (GCC) version 4.9.3 20150225 (prerelease) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.8.3 20140911 (Red Hat 4.8.3-7), GMP version 5.1.2, MPFR version 3.1.2, MPC version 1.0.1 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: e64a271cb64a39ff067a5fd30c57a8d9 Program received signal SIGSEGV, Segmentation fault. 0x0000000000c1efa1 in gimple_code (g=0x0) at /export/gnu/import/git/gcc-release/gcc/gimple.h:1406 1406 return g->code; (gdb) bt #0 0x0000000000c1efa1 in gimple_code (g=0x0) at /export/gnu/import/git/gcc-release/gcc/gimple.h:1406 #1 0x0000000000c2bc5d in vectorizable_reduction ( stmt=<gimple_assign 0x7ffff19e0000>, gsi=0x0, vec_stmt=0x0, slp_node=0x0) at /export/gnu/import/git/gcc-release/gcc/tree-vect-loop.c:4915 #2 0x0000000000c1bcca in vect_analyze_stmt ( stmt=<gimple_assign 0x7ffff19e0000>, need_to_vectorize=0x7fffffffd6af, node=0x0) at /export/gnu/import/git/gcc-release/gcc/tree-vect-stmts.c:7107 #3 0x0000000000c1b723 in vect_analyze_stmt ( stmt=<gimple_assign 0x7ffff19d32c0>, need_to_vectorize=0x7fffffffd6af, node=0x0) at /export/gnu/import/git/gcc-release/gcc/tree-vect-stmts.c:7023 #4 0x0000000000c24048 in vect_analyze_loop_operations (loop_vinfo=0x1a75950, slp=false) at /export/gnu/import/git/gcc-release/gcc/tree-vect-loop.c:1505 #5 0x0000000000c247ee in vect_analyze_loop_2 (loop_vinfo=0x1a75950) at /export/gnu/import/git/gcc-release/gcc/tree-vect-loop.c:1766 #6 0x0000000000c24b73 in vect_analyze_loop (loop=0x7ffff19d50a0) at /export/gnu/import/git/gcc-release/gcc/tree-vect-loop.c:1864 #7 0x0000000000c41516 in vectorize_loops () at /export/gnu/import/git/gcc-release/gcc/tree-vectorizer.c:430 #8 0x0000000000b713d3 in tree_loop_vectorize () at /export/gnu/import/git/gcc-release/gcc/tree-ssa-loop.c:154 #9 0x0000000000b7145d in (anonymous namespace)::pass_vectorize::execute ( this=0x1a20150) ---Type <return> to continue, or q <return> to quit--- at /export/gnu/import/git/gcc-release/gcc/tree-ssa-loop.c:189 #10 0x000000000095dde6 in execute_one_pass ( pass=<opt_pass* 0x1a20150 "vect"(119)>) at /export/gnu/import/git/gcc-release/gcc/passes.c:2233 #11 0x000000000095dfff in execute_pass_list ( pass=<opt_pass* 0x1a20150 "vect"(119)>) at /export/gnu/import/git/gcc-release/gcc/passes.c:2286 #12 0x000000000095e030 in execute_pass_list ( pass=<opt_pass* 0x1a1fa30 "loop"(101)>) at /export/gnu/import/git/gcc-release/gcc/passes.c:2287 #13 0x000000000095e030 in execute_pass_list ( pass=<opt_pass* 0x1a1e950 "*all_optimizations"(-1)>) at /export/gnu/import/git/gcc-release/gcc/passes.c:2287 #14 0x00000000006bb569 in expand_function ( node=<cgraph_node* 0x7ffff18a9e18 "f">) at /export/gnu/import/git/gcc-release/gcc/cgraphunit.c:1774 #15 0x00000000006bb9ca in expand_all_functions () at /export/gnu/import/git/gcc-release/gcc/cgraphunit.c:1908 #16 0x00000000006bc2ed in compile () at /export/gnu/import/git/gcc-release/gcc/cgraphunit.c:2252 #17 0x00000000006bc3c8 in finalize_compilation_unit () at /export/gnu/import/git/gcc-release/gcc/cgraphunit.c:2329 #18 0x00000000005817c7 in c_write_global_declarations () ---Type <return> to continue, or q <return> to quit---q at /export/gnu/import/gQuit (gdb) f 2 #2 0x0000000000c1bcca in vect_analyze_stmt ( stmt=<gimple_assign 0x7ffff19e0000>, need_to_vectorize=0x7fffffffd6af, node=0x0) at /export/gnu/import/git/gcc-release/gcc/tree-vect-stmts.c:7107 7107 || vectorizable_reduction (stmt, NULL, NULL, NULL) (gdb) call debug_gimple_stmt (stmt) patt_25 = a_lsm.8_11 < 0 ? 7 : 0; (gdb) f 1 #1 0x0000000000c2bc5d in vectorizable_reduction ( stmt=<gimple_assign 0x7ffff19e0000>, gsi=0x0, vec_stmt=0x0, slp_node=0x0) at /export/gnu/import/git/gcc-release/gcc/tree-vect-loop.c:4915 4915 if (gimple_code (reduc_def_stmt) != GIMPLE_PHI) (gdb) p reduc_def_stmt $2 = <gimple 0x0> (gdb)