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 |
||
---|---|---|
.. | ||
c++.exp | ||
copyin-1.C | ||
copyin-2.C | ||
ctor-1.C | ||
ctor-2.C | ||
ctor-3.C | ||
ctor-4.C | ||
ctor-5.C | ||
ctor-6.C | ||
ctor-7.C | ||
ctor-8.C | ||
ctor-9.C | ||
loop-1.C | ||
loop-2.C | ||
loop-3.C | ||
loop-4.C | ||
loop-5.C | ||
loop-6.C | ||
loop-7.C | ||
master-1.C | ||
nested-1.C | ||
parallel-1.C | ||
pr24455-1.C | ||
pr24455.C | ||
pr26691.C | ||
pr26943.C | ||
pr27337.C | ||
reduction-1.C | ||
reduction-2.C | ||
reduction-3.C | ||
sections-1.C | ||
shared-1.C | ||
shared-2.C | ||
single-1.C | ||
single-2.C | ||
single-3.C |