Created attachment 24656 [details] Output of "ajo-gcc -std=c99 -O -ftree-vectorize test.c -v" This failure reproduces for me with svn revision 175547 (2011-06-27). I'm on Ubuntu 10.10, x86-64. cat >test.c <<EOF extern int g_7; void func_13(int p_17) { for (int i=0; i < 16; i = (signed char)(i+1)) { g_7 &= p_17; g_7 &= (p_17 > 1); } } EOF gcc -std=c99 -O -ftree-vectorize test.c test.c: In function ‘func_13’: test.c:2:6: internal compiler error: Segmentation fault Program received signal SIGSEGV, Segmentation fault. flow_bb_inside_loop_p (loop=0x7ffff7ec1f68, bb=0x0) at ../../gcc/cfgloop.c:776 776 source_loop = bb->loop_father; (gdb) backtrace #0 flow_bb_inside_loop_p (loop=0x7ffff7ec1f68, bb=0x0) at ../../gcc/cfgloop.c:776 #1 0x00000000009cb3bb in vect_is_slp_reduction (loop_info=0x14c56e0, phi=XXX) at ../../gcc/tree-vect-loop.c:1807 #2 vect_is_simple_reduction_1 (loop_info=0x14c56e0, phi=XXX) at ../../gcc/tree-vect-loop.c:2269 [...] This test case is reduced from the output of Csmith 2.1.0 (git hash 01aa8b04, https://github.com/Quuxplusone/csmith/), using the following command line: csmith --no-paranoid --longlong --pointers --arrays --no-jumps --consts --no-volatiles --checksum --no-divs --muls --bitfields --packed-struct -s 1439171589
Revision 174379 is OK, r174433 is not.
It could be due to revision 174425: Author: irar Date: Mon May 30 07:15:31 2011 UTC (4 weeks, 4 days ago) Changed paths: 5 Log Message: PR tree-optimization/49199 * tree-vect-loop.c (vect_is_slp_reduction): Check that the non-reduction operands are either defined in the loop or by induction.
Author: irar Date: Sun Jul 3 10:14:55 2011 New Revision: 175786 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175786 Log: PR tree-optimization/49610 * tree-vect-loop.c (vect_is_slp_reduction): Check that DEF_STMT has a basic block. Added: trunk/gcc/testsuite/gcc.dg/vect/pr49610.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-vect-loop.c
Fixed.