From 12de6bc686b5e794c2ae69c96b54825ef43c5e3e Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Fri, 3 Mar 2006 21:47:24 +0000 Subject: dependency.c (gfc_check_element_vs_element): Consider two unordered scalar subscripts as (potentially) equal. * dependency.c (gfc_check_element_vs_element): Consider two unordered scalar subscripts as (potentially) equal. * gfortran.dg/dependency_9.f90: New test case. From-SVN: r111687 --- gcc/fortran/dependency.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/fortran/dependency.c') diff --git a/gcc/fortran/dependency.c b/gcc/fortran/dependency.c index 187b207..129caa3 100644 --- a/gcc/fortran/dependency.c +++ b/gcc/fortran/dependency.c @@ -739,8 +739,14 @@ gfc_check_element_vs_element (gfc_ref * lref, gfc_ref * rref, int n) i = gfc_dep_compare_expr (r_start, l_start); if (i == 0) return GFC_DEP_EQUAL; + /* Treat two scalar variables as potentially equal. This allows + us to prove that a(i,:) and a(j,:) have no dependency. See + Gerald Roth, "Evaluation of Array Syntax Dependence Analysis", + Proceedings of the International Conference on Parallel and + Distributed Processing Techniques and Applications (PDPTA2001), + Las Vegas, Nevada, June 2001. This used to be GFC_DEP_OVERLAP. */ if (i == -2) - return GFC_DEP_OVERLAP; + return GFC_DEP_EQUAL; return GFC_DEP_NODEP; } -- cgit v1.1