PR c++/86443
commited321d14e3b4685bbf4c46459d83920f944a74b1
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Jul 2018 07:12:37 +0000 (10 07:12 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Jul 2018 07:12:37 +0000 (10 07:12 +0000)
treef53906c4b6e36f6adb263e98f301f5e3fd465d11
parent9189e53b5fa32e8a828946b4ee2e27e7769c4942
PR c++/86443
* gimplify.c (find_combined_omp_for): Add DATA argument, in addition
to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
(gimplify_omp_for): For composite loops, move outer
OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
TREE_LIST for both the original class iterator and the "last" helper
var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
loop, remember has_decl_expr from outer composite loops for the
innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
gcc/c-family/
* c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
to contain TREE_LIST for both the original class iterator and the
"last" helper var.
gcc/cp/
* semantics.c (handle_omp_for_class_iterator): Remove lastp argument,
instead of setting *lastp turn orig_declv elt into a TREE_LIST.
(finish_omp_for): Adjust handle_omp_for_class_iterator caller.
* pt.c (tsubst_omp_for_iterator): Allow OMP_FOR_ORIG_DECLS to contain
TREE_LIST for both the original class iterator and the "last" helper
var.
libgomp/
* testsuite/libgomp.c++/for-15.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262534 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-omp.c
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/gimplify.c
libgomp/ChangeLog
libgomp/testsuite/libgomp.c++/for-15.C [new file with mode: 0644]