http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49632
Summary: ICE in compute_affine_dependence (tree-data-ref.c:4038) with -O3 Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: arthur.j.odw...@gmail.com Created attachment 24683 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24683 Output of "ajo-gcc -std=c99 -w -march=athlon64 -O3 -fcheck-data-deps test.c -v" Bug 49033 and/or bug 46851 might be related. This reproduces for me with svn revision 175547 (2011-06-30). It doesn't reproduce with gcc 4.5.1. I'm on Ubuntu 10.10, x86-64. cat >test.c <<EOF extern int g_107, g_123, l_98[7][7]; static int MUL(unsigned x, unsigned y) { return x*y; } void func_95(int p) { for (int i = 0; i < 5; ++i) { for (int j = 0; j < 5; ++j) { for (g_123 = 4; g_123 >= 0; --g_123) { l_98[0][0] = (l_98[i][j+1] != -l_98[i][0]) + (p * MUL(g_107 || l_98[0][1], 2*l_98[0][g_123+1]) || p); } l_98[i][j] = 0; } } } EOF gcc -std=c99 -w -march=athlon64 -O3 -fcheck-data-deps test.c (Number of distance vectors differ: Banerjee has 1, Omega has 2. Banerjee dist vectors: 0 1 Omega dist vectors: 0 1 0 -1 data dependence relation: (Data Dep: #(Data Ref: # bb: 18 # stmt: D.2624_83 = l_98[i_54][pretmp.10_69]; # ref: l_98[i_54][pretmp.10_69]; # base_object: l_98 # Access function 0: {1, +, 1}_2 # Access function 1: {0, +, 1}_1 #) #(Data Ref: # bb: 29 # stmt: l_98[i_54][j_55] = 0; # ref: l_98[i_54][j_55]; # base_object: l_98 # Access function 0: {0, +, 1}_2 # Access function 1: {0, +, 1}_1 #) access_fn_A: {1, +, 1}_2 access_fn_B: {0, +, 1}_2 (subscript iterations_that_access_an_element_twice_in_A: [1 + 1 * x_1] last_conflict: 4 iterations_that_access_an_element_twice_in_B: [0 + 1 * x_1] last_conflict: 4 (Subscript distance: 1 ) ) access_fn_A: {0, +, 1}_1 access_fn_B: {0, +, 1}_1 (subscript iterations_that_access_an_element_twice_in_A: [0] last_conflict: scev_not_known; iterations_that_access_an_element_twice_in_B: [0] last_conflict: scev_not_known; (Subscript distance: 0 ) ) inner loop index: 1 loop nest: (1 2 ) distance_vector: 0 1 distance_vector: 0 -1 direction_vector: = + direction_vector: = - ) ) test.c: In function ‘func_95’: test.c:3:6: internal compiler error: in compute_affine_dependence, at tree-data-ref.c:4038 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 --no-longlong --no-pointers --arrays --no-jumps --no-consts --volatiles --checksum --divs --muls --no-bitfields --packed-struct -s 1807040286