r132748 - in /branches/gomp-3_0-branch: gcc/Cha...
jakub@gcc.gnu.org
jakub@gcc.gnu.org
Thu Feb 28 14:31:00 GMT 2008
Author: jakub
Date: Thu Feb 28 14:31:47 2008
New Revision: 132748
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132748
Log:
* langhooks.h (lang_hooks_for_decls): Add omp_private_outer_ref
hook, add another argument to omp_clause_default_ctor hook.
* langhooks-def.h (LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
(LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): Change to
hook_tree_tree_tree_tree_null.
(LANG_HOOKS_DECLS): Add LANG_HOOKS_OMP_PRIVATE_OUTER_REF.
* hooks.c (hook_tree_tree_tree_tree_null): New function.
* hooks.h (hook_tree_tree_tree_tree_null): New prototype.
* gimplify.c (enum gimplify_omp_var_data): Add GOVD_PRIVATE_OUTER_REF.
(omp_notice_variable): Set GOVD_PRIVATE_OUTER_REF if needed,
if it is set, lookup var in outer contexts too.
(gimplify_scan_omp_clauses): Likewise, set
OMP_CLAUSE_PRIVATE_OUTER_REF if GOVD_PRIVATE_OUTER_REF is set.
(gimplify_adjust_omp_clauses_1): Set OMP_CLAUSE_PRIVATE_OUTER_REF if
GOVD_PRIVATE_OUTER_REF is set.
* tree-nested.c (convert_nonlocal_omp_clauses,
convert_local_omp_clauses): Set placeholder context before walking
OMP_CLAUSE_REDUCTION_INIT.
* tree.h (OMP_CLAUSE_PRIVATE_OUTER_REF): Define.
* omp-low.c (scan_sharing_clauses): Handle
OMP_CLAUSE_PRIVATE_OUTER_REF.
(lower_rec_input_clauses): Pass outer var ref to
omp_clause_default_ctor hook if OMP_CLAUSE_PRIVATE_OUTER_REF
or OMP_CLAUSE_LASTPRIVATE. Replace OMP_CLAUSE_REDUCTION_PLACEHOLDER
decls in OMP_CLAUSE_REDUCTION_INIT.
(lower_send_clauses): Handle OMP_CLAUSE_PRIVATE_OUTER_REF.
* cp-tree.h (cxx_omp_clause_default_ctor): Add outer argument.
* cp-gimplify.c (cxx_omp_clause_default_ctor): Likewise.
* openmp.c (resolve_omp_clauses): Allow allocatable arrays in
firstprivate, lastprivate, reduction, copyprivate and copyin
clauses.
* trans-openmp.c (gfc_omp_private_outer_ref): New function.
(gfc_omp_clause_default_ctor): Add outer argument. For allocatable
arrays allocate them with the bounds of the outer var if outer
var is allocated.
(gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
gfc_omp_clause_dtor): New functions.
(gfc_trans_omp_array_reduction): If decl is allocatable array,
allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
* trans.h (gfc_omp_clause_default_ctor): Add another argument.
(gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
* f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
* gfortran.dg/gomp/appendix-a/a.33.4.f90: Remove dg-error
about allocatable array.
* gfortran.dg/gomp/reduction1.f90: Likewise.
* testsuite/libgomp.fortran/allocatable1.f90: New test.
* testsuite/libgomp.fortran/allocatable2.f90: New test.
Added:
branches/gomp-3_0-branch/libgomp/testsuite/libgomp.fortran/allocatable1.f90
branches/gomp-3_0-branch/libgomp/testsuite/libgomp.fortran/allocatable2.f90
Modified:
branches/gomp-3_0-branch/gcc/ChangeLog.gomp
branches/gomp-3_0-branch/gcc/cp/ChangeLog.gomp
branches/gomp-3_0-branch/gcc/cp/cp-gimplify.c
branches/gomp-3_0-branch/gcc/cp/cp-tree.h
branches/gomp-3_0-branch/gcc/fortran/ChangeLog.gomp
branches/gomp-3_0-branch/gcc/fortran/f95-lang.c
branches/gomp-3_0-branch/gcc/fortran/openmp.c
branches/gomp-3_0-branch/gcc/fortran/trans-openmp.c
branches/gomp-3_0-branch/gcc/fortran/trans.h
branches/gomp-3_0-branch/gcc/gimplify.c
branches/gomp-3_0-branch/gcc/hooks.c
branches/gomp-3_0-branch/gcc/hooks.h
branches/gomp-3_0-branch/gcc/langhooks-def.h
branches/gomp-3_0-branch/gcc/langhooks.h
branches/gomp-3_0-branch/gcc/omp-low.c
branches/gomp-3_0-branch/gcc/testsuite/ChangeLog.gomp
branches/gomp-3_0-branch/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.33.4.f90
branches/gomp-3_0-branch/gcc/testsuite/gfortran.dg/gomp/reduction1.f90
branches/gomp-3_0-branch/gcc/tree-nested.c
branches/gomp-3_0-branch/gcc/tree.h
branches/gomp-3_0-branch/libgomp/ChangeLog.gomp
More information about the Gcc-cvs
mailing list