Consider this example: cat > pr41118.c <<EOF
void foo(int n, int *a, int *b) { int i; for (i = 0; i < n; i++) a[i] = b[i]; } EOF gcc -S -O2 pr41118.c -floop-parallelize-all -ftree-parallelize-loops=2 grep GOMP 41118.s GCC considers the loop parallel, even though arrays pointed to by arguments may arbitrarily overlap. This is because dependency analysis in graphite treats p[i] as global_mem[alias_set_for_p][i]. In this example, since both a and b have alias set 0, a[0][i0] and b[0][i1] are considered independent for i0 != i1. -- Summary: Wrong dependence analysis in graphite for unrestricted pointers Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: amonakov at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41118