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