This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gomp] Fix omp_is_private (PR middle-end/27388)


On Wed, May 03, 2006 at 07:16:04AM -0400, Jakub Jelinek wrote:
> BTW: I really wonder when the "iteration variable %qs should be private"
> error could trigger - omp for can't have explicit shared clause and the
> iteration var should be scanned before the loop body.  Maybe
> replacing
> 	  if (ctx == gimplify_omp_ctxp)
> 	    {
> 	      error ("iteration variable %qs should be private",
> 		     IDENTIFIER_POINTER (DECL_NAME (decl)));
> 	      n->value = GOVD_PRIVATE;
> 	      return true;
> 	    }
> 	  else
> with
> 	  gcc_assert (ctx != gimplify_omp_ctxp);
> would be enough.

Because IIRC we're supposed to error for

  #pragma omp parallel for shared (i)
   for (i = 0; i < 10; ++i) foo();

but something broke, and we no longer do...


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]