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 |
||
---|---|---|
.. | ||
config | ||
testsuite | ||
acinclude.m4 | ||
aclocal.m4 | ||
alloc.c | ||
barrier.c | ||
ChangeLog | ||
config.h.in | ||
configure | ||
configure.ac | ||
configure.tgt | ||
critical.c | ||
env.c | ||
error.c | ||
fortran.c | ||
iter.c | ||
libgomp_f.h.in | ||
libgomp_g.h | ||
libgomp.h | ||
libgomp.map | ||
libgomp.spec.in | ||
loop.c | ||
Makefile.am | ||
Makefile.in | ||
NOTES | ||
omp_lib.f90.in | ||
omp_lib.h.in | ||
omp.h.in | ||
ordered.c | ||
parallel.c | ||
sections.c | ||
single.c | ||
team.c | ||
work.c |