8ca5b2a2d4
PR c++/26943 * omp-low.c (maybe_lookup_decl_in_outer_ctx): New function. (build_outer_var_ref): Use maybe_lookup_decl_in_outer_ctx to find if var will be a global variable even in the nested context. (omp_copy_decl): Only check for global variable at the end, it might be overridden in outer contexts. (scan_sharing_clauses): For global variables don't create a field. (lower_rec_input_clauses): Do nothing for global shared variables. Emit a barrier at the end of ILIST if there were any decls in both firstprivate and lastprivate clauses. (lower_send_clauses): Do nothing for global variables except for COPYIN. * testsuite/libgomp.c/pr26943-1.c: New test. * testsuite/libgomp.c/pr26943-2.c: New test. * testsuite/libgomp.c/pr26943-3.c: New test. * testsuite/libgomp.c/pr26943-4.c: New test. * testsuite/libgomp.c++/pr27337.C: Remove barrier. * testsuite/libgomp.c++/pr26943.C: New test. From-SVN: r113483 |
||
---|---|---|
.. | ||
appendix-a | ||
atomic-1.c | ||
atomic-2.c | ||
atomic-10.c | ||
barrier-1.c | ||
c.exp | ||
copyin-1.c | ||
copyin-2.c | ||
copyin-3.c | ||
critical-1.c | ||
critical-2.c | ||
lib-1.c | ||
loop-1.c | ||
loop-2.c | ||
loop-3.c | ||
nested-1.c | ||
nested-2.c | ||
nestedfn-1.c | ||
nestedfn-2.c | ||
nestedfn-3.c | ||
omp_hello.c | ||
omp_matvec.c | ||
omp_orphan.c | ||
omp_reduction.c | ||
omp_workshare1.c | ||
omp_workshare2.c | ||
omp_workshare3.c | ||
omp_workshare4.c | ||
omp-loop01.c | ||
omp-loop02.c | ||
omp-loop03.c | ||
omp-nested-1.c | ||
omp-parallel-for.c | ||
omp-parallel-if.c | ||
omp-single-1.c | ||
omp-single-2.c | ||
omp-single-3.c | ||
ordered-1.c | ||
ordered-2.c | ||
ordered-3.c | ||
parallel-1.c | ||
pr24455-1.c | ||
pr24455.c | ||
pr26171.c | ||
pr26943-1.c | ||
pr26943-2.c | ||
pr26943-3.c | ||
pr26943-4.c | ||
reduction-1.c | ||
reduction-2.c | ||
reduction-3.c | ||
reduction-4.c | ||
sections-1.c | ||
shared-1.c | ||
shared-2.c | ||
shared-3.c | ||
single-1.c | ||
single-2.c | ||
vla-1.c |