This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp] Fix omp_is_private (PR middle-end/27388)
- From: Richard Henderson <rth at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Diego Novillo <dnovillo at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 3 May 2006 13:21:37 -0700
- Subject: Re: [gomp] Fix omp_is_private (PR middle-end/27388)
- References: <20060503111604.GR14147@devserv.devel.redhat.com>
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~