PR middle-end/66199
* tree.h (OMP_TEAMS_COMBINED): Define.
* gimplify.c (enum gimplify_omp_var_data): Add
GOVD_LINEAR_LASTPRIVATE_NO_OUTER.
(enum omp_region_type): Add ORT_COMBINED_TEAMS.
(omp_notice_variable): Accept both ORT_TEAMS
and ORT_COMBINED_TEAMS. Don't recurse if
GOVD_LINEAR_LASTPRIVATE_NO_OUTER is set and either
GOVD_LINEAR is set, or GOVD_LASTPRIVATE without
GOVD_FIRSTPRIVATE.
(omp_no_lastprivate): New function.
(gimplify_scan_omp_clauses): For OMP_CLAUSE_LASTPRIVATE
and OMP_CLAUSE_LINEAR, if omp_no_lastprivate, don't
notice_outer and set appropriate bits, otherwise make
sure default(none) combined constructs won't complain.
(gimplify_adjust_omp_clauses): Remove OMP_CLAUSE_LINEAR
outer special casing, for OMP_CLAUSE_LASTPRIVATE if
omp_no_lastprivate either remove the clause or turn it
into OMP_CLAUSE_PRIVATE.
(gimplify_omp_for): Fix up handling of implicit
lastprivate or linear iterators.
(gimplify_omp_workshare): For OMP_TEAMS_COMBINED use
ORT_COMBINED_TEAMS.
* omp-low.c (lower_omp_for_lastprivate): For combined
for simd use fd.loop.n2 from the for rather than simd.
gcc/c/
* c-parser.c (c_parser_omp_for_loop): Don't add
OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
(c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
constructs.
gcc/cp/
* parser.c (cp_parser_omp_for_loop): Don't add
OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
(cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
constructs.
gcc/fortran/
* trans-openmp.c (gfc_trans_omp_teams): Set OMP_TEAMS_COMBINED for
combined constructs.
(gfc_trans_omp_target): Make sure BIND_EXPR has non-NULL
BIND_EXPR_BLOCK.
libgomp/
* testsuite/libgomp.c/pr66199-1.c: New test.
* testsuite/libgomp.c/pr66199-2.c: New test.
* testsuite/libgomp.c++/pr66199-1.C: New test.
* testsuite/libgomp.c++/pr66199-2.C: New test.
* testsuite/libgomp.fortran/pr66199-1.f90: New test.
* testsuite/libgomp.fortran/pr66199-2.f90: New test.
From-SVN: r223387
PR fortran/65597
* trans-openmp.c (gfc_trans_omp_do): For !simple simd with explicit
linear clause for the iterator set OMP_CLAUSE_LINEAR_NO_COPYIN.
For implcitly added !simple OMP_CLAUSE_LINEAR set it too. Use step 1
instead of the original step on the new iterator - count.
* testsuite/libgomp.fortran/pr65597.f90: New test.
From-SVN: r221776
gcc/
* varpool.c (varpool_node::get_create): Don't set 'offloadable' flag for
the external decls.
libgomp/
* testsuite/libgomp.fortran/declare-target-1.f90: New test.
* testsuite/libgomp.fortran/declare-target-2.f90: New file.
From-SVN: r221421
* testsuite/libgomp.c/examples-4/e.53.4.c: Add -DITESTITERS=20
to dg-options unless expensive testing is on.
(TESTITERS): Define to N if not defined.
(main): Use TESTITERS instead of N.
* testsuite/libgomp.c/examples-4/e.55.1.c: Define CHUNKSZ from
dg-additional-options depending on whether expensive testing is on.
* testsuite/libgomp.fortran/examples-4/e.55.1.f90 (e_55_1_mod):
Decrease N to 100000 and CHUNKSZ to 10000.
From-SVN: r218095
PR fortran/63938
* trans-openmp.c (gfc_trans_omp_atomic): Make sure lhsaddr is
simple enough for goa_lhs_expr_p.
* libgomp.fortran/pr63938-1.f90: New test.
* libgomp.fortran/pr63938-2.f90: New test.
From-SVN: r218031
* libgomp.c/examples-4/e.54.2.c (main): Use N / 8 instead
of 32 as block_size.
* libgomp.fortran/examples-4/e.54.2.f90 (e_54_1): Use n / 8
instead of 32 as block_size.
From-SVN: r217579
* langhooks-def.h (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Define.
(LANG_HOOKS_DECLS): Add it.
* gimplify.c (gimplify_omp_for): Make sure OMP_CLAUSE_LINEAR_STEP
has correct type.
* tree.h (OMP_CLAUSE_LINEAR_ARRAY): Define.
* langhooks.h (struct lang_hooks_for_decls): Add
omp_clause_linear_ctor hook.
* omp-low.c (lower_rec_input_clauses): Set max_vf even if
OMP_CLAUSE_LINEAR_ARRAY is set. Don't fold_convert
OMP_CLAUSE_LINEAR_STEP. For OMP_CLAUSE_LINEAR_ARRAY in
combined simd loop use omp_clause_linear_ctor hook.
gcc/c/
* c-typeck.c (c_finish_omp_clauses): Make sure
OMP_CLAUSE_LINEAR_STEP has correct type.
gcc/cp/
* semantics.c (finish_omp_clauses): Make sure
OMP_CLAUSE_LINEAR_STEP has correct type.
gcc/fortran/
* trans.h (gfc_omp_clause_linear_ctor): New prototype.
* trans-openmp.c (gfc_omp_linear_clause_add_loop,
gfc_omp_clause_linear_ctor): New functions.
(gfc_trans_omp_clauses): Make sure OMP_CLAUSE_LINEAR_STEP has
correct type. Set OMP_CLAUSE_LINEAR_ARRAY flag if needed.
* f95-lang.c (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Redefine.
libgomp/
* testsuite/libgomp.fortran/simd5.f90: New test.
* testsuite/libgomp.fortran/simd6.f90: New test.
* testsuite/libgomp.fortran/simd7.f90: New test.
From-SVN: r211971
* gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP,
OMP_CLAUSE_TO, OMP_CLAUSE_FROM): Make sure OMP_CLAUSE_SIZE is
non-NULL.
<case OMP_CLAUSE_ALIGNED>: Gimplify OMP_CLAUSE_ALIGNED_ALIGNMENT.
(gimplify_adjust_omp_clauses_1): Make sure OMP_CLAUSE_SIZE is
non-NULL.
(gimplify_adjust_omp_clauses): Likewise.
* omp-low.c (lower_rec_simd_input_clauses,
lower_rec_input_clauses, expand_omp_simd): Handle non-constant
safelen the same as safelen(1).
* tree-nested.c (convert_nonlocal_omp_clauses,
convert_local_omp_clauses): Handle OMP_CLAUSE_ALIGNED. For
OMP_CLAUSE_{MAP,TO,FROM} if not decl use walk_tree.
(convert_nonlocal_reference_stmt, convert_local_reference_stmt):
Fixup handling of GIMPLE_OMP_TARGET.
(convert_tramp_reference_stmt, convert_gimple_call): Handle
GIMPLE_OMP_TARGET.
gcc/fortran/
* dump-parse-tree.c (show_omp_namelist): Use n->udr->udr instead
of n->udr.
* f95-lang.c (gfc_init_builtin_functions): Initialize
BUILT_IN_ASSUME_ALIGNED.
* gfortran.h (gfc_omp_namelist): Change udr field type to
struct gfc_omp_namelist_udr.
(gfc_omp_namelist_udr): New type.
(gfc_get_omp_namelist_udr): Define.
(gfc_resolve_code): New prototype.
* match.c (gfc_free_omp_namelist): Free name->udr.
* module.c (intrinsics): Add INTRINSIC_USER.
(fix_mio_expr): Likewise.
(mio_expr): Handle INSTRINSIC_USER and non-resolved EXPR_FUNCTION.
* openmp.c (gfc_match_omp_clauses): Adjust initialization of n->udr.
(gfc_match_omp_declare_reduction): Treat len=: the same as len=*.
Set attr.flavor on omp_{out,in,priv,orig} artificial variables.
(struct resolve_omp_udr_callback_data): New type.
(resolve_omp_udr_callback, resolve_omp_udr_callback2,
resolve_omp_udr_clause): New functions.
(resolve_omp_clauses): Adjust for n->udr changes, resolve UDR clauses
here.
(omp_udr_callback): Don't check for implicitly declared functions
here.
(gfc_resolve_omp_udr): Don't call gfc_resolve. Don't check for
implicitly declared subroutines here.
* resolve.c (resolve_function): If value.function.isym is non-NULL,
consider it already resolved.
(resolve_code): Renamed to ...
(gfc_resolve_code): ... this. No longer static.
(gfc_resolve_blocks, generate_component_assignments, resolve_codes):
Adjust callers.
* trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
by reference type (C_PTR) variables.
(gfc_omp_finish_clause): Make sure OMP_CLAUSE_SIZE is non-NULL.
(gfc_trans_omp_udr_expr): Remove.
(gfc_trans_omp_array_reduction_or_udr): Adjust for n->udr changes.
Don't call gfc_trans_omp_udr_expr, even for sym->attr.dimension
expand it as assignment or subroutine call. Don't initialize
value.function.isym.
gcc/testsuite/
* gfortran.dg/gomp/udr2.f90 (f7, f9): Add !$omp parallel with
reduction clause.
* gfortran.dg/gomp/udr4.f90 (f4): Likewise.
Remove Label is never defined expected error.
* gfortran.dg/gomp/udr8.f90: New test.
libgomp/
* testsuite/libgomp.fortran/aligned1.f03: New test.
* testsuite/libgomp.fortran/nestedfn5.f90: New test.
* testsuite/libgomp.fortran/target7.f90: Surround loop spawning
tasks with !$omp parallel !$omp single.
* testsuite/libgomp.fortran/target8.f90: New test.
* testsuite/libgomp.fortran/udr4.f90 (foo UDR, bar UDR): Adjust
not to use trim in the combiner, instead call elemental function.
(fn): New elemental function.
* testsuite/libgomp.fortran/udr6.f90 (do_add, dp_add, dp_init):
Make elemental.
* testsuite/libgomp.fortran/udr7.f90 (omp_priv, omp_orig, omp_out,
omp_in): Likewise.
* testsuite/libgomp.fortran/udr12.f90: New test.
* testsuite/libgomp.fortran/udr13.f90: New test.
* testsuite/libgomp.fortran/udr14.f90: New test.
* testsuite/libgomp.fortran/udr15.f90: New test.
From-SVN: r211929
PR fortran/60928
* omp-low.c (lower_rec_input_clauses) <case OMP_CLAUSE_LASTPRIVATE>:
Set lastprivate_firstprivate even if omp_private_outer_ref
langhook returns true.
<case OMP_CLAUSE_REDUCTION>: When calling omp_clause_default_ctor
langhook, call unshare_expr on new_var and call
build_outer_var_ref to get the last argument.
gcc/c-family/
* c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
(omp_pragmas): ... back here.
gcc/fortran/
* f95-lang.c (gfc_init_builtin_functions): Handle -fopenmp-simd
like -fopenmp.
* openmp.c (resolve_omp_clauses): Remove allocatable components
diagnostics. Add associate-name and intent(in) pointer
diagnostics for various clauses, diagnose procedure pointers in
reduction clause.
* parse.c (match_word_omp_simd): New function.
(matchs, matcho): New macros.
(decode_omp_directive): Change match macros to either matchs
or matcho. Handle -fopenmp-simd.
(next_free, next_fixed): Handle -fopenmp-simd like -fopenmp.
* scanner.c (skip_free_comments, skip_fixed_comments, include_line):
Likewise.
* trans-array.c (get_full_array_size): Rename to...
(gfc_full_array_size): ... this. No longer static.
(duplicate_allocatable): Adjust caller. Add NO_MEMCPY argument
and handle it.
(gfc_duplicate_allocatable, gfc_copy_allocatable_data): Adjust
duplicate_allocatable callers.
(gfc_duplicate_allocatable_nocopy): New function.
(structure_alloc_comps): Adjust g*_full_array_size and
duplicate_allocatable caller.
* trans-array.h (gfc_full_array_size,
gfc_duplicate_allocatable_nocopy): New prototypes.
* trans-common.c (create_common): Call gfc_finish_decl_attrs.
* trans-decl.c (gfc_finish_decl_attrs): New function.
(gfc_finish_var_decl, create_function_arglist,
gfc_get_fake_result_decl): Call it.
(gfc_allocate_lang_decl): If DECL_LANG_SPECIFIC is already allocated,
don't allocate it again.
(gfc_get_symbol_decl): Set GFC_DECL_ASSOCIATE_VAR_P on
associate-names.
* trans.h (gfc_finish_decl_attrs): New prototype.
(struct lang_decl): Add scalar_allocatable and scalar_pointer
bitfields.
(GFC_DECL_SCALAR_ALLOCATABLE, GFC_DECL_SCALAR_POINTER,
GFC_DECL_GET_SCALAR_ALLOCATABLE, GFC_DECL_GET_SCALAR_POINTER,
GFC_DECL_ASSOCIATE_VAR_P): Define.
(GFC_POINTER_TYPE_P): Remove.
* trans-openmp.c (gfc_omp_privatize_by_reference): Don't check
GFC_POINTER_TYPE_P, instead test GFC_DECL_GET_SCALAR_ALLOCATABLE,
GFC_DECL_GET_SCALAR_POINTER or GFC_DECL_CRAY_POINTEE on decl.
(gfc_omp_predetermined_sharing): Associate-names are predetermined.
(enum walk_alloc_comps): New.
(gfc_has_alloc_comps, gfc_omp_unshare_expr_r, gfc_omp_unshare_expr,
gfc_walk_alloc_comps): New functions.
(gfc_omp_private_outer_ref): Return true for scalar allocatables or
decls with allocatable components.
(gfc_omp_clause_default_ctor, gfc_omp_clause_copy_ctor,
gfc_omp_clause_assign_op, gfc_omp_clause_dtor): Fix up handling of
allocatables, handle also OMP_CLAUSE_REDUCTION, handle scalar
allocatables and decls with allocatable components.
(gfc_trans_omp_array_reduction_or_udr): Don't handle allocatable
arrays here.
(gfc_trans_omp_reduction_list): Call
gfc_trans_omp_array_reduction_or_udr even for allocatable scalars.
(gfc_trans_omp_do_simd): If -fno-openmp, just expand it as OMP_SIMD.
(gfc_trans_omp_parallel_do_simd): Likewise.
* trans-types.c (gfc_sym_type): Don't set GFC_POINTER_TYPE_P.
(gfc_get_derived_type): Call gfc_finish_decl_attrs.
gcc/testsuite/
* gfortran.dg/gomp/allocatable_components_1.f90: Remove dg-error
directives.
* gfortran.dg/gomp/associate1.f90: New test.
* gfortran.dg/gomp/intentin1.f90: New test.
* gfortran.dg/gomp/openmp-simd-1.f90: New test.
* gfortran.dg/gomp/openmp-simd-2.f90: New test.
* gfortran.dg/gomp/openmp-simd-3.f90: New test.
* gfortran.dg/gomp/proc_ptr_2.f90: New test.
libgomp/
* testsuite/libgomp.fortran/allocatable9.f90: New test.
* testsuite/libgomp.fortran/allocatable10.f90: New test.
* testsuite/libgomp.fortran/allocatable11.f90: New test.
* testsuite/libgomp.fortran/allocatable12.f90: New test.
* testsuite/libgomp.fortran/alloc-comp-1.f90: New test.
* testsuite/libgomp.fortran/alloc-comp-2.f90: New test.
* testsuite/libgomp.fortran/alloc-comp-3.f90: New test.
* testsuite/libgomp.fortran/associate1.f90: New test.
* testsuite/libgomp.fortran/associate2.f90: New test.
* testsuite/libgomp.fortran/procptr1.f90: New test.
From-SVN: r211397
gcc/fortran/
* dump-parse-tree.c (show_omp_namelist): Dump reduction
id in each list item.
(show_omp_node): Only handle OMP_LIST_REDUCTION, not
OMP_LIST_REDUCTION_FIRST .. OMP_LIST_REDUCTION_LAST. Don't
dump reduction id here.
* frontend-passes.c (dummy_code_callback): Renamed to...
(gfc_dummy_code_callback): ... this. No longer static.
(optimize_reduction): Use gfc_dummy_code_callback instead of
dummy_code_callback.
* gfortran.h (gfc_statement): Add ST_OMP_DECLARE_REDUCTION.
(symbol_attribute): Add omp_udr_artificial_var bitfield.
(gfc_omp_reduction_op): New enum.
(gfc_omp_namelist): Add rop and udr fields.
(OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT,
OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV,
OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND,
OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST): Removed.
(OMP_LIST_REDUCTION): New.
(gfc_omp_udr): New type.
(gfc_get_omp_udr): Define.
(gfc_symtree): Add n.omp_udr field.
(gfc_namespace): Add omp_udr_root field, add omp_udr_ns bitfield.
(gfc_free_omp_udr, gfc_omp_udr_find, gfc_resolve_omp_udrs,
gfc_dummy_code_callback): New prototypes.
* match.h (gfc_match_omp_declare_reduction): New prototype.
* module.c (MOD_VERSION): Increase to 13.
(omp_declare_reduction_stmt): New array.
(mio_omp_udr_expr, write_omp_udr, write_omp_udrs, load_omp_udrs):
New functions.
(read_module): Read OpenMP user defined reductions.
(write_module): Write OpenMP user defined reductions.
* openmp.c: Include arith.h.
(gfc_free_omp_udr, gfc_find_omp_udr): New functions.
(gfc_match_omp_clauses): Handle user defined reductions.
Store reduction kind into gfc_omp_namelist instead of using
several OMP_LIST_* entries.
(match_udr_expr, gfc_omp_udr_predef, gfc_omp_udr_find,
gfc_match_omp_declare_reduction): New functions.
(resolve_omp_clauses): Adjust for reduction clauses being only
in OMP_LIST_REDUCTION list. Diagnose missing UDRs.
(struct omp_udr_callback_data): New type.
(omp_udr_callback, gfc_resolve_omp_udr, gfc_resolve_omp_udrs): New
functions.
* parse.c (decode_omp_directive): Handle !$omp declare reduction.
(case_decl): Add ST_OMP_DECLARE_REDUCTION.
(gfc_ascii_statement): Print ST_OMP_DECLARE_REDUCTION.
* resolve.c (resolve_fl_variable): Allow len=: or len=* on
sym->attr.omp_udr_artificial_var symbols.
(resolve_types): Call gfc_resolve_omp_udrs.
* symbol.c (gfc_get_uop): If gfc_current_ns->omp_udr_ns,
use parent ns instead of gfc_current_ns.
(gfc_get_sym_tree): Don't insert symbols into
namespaces with omp_udr_ns set.
(free_omp_udr_tree): New function.
(gfc_free_namespace): Call it.
* trans-openmp.c (struct omp_udr_find_orig_data): New type.
(omp_udr_find_orig, gfc_trans_omp_udr_expr): New functions.
(gfc_trans_omp_array_reduction): Renamed to...
(gfc_trans_omp_array_reduction_or_udr): ... this. Remove SYM
argument, instead pass gfc_omp_namelist pointer N. Handle
user defined reductions.
(gfc_trans_omp_reduction_list): Remove REDUCTION_CODE argument.
Handle user defined reductions and reduction ops in gfc_omp_namelist.
(gfc_trans_omp_clauses): Adjust for just a single OMP_LIST_REDUCTION
list.
(gfc_split_omp_clauses): Likewise.
gcc/testsuite/
* gfortran.dg/gomp/allocatable_components_1.f90: Adjust for
reduction clause diagnostic changes.
* gfortran.dg/gomp/appendix-a/a.31.3.f90: Likewise.
* gfortran.dg/gomp/reduction1.f90: Likewise.
* gfortran.dg/gomp/reduction3.f90: Likewise.
* gfortran.dg/gomp/udr1.f90: New test.
* gfortran.dg/gomp/udr2.f90: New test.
* gfortran.dg/gomp/udr3.f90: New test.
* gfortran.dg/gomp/udr4.f90: New test.
* gfortran.dg/gomp/udr5.f90: New test.
* gfortran.dg/gomp/udr6.f90: New test.
* gfortran.dg/gomp/udr7.f90: New test.
libgomp/
* testsuite/libgomp.fortran/simd1.f90: New test.
* testsuite/libgomp.fortran/udr1.f90: New test.
* testsuite/libgomp.fortran/udr2.f90: New test.
* testsuite/libgomp.fortran/udr3.f90: New test.
* testsuite/libgomp.fortran/udr4.f90: New test.
* testsuite/libgomp.fortran/udr5.f90: New test.
* testsuite/libgomp.fortran/udr6.f90: New test.
* testsuite/libgomp.fortran/udr7.f90: New test.
* testsuite/libgomp.fortran/udr8.f90: New test.
* testsuite/libgomp.fortran/udr9.f90: New test.
* testsuite/libgomp.fortran/udr10.f90: New test.
* testsuite/libgomp.fortran/udr11.f90: New test.
From-SVN: r211303
* tree.h (OMP_CLAUSE_LINEAR_STMT): Define.
* tree.c (omp_clause_num_ops): Increase OMP_CLAUSE_LINEAR
number of operands to 3.
(walk_tree_1): Walk all operands of OMP_CLAUSE_LINEAR.
* tree-nested.c (convert_nonlocal_omp_clauses,
convert_local_omp_clauses): Handle OMP_CLAUSE_DEPEND.
* gimplify.c (gimplify_scan_omp_clauses): Handle
OMP_CLAUSE_LINEAR_STMT.
* omp-low.c (lower_rec_input_clauses): Fix typo.
(maybe_add_implicit_barrier_cancel, lower_omp_1): Add
cast between Fortran boolean_type_node and C _Bool if
needed.
gcc/fortran/
* gfortran.h (gfc_statement): Add ST_OMP_CANCEL,
ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
ST_OMP_DECLARE_SIMD.
(gfc_omp_namelist): New typedef.
(gfc_get_omp_namelist): Define.
(OMP_LIST_UNIFORM, OMP_LIST_ALIGNED, OMP_LIST_LINEAR,
OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): New clause list kinds.
(gfc_omp_proc_bind_kind, gfc_omp_cancel_kind): New enums.
(gfc_omp_clauses): Change type of lists to gfc_omp_namelist *.
Add inbranch, notinbranch, cancel, proc_bind, safelen_expr and
simdlen_expr fields.
(gfc_omp_declare_simd): New typedef.
(gfc_get_omp_declare_simd): Define.
(gfc_namespace): Add omp_declare_simd field.
(gfc_exec_op): Add EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
EXEC_OMP_TASKGROUP, EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and
EXEC_OMP_PARALLEL_DO_SIMD.
(gfc_omp_atomic_op): Add GFC_OMP_ATOMIC_MASK, GFC_OMP_ATOMIC_SEQ_CST
and GFC_OMP_ATOMIC_SWAP.
(gfc_code): Change type of omp_namelist field to gfc_omp_namelist *.
(gfc_free_omp_namelist, gfc_free_omp_declare_simd,
gfc_free_omp_declare_simd_list, gfc_resolve_omp_declare_simd): New
prototypes.
* trans-stmt.h (gfc_trans_omp_declare_simd): New prototype.
* symbol.c (gfc_free_namespace): Call gfc_free_omp_declare_simd.
* openmp.c (gfc_free_omp_clauses): Free safelen_expr and
simdlen_expr. Use gfc_free_omp_namelist instead of
gfc_free_namelist.
(gfc_free_omp_declare_simd, gfc_free_omp_declare_simd_list): New
functions.
(gfc_match_omp_variable_list): Add end_colon, headp and
allow_sections arguments. Handle parsing of array sections.
Use *omp_namelist* instead of *namelist* data structure and
functions/macros. Allow termination at : character.
(OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH,
OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND,
OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM): Define.
(gfc_match_omp_clauses): Change first and needs_space variables
into arguments with default values. Parse inbranch, notinbranch,
proc_bind, safelen, simdlen, uniform, linear, aligned and
depend clauses.
(OMP_PARALLEL_CLAUSES): Add OMP_CLAUSE_PROC_BIND.
(OMP_DECLARE_SIMD_CLAUSES, OMP_SIMD_CLAUSES): Define.
(OMP_TASK_CLAUSES): Add OMP_CLAUSE_DEPEND.
(gfc_match_omp_do_simd): New function.
(gfc_match_omp_flush): Use *omp_namelist* instead of *namelist*
data structure and functions/macros.
(gfc_match_omp_simd, gfc_match_omp_declare_simd,
gfc_match_omp_parallel_do_simd): New functions.
(gfc_match_omp_atomic): Handle seq_cst clause. Handle atomic swap.
(gfc_match_omp_taskgroup, gfc_match_omp_cancel_kind,
gfc_match_omp_cancel, gfc_match_omp_cancellation_point): New
functions.
(resolve_omp_clauses): Add where, omp_clauses and ns arguments.
Use *omp_namelist* instead of *namelist* data structure and
functions/macros. Resolve uniform, aligned, linear, depend,
safelen and simdlen clauses.
(resolve_omp_atomic): Adjust for GFC_OMP_ATOMIC_{MASK,SEQ_CST,SWAP}
addition, recognize atomic swap.
(gfc_resolve_omp_parallel_blocks): Use gfc_omp_namelist instead
of gfc_namelist. Handle EXEC_OMP_PARALLEL_DO_SIMD the same as
EXEC_OMP_PARALLEL_DO.
(gfc_resolve_do_iterator): Use *omp_namelist* instead of *namelist*
data structure and functions/macros.
(resolve_omp_do): Likewise. Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
EXEC_OMP_PARALLEL_DO_SIMD.
(gfc_resolve_omp_directive): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
EXEC_OMP_PARALLEL_DO_SIMD and EXEC_OMP_CANCEL. Adjust
resolve_omp_clauses caller.
(gfc_resolve_omp_declare_simd): New function.
* parse.c (decode_omp_directive): Parse cancellation point, cancel,
declare simd, end do simd, end simd, end parallel do simd,
end taskgroup, parallel do simd, simd and taskgroup directives.
(case_executable): Add ST_OMP_CANCEL and ST_OMP_CANCELLATION_POINT.
(case_exec_markers): Add ST_OMP_TASKGROUP, case ST_OMP_SIMD,
ST_OMP_DO_SIMD and ST_OMP_PARALLEL_DO_SIMD.
(case_decl): Add ST_OMP_DECLARE_SIMD.
(gfc_ascii_statement): Handle ST_OMP_CANCEL,
ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
ST_OMP_DECLARE_SIMD.
(parse_omp_do): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD and
ST_OMP_PARALLEL_DO_SIMD.
(parse_omp_atomic): Adjust for GFC_OMP_ATOMIC_* additions.
(parse_omp_structured_block): Handle ST_OMP_TASKGROUP and
ST_OMP_PARALLEL_DO_SIMD.
(parse_executable): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD,
ST_OMP_PARALLEL_DO_SIMD and ST_OMP_TASKGROUP.
* trans-decl.c (gfc_get_extern_function_decl,
gfc_create_function_decl): Call gfc_trans_omp_declare_simd if
needed.
* frontend-passes.c (gfc_code_walker): Handle EXEC_OMP_SIMD,
EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD. Walk
safelen_expr and simdlen_expr. Walk expressions in gfc_omp_namelist
of depend, aligned and linear clauses.
* match.c (match_exit_cycle): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD
and EXEC_OMP_PARALLEL_DO_SIMD.
(gfc_free_omp_namelist): New function.
* dump-parse-tree.c (show_namelist): Removed.
(show_omp_namelist): New function.
(show_omp_node): Handle OpenMP 4.0 additions.
(show_code_node): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and
EXEC_OMP_TASKGROUP.
* match.h (gfc_match_omp_cancel, gfc_match_omp_cancellation_point,
gfc_match_omp_declare_simd, gfc_match_omp_do_simd,
gfc_match_omp_parallel_do_simd, gfc_match_omp_simd,
gfc_match_omp_taskgroup): New prototypes.
* trans-openmp.c (gfc_trans_omp_variable): Add declare_simd
argument, handle it. Allow current_function_decl to be NULL.
(gfc_trans_omp_variable_list): Add declare_simd argument, pass
it through to gfc_trans_omp_variable and disregard whether
sym is referenced if declare_simd is true. Work on gfc_omp_namelist
instead of gfc_namelist.
(gfc_trans_omp_reduction_list): Work on gfc_omp_namelist instead of
gfc_namelist. Adjust gfc_trans_omp_variable caller.
(gfc_trans_omp_clauses): Add declare_simd argument, pass it through
to gfc_trans_omp_variable{,_list} callers. Work on gfc_omp_namelist
instead of gfc_namelist. Handle inbranch, notinbranch, safelen,
simdlen, depend, uniform, linear, proc_bind and aligned clauses.
Handle cancel kind.
(gfc_trans_omp_atomic): Handle seq_cst clause, handle atomic swap,
adjust for GFC_OMP_ATOMIC_* changes.
(gfc_trans_omp_cancel, gfc_trans_omp_cancellation_point): New
functions.
(gfc_trans_omp_do): Add op argument, handle simd translation into
generic.
(GFC_OMP_SPLIT_SIMD, GFC_OMP_SPLIT_DO, GFC_OMP_SPLIT_PARALLEL,
GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_SIMD, GFC_OMP_MASK_DO,
GFC_OMP_MASK_PARALLEL): New.
(gfc_split_omp_clauses, gfc_trans_omp_do_simd): New functions.
(gfc_trans_omp_parallel_do): Rework to use gfc_split_omp_clauses.
(gfc_trans_omp_parallel_do_simd, gfc_trans_omp_taskgroup): New
functions.
(gfc_trans_omp_directive): Handle EXEC_OMP_CANCEL,
EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
Adjust gfc_trans_omp_do caller.
(gfc_trans_omp_declare_simd): New function.
* st.c (gfc_free_statement): Handle EXEC_OMP_CANCEL,
EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
For EXEC_OMP_FLUSH call gfc_free_omp_namelist instead of
gfc_free_namelist.
* module.c (omp_declare_simd_clauses): New variable.
(mio_omp_declare_simd): New function.
(mio_symbol): Call it.
* trans.c (trans_code): Handle EXEC_OMP_CANCEL,
EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
* resolve.c (gfc_resolve_blocks): Handle EXEC_OMP_DO_SIMD,
EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
(resolve_code): Handle EXEC_OMP_CANCEL,
EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
(resolve_types): Call gfc_resolve_omp_declare_simd.
gcc/testsuite/
* gfortran.dg/gomp/affinity-1.f90: New test.
libgomp/
* testsuite/libgomp.fortran/cancel-do-1.f90: New test.
* testsuite/libgomp.fortran/cancel-do-2.f90: New test.
* testsuite/libgomp.fortran/cancel-parallel-1.f90: New test.
* testsuite/libgomp.fortran/cancel-parallel-3.f90: New test.
* testsuite/libgomp.fortran/cancel-sections-1.f90: New test.
* testsuite/libgomp.fortran/cancel-taskgroup-2.f90: New test.
* testsuite/libgomp.fortran/declare-simd-1.f90: New test.
* testsuite/libgomp.fortran/declare-simd-2.f90: New test.
* testsuite/libgomp.fortran/declare-simd-3.f90: New test.
* testsuite/libgomp.fortran/depend-1.f90: New test.
* testsuite/libgomp.fortran/depend-2.f90: New test.
* testsuite/libgomp.fortran/omp_atomic5.f90: New test.
* testsuite/libgomp.fortran/simd1.f90: New test.
* testsuite/libgomp.fortran/simd2.f90: New test.
* testsuite/libgomp.fortran/simd3.f90: New test.
* testsuite/libgomp.fortran/simd4.f90: New test.
* testsuite/libgomp.fortran/taskgroup1.f90: New test.
From-SVN: r210313
2013-06-20 Iain Sandoe <iain@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
* testsuite/lib/libgomp.exp: Reorder lib loads into dependency order.
Do not load_gcc_lib gcc-dg.exp and add a comment as to why.
* testsuite/libgomp.c/c.exp: load_gcc_lib gcc-dg.exp.
* testsuite/libgomp.fortran/fortran.exp: Likewise.
* testsuite/libgomp.graphite/graphite.exp: Likewise.
* testsuite/libgomp.c++/c++.exp: load_gcc_lib gcc-dg.exp.
Use dg-runtest rather than gfortran-dg-runtest.
Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
From-SVN: r200253
* trans-decl.c (get_proc_pointer_decl): Set DECL_TLS_MODEL
if threadprivate.
* symbol.c (check_conflict): Allow threadprivate attribute with
FL_PROCEDURE if proc_pointer.
* testsuite/libgomp.fortran/threadprivate4.f90: New test.
From-SVN: r178114
PR fortran/49792
* trans-expr.c (gfc_trans_assignment_1): Set OMPWS_SCALARIZER_WS
bit in ompws_flags only if loop.temp_ss is NULL, and clear it if
lhs needs reallocation.
* trans-openmp.c (gfc_trans_omp_workshare): Don't return early if
code is NULL, emit a barrier if workshare emitted no code at all
and NOWAIT clause isn't present.
* testsuite/libgomp.fortran/pr49792-1.f90: New test.
* testsuite/libgomp.fortran/pr49792-2.f90: New test.
From-SVN: r177898
Merge from gomp-3_1-branch branch:
2011-08-02 Jakub Jelinek <jakub@redhat.com>
gcc/
* c-parser.c (enum c_parser_prec): New enum, moved from within
c_parser_binary_expression.
(c_parser_binary_expression): Add PREC argument. Stop parsing
if operator has lower or equal precedence than PREC.
(c_parser_conditional_expression, c_parser_omp_for_loop): Adjust
callers.
(c_parser_omp_atomic): Handle parsing OpenMP 3.1 atomics.
Adjust c_finish_omp_atomic caller.
(c_parser_omp_taskyield): New function.
(c_parser_pragma): Handle PRAGMA_OMP_TASKYIELD.
(c_parser_omp_clause_name): Handle final and mergeable clauses.
(c_parser_omp_clause_final, c_parser_omp_clause_mergeable): New
functions.
(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FINAL
and PRAGMA_OMP_CLAUSE_MERGEABLE.
(OMP_TASK_CLAUSE_MASK): Allow final and mergeable clauses.
(c_parser_omp_clause_reduction): Handle min and max.
* c-typeck.c (c_finish_omp_clauses): Don't complain about
const qualified predetermined vars in firstprivate clause.
andle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE.
Handle MIN_EXPR and MAX_EXPR.
* tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_FINAL
and OMP_CLAUSE_MERGEABLE.
(dump_generic_node): Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD
and OMP_ATOMIC_CAPTURE_NEW.
* tree.c (omp_clause_num_ops): Add OMP_CLAUSE_FINAL and
OMP_CLAUSE_MERGEABLE.
(omp_clause_code_name): Likewise.
(walk_tree_1): Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE.
* tree.h (enum omp_clause_code): Add OMP_CLAUSE_FINAL
and OMP_CLAUSE_MERGEABLE.
(OMP_CLAUSE_FINAL_EXPR): Define.
* omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE_FINAL and
OMP_CLAUSE_MERGEABLE.
(expand_task_call): Likewise.
(expand_omp_atomic_load, expand_omp_atomic_store): New functions.
(expand_omp_atomic_fetch_op): Handle cases where old or new
value is needed afterwards.
(expand_omp_atomic): Call expand_omp_atomic_load resp.
expand_omp_atomic_store.
* gimplify.c (gimplify_omp_atomic, gimplify_expr): Handle
OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and OMP_ATOMIC_CAPTURE_NEW.
(gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses): Handle
OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE.
* tree-nested.c (convert_nonlocal_omp_clauses,
convert_local_omp_clauses): Likewise.
* tree.def (OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD,
OMP_ATOMIC_CAPTURE_NEW): New.
* gimple.h (GF_OMP_ATOMIC_NEED_VALUE): New.
(gimple_omp_atomic_need_value_p, gimple_omp_atomic_set_need_value):
New inlines.
* omp-builtins.def (BUILT_IN_GOMP_TASKYIELD): New builtin.
* doc/generic.texi: Mention OMP_CLAUSE_COLLAPSE,
OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE.
gcc/c-family/
* c-common.h (c_finish_omp_atomic): Adjust prototype.
(c_finish_omp_taskyield): New prototype.
* c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
or RHS1 have side-effects, evaluate those too in the right spot,
if it is a decl and LHS is also a decl, error out if they
aren't the same.
(c_finish_omp_taskyield): New function.
* c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
* c-pragma.c (omp_pragmas): Add taskyield.
* c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
(enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
PRAGMA_OMP_CLAUSE_MERGEABLE.
gcc/cp/
* cp-tree.h (finish_omp_atomic): Adjust prototype.
(cxx_omp_const_qual_no_mutable): New prototype.
(finish_omp_taskyield): New prototype.
* parser.c (cp_parser_omp_atomic): (cp_parser_omp_atomic): Handle
parsing OpenMP 3.1 atomics. Adjust finish_omp_atomic caller.
(cp_parser_omp_clause_name): Handle final and mergeable clauses.
(cp_parser_omp_clause_final, cp_parser_omp_clause_mergeable): New
functions.
(cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FINAL
and PRAGMA_OMP_CLAUSE_MERGEABLE.
(OMP_TASK_CLAUSE_MASK): Allow final and mergeable clauses.
(cp_parser_omp_taskyield): New function.
(cp_parser_pragma): Handle PRAGMA_OMP_TASKYIELD.
(cp_parser_omp_clause_reduction): Handle min and max.
* pt.c (tsubst_expr) <case OMP_ATOMIC>: Handle OpenMP 3.1 atomics.
(tsubst_omp_clauses): Handle OMP_CLAUSE_FINAL and
OMP_CLAUSE_MERGEABLE.
* semantics.c (finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
arguments. Handle OpenMP 3.1 atomics. Adjust c_finish_omp_atomic
caller.
(finish_omp_clauses): Don't complain about const qualified
predetermined vars and static data members in firstprivate clause.
Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. Handle MIN_EXPR
and MAX_EXPR.
(finish_omp_taskyield): New function.
* cp-gimplify.c (cxx_omp_const_qual_no_mutable): New function.
(cxx_omp_predetermined_sharing): Use it.
gcc/fortran/
PR fortran/46752
* cpp.c (cpp_define_builtins): Change _OPENMP to 201107.
* openmp.c (gfc_free_omp_clauses): Free also final_expr.
(OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE): Define.
(gfc_match_omp_clauses): Handle parsing final and mergeable
clauses.
(OMP_TASK_CLAUSES): Allow final and mergeable clauses.
(gfc_match_omp_taskyield): New function.
(resolve_omp_clauses): Resolve final clause. Allow POINTERs and
Cray pointers in clauses other than REDUCTION.
(gfc_match_omp_atomic): Match optional
read/write/update/capture keywords after !$omp atomic.
(resolve_omp_atomic): Handle all OpenMP 3.1 atomic forms.
* dump-parse-tree.c (show_omp_node): Handle EXEC_OMP_TASKYIELD,
print final and mergeable clauses.
(show_code_node): Handle EXEC_OMP_TASKYIELD.
* trans-openmp.c (gfc_trans_omp_clauses): Handle final and
mergeable clauses.
(gfc_trans_omp_taskyield): New function.
(gfc_trans_omp_directive): Handle EXEC_OMP_TASKYIELD.
(gfc_trans_omp_atomic): Handle all OpenMP 3.1 atomic forms.
(gfc_omp_clause_copy_ctor): Handle non-allocated allocatable.
(gfc_omp_predetermined_sharing): Adjust comment.
* gfortran.h (gfc_statement): Add ST_OMP_TASKYIELD and
ST_OMP_END_ATOMIC.
(gfc_omp_clauses): Add final_expr and mergeable fields.
(gfc_exec_op): Add EXEC_OMP_TASKYIELD.
(gfc_omp_atomic_op): New enum typedef.
(struct gfc_code): Add ext.omp_atomic.
* trans.c (trans_code): Handle EXEC_OMP_TASKYIELD.
* frontend-passes.c (gfc_code_walker): Also walk final_expr.
* resolve.c (gfc_resolve_blocks, resolve_code): Handle
EXEC_OMP_TASKYIELD.
* st.c (gfc_free_statement): Likewise.
* match.h (gfc_match_omp_taskyield): New prototype.
* parse.c (decode_omp_directive): Handle taskyield directive.
Handle !$omp end atomic.
(case_executable): Add ST_OMP_TASKYIELD case.
(gfc_ascii_statement): Handle ST_OMP_TASKYIELD.
(parse_omp_atomic): Return gfc_statement instead of void.
For !$omp atomic capture parse two assignments instead of
just one and require !$omp end atomic afterwards, for
other !$omp atomic forms just allow !$omp end atomic at the
end.
(parse_omp_structured_block, parse_executable): Adjust
parse_omp_atomic callers.
2011-08-02 Tobias Burnus <burnus@net-b.de>
* intrinsic.c (OMP_LIB): Updated openmp_version's
value to 201107.
* gfortran.texi (OpenMP): Update ref to OpenMP 3.1.
* intrinsic.texi (OpenMP Modules): Update ref to OpenMP 3.1;
remove deleted omp_integer_kind and omp_logical_kind constants.
gcc/testsuite/
PR fortran/46752
* gcc.dg/gomp/atomic-5.c: Adjust expected diagnostics.
* gcc.dg/gomp/atomic-15.c: New test.
* g++.dg/gomp/atomic-5.C: Adjust expected diagnostics.
* g++.dg/gomp/atomic-15.C: New test.
* g++.dg/gomp/private-1.C: New test.
* g++.dg/gomp/sharing-2.C: New test.
* gfortran.dg/gomp/crayptr1.f90: Don't expect error
about Cray pointer in FIRSTPRIVATE/LASTPRIVATE.
* gfortran.dg/gomp/omp_atomic2.f90: New test.
libgomp/
PR fortran/42041
PR fortran/46752
* omp.h.in (omp_in_final): New prototype.
* omp_lib.f90.in (omp_in_final): New interface.
(omp_integer_kind, omp_logical_kind): Remove
and replace all its uses in the module with 4.
(openmp_version): Change to 201107.
* omp_lib.h.in (omp_sched_static, omp_sched_dynamic,
omp_sched_guided, omp_sched_auto): Use omp_sched_kind
kind for the parameters.
(omp_in_final): New external.
(openmp_version): Change to 201107.
* task.c (omp_in_final): New function.
(gomp_init_task): Initialize final_task.
(GOMP_task): Remove unused attribute from flags. Handle final
tasks.
(GOMP_taskyield): New function.
(omp_in_final): Return true if if (false) or final (true) task
or descendant of final (true).
* fortran.c (omp_in_final_): New function.
* libgomp.map (OMP_3.1): Export omp_in_final and omp_in_final_.
(GOMP_3.0): Export GOMP_taskyield.
* env.c (gomp_nthreads_var_list, gomp_nthreads_var_list_len): New
variables.
(parse_unsigned_long_list): New function.
(initialize_env): Use it for OMP_NUM_THREADS. Call parse_boolean
with "OMP_PROC_BIND". If OMP_PROC_BIND=true, call gomp_init_affinity
even if parse_affinity returned false.
* config/linux/affinity.c (gomp_init_affinity): Handle
gomp_cpu_affinity_len == 0.
* libgomp_g.h (GOMP_taskyield): New prototype.
* libgomp.h (struct gomp_task): Add final_task field.
(gomp_nthreads_var_list, gomp_nthreads_var_list_len): New externs.
* team.c (gomp_team_start): Override new task's nthreads_var icv
if list form OMP_NUM_THREADS has been used and it has value for
the new nesting level.
* testsuite/libgomp.c/atomic-11.c: New test.
* testsuite/libgomp.c/atomic-12.c: New test.
* testsuite/libgomp.c/atomic-13.c: New test.
* testsuite/libgomp.c/atomic-14.c: New test.
* testsuite/libgomp.c/reduction-6.c: New test.
* testsuite/libgomp.c/task-5.c: New test.
* testsuite/libgomp.c++/atomic-2.C: New test.
* testsuite/libgomp.c++/atomic-3.C: New test.
* testsuite/libgomp.c++/atomic-4.C: New test.
* testsuite/libgomp.c++/atomic-5.C: New test.
* testsuite/libgomp.c++/atomic-6.C: New test.
* testsuite/libgomp.c++/atomic-7.C: New test.
* testsuite/libgomp.c++/atomic-8.C: New test.
* testsuite/libgomp.c++/atomic-9.C: New test.
* testsuite/libgomp.c++/task-8.C: New test.
* testsuite/libgomp.c++/reduction-4.C: New test.
* testsuite/libgomp.fortran/allocatable7.f90: New test.
* testsuite/libgomp.fortran/allocatable8.f90: New test.
* testsuite/libgomp.fortran/crayptr3.f90: New test.
* testsuite/libgomp.fortran/omp_atomic3.f90: New test.
* testsuite/libgomp.fortran/omp_atomic4.f90: New test.
* testsuite/libgomp.fortran/pointer1.f90: New test.
* testsuite/libgomp.fortran/pointer2.f90: New test.
* testsuite/libgomp.fortran/task4.f90: New test.
2011-08-02 Tobias Burnus <burnus@net-b.de>
* libgomp.texi: Update OpenMP spec references to 3.1.
(omp_in_final,OMP_PROC_BIND): New sections.
(OMP_NUM_THREADS): Document that the value can be now a list.
(GOMP_STACKSIZE,GOMP_CPU_AFFINITY): Update @ref.
From-SVN: r177194
PR libgomp/47804
* testsuite/libgomp.fortran/fortran.exp: Check for both
libquadmath.a and libquadmath.${shlib_ext}. If neither exists,
but $blddir != "", still append ${blddir}/${lang_library_path}
to ld_library_path.
From-SVN: r170285
2011-02-16 Tobias Burnus <burnus@net-b.de>
PR libgomp/47758
* testsuite/libgomp.fortran/fortran.exp: Check for the existence
of libquadmath.a before adding its libpath to ldflags.
From-SVN: r170216
PR fortran/46753
* trans-openmp.c (gfc_trans_omp_do): Use build2_loc instead of
fold_build2_loc for OMP_FOR conditions.
* libgomp.fortran/pr46753.f90: New test.
From-SVN: r167372
PR middle-end/43570
* omp-low.c (scan_sharing_clauses): Don't scan_omp_op
OMP_CLAUSE_DECL for OMP_CLAUSE_COPYPRIVATE.
(lower_copyprivate_clauses): Use private var in outer
context instead of original var. Make sure the types
are correct for VLAs.
* testsuite/libgomp.fortran/vla8.f90: New test.
From-SVN: r158594
PR fortran/42866
* omp-low.c (expand_omp_sections): Only use single_pred if
l2_bb is single_pred_p.
* testsuite/libgomp.fortran/allocatable5.f90: New test.
From-SVN: r156235
PR fortran/42162
* trans-openmp.c (gfc_trans_omp_do): When dovar isn't a VAR_DECL,
don't use simple loop and handle clauses properly.
* testsuite/libgomp.fortran/pr42162.f90: New test.
From-SVN: r154654