From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15810 invoked by alias); 2 May 2006 20:03:49 -0000 Received: (qmail 15786 invoked by alias); 2 May 2006 20:03:44 -0000 Date: Tue, 02 May 2006 20:03:00 -0000 Message-ID: <20060502200344.15785.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/26943] [gomp] firstprivate not working properly with non-POD In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-05/txt/msg00219.txt.bz2 List-Id: ------- Comment #8 from jakub at gcc dot gnu dot org 2006-05-02 20:03 ------- Subject: Bug 26943 Author: jakub Date: Tue May 2 20:03:38 2006 New Revision: 113483 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113483 Log: 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. Added: trunk/libgomp/testsuite/libgomp.c++/pr26943.C trunk/libgomp/testsuite/libgomp.c/pr26943-1.c trunk/libgomp/testsuite/libgomp.c/pr26943-2.c trunk/libgomp/testsuite/libgomp.c/pr26943-3.c trunk/libgomp/testsuite/libgomp.c/pr26943-4.c Modified: trunk/gcc/ChangeLog trunk/gcc/omp-low.c trunk/libgomp/ChangeLog trunk/libgomp/testsuite/libgomp.c++/pr27337.C -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26943