This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp3] Fix collapsed omp for loop with pointer iterator(s) in lastprivate
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 04 Jun 2008 07:49:34 -0400
- Subject: Re: [gomp3] Fix collapsed omp for loop with pointer iterator(s) in lastprivate
- References: <20080604083901.GI13386@devserv.devel.redhat.com>
>>>>> "Jakub" == Jakub Jelinek <jakub@redhat.com> writes:
> Hi!
> While working on tuplification of the OpenMP 3.0 stuff, I've noticed
> missed POINTER_PLUS_EXPR in an assert.
> 2008-06-04 Jakub Jelinek <jakub@redhat.com>
> * gimplify.c (gimplify_omp_for): Allow POINTER_PLUS_EXPR
> in assertion.
> * testsuite/libgomp.c/loop-9.c: New test.
> --- gcc/gimplify.c.jj 2008-05-16 14:51:34.000000000 +0200
> +++ gcc/gimplify.c 2008-06-04 10:32:26.000000000 +0200
> @@ -5564,7 +5564,8 @@ gimplify_omp_for (tree *expr_p, tree *pr
> gcc_assert (GIMPLE_STMT_OPERAND (t, 0) == var);
> t = GIMPLE_STMT_OPERAND (t, 1);
> gcc_assert (TREE_CODE (t) == PLUS_EXPR
> - || TREE_CODE (t) == MINUS_EXPR);
> + || TREE_CODE (t) == MINUS_EXPR
> + || TREE_CODE (t) == POINTER_PLUS_EXPR);
Doesn't this apply to the tuples branch as well? If so, feel free to
commit it there as well.
Aldy