1. Testcase generated by Csmith: struct S0 { int f7; }; struct S0 g_50; int g_70; int g_76; int foo (long long p_56, int * p_57) { int *l_77; int l_101; for (; g_70;) { int **l_78 = &l_77; if (g_50.f7) continue; *l_78 = 0; } for (g_76 = 1; g_76 >= 0; g_76--) { int *l_90; for (l_101 = 4; l_101 >= 0; l_101--) if (l_101) *l_90 = 0; else { int **l_113 = &l_77; *l_113 = p_57; } } return *l_77; } 2. Compile option and result: supertux@localhost:~/test> ~/gcc-devel/install/bin/gcc -O1 foo.c -S -ftree-vectorize foo.c: In function ‘foo’: foo.c:10:5: internal compiler error: Segmentation fault int foo (long long p_56, int * p_57) ^ 0xbeaed9 crash_signal ../../trunk/gcc/toplev.c:337 0x773af6 flow_bb_inside_loop_p(loop const*, basic_block_def const*) ../../trunk/gcc/cfgloop.c:789 0xe40de0 vect_is_simple_reduction_1 ../../trunk/gcc/tree-vect-loop.c:2324 0xe41bc6 vect_force_simple_reduction(_loop_vec_info*, gimple_statement_base*, bool, bool*) ../../trunk/gcc/tree-vect-loop.c:2617 0xe45eee vect_analyze_scalar_cycles_1 ../../trunk/gcc/tree-vect-loop.c:710 0xe4607c vect_analyze_scalar_cycles ../../trunk/gcc/tree-vect-loop.c:784 0xe475db vect_analyze_loop_2 ../../trunk/gcc/tree-vect-loop.c:1665 0xe47b92 vect_analyze_loop(loop*) ../../trunk/gcc/tree-vect-loop.c:1864 0xe5b742 vectorize_loops() ../../trunk/gcc/tree-vectorizer.c:432 0xd687b0 execute ../../trunk/gcc/tree-ssa-loop.c:232 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. 3. GCC version: supertux@localhost:~/test> ~/gcc-devel/install/bin/gcc -v Using built-in specs. COLLECT_GCC=/home/supertux/gcc-devel/install/bin/gcc COLLECT_LTO_WRAPPER=/home/supertux/gcc-devel/install/libexec/gcc/x86_64-suse-linux/4.10.0/lto-wrapper Target: x86_64-suse-linux Configured with: ../trunk/configure --build=x86_64-suse-linux --prefix=/home/supertux/gcc-devel/install --enable-languages=c --enable-checking --disable-libmudflap --disable-libssp --with-cpu=generic --disable-bootstrap Thread model: posix gcc version 4.10.0 20140809 (experimental) (GCC)
Author: rguenth Date: Mon Aug 11 11:24:35 2014 New Revision: 213812 URL: https://gcc.gnu.org/viewcvs?rev=213812&root=gcc&view=rev Log: 2014-08-11 Felix Yang <fei.yang0953@gmail.com> PR tree-optimization/62073 * tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has a basic block. * gcc.dg/vect/pr62073.c: New test. Added: trunk/gcc/testsuite/gcc.dg/vect/pr62073.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-vect-loop.c
Fixed.
Author: rguenth Date: Wed Aug 13 10:03:15 2014 New Revision: 213901 URL: https://gcc.gnu.org/viewcvs?rev=213901&root=gcc&view=rev Log: 2014-08-12 Felix Yang <fei.yang0953@gmail.com> PR tree-optimization/62073 * tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has a basic block. * gcc.dg/vect/pr62073.c: New test. Added: branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/vect/pr62073.c Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/testsuite/ChangeLog branches/gcc-4_9-branch/gcc/tree-vect-loop.c
Author: rguenth Date: Wed Aug 13 10:11:49 2014 New Revision: 213904 URL: https://gcc.gnu.org/viewcvs?rev=213904&root=gcc&view=rev Log: 2014-08-13 Felix Yang <fei.yang0953@gmail.com> PR tree-optimization/62073 * tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has a basic block. * gcc.dg/vect/pr62073.c: New test. Added: branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/vect/pr62073.c Modified: branches/gcc-4_8-branch/gcc/ChangeLog branches/gcc-4_8-branch/gcc/testsuite/ChangeLog branches/gcc-4_8-branch/gcc/tree-vect-loop.c