1. 22 Feb, 2019 4 commits
    • [libgomp] In OpenACC testing, by default only build for the offload target that… · b03d721a
      [libgomp] In OpenACC testing, by default only build for the offload target that we're actually going to test
      
      ... to avoid compilation overhead, and to keep simple '-foffload=[...]'
      handling in test cases.
      
      	libgomp/
      	* testsuite/libgomp.oacc-c++/c++.exp: Specify
      	"-foffload=$offload_target".
      	* testsuite/libgomp.oacc-c/c.exp: Likewise.
      	* testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
      	* testsuite/lib/libgomp.exp
      	(check_effective_target_openacc_nvidia_accel_configured): Remove,
      	as (conceptually) merged into
      	check_effective_target_openacc_nvidia_accel_selected.  Adjust all
      	users.
      
      From-SVN: r269109
      Thomas Schwinge committed
    • [libgomp] In OpenACC testing, cycle though all offload targets · 0a0384b4
      ... instead of through offload plugins.
      
      	libgomp/
      	* plugin/configfrag.ac: Populate and AC_SUBST offload_targets.
      	* testsuite/libgomp-test-support.exp.in: Adjust.
      	* testsuite/lib/libgomp.exp: Likewise.  Don't populate
      	openacc_device_types_s.
      	(offload_target_to_openacc_device_type): New proc.
      	* testsuite/libgomp.oacc-c++/c++.exp: Adjust.
      	* testsuite/libgomp.oacc-c/c.exp: Likewise.
      	* testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
      	* Makefile.in: Regenerate.
      	* configure: Likewise.
      	* testsuite/Makefile.in: Likewise.
      
      From-SVN: r269108
      Thomas Schwinge committed
    • [libgomp] Clarify difference between offload target, offload plugin, and OpenACC device type · ee332b4a
      	libgomp/
      	* plugin/configfrag.ac: Populate and AC_SUBST offload_plugins
      	instead of offload_targets, and AC_DEFINE_UNQUOTED OFFLOAD_PLUGINS
      	instead of OFFLOAD_TARGETS.
      	* target.c (gomp_target_init): Adjust.
      	* testsuite/libgomp-test-support.exp.in: Likewise.
      	* testsuite/lib/libgomp.exp: Likewise.  Populate
      	openacc_device_types_s instead of offload_targets_s_openacc.
      	(check_effective_target_openacc_nvidia_accel_selected)
      	(check_effective_target_openacc_host_selected): Adjust.
      	* testsuite/libgomp.oacc-c++/c++.exp: Likewise.
      	* testsuite/libgomp.oacc-c/c.exp: Likewise.
      	* testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
      	* Makefile.in: Regenerate.
      	* config.h.in: Likewise.
      	* configure: Likewise.
      	* testsuite/Makefile.in: Likewise.
      
      From-SVN: r269107
      Thomas Schwinge committed
    • [libgomp] In OpenACC offloading testing, be more explicit in what is supported,… · 1241136c
      [libgomp] In OpenACC offloading testing, be more explicit in what is supported, and what is not, or why not
      
      	libgomp/
      	* testsuite/lib/libgomp.exp: Error out for unknown offload target.
      	* testsuite/libgomp.oacc-c++/c++.exp: Likewise.  Report if
      	"offloading: supported, but hardware not accessible".
      	* testsuite/libgomp.oacc-c/c.exp: Likewise.
      	* testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
      
      From-SVN: r269106
      Thomas Schwinge committed
  2. 23 May, 2017 1 commit
    • Runtime checking of OpenACC parallelism dimensions clauses · 0c36d0d5
      	libgomp/
      	* testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Rewrite.
      	* testsuite/lib/libgomp.exp
      	(check_effective_target_openacc_nvidia_accel_configured): New
      	proc.
      	* testsuite/libgomp.oacc-c++/c++.exp (check_effective_target_c)
      	(check_effective_target_c++): New procs.
      	* testsuite/libgomp.oacc-c/c.exp (check_effective_target_c)
      	(check_effective_target_c++): Likewise.
      
      From-SVN: r248358
      Thomas Schwinge committed
  3. 29 Mar, 2016 1 commit
  4. 24 Mar, 2016 1 commit
    • Also test -O0 for OpenACC C, C++ offloading test cases · 6e0df3b7
      	libgomp/
      	* testsuite/libgomp.oacc-c++/c++.exp: Set up torture testing, use
      	gcc-dg-runtest.
      	* testsuite/libgomp.oacc-c/c.exp: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/acc-on-device-2.c: Specify
      	-fno-builtin-acc_on_device instead of -O0.
      	* testsuite/libgomp.oacc-c-c++-common/acc-on-device.c: Skip for
      	-O0.
      	* testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c:
      	Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/routine-v-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta-2.c:
      	Don't specify -O2.
      	* testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta-3.c:
      	Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta.c:
      	Likewise.
      
      From-SVN: r234471
      Thomas Schwinge committed
  5. 10 Aug, 2015 1 commit
    • [PR libgomp/65742, PR middle-end/66332] libgomp: Remove plugin for non-shared memory host execution · b97e78b7
      	gcc/
      	* builtins.c (expand_builtin_acc_on_device) [ACCEL_COMPILER]: Emit
      	open-coded sequence.
      	* omp-low.c (oacc_process_reduction_data): Remove handline of
      	GOMP_DEVICE_HOST_NONSHM.
      	gcc/testsuite/
      	* c-c++-common/goacc/acc_on_device-2.c: Remove XFAIL for C.
      	include/
      	* gomp-constants.c (GOMP_DEVICE_HOST_NONSHM): Remove.
      	libgomp/
      	* libgomp-plugin.h (enum offload_target_type): Remove
      	OFFLOAD_TARGET_TYPE_HOST_NONSHM.
      	* openacc.f90 (openacc_kinds): Remove acc_device_host_nonshm.
      	* openacc.h (enum acc_device_t): Likewise.
      	* openacc_lib.h: Likewise.
      	* oacc-init.c (name_of_acc_device_t): Don't handle it.
      	(acc_on_device): Just use __builtin_acc_on_device.
      	* testsuite/libgomp.oacc-c-c++-common/if-1.c: Don't forbid usage
      	of acc_on_device builtin.
      	* plugin/plugin-host.h: Remove file.
      	* plugin/plugin-host.c: Likewise, but salvage some content into...
      	* oacc-host.c: ... this file.
      	* plugin/Makefrag.am: Don't build libgomp-plugin-host_nonshm.la.
      	* plugin/configfrag.ac (offload_targets): Don't add host_nonshm.
      	* Makefile.in: Regenerate.
      	* configure: Likewise.
      	* testsuite/lib/libgomp.exp
      	(check_effective_target_openacc_host_nonshm_selected): Remove.
      	* testsuite/libgomp.oacc-c++/c++.exp: Don't handle
      	ACC_DEVICE_TYPE=host_nonshm.
      	* testsuite/libgomp.oacc-c/c.exp: Likewise.
      	* testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: Likewise.
      	* testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
      
      From-SVN: r226763
      Thomas Schwinge committed
  6. 08 Jul, 2015 1 commit
    • [nvptx offloading] Only 64-bit configurations are currently supported · a92defda
      	PR libgomp/65099
      	gcc/
      	* config/nvptx/mkoffload.c (main): Create an offload image only in
      	64-bit configurations.
      	libgomp/
      	* plugin/plugin-nvptx.c (nvptx_get_num_devices): Return 0 if not
      	in a 64-bit configuration.
      	* testsuite/libgomp.oacc-c++/c++.exp: Don't attempt nvidia
      	offloading testing if no such device is available.
      	* testsuite/libgomp.oacc-c/c.exp: Likewise.
      	* testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
      
      From-SVN: r225560
      Thomas Schwinge committed
  7. 30 Jun, 2015 1 commit
  8. 15 Jan, 2015 1 commit
    • Merge current set of OpenACC changes from gomp-4_0-branch. · 41dbbb37
      	contrib/
      	* gcc_update (files_and_dependencies): Update rules for new
      	libgomp/plugin/Makefrag.am and libgomp/plugin/configfrag.ac files.
      	gcc/
      	* builtin-types.def (BT_FN_VOID_INT_INT_VAR)
      	(BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
      	(BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
      	New function types.
      	* builtins.c: Include "gomp-constants.h".
      	(expand_builtin_acc_on_device): New function.
      	(expand_builtin, is_inexpensive_builtin): Handle
      	BUILT_IN_ACC_ON_DEVICE.
      	* builtins.def (DEF_GOACC_BUILTIN, DEF_GOACC_BUILTIN_COMPILER):
      	New macros.
      	* cgraph.c (cgraph_node::create): Consider flag_openacc next to
      	flag_openmp.
      	* config.gcc <nvptx-*> (tm_file): Add nvptx/offload.h.
      	<*-intelmic-* | *-intelmicemul-*> (tm_file): Add
      	i386/intelmic-offload.h.
      	* gcc.c (LINK_COMMAND_SPEC, GOMP_SELF_SPECS): For -fopenacc, link
      	to libgomp and its dependencies.
      	* config/arc/arc.h (LINK_COMMAND_SPEC): Likewise.
      	* config/darwin.h (LINK_COMMAND_SPEC_A): Likewise.
      	* config/i386/mingw32.h (GOMP_SELF_SPECS): Likewise.
      	* config/ia64/hpux.h (LIB_SPEC): Likewise.
      	* config/pa/pa-hpux11.h (LIB_SPEC): Likewise.
      	* config/pa/pa64-hpux.h (LIB_SPEC): Likewise.
      	* doc/generic.texi: Update for OpenACC changes.
      	* doc/gimple.texi: Likewise.
      	* doc/invoke.texi: Likewise.
      	* doc/sourcebuild.texi: Likewise.
      	* gimple-pretty-print.c (dump_gimple_omp_for): Handle
      	GF_OMP_FOR_KIND_OACC_LOOP.
      	(dump_gimple_omp_target): Handle GF_OMP_TARGET_KIND_OACC_KERNELS,
      	GF_OMP_TARGET_KIND_OACC_PARALLEL, GF_OMP_TARGET_KIND_OACC_DATA,
      	GF_OMP_TARGET_KIND_OACC_UPDATE,
      	GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA.
      	Dump more data.
      	* gimple.c: Update comments for OpenACC changes.
      	* gimple.def: Likewise.
      	* gimple.h: Likewise.
      	(enum gf_mask): Add GF_OMP_FOR_KIND_OACC_LOOP,
      	GF_OMP_TARGET_KIND_OACC_PARALLEL, GF_OMP_TARGET_KIND_OACC_KERNELS,
      	GF_OMP_TARGET_KIND_OACC_DATA, GF_OMP_TARGET_KIND_OACC_UPDATE,
      	GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA.
      	(gimple_omp_for_cond, gimple_omp_for_set_cond): Sort in the
      	appropriate place.
      	(is_gimple_omp_oacc, is_gimple_omp_offloaded): New functions.
      	* gimplify.c: Include "gomp-constants.h".
      	Update comments for OpenACC changes.
      	(is_gimple_stmt): Handle OACC_PARALLEL, OACC_KERNELS, OACC_DATA,
      	OACC_HOST_DATA, OACC_DECLARE, OACC_UPDATE, OACC_ENTER_DATA,
      	OACC_EXIT_DATA, OACC_CACHE, OACC_LOOP.
      	(gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses): Handle
      	OMP_CLAUSE__CACHE_, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
      	OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
      	OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER,
      	OMP_CLAUSE_VECTOR, OMP_CLAUSE_DEVICE_RESIDENT,
      	OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_INDEPENDENT, OMP_CLAUSE_AUTO,
      	OMP_CLAUSE_SEQ.
      	(gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Use
      	GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
      	OMP_CLAUSE_SET_MAP_KIND.
      	(gimplify_oacc_cache): New function.
      	(gimplify_omp_for): Handle OACC_LOOP.
      	(gimplify_omp_workshare): Handle OACC_KERNELS, OACC_PARALLEL,
      	OACC_DATA.
      	(gimplify_omp_target_update): Handle OACC_ENTER_DATA,
      	OACC_EXIT_DATA, OACC_UPDATE.
      	(gimplify_expr): Handle OACC_LOOP, OACC_CACHE, OACC_HOST_DATA,
      	OACC_DECLARE, OACC_KERNELS, OACC_PARALLEL, OACC_DATA,
      	OACC_ENTER_DATA, OACC_EXIT_DATA, OACC_UPDATE.
      	(gimplify_body): Consider flag_openacc next to flag_openmp.
      	* lto-streamer-out.c: Include "gomp-constants.h".
      	* omp-builtins.def (BUILT_IN_ACC_GET_DEVICE_TYPE)
      	(BUILT_IN_GOACC_DATA_START, BUILT_IN_GOACC_DATA_END)
      	(BUILT_IN_GOACC_ENTER_EXIT_DATA, BUILT_IN_GOACC_PARALLEL)
      	(BUILT_IN_GOACC_UPDATE, BUILT_IN_GOACC_WAIT)
      	(BUILT_IN_GOACC_GET_THREAD_NUM, BUILT_IN_GOACC_GET_NUM_THREADS)
      	(BUILT_IN_ACC_ON_DEVICE): New builtins.
      	* omp-low.c: Include "gomp-constants.h".
      	Update comments for OpenACC changes.
      	(struct omp_context): Add reduction_map, gwv_below, gwv_this
      	members.
      	(extract_omp_for_data, use_pointer_for_field, install_var_field)
      	(new_omp_context, delete_omp_context, scan_sharing_clauses)
      	(create_omp_child_function, scan_omp_for, scan_omp_target)
      	(check_omp_nesting_restrictions, lower_reduction_clauses)
      	(build_omp_regions_1, diagnose_sb_0, make_gimple_omp_edges):
      	Update for OpenACC changes.
      	(scan_sharing_clauses): Handle OMP_CLAUSE_NUM_GANGS:
      	OMP_CLAUSE_NUM_WORKERS: OMP_CLAUSE_VECTOR_LENGTH,
      	OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT, OMP_CLAUSE_GANG,
      	OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, OMP_CLAUSE_DEVICE_RESIDENT,
      	OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE__CACHE_, OMP_CLAUSE_INDEPENDENT,
      	OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ.  Use GOMP_MAP_* instead of
      	OMP_CLAUSE_MAP_*.
      	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk):
      	Handle GF_OMP_FOR_KIND_OACC_LOOP.
      	(expand_omp_target, lower_omp_target): Handle
      	GF_OMP_TARGET_KIND_OACC_PARALLEL, GF_OMP_TARGET_KIND_OACC_KERNELS,
      	GF_OMP_TARGET_KIND_OACC_UPDATE,
      	GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA,
      	GF_OMP_TARGET_KIND_OACC_DATA.
      	(pass_expand_omp::execute, execute_lower_omp)
      	(pass_diagnose_omp_blocks::gate): Consider flag_openacc next to
      	flag_openmp.
      	(offload_symbol_decl): New variable.
      	(oacc_get_reduction_array_id, oacc_max_threads)
      	(get_offload_symbol_decl, get_base_type, lookup_oacc_reduction)
      	(maybe_lookup_oacc_reduction, enclosing_target_ctx)
      	(oacc_loop_or_target_p, oacc_lower_reduction_var_helper)
      	(oacc_gimple_assign, oacc_initialize_reduction_data)
      	(oacc_finalize_reduction_data, oacc_process_reduction_data): New
      	functions.
      	(is_targetreg_ctx): Remove function.
      	* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__CACHE_,
      	OMP_CLAUSE_DEVICE_RESIDENT, OMP_CLAUSE_USE_DEVICE,
      	OMP_CLAUSE_GANG, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
      	OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT,
      	OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, OMP_CLAUSE_NUM_GANGS,
      	OMP_CLAUSE_NUM_WORKERS, OMP_CLAUSE_VECTOR_LENGTH.
      	* tree.c (omp_clause_code_name, walk_tree_1): Update accordingly.
      	* tree.h (OMP_CLAUSE_GANG_EXPR, OMP_CLAUSE_GANG_STATIC_EXPR)
      	(OMP_CLAUSE_ASYNC_EXPR, OMP_CLAUSE_WAIT_EXPR)
      	(OMP_CLAUSE_VECTOR_EXPR, OMP_CLAUSE_WORKER_EXPR)
      	(OMP_CLAUSE_NUM_GANGS_EXPR, OMP_CLAUSE_NUM_WORKERS_EXPR)
      	(OMP_CLAUSE_VECTOR_LENGTH_EXPR): New macros.
      	* tree-core.h: Update comments for OpenACC changes.
      	(enum omp_clause_map_kind): Remove.
      	(struct tree_omp_clause): Change type of map_kind member from enum
      	omp_clause_map_kind to unsigned char.
      	* tree-inline.c: Update comments for OpenACC changes.
      	* tree-nested.c: Likewise.  Include "gomp-constants.h".
      	(convert_nonlocal_reference_stmt, convert_local_reference_stmt)
      	(convert_tramp_reference_stmt, convert_gimple_call): Update for
      	OpenACC changes.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
      	OMP_CLAUSE_SET_MAP_KIND.
      	* tree-pretty-print.c: Include "gomp-constants.h".
      	(dump_omp_clause): Handle OMP_CLAUSE_DEVICE_RESIDENT,
      	OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE__CACHE_, OMP_CLAUSE_GANG,
      	OMP_CLAUSE_ASYNC, OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ,
      	OMP_CLAUSE_WAIT, OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR,
      	OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
      	OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_INDEPENDENT.  Use GOMP_MAP_*
      	instead of OMP_CLAUSE_MAP_*.
      	(dump_generic_node): Handle OACC_PARALLEL, OACC_KERNELS,
      	OACC_DATA, OACC_HOST_DATA, OACC_DECLARE, OACC_UPDATE,
      	OACC_ENTER_DATA, OACC_EXIT_DATA, OACC_CACHE, OACC_LOOP.
      	* tree-streamer-in.c: Include "gomp-constants.h".
      	(unpack_ts_omp_clause_value_fields) Use GOMP_MAP_* instead of
      	OMP_CLAUSE_MAP_*.  Use OMP_CLAUSE_SET_MAP_KIND.
      	* tree-streamer-out.c: Include "gomp-constants.h".
      	(pack_ts_omp_clause_value_fields): Use GOMP_MAP_* instead of
      	OMP_CLAUSE_MAP_*.
      	* tree.def (OACC_PARALLEL, OACC_KERNELS, OACC_DATA)
      	(OACC_HOST_DATA, OACC_LOOP, OACC_CACHE, OACC_DECLARE)
      	(OACC_ENTER_DATA, OACC_EXIT_DATA, OACC_UPDATE): New tree codes.
      	* tree.c (omp_clause_num_ops): Update accordingly.
      	* tree.h (OMP_BODY, OMP_CLAUSES, OMP_LOOP_CHECK, OMP_CLAUSE_SIZE):
      	Likewise.
      	(OACC_PARALLEL_BODY, OACC_PARALLEL_CLAUSES, OACC_KERNELS_BODY)
      	(OACC_KERNELS_CLAUSES, OACC_DATA_BODY, OACC_DATA_CLAUSES)
      	(OACC_HOST_DATA_BODY, OACC_HOST_DATA_CLAUSES, OACC_CACHE_CLAUSES)
      	(OACC_DECLARE_CLAUSES, OACC_ENTER_DATA_CLAUSES)
      	(OACC_EXIT_DATA_CLAUSES, OACC_UPDATE_CLAUSES)
      	(OACC_KERNELS_COMBINED, OACC_PARALLEL_COMBINED): New macros.
      	* tree.h (OMP_CLAUSE_MAP_KIND): Cast it to enum gomp_map_kind.
      	(OMP_CLAUSE_SET_MAP_KIND): New macro.
      	* varpool.c (varpool_node::get_create): Consider flag_openacc next
      	to flag_openmp.
      	* config/i386/intelmic-offload.h: New file.
      	* config/nvptx/offload.h: Likewise.
      	gcc/ada/
      	* gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
      	(DEF_FUNCTION_TYPE_VAR_12): New macros.
      	gcc/c-family/
      	* c.opt (fopenacc): New option.
      	* c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
      	* c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
      	New macros.
      	* c-common.h (c_finish_oacc_wait): New prototype.
      	* c-omp.c: Include "omp-low.h" and "gomp-constants.h".
      	(c_finish_oacc_wait): New function.
      	* c-pragma.c (oacc_pragmas): New variable.
      	(c_pp_lookup_pragma, init_pragma): Handle it.
      	* c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
      	PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
      	PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
      	PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
      	(enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
      	PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
      	PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
      	PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
      	PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
      	PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
      	PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
      	PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
      	PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
      	PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
      	PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
      	PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
      	PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
      	PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
      	PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
      	PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
      	PRAGMA_OACC_CLAUSE_WORKER.
      	gcc/c/
      	* c-parser.c: Include "gomp-constants.h".
      	(c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
      	omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
      	Use OMP_CLAUSE_SET_MAP_KIND.
      	(c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
      	PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
      	(c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
      	PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
      	PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
      	(c_parser_omp_clause_name): Handle "auto", "async", "copy",
      	"copyout", "create", "delete", "deviceptr", "gang", "host",
      	"num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
      	"present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
      	"present_or_create", "pcreate", "seq", "self", "vector",
      	"vector_length", "wait", "worker".
      	(OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
      	(OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
      	(OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
      	(OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
      	(c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
      	(c_parser_oacc_wait_list, c_parser_oacc_data_clause)
      	(c_parser_oacc_data_clause_deviceptr)
      	(c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
      	(c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
      	(c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
      	(c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
      	(c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
      	(c_parser_oacc_parallel, c_parser_oacc_update)
      	(c_parser_oacc_wait): New functions.
      	* c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
      	(c_finish_oacc_data): New prototypes.
      	* c-typeck.c: Include "gomp-constants.h".
      	(handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
      	GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
      	OMP_CLAUSE_SET_MAP_KIND.
      	(c_finish_oacc_parallel, c_finish_oacc_kernels)
      	(c_finish_oacc_data): New functions.
      	(c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
      	OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
      	OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
      	OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
      	OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
      	GOMP_MAP_FORCE_DEVICEPTR.
      	gcc/cp/
      	* parser.c: Include "gomp-constants.h".
      	(cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
      	omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
      	Use OMP_CLAUSE_SET_MAP_KIND.
      	(cp_parser_omp_construct, cp_parser_pragma): Handle
      	PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
      	PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
      	PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
      	(cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
      	"create", "delete", "deviceptr", "host", "num_gangs",
      	"num_workers", "present", "present_or_copy", "pcopy",
      	"present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
      	"present_or_create", "pcreate", "vector_length", "wait".
      	(OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
      	(OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
      	(OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
      	(OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
      	(cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
      	(cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
      	(cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
      	(cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
      	(cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
      	(cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
      	(cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
      	(cp_parser_oacc_kernels, cp_parser_oacc_loop)
      	(cp_parser_oacc_parallel, cp_parser_oacc_update)
      	(cp_parser_oacc_wait): New functions.
      	* cp-tree.h (finish_oacc_data, finish_oacc_kernels)
      	(finish_oacc_parallel): New prototypes.
      	* semantics.c: Include "gomp-constants.h".
      	(handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
      	GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
      	OMP_CLAUSE_SET_MAP_KIND.
      	(finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
      	OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
      	Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
      	(finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
      	functions.
      	gcc/fortran/
      	* lang.opt (fopenacc): New option.
      	* cpp.c (cpp_define_builtins): Conditionally define _OPENACC.
      	* dump-parse-tree.c (show_omp_node): Split part of it into...
      	(show_omp_clauses): ... this new function.
      	(show_omp_node, show_code_node): Handle EXEC_OACC_PARALLEL_LOOP,
      	EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
      	EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
      	EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
      	EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
      	(show_namespace): Update for OpenACC.
      	* f95-lang.c (DEF_FUNCTION_TYPE_VAR_2, DEF_FUNCTION_TYPE_VAR_8)
      	(DEF_FUNCTION_TYPE_VAR_12, DEF_GOACC_BUILTIN)
      	(DEF_GOACC_BUILTIN_COMPILER): New macros.
      	* types.def (BT_FN_VOID_INT_INT_VAR)
      	(BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
      	(BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
      	New function types.
      	* gfortran.h (gfc_statement): Add ST_OACC_PARALLEL_LOOP,
      	ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
      	ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA,
      	ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA,
      	ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
      	ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
      	ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
      	ST_OACC_ROUTINE.
      	(struct gfc_expr_list): New data type.
      	(gfc_get_expr_list): New macro.
      	(gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC,
      	OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM,
      	OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR.
      	(OMP_LIST_FIRST, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_USE_DEVICE)
      	(OMP_LIST_CACHE): New enumerators.
      	(struct gfc_omp_clauses): Add async_expr, gang_expr, worker_expr,
      	vector_expr, num_gangs_expr, num_workers_expr, vector_length_expr,
      	wait_list, tile_list, async, gang, worker, vector, seq,
      	independent, wait, par_auto, gang_static, and loc members.
      	(struct gfc_namespace): Add oacc_declare_clauses member.
      	(gfc_exec_op): Add EXEC_OACC_KERNELS_LOOP,
      	EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS,
      	EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
      	EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
      	EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
      	(gfc_free_expr_list, gfc_resolve_oacc_directive)
      	(gfc_resolve_oacc_declare, gfc_resolve_oacc_parallel_loop_blocks)
      	(gfc_resolve_oacc_blocks): New prototypes.
      	* match.c (match_exit_cycle): Handle EXEC_OACC_LOOP and
      	EXEC_OACC_PARALLEL_LOOP.
      	* match.h (gfc_match_oacc_cache, gfc_match_oacc_wait)
      	(gfc_match_oacc_update, gfc_match_oacc_declare)
      	(gfc_match_oacc_loop, gfc_match_oacc_host_data)
      	(gfc_match_oacc_data, gfc_match_oacc_kernels)
      	(gfc_match_oacc_kernels_loop, gfc_match_oacc_parallel)
      	(gfc_match_oacc_parallel_loop, gfc_match_oacc_enter_data)
      	(gfc_match_oacc_exit_data, gfc_match_oacc_routine): New
      	prototypes.
      	* openmp.c: Include "diagnostic.h" and "gomp-constants.h".
      	(gfc_free_omp_clauses): Update for members added to struct
      	gfc_omp_clauses.
      	(gfc_match_omp_clauses): Change mask paramter to uint64_t.  Add
      	openacc parameter.
      	(resolve_omp_clauses): Add openacc parameter.  Update for OpenACC.
      	(struct fortran_omp_context): Add is_openmp member.
      	(gfc_resolve_omp_parallel_blocks): Initialize it.
      	(gfc_resolve_do_iterator): Update for OpenACC.
      	(gfc_resolve_omp_directive): Call
      	resolve_omp_directive_inside_oacc_region.
      	(OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE)
      	(OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE)
      	(OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION)
      	(OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE)
      	(OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE)
      	(OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE)
      	(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)
      	(OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO)
      	(OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT)
      	(OMP_CLAUSE_DIST_SCHEDULE): Use uint64_t.
      	(OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS)
      	(OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT)
      	(OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT)
      	(OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN)
      	(OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE)
      	(OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER)
      	(OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT)
      	(OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT)
      	(OMP_CLAUSE_HOST_SELF, OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT)
      	(OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New macros.
      	(gfc_match_omp_clauses): Handle those.
      	(OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES)
      	(OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES)
      	(OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES)
      	(OACC_DECLARE_CLAUSES, OACC_UPDATE_CLAUSES)
      	(OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES)
      	(OACC_WAIT_CLAUSES): New macros.
      	(gfc_free_expr_list, match_oacc_expr_list, match_oacc_clause_gang)
      	(gfc_match_omp_map_clause, gfc_match_oacc_parallel_loop)
      	(gfc_match_oacc_parallel, gfc_match_oacc_kernels_loop)
      	(gfc_match_oacc_kernels, gfc_match_oacc_data)
      	(gfc_match_oacc_host_data, gfc_match_oacc_loop)
      	(gfc_match_oacc_declare, gfc_match_oacc_update)
      	(gfc_match_oacc_enter_data, gfc_match_oacc_exit_data)
      	(gfc_match_oacc_wait, gfc_match_oacc_cache)
      	(gfc_match_oacc_routine, oacc_is_loop)
      	(resolve_oacc_scalar_int_expr, resolve_oacc_positive_int_expr)
      	(check_symbol_not_pointer, check_array_not_assumed)
      	(resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause)
      	(oacc_compatible_clauses, oacc_is_parallel, oacc_is_kernels)
      	(omp_code_to_statement, oacc_code_to_statement)
      	(resolve_oacc_directive_inside_omp_region)
      	(resolve_omp_directive_inside_oacc_region)
      	(resolve_oacc_nested_loops, resolve_oacc_params_in_parallel)
      	(resolve_oacc_loop_blocks, gfc_resolve_oacc_blocks)
      	(resolve_oacc_loop, resolve_oacc_cache, gfc_resolve_oacc_declare)
      	(gfc_resolve_oacc_directive): New functions.
      	* parse.c (next_free): Update for OpenACC.  Move some code into...
      	(verify_token_free): ... this new function.
      	(next_fixed): Update for OpenACC.  Move some code into...
      	(verify_token_fixed): ... this new function.
      	(case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT,
      	ST_OACC_CACHE, ST_OACC_ENTER_DATA, and ST_OACC_EXIT_DATA.
      	(case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
      	ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP,
      	ST_OACC_KERNELS_LOOP.
      	(case_decl): Add ST_OACC_ROUTINE.
      	(push_state, parse_critical_block, parse_progunit): Update for
      	OpenACC.
      	(gfc_ascii_statement): Handle ST_OACC_PARALLEL_LOOP,
      	ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
      	ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_KERNELS_LOOP,
      	ST_OACC_END_KERNELS_LOOP, ST_OACC_DATA, ST_OACC_END_DATA,
      	ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP,
      	ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT,
      	ST_OACC_CACHE, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
      	ST_OACC_ROUTINE.
      	(verify_st_order, parse_spec): Handle ST_OACC_DECLARE.
      	(parse_executable): Handle ST_OACC_PARALLEL_LOOP,
      	ST_OACC_KERNELS_LOOP, ST_OACC_LOOP, ST_OACC_PARALLEL,
      	ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA.
      	(decode_oacc_directive, parse_oacc_structured_block)
      	(parse_oacc_loop, is_oacc): New functions.
      	* parse.h (struct gfc_state_data): Add oacc_declare_clauses
      	member.
      	(is_oacc): New prototype.
      	* resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
      	EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
      	EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA,
      	EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE,
      	EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
      	EXEC_OACC_EXIT_DATA.
      	(resolve_codes): Call gfc_resolve_oacc_declare.
      	* scanner.c (openacc_flag, openacc_locus): New variables.
      	(skip_free_comments): Update for OpenACC.  Move some code into...
      	(skip_omp_attribute): ... this new function.
      	(skip_oacc_attribute): New function.
      	(skip_fixed_comments, gfc_next_char_literal): Update for OpenACC.
      	* st.c (gfc_free_statement): Handle EXEC_OACC_PARALLEL_LOOP,
      	EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
      	EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
      	EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
      	EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
      	* trans-decl.c (gfc_generate_function_code): Update for OpenACC.
      	* trans-openmp.c: Include "gomp-constants.h".
      	(gfc_omp_finish_clause, gfc_trans_omp_clauses): Use GOMP_MAP_*
      	instead of OMP_CLAUSE_MAP_*.  Use OMP_CLAUSE_SET_MAP_KIND.
      	(gfc_trans_omp_clauses): Handle OMP_LIST_USE_DEVICE,
      	OMP_LIST_DEVICE_RESIDENT, OMP_LIST_CACHE, and OMP_MAP_FORCE_ALLOC,
      	OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
      	OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT,
      	OMP_MAP_FORCE_DEVICEPTR, and gfc_omp_clauses' async, seq,
      	independent, wait_list, num_gangs_expr, num_workers_expr,
      	vector_length_expr, vector, vector_expr, worker, worker_expr,
      	gang, gang_expr members.
      	(gfc_trans_omp_do): Handle EXEC_OACC_LOOP.
      	(gfc_convert_expr_to_tree, gfc_trans_oacc_construct)
      	(gfc_trans_oacc_executable_directive)
      	(gfc_trans_oacc_wait_directive, gfc_trans_oacc_combined_directive)
      	(gfc_trans_oacc_declare, gfc_trans_oacc_directive): New functions.
      	* trans-stmt.c (gfc_trans_block_construct): Update for OpenACC.
      	* trans-stmt.h (gfc_trans_oacc_directive, gfc_trans_oacc_declare):
      	New prototypes.
      	* trans.c (tranc_code): Handle EXEC_OACC_CACHE, EXEC_OACC_WAIT,
      	EXEC_OACC_UPDATE, EXEC_OACC_LOOP, EXEC_OACC_HOST_DATA,
      	EXEC_OACC_DATA, EXEC_OACC_KERNELS, EXEC_OACC_KERNELS_LOOP,
      	EXEC_OACC_PARALLEL, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ENTER_DATA,
      	EXEC_OACC_EXIT_DATA.
      	* gfortran.texi: Update for OpenACC.
      	* intrinsic.texi: Likewise.
      	* invoke.texi: Likewise.
      	gcc/lto/
      	* lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
      	New macros.
      	* lto.c: Include "gomp-constants.h".
      	gcc/testsuite/
      	* lib/target-supports.exp (check_effective_target_fopenacc): New
      	procedure.
      	* g++.dg/goacc-gomp/goacc-gomp.exp: New file.
      	* g++.dg/goacc/goacc.exp: Likewise.
      	* gcc.dg/goacc-gomp/goacc-gomp.exp: Likewise.
      	* gcc.dg/goacc/goacc.exp: Likewise.
      	* gfortran.dg/goacc/goacc.exp: Likewise.
      	* c-c++-common/cpp/openacc-define-1.c: New file.
      	* c-c++-common/cpp/openacc-define-2.c: Likewise.
      	* c-c++-common/cpp/openacc-define-3.c: Likewise.
      	* c-c++-common/goacc-gomp/nesting-1.c: Likewise.
      	* c-c++-common/goacc-gomp/nesting-fail-1.c: Likewise.
      	* c-c++-common/goacc/acc_on_device-2-off.c: Likewise.
      	* c-c++-common/goacc/acc_on_device-2.c: Likewise.
      	* c-c++-common/goacc/asyncwait-1.c: Likewise.
      	* c-c++-common/goacc/cache-1.c: Likewise.
      	* c-c++-common/goacc/clauses-fail.c: Likewise.
      	* c-c++-common/goacc/collapse-1.c: Likewise.
      	* c-c++-common/goacc/data-1.c: Likewise.
      	* c-c++-common/goacc/data-2.c: Likewise.
      	* c-c++-common/goacc/data-clause-duplicate-1.c: Likewise.
      	* c-c++-common/goacc/deviceptr-1.c: Likewise.
      	* c-c++-common/goacc/deviceptr-2.c: Likewise.
      	* c-c++-common/goacc/deviceptr-3.c: Likewise.
      	* c-c++-common/goacc/if-clause-1.c: Likewise.
      	* c-c++-common/goacc/if-clause-2.c: Likewise.
      	* c-c++-common/goacc/kernels-1.c: Likewise.
      	* c-c++-common/goacc/loop-1.c: Likewise.
      	* c-c++-common/goacc/loop-private-1.c: Likewise.
      	* c-c++-common/goacc/nesting-1.c: Likewise.
      	* c-c++-common/goacc/nesting-data-1.c: Likewise.
      	* c-c++-common/goacc/nesting-fail-1.c: Likewise.
      	* c-c++-common/goacc/parallel-1.c: Likewise.
      	* c-c++-common/goacc/pcopy.c: Likewise.
      	* c-c++-common/goacc/pcopyin.c: Likewise.
      	* c-c++-common/goacc/pcopyout.c: Likewise.
      	* c-c++-common/goacc/pcreate.c: Likewise.
      	* c-c++-common/goacc/pragma_context.c: Likewise.
      	* c-c++-common/goacc/present-1.c: Likewise.
      	* c-c++-common/goacc/reduction-1.c: Likewise.
      	* c-c++-common/goacc/reduction-2.c: Likewise.
      	* c-c++-common/goacc/reduction-3.c: Likewise.
      	* c-c++-common/goacc/reduction-4.c: Likewise.
      	* c-c++-common/goacc/sb-1.c: Likewise.
      	* c-c++-common/goacc/sb-2.c: Likewise.
      	* c-c++-common/goacc/sb-3.c: Likewise.
      	* c-c++-common/goacc/update-1.c: Likewise.
      	* gcc.dg/goacc/acc_on_device-1.c: Likewise.
      	* gfortran.dg/goacc/acc_on_device-1.f95: Likewise.
      	* gfortran.dg/goacc/acc_on_device-2-off.f95: Likewise.
      	* gfortran.dg/goacc/acc_on_device-2.f95: Likewise.
      	* gfortran.dg/goacc/assumed.f95: Likewise.
      	* gfortran.dg/goacc/asyncwait-1.f95: Likewise.
      	* gfortran.dg/goacc/asyncwait-2.f95: Likewise.
      	* gfortran.dg/goacc/asyncwait-3.f95: Likewise.
      	* gfortran.dg/goacc/asyncwait-4.f95: Likewise.
      	* gfortran.dg/goacc/branch.f95: Likewise.
      	* gfortran.dg/goacc/cache-1.f95: Likewise.
      	* gfortran.dg/goacc/coarray.f95: Likewise.
      	* gfortran.dg/goacc/continuation-free-form.f95: Likewise.
      	* gfortran.dg/goacc/cray.f95: Likewise.
      	* gfortran.dg/goacc/critical.f95: Likewise.
      	* gfortran.dg/goacc/data-clauses.f95: Likewise.
      	* gfortran.dg/goacc/data-tree.f95: Likewise.
      	* gfortran.dg/goacc/declare-1.f95: Likewise.
      	* gfortran.dg/goacc/enter-exit-data.f95: Likewise.
      	* gfortran.dg/goacc/fixed-1.f: Likewise.
      	* gfortran.dg/goacc/fixed-2.f: Likewise.
      	* gfortran.dg/goacc/fixed-3.f: Likewise.
      	* gfortran.dg/goacc/fixed-4.f: Likewise.
      	* gfortran.dg/goacc/host_data-tree.f95: Likewise.
      	* gfortran.dg/goacc/if.f95: Likewise.
      	* gfortran.dg/goacc/kernels-tree.f95: Likewise.
      	* gfortran.dg/goacc/list.f95: Likewise.
      	* gfortran.dg/goacc/literal.f95: Likewise.
      	* gfortran.dg/goacc/loop-1.f95: Likewise.
      	* gfortran.dg/goacc/loop-2.f95: Likewise.
      	* gfortran.dg/goacc/loop-3.f95: Likewise.
      	* gfortran.dg/goacc/loop-tree-1.f90: Likewise.
      	* gfortran.dg/goacc/omp.f95: Likewise.
      	* gfortran.dg/goacc/parallel-kernels-clauses.f95: Likewise.
      	* gfortran.dg/goacc/parallel-kernels-regions.f95: Likewise.
      	* gfortran.dg/goacc/parallel-tree.f95: Likewise.
      	* gfortran.dg/goacc/parameter.f95: Likewise.
      	* gfortran.dg/goacc/private-1.f95: Likewise.
      	* gfortran.dg/goacc/private-2.f95: Likewise.
      	* gfortran.dg/goacc/private-3.f95: Likewise.
      	* gfortran.dg/goacc/pure-elemental-procedures.f95: Likewise.
      	* gfortran.dg/goacc/reduction-2.f95: Likewise.
      	* gfortran.dg/goacc/reduction.f95: Likewise.
      	* gfortran.dg/goacc/routine-1.f90: Likewise.
      	* gfortran.dg/goacc/routine-2.f90: Likewise.
      	* gfortran.dg/goacc/sentinel-free-form.f95: Likewise.
      	* gfortran.dg/goacc/several-directives.f95: Likewise.
      	* gfortran.dg/goacc/sie.f95: Likewise.
      	* gfortran.dg/goacc/subarrays.f95: Likewise.
      	* gfortran.dg/gomp/map-1.f90: Likewise.
      	* gfortran.dg/openacc-define-1.f90: Likewise.
      	* gfortran.dg/openacc-define-2.f90: Likewise.
      	* gfortran.dg/openacc-define-3.f90: Likewise.
      	* g++.dg/gomp/block-1.C: Update for changed compiler output.
      	* g++.dg/gomp/block-2.C: Likewise.
      	* g++.dg/gomp/block-3.C: Likewise.
      	* g++.dg/gomp/block-5.C: Likewise.
      	* g++.dg/gomp/target-1.C: Likewise.
      	* g++.dg/gomp/target-2.C: Likewise.
      	* g++.dg/gomp/taskgroup-1.C: Likewise.
      	* g++.dg/gomp/teams-1.C: Likewise.
      	* gcc.dg/cilk-plus/jump-openmp.c: Likewise.
      	* gcc.dg/cilk-plus/jump.c: Likewise.
      	* gcc.dg/gomp/block-1.c: Likewise.
      	* gcc.dg/gomp/block-10.c: Likewise.
      	* gcc.dg/gomp/block-2.c: Likewise.
      	* gcc.dg/gomp/block-3.c: Likewise.
      	* gcc.dg/gomp/block-4.c: Likewise.
      	* gcc.dg/gomp/block-5.c: Likewise.
      	* gcc.dg/gomp/block-6.c: Likewise.
      	* gcc.dg/gomp/block-7.c: Likewise.
      	* gcc.dg/gomp/block-8.c: Likewise.
      	* gcc.dg/gomp/block-9.c: Likewise.
      	* gcc.dg/gomp/target-1.c: Likewise.
      	* gcc.dg/gomp/target-2.c: Likewise.
      	* gcc.dg/gomp/taskgroup-1.c: Likewise.
      	* gcc.dg/gomp/teams-1.c: Likewise.
      	include/
      	* gomp-constants.h: New file.
      	libgomp/
      	* Makefile.am (search_path): Add $(top_srcdir)/../include.
      	(libgomp_la_SOURCES): Add splay-tree.c, libgomp-plugin.c,
      	oacc-parallel.c, oacc-host.c, oacc-init.c, oacc-mem.c,
      	oacc-async.c, oacc-plugin.c, oacc-cuda.c.
      	[USE_FORTRAN] (libgomp_la_SOURCES): Add openacc.f90.
      	Include $(top_srcdir)/plugin/Makefrag.am.
      	(nodist_libsubinclude_HEADERS): Add openacc.h.
      	[USE_FORTRAN] (nodist_finclude_HEADERS): Add openacc_lib.h,
      	openacc.f90, openacc.mod, openacc_kinds.mod.
      	(omp_lib.mod): Generalize into...
      	(%.mod): ... this new rule.
      	(openacc_kinds.mod, openacc.mod): New rules.
      	* plugin/configfrag.ac: New file.
      	* configure.ac: Move plugin/offloading support into it.  Include
      	it.  Instantiate testsuite/libgomp-test-support.pt.exp.
      	* plugin/Makefrag.am: New file.
      	* testsuite/Makefile.am (OFFLOAD_TARGETS)
      	(OFFLOAD_ADDITIONAL_OPTIONS, OFFLOAD_ADDITIONAL_LIB_PATHS): Don't
      	export.
      	(libgomp-test-support.exp): New rule.
      	(all-local): Depend on it.
      	* Makefile.in: Regenerate.
      	* testsuite/Makefile.in: Regenerate.
      	* config.h.in: Likewise.
      	* configure: Likewise.
      	* configure.tgt: Harden shell syntax.
      	* env.c: Include "oacc-int.h".
      	(parse_acc_device_type): New function.
      	(gomp_debug_var, goacc_device_type, goacc_device_num): New
      	variables.
      	(initialize_env): Initialize those.  Call
      	goacc_runtime_initialize.
      	* error.c (gomp_vdebug, gomp_debug, gomp_vfatal): New functions.
      	(gomp_fatal): Call gomp_vfatal.
      	* libgomp.h: Include "libgomp-plugin.h" and <stdarg.h>.
      	(gomp_debug_var, goacc_device_type, goacc_device_num, gomp_vdebug)
      	(gomp_debug, gomp_verror, gomp_vfatal, gomp_init_targets_once)
      	(splay_tree_node, splay_tree, splay_tree_key)
      	(struct target_mem_desc, struct splay_tree_key_s)
      	(struct gomp_memory_mapping, struct acc_dispatch_t)
      	(struct gomp_device_descr, gomp_acc_insert_pointer)
      	(gomp_acc_remove_pointer, target_mem_desc, gomp_copy_from_async)
      	(gomp_unmap_vars, gomp_init_device, gomp_init_tables)
      	(gomp_free_memmap, gomp_fini_device): New declarations.
      	(gomp_vdebug, gomp_debug): New macros.
      	Include "splay-tree.h".
      	* libgomp.map (OACC_2.0): New symbol version.  Use for
      	acc_get_num_devices, acc_get_num_devices_h_, acc_set_device_type,
      	acc_set_device_type_h_, acc_get_device_type,
      	acc_get_device_type_h_, acc_set_device_num, acc_set_device_num_h_,
      	acc_get_device_num, acc_get_device_num_h_, acc_async_test,
      	acc_async_test_h_, acc_async_test_all, acc_async_test_all_h_,
      	acc_wait, acc_wait_h_, acc_wait_async, acc_wait_async_h_,
      	acc_wait_all, acc_wait_all_h_, acc_wait_all_async,
      	acc_wait_all_async_h_, acc_init, acc_init_h_, acc_shutdown,
      	acc_shutdown_h_, acc_on_device, acc_on_device_h_, acc_malloc,
      	acc_free, acc_copyin, acc_copyin_32_h_, acc_copyin_64_h_,
      	acc_copyin_array_h_, acc_present_or_copyin,
      	acc_present_or_copyin_32_h_, acc_present_or_copyin_64_h_,
      	acc_present_or_copyin_array_h_, acc_create, acc_create_32_h_,
      	acc_create_64_h_, acc_create_array_h_, acc_present_or_create,
      	acc_present_or_create_32_h_, acc_present_or_create_64_h_,
      	acc_present_or_create_array_h_, acc_copyout, acc_copyout_32_h_,
      	acc_copyout_64_h_, acc_copyout_array_h_, acc_delete,
      	acc_delete_32_h_, acc_delete_64_h_, acc_delete_array_h_,
      	acc_update_device, acc_update_device_32_h_,
      	acc_update_device_64_h_, acc_update_device_array_h_,
      	acc_update_self, acc_update_self_32_h_, acc_update_self_64_h_,
      	acc_update_self_array_h_, acc_map_data, acc_unmap_data,
      	acc_deviceptr, acc_hostptr, acc_is_present, acc_is_present_32_h_,
      	acc_is_present_64_h_, acc_is_present_array_h_,
      	acc_memcpy_to_device, acc_memcpy_from_device,
      	acc_get_current_cuda_device, acc_get_current_cuda_context,
      	acc_get_cuda_stream, acc_set_cuda_stream.
      	(GOACC_2.0): New symbol version.  Use for GOACC_data_end,
      	GOACC_data_start, GOACC_enter_exit_data, GOACC_parallel,
      	GOACC_update, GOACC_wait, GOACC_get_thread_num,
      	GOACC_get_num_threads.
      	(GOMP_PLUGIN_1.0): New symbol version.  Use for
      	GOMP_PLUGIN_malloc, GOMP_PLUGIN_malloc_cleared,
      	GOMP_PLUGIN_realloc, GOMP_PLUGIN_debug, GOMP_PLUGIN_error,
      	GOMP_PLUGIN_fatal, GOMP_PLUGIN_async_unmap_vars,
      	GOMP_PLUGIN_acc_thread.
      	* libgomp.texi: Update for OpenACC changes, and GOMP_DEBUG
      	environment variable.
      	* libgomp_g.h (GOACC_data_start, GOACC_data_end)
      	(GOACC_enter_exit_data, GOACC_parallel, GOACC_update, GOACC_wait)
      	(GOACC_get_num_threads, GOACC_get_thread_num): New declarations.
      	* splay-tree.h (splay_tree_lookup, splay_tree_insert)
      	(splay_tree_remove): New declarations.
      	(rotate_left, rotate_right, splay_tree_splay, splay_tree_insert)
      	(splay_tree_remove, splay_tree_lookup): Move into...
      	* splay-tree.c: ... this new file.
      	* target.c: Include "oacc-plugin.h", "oacc-int.h", <assert.h>.
      	(splay_tree_node, splay_tree, splay_tree_key)
      	(struct target_mem_desc, struct splay_tree_key_s)
      	(struct gomp_device_descr): Don't declare.
      	(num_devices_openmp): New variable.
      	(gomp_get_num_devices ): Use it.
      	(gomp_init_targets_once): New function.
      	(gomp_get_num_devices ): Use it.
      	(get_kind, gomp_copy_from_async, gomp_free_memmap)
      	(gomp_fini_device, gomp_register_image_for_device): New functions.
      	(gomp_map_vars): Add devaddrs parameter.
      	(gomp_update): Add mm parameter.
      	(gomp_init_device): Move most of it into...
      	(gomp_init_tables): ... this new function.
      	(gomp_register_images_for_device): Remove function.
      	(splay_compare, gomp_map_vars, gomp_unmap_vars, gomp_init_device):
      	Make them hidden instead of static.
      	(gomp_map_vars_existing, gomp_map_vars, gomp_unmap_vars)
      	(gomp_update, gomp_init_device, GOMP_target, GOMP_target_data)
      	(GOMP_target_end_data, GOMP_target_update)
      	(gomp_load_plugin_for_device, gomp_target_init): Update for
      	OpenACC changes.
      	* oacc-async.c: New file.
      	* oacc-cuda.c: Likewise.
      	* oacc-host.c: Likewise.
      	* oacc-init.c: Likewise.
      	* oacc-int.h: Likewise.
      	* oacc-mem.c: Likewise.
      	* oacc-parallel.c: Likewise.
      	* oacc-plugin.c: Likewise.
      	* oacc-plugin.h: Likewise.
      	* oacc-ptx.h: Likewise.
      	* openacc.f90: Likewise.
      	* openacc.h: Likewise.
      	* openacc_lib.h: Likewise.
      	* plugin/plugin-host.c: Likewise.
      	* plugin/plugin-nvptx.c: Likewise.
      	* libgomp-plugin.c: Likewise.
      	* libgomp-plugin.h: Likewise.
      	* libgomp_target.h: Remove file after merging content into the
      	former file.  Update all users.
      	* testsuite/lib/libgomp.exp: Load libgomp-test-support.exp.
      	(offload_targets_s, offload_targets_s_openacc): New variables.
      	(check_effective_target_openacc_nvidia_accel_present)
      	(check_effective_target_openacc_nvidia_accel_selected): New
      	procedures.
      	(libgomp_init): Update for OpenACC changes.
      	* testsuite/libgomp-test-support.exp.in: New file.
      	* testsuite/libgomp.oacc-c++/c++.exp: Likewise.
      	* testsuite/libgomp.oacc-c/c.exp: Likewise.
      	* testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/abort-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/abort-2.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/abort-3.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/abort-4.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/cache-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/collapse-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/collapse-3.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/collapse-4.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/context-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/context-2.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/context-3.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/context-4.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-2.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-3.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/if-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/kernels-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/kernels-empty.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-10.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-11.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-12.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-13.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-14.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-15.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-19.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-24.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-3.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-31.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-32.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-33.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-37.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-38.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-4.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-41.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-45.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-46.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-49.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-5.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-50.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-51.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-55.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-56.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-59.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-6.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-60.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-61.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-62.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-66.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-69.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-7.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-70.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-72.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-73.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-74.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-75.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-76.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-78.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-79.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-81.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-82.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-83.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-84.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-85.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-86.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-87.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-88.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-89.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-9.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-90.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-91.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-92.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/nested-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/nested-2.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/offset-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/parallel-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/parallel-empty.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/pointer-align-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/present-2.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/reduction-initial-1.c:
      	Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/subr.h: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/subr.ptx: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/timer.h: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/update-1.c: Likewise.
      	* testsuite/libgomp.oacc-fortran/abort-1.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/abort-2.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/asyncwait-1.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/asyncwait-2.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/asyncwait-3.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/collapse-1.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/collapse-2.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/collapse-3.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/collapse-4.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/collapse-5.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/collapse-6.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/collapse-7.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/collapse-8.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-1.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-2.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-3.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-4-2.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-4.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/lib-1.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/lib-10.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/lib-2.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/lib-3.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/lib-4.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/lib-5.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/lib-6.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/lib-7.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/lib-8.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/map-1.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/openacc_version-1.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/pointer-align-1.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/pset-1.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/reduction-1.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/routine-1.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/routine-2.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/routine-3.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/routine-4.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/subarrays-1.f90: Likewise.
      	* testsuite/libgomp.oacc-fortran/subarrays-2.f90: Likewise.
      	liboffloadmic/
      	* plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_get_name)
      	(GOMP_OFFLOAD_get_caps, GOMP_OFFLOAD_fini_device): New functions.
      
      Co-Authored-By: Bernd Schmidt <bernds@codesourcery.com>
      Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
      Co-Authored-By: Dmitry Bocharnikov <dmitry.b@samsung.com>
      Co-Authored-By: Evgeny Gavrin <e.gavrin@samsung.com>
      Co-Authored-By: Ilmir Usmanov <i.usmanov@samsung.com>
      Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
      Co-Authored-By: James Norris <jnorris@codesourcery.com>
      Co-Authored-By: Julian Brown <julian@codesourcery.com>
      Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com>
      Co-Authored-By: Tobias Burnus <burnus@net-b.de>
      Co-Authored-By: Tom de Vries <tom@codesourcery.com>
      
      From-SVN: r219682
      Thomas Schwinge committed
  9. 13 Nov, 2014 1 commit
    • [PATCH 7/7] OpenMP 4.0 offloading infrastructure: testsuite. · 122d7303
      libgomp/
      	* testsuite/lib/libgomp.exp
      	(check_effective_target_offload_device): New.
      	* testsuite/libgomp.c++/c++.exp: Include tests from subdirectories.
      	* testsuite/libgomp.c++/examples-4/e.51.5.C: New test.
      	* testsuite/libgomp.c++/examples-4/e.53.2.C: Ditto.
      	* testsuite/libgomp.c/examples-4/e.50.1.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.50.2.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.50.3.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.50.4.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.50.5.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.51.1.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.51.2.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.51.3.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.51.4.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.51.6.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.51.7.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.52.1.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.52.2.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.53.1.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.53.3.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.53.4.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.53.5.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.54.2.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.54.3.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.54.4.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.54.5.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.54.6.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.55.1.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.55.2.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.56.3.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.56.4.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.57.1.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.57.2.c: Ditto.
      	* testsuite/libgomp.c/examples-4/e.57.3.c: Ditto.
      	* testsuite/libgomp.c/target-7.c: Fix test.
      	* testsuite/libgomp.fortran/examples-4/e.50.1.f90: New test.
      	* testsuite/libgomp.fortran/examples-4/e.50.2.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.50.3.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.50.4.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.50.5.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.51.1.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.51.2.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.51.3.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.51.4.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.51.5.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.51.6.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.51.7.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.52.1.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.52.2.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.53.1.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.53.2.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.53.3.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.53.4.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.53.5.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.54.2.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.54.3.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.54.4.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.54.5.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.54.6.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.55.1.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.55.2.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.56.3.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.56.4.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.57.1.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.57.2.f90: Ditto.
      	* testsuite/libgomp.fortran/examples-4/e.57.3.f90: Ditto.
      
      Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
      Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
      Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
      
      From-SVN: r217494
      Andrey Turetskiy committed
  10. 03 Jul, 2014 1 commit
    • libgomp.exp (libgomp_target_compile): If $source matches regex $lang_source_re,… · f707da16
      libgomp.exp (libgomp_target_compile): If $source matches regex $lang_source_re, add $lang_include_flags to options.
      
      	* testsuite/lib/libgomp.exp (libgomp_target_compile): If $source
      	matches regex $lang_source_re, add $lang_include_flags to options.
      	* testsuite/libgomp.c/c.exp: Unset lang_include_flags.
      	* testsuite/libgomp.c++/c++.exp: Likewise.
      	* testsuite/libgomp.fortran/fortran.exp: Likewise.  Set lang_source_re
      	and lang_include_flags instead of adding -fintrinsic-modules-path= to
      	ALWAYS_CFLAGS.
      	* testsuite/libgomp.graphite/graphite.exp: Unset lang_include_flags.
      
      From-SVN: r212268
      Jakub Jelinek committed
  11. 07 Nov, 2013 1 commit
    • libgomp: Prepare for testcases without -fopenmp. · 1707a5de
      	libgomp/
      	* testsuite/lib/libgomp.exp (libgomp_init): Don't add -fopenmp to
      	ALWAYS_CFLAGS.
      	* testsuite/libgomp.c++/c++.exp (ALWAYS_CFLAGS): Add -fopenmp.
      	* testsuite/libgomp.c/c.exp (ALWAYS_CFLAGS): Likewise.
      	* testsuite/libgomp.fortran/fortran.exp (ALWAYS_CFLAGS): Likewise.
      	* testsuite/libgomp.graphite/graphite.exp (ALWAYS_CFLAGS):
      	Likewise.
      
      From-SVN: r204519
      Thomas Schwinge committed
  12. 20 Jun, 2013 1 commit
    • libgomp.exp: Reorder lib loads into dependency order. · 1ef3b58e
      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
      Iain Sandoe committed
  13. 11 Jul, 2009 1 commit
    • re PR testsuite/40699 (All sparcv9 libjava execution tests fail on Solaris 11/SPARC) · 33cde516
      gcc/testsuite/
      	PR testsuite/40699
      	PR testsuite/40707
      	PR testsuite/40709
      	* lib/gcc-defs.exp, lib/target-libpath.exp, lib/objc.exp,
      	lib/gfortran.exp, lib/g++.exp, lib/obj-c++.exp, lib/c-torture.exp,
      	lib/gcc-dg.exp, lib/gnat.exp, g++.dg/compat/compat.exp,
      	g++.dg/compat/struct-layout-1.exp: Revert 2009-06-30 commit.
      
      libstdc++-v3/
      	PR testsuite/40699
      	PR testsuite/40707
      	PR testsuite/40709
      	* testsuite/lib/libstdc++.exp: Revert 2009-06-30 commit.
      
      libjava/
      	PR testsuite/40699
      	PR testsuite/40707
      	PR testsuite/40709
      	* testsuite/lib/libjava.exp: Revert 2009-06-30 commit.
      
      libgomp/
      	PR testsuite/40699
      	PR testsuite/40707
      	PR testsuite/40709
      	* testsuite/lib/libgomp.exp: Revert 2009-07-02 and 2009-06-30 commits.
      	* testsuite/libgomp.c/c.exp, testsuite/libgomp.c++/c++.exp,
      	testsuite/libgomp.fortran/fortran.exp: Revert 2009-06-30 commits.
      
      libffi/
      	PR testsuite/40699
      	PR testsuite/40707
      	PR testsuite/40709
      	* testsuite/lib/libffi-dg.exp: Revert 2009-07-02, 2009-07-01 and
      	2009-06-30 commits.
      
      libmudflap/
      	PR testsuite/40699
      	PR testsuite/40707
      	PR testsuite/40709
      	* testsuite/lib/libmudflap.exp: Revert 2009-06-30 commit.
      
      From-SVN: r149508
      Richard Sandiford committed
  14. 30 Jun, 2009 1 commit
    • gcc-defs.exp (gcc-set-multilib-library-path): Delete. · b30bfd40
      gcc/testsuite/
      	* lib/gcc-defs.exp (gcc-set-multilib-library-path): Delete.
      	* lib/target-libpath.exp (ld_library_path_vars): New variable.
      	(init_ld_library_path_env_vars): New function, replacing the
      	orig_*_saved assignments.  Call it after defining it.
      	(set_ld_library_path_env_vars): Rewrite to use ld_library_path_vars.
      	(restore_ld_library_path_env_vars): Likewise.
      	(add_path, find_libgcc_s): New functions.
      	* lib/objc.exp (objc_init): Use find_libgcc_s instead of
      	gcc-set-multilib-library-path.
      	(objc_target_compile): Don't add "." to ld_library_path.
      	Use add_path.
      	* lib/gfortran.exp (gfortran_link_flags): Don't add "." to
      	ld_library_path.  Use add_path.  Use find_libgcc_s instead of
      	gcc-set-multilib-library-path.
      	* lib/g++.exp (g++_link_flags): Likewise.
      	* lib/obj-c++.exp (obj-c++_link_flags): Likewise.
      	* lib/c-torture.exp: Do not manipulate ld_library_path at the
      	top level; do it...
      	(c-torture-execute): ...here instead.  Use $ld_library_path_multilib
      	to tell when this needs to happen.  Use find_libgcc_s instead of
      	gcc-set-multilib-library-path.
      	* lib/gcc-dg.exp: Likewise.
      	* lib/gnat.exp (gnat_target_compile): Don't add "." to ld_library_path.
      	* g++.dg/compat/compat.exp (alt_ld_library_path): Don't add "."
      	unless it is in $ALT_LD_LIBRARY_PATH.
      	* g++.dg/compat/struct-layout-1.exp (alt_ld_library_path): Likewise.
      
      libffi/
      	* testsuite/lib/libffi-dg.exp (libffi-init): Don't add "."
      	to ld_library_path.  Use add_path.  Add just find_libgcc_s
      	to ld_library_path, not every libgcc multilib directory.
      
      libgomp/
      	* testsuite/lib/libgomp.exp (libgomp_init): Don't add "." to
      	ld_library_path.  Use add_path.  Add just find_libgcc_s to
      	ld_library_path, not every libgcc multilib directory.
      	* testsuite/libgomp.c/c.exp (ld_library_path): Don't call
      	gcc-set-multilib-library-path; rely on $always_ld_library_path instead.
      	* testsuite/libgomp.c++/c++.exp (ld_library_path): Likewise.
      	Use add_path.
      	* testsuite/libgomp.fortran/fortran.exp (ld_library_path): Likewise.
      
      libjava/
      	* testsuite/lib/libjava.exp (libjava_init): Just add
      	find_libgcc_s to libjava_libgcc_s_path, rather than every
      	libgcc multilib directory.
      	(libjava_arguments): Explain why we add "." to ld_library_path.
      	(gcj_invoke, exec_gij, libjava_invoke): Use add_path.
      
      libmudflap/
      	* testsuite/lib/libmudflap.exp (libmudflap-init): Don't add "."
      	to ld_library_path.  Use add_path.  Add just find_libgcc_s to
      	ld_library_path, not every libgcc multilib directory.
      
      libstdc++-v3/
      	* testsuite/lib/libstdc++.exp (libstdc++_init): Don't add "."
      	to ld_library_path.  Use add_path.  Add just find_libgcc_s to
      	ld_library_path, not every libgcc multilib directory.
      
      From-SVN: r149113
      Richard Sandiford committed
  15. 21 Aug, 2008 1 commit
  16. 08 Jul, 2008 1 commit
    • c++.exp: Append multilib library path. · 87bd23b8
      	* testsuite/libgomp.c++/c++.exp: Append multilib library path.
      	* testsuite/libgomp.fortran/fortran.exp: Same.
      	* testsuite/libgomp.c/c.exp: Same.
      	* testsuite/lib/libgomp.exp: Append AIX libgcc pthread multilib
      	directory to library path first.
      
      From-SVN: r137638
      David Edelsohn committed
  17. 06 Jun, 2008 1 commit
    • c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. · a68ab351
      	* c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to
      	200805.
      	* langhooks.h (struct lang_hooks_for_decls): Add omp_finish_clause.
      	Add omp_private_outer_ref hook, add another argument to
      	omp_clause_default_ctor hook.
      	* langhooks-def.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
      	(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_FINISH_CLAUSE and
      	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.
      	* tree.def (OMP_TASK): New tree code.
      	* tree.h (OMP_TASK_COPYFN, OMP_TASK_ARG_SIZE, OMP_TASK_ARG_ALIGN,
      	OMP_CLAUSE_PRIVATE_OUTER_REF, OMP_CLAUSE_LASTPRIVATE_STMT,
      	OMP_CLAUSE_COLLAPSE_ITERVAR, OMP_CLAUSE_COLLAPSE_COUNT,
      	OMP_TASKREG_CHECK, OMP_TASKREG_BODY, OMP_TASKREG_CLAUSES,
      	OMP_TASKREG_FN, OMP_TASKREG_DATA_ARG, OMP_TASK_BODY,
      	OMP_TASK_CLAUSES, OMP_TASK_FN, OMP_TASK_DATA_ARG,
      	OMP_CLAUSE_COLLAPSE_EXPR): Define.
      	(enum omp_clause_default_kind): Add OMP_CLAUSE_DEFAULT_FIRSTPRIVATE.
      	(OMP_DIRECTIVE_P): Add OMP_TASK.
      	(OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): New clause codes.
      	(OMP_CLAUSE_SCHEDULE_AUTO): New schedule kind.
      	* tree.c (omp_clause_code_name): Add OMP_CLAUSE_COLLAPSE
      	and OMP_CLAUSE_UNTIED entries.
      	(omp_clause_num_ops): Likewise.  Increase OMP_CLAUSE_LASTPRIVATE
      	num_ops to 2.
      	(walk_tree_1): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED.
      	Walk OMP_CLAUSE_LASTPRIVATE_STMT.
      	* tree-pretty-print.c (dump_omp_clause): Handle
      	OMP_CLAUSE_SCHEDULE_AUTO, OMP_CLAUSE_UNTIED, OMP_CLAUSE_COLLAPSE,
      	OMP_CLAUSE_DEFAULT_FIRSTPRIVATE.
      	(dump_generic_node): Handle OMP_TASK and collapsed OMP_FOR loops.
      	* c-omp.c (c_finish_omp_for): Allow pointer iterators.  Remove
      	warning about unsigned iterators.  Change decl/init/cond/incr
      	arguments to TREE_VECs, check arguments for all collapsed loops.
      	(c_finish_omp_taskwait): New function.
      	(c_split_parallel_clauses): Put OMP_CLAUSE_COLLAPSE clause to
      	ws_clauses.
      	* c-parser.c (c_parser_omp_for_loop): Parse collapsed loops.  Call
      	default_function_array_conversion on init.  Add par_clauses argument.
      	If decl is present in parallel's lastprivate clause, change it to
      	shared and add lastprivate clause for decl to OMP_FOR_CLAUSES.
      	Add clauses argument, on success set OMP_FOR_CLAUSES to it.  Look up
      	collapse count in clauses.
      	(c_parser_omp_for, c_parser_omp_parallel): Adjust
      	c_parser_omp_for_loop callers.
      	(OMP_FOR_CLAUSE_MASK): Add 1 << PRAGMA_OMP_CLAUSE_COLLAPSE.
      	(c_parser_pragma): Handle PRAGMA_OMP_TASKWAIT.
      	(c_parser_omp_clause_name): Handle collapse and untied clauses.
      	(c_parser_omp_clause_collapse, c_parser_omp_clause_untied): New
      	functions.
      	(c_parser_omp_clause_schedule): Handle schedule(auto).
      	Include correct location in the error message.
      	(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
      	and PRAGMA_OMP_CLAUSE_UNTIED.
      	(OMP_TASK_CLAUSE_MASK): Define.
      	(c_parser_omp_task, c_parser_omp_taskwait): New functions.
      	(c_parser_omp_construct): Handle PRAGMA_OMP_TASK.
      	* tree-nested.c (convert_nonlocal_omp_clauses,
      	convert_local_omp_clauses): Handle OMP_CLAUSE_LASTPRIVATE_STMT,
      	OMP_CLAUSE_REDUCTION_INIT, OMP_CLAUSE_REDUCTION_MERGE,
      	OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED.
      	Don't handle TREE_STATIC or DECL_EXTERNAL VAR_DECLs in
      	OMP_CLAUSE_DECL.
      	(conver_nonlocal_reference, convert_local_reference,
      	convert_call_expr): Handle OMP_TASK the same as OMP_PARALLEL.  Use
      	OMP_TASKREG_* macros rather than OMP_PARALLEL_*.
      	(walk_omp_for): Adjust for OMP_FOR_{INIT,COND,INCR} changes.
      	* tree-gimple.c (is_gimple_stmt): Handle OMP_TASK.
      	* c-tree.h (c_begin_omp_task, c_finish_omp_task): New prototypes.
      	* c-pragma.h (PRAGMA_OMP_TASK, PRAGMA_OMP_TASKWAIT): New.
      	(PRAGMA_OMP_CLAUSE_COLLAPSE, PRAGMA_OMP_CLAUSE_UNTIED): New.
      	* c-typeck.c (c_begin_omp_task, c_finish_omp_task): New functions.
      	(c_finish_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
      	OMP_CLAUSE_UNTIED.
      	* c-pragma.c (init_pragma): Init omp task and omp taskwait pragmas.
      	* c-common.h (c_finish_omp_taskwait): New prototype.
      	* gimple-low.c (lower_stmt): Handle OMP_TASK.
      	* tree-parloops.c (create_parallel_loop): Create 1 entry
      	vectors for OMP_FOR_{INIT,COND,INCR}.
      	* tree-cfg.c (remove_useless_stmts_1): Handle OMP_* containers.
      	(make_edges): Handle OMP_TASK.
      	* tree-ssa-operands.c (get_expr_operands): Handle collapsed OMP_FOR
      	loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
      	* tree-inline.c (estimate_num_insns_1): Handle OMP_TASK.
      	* builtin-types.def (BT_PTR_ULONGLONG, BT_PTR_FN_VOID_PTR_PTR,
      	BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
      	BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
      	BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
      	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
      	* omp-builtins.def (BUILT_IN_GOMP_TASK, BUILT_IN_GOMP_TASKWAIT,
      	BUILT_IN_GOMP_LOOP_ULL_STATIC_START,
      	BUILT_IN_GOMP_LOOP_ULL_DYNAMIC_START,
      	BUILT_IN_GOMP_LOOP_ULL_GUIDED_START,
      	BUILT_IN_GOMP_LOOP_ULL_RUNTIME_START,
      	BUILT_IN_GOMP_LOOP_ULL_ORDERED_STATIC_START,
      	BUILT_IN_GOMP_LOOP_ULL_ORDERED_DYNAMIC_START,
      	BUILT_IN_GOMP_LOOP_ULL_ORDERED_GUIDED_START,
      	BUILT_IN_GOMP_LOOP_ULL_ORDERED_RUNTIME_START,
      	BUILT_IN_GOMP_LOOP_ULL_STATIC_NEXT,
      	BUILT_IN_GOMP_LOOP_ULL_DYNAMIC_NEXT,
      	BUILT_IN_GOMP_LOOP_ULL_GUIDED_NEXT,
      	BUILT_IN_GOMP_LOOP_ULL_RUNTIME_NEXT,
      	BUILT_IN_GOMP_LOOP_ULL_ORDERED_STATIC_NEXT,
      	BUILT_IN_GOMP_LOOP_ULL_ORDERED_DYNAMIC_NEXT,
      	BUILT_IN_GOMP_LOOP_ULL_ORDERED_GUIDED_NEXT,
      	BUILT_IN_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT): New builtins.
      	* gimplify.c (gimplify_omp_for): Allow pointer type for decl,
      	handle POINTER_PLUS_EXPR.  If loop counter has been replaced and
      	original iterator is present in lastprivate clause or if
      	collapse > 1, set OMP_CLAUSE_LASTPRIVATE_STMT.  Handle collapsed
      	OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
      	(gimplify_expr): Handle OMP_SECTIONS_SWITCH and OMP_TASK.
      	(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.  Handle
      	OMP_CLAUSE_DEFAULT_FIRSTPRIVATE.  Handle vars that are supposed
      	to be implicitly determined firstprivate for task regions.
      	(gimplify_scan_omp_clauses): Set GOVD_PRIVATE_OUTER_REF if needed,
      	if it is set, lookup var in outer contexts too.  Set
      	OMP_CLAUSE_PRIVATE_OUTER_REF if GOVD_PRIVATE_OUTER_REF is set.
      	Handle OMP_CLAUSE_LASTPRIVATE_STMT, OMP_CLAUSE_COLLAPSE and
      	OMP_CLAUSE_UNTIED.  Take region_type as last argument
      	instead of in_parallel and in_combined_parallel.
      	(gimplify_omp_parallel, gimplify_omp_for, gimplify_omp_workshare):
      	Adjust callers.
      	(gimplify_adjust_omp_clauses_1): Set OMP_CLAUSE_PRIVATE_OUTER_REF if
      	GOVD_PRIVATE_OUTER_REF is set.  Call omp_finish_clause
      	langhook.
      	(new_omp_context): Set default_kind to
      	OMP_CLAUSE_DEFAULT_UNSPECIFIED for OMP_TASK regions.
      	(omp_region_type): New enum.
      	(struct gimplify_omp_ctx): Remove is_parallel and is_combined_parallel
      	fields, add region_type.
      	(new_omp_context): Take region_type as argument instead of is_parallel
      	and is_combined_parallel.
      	(gimple_add_tmp_var, omp_firstprivatize_variable, omp_notice_variable,
      	omp_is_private, omp_check_private): Adjust ctx->is_parallel and
      	ctx->is_combined_parallel checks.
      	(gimplify_omp_task): New function.
      	(gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
      	OMP_CLAUSE_UNTIED.
      	* omp-low.c (extract_omp_for_data): Use schedule(static)
      	for schedule(auto).  Handle pointer and unsigned iterators.
      	Compute fd->iter_type.  Handle POINTER_PLUS_EXPR increments.
      	Add loops argument.  Extract data for collapsed OMP_FOR loops.
      	(expand_parallel_call): Assert sched_kind isn't auto,
      	map runtime schedule to index 3.
      	(struct omp_for_data_loop): New type.
      	(struct omp_for_data): Remove v, n1, n2, step, cond_code fields.
      	Add loop, loops, collapse and iter_type fields.
      	(workshare_safe_to_combine_p): Disallow combined for if
      	iter_type is unsigned long long.  Don't combine collapse > 1 loops
      	unless all bounds and steps are constant.  Adjust extract_omp_for_data
      	caller.
      	(expand_omp_for_generic): Handle pointer, unsigned and long long
      	iterators.  Handle collapsed OMP_FOR loops.  Adjust
      	for struct omp_for_data changes.  If libgomp function doesn't return
      	boolean_type_node, add comparison of the return value with 0.
      	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
      	pointer, unsigned and long long iterators.  Adjust for struct
      	omp_for_data changes.
      	(expand_omp_for): Assert sched_kind isn't auto, map runtime schedule
      	to index 3.  Use GOMP_loop_ull*{start,next} if iter_type is
      	unsigned long long.  Allocate loops array, pass it to
      	extract_omp_for_data.  For collapse > 1 loops use always
      	expand_omp_for_generic.
      	(omp_context): Add sfield_map and srecord_type fields.
      	(is_task_ctx, lookup_sfield): New functions.
      	(use_pointer_for_field): Use is_task_ctx helper.  Change first
      	argument's type from const_tree to tree.  Clarify comment.
      	In OMP_TASK disallow copy-in/out sharing.
      	(build_sender_ref): Call lookup_sfield instead of lookup_field.
      	(install_var_field): Add mask argument.  Populate both record_type
      	and srecord_type if needed.
      	(delete_omp_context): Destroy sfield_map, clear DECL_ABSTRACT_ORIGIN
      	in srecord_type.
      	(fixup_child_record_type): Also remap FIELD_DECL's DECL_SIZE{,_UNIT}
      	and DECL_FIELD_OFFSET.
      	(scan_sharing_clauses): Adjust install_var_field callers.  For
      	firstprivate clauses on explicit tasks allocate the var by value in
      	record_type unconditionally, rather than by reference.
      	Handle OMP_CLAUSE_PRIVATE_OUTER_REF.  Scan OMP_CLAUSE_LASTPRIVATE_STMT.
      	Use is_taskreg_ctx instead of is_parallel_ctx.
      	Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED.
      	(create_omp_child_function_name): Add task_copy argument, use
      	*_omp_cpyfn* names if it is true.
      	(create_omp_child_function): Add task_copy argument, if true create
      	*_omp_cpyfn* helper function.
      	(scan_omp_parallel): Adjust create_omp_child_function callers.
      	Rename parallel_nesting_level to taskreg_nesting_level.
      	(scan_omp_task): New function.
      	(lower_rec_input_clauses): Don't run constructors for firstprivate
      	explicit task vars which are initialized by *_omp_cpyfn*.  
      	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): Clear DECL_ABSTRACT_ORIGIN if in task to
      	avoid duplicate setting of fields.  Handle
      	OMP_CLAUSE_PRIVATE_OUTER_REF.
      	(lower_send_shared_vars): Use srecord_type if non-NULL.  Don't
      	copy-out if TREE_READONLY, only copy-in.
      	(expand_task_copyfn): New function.
      	(expand_task_call): New function.
      	(struct omp_taskcopy_context): New type.
      	(task_copyfn_copy_decl, task_copyfn_remap_type, create_task_copyfn):
      	New functions.
      	(lower_omp_parallel): Rename to...
      	(lower_omp_taskreg): ... this.  Use OMP_TASKREG_* macros where needed.
      	Call create_task_copyfn if srecord_type is needed.  Adjust
      	sender_decl type.
      	(task_shared_vars): New variable.
      	(check_omp_nesting_restrictions): Warn if work-sharing,
      	barrier, master or ordered region is closely nested inside OMP_TASK.
      	Add warnings for barrier if closely nested inside of work-sharing,
      	ordered, or master region.
      	(scan_omp_1): Call check_omp_nesting_restrictions even for
      	GOMP_barrier calls.  Rename parallel_nesting_level to
      	taskreg_nesting_level.  Handle OMP_TASK.
      	(lower_lastprivate_clauses): Even if some lastprivate is found on a
      	work-sharing construct, continue looking for them on parent parallel
      	construct.
      	(lower_omp_for_lastprivate): Add lastprivate clauses
      	to the beginning of dlist rather than end.  Adjust for struct
      	omp_for_data changes.
      	(lower_omp_for): Add rec input clauses before OMP_FOR_PRE_BODY,
      	not after it.  Handle collapsed OMP_FOR loops, adjust for
      	OMP_FOR_{INIT,COND,INCR} changes, adjust extract_omp_for_data
      	caller.
      	(get_ws_args_for): Adjust extract_omp_for_data caller.
      	(scan_omp_for): Handle collapsed OMP_FOR
      	loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
      	(lower_omp_single_simple): If libgomp function doesn't return
      	boolean_type_node, add comparison of the return value with 0.
      	(diagnose_sb_1, diagnose_sb_2): Handle collapsed OMP_FOR
      	loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.  Handle OMP_TASK.
      	(parallel_nesting_level): Rename to...
      	(taskreg_nesting_level): ... this.
      	(is_taskreg_ctx): New function.
      	(build_outer_var_ref, omp_copy_decl): Use is_taskreg_ctx instead
      	of is_parallel_ctx.
      	(execute_lower_omp): Rename parallel_nesting_level to
      	taskreg_nesting_level.
      	(expand_omp_parallel): Rename to...
      	(expand_omp_taskreg): ... this.  Use OMP_TASKREG_* macros where needed.
      	Call omp_task_call for OMP_TASK regions.
      	(expand_omp): Adjust caller, handle OMP_TASK.
      	(lower_omp_1): Adjust lower_omp_taskreg caller, handle OMP_TASK.
      
      	* bitmap.c (bitmap_default_obstack_depth): New variable.
      	(bitmap_obstack_initialize, bitmap_obstack_release): Do nothing
      	if argument is NULL and bitmap_default_obstack is already initialized.
      	* ipa-struct-reorg.c (do_reorg_1): Call bitmap_obstack_release
      	at the end.
      	* matrix-reorg.c (matrix_reorg): Likewise.
      cp/
      	* cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
      	dependent_omp_for_p, begin_omp_task, finish_omp_task,
      	finish_omp_taskwait): New prototypes.
      	(cxx_omp_clause_default_ctor): Add outer argument.
      	(finish_omp_for): Add new clauses argument.
      	* cp-gimplify.c (cxx_omp_finish_clause): New function.
      	(cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
      	(cxx_omp_clause_default_ctor): Add outer argument.
      	(cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
      	* cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
      	* parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
      	Add par_clauses argument.  If decl is present in parallel's
      	lastprivate clause, change that clause to shared and add
      	a lastprivate clause for decl to OMP_FOR_CLAUSES.
      	Fix wording of error messages.  Adjust finish_omp_for caller.
      	Add clauses argument.  Parse loops with random access iterators.
      	(cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
      	functions.
      	(cp_parser_omp_for, cp_parser_omp_parallel): Adjust
      	cp_parser_omp_for_loop callers.
      	(cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
      	functions.
      	(cp_parser_omp_clause_name): Handle collapse and untied
      	clauses.
      	(cp_parser_omp_clause_schedule): Handle auto schedule.
      	(cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
      	and PRAGMA_OMP_CLAUSE_UNTIED.
      	(OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
      	(OMP_TASK_CLAUSE_MASK): Define.
      	(cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
      	(cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
      	(cp_parser_pragma): Handle PRAGMA_OMP_TASK and
      	PRAGMA_OMP_TASKWAIT.
      	* pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
      	OMP_CLAUSE_UNTIED.  Handle OMP_CLAUSE_LASTPRIVATE_STMT.
      	(tsubst_omp_for_iterator): New function.
      	(dependent_omp_for_p): New function.
      	(tsubst_expr) <case OMP_FOR>: Use it.  Handle collapsed OMP_FOR
      	loops.  Adjust finish_omp_for caller.  Handle loops with random
      	access iterators.  Adjust for OMP_FOR_{INIT,COND,INCR} changes.
      	(tsubst_expr): Handle OMP_TASK.
      	* semantics.c (cxx_omp_create_clause_info): New function.
      	(finish_omp_clauses): Call it.  Handle OMP_CLAUSE_UNTIED and
      	OMP_CLAUSE_COLLAPSE.
      	(cxx_omp_predetermined_sharing): Removed.
      	* semantics.c (finish_omp_for): Allow pointer iterators.  Use
      	handle_omp_for_class_iterator and dependent_omp_for_p.  Handle
      	collapsed for loops.  Adjust c_finish_omp_for caller.  Add new
      	clauses argument.  Fix check for type dependent cond or incr.
      	Set OMP_FOR_CLAUSES to clauses.  Use cp_convert instead of
      	fold_convert to convert incr amount to difference_type.  Only
      	fold if not in template.  If decl is mentioned in lastprivate
      	clause, set OMP_CLAUSE_LASTPRIVATE_STMT.  Handle loops with random
      	access iterators.  Adjust for OMP_FOR_{INIT,COND,INCR}
      	changes.
      	(finish_omp_threadprivate): Allow static class members of the
      	current class.
      	(handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
      	finish_omp_taskwait): New functions.
      
      	* parser.c (cp_parser_binary_expression): Add prec argument.
      	(cp_parser_assignment_expression): Adjust caller.
      	* cp-tree.h (outer_curly_brace_block): New prototype.
      	* decl.c (outer_curly_brace_block): No longer static.
      fortran/
      	* scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
      	* parse.c (next_free): Allow tab after !$omp.
      	(decode_omp_directive): Handle !$omp task, !$omp taskwait
      	and !$omp end task.
      	(case_executable): Add ST_OMP_TASKWAIT.
      	(case_exec_markers): Add ST_OMP_TASK.
      	(gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
      	ST_OMP_TASKWAIT.
      	(parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
      	* gfortran.h (gfc_find_sym_in_expr): New prototype.
      	(gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
      	(gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
      	OMP_DEFAULT_FIRSTPRIVATE to default_sharing.  Add collapse and
      	untied fields.
      	(gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
      	* 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.
      	* 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.
      	* types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
      	BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
      	BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
      	BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
      	BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
      	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
      	(BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
      	than boolean_type_node.
      	* dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
      	EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
      	untied and collapse clauses.
      	(gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
      	* trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
      	EXEC_OMP_TASKWAIT.
      	* st.c (gfc_free_statement): Likewise.
      	* resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
      	(find_sym_in_expr): Rename to...
      	(gfc_find_sym_in_expr): ... this.  No longer static.
      	(resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
      	* match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
      	prototypes.
      	* openmp.c (resolve_omp_clauses): Allow allocatable arrays in
      	firstprivate, lastprivate, reduction, copyprivate and copyin
      	clauses.
      	(omp_current_do_code): Made static.
      	(omp_current_do_collapse): New variable.
      	(gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
      	clear omp_current_do_code and omp_current_do_collapse on return.
      	(gfc_resolve_do_iterator): Handle collapsed do loops.
      	(resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
      	(OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
      	(gfc_match_omp_clauses): Handle default (firstprivate),
      	schedule (auto), untied and collapse (n) clauses.
      	(OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
      	(OMP_TASK_CLAUSES): Define.
      	(gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
      	* 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.
      	(gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
      	for assumed-size arrays.
      	(gfc_trans_omp_do): Add par_clauses argument.  If dovar is
      	present in lastprivate clause and do loop isn't simple,
      	set OMP_CLAUSE_LASTPRIVATE_STMT.  If dovar is present in
      	parallel's lastprivate clause, change it to shared and add
      	lastprivate clause to OMP_FOR_CLAUSES.  Handle collapsed do loops.
      	(gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
      	(gfc_trans_omp_parallel_do): Likewise.  Move collapse clause to
      	OMP_FOR from OMP_PARALLEL.
      	(gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
      	OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
      	(gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
      	(gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
      	EXEC_OMP_TASKWAIT.
      gcc/testsuite/
      	* gcc.dg/gomp/collapse-1.c: New test.
      	* gcc.dg/gomp/nesting-1.c: New test.
      	* g++.dg/gomp/task-1.C: New test.
      	* g++.dg/gomp/predetermined-1.C: New test.
      	* g++.dg/gomp/tls-4.C: New test.
      	* gfortran.dg/gomp/collapse1.f90: New test.
      	* gfortran.dg/gomp/sharing-3.f90: New test.
      	* gcc.dg/gomp/pr27499.c (foo): Remove is unsigned dg-warning.
      	* g++.dg/gomp/pr27499.C (foo): Likewise.
      	* g++.dg/gomp/for-16.C (foo): Likewise.
      	* g++.dg/gomp/tls-3.C: Remove dg-error, add S::s definition.
      	* g++.dg/gomp/pr34607.C: Adjust dg-error location.
      	* g++.dg/gomp/for-16.C (foo): Add a new dg-error.
      	* gcc.dg/gomp/appendix-a/a.35.4.c: Add dg-warning.
      	* gcc.dg/gomp/appendix-a/a.35.6.c: Likewise.
      	* gfortran.dg/gomp/appendix-a/a.35.4.f90: Likewise.
      	* gfortran.dg/gomp/appendix-a/a.35.6.f90: Likewise.
      	* gfortran.dg/gomp/omp_parse1.f90: Remove !$omp tab test.
      	* gfortran.dg/gomp/appendix-a/a.33.4.f90: Remove dg-error
      	about allocatable array.
      	* gfortran.dg/gomp/reduction1.f90: Likewise.
      libgomp/
      	* configure.ac (LIBGOMP_GNU_SYMBOL_VERSIONING): New AC_DEFINE.
      	Substitute also OMP_*LOCK_25*.
      	* configure: Regenerated.
      	* config.h.in: Regenerated.
      	* Makefile.am (libgomp_la_SOURCES): Add loop_ull.c, iter_ull.c,
      	ptrlock.c and task.c.
      	* Makefile.in: Regenerated.
      	* testsuite/Makefile.in: Regenerated.
      	* task.c: New file.
      	* loop_ull.c: New file.
      	* iter_ull.c: New file.
      	* libgomp.h: Include ptrlock.h.
      	(enum gomp_task_kind): New type.
      	(struct gomp_team): Add task_lock, task_queue, task_count,
      	task_running_count, single_count fields.  Add
      	work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS.
      	Remove work_share_lock, generation_mask,
      	oldest_live_gen, num_live_gen and init_work_shares fields, add
      	work work_share_list_alloc, work_share_list_free and work_share_chunk
      	fields.  Change work_shares from pointer to pointers into an array.
      	Change ordered_release field into gomp_sem_t ** from flexible array
      	member.  Add implicit_task and initial_work_shares fields.
      	Move close to the end of the struct.
      	(struct gomp_team_state): Add single_count, last_work_share,
      	active_level and level fields, remove work_share_generation.
      	(gomp_barrier_handle_tasks): New prototype.
      	(gomp_finish_task): New inline function.
      	(struct gomp_work_share): Move chunk_size, end, incr into
      	transparent union/struct, add chunk_size_ull, end_ll, incr_ll and
      	next_ll fields.  Reshuffle fields.  Add next_alloc,
      	next_ws, next_free and inline_ordered_team_ids fields, change
      	ordered_team_ids into pointer from flexible array member.
      	Add mode field.  Put lock and next into a different cache line
      	from most of the write-once fields.
      	(gomp_iter_ull_static_next, gomp_iter_ull_dynamic_next_locked,
      	gomp_iter_ull_guided_next_locked, gomp_iter_ull_dynamic_next,
      	gomp_iter_ull_guided_next): New prototypes.
      	(gomp_new_icv): New prototype.
      	(struct gomp_thread): Add thread_pool and task fields.
      	(struct gomp_thread_pool): New type.
      	(gomp_new_team): New prototype.
      	(gomp_team_start): Change type of last argument.
      	(gomp_new_work_share): Removed.
      	(gomp_init_work_share, gomp_fini_work_share): New prototypes.
      	(gomp_work_share_init_done): New static inline.
      	(gomp_throttled_spin_count_var, gomp_available_cpus,
      	gomp_managed_threads): New extern decls.
      	(gomp_init_task): New prototype.
      	(gomp_spin_count_var): New extern var decl.
      	(LIBGOMP_GNU_SYMBOL_VERSIONING): Undef if no visibility
      	or no alias support, or if not PIC.
      	(gomp_init_lock_30, gomp_destroy_lock_30, gomp_set_lock_30,
      	gomp_unset_lock_30, gomp_test_lock_30, gomp_init_nest_lock_30,
      	gomp_destroy_nest_lock_30, gomp_set_nest_lock_30,
      	gomp_unset_nest_lock_30, gomp_test_nest_lock_30, gomp_init_lock_25,
      	gomp_destroy_lock_25, gomp_set_lock_25, gomp_unset_lock_25,
      	gomp_test_lock_25, gomp_init_nest_lock_25, gomp_destroy_nest_lock_25,
      	gomp_set_nest_lock_25, gomp_unset_nest_lock_25,
      	gomp_test_nest_lock_25): New prototypes.
      	(omp_lock_symver, strong_alias): Define.
      	(gomp_remaining_threads_count, gomp_remaining_threads_lock): New
      	decls.
      	(gomp_end_task): New.
      	(struct gomp_task_icv, gomp_global_icv): New.
      	(gomp_thread_limit_var, gomp_max_active_levels_var): New.
      	(struct gomp_task): New.
      	(gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
      	gomp_run_sched_var, gomp_run_sched_chunk): Remove.
      	(gomp_icv): New.
      	(gomp_schedule_type): Reorder enum to match
      	omp_sched_t.
      	* team.c (struct gomp_thread_start_data): Add thread_pool and task
      	fields.
      	(gomp_thread_start): Add gomp_team_barrier_wait call.
      	For non-nested case remove clearing of docked thread thr fields.
      	Use pool fields instead of global gomp_* variables.  Use
      	gomp_barrier_wait_last when needed.  Initialize ts.active_level.
      	Create tasks for each member thread.
      	(free_team): Only destroy team barrier, task_lock here and free it.
      	(gomp_free_thread): Free last_team if non-NULL.
      	(gomp_team_end): Call gomp_team_barrier_wait instead of
      	gomp_barrier_wait.  For nested case call one extra
      	gomp_barrier_wait.  Move here some destruction from free_team.
      	Call free_team on pool->last_team if any, rather than freeing
      	current team.  Destroy work_share_list_free_lock ifndef
      	HAVE_SYNC_BUILTINS.
      	(gomp_new_icv): New function.
      	(gomp_threads, gomp_threads_size, gomp_threads_used,
      	gomp_threads_dock): Removed.
      	(gomp_thread_destructor): New variable.
      	(gomp_new_thread_pool, gomp_free_pool_helper, gomp_free_thread): New
      	functions.
      	(gomp_team_start): Create new pool if current thread doesn't have
      	one.  Use pool fields instead of global gomp_* variables. 
      	Initialize thread_pool field for new threads.  Clear single_count.
      	Change last argument from ws to team, don't create
      	new team, set ts.work_share to &team->work_shares[0] and clear
      	ts.last_work_share.  Don't clear ts.work_share_generation.
      	If number of threads changed, adjust atomically gomp_managed_threads.
      	Use gomp_init_task instead of gomp_new_task,
      	set thr->task to the corresponding implicit_task array entry.
      	Create tasks for each member thread.  Initialize ts.level.
      	(initialize_team): Call pthread_key_create on
      	gomp_thread_destructor.
      	(team_destructor): New function.
      	(new_team): Removed.
      	(gomp_new_team): New function.
      	(free_team): Free gomp_work_share blocks chained through next_alloc,
      	instead of freeing work_shares and destroying work_share_lock.
      	(gomp_team_end): Call gomp_fini_work_share.  If number of threads
      	changed, adjust atomically gomp_managed_threads.  Use gomp_end_task.
      	* barrier.c (GOMP_barrier): Call gomp_team_barrier_wait instead
      	of gomp_barrier_wait.
      	* single.c (GOMP_single_copy_start): Call gomp_team_barrier_wait
      	instead of gomp_barrier_wait.  Call gomp_work_share_init_done
      	if gomp_work_share_start returned true.  Don't unlock ws->lock.
      	(GOMP_single_copy_end): Call gomp_team_barrier_wait instead
      	of gomp_barrier_wait.
      	(GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS.  Call
      	gomp_work_share_init_done if gomp_work_share_start returned true.
      	Don't unlock ws->lock.
      	* work.c: Include stddef.h.
      	(free_work_share): Use work_share_list_free_lock instead
      	of atomic chaining ifndef HAVE_SYNC_BUILTINS.  Add team argument.
      	Call gomp_fini_work_share and then either free ws if orphaned, or
      	put it into work_share_list_free list of the current team.
      	(alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New
      	functions.
      	(gomp_work_share_start, gomp_work_share_end,
      	gomp_work_share_end_nowait): Rewritten.
      	* omp_lib.f90.in Change some tabs to spaces to prevent warnings.
      	(openmp_version): Set to 200805.
      	(omp_sched_kind, omp_sched_static, omp_sched_dynamic,
      	omp_sched_guided, omp_sched_auto): New parameters.
      	(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
      	omp_set_max_active_levels, omp_get_max_active_levels,
      	omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
      	omp_get_active_level): New interfaces.
      	* omp_lib.h.in (openmp_version): Set to 200805.
      	(omp_sched_kind, omp_sched_static, omp_sched_dynamic,
      	omp_sched_guided, omp_sched_auto): New parameters.
      	(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
      	omp_set_max_active_levels, omp_get_max_active_levels,
      	omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
      	omp_get_active_level): New externals.
      	* loop.c: Include limits.h.
      	(GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Handle
      	GFS_AUTO.
      	(GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start):
      	Likewise.  Use gomp_icv.
      	(gomp_loop_static_start, gomp_loop_dynamic_start): Clear
      	ts.static_trip here.
      	(gomp_loop_static_start, gomp_loop_ordered_static_start): Call
      	gomp_work_share_init_done after gomp_loop_init.  Don't unlock ws->lock.
      	(gomp_loop_dynamic_start, gomp_loop_guided_start): Call
      	gomp_work_share_init_done after gomp_loop_init.  If HAVE_SYNC_BUILTINS,
      	don't unlock ws->lock, otherwise lock it.
      	(gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call
      	gomp_work_share_init_done after gomp_loop_init.  Lock ws->lock.
      	(gomp_parallel_loop_start): Call gomp_new_team instead of
      	gomp_new_work_share.  Call gomp_loop_init on &team->work_shares[0].
      	Adjust gomp_team_start caller.  Pass 0 as second argument to
      	gomp_resolve_num_threads.
      	(gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr.
      	If adding ws->chunk_size nthreads + 1 times after end won't
      	overflow, set ws->mode to 1.
      	* libgomp_g.h (GOMP_loop_ull_static_start, GOMP_loop_ull_dynamic_start,
      	GOMP_loop_ull_guided_start, GOMP_loop_ull_runtime_start,
      	GOMP_loop_ull_ordered_static_start,
      	GOMP_loop_ull_ordered_dynamic_start,
      	GOMP_loop_ull_ordered_guided_start,
      	GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_static_next,
      	GOMP_loop_ull_dynamic_next, GOMP_loop_ull_guided_next,
      	GOMP_loop_ull_runtime_next, GOMP_loop_ull_ordered_static_next,
      	GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_guided_next,
      	GOMP_loop_ull_ordered_runtime_next, GOMP_task, GOMP_taskwait): New
      	prototypes.
      	* libgomp.map: Export lock routines also @@OMP_2.0.
      	(GOMP_loop_ordered_dynamic_first,
      	GOMP_loop_ordered_guided_first, GOMP_loop_ordered_runtime_first,
      	GOMP_loop_ordered_static_first): Remove.
      	(GOMP_loop_ull_dynamic_next, GOMP_loop_ull_dynamic_start,
      	GOMP_loop_ull_guided_next, GOMP_loop_ull_guided_start,
      	GOMP_loop_ull_ordered_dynamic_next,
      	GOMP_loop_ull_ordered_dynamic_start,
      	GOMP_loop_ull_ordered_guided_next,
      	GOMP_loop_ull_ordered_guided_start,
      	GOMP_loop_ull_ordered_runtime_next,
      	GOMP_loop_ull_ordered_runtime_start,
      	GOMP_loop_ull_ordered_static_next,
      	GOMP_loop_ull_ordered_static_start,
      	GOMP_loop_ull_runtime_next, GOMP_loop_ull_runtime_start,
      	GOMP_loop_ull_static_next, GOMP_loop_ull_static_start,
      	GOMP_task, GOMP_taskwait): Export @@GOMP_2.0.
      	(omp_set_schedule, omp_get_schedule,
      	omp_get_thread_limit, omp_set_max_active_levels,
      	omp_get_max_active_levels, omp_get_level,
      	omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level,
      	omp_set_schedule_, omp_set_schedule_8_,
      	omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
      	omp_set_max_active_levels_, omp_set_max_active_levels_8_,
      	omp_get_max_active_levels_, omp_get_level_,
      	omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
      	omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
      	New exports @@OMP_3.0.
      	* omp.h.in (omp_sched_t): New type.
      	(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
      	omp_set_max_active_levels, omp_get_max_active_levels,
      	omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
      	omp_get_active_level): New prototypes.
      	* env.c (gomp_spin_count_var, gomp_throttled_spin_count_var,
      	gomp_available_cpus, gomp_managed_threads, gomp_max_active_levels_var,
      	gomp_thread_limit_var, gomp_remaining_threads_count,
      	gomp_remaining_threads_lock): New variables.
      	(parse_spincount): New function.
      	(initialize_env): Call gomp_init_num_threads unconditionally.
      	Initialize gomp_available_cpus.  Call parse_spincount,
      	initialize gomp_{,throttled_}spin_count_var
      	depending on presence and value of OMP_WAIT_POLICY and
      	GOMP_SPINCOUNT env vars.  Handle GOMP_BLOCKTIME env var.
      	Handle OMP_WAIT_POLICY, OMP_MAX_ACTIVE_LEVELS,
      	OMP_THREAD_LIMIT, OMP_STACKSIZE env vars.  Handle unit specification
      	for GOMP_STACKSIZE.  Initialize gomp_remaining_threads_count and
      	gomp_remaining_threads_lock if needed.  Use gomp_global_icv.
      	(gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
      	gomp_run_sched_var, gomp_run_sched_chunk): Remove.
      	(gomp_global_icv): New.
      	(parse_schedule): Use it.  Parse "auto".
      	(omp_set_num_threads): Use gomp_icv.
      	(omp_set_dynamic, omp_get_dynamic, omp_set_nested, omp_get_nested):
      	Likewise.
      	(omp_get_max_threads): Move from parallel.c.
      	(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
      	omp_set_max_active_levels, omp_get_max_active_levels): New functions,
      	add ialias.
      	(parse_stacksize, parse_wait_policy): New functions.
      	* fortran.c: Rewrite lock wrappers, if symbol versioning provide
      	both wrappers for compatibility and new locks.
      	(omp_set_schedule, omp_get_schedule,
      	omp_get_thread_limit, omp_set_max_active_levels,
      	omp_get_max_active_levels, omp_get_level,
      	omp_get_ancestor_thread_num, omp_get_team_size,
      	omp_get_active_level): New ialias_redirect.
      	(omp_set_schedule_, omp_set_schedule_8_,
      	omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
      	omp_set_max_active_levels_, omp_set_max_active_levels_8_,
      	omp_get_max_active_levels_, omp_get_level_,
      	omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
      	omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
      	New functions.
      	* parallel.c: Include limits.h.
      	(gomp_resolve_num_threads): Add count argument.  Rewritten.
      	(GOMP_parallel_start): Call gomp_new_team and pass that as last
      	argument to gomp_team_start.  Pass 0 as second argument to
      	gomp_resolve_num_threads.
      	(GOMP_parallel_end): Decrease gomp_remaining_threads_count
      	if gomp_thread_limit_var != ULONG_MAX.
      	(omp_in_parallel): Implement using ts.active_level.
      	(omp_get_max_threads): Move to env.c.
      	(omp_get_level, omp_get_ancestor_thread_num,
      	omp_get_team_size, omp_get_active_level): New functions,
      	add ialias.
      	* sections.c (GOMP_sections_start): Call gomp_work_share_init_done
      	after gomp_sections_init.  If HAVE_SYNC_BUILTINS, call
      	gomp_iter_dynamic_next instead of the _locked variant and don't take
      	lock around it, otherwise acquire it before calling
      	gomp_iter_dynamic_next_locked.
      	(GOMP_sections_next): If HAVE_SYNC_BUILTINS, call
      	gomp_iter_dynamic_next instead of the _locked variant and don't take
      	lock around it.
      	(GOMP_parallel_sections_start): Call gomp_new_team instead of
      	gomp_new_work_share.  Call gomp_sections_init on &team->work_shares[0].
      	Adjust gomp_team_start caller.  Pass count as second argument to
      	gomp_resolve_num_threads, don't adjust num_threads after the call.
      	Use gomp_icv.
      	* iter.c (gomp_iter_dynamic_next_locked): Don't multiply
      	ws->chunk_size by incr.
      	(gomp_iter_dynamic_next): Likewise.  If ws->mode, use more efficient
      	code.
      	* libgomp_f.h.in (omp_lock_25_arg_t, omp_nest_lock_25_arg_t): New
      	types.
      	(omp_lock_25_arg, omp_nest_lock_25_arg): New macros.
      	(omp_check_defines): Check even the compat defines.
      	* config/linux/ptrlock.c: New file.
      	* config/linux/ptrlock.h: New file.
      	* config/linux/wait.h: New file.
      	* config/posix/ptrlock.c: New file.
      	* config/posix/ptrlock.h: New file.
      	* config/linux/bar.h (gomp_team_barrier_wait,
      	gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
      	(gomp_team_barrier_set_task_pending,
      	gomp_team_barrier_clear_task_pending,
      	gomp_team_barrier_set_waiting_for_tasks,
      	gomp_team_barrier_waiting_for_tasks,
      	gomp_team_barrier_done): New inlines.
      	(gomp_barrier_t): Rewritten.
      	(gomp_barrier_state_t): New typedef.
      	(gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy,
      	gomp_barrier_wait_start): Rewritten.
      	(gomp_barrier_wait_end): Change second argument to
      	gomp_barrier_state_t.
      	(gomp_barrier_last_thread, gomp_barrier_wait_last): New static
      	inlines.
      	* config/linux/bar.c: Include wait.h instead of libgomp.h and
      	futex.h.
      	(gomp_barrier_wait_end): Rewritten.
      	(gomp_team_barrier_wait, gomp_team_barrier_wait_end,
      	gomp_team_barrier_wake, gomp_barrier_wait_last): New functions.
      	* config/posix/bar.h (gomp_barrier_t): Add generation field.
      	(gomp_barrier_state_t): New typedef.
      	(gomp_team_barrier_wait,
      	gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
      	(gomp_barrier_wait_start): Or all but low 2 bits from generation
      	into the return value.  Return gomp_barrier_state_t.
      	(gomp_team_barrier_set_task_pending,
      	gomp_team_barrier_clear_task_pending,
      	gomp_team_barrier_set_waiting_for_tasks,
      	gomp_team_barrier_waiting_for_tasks,
      	gomp_team_barrier_done): New inlines.
      	(gomp_barrier_wait_end): Change second argument to
      	gomp_barrier_state_t.
      	(gomp_barrier_last_thread, gomp_barrier_wait_last): New static
      	inlines.
      	* config/posix/bar.c (gomp_barrier_init): Clear generation field.
      	(gomp_barrier_wait_end): Change second argument to
      	gomp_barrier_state_t. 
      	(gomp_team_barrier_wait, gomp_team_barrier_wait_end,
      	gomp_team_barrier_wake): New functions.
      	* config/linux/mutex.c: Include wait.h instead of libgomp.h and
      	futex.h.
      	(gomp_futex_wake, gomp_futex_wait): New variables.
      	(gomp_mutex_lock_slow): Call do_wait instead of futex_wait.
      	* config/linux/lock.c: Rewrite to make locks task owned,
      	for backwards compatibility provide the old entrypoints
      	if symbol versioning.  Include wait.h instead of libgomp.h and
      	futex.h.
      	(gomp_set_nest_lock_25): Call do_wait instead of futex_wait.
      	* config/posix95/lock.c: Rewrite to make locks task owned,
      	for backwards compatibility provide the old entrypoints
      	if symbol versioning.
      	* config/posix/lock.c: Rewrite to make locks task owned,
      	for backwards compatibility provide the old entrypoints
      	if symbol versioning.
      	* config/linux/proc.c (gomp_init_num_threads): Use gomp_global_icv.
      	(get_num_procs, gomp_dynamic_max_threads): Use gomp_icv.
      	* config/posix/proc.c, config/mingw32/proc.c: Similarly.
      	* config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
      	(sys_futex0): Return error code.
      	(futex_wake, futex_wait): If ENOSYS was returned, clear
      	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
      	(cpu_relax, atomic_write_barrier): New static inlines.
      	* config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
      	(futex_wake, futex_wait): If ENOSYS was returned, clear
      	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
      	(cpu_relax, atomic_write_barrier): New static inlines.
      	* config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
      	(sys_futex0): Return error code.
      	(futex_wake, futex_wait): If ENOSYS was returned, clear
      	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
      	(cpu_relax, atomic_write_barrier): New static inlines.
      	* config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
      	(sys_futex0): Return error code.
      	(futex_wake, futex_wait): If ENOSYS was returned, clear
      	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
      	(cpu_relax, atomic_write_barrier): New static inlines.
      	* config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
      	(sys_futex0): Return error code.
      	(futex_wake, futex_wait): If ENOSYS was returned, clear
      	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
      	(cpu_relax, atomic_write_barrier): New static inlines.
      	* config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
      	(sys_futex0): Return error code.
      	(futex_wake, futex_wait): If ENOSYS was returned, clear
      	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
      	(cpu_relax, atomic_write_barrier): New static inlines.
      	* config/linux/sem.c: Include wait.h instead of libgomp.h and
      	futex.h.
      	(gomp_sem_wait_slow): Call do_wait instead of futex_wait.
      	* config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS.
      	* config/linux/omp-lock.h (omp_lock_25_t, omp_nest_lock_25_t): New
      	types.
      	(omp_nest_lock_t): Change owner into void *, add lock field.
      	* config/posix95/omp-lock.h: Include semaphore.h.
      	(omp_lock_25_t, omp_nest_lock_25_t): New types.
      	(omp_lock_t): Use sem_t instead of mutex if semaphores
      	aren't broken.
      	(omp_nest_lock_t): Likewise.  Change owner to void *.
      	* config/posix/omp-lock.h: Include semaphore.h.
      	(omp_lock_25_t, omp_nest_lock_25_t): New types.
      	(omp_lock_t): Use sem_t instead of mutex if semaphores
      	aren't broken.
      	(omp_nest_lock_t): Likewise.  Add owner field.
      
      	* testsuite/libgomp.c/collapse-1.c: New test.
      	* testsuite/libgomp.c/collapse-2.c: New test.
      	* testsuite/libgomp.c/collapse-3.c: New test.
      	* testsuite/libgomp.c/icv-1.c: New test.
      	* testsuite/libgomp.c/icv-2.c: New test.
      	* testsuite/libgomp.c/lib-2.c: New test.
      	* testsuite/libgomp.c/lock-1.c: New test.
      	* testsuite/libgomp.c/lock-2.c: New test.
      	* testsuite/libgomp.c/lock-3.c: New test.
      	* testsuite/libgomp.c/loop-4.c: New test.
      	* testsuite/libgomp.c/loop-5.c: New test.
      	* testsuite/libgomp.c/loop-6.c: New test.
      	* testsuite/libgomp.c/loop-7.c: New test.
      	* testsuite/libgomp.c/loop-8.c: New test.
      	* testsuite/libgomp.c/loop-9.c: New test.
      	* testsuite/libgomp.c/nested-3.c: New test.
      	* testsuite/libgomp.c/nestedfn-6.c: New test.
      	* testsuite/libgomp.c/sort-1.c: New test.
      	* testsuite/libgomp.c/task-1.c: New test.
      	* testsuite/libgomp.c/task-2.c: New test.
      	* testsuite/libgomp.c/task-3.c: New test.
      	* testsuite/libgomp.c/task-4.c: New test.
      	* testsuite/libgomp.c++/c++.exp: Add libstdc++-v3 build includes
      	to C++ testsuite default compiler options.
      	* testsuite/libgomp.c++/collapse-1.C: New test.
      	* testsuite/libgomp.c++/collapse-2.C: New test.
      	* testsuite/libgomp.c++/ctor-10.C: New test.
      	* testsuite/libgomp.c++/for-1.C: New test.
      	* testsuite/libgomp.c++/for-2.C: New test.
      	* testsuite/libgomp.c++/for-3.C: New test.
      	* testsuite/libgomp.c++/for-4.C: New test.
      	* testsuite/libgomp.c++/for-5.C: New test.
      	* testsuite/libgomp.c++/loop-8.C: New test.
      	* testsuite/libgomp.c++/loop-9.C: New test.
      	* testsuite/libgomp.c++/loop-10.C: New test.
      	* testsuite/libgomp.c++/task-1.C: New test.
      	* testsuite/libgomp.c++/task-2.C: New test.
      	* testsuite/libgomp.c++/task-3.C: New test.
      	* testsuite/libgomp.c++/task-4.C: New test.
      	* testsuite/libgomp.c++/task-5.C: New test.
      	* testsuite/libgomp.c++/task-6.C: New test.
      	* testsuite/libgomp.fortran/allocatable1.f90: New test.
      	* testsuite/libgomp.fortran/allocatable2.f90: New test.
      	* testsuite/libgomp.fortran/allocatable3.f90: New test.
      	* testsuite/libgomp.fortran/allocatable4.f90: New test.
      	* testsuite/libgomp.fortran/collapse1.f90: New test.
      	* testsuite/libgomp.fortran/collapse2.f90: New test.
      	* testsuite/libgomp.fortran/collapse3.f90: New test.
      	* testsuite/libgomp.fortran/collapse4.f90: New test.
      	* testsuite/libgomp.fortran/lastprivate1.f90: New test.
      	* testsuite/libgomp.fortran/lastprivate2.f90: New test.
      	* testsuite/libgomp.fortran/lib4.f90: New test.
      	* testsuite/libgomp.fortran/lock-1.f90: New test.
      	* testsuite/libgomp.fortran/lock-2.f90: New test.
      	* testsuite/libgomp.fortran/nested1.f90: New test.
      	* testsuite/libgomp.fortran/nestedfn4.f90: New test.
      	* testsuite/libgomp.fortran/strassen.f90: New test.
      	* testsuite/libgomp.fortran/tabs1.f90: New test.
      	* testsuite/libgomp.fortran/tabs2.f: New test.
      	* testsuite/libgomp.fortran/task1.f90: New test.
      	* testsuite/libgomp.fortran/task2.f90: New test.
      	* testsuite/libgomp.fortran/vla4.f90: Add dg-warning.
      	* testsuite/libgomp.fortran/vla5.f90: Likewise.
      	* testsuite/libgomp.c/pr26943-2.c: Likewise.
      	* testsuite/libgomp.c/pr26943-3.c: Likewise.
      	* testsuite/libgomp.c/pr26943-4.c: Likewise.
      
      Co-Authored-By: Jakob Blomer <jakob.blomer@ira.uka.de>
      Co-Authored-By: Richard Henderson <rth@redhat.com>
      Co-Authored-By: Ulrich Drepper <drepper@redhat.com>
      
      From-SVN: r136433
      Jakub Jelinek committed
  18. 07 Apr, 2007 1 commit
  19. 23 Mar, 2007 1 commit
  20. 22 Mar, 2007 1 commit
    • default.exp: New file. · 516f1ed8
      	* testsuite/config/default.exp: New file.
      	* testsuite/lib/libgomp.exp: New file.
      	* testsuite/lib/libgomp.dg (load_gcc_lib, libgomp_init,
      	libgomp_target_compile, libgomp_option_help, libgomp_option_proc,
      	load_lib *, load_gcc_lib *): Move to libgomp.exp.
      	(libgomp_load): Remove.
      	* testsuite/lib/libgomp.exp (libgomp_init): Compute
      	always_ld_library_path, not ld_library_path.  Set additional_flags
      	to -march=i486 for ilp32 x86_64-*-* and i386-*-* targets.
      	(target_compile): Do not call libgomp_init.  Append lang_library_path
      	and lang_link_flags to options.
      	* testsuite/libgomp.c/c.exp: Set DEFAULT_FLAGS to -O2.  Set
      	ld_library_path from always_ld_library_path.  Set LD_LIBRARY_PATH
      	here.
      	* testsuite/libgomp.c++/c++.exp: Set ld_library_path from
      	always_ld_library_path.  Set LD_LIBRARY_PATH here.
      	* testsuite/libgomp.fortran/fortran.exp: Ditto.
      	* testsuite/libgomp.c/atomic-1.c: Set dg-options to
      	"-O2 -march=pentium" for ilp32 x86 targets. Simplify check for
      	CX8 flag.
      	* testsuite/libgomp.c/atomic-2.c: Set dg-options to "-O2 -mcx16" for
      	lp64 x86 targets. Do not check for SSE3 bit. Do not define bit_SSE3.
      	* testsuite/libgomp.c/pr29947-1.c: Remove default dg-options.
      	* testsuite/libgomp.c/pr29947-1.c: Ditto.
      	* testsuite/libgomp.c/atomic-10.c: Ditto.
      
      From-SVN: r123125
      Uros Bizjak committed
  21. 09 Mar, 2006 1 commit