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.