@@ -274,6 +274,13 @@ stmt_has_simple_data_refs_p (sese_l scop, gimple *stmt)
FOR_EACH_VEC_ELT (drs, j, dr)
{
int nb_subscripts = DR_NUM_DIMENSIONS (dr);
+
+ if (nb_subscripts < 1)
+ {
+ free_data_refs (drs);
+ return false;
+ }
+
tree ref = DR_REF (dr);
for (int i = nb_subscripts - 1; i >= 0; i--)
new file mode 100644
@@ -0,0 +1,10 @@
+void foo(unsigned char *in, unsigned char *out, int w, int h)
+{
+ unsigned int i, j;
+ for (i = 0; i < 3*w*h; i++)
+ for (j = 0; j < 3*w*h; j++)
+ out[i * w + j] = in[(i * w + j)*3] + in[(i * w + j)*3 + 1] + in[(i * w + j)*3 + 2];
+}
+
+/* Requires delinearization to be able to represent "i*w". */
+/* { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite" { xfail *-*-* } } } */