]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree.h (OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE): Define.
authorJakub Jelinek <jakub@redhat.com>
Wed, 18 Jul 2018 11:59:52 +0000 (13:59 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 18 Jul 2018 11:59:52 +0000 (13:59 +0200)
commit86b681f8d0fac9fa34e8f628aa0e5315d2af2f66
tree0f7f903b3aaded0bb57f860538385c2caebd00c2
parent9e1b702f084d957d02e9e204eb6da2263cf18603
tree.h (OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE): Define.

gcc/
* tree.h (OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE): Define.
* gimplify.c (gimplify_omp_for): Handle C++ range for loops with
NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS.  Firstprivatize
__for_end and __for_range temporaries on OMP_PARALLEL for
distribute parallel for{, simd}.
* omp-low.c (lower_rec_input_clauses): Handle
OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
clauses.
gcc/c-family/
* c-omp.c (c_omp_check_loop_iv_r): Look for orig decl of C++
range for loops too.
gcc/cp/
* cp-tree.h (cp_convert_omp_range_for, cp_finish_omp_range_for,
finish_omp_for_block): Declare.
* parser.c (cp_parser_for): Pass false as new is_omp argument to
cp_parser_range_for.
(cp_parser_range_for): Add is_omp argument, return before finalizing
if it is true.
(cp_convert_omp_range_for, cp_finish_omp_range_for): New functions.
(cp_parser_omp_for_loop): Parse C++11 range for loops among omp
loops.
(cp_parser_omp_simd, cp_parser_omp_for, cp_parser_omp_distribute,
cp_parser_omp_taskloop): Call keep_next_level before
begin_omp_structured_block and call finish_omp_for_block on
finish_omp_structured_block result.
* semantics.c (handle_omp_for_class_iterator): Don't create a new
TREE_LIST if one has been created already for range for, just fill
TREE_PURPOSE and TREE_VALUE.
(finish_omp_for): Don't check cond/incr if cond is global_namespace.
Pass to c_omp_check_loop_iv_exprs orig_declv if non-NULL.  Don't
use IS_EMPTY_STMT on NULL pre_body.
(finish_omp_for_block): New function.
* pt.c (tsubst_decomp_names): Add forward declaration.
(tsubst_omp_for_iterator): Change orig_declv into a reference.
Handle range for loops.  Move orig_declv handling after declv/initv
handling.
(tsubst_expr): Call keep_next_level before begin_omp_structured_block.
Call cp_finish_omp_range_for for range for loops and use
{begin,finish}_omp_structured_block instead of {push,pop}_stmt_list
if there are any range for loops.  Call finish_omp_for_block on
finish_omp_structured_block result.
(dependent_omp_for_p): Always return true for range for loops if
processing_template_decl.
gcc/testsuite/
* g++.dg/gomp/for-21.C: New test.
libgomp/
* testsuite/libgomp.c++/for-23.C: New test.
* testsuite/libgomp.c++/for-24.C: New test.
* testsuite/libgomp.c++/for-25.C: New test.

From-SVN: r262853
17 files changed:
gcc/ChangeLog.gomp
gcc/c-family/ChangeLog.gomp
gcc/c-family/c-omp.c
gcc/cp/ChangeLog.gomp
gcc/cp/cp-tree.h
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/gimplify.c
gcc/omp-low.c
gcc/testsuite/ChangeLog.gomp
gcc/testsuite/g++.dg/gomp/for-21.C [new file with mode: 0644]
gcc/tree.h
libgomp/ChangeLog.gomp
libgomp/testsuite/libgomp.c++/for-23.C [new file with mode: 0644]
libgomp/testsuite/libgomp.c++/for-24.C [new file with mode: 0644]
libgomp/testsuite/libgomp.c++/for-25.C [new file with mode: 0644]