This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/39500] autopar fails to parallel
- From: "nemokingdom at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Mar 2009 01:27:10 -0000
- Subject: [Bug c/39500] autopar fails to parallel
- References: <bug-39500-17311@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from nemokingdom at gmail dot com 2009-03-19 01:27 -------
(In reply to comment #0)
> autopar fails auto-parallelization with the code below:
>
> int X[1000];
>
> int main(void)
> {
> int i;
>
> for (i = 0; i < 100; i++)
> X[i] = X[i+100];
>
> return 0;
> }
>
This bug basically about x1 and y1 not allowed to be in between zero and niter
- 1. This seems to be an typical off by one error.
x1 and y1 not allowed to be in between zero and niter - 1. This seems to
be an typical off by one error.
Index: tree-data-ref.c
===================================================================
--- tree-data-ref.c (revision 144721)
+++ tree-data-ref.c (working copy)
@@ -2292,7 +2292,7 @@
/* If the overlap occurs outside of the bounds of the
loop, there is no dependence. */
- if (x1 > niter || y1 > niter)
+ if (x1 >= niter || y1 >= niter)
{
*overlaps_a = conflict_fn_no_dependence ();
*overlaps_b = conflict_fn_no_dependence ();
--
nemokingdom at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39500