]> git.ipfire.org Git - thirdparty/gcc.git/commit
gimplify.c (gimplify_omp_depend): Load block from elt 5 instead of 4...
authorJakub Jelinek <jakub@redhat.com>
Thu, 2 Aug 2018 18:25:26 +0000 (20:25 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 2 Aug 2018 18:25:26 +0000 (20:25 +0200)
commit47a4f8b75b8e67d32f750c0a51e25eeb738e1d74
tree27ceb423f11b0445f6e45f0d6e54b4cdbae35aa7
parented6b446b13ea26231840339cea35010e4badb2a3
gimplify.c (gimplify_omp_depend): Load block from elt 5 instead of 4...

* gimplify.c (gimplify_omp_depend): Load block from elt 5 instead
of 4, in 4 expect to find original step expression, gimplify it and
use it to determine if iterating upwards or downwards.  When iterating
downwards with unsigned iterator type, negate both the difference and
step before division.
gcc/c/
* c-parser.c (c_parser_omp_iterators): Build vector with 6 elts
instead of 5.
(c_parser_omp_clause_depend): Put block into elt 5 instead of 4.
* c-typeck.c (c_omp_finish_iterators): Remove iterator if step is
errorneous, diagnose if step doesn't have integral type.  Remember
original step expression wrapped with save_expr and store that to
elt 4.
gcc/cp/
* parser.c (cp_parser_omp_iterators): Build vector with 6 elts
instead of 5.
(cp_parser_omp_clause_depend): Put block into elt 5 instead of 4.
* semantics.c (cp_omp_finish_iterators): Remove iterator if step is
errorneous, diagnose if step doesn't have integral type.  Remember
original step expression wrapped with save_expr and store that to
elt 4.  If processing_template_decl, punt earlier if begin/end/step
are type dependent expression, and only update step to the orig_step.
* pt.c (tsubst_omp_clause_decl): Put block into elt 5 instead of 4.
gcc/testsuite/
* c-c++-common/gomp/depend-iterator-2.c (f1): Adjust expected
diagnostics, split the test with step 3.5 into one where only
begin/end are floating point, and one where only step is floating
point.
* g++.dg/gomp/depend-iterator-2.C (f1, f3): Likewise.
libgomp/
* testsuite/libgomp.c-c++-common/depend-iterator-1.c: Add tests for
unsigned iterators, add gaps in between different arr2 bits.
* testsuite/libgomp.c++/depend-iterator-1.C: Likewise.

From-SVN: r263274
15 files changed:
gcc/ChangeLog.gomp
gcc/c/ChangeLog.gomp
gcc/c/c-parser.c
gcc/c/c-typeck.c
gcc/cp/ChangeLog.gomp
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/gimplify.c
gcc/testsuite/ChangeLog.gomp
gcc/testsuite/c-c++-common/gomp/depend-iterator-2.c
gcc/testsuite/g++.dg/gomp/depend-iterator-2.C
libgomp/ChangeLog.gomp
libgomp/testsuite/libgomp.c++/depend-iterator-1.C
libgomp/testsuite/libgomp.c-c++-common/depend-iterator-1.c