Patchwork Fix the test libgomp.graphite/force-parallel-6.c

login
register
mail settings
Submitter Dominique Dhumieres
Date Oct. 23, 2012, 1:33 p.m.
Message ID <20121023133311.72B463BABA@mailhost.lps.ens.fr>
Download mbox | patch
Permalink /patch/193497/
State New
Headers show

Comments

Dominique Dhumieres - Oct. 23, 2012, 1:33 p.m.
The test libgomp.graphite/force-parallel-6.c is not valid as it tries
to write Y[2*N] for Y defined as

int X[2*N], Y[2*N], B[2*N];

This patch fixes the bounds of the loops in order to make the test valid

Since I don't have write access, could someone commit the patch if it
is approved?

Dominique

libgomp/ChangeLog
2012-10-23  Dominique d'Humieres  <dominiq@lps.ens.fr>

	* testsuite/libgomp.graphite/force-parallel-6.c: Adjust the loops.
Mike Stump - Oct. 23, 2012, 10:20 p.m.
On Oct 23, 2012, at 6:33 AM, Dominique Dhumieres <dominiq@lps.ens.fr> wrote:
> The test libgomp.graphite/force-parallel-6.c is not valid as it tries
> to write Y[2*N] for Y defined as

Ok.  [ Could someone check it in for Dominique? ]

> 2012-10-23  Dominique d'Humieres  <dominiq@lps.ens.fr>
> 
> 	* testsuite/libgomp.graphite/force-parallel-6.c: Adjust the loops.
> 
> --- ../_clean/libgomp/testsuite/libgomp.graphite/force-parallel-6.c	2011-12-06 15:36:08.000000000 +0100
> +++ libgomp/testsuite/libgomp.graphite/force-parallel-6.c	2012-10-23 14:55:12.000000000 +0200
> @@ -7,13 +7,13 @@ int foo(void)
> {
>   int i, j, k;
> 
> -  for (i = 1; i <= N; i++)
> +  for (i = 0; i < N; i++)
>     {
>       X[i] = Y[i] + 10;
> -      for (j = 1; j <= N; j++)
> +      for (j = 0; j < N; j++)
> 	{
> 	  B[j] = A[j][N];
> -	  for (k = 1; k <= N; k++)
> +	  for (k = 0; k < N; k++)
> 	    {
> 	      A[j+1][k] = B[j] + C[j][k];
> 	    }

Patch

--- ../_clean/libgomp/testsuite/libgomp.graphite/force-parallel-6.c	2011-12-06 15:36:08.000000000 +0100
+++ libgomp/testsuite/libgomp.graphite/force-parallel-6.c	2012-10-23 14:55:12.000000000 +0200
@@ -7,13 +7,13 @@  int foo(void)
 {
   int i, j, k;
 
-  for (i = 1; i <= N; i++)
+  for (i = 0; i < N; i++)
     {
       X[i] = Y[i] + 10;
-      for (j = 1; j <= N; j++)
+      for (j = 0; j < N; j++)
 	{
 	  B[j] = A[j][N];
-	  for (k = 1; k <= N; k++)
+	  for (k = 0; k < N; k++)
 	    {
 	      A[j+1][k] = B[j] + C[j][k];
 	    }