http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49033

           Summary: ICE in compute_affine_dependence
                    (tree-data-ref.c:4090) with -O3 -fcheck-data-deps
           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 24273
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24273
Output of "ajo-gcc -w -std=c99 -O3 -march=native -fcheck-data-deps
test891883150.c -v"

This reproduces for me with svn revision 173589 (2011-05-09). It doesn't
reproduce with gcc 4.5.1. I'm on Ubuntu 10.10, x86-64.

-std=c99 isn't necessary if you get rid of the declarations inside the for-loop
headers. Removing -march=native causes the crash to go away.

Bug 46851 might be related.

cat >test891883150.c <<EOF
extern unsigned short g_185;
extern int g_86;
void func_72() {
    int g_120[4];
    short l_81[6] = {1,2,3,4,5,6};
    for (int p_75 = 0; p_75 < 5; ++p_75) {
        g_86 += l_81[p_75];
        for (int p_76 = 0; p_76 < 5; ++p_76)
          if (fff(l_81[0], ff(p_75) && g_86))
            complicated2(g_120);

        for (int l_217 = 0; l_217 < 6; ++l_217)
          for (g_185 = 0; g_185 < 6; ++g_185)
            l_81[g_185] = 0;
    }
}
EOF
gcc -w -std=c99 -O3 -march=native -fcheck-data-deps test891883150.c


(Number of distance vectors differ: Banerjee has 2, Omega has 1.
Banerjee dist vectors:
  0 
  1 
Omega dist vectors:
  0 
data dependence relation:
(Data Dep: 
#(Data Ref: 
#  bb: 28 
#  stmt: l_81[D.2668_112] = 0;
#  ref: l_81[D.2668_112];
#  base_object: l_81
#  Access function 0: 0
#)
#(Data Ref: 
#  bb: 29 
#  stmt: pretmp.13_30 = l_81[0];
#  ref: l_81[0];
#  base_object: l_81
#  Access function 0: 0
#)
  access_fn_A: 0
  access_fn_B: 0

 (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: 0
  loop nest: (1 )
  distance_vector:   0 
  direction_vector:     =
)
)
test891883150.c: In function ‘func_72’:
test891883150.c:3:6: internal compiler error: in compute_affine_dependence, at
tree-data-ref.c:4090


This test case is reduced from the output of Csmith 2.1.0 (git hash 541a6480,
https://github.com/csmith-project/csmith/), using the following command line:
csmith --no-paranoid --no-longlong --no-pointers --arrays --no-jumps --consts
--no-volatiles --checksum --divs --no-muls --bitfields --no-packed-struct -s
891883150

Reply via email to