https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62073
Bug ID: 62073 Summary: Segmentation fault with tree vectorize Product: gcc Version: 4.10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: fei.yang0953 at gmail dot com 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)