This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r262853 - in /branches/gomp-5_0-branch: gcc/Cha...
- From: jakub at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Wed, 18 Jul 2018 11:59:52 -0000
- Subject: r262853 - in /branches/gomp-5_0-branch: gcc/Cha...
Author: jakub
Date: Wed Jul 18 11:59:52 2018
New Revision: 262853
URL: https://gcc.gnu.org/viewcvs?rev=262853&root=gcc&view=rev
Log:
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.
Added:
branches/gomp-5_0-branch/gcc/testsuite/g++.dg/gomp/for-21.C
branches/gomp-5_0-branch/libgomp/testsuite/libgomp.c++/for-23.C
branches/gomp-5_0-branch/libgomp/testsuite/libgomp.c++/for-24.C
branches/gomp-5_0-branch/libgomp/testsuite/libgomp.c++/for-25.C
Modified:
branches/gomp-5_0-branch/gcc/ChangeLog.gomp
branches/gomp-5_0-branch/gcc/c-family/ChangeLog.gomp
branches/gomp-5_0-branch/gcc/c-family/c-omp.c
branches/gomp-5_0-branch/gcc/cp/ChangeLog.gomp
branches/gomp-5_0-branch/gcc/cp/cp-tree.h
branches/gomp-5_0-branch/gcc/cp/parser.c
branches/gomp-5_0-branch/gcc/cp/pt.c
branches/gomp-5_0-branch/gcc/cp/semantics.c
branches/gomp-5_0-branch/gcc/gimplify.c
branches/gomp-5_0-branch/gcc/omp-low.c
branches/gomp-5_0-branch/gcc/testsuite/ChangeLog.gomp
branches/gomp-5_0-branch/gcc/tree.h
branches/gomp-5_0-branch/libgomp/ChangeLog.gomp