Commit Graph

707 Commits

Author SHA1 Message Date
Tom de Vries 4f75d60893 Use max_loop_iterations in transform_to_exit_first_loop_alt
2015-06-30  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/66652
	* tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
	max_loop_iterations to determine if nit + 1 overflows.

	* testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (f): Rewrite
	using restrict pointers.
	(main): Add arguments to calls to f.
	* testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.

	* gcc.dg/parloops-exit-first-loop-alt-pr66652.c: New test.
	* gcc.dg/parloops-exit-first-loop-alt-3.c (f):  Rewrite using restrict
	pointers.
	* gcc.dg/parloops-exit-first-loop-alt.c: Same.

From-SVN: r225162
2015-06-30 08:35:57 +00:00
Andreas Tobler 6d9d1eeb97 configure.ac: Fix check for header <sys/sysctl.h>.
2015-06-23  Andreas Tobler  <andreast@gcc.gnu.org>

    * configure.ac: Fix check for header <sys/sysctl.h>.
    * configure: Regenerate.
    * config.h.in: Likewise.

From-SVN: r224855
2015-06-23 19:59:59 +02:00
Tom de Vries 1222f22bd8 Use abort in parloops-exit-first-loop-alt-{3,4}.c
2015-06-23  Tom de Vries  <tom@codesourcery.com>

	* testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (main): Use
	abort.
	* testsuite/libgomp.c/parloops-exit-first-loop-alt-4.c (main): Same.

From-SVN: r224849
2015-06-23 15:02:25 +00:00
Thomas Schwinge bfcd036fbe libgomp: libgomp.oacc-c-c++-common/lib-62.c is for acc_device_nvidia only
libgomp/
	* testsuite/libgomp.oacc-c-c++-common/lib-62.c: Only consider for
	acc_device_nvidia.

From-SVN: r224640
2015-06-19 09:41:44 +02:00
Thomas Schwinge d7efbbf6af libgomp: XFAIL two libgomp.oacc-* tests
PR libgomp/66518
	libgomp/
	* testsuite/libgomp.oacc-c-c++-common/lib-3.c: XFAIL.
	* testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.

From-SVN: r224639
2015-06-19 09:41:37 +02:00
Tom de Vries d7bfc710ab Remove dg-options -O2 in libgomp.c
2015-06-15  Tom de Vries  <tom@codesourcery.com>

	* testsuite/libgomp.c/atomic-1.c: Remove dg-options "-O2".  Use
	dg-additional-options for any remaining options.
	* testsuite/libgomp.c/atomic-2.c: Same.
	* testsuite/libgomp.c/atomic-4.c: Same.
	* testsuite/libgomp.c/atomic-5.c: Same.
	* testsuite/libgomp.c/atomic-6.c: Same.
	* testsuite/libgomp.c/autopar-1.c: Same.
	* testsuite/libgomp.c/copyin-1.c: Same.
	* testsuite/libgomp.c/copyin-2.c: Same.
	* testsuite/libgomp.c/copyin-3.c: Same.
	* testsuite/libgomp.c/examples-4/e.53.5.c: Same.
	* testsuite/libgomp.c/nestedfn-5.c: Same.
	* testsuite/libgomp.c/parloops-exit-first-loop-alt-2.c: Same.
	* testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c: Same.
	* testsuite/libgomp.c/parloops-exit-first-loop-alt-4.c: Same.
	* testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
	* testsuite/libgomp.c/pr32362-1.c: Same.
	* testsuite/libgomp.c/pr32362-2.c: Same.
	* testsuite/libgomp.c/pr32362-3.c: Same.
	* testsuite/libgomp.c/pr39591-1.c: Same.
	* testsuite/libgomp.c/pr39591-2.c: Same.
	* testsuite/libgomp.c/pr39591-3.c: Same.
	* testsuite/libgomp.c/pr58392.c: Same.
	* testsuite/libgomp.c/pr58756.c: Same.
	* testsuite/libgomp.c/simd-1.c: Same.
	* testsuite/libgomp.c/simd-10.c: Same.
	* testsuite/libgomp.c/simd-11.c: Same.
	* testsuite/libgomp.c/simd-12.c: Same.
	* testsuite/libgomp.c/simd-13.c: Same.
	* testsuite/libgomp.c/simd-14.c: Same.
	* testsuite/libgomp.c/simd-15.c: Same.
	* testsuite/libgomp.c/simd-2.c: Same.
	* testsuite/libgomp.c/simd-3.c: Same.
	* testsuite/libgomp.c/simd-4.c: Same.
	* testsuite/libgomp.c/simd-5.c: Same.
	* testsuite/libgomp.c/simd-6.c: Same.
	* testsuite/libgomp.c/simd-7.c: Same.
	* testsuite/libgomp.c/simd-8.c: Same.
	* testsuite/libgomp.c/simd-9.c: Same.

From-SVN: r224489
2015-06-15 18:10:51 +00:00
Tom de Vries fb5b535246 Fix typo in libgomp/testsuite/libgomp.c/pr35625.c
2015-06-15  Tom de Vries  <tom@codesourcery.com>

	* testsuite/libgomp.c/pr35625.c: Fix typo.

From-SVN: r224483
2015-06-15 13:57:04 +00:00
Tom de Vries ca431befaa Remove -fopenmp in dg-options in libgomp.c
2015-06-15  Tom de Vries  <tom@codesourcery.com>

	* testsuite/libgomp.c/atomic-18.c: Remove superfluous -fopenmp setting
	in dg-options.
	* testsuite/libgomp.c/atomic-3.c: Same.
	* testsuite/libgomp.c/debug-1.c: Same.
	* testsuite/libgomp.c/nqueens-1.c: Same.
	* testsuite/libgomp.c/pr26171.c: Same.
	* testsuite/libgomp.c/pr48591.c: Same.
	* testsuite/libgomp.c/pr64824.c: Same.
	* testsuite/libgomp.c/pr64868.c: Same.
	* testsuite/libgomp.c/pr66133.c: Same.
	* testsuite/libgomp.c/pr66199-1.c: Same.
	* testsuite/libgomp.c/pr66199-2.c: Same.
	* testsuite/libgomp.c/target-8.c: Same.

From-SVN: r224480
2015-06-15 13:26:12 +00:00
Tom de Vries 0d8a9e2065 Use dg-additional-options for -std={gnu99,c99}
2015-06-15  Tom de Vries  <tom@codesourcery.com>

	* testsuite/libgomp.c/collapse-3.c: Use dg-additional-options for
	-std={gnu99,c99}.
	* testsuite/libgomp.c/for-1.c: Same.
	* testsuite/libgomp.c/for-2.c: Same.
	* testsuite/libgomp.c/for-3.c: Same.
	* testsuite/libgomp.c/pr35625.c: Same.
	* testsuite/libgomp.c/pr39154.c: Same.
	* testsuite/libgomp.c/simd-16.c: Same.
	* testsuite/libgomp.c/simd-17.c: Same.

From-SVN: r224479
2015-06-15 13:26:03 +00:00
Tom de Vries a6860be9c8 Add gcc.dg/parloops-exit-first-loop-alt-4.c
2015-06-13  Tom de Vries  <tom@codesourcery.com>

	* gcc.dg/parloops-exit-first-loop-alt-4.c: New test.

	* testsuite/libgomp.c/parloops-exit-first-loop-alt-4.c: New test.

From-SVN: r224453
2015-06-13 08:05:54 +00:00
Tom de Vries ab3306d23c Update parloops-exit-first-loop-alt{,-2,-3}.c
2015-06-13  Tom de Vries  <tom@codesourcery.com>

	* testsuite/libgomp.c/parloops-exit-first-loop-alt-2.c: Add comment.
	* testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
	* testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c: Add comment.
	(N): Define.
	(main): Use N instead of hardcoded constants.

	* gcc.dg/parloops-exit-first-loop-alt-2.c: Add comment.
	(main): Remove superfluous attributes.
	* gcc.dg/parloops-exit-first-loop-alt-3.c: Same.
	* gcc.dg/parloops-exit-first-loop-alt.c: Same.

From-SVN: r224452
2015-06-13 08:05:44 +00:00
Tom de Vries 7c82d82716 Add transform_to_exit_first_loop_alt
2015-06-05  Tom de Vries  <tom@codesourcery.com>

	merge from gomp4 branch:
	2015-05-28  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/65443
	* tree-parloops.c (replace_imm_uses, replace_uses_in_bb_by)
	(replace_uses_in_bbs_by, transform_to_exit_first_loop_alt)
	(try_transform_to_exit_first_loop_alt): New function.
	(transform_to_exit_first_loop): Use
	try_transform_to_exit_first_loop_alt.

	* gcc.dg/parloops-exit-first-loop-alt-2.c: New test.
	* gcc.dg/parloops-exit-first-loop-alt-3.c: New test.
	* gcc.dg/parloops-exit-first-loop-alt.c: New test.

	* testsuite/libgomp.c/parloops-exit-first-loop-alt-2.c: New test.
	* testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c: New test.
	* testsuite/libgomp.c/parloops-exit-first-loop-alt.c: New test.

From-SVN: r224154
2015-06-05 15:57:34 +00:00
Uros Bizjak 6aa54a8b25 futex.h (futex_wait): Remove doouble initialization.
* config/linux/x86/futex.h (futex_wait) [__x86_64__]:
	Remove doouble initialization.

From-SVN: r224150
2015-06-05 12:56:14 +02:00
Bernhard Reutner-Fischer c469078de7 testsuite: auto-wipe dump files
gcc/testsuite/ChangeLog

2015-05-29  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>

	* lib/gcc-dg.exp (cleanup-ipa-dump, cleanup-rtl-dump,
	cleanup-tree-dump, cleanup-dump, cleanup-saved-temps): Remove.
	Adjust all callers.
	(schedule-cleanups, dg-keep-saved-temps): New proc.
	(gcc-dg-test-1): Schedule cleanups.
	* lib/profopt.exp (profopt-execute): Likewise.
	* g++.dg/cdce3.C: Adjust expected line numbers.
	* gcc.dg/cdce1.c: Likewise.
	* gcc.dg/cdce2.c: Likewise.
	* gcc.dg/strlenopt-22.c: Fix comment delimiter.
	* gcc.dg/strlenopt-24.c: Likewise.
	* gcc.dg/tree-ssa/vrp26.c: Likewise.
	* gcc.dg/tree-ssa/vrp28.c: Likewise.
	* obj-c++.dg/encode-2.mm: Likewise.

libgomp/ChangeLog

2015-05-29  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>

	* testsuite/libgomp.graphite/bounds.c: Adjust for
	cleanup-tree-dump removal.
	* testsuite/libgomp.graphite/force-parallel-1.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-2.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-3.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-4.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-6.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-9.c: Likewise.
	* testsuite/libgomp.graphite/pr41118.c: Likewise.


gcc/ChangeLog

2015-05-29  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>

	* config/arm/neon-testgen.ml (emit_epilogue): Remove manual call
	to cleanup-saved-temps.
	* doc/sourcebuild.texi (Clean up generated test files): Expand
	introduction.
	(dg-keep-saved-temps): Document new proc.
	(cleanup-ipa-dump, cleanup-rtl-dump, cleanup-tree-dump,
	cleanup-saved-temps): Remove.

From-SVN: r223858
2015-05-29 10:20:29 +02:00
Uros Bizjak bb3caa3577 futex.h (sys_futex0): Remove function.
* config/linux/x86/futex.h (sys_futex0) [!__x86_64__]: Remove function.
	(futex_wait) [!__x86_64__]: Use __asm operand instead of sys_futex0.
	(futex_wake) [!__x86_64__]: Ditto.

From-SVN: r223821
2015-05-28 15:59:17 +02:00
Julian Brown 9fb5fd444b oacc-init.c (resolve_device): Add FAIL_IS_ERROR argument.
* oacc-init.c (resolve_device): Add FAIL_IS_ERROR argument. Update
	function comment. Only call gomp_fatal if new argument is true.
	(acc_dev_num_out_of_range): New function.
	(acc_init_1, acc_shutdown_1): Update call to resolve_device. Call
	acc_dev_num_out_of_range as appropriate.
	(acc_get_num_devices, acc_set_device_type, acc_get_device_type)
	(acc_get_device_num, acc_set_device_num): Update calls to resolve_device.
	* testsuite/libgomp.oacc-c-c++-common/lib-4.c: Update expected test
	output.

From-SVN: r223803
2015-05-28 10:35:39 +00:00
Julian Brown 32eaed9380 re PR libgomp/65742 (Several libgomp.oacc-* failures after r221922.)
PR libgomp/65742

    gcc/
    * builtins.c (expand_builtin_acc_on_device): Don't use open-coded
    sequence for !ACCEL_COMPILER.

    libgomp/
    * oacc-init.c (plugin/plugin-host.h): Include.
    (acc_on_device): Check whether we're in an offloaded region for
    host_nonshm
    plugin. Don't use __builtin_acc_on_device.
    * plugin/plugin-host.c (GOMP_OFFLOAD_openacc_parallel): Set
    nonshm_exec flag in thread-local data.
    (GOMP_OFFLOAD_openacc_create_thread_data): Allocate thread-local
    data for host_nonshm plugin.
    (GOMP_OFFLOAD_openacc_destroy_thread_data): Free thread-local data
    for host_nonshm plugin.
    * plugin/plugin-host.h: New.

From-SVN: r223801
2015-05-28 09:29:19 +00:00
Uros Bizjak 8ed501f167 wait.h (gomp_futex_wait, [...]): Declare as int.
2015-05-27  Uros Bizjak  <ubizjak@gmail.com>

	* config/linux/wait.h (gomp_futex_wait, gomp_futex_wake):
	Declare as int.
	(FUTEX_PRIVATE_FLAG): Remove L suffix.
	* config/linux/mutex.c (gomp_futex_wait, gomp_futex_wake):
	Declare as int.

2015-05-27  Uros Bizjak  <ubizjak@gmail.com>

	* config/linux/ia64/futex.h (sys_futex0) Change operand "op" to int.

2015-05-27  Uros Bizjak  <ubizjak@gmail.com>

	Revert:
	* config/linux/x86/futex.h (sys_futex0) [!__x86_64__]:
	Change operand "op" to long.

From-SVN: r223780
2015-05-27 23:07:09 +02:00
Uros Bizjak ea023bcfd8 futex.h (sys_futex0): Change operand "op" to long.
libgomp/ChangeLog:

	* config/linux/x86/futex.h (sys_futex0) [!__x86_64__]:
	Change operand "op" to long.
	[__PIC__]: Remove sys_futex0 function.

libitm/ChangeLog:

	* config/linux/x86/futex_bits.h (sys_futex0) [!__x86_64__]:
	Change operand "op" to long.
	[__PIC__]: Remove sys_futex0 function.

From-SVN: r223771
2015-05-27 21:35:58 +02:00
Chung-Lin Tang 1716efeb6d target.c (gomp_map_pointer): New function abstracting out GOMP_MAP_POINTER handling.
2015-05-27  Chung-Lin Tang  <cltang@codesourcery.com>

	libgomp/
	* target.c (gomp_map_pointer): New function abstracting out
	GOMP_MAP_POINTER handling.
	(gomp_map_vars): Remove GOMP_MAP_POINTER handling code and use
	gomp_map_pointer().

From-SVN: r223737
2015-05-27 06:16:37 +00:00
Jakub Jelinek 41b37d5ec1 re PR middle-end/66199 (lastprivate/linear clause issues on combined constructs)
PR middle-end/66199
	* tree.h (OMP_TEAMS_COMBINED): Define.
	* gimplify.c (enum gimplify_omp_var_data): Add
	GOVD_LINEAR_LASTPRIVATE_NO_OUTER.
	(enum omp_region_type): Add ORT_COMBINED_TEAMS.
	(omp_notice_variable): Accept both ORT_TEAMS
	and ORT_COMBINED_TEAMS.  Don't recurse if
	GOVD_LINEAR_LASTPRIVATE_NO_OUTER is set and either
	GOVD_LINEAR is set, or GOVD_LASTPRIVATE without
	GOVD_FIRSTPRIVATE.
	(omp_no_lastprivate): New function.
	(gimplify_scan_omp_clauses): For OMP_CLAUSE_LASTPRIVATE
	and OMP_CLAUSE_LINEAR, if omp_no_lastprivate, don't
	notice_outer and set appropriate bits, otherwise make
	sure default(none) combined constructs won't complain.
	(gimplify_adjust_omp_clauses): Remove OMP_CLAUSE_LINEAR
	outer special casing, for OMP_CLAUSE_LASTPRIVATE if
	omp_no_lastprivate either remove the clause or turn it
	into OMP_CLAUSE_PRIVATE.
	(gimplify_omp_for): Fix up handling of implicit
	lastprivate or linear iterators.
	(gimplify_omp_workshare): For OMP_TEAMS_COMBINED use
	ORT_COMBINED_TEAMS.
	* omp-low.c (lower_omp_for_lastprivate): For combined
	for simd use fd.loop.n2 from the for rather than simd.
gcc/c/
	* c-parser.c (c_parser_omp_for_loop): Don't add
	OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
	OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
	(c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
	constructs.
gcc/cp/
	* parser.c (cp_parser_omp_for_loop): Don't add
	OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
	OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
	(cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
	constructs.
gcc/fortran/
	* trans-openmp.c (gfc_trans_omp_teams): Set OMP_TEAMS_COMBINED for
	combined constructs.
	(gfc_trans_omp_target): Make sure BIND_EXPR has non-NULL
	BIND_EXPR_BLOCK.
libgomp/
	* testsuite/libgomp.c/pr66199-1.c: New test.
	* testsuite/libgomp.c/pr66199-2.c: New test.
	* testsuite/libgomp.c++/pr66199-1.C: New test.
	* testsuite/libgomp.c++/pr66199-2.C: New test.
	* testsuite/libgomp.fortran/pr66199-1.f90: New test.
	* testsuite/libgomp.fortran/pr66199-2.f90: New test.

From-SVN: r223387
2015-05-19 18:16:15 +02:00
Julian Brown c831982647 plugin-nvptx.c (nvptx_get_num_devices): Return zero on cuInit failure.
* plugin/plugin-nvptx.c (nvptx_get_num_devices): Return zero
	on cuInit failure.

From-SVN: r223352
2015-05-19 11:06:31 +00:00
Jakub Jelinek b37dddbc77 re PR middle-end/66133 (Wrong-code with noreturn #pragma omp task body)
PR middle-end/66133
	* omp-low.c (expand_omp_taskreg): For GIMPLE_OMP_TASK expansion,
	make sure it is never noreturn, even when the task body does not
	return.
	(lower_omp_taskreg): For GIMPLE_OMP_TASK, emit GIMPLE_OMP_CONTINUE
	right before GIMPLE_OMP_RETURN.
	(make_gimple_omp_edges): Accept GIMPLE_OMP_CONTINUE as ->cont
	for GIMPLE_OMP_TASK.  For GIMPLE_OMP_RETURN corresponding to
	GIMPLE_OMP_TASK add an EDGE_ABNORMAL edge from entry to exit.

	* testsuite/libgomp.c/pr66133.c: New test.

From-SVN: r223171
2015-05-13 18:59:20 +02:00
Michael Haubenwallner 55fba60115 libgomp: Bump to automake 1.11.6
2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>

	* Makefile.in: Regenerated with automake-1.11.6.
	* aclocal.m4: Likewise.
	* config.h.in: Likewise.
	* configure: Likewise.
	* testsuite/Makefile.in: Likewise.

From-SVN: r223143
2015-05-13 11:24:38 +00:00
Jason Merrill 1be0899d94 openacc.h (__GOACC_NOTHROW): Fix noexcept syntax.
* openacc.h (__GOACC_NOTHROW): Fix noexcept syntax.

	* testsuite/libgomp.oacc-c-c++-common/reduction-4.c (main): Use
	_Complex.

From-SVN: r222966
2015-05-09 00:50:35 -04:00
Julian Brown d2463960a4 oacc-init.c (acc_device_lock): Add explanatory comment.
* oacc-init.c (acc_device_lock): Add explanatory comment.
	(resolve_device): Add comment about locking requirement.
	(acc_init_1, acc_shutdown_1): Likewise. Add locking around
	gomp_init_device and gomp_fini_device calls.
	(acc_get_num_devices, acc_set_device_type, acc_get_device_type)
	(acc_get_device_num, acc_set_device_num): Add locking around
	resolve_device and gomp_init_device calls.

From-SVN: r222862
2015-05-06 19:10:14 +00:00
Julian Brown e38fdba42b oacc-init.c (acc_shutdown_1): Call gomp_mutex_unlock for goacc_thread_lock on error paths.
* oacc-init.c (acc_shutdown_1): Call gomp_mutex_unlock for
	goacc_thread_lock on error paths.
	* oacc-mem.c (lookup_host): Remove locking from function. Note
	locking requirement for caller in function comment.
	(lookup_dev): Likewise.
	(acc_free, acc_deviceptr, acc_hostptr, acc_is_present)
	(acc_map_data, acc_unmap_data, present_create_copy, delete_copyout)
	(update_dev_host, gomp_acc_insert_pointer, gomp_acc_remove_pointer):
	Add locking.

From-SVN: r222860
2015-05-06 16:45:49 +00:00
Thomas Schwinge ae8ffbbb8d [PR testsuite/65205, libgomp/65993] Fix dg-shouldfail usage in OpenACC libgomp tests
In dg-output, don't expect "0x" prefix for "%p" format specifier, don't expect
"(nil)" for NULL pointer.

	PR testsuite/65205
	PR libgomp/65993
	libgomp/
	* testsuite/libgomp.oacc-c-c++-common/clauses-2.c: In dg-output,
	don't expect "0x" prefix for "%p" format specifier, don't expect
	"(nil)" for NULL pointer.
	* 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-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-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-30.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-39.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-40.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-47.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-48.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-57.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/data-already-1.c: More
	accurately specify what we're looking for.
	* testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/data-already-8.c: 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-8.f: Likewise.

From-SVN: r222799
2015-05-05 11:39:29 +02:00
James Norris 1309f1d25b [PR testsuite/65205] Fix dg-shouldfail usage in OpenACC libgomp tests
PR testsuite/65205
	libgomp/
	* testsuite/lib/libgomp.exp
	(check_effective_target_openacc_host_selected)
	(check_effective_target_openacc_host_nonshm_selected): New
	procedures.
	* testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Fix misuse of
	dg-shouldfail.
	* testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-11.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-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-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-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-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-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-47.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-48.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-57.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-58.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-67.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise.

From-SVN: r222620
2015-04-30 14:44:39 +02:00
Julian Brown d93bdab53b mkoffload.c (process): Support variable mapping.
gcc/
	* config/nvptx/mkoffload.c (process): Support variable mapping.

	libgomp/
	* libgomp.h (target_mem_desc: Remove mem_map field.
	(acc_dispatch_t): Remove open_device_func, close_device_func,
	get_device_num_func, set_device_num_func, target_data members.
	Change create_thread_data_func argument to device number instead of
	generic pointer.
	* oacc-async.c (assert.h): Include.
	(acc_async_test, acc_async_test_all, acc_wait, acc_wait_async)
	(acc_wait_all, acc_wait_all_async): Use current host thread's
	active device, not base_dev.
	* oacc-cuda.c (acc_get_current_cuda_device)
	(acc_get_current_cuda_context, acc_get_cuda_stream)
	(acc_set_cuda_stream): Likewise.
	* oacc-host.c (host_dispatch): Don't set open_device_func,
	close_device_func, get_device_num_func or set_device_num_func.
	* oacc-init.c (base_dev, init_key): Remove.
	(cached_base_dev): New.
	(name_of_acc_device_t): New.
	(acc_init_1): Initialise default-numbered device, not zeroth.
	(acc_shutdown_1): Close all devices of a given type.
	(goacc_destroy_thread): Don't use base_dev.
	(lazy_open, lazy_init, lazy_init_and_open): Remove.
	(goacc_attach_host_thread_to_device): New.
	(acc_init): Reimplement with goacc_attach_host_thread_to_device.
	(acc_get_num_devices): Don't use base_dev.
	(acc_set_device_type): Reimplement.
	(acc_get_device_type): Don't use base_dev.
	(acc_get_device_num): Tweak logic.
	(acc_set_device_num): Likewise.
	(acc_on_device): Use acc_get_device_type.
	(goacc_runtime_initialize): Initialize cached_base_dev not base_dev.
	(goacc_lazy_initialize): Reimplement with acc_init and
	goacc_attach_host_thread_to_device.
	* oacc-int.h (goacc_thread): Add base_dev field.
	(base_dev): Remove extern declaration.
	(goacc_attach_host_thread_to_device): Add prototype.
	* oacc-mem.c (acc_malloc): Use current thread's device instead of
	base_dev.
	(acc_free): Likewise.
	(acc_memcpy_to_device): Likewise.
	(acc_memcpy_from_device): Likewise.
	* oacc-parallel.c (select_acc_device): Remove. Replace calls with
	goacc_lazy_initialize (throughout).
	(GOACC_parallel): Use tgt_offset to locate target functions.
	* target.c (gomp_map_vars): Don't set tgt->mem_map.
	(gomp_unmap_vars): Use devicep->mem_map pointer not tgt->mem_map.
	(gomp_load_plugin_for_device): Remove open_device, close_device,
	get_device_num, set_device_num openacc hook initialisation. Don't set
	openacc.target_data.
	* plugin/plugin-host.c (GOMP_OFFLOAD_openacc_open_device)
	(GOMP_OFFLOAD_openacc_close_device)
	(GOMP_OFFLOAD_openacc_get_device_num)
	(GOMP_OFFLOAD_openacc_set_device_num): Remove.
	(GOMP_OFFLOAD_openacc_create_thread_data): Change (unused) argument
	to int.
	* plugin/plugin-nvptx.c (ptx_inited): Remove.
	(instantiated_devices, ptx_dev_lock): New.
	(struct ptx_image_data): New.
	(ptx_devices, ptx_images, ptx_image_lock): New.
	(fini_streams_for_device): Reorder cuStreamDestroy call.
	(nvptx_get_num_devices): Remove forward declaration.
	(nvptx_init): Change return type to bool.
	(nvptx_fini): Remove.
	(nvptx_attach_host_thread_to_device): New.
	(nvptx_open_device): Return struct ptx_device* instead of void*.
	(nvptx_close_device): Change argument type to struct ptx_device*,
	return type to void.
	(nvptx_get_num_devices): Use instantiated_devices not ptx_inited.
	(kernel_target_data, kernel_host_table): Remove static globals.
	(GOMP_OFFLOAD_register_image, GOMP_OFFLOAD_get_table): Remove.
	(GOMP_OFFLOAD_init_device): Reimplement.
	(GOMP_OFFLOAD_fini_device): Likewise.
	(GOMP_OFFLOAD_load_image, GOMP_OFFLOAD_unload_image): New.
	(GOMP_OFFLOAD_alloc, GOMP_OFFLOAD_free, GOMP_OFFLOAD_dev2host)
	(GOMP_OFFLOAD_host2dev): Use ORD argument.
	(GOMP_OFFLOAD_openacc_open_device)
	(GOMP_OFFLOAD_openacc_close_device)
	(GOMP_OFFLOAD_openacc_set_device_num)
	(GOMP_OFFLOAD_openacc_get_device_num): Remove.
	(GOMP_OFFLOAD_openacc_create_thread_data): Change argument to int
	(device number).

	libgomp/testsuite/
	* libgomp.oacc-c-c++-common/lib-9.c: Fix devnum check in test.

From-SVN: r221922
2015-04-08 15:58:33 +00:00
Ilya Verbin a51df54e48 libgomp: rework initialization of offloading
gcc/
	* config/i386/intelmic-mkoffload.c (generate_host_descr_file): Call
	GOMP_offload_unregister from the destructor.
libgomp/
	* libgomp-plugin.h (struct mapping_table): Replace with addr_pair.
	* libgomp.h (struct gomp_memory_mapping): Remove.
	(struct target_mem_desc): Change type of mem_map from
	gomp_memory_mapping * to splay_tree_s *.
	(struct gomp_device_descr): Remove register_image_func, get_table_func.
	Add load_image_func, unload_image_func.
	Change type of mem_map from gomp_memory_mapping to splay_tree_s.
	Remove offload_regions_registered.
	(gomp_init_tables): Remove.
	(gomp_free_memmap): Change type of argument from gomp_memory_mapping *
	to splay_tree_s *.
	* libgomp.map (GOMP_4.0.1): Add GOMP_offload_unregister.
	* oacc-host.c (host_dispatch): Do not initialize register_image_func,
	get_table_func, mem_map.is_initialized, mem_map.splay_tree.root,
	offload_regions_registered.
	Initialize load_image_func, unload_image_func, mem_map.root.
	(goacc_host_init): Do not initialize host_dispatch.mem_map.lock.
	* oacc-init.c (lazy_open): Don't call gomp_init_tables.
	(acc_shutdown_1): Use dev's lock and splay_tree instead of mem_map's.
	* oacc-mem.c (lookup_host): Get gomp_device_descr *dev instead of
	gomp_memory_mapping *.  Use dev's lock and splay_tree.
	(lookup_dev): Use dev's lock.
	(acc_deviceptr): Pass dev to lookup_host instead of mem_map.
	(acc_is_present): Likewise.
	(acc_map_data): Likewise.
	(acc_unmap_data): Likewise.  Use dev's lock.
	(present_create_copy): Likewise.
	(delete_copyout): Pass dev to lookup_host instead of mem_map.
	(update_dev_host): Likewise.
	(gomp_acc_remove_pointer): Likewise.  Use dev's lock.
	* oacc-parallel.c (GOACC_parallel): Use dev's lock and splay_tree.
	* plugin/plugin-host.c (GOMP_OFFLOAD_register_image): Remove.
	(GOMP_OFFLOAD_get_table): Remove
	(GOMP_OFFLOAD_load_image): New function.
	(GOMP_OFFLOAD_unload_image): New function.
	* target.c (register_lock): New mutex for offload image registration.
	(num_devices): Do not guard with PLUGIN_SUPPORT.
	(gomp_realloc_unlock): New static function.
	(gomp_map_vars_existing): Add device descriptor argument.  Unlock mutex
	before gomp_fatal.
	(gomp_map_vars): Use dev's lock and splay_tree instead of mem_map's.
	Pass devicep to gomp_map_vars_existing.  Unlock mutex before gomp_fatal.
	(gomp_copy_from_async): Use dev's lock and splay_tree instead of
	mem_map's.
	(gomp_unmap_vars): Likewise.
	(gomp_update): Remove gomp_memory_mapping argument.  Use dev's lock and
	splay_tree instead of mm's.  Unlock mutex before gomp_fatal.
	(gomp_offload_image_to_device): New static function.
	(GOMP_offload_register): Add mutex lock.
	Call gomp_offload_image_to_device for all initialized devices.
	Replace gomp_realloc with gomp_realloc_unlock.
	(GOMP_offload_unregister): New function.
	(gomp_init_tables): Replace with gomp_init_device.  Replace a call to
	get_table_func from the plugin with calls to init_device_func and
	gomp_offload_image_to_device.
	(gomp_free_memmap): Change type of argument from gomp_memory_mapping *
	to splay_tree_s *.
	(GOMP_target): Do not call gomp_init_tables.  Use dev's lock and
	splay_tree instead of mem_map's.  Unlock mutex before gomp_fatal.
	(GOMP_target_data): Do not call gomp_init_tables.
	(GOMP_target_update): Likewise.  Remove argument from gomp_update.
	(gomp_load_plugin_for_device): Replace register_image and get_table
	with load_image and unload_image in DLSYM ().
	(gomp_register_images_for_device): Remove function.
	(gomp_target_init): Do not initialize current_device.mem_map.*,
	current_device.offload_regions_registered.
	Remove call to gomp_register_images_for_device.
	Do not free offload_images and num_offload_images.
liboffloadmic/
	* plugin/libgomp-plugin-intelmic.cpp: Include map.
	(AddrVect, DevAddrVect, ImgDevAddrMap): New typedefs.
	(num_devices, num_images, address_table): New static vars.
	(num_libraries, lib_descrs): Remove static vars.
	(set_mic_lib_path): Rename to ...
	(init): ... this.  Allocate address_table and get num_devices.
	(GOMP_OFFLOAD_get_num_devices): return num_devices.
	(load_lib_and_get_table): Remove static function.
	(offload_image): New static function.
	(GOMP_OFFLOAD_get_table): Remove function.
	(GOMP_OFFLOAD_load_image, GOMP_OFFLOAD_unload_image): New functions.

From-SVN: r221878
2015-04-06 12:40:28 +00:00
Jakub Jelinek 6c384511a3 re PR middle-end/65597 (ICE in build_outer_var_ref, at omp-low.c:1043)
PR fortran/65597
	* trans-openmp.c (gfc_trans_omp_do): For !simple simd with explicit
	linear clause for the iterator set OMP_CLAUSE_LINEAR_NO_COPYIN.
	For implcitly added !simple OMP_CLAUSE_LINEAR set it too.  Use step 1
	instead of the original step on the new iterator - count.

	* testsuite/libgomp.fortran/pr65597.f90: New test.

From-SVN: r221776
2015-03-30 19:54:05 +02:00
Tom de Vries 3e8165a5df Add verification to libgomp.graphite/force-parallel-6.c
2015-03-27  Tom de Vries  <tom@codesourcery.com>

	PR testsuite/65594
	* testsuite/libgomp.graphite/force-parallel-6.c (abort): Declare.
	(init, check): New function.
	(foo): Change return type to void.
	(main): Call init and check.

From-SVN: r221728
2015-03-27 12:10:16 +00:00
Tom de Vries 4d688c9a17 Scale down libgomp.graphite/force-parallel-6.c
2015-03-27  Tom de Vries  <tom@codesourcery.com>

	PR testsuite/65594
	* testsuite/libgomp.graphite/force-parallel-6.c (M): Define.
	(foo): Use M for non-inner loops to scale down test-case.

From-SVN: r221727
2015-03-27 12:10:07 +00:00
Kai Tietz 01c0b3b076 re PR libgomp/64972 (Build failure in libgomp for i686-w64-mingw32 target after latest merge from gomp-4_0-branch)
PR libgomp/64972
	* oacc-parallel.c (GOACC_parallel): Use PRIu64 if available.
	(GOACC_data_start): Likewise.
	* target.c (gomp_map_vars): Likewise.

From-SVN: r221665
2015-03-25 16:05:02 +01:00
John David Anglin 844d9a76bc reduction-4.c: Don't run on hppa*-*-hpux*.
* testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Don't run on
	hppa*-*-hpux*.

From-SVN: r221557
2015-03-21 16:19:43 +00:00
Jakub Jelinek 9b65e171ed c-decl.c (c_decl_attributes): Also add "omp declare target" attribute for DECL_EXTERNAL VAR_DECLs.
* c-decl.c (c_decl_attributes): Also add "omp declare target"
	attribute for DECL_EXTERNAL VAR_DECLs.

	* decl2.c (cplus_decl_attributes): Also add "omp declare target"
	attribute for DECL_EXTERNAL VAR_DECLs.

	* testsuite/libgomp.c/target-10.c: New test.
	* testsuite/libgomp.c++/target-4.C: New test.

From-SVN: r221520
2015-03-19 20:12:43 +01:00
Ilya Verbin db397e2e5a varpool.c (varpool_node::get_create): Don't set 'offloadable' flag for the external decls.
gcc/
	* varpool.c (varpool_node::get_create): Don't set 'offloadable' flag for
	the external decls.
libgomp/
	* testsuite/libgomp.fortran/declare-target-1.f90: New test.
	* testsuite/libgomp.fortran/declare-target-2.f90: New file.

From-SVN: r221421
2015-03-13 13:30:26 +00:00
Sebastian Huber cd93945d03 libgomp: Add RTEMS support
libgomp/ChangeLog

	* configure.tgt (*-*-rtems*): Use local-exec TLS model.
	* configure.ac (*-*-rtems*): Assume Pthread is supported.
	(pthread.h): Check for this header file.
	* configure: Regenerate.

From-SVN: r221415
2015-03-13 10:57:07 +00:00
Tom de Vries 05deba9fe0 Use DO_PRAGMA in libgomp.oacc-c-c++-common/reduction-1.c
2015-02-25  Tom de Vries  <tom@codesourcery.com>

	* testsuite/libgomp.oacc-c-c++-common/reduction-1.c (DO_PRAGMA)
	(check_reduction_op, check_reduction_macro, max, min):
	Declare.
	(test_reductions_int, test_reductions_minmax, test_reductions_bool): New
	function.
	(main): Use new functions.

From-SVN: r220971
2015-02-25 15:38:38 +00:00
Ilya Tocar 196904d813 target.c (gomp_load_plugin_for_device): Use const char * instead of char * for variables holding dlerror return values.
libgomp/

* target.c (gomp_load_plugin_for_device): Use const char * instead of
char * for variables holding dlerror return values.
(DLSYM_OPT): Ditto.

From-SVN: r220789
2015-02-18 16:33:43 +03:00
Thomas Schwinge a2818955d7 libgomp: Make GOMP_PLUGIN_debug actually work...
libgomp/
	* libgomp-plugin.c (GOMP_PLUGIN_debug): Fix typo.

From-SVN: r220770
2015-02-17 19:24:07 +01:00
Thomas Schwinge 26f9331258 libgomp: Make nvptx helper routines self-contained.
libgomp/
	* oacc-ptx.h (GOACC_INTERNAL_PTX): Add GOACC_tid, GOACC_ntid,
	GOACC_ctaid, and GOACC_nctaid routines.

Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>

From-SVN: r220768
2015-02-17 19:05:24 +01:00
Jakub Jelinek fa01ffccc7 re PR middle-end/64824 (ICE in gimple verification)
PR c/64824
	* c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
	check in the POP macro.

	* testsuite/libgomp.c/atomic-18.c: New test.
	* testsuite/libgomp.c++/atomic-16.C: New test.

From-SVN: r220617
2015-02-11 14:40:31 +01:00
Jakub Jelinek 4886ec8e70 re PR middle-end/64824 (ICE in gimple verification)
PR c/64824
	PR c/64868
gcc/c/
	* c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
gcc/cp/
	* parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
gcc/c-family/
	* c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
	instead of RDIV_EXPR.  Use build_binary_op instead of
	build2_loc.
libgomp/
	* testsuite/libgomp.c/pr64824.c: New test.
	* testsuite/libgomp.c/pr64868.c: New test.
	* testsuite/libgomp.c++/pr64824.C: New test.
	* testsuite/libgomp.c++/pr64868.C: New test.

From-SVN: r220420
2015-02-04 23:32:36 +01:00
David Edelsohn 02d3e45e7a re PR libgomp/64635 (darwin produces libgomp-plugin-host_nonshm.1.dylib but tries to load libgomp-plugin-host_nonshm.so.1)
PR libgomp/64635
        * configure.tgt (*-*-aix*): Use standard posix plugin-suffix.h.
        Link with -lpthread.
        * config/aix/plugin-suffix.h: Delete.

From-SVN: r220341
2015-02-01 22:31:31 -05:00
Jack Howarth 2dde0c3197 re PR libgomp/64635 (darwin produces libgomp-plugin-host_nonshm.1.dylib but tries to load libgomp-plugin-host_nonshm.so.1)
2015-01-28  Jack Howarth  <howarth.at.gcc@gmail.com>

	PR libgomp/64635
	* configure.tgt (*-*-aix*): Use config_path "aix posix".
	(*-*-darwin*): Use config_path "bsd darwin posix".
	(*-*-hpux*): Use config_path "hpux posix".
	* target.c: Add include of plugin-suffix.h and use
	SONAME_SUFFIX macro.
	* config/aix/plugin-suffix.h: New file.
	* config/darwin/plugin-suffix.h: New file.
	* config/hpux/plugin-suffix.h: New file.
	* config/posix/plugin-suffix.h: New file.

From-SVN: r220220
2015-01-28 21:25:19 +00:00
Jack Howarth b5f7a6ca5c re PR libgomp/64635 (darwin produces libgomp-plugin-host_nonshm.1.dylib but tries to load libgomp-plugin-host_nonshm.so.1)
2015-01-28  Jack Howarth  <howarth.at.gcc@gmail.com>

	PR libgomp/64635
	* configure.tgt (*-*-aix*): Use config_path "aix posix".
	(*-*-darwin*): Use config_path "bsd darwin posix".
	(*-*-hpux*): Use config_path "hpux posix".
	* target.c: Add include of plugin-suffix.h and use
	SONAME_SUFFIX macro.
	* config/aix/plugin-suffix.h: New file.
	* config/darwin/plugin-suffix.h: New file.
	* config/hpux/plugin-suffix.h: New file.
	* config/posix/plugin-suffix.h: New file.

From-SVN: r220218
2015-01-28 21:23:14 +00:00
Jakub Jelinek b891044723 re PR middle-end/64734 (ICE at omp lowering)
PR middle-end/64734
	* omp-low.c (scan_sharing_clauses): Don't ignore
	OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION GOMP_MAP_POINTER clauses
	on target data/update constructs.

	* libgomp.c/pr64734.c: New test.

From-SVN: r220053
2015-01-23 19:19:50 +01:00
Tom de Vries a0c88d0629 Make fopenacc an LTO option
2015-01-23  Tom de Vries  <tom@codesourcery.com>

	PR libgomp/64672
	* lto-opts.c (lto_write_options): Output non-explicit conservative
	-fno-openacc.
	* lto-wrapper.c (merge_and_complain): Handle merging -fopenacc.
	(append_compiler_options): Pass -fopenacc through.

	* c.opt (fopenacc): Mark as LTO option.

	* lang.opt (fopenacc): Mark as LTO option.

	* testsuite/libgomp.oacc-c-c++-common/abort-5.c: New test.

From-SVN: r220038
2015-01-23 12:54:16 +00:00
Tom de Vries 1506ae0e1e Make fopenmp an LTO option
2015-01-23  Tom de Vries  <tom@codesourcery.com>

	PR libgomp/64707
	* lto-opts.c (lto_write_options): Output non-explicit conservative
	-fno-openmp.
	* lto-wrapper.c (merge_and_complain): Handle merging -fopenmp.
	(append_compiler_options): Pass -fopenmp through.

	* c.opt (fopenmp): Mark as LTO option.

	* lang.opt (fopenmp): Mark as LTO option.

	* testsuite/libgomp.c/target-9.c: Add -ftree-parallelize-loops=0 to
	dg-options.

From-SVN: r220037
2015-01-23 12:53:55 +00:00
Thomas Schwinge bed62c21fa [PR libgomp/64625] Remove __OFFLOAD_TABLE__ variable/formal parameter.
gcc/
	* omp-low.c (offload_symbol_decl): Remove variable.
	(get_offload_symbol_decl): Remove function.
	(expand_omp_target): For BUILT_IN_GOMP_TARGET,
	BUILT_IN_GOMP_TARGET_DATA, BUILT_IN_GOMP_TARGET_UPDATE pass NULL
	instead of &__OFFLOAD_TABLE__, for BUILT_IN_GOACC_DATA_START,
	BUILT_IN_GOACC_ENTER_EXIT_DATA, BUILT_IN_GOACC_PARALLEL,
	BUILT_IN_GOACC_UPDATE don't pass it at all.
	libgomp/
	* libgomp_g.h (GOACC_data_start, GOACC_enter_exit_data)
	(GOACC_parallel, GOACC_update): Remove const_void *offload_table
	formal parameter.  Update all users.
	* target.c (GOMP_target, GOMP_target_data, GOMP_target_update):
	Document unused formal parameter.

From-SVN: r219837
2015-01-19 13:05:43 +01:00
Thomas Schwinge 128b26dceb [PR libgomp/64625] Remove __OFFLOAD_TABLE__ variable/formal parameter.
gcc/
	* omp-low.c (offload_symbol_decl): Remove variable.
	(get_offload_symbol_decl): Remove function.
	(expand_omp_target): For BUILT_IN_GOMP_TARGET,
	BUILT_IN_GOMP_TARGET_DATA, BUILT_IN_GOMP_TARGET_UPDATE pass NULL
	instead of &__OFFLOAD_TABLE__, for BUILT_IN_GOACC_DATA_START,
	BUILT_IN_GOACC_ENTER_EXIT_DATA, BUILT_IN_GOACC_PARALLEL,
	BUILT_IN_GOACC_UPDATE don't pass it at all.
	libgomp/
	* libgomp_g.h (GOACC_data_start, GOACC_enter_exit_data)
	(GOACC_parallel, GOACC_update): Remove const_void *offload_table
	formal parameter.  Update all users.
	* target.c (GOMP_target, GOMP_target_data, GOMP_target_update):
	Document unused formal parameter.

From-SVN: r219836
2015-01-19 13:03:35 +01:00
Thomas Schwinge 6e36114cdf libgomp: Don't use <alloca.h>.
libgomp/
	* oacc-parallel.c: Don't include <alloca.h>.
	(GOACC_parallel): Use gomp_alloca instead of alloca.

From-SVN: r219771
2015-01-16 21:05:21 +01:00
Gerald Pfeifer 973e980879 * target.c (num_devices): Guard with PLUGIN_SUPPORT.
From-SVN: r219742
2015-01-16 14:27:55 +00:00
Thomas Schwinge 41dbbb3789 Merge current set of OpenACC changes from gomp-4_0-branch.
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
2015-01-15 21:11:12 +01:00
Thomas Schwinge f1f3453e11 libgomp: Now known as the GNU Offloading and Multi Processing Runtime Library.
libgomp/
	* configure.ac: Rename libgomp from "GNU OpenMP Runtime Library"
	to "GNU Offloading and Multi Processing Runtime Library".  Change
	all users.
	* configure: Regenerate.
	* libgomp.texi: Update.
	gcc/
	* doc/install.texi: Update for libgomp being renamed from "GNU
	OpenMP Runtime Library" to "GNU Offloading and Multi Processing
	Runtime Library".
	* doc/sourcebuild.texi: Likewise.
	gcc/fortran/
	* gfortran.texi: Update for libgomp being renamed from "GNU OpenMP
	Runtime Library" to "GNU Offloading and Multi Processing Runtime
	Library".
	* intrinsic.texi: Likewise.
	libstdc++-v3/
	* doc/xml/manual/parallel_mode.xml: Update for libgomp being
	renamed from "GNU OpenMP Runtime Library" to "GNU Offloading and
	Multi Processing Runtime Library".

Co-Authored-By: David Malcolm <dmalcolm@redhat.com>
Co-Authored-By: Julian Brown <julian@codesourcery.com>

From-SVN: r219425
2015-01-10 20:10:37 +01:00
Thomas Schwinge b335ef4e99 libgomp: Fix 32-bit x86 Intel MIC offloading testing.
[...]
    spawn [...]/build-gcc/gcc/xgcc -B[...]/build-gcc/gcc/ [...]/source-gcc/libgomp/testsuite/libgomp.c/examples-4/e.50.1.c -B[...]/build-gcc/x86_64-unknown-linux-gnu/32/libgomp/ -B[...]/build-gcc/x86_64-unknown-linux-gnu/32/libgomp/.libs -I[...]/build-gcc/x86_64-unknown-linux-gnu/32/libgomp -I[...]/source-gcc/libgomp/testsuite/.. -march=i486 -fmessage-length=0 -fno-diagnostics-show-caret -fdiagnostics-color=never -B[...]/install/offload-x86_64-intelmicemul-linux-gnu/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0 -B[...]/install/offload-x86_64-intelmicemul-linux-gnu/bin -fopenmp -O2 -L[...]/build-gcc/x86_64-unknown-linux-gnu/32/libgomp/.libs -lm -m32 -o ./e.50.1.exe
    PASS: libgomp.c/examples-4/e.50.1.c (test for excess errors)
    Setting LD_LIBRARY_PATH to .:[...]/build-gcc/x86_64-unknown-linux-gnu/32/libgomp/.libs:[...]/build-gcc/x86_64-unknown-linux-gnu/32/libgomp/../liboffloadmic/.libs:[...]/build-gcc/x86_64-unknown-linux-gnu/32/libgomp/../liboffloadmic/plugin/.libs:[...]/build-gcc/x86_64-unknown-linux-gnu/32/libgomp/../libstdc++-v3/src/.libs:[...]/install/offload-x86_64-intelmicemul-linux-gnu/lib64:[...]/install/offload-x86_64-intelmicemul-linux-gnu/lib:[...]/build-gcc/gcc:[...]/build-gcc/gcc/32:.:[...]/build-gcc/x86_64-unknown-linux-gnu/32/libgomp/.libs:[...]/build-gcc/x86_64-unknown-linux-gnu/32/libgomp/../liboffloadmic/.libs:[...]/build-gcc/x86_64-unknown-linux-gnu/32/libgomp/../liboffloadmic/plugin/.libs:[...]/build-gcc/x86_64-unknown-linux-gnu/32/libgomp/../libstdc++-v3/src/.libs:[...]/install/offload-x86_64-intelmicemul-linux-gnu/lib64:[...]/install/offload-x86_64-intelmicemul-linux-gnu/lib:[...]/build-gcc/gcc:[...]/build-gcc/gcc/32:[...]/build-gcc/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs:[...]/build-gcc/x86_64-unknown-linux-gnu/libsanitizer/.libs:[...]/build-gcc/x86_64-unknown-linux-gnu/libvtv/.libs:[...]/build-gcc/x86_64-unknown-linux-gnu/libcilkrts/.libs:[...]/build-gcc/x86_64-unknown-linux-gnu/liboffloadmic/.libs:[...]/build-gcc/x86_64-unknown-linux-gnu/libssp/.libs:[...]/build-gcc/x86_64-unknown-linux-gnu/libgomp/.libs:[...]/build-gcc/x86_64-unknown-linux-gnu/libitm/.libs:[...]/build-gcc/x86_64-unknown-linux-gnu/libatomic/.libs:[...]/build-gcc/./gcc:[...]/build-gcc/./prev-gcc
    spawn [open ...]
    /tmp/offload_WCXKRZ/offload_target_main: error while loading shared libraries: liboffloadmic_target.so.5: wrong ELF class: ELFCLASS64
    WARNING: program timed out.
    FAIL: libgomp.c/examples-4/e.50.1.c execution test
    [...]

    $ find -name liboffloadmic_target.so.5
    ./install/offload-x86_64-intelmicemul-linux-gnu/lib64/liboffloadmic_target.so.5
    ./install/offload-x86_64-intelmicemul-linux-gnu/lib32/liboffloadmic_target.so.5
    ./build-gcc-offload-x86_64-intelmicemul-linux-gnu/x86_64-intelmicemul-linux-gnu/32/liboffloadmic/.libs/liboffloadmic_target.so.5
    ./build-gcc-offload-x86_64-intelmicemul-linux-gnu/x86_64-intelmicemul-linux-gnu/liboffloadmic/.libs/liboffloadmic_target.so.5

This is a "standard" GCC configuration: x86_64-intelmicemul-linux-gnu with
(default) multilibs enabled.

	libgomp/
	* configure.ac [tgt_dir] (offload_additional_lib_paths): Also add
	"$tgt_dir/lib32".
	* configure: Regenerate.

From-SVN: r219349
2015-01-08 17:01:37 +01:00
Thomas Schwinge f9a0eca40d libgomp: Fix "intelmic" offloading in build-tree testing.
libgomp/
	* testsuite/lib/libgomp.exp (libgomp_init): Correctly match
	"intelmic" in $offload_targets.

From-SVN: r219348
2015-01-08 17:01:24 +01:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Jakub Jelinek b67cd4e331 gcc.c (process_command): Update copyright notice dates.
gcc/
	* gcc.c (process_command): Update copyright notice dates.
	* gcov-dump.c: Ditto.
	* gcov.c: Ditto.
	* doc/cpp.texi: Bump @copying's copyright year.
	* doc/cppinternals.texi: Ditto.
	* doc/gcc.texi: Ditto.
	* doc/gccint.texi: Ditto.
	* doc/gcov.texi: Ditto.
	* doc/install.texi: Ditto.
	* doc/invoke.texi: Ditto.
gcc/fortran/
	* gfortranspec.c (lang_specific_driver): Update copyright notice
	dates.
	* gfc-internals.texi: Bump @copying's copyright year.
	* gfortran.texi: Ditto.
	* intrinsic.texi: Ditto.
	* invoke.texi: Ditto.
gcc/go/
	* gccgo.texi: Bump @copyrights-go year.
gcc/java/
	* jcf-dump.c (version): Update copyright notice dates.
libgomp/
	* libgomp.texi: Bump @copying's copyright year.
libquadmath/
	* libquadmath.texi: Bump @copying's copyright year.
libitm/
	* libitm.texi: Bump @copying's copyright year.
gcc/ada/
	* gnat_ugn.texi: Bump @copying's copyright year.
libjava/
	* classpath/gnu/java/rmi/registry/RegistryImpl.java (version): Update
	copyright notice dates.
	* classpath/tools/gnu/classpath/tools/orbd/Main.java (run): Ditto.
	* gnu/gcj/convert/Convert.java (version): Update copyright notice
	dates.
	* gnu/gcj/tools/gcj_dbtool/Main.java (main): Ditto.

From-SVN: r219187
2015-01-05 13:05:46 +01:00
Kyrylo Tkachov 3b41b58357 [libgomp][testsuite] Explicitly include target-utils.exp (fix libgomp testsuite ERROR)
* testsuite/lib/libgomp.exp: Load target-utils.exp.
	Move load of target-supportes.exp earlier.

From-SVN: r218662
2014-12-12 10:31:44 +00:00
Ilya Verbin 2354caecd9 Force output of vars with "omp declare target" attribute in gcc/varpool.c
gcc/
	* varpool.c (varpool_node::get_create): Force output of vars with
	"omp declare target" attribute.
libgomp/
	* testsuite/libgomp.c/target-9.c: New test.

From-SVN: r218607
2014-12-10 20:52:10 +00:00
Varvara Rainchik f50eecba13 config.h.in: Regenerate.
libgomp/
        * config.h.in: Regenerate.
        * configure: Regenerate.
        * configure.ac: Add GCC_CHECK_EMUTLS.
        * libgomp.h: Add check for USE_EMUTLS: this case
        is equal to HAVE_TLS.
        * team.c: Likewise.

From-SVN: r218576
2014-12-10 13:42:20 +00:00
Uros Bizjak 68bc92704f configure.tgt (x86_64): Tune -m32 multilib to generic.
libitm/ChangeLog:

	* configure.tgt (x86_64): Tune -m32 multilib to generic.

libgomp/ChangeLog:

	* configure.tgt (x86_64-*-linux*): Tune -m32 multilib to generic.

From-SVN: r218315
2014-12-03 14:58:07 +01:00
Andrey Turetskiy 476ff78736 omp-low.c (lower_omp_critical): Mark critical sections inside target functions as offloadable.
gcc/
	* omp-low.c (lower_omp_critical): Mark critical sections
	inside target functions as offloadable.
libgomp/
	* testsuite/libgomp.c/target-critical-1.c: New test.

Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>

From-SVN: r218158
2014-11-28 13:59:49 +00:00
Jakub Jelinek 31a30e6234 e.53.4.c: Add -DITESTITERS=20 to dg-options unless expensive testing is on.
* testsuite/libgomp.c/examples-4/e.53.4.c: Add -DITESTITERS=20
	to dg-options unless expensive testing is on.  
	(TESTITERS): Define to N if not defined.
	(main): Use TESTITERS instead of N.
	* testsuite/libgomp.c/examples-4/e.55.1.c: Define CHUNKSZ from
	dg-additional-options depending on whether expensive testing is on.
	* testsuite/libgomp.fortran/examples-4/e.55.1.f90 (e_55_1_mod):
	Decrease N to 100000 and CHUNKSZ to 10000.

From-SVN: r218095
2014-11-26 20:36:36 +01:00
Jakub Jelinek 3f9e8f13a3 re PR fortran/63938 (OpenMP atomic update does not protect access to automatic array)
PR fortran/63938
	* trans-openmp.c (gfc_trans_omp_atomic): Make sure lhsaddr is
	simple enough for goa_lhs_expr_p.

	* libgomp.fortran/pr63938-1.f90: New test.
	* libgomp.fortran/pr63938-2.f90: New test.

From-SVN: r218031
2014-11-25 00:08:26 +01:00
Steve Ellcey c8451a46ea futex.h (SYS_futex): Define if not already done.
2014-11-21  Steve Ellcey  <sellcey@imgtec.com>

	* config/linux/mips/futex.h (SYS_futex): Define if not already done.

From-SVN: r217952
2014-11-21 23:25:51 +00:00
H.J. Lu a699d67255 Always use PIC option with -shared in libtool
Libtool needs to pass PIC option -shared when creating shared object to
link regular object files with slim-lto archive.

	PR bootstrap/63784
	* libtool.m4: Add $pic_flag with -shared.

boehm-gc/

	PR bootstrap/63784
	* configure: Regenerated.

gcc/

	PR bootstrap/63784
	* configure: Regenerated.

libatomic/

	PR bootstrap/63784
	* configure: Regenerated.

libbacktrace/

	PR bootstrap/63784
	* configure: Regenerated.

libcc1/

	PR bootstrap/63784
	* configure: Regenerated.

libcilkrts/

	PR bootstrap/63784
	* configure: Regenerated.

libffi/

	PR bootstrap/63784
	* configure: Regenerated.

libgfortran/

	PR bootstrap/63784
	* configure: Regenerated.

libgomp/

	PR bootstrap/63784
	* configure: Regenerated.

libitm/

	PR bootstrap/63784
	* configure: Regenerated.

libjava/

	PR bootstrap/63784
	* configure: Regenerated.

libjava/classpath/

	PR bootstrap/63784
	* configure: Regenerated.

libobjc/

	PR bootstrap/63784
	* configure: Regenerated.

libquadmath/

	PR bootstrap/63784
	* configure: Regenerated.

libsanitizer/

	PR bootstrap/63784
	* configure: Regenerated.

libssp/

	PR bootstrap/63784
	* configure: Regenerated.

libstdc++-v3/

	PR bootstrap/63784
	* configure: Regenerated.

libvtv/

	PR bootstrap/63784
	* configure: Regenerated.

lto-plugin/

	PR bootstrap/63784
	* configure: Regenerated.

From-SVN: r217937
2014-11-21 08:49:17 -08:00
Uros Bizjak 4a19f719d6 e.53.5.c: Require vect_simd_clones effective target.
* testsuite/libgomp.c/examples-4/e.53.5.c: Require
	vect_simd_clones effective target.
	* testsuite/libgomp.fortran/examples-4/e.53.5.f90: Ditto.

From-SVN: r217760
2014-11-19 11:30:29 +01:00
Jakub Jelinek b1bf6c522f e.54.2.c (main): Use N / 8 instead of 32 as block_size.
* libgomp.c/examples-4/e.54.2.c (main): Use N / 8 instead
	of 32 as block_size.
	* libgomp.fortran/examples-4/e.54.2.f90 (e_54_1): Use n / 8
	instead of 32 as block_size.

From-SVN: r217579
2014-11-14 18:19:55 +01:00
Andrey Turetskiy d64ae6140f [PATCH 4/4] OpenMP 4.0 offloading to Intel MIC: non-fallback testing.
libgomp/
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Set up offload_additional_options,
	offload_additional_lib_paths and offload_targets.
	* testsuite/Makefile.am: Export environment variables: OFFLOAD_TARGETS,
	OFFLOAD_ADDITIONAL_OPTIONS, OFFLOAD_ADDITIONAL_LIB_PATHS.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/lib/libgomp.exp (libgomp_init): Append
	offload_additional_lib_paths to LD_LIBRARY_PATH.  Append
	offload_additional_options to ALWAYS_CFLAGS.  Append liboffloadmic
	build directory to LD_LIBRARY_PATH for intelmic offload targets.

Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>

From-SVN: r217500
2014-11-13 14:07:09 +00:00
Andrey Turetskiy 122d7303a0 [PATCH 7/7] OpenMP 4.0 offloading infrastructure: testsuite.
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
2014-11-13 13:56:22 +00:00
Jakub Jelinek 1df3f84256 [PATCH 5/7] OpenMP 4.0 offloading infrastructure: libgomp.
libgomp/
	* libgomp.map (GOMP_4.0.1): New symbol version.
	Add GOMP_offload_register.
	* libgomp_target.h: New file.
	* splay-tree.h: New file.
	* target.c: Include config.h, libgomp_target.h, dlfcn.h, splay-tree.h.
	(gomp_target_init): New forward declaration.
	(gomp_is_initialized): New static variable.
	(splay_tree_node, splay_tree, splay_tree_key): New typedefs.
	(struct target_mem_desc, struct splay_tree_key_s, offload_image_descr):
	New structures.
	(offload_images, num_offload_images, devices, num_devices): New static
	variables.
	(splay_compare): New static function.
	(struct gomp_device_descr): New structure.
	(gomp_get_num_devices): Call gomp_target_init.
	(resolve_device, gomp_map_vars_existing, gomp_map_vars, gomp_unmap_tgt)
	(gomp_unmap_vars, gomp_update, gomp_init_device): New static functions.
	(GOMP_offload_register): New function.
	(GOMP_target): Arrange for host callback to be performed in a separate
	initial thread and contention group, inheriting ICVs from
	gomp_global_icv etc.  Call gomp_map_vars and gomp_unmap_vars.
	Add device initialization and lookup for target function in splay tree.
	(GOMP_target_data): Add device initialization and call gomp_map_vars.
	(GOMP_target_end_data): Call gomp_unmap_vars.
	(GOMP_target_update): Add device initialization and call gomp_update.
	(gomp_load_plugin_for_device, gomp_register_images_for_device)
	(gomp_target_init): New static functions.

Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>

From-SVN: r217492
2014-11-13 13:49:47 +00:00
Bernd Schmidt 85c64bbee9 [PATCH 1/7] OpenMP 4.0 offloading infrastructure: configure and make
* configure: Regenerate.
	* configure.ac (--enable-as-accelerator-for)
	(--enable-offload-targets): New configure options.
gcc/
	* Makefile.in (real_target_noncanonical, accel_dir_suffix)
	(enable_as_accelerator): New variables substituted by configure.
	(libsubdir, libexecsubdir, unlibsubdir): Tweak for the possibility of
	being configured as an offload compiler.
	(DRIVER_DEFINES): Pass new defines DEFAULT_REAL_TARGET_MACHINE and
	ACCEL_DIR_SUFFIX.
	(install-cpp, install-common, install_driver, install-gcc-ar): Do not
	install for the offload compiler.
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (real_target_noncanonical, accel_dir_suffix)
	(enable_as_accelerator): Compute new variables.
	(ACCEL_COMPILER): Define if the compiler is built as the accel compiler.
	(OFFLOAD_TARGETS): List of target names suitable for offloading.
	(ENABLE_OFFLOADING): Define if list of offload targets is not empty.
gcc/cp/
	* Make-lang.in (c++.install-common): Do not install for the offload
	compiler.
gcc/doc/
	* install.texi (Options specification): Document
	--enable-as-accelerator-for and --enable-offload-targets.
gcc/fortran/
	* Make-lang.in (fortran.install-common): Do not install for the offload
	compiler.
libgcc/
	* Makefile.in (crtoffloadbegin$(objext)): New rule.
	(crtoffloadend$(objext)): Likewise.
	* configure: Regenerate.
	* configure.ac (accel_dir_suffix): Compute new variable.
	(extra_parts): Add crtoffloadbegin.o and crtoffloadend.o
	if enable_offload_targets is not empty.
	* offloadstuff.c: New file.
libgomp/
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Check for libdl, required for plugin support.
	(PLUGIN_SUPPORT): Define if plugins are supported.
	(enable_offload_targets): Support Intel MIC targets.
	(OFFLOAD_TARGETS): List of target names suitable for offloading.
lto-plugin/
	* Makefile.am (libexecsubdir): Tweak for the possibility of being
	configured for offload compiler.
	(accel_dir_suffix, real_target_noncanonical): New variables substituted
	by configure.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (accel_dir_suffix, real_target_noncanonical): Compute new
	variables.


Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>

From-SVN: r217485
2014-11-13 13:28:56 +00:00
Francois-Xavier Coudert ebf6d33b73 re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14))
toplevel:
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* libtool.m4: Fix globbing of darwin versions.

boehm-gc/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

gcc/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libatomic/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libbacktrace/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libcc1/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libcilkrts/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libffi/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libgfortran/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libgomp/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libitm/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libobjc/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libquadmath/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libsanitizer/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libssp/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libstdc++-v3/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libvtv/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

lto-plugin/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libjava/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libjava/classpath/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

zlib/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

From-SVN: r217366
2014-11-11 20:25:18 +00:00
Rainer Orth 8c7686294e Fix gnu11 fallout on Solaris 10+
libobjc:
	* thr.c (_XOPEN_SOURCE): Define as 600.

	libiberty:
	* sigsetmask.c (_POSIX_SOURCE): Remove.

	libgomp:
	* config/posix/lock.c (_XOPEN_SOURCE) Define as 600.

From-SVN: r217117
2014-11-05 09:52:42 +00:00
Marek Polacek c1d62412c3 affinity-1.c: Include <sys/wait.h>.
* testsuite/libgomp.c/affinity-1.c: Include <sys/wait.h>.
	* testsuite/libgomp.c/nqueens-1.c: Include <stdlib.h>.
	* testsuite/libgomp.c/thread-limit-1.c: Include <omp.h>
	* testsuite/libgomp.c/thread-limit-2.c: Likewise.

From-SVN: r215927
2014-10-06 11:54:24 +00:00
Marek Polacek 44a0c6cbeb affinity-1.c: Fix implicit declarations.
* testsuite/libgomp.c/affinity-1.c: Fix implicit declarations.
	* testsuite/libgomp.c/nqueens-1.c: Likewise.
	* testsuite/libgomp.c/pr26943-3.c: Likewise.
	* testsuite/libgomp.c/pr26943-4.c: Likewise.
	* testsuite/libgomp.c/pr36802-2.c: Likewise.
	* testsuite/libgomp.c/pr36802-3.c: Likewise.
	* testsuite/libgomp.c/thread-limit-1.c: Likewise.
	* testsuite/libgomp.c/thread-limit-2.c: Likewise.
	* testsuite/libgomp.c/appendix-a/a.15.1.c: Include <omp.h>.
	* testsuite/libgomp.c/omp-loop02.c: Fix defaulting to int.
	* testsuite/libgomp.c/omp-parallel-for.c: Likewise.
	* testsuite/libgomp.c/omp-parallel-if.c: Likewise.
	* testsuite/libgomp.c/omp-single-1.c: Likewise.
	* testsuite/libgomp.c/omp-single-2.c: Likewise.
	* testsuite/libgomp.c/omp_matvec.c: Likewise.
	* testsuite/libgomp.c/omp_workshare3.c: Likewise.
	* testsuite/libgomp.c/omp_workshare4.c: Likewise.
	* testsuite/libgomp.c/shared-1.c: Fix defaulting to int.  Fix implicit
	declarations.

From-SVN: r215922
2014-10-06 10:20:45 +00:00
Jakub Jelinek 5771c3915b re PR libgomp/61200 (internal compiler error: Segmentation fault, assert & openmp)
PR libgomp/61200
	* omp-low.c (taskreg_contexts): New variable.
	(scan_omp_parallel): Push newly created context into taskreg_contexts
	vector and move record layout code to finish_taskreg_scan.
	(scan_omp_task): Likewise.
	(finish_taskreg_scan): New function.
	(execute_lower_omp): Call finish_taskreg_scan on all taskreg_contexts
	vector elements and release it.

	* c-c++-common/gomp/pr61200.c: New test.

	* testsuite/libgomp.c/pr61200.c: New test.

From-SVN: r215835
2014-10-03 09:29:42 +02:00
Jakub Jelinek bce16b887f re PR c++/63248 (Crash when OpenMP target's array section handling is used with templates)
PR c++/63248
	* semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
	on type of type dependent expressions, and don't call it if
	handle_omp_array_sections has kept TREE_LIST because something
	was type dependent.
	* pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
	Use keep_next_level, begin_omp_structured_block and
	finish_omp_structured_block instead of push_stmt_list and
	pop_stmt_list.
libgomp/
	* testsuite/libgomp.c++/pr63248.C: New test.

From-SVN: r215359
2014-09-18 18:43:28 +02:00
Jakub Jelinek 3696163cb4 task.c (GOMP_taskgroup_end): If taskgroup->num_children is not zero...
* task.c (GOMP_taskgroup_end): If taskgroup->num_children
	is not zero, but taskgroup->children is NULL and there are
	any task->children, schedule those instead of waiting.
	* testsuite/libgomp.c/depend-6.c: New test.
	* testsuite/libgomp.c/depend-7.c: New test.
	* testsuite/libgomp.c/depend-8.c: New test.
	* testsuite/libgomp.c/depend-9.c: New test.
	* testsuite/libgomp.c/depend-10.c: New test.

From-SVN: r213592
2014-08-04 17:45:50 +02:00
Jakub Jelinek 0494285ab0 libgomp.h (struct gomp_task_depend_entry): Add redundant_out field.
* libgomp.h (struct gomp_task_depend_entry): Add redundant_out field.
	(struct gomp_taskwait): New type.
	(struct gomp_task): Add taskwait and parent_depends_on, remove
	in_taskwait and taskwait_sem fields.
	(gomp_finish_task): Don't destroy taskwait_sem.
	* task.c (gomp_init_task): Don't init in_taskwait, instead init
	taskwait and parent_depends_on.
	(GOMP_task): For if (0) tasks with depend clause that depend on
	earlier tasks don't defer them, instead call
	gomp_task_maybe_wait_for_dependencies to wait for the dependencies.
	Initialize redundant_out field, for redundant out entries just
	move them at the end of linked list instead of removing them
	completely, and set redundant_out flag instead of redundant.
	(gomp_task_run_pre): Update last_parent_depends_on if scheduling
	that task.
	(gomp_task_run_post_handle_dependers): If parent is in
	gomp_task_maybe_wait_for_dependencies and newly runnable task
	is not parent_depends_on, queue it in parent->children linked
	list after all runnable tasks with parent_depends_on set.
	Adjust for addition of taskwait indirection.
	(gomp_task_run_post_remove_parent): If parent is in
	gomp_task_maybe_wait_for_dependencies and task to be removed
	is parent_depends_on, decrement n_depend and if needed awake
	parent.  Adjust for addition of taskwait indirection.
	(GOMP_taskwait): Adjust for addition of taskwait indirection.
	(gomp_task_maybe_wait_for_dependencies): New function.
	* testsuite/libgomp.c/depend-5.c: New test.

From-SVN: r213408
2014-08-01 10:05:13 +02:00
Tobias Burnus 60ab4b449c pr34020.f90: Make compile with TS 18508/Fortran 2015
2014-07-13  Tobias Burnus  <burnus@net-b.de>

        * testsuite/libgomp.fortran/pr34020.f90: Make compile
        with TS 18508/Fortran 2015

From-SVN: r212490
2014-07-13 08:40:16 +02:00
Marek Polacek 773ec47fe6 re PR c/6940 (taking sizeof array parameter should trigger a warning)
PR c/6940
	* doc/invoke.texi: Document -Wsizeof-array-argument.
c-family/
	* c.opt (Wsizeof-array-argument): New option.
c/
	* c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
	* c-tree.h (C_ARRAY_PARAMETER): Define.
	* c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
	function parameter.
cp/
	* cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
	* decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
	* typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
	function parameter.
testsuite/
	* c-c++-common/Wsizeof-pointer-memaccess1.c: Use
	-Wno-sizeof-array-argument.
	* c-c++-common/Wsizeof-pointer-memaccess2.c: Likewise.
	* g++.dg/warn/Wsizeof-pointer-memaccess-1.C: Likewise.
	* gcc.dg/Wsizeof-pointer-memaccess1.c: Likewise.
	* g++.dg/torture/Wsizeof-pointer-memaccess1.C: Likewise.
	* g++.dg/torture/Wsizeof-pointer-memaccess2.C: Likewise.
	* gcc.dg/torture/Wsizeof-pointer-memaccess1.c: Likewise.
	* c-c++-common/sizeof-array-argument.c: New test.
	* gcc.dg/vla-5.c: Add dg-warnings.
../libgomp/	* testsuite/libgomp.c/appendix-a/a.29.1.c (f): Add dg-warnings.

From-SVN: r212312
2014-07-06 19:00:10 +00:00
Thomas Schwinge a03bd0056c Normalize interface for all *-dg-runtest.
gcc/testsuite/
	* lib/g++-dg.exp (g++-dg-runtest): Change interface to match
	dg-runtest's.  Adapt all callers.
	* lib/gcc-dg.exp (gcc-dg-runtest): Likewise.
	* lib/gfortran-dg.exp (gfortran-dg-runtest): Likewise.
	* lib/go-dg.exp (go-dg-runtest): Likewise.
	* lib/obj-c++-dg.exp (obj-c++-dg-runtest): Likewise.
	* lib/objc-dg.exp (objc-dg-runtest): Likewise.
	libffi/
	* testsuite/lib/libffi.exp (libffi-dg-runtest): Change interface
	match to dg-runtest's.

From-SVN: r212278
2014-07-04 07:28:17 +02:00
Jakub Jelinek f707da16f7 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
2014-07-03 20:45:35 +02:00
Thomas Schwinge 07b6c04483 Explain gfortran-dg-runtest usage in libgomp Fortran testing.
libgomp/
	* testsuite/libgomp.fortran/fortran.exp: Explain
	gfortran-dg-runtest usage.

From-SVN: r212266
2014-07-03 17:23:43 +02:00
Jakub Jelinek da6f124d8a langhooks-def.h (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Define.
* langhooks-def.h (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Define.
	(LANG_HOOKS_DECLS): Add it.
	* gimplify.c (gimplify_omp_for): Make sure OMP_CLAUSE_LINEAR_STEP
	has correct type.
	* tree.h (OMP_CLAUSE_LINEAR_ARRAY): Define.
	* langhooks.h (struct lang_hooks_for_decls): Add
	omp_clause_linear_ctor hook.
	* omp-low.c (lower_rec_input_clauses): Set max_vf even if
	OMP_CLAUSE_LINEAR_ARRAY is set.  Don't fold_convert
	OMP_CLAUSE_LINEAR_STEP.  For OMP_CLAUSE_LINEAR_ARRAY in
	combined simd loop use omp_clause_linear_ctor hook.
gcc/c/
	* c-typeck.c (c_finish_omp_clauses): Make sure
	OMP_CLAUSE_LINEAR_STEP has correct type.
gcc/cp/
	* semantics.c (finish_omp_clauses): Make sure
	OMP_CLAUSE_LINEAR_STEP has correct type.
gcc/fortran/
	* trans.h (gfc_omp_clause_linear_ctor): New prototype.
	* trans-openmp.c (gfc_omp_linear_clause_add_loop,
	gfc_omp_clause_linear_ctor): New functions.
	(gfc_trans_omp_clauses): Make sure OMP_CLAUSE_LINEAR_STEP has
	correct type.  Set OMP_CLAUSE_LINEAR_ARRAY flag if needed.
	* f95-lang.c (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Redefine.
libgomp/
	* testsuite/libgomp.fortran/simd5.f90: New test.
	* testsuite/libgomp.fortran/simd6.f90: New test.
	* testsuite/libgomp.fortran/simd7.f90: New test.

From-SVN: r211971
2014-06-25 11:16:12 +02:00
Jakub Jelinek 56ad0e3820 gimplify.c (gimplify_omp_for): For #pragma omp for simd iterator not mentioned in clauses use private clause if...
* gimplify.c (gimplify_omp_for): For #pragma omp for simd iterator
	not mentioned in clauses use private clause if the iterator is
	declared in #pragma omp for simd, and when adding lastprivate
	instead, add it to the outer #pragma omp for too.  Diagnose
	if the variable is private in outer context.  For simd collapse > 1
	loops, replace all iterators with temporaries.
	* omp-low.c (lower_rec_input_clauses): Handle LINEAR clause the
	same even in collapse > 1 loops.
gcc/c/
	* c-parser.c (c_parser_omp_for_loop): For
	#pragma omp parallel for simd move lastprivate clause from parallel
	to for rather than simd.
gcc/cp/
	* parser.c (cp_parser_omp_for_loop): For
	#pragma omp parallel for simd move lastprivate clause from parallel
	to for rather than simd.
libgomp/
	* testsuite/libgomp.c/for-2.c: Define SC to static for
	#pragma omp for simd testing.
	* testsuite/libgomp.c/for-2.h (SC): Define if not defined.
	(N(f5), N(f6), N(f7), N(f8), N(f10), N(f12), N(f14)): Use
	SC macro.
	* testsuite/libgomp.c/simd-14.c: New test.
	* testsuite/libgomp.c/simd-15.c: New test.
	* testsuite/libgomp.c/simd-16.c: New test.
	* testsuite/libgomp.c/simd-17.c: New test.
	* testsuite/libgomp.c++/for-10.C: Define SC to static for
	#pragma omp for simd testing.
	* testsuite/libgomp.c++/simd10.C: New test.
	* testsuite/libgomp.c++/simd11.C: New test.
	* testsuite/libgomp.c++/simd12.C: New test.
	* testsuite/libgomp.c++/simd13.C: New test.

From-SVN: r211930
2014-06-24 09:53:52 +02:00
Jakub Jelinek b46ebd6c7b gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP, [...]): Make sure OMP_CLAUSE_SIZE is non-NULL.
* gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP,
	OMP_CLAUSE_TO, OMP_CLAUSE_FROM): Make sure OMP_CLAUSE_SIZE is
	non-NULL.
	<case OMP_CLAUSE_ALIGNED>: Gimplify OMP_CLAUSE_ALIGNED_ALIGNMENT.
	(gimplify_adjust_omp_clauses_1): Make sure OMP_CLAUSE_SIZE is
	non-NULL.
	(gimplify_adjust_omp_clauses): Likewise.
	* omp-low.c (lower_rec_simd_input_clauses,
	lower_rec_input_clauses, expand_omp_simd): Handle non-constant
	safelen the same as safelen(1).
	* tree-nested.c (convert_nonlocal_omp_clauses,
	convert_local_omp_clauses): Handle OMP_CLAUSE_ALIGNED.  For
	OMP_CLAUSE_{MAP,TO,FROM} if not decl use walk_tree.
	(convert_nonlocal_reference_stmt, convert_local_reference_stmt):
	Fixup handling of GIMPLE_OMP_TARGET.
	(convert_tramp_reference_stmt, convert_gimple_call): Handle
	GIMPLE_OMP_TARGET.
gcc/fortran/
	* dump-parse-tree.c (show_omp_namelist): Use n->udr->udr instead
	of n->udr.
	* f95-lang.c (gfc_init_builtin_functions): Initialize
	BUILT_IN_ASSUME_ALIGNED.
	* gfortran.h (gfc_omp_namelist): Change udr field type to
	struct gfc_omp_namelist_udr.
	(gfc_omp_namelist_udr): New type.
	(gfc_get_omp_namelist_udr): Define.
	(gfc_resolve_code): New prototype.
	* match.c (gfc_free_omp_namelist): Free name->udr.
	* module.c (intrinsics): Add INTRINSIC_USER.
	(fix_mio_expr): Likewise.
	(mio_expr): Handle INSTRINSIC_USER and non-resolved EXPR_FUNCTION.
	* openmp.c (gfc_match_omp_clauses): Adjust initialization of n->udr.
	(gfc_match_omp_declare_reduction): Treat len=: the same as len=*.
	Set attr.flavor on omp_{out,in,priv,orig} artificial variables.
	(struct resolve_omp_udr_callback_data): New type.
	(resolve_omp_udr_callback, resolve_omp_udr_callback2,
	resolve_omp_udr_clause): New functions.
	(resolve_omp_clauses): Adjust for n->udr changes, resolve UDR clauses
	here.
	(omp_udr_callback): Don't check for implicitly declared functions
	here.
	(gfc_resolve_omp_udr): Don't call gfc_resolve.  Don't check for
	implicitly declared subroutines here.
	* resolve.c (resolve_function): If value.function.isym is non-NULL,
	consider it already resolved.
	(resolve_code): Renamed to ...
	(gfc_resolve_code): ... this.  No longer static.
	(gfc_resolve_blocks, generate_component_assignments, resolve_codes):
	Adjust callers.
	* trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
	by reference type (C_PTR) variables.
	(gfc_omp_finish_clause): Make sure OMP_CLAUSE_SIZE is non-NULL.
	(gfc_trans_omp_udr_expr): Remove.
	(gfc_trans_omp_array_reduction_or_udr): Adjust for n->udr changes.
	Don't call gfc_trans_omp_udr_expr, even for sym->attr.dimension
	expand it as assignment or subroutine call.  Don't initialize
	value.function.isym.
gcc/testsuite/
	* gfortran.dg/gomp/udr2.f90 (f7, f9): Add !$omp parallel with
	reduction clause.
	* gfortran.dg/gomp/udr4.f90 (f4): Likewise.
	Remove Label is never defined expected error.
	* gfortran.dg/gomp/udr8.f90: New test.
libgomp/
	* testsuite/libgomp.fortran/aligned1.f03: New test.
	* testsuite/libgomp.fortran/nestedfn5.f90: New test.
	* testsuite/libgomp.fortran/target7.f90: Surround loop spawning
	tasks with !$omp parallel !$omp single.
	* testsuite/libgomp.fortran/target8.f90: New test.
	* testsuite/libgomp.fortran/udr4.f90 (foo UDR, bar UDR): Adjust
	not to use trim in the combiner, instead call elemental function.
	(fn): New elemental function.
	* testsuite/libgomp.fortran/udr6.f90 (do_add, dp_add, dp_init):
	Make elemental.
	* testsuite/libgomp.fortran/udr7.f90 (omp_priv, omp_orig, omp_out,
	omp_in): Likewise.
	* testsuite/libgomp.fortran/udr12.f90: New test.
	* testsuite/libgomp.fortran/udr13.f90: New test.
	* testsuite/libgomp.fortran/udr14.f90: New test.
	* testsuite/libgomp.fortran/udr15.f90: New test.

From-SVN: r211929
2014-06-24 09:45:22 +02:00
Jakub Jelinek f014c65363 gimplify.c (omp_notice_variable): If n is non-NULL and no flags change in ORT_TARGET region, don't jump to do_outer.
* gimplify.c (omp_notice_variable): If n is non-NULL
	and no flags change in ORT_TARGET region, don't jump to
	do_outer.
	(struct gimplify_adjust_omp_clauses_data): New type.
	(gimplify_adjust_omp_clauses_1): Adjust for data being
	a struct gimplify_adjust_omp_clauses_data pointer instead
	of tree *.  Pass pre_p as a new argument to
	lang_hooks.decls.omp_finish_clause hook.
	(gimplify_adjust_omp_clauses): Add pre_p argument, adjust
	splay_tree_foreach to pass both list_p and pre_p.
	(gimplify_omp_parallel, gimplify_omp_task, gimplify_omp_for,
	gimplify_omp_workshare, gimplify_omp_target_update): Adjust
	gimplify_adjust_omp_clauses callers.
	* langhooks.c (lhd_omp_finish_clause): New function.
	* langhooks-def.h (lhd_omp_finish_clause): New prototype.
	(LANG_HOOKS_OMP_FINISH_CLAUSE): Define to lhd_omp_finish_clause.
	* langhooks.h (struct lang_hooks_for_decls): Add a new
	gimple_seq * argument to omp_finish_clause hook.
	* omp-low.c (scan_sharing_clauses): Call scan_omp_op on
	non-DECL_P OMP_CLAUSE_DECL if ctx->outer.
	(scan_omp_parallel, lower_omp_for): When adding
	_LOOPTEMP_ clause var, add it to outer ctx's decl_map
	as identity.
	* tree-core.h (OMP_CLAUSE_MAP_TO_PSET): New map kind.
	* tree-nested.c (convert_nonlocal_omp_clauses,
	convert_local_omp_clauses): Handle various OpenMP 4.0 clauses.
	* tree-pretty-print.c (dump_omp_clause): Handle
	OMP_CLAUSE_MAP_TO_PSET.
gcc/cp/
	* cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
	argument.
	* cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
gcc/fortran/
	* cpp.c (cpp_define_builtins): Change _OPENMP macro to
	201307.
	* dump-parse-tree.c (show_omp_namelist): Add list_type
	argument.  Adjust for rop being u.reduction_op now,
	handle depend_op or map_op.
	(show_omp_node): Adjust callers.  Print some new
	OpenMP 4.0 clauses, adjust for OMP_LIST_DEPEND_{IN,OUT}
	becoming a single OMP_LIST_DEPEND.
	* f95-lang.c (gfc_handle_omp_declare_target_attribute): New
	function.
	(gfc_attribute_table): New variable.
	(LANG_HOOKS_OMP_FINISH_CLAUSE, LANG_HOOKS_ATTRIBUTE_TABLE): Redefine.
	* frontend-passes.c (gfc_code_walker): Handle new OpenMP target
	EXEC_OMP_* codes and new clauses.
	* gfortran.h (gfc_statement): Add ST_OMP_TARGET, ST_OMP_END_TARGET,
	ST_OMP_TARGET_DATA, ST_OMP_END_TARGET_DATA, ST_OMP_TARGET_UPDATE,
	ST_OMP_DECLARE_TARGET, ST_OMP_TEAMS, ST_OMP_END_TEAMS,
	ST_OMP_DISTRIBUTE, ST_OMP_END_DISTRIBUTE, ST_OMP_DISTRIBUTE_SIMD,
	ST_OMP_END_DISTRIBUTE_SIMD, ST_OMP_DISTRIBUTE_PARALLEL_DO,
	ST_OMP_END_DISTRIBUTE_PARALLEL_DO, ST_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
	ST_OMP_END_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_TARGET_TEAMS,
	ST_OMP_END_TARGET_TEAMS, ST_OMP_TEAMS_DISTRIBUTE,
	ST_OMP_END_TEAMS_DISTRIBUTE, ST_OMP_TEAMS_DISTRIBUTE_SIMD,
	ST_OMP_END_TEAMS_DISTRIBUTE_SIMD, ST_OMP_TARGET_TEAMS_DISTRIBUTE,
	ST_OMP_END_TARGET_TEAMS_DISTRIBUTE,
	ST_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
	ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_SIMD,
	ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
	ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO,
	ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
	ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
	ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
	ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
	ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and
	ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD.
	(symbol_attribute): Add omp_declare_target field.
	(gfc_omp_depend_op, gfc_omp_map_op): New enums.
	(gfc_omp_namelist): Replace rop field with union
	containing reduction_op, depend_op and map_op.
	(OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): Remove.
	(OMP_LIST_DEPEND, OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM): New.
	(gfc_omp_clauses): Add num_teams, device, thread_limit,
	dist_sched_kind, dist_chunk_size fields.
	(gfc_common_head): Add omp_declare_target field.
	(gfc_exec_op): Add EXEC_OMP_TARGET, EXEC_OMP_TARGET_DATA,
	EXEC_OMP_TEAMS, EXEC_OMP_DISTRIBUTE, EXEC_OMP_DISTRIBUTE_SIMD,
	EXEC_OMP_DISTRIBUTE_PARALLEL_DO, EXEC_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
	EXEC_OMP_TARGET_TEAMS, EXEC_OMP_TEAMS_DISTRIBUTE,
	EXEC_OMP_TEAMS_DISTRIBUTE_SIMD, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE,
	EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
	EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
	EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
	EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
	EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and
	EXEC_OMP_TARGET_UPDATE.
	(gfc_add_omp_declare_target): New prototype.
	* match.h (gfc_match_omp_declare_target, gfc_match_omp_distribute,
	gfc_match_omp_distribute_parallel_do,
	gfc_match_omp_distribute_parallel_do_simd,
	gfc_match_omp_distribute_simd, gfc_match_omp_target,
	gfc_match_omp_target_data, gfc_match_omp_target_teams,
	gfc_match_omp_target_teams_distribute,
	gfc_match_omp_target_teams_distribute_parallel_do,
	gfc_match_omp_target_teams_distribute_parallel_do_simd,
	gfc_match_omp_target_teams_distribute_simd,
	gfc_match_omp_target_update, gfc_match_omp_teams,
	gfc_match_omp_teams_distribute,
	gfc_match_omp_teams_distribute_parallel_do,
	gfc_match_omp_teams_distribute_parallel_do_simd,
	gfc_match_omp_teams_distribute_simd): New prototypes.
	* module.c (ab_attribute): Add AB_OMP_DECLARE_TARGET.
	(attr_bits): Likewise.
	(mio_symbol_attribute): Handle omp_declare_target attribute.
	(gfc_free_omp_clauses): Free num_teams, device, thread_limit
	and dist_chunk_size expressions.
	(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): Use 1U instead of 1.
	(OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO, OMP_CLAUSE_FROM,
	OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT,
	OMP_CLAUSE_DIST_SCHEDULE): Define.
	(gfc_match_omp_clauses): Change mask parameter to unsigned int.
	Adjust for rop becoming u.reduction_op.  Disallow inbranch with
	notinbranch.  For depend clause, always create OMP_LIST_DEPEND
	and fill in u.depend_op.  Handle num_teams, device, map,
	to, from, thread_limit and dist_schedule clauses.
	(OMP_DECLARE_SIMD_CLAUSES): Or in OMP_CLAUSE_INBRANCH and
	OMP_CLAUSE_NOTINBRANCH.
	(OMP_TARGET_CLAUSES, OMP_TARGET_DATA_CLAUSES,
	OMP_TARGET_UPDATE_CLAUSES, OMP_TEAMS_CLAUSES,
	OMP_DISTRIBUTE_CLAUSES): Define.
	(match_omp): New function.
	(gfc_match_omp_do, gfc_match_omp_do_simd, gfc_match_omp_parallel,
	gfc_match_omp_parallel_do, gfc_match_omp_parallel_do_simd,
	gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare,
	gfc_match_omp_sections, gfc_match_omp_simd, gfc_match_omp_single,
	gfc_match_omp_task): Rewritten using match_omp.
	(gfc_match_omp_threadprivate, gfc_match_omp_declare_reduction):
	Diagnose if the directives are followed by unexpected junk.
	(gfc_match_omp_distribute, gfc_match_omp_distribute_parallel_do,
	gfc_match_omp_distribute_parallel_do_simd,
	gfc_match_omp_distrbute_simd, gfc_match_omp_declare_target,
	gfc_match_omp_target, gfc_match_omp_target_data,
	gfc_match_omp_target_teams, gfc_match_omp_target_teams_distribute,
	gfc_match_omp_target_teams_distribute_parallel_do,
	gfc_match_omp_target_teams_distribute_parallel_do_simd,
	gfc_match_omp_target_teams_distrbute_simd, gfc_match_omp_target_update,
	gfc_match_omp_teams, gfc_match_omp_teams_distribute,
	gfc_match_omp_teams_distribute_parallel_do,
	gfc_match_omp_teams_distribute_parallel_do_simd,
	gfc_match_omp_teams_distrbute_simd): New functions.
	* openmp.c (resolve_omp_clauses): Adjust for
	OMP_LIST_DEPEND_{IN,OUT} being changed to OMP_LIST_DEPEND.  Handle
	OMP_LIST_MAP, OMP_LIST_FROM, OMP_LIST_TO, num_teams, device,
	dist_chunk_size and thread_limit.
	(gfc_resolve_omp_parallel_blocks): Only put sharing clauses into
	ctx.sharing_clauses.  Call gfc_resolve_omp_do_blocks for various
	new EXEC_OMP_* codes.
	(resolve_omp_do): Handle various new EXEC_OMP_* codes.
	(gfc_resolve_omp_directive): Likewise.
	(gfc_resolve_omp_declare_simd): Add missing space to diagnostics.
	* parse.c (decode_omp_directive): Handle parsing of OpenMP 4.0
	offloading related directives.
	(case_executable): Add ST_OMP_TARGET_UPDATE.
	(case_exec_markers): Add ST_OMP_TARGET*, ST_OMP_TEAMS*,
	ST_OMP_DISTRIBUTE*.
	(case_decl): Add ST_OMP_DECLARE_TARGET.
	(gfc_ascii_statement): Handle new ST_OMP_* codes.
	(parse_omp_do): Handle various new ST_OMP_* codes.
	(parse_executable): Likewise.
	* resolve.c (gfc_resolve_blocks): Handle various new EXEC_OMP_*
	codes.
	(resolve_code): Likewise.
	(resolve_symbol): Change that !$OMP DECLARE TARGET variables
	are saved.
	* st.c (gfc_free_statement): Handle various new EXEC_OMP_* codes.
	* symbol.c (check_conflict): Check omp_declare_target conflicts.
	(gfc_add_omp_declare_target): New function.
	(gfc_copy_attr): Copy omp_declare_target.
	* trans.c (trans_code): Handle various new EXEC_OMP_* codes.
	* trans-common.c (build_common_decl): Add "omp declare target"
	attribute if needed.
	* trans-decl.c (add_attributes_to_decl): Likewise.
	* trans.h (gfc_omp_finish_clause): New prototype.
	* trans-openmp.c (gfc_omp_finish_clause): New function.
	(gfc_trans_omp_reduction_list): Adjust for rop being renamed
	to u.reduction_op.
	(gfc_trans_omp_clauses): Adjust for OMP_LIST_DEPEND_{IN,OUT}
	change to OMP_LIST_DEPEND and fix up depend handling.
	Handle OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM, num_teams,
	thread_limit, device, dist_chunk_size and dist_sched_kind.
	(gfc_trans_omp_do): Handle EXEC_OMP_DISTRIBUTE.
	(GFC_OMP_SPLIT_DISTRIBUTE, GFC_OMP_SPLIT_TEAMS,
	GFC_OMP_SPLIT_TARGET, GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_DISTRIBUTE,
	GFC_OMP_MASK_TEAMS, GFC_OMP_MASK_TARGET, GFC_OMP_MASK_NUM): New.
	(gfc_split_omp_clauses): Handle splitting of clauses for new
	EXEC_OMP_* codes.
	(gfc_trans_omp_do_simd): Add pblock argument, adjust for being
	callable for combined constructs.
	(gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_do_simd): Likewise.
	(gfc_trans_omp_distribute, gfc_trans_omp_teams,
	gfc_trans_omp_target, gfc_trans_omp_target_data,
	gfc_trans_omp_target_update): New functions.
	(gfc_trans_omp_directive): Adjust gfc_trans_omp_* callers, handle
	new EXEC_OMP_* codes.
gcc/testsuite/
	* gfortran.dg/gomp/declare-simd-1.f90: New test.
	* gfortran.dg/gomp/depend-1.f90: New test.
	* gfortran.dg/gomp/target1.f90: New test.
	* gfortran.dg/gomp/target2.f90: New test.
	* gfortran.dg/gomp/target3.f90: New test.
	* gfortran.dg/gomp/udr4.f90: Adjust expected diagnostics.
	* gfortran.dg/openmp-define-3.f90: Expect _OPENMP 201307 instead of
	201107.
libgomp/
	* omp_lib.f90.in (openmp_version): Set to 201307.
	* omp_lib.h.in (openmp_version): Likewise.
	* testsuite/libgomp.c/target-8.c: New test.
	* testsuite/libgomp.fortran/declare-simd-1.f90: Add notinbranch
	and inbranch clauses.
	* testsuite/libgomp.fortran/depend-3.f90: New test.
	* testsuite/libgomp.fortran/openmp_version-1.f: Adjust for new
	openmp_version.
	* testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
	* testsuite/libgomp.fortran/target1.f90: New test.
	* testsuite/libgomp.fortran/target2.f90: New test.
	* testsuite/libgomp.fortran/target3.f90: New test.
	* testsuite/libgomp.fortran/target4.f90: New test.
	* testsuite/libgomp.fortran/target5.f90: New test.
	* testsuite/libgomp.fortran/target6.f90: New test.
	* testsuite/libgomp.fortran/target7.f90: New test.

From-SVN: r211768
2014-06-18 09:16:12 +02:00
Jakub Jelinek 92d28cbb59 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP)
PR fortran/60928
	* omp-low.c (lower_rec_input_clauses) <case OMP_CLAUSE_LASTPRIVATE>:
	Set lastprivate_firstprivate even if omp_private_outer_ref
	langhook returns true.
	<case OMP_CLAUSE_REDUCTION>: When calling omp_clause_default_ctor
	langhook, call unshare_expr on new_var and call
	build_outer_var_ref to get the last argument.
gcc/c-family/
	* c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
	(omp_pragmas): ... back here.
gcc/fortran/
	* f95-lang.c (gfc_init_builtin_functions): Handle -fopenmp-simd
	like -fopenmp.
	* openmp.c (resolve_omp_clauses): Remove allocatable components
	diagnostics.  Add associate-name and intent(in) pointer
	diagnostics for various clauses, diagnose procedure pointers in
	reduction clause.
	* parse.c (match_word_omp_simd): New function.
	(matchs, matcho): New macros.
	(decode_omp_directive): Change match macros to either matchs
	or matcho.  Handle -fopenmp-simd.
	(next_free, next_fixed): Handle -fopenmp-simd like -fopenmp.
	* scanner.c (skip_free_comments, skip_fixed_comments, include_line):
	Likewise.
	* trans-array.c (get_full_array_size): Rename to...
	(gfc_full_array_size): ... this.  No longer static.
	(duplicate_allocatable): Adjust caller.  Add NO_MEMCPY argument
	and handle it.
	(gfc_duplicate_allocatable, gfc_copy_allocatable_data): Adjust
	duplicate_allocatable callers.
	(gfc_duplicate_allocatable_nocopy): New function.
	(structure_alloc_comps): Adjust g*_full_array_size and
	duplicate_allocatable caller.
	* trans-array.h (gfc_full_array_size,
	gfc_duplicate_allocatable_nocopy): New prototypes.
	* trans-common.c (create_common): Call gfc_finish_decl_attrs.
	* trans-decl.c (gfc_finish_decl_attrs): New function.
	(gfc_finish_var_decl, create_function_arglist,
	gfc_get_fake_result_decl): Call it.
	(gfc_allocate_lang_decl): If DECL_LANG_SPECIFIC is already allocated,
	don't allocate it again.
	(gfc_get_symbol_decl): Set GFC_DECL_ASSOCIATE_VAR_P on
	associate-names.
	* trans.h (gfc_finish_decl_attrs): New prototype.
	(struct lang_decl): Add scalar_allocatable and scalar_pointer
	bitfields.
	(GFC_DECL_SCALAR_ALLOCATABLE, GFC_DECL_SCALAR_POINTER,
	GFC_DECL_GET_SCALAR_ALLOCATABLE, GFC_DECL_GET_SCALAR_POINTER,
	GFC_DECL_ASSOCIATE_VAR_P): Define.
	(GFC_POINTER_TYPE_P): Remove.
	* trans-openmp.c (gfc_omp_privatize_by_reference): Don't check
	GFC_POINTER_TYPE_P, instead test GFC_DECL_GET_SCALAR_ALLOCATABLE,
	GFC_DECL_GET_SCALAR_POINTER or GFC_DECL_CRAY_POINTEE on decl.
	(gfc_omp_predetermined_sharing): Associate-names are predetermined.
	(enum walk_alloc_comps): New.
	(gfc_has_alloc_comps, gfc_omp_unshare_expr_r, gfc_omp_unshare_expr,
	gfc_walk_alloc_comps): New functions.
	(gfc_omp_private_outer_ref): Return true for scalar allocatables or
	decls with allocatable components.
	(gfc_omp_clause_default_ctor, gfc_omp_clause_copy_ctor,
	gfc_omp_clause_assign_op, gfc_omp_clause_dtor): Fix up handling of
	allocatables, handle also OMP_CLAUSE_REDUCTION, handle scalar
	allocatables and decls with allocatable components.
	(gfc_trans_omp_array_reduction_or_udr): Don't handle allocatable
	arrays here.
	(gfc_trans_omp_reduction_list): Call
	gfc_trans_omp_array_reduction_or_udr even for allocatable scalars.
	(gfc_trans_omp_do_simd): If -fno-openmp, just expand it as OMP_SIMD.
	(gfc_trans_omp_parallel_do_simd): Likewise.
	* trans-types.c (gfc_sym_type): Don't set GFC_POINTER_TYPE_P.
	(gfc_get_derived_type): Call gfc_finish_decl_attrs.
gcc/testsuite/
	* gfortran.dg/gomp/allocatable_components_1.f90: Remove dg-error
	directives.
	* gfortran.dg/gomp/associate1.f90: New test.
	* gfortran.dg/gomp/intentin1.f90: New test.
	* gfortran.dg/gomp/openmp-simd-1.f90: New test.
	* gfortran.dg/gomp/openmp-simd-2.f90: New test.
	* gfortran.dg/gomp/openmp-simd-3.f90: New test.
	* gfortran.dg/gomp/proc_ptr_2.f90: New test.
libgomp/
	* testsuite/libgomp.fortran/allocatable9.f90: New test.
	* testsuite/libgomp.fortran/allocatable10.f90: New test.
	* testsuite/libgomp.fortran/allocatable11.f90: New test.
	* testsuite/libgomp.fortran/allocatable12.f90: New test.
	* testsuite/libgomp.fortran/alloc-comp-1.f90: New test.
	* testsuite/libgomp.fortran/alloc-comp-2.f90: New test.
	* testsuite/libgomp.fortran/alloc-comp-3.f90: New test.
	* testsuite/libgomp.fortran/associate1.f90: New test.
	* testsuite/libgomp.fortran/associate2.f90: New test.
	* testsuite/libgomp.fortran/procptr1.f90: New test.

From-SVN: r211397
2014-06-10 08:05:22 +02:00
Jakub Jelinek 5f23671d3f dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item.
gcc/fortran/
	* dump-parse-tree.c (show_omp_namelist): Dump reduction
	id in each list item.
	(show_omp_node): Only handle OMP_LIST_REDUCTION, not
	OMP_LIST_REDUCTION_FIRST .. OMP_LIST_REDUCTION_LAST.  Don't
	dump reduction id here.
	* frontend-passes.c (dummy_code_callback): Renamed to...
	(gfc_dummy_code_callback): ... this.  No longer static.
	(optimize_reduction): Use gfc_dummy_code_callback instead of
	dummy_code_callback.
	* gfortran.h (gfc_statement): Add ST_OMP_DECLARE_REDUCTION.
	(symbol_attribute): Add omp_udr_artificial_var bitfield.
	(gfc_omp_reduction_op): New enum.
	(gfc_omp_namelist): Add rop and udr fields.
	(OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT,
	OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV,
	OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND,
	OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST): Removed.
	(OMP_LIST_REDUCTION): New.
	(gfc_omp_udr): New type.
	(gfc_get_omp_udr): Define.
	(gfc_symtree): Add n.omp_udr field.
	(gfc_namespace): Add omp_udr_root field, add omp_udr_ns bitfield.
	(gfc_free_omp_udr, gfc_omp_udr_find, gfc_resolve_omp_udrs,
	gfc_dummy_code_callback): New prototypes.
	* match.h (gfc_match_omp_declare_reduction): New prototype.
	* module.c (MOD_VERSION): Increase to 13.
	(omp_declare_reduction_stmt): New array.
	(mio_omp_udr_expr, write_omp_udr, write_omp_udrs, load_omp_udrs):
	New functions.
	(read_module): Read OpenMP user defined reductions.
	(write_module): Write OpenMP user defined reductions.
	* openmp.c: Include arith.h.
	(gfc_free_omp_udr, gfc_find_omp_udr): New functions.
	(gfc_match_omp_clauses): Handle user defined reductions.
	Store reduction kind into gfc_omp_namelist instead of using
	several OMP_LIST_* entries.
	(match_udr_expr, gfc_omp_udr_predef, gfc_omp_udr_find,
	gfc_match_omp_declare_reduction): New functions.
	(resolve_omp_clauses): Adjust for reduction clauses being only
	in OMP_LIST_REDUCTION list.  Diagnose missing UDRs.
	(struct omp_udr_callback_data): New type.
	(omp_udr_callback, gfc_resolve_omp_udr, gfc_resolve_omp_udrs): New
	functions.
	* parse.c (decode_omp_directive): Handle !$omp declare reduction.
	(case_decl): Add ST_OMP_DECLARE_REDUCTION.
	(gfc_ascii_statement): Print ST_OMP_DECLARE_REDUCTION.
	* resolve.c (resolve_fl_variable): Allow len=: or len=* on
	sym->attr.omp_udr_artificial_var symbols.
	(resolve_types): Call gfc_resolve_omp_udrs.
	* symbol.c (gfc_get_uop): If gfc_current_ns->omp_udr_ns,
	use parent ns instead of gfc_current_ns.
	(gfc_get_sym_tree): Don't insert symbols into
	namespaces with omp_udr_ns set.
	(free_omp_udr_tree): New function.
	(gfc_free_namespace): Call it.
	* trans-openmp.c (struct omp_udr_find_orig_data): New type.
	(omp_udr_find_orig, gfc_trans_omp_udr_expr): New functions.
	(gfc_trans_omp_array_reduction): Renamed to...
	(gfc_trans_omp_array_reduction_or_udr): ... this.  Remove SYM
	argument, instead pass gfc_omp_namelist pointer N.  Handle
	user defined reductions.
	(gfc_trans_omp_reduction_list): Remove REDUCTION_CODE argument.
	Handle user defined reductions and reduction ops in gfc_omp_namelist.
	(gfc_trans_omp_clauses): Adjust for just a single OMP_LIST_REDUCTION
	list.
	(gfc_split_omp_clauses): Likewise.
gcc/testsuite/
	* gfortran.dg/gomp/allocatable_components_1.f90: Adjust for
	reduction clause diagnostic changes.
	* gfortran.dg/gomp/appendix-a/a.31.3.f90: Likewise.
	* gfortran.dg/gomp/reduction1.f90: Likewise.
	* gfortran.dg/gomp/reduction3.f90: Likewise.
	* gfortran.dg/gomp/udr1.f90: New test.
	* gfortran.dg/gomp/udr2.f90: New test.
	* gfortran.dg/gomp/udr3.f90: New test.
	* gfortran.dg/gomp/udr4.f90: New test.
	* gfortran.dg/gomp/udr5.f90: New test.
	* gfortran.dg/gomp/udr6.f90: New test.
	* gfortran.dg/gomp/udr7.f90: New test.
libgomp/
	* testsuite/libgomp.fortran/simd1.f90: New test.
	* testsuite/libgomp.fortran/udr1.f90: New test.
	* testsuite/libgomp.fortran/udr2.f90: New test.
	* testsuite/libgomp.fortran/udr3.f90: New test.
	* testsuite/libgomp.fortran/udr4.f90: New test.
	* testsuite/libgomp.fortran/udr5.f90: New test.
	* testsuite/libgomp.fortran/udr6.f90: New test.
	* testsuite/libgomp.fortran/udr7.f90: New test.
	* testsuite/libgomp.fortran/udr8.f90: New test.
	* testsuite/libgomp.fortran/udr9.f90: New test.
	* testsuite/libgomp.fortran/udr10.f90: New test.
	* testsuite/libgomp.fortran/udr11.f90: New test.

From-SVN: r211303
2014-06-06 09:24:38 +02:00
Uros Bizjak 0389fbb55b declare-simd-1.f90: Require vect_simd_clones effective target.
* testsuite/libgomp.fortran/declare-simd-1.f90: Require
	vect_simd_clones effective target.
	* testsuite/libgomp.fortran/declare-simd-2.f90: Ditto.

From-SVN: r210961
2014-05-27 11:14:53 +02:00
Jakub Jelinek decaaec811 re PR middle-end/61252 (Invalid code produced for omp simd reduction(min:var) where var is reference)
PR middle-end/61252
	* omp-low.c (handle_simd_reference): New function.
	(lower_rec_input_clauses): Use it.  Defer adding reference
	initialization even for reduction without placeholder if in simd,
	handle it properly later on.

	* testsuite/libgomp.c++/simd-9.C: New test.

From-SVN: r210679
2014-05-21 10:04:03 +02:00
Uros Bizjak 7283246061 libgomp.texi (Runitme Library Routines): Remove multiple @menu.
* libgomp.texi (Runitme Library Routines): Remove multiple @menu.
	(Environment Variables) Move OMP_PROC_BIND and OMP_STACKSIZE node
	texts according to their @menu entry positions.

From-SVN: r210580
2014-05-18 12:29:30 +02:00
Jakub Jelinek dd2fc5256e tree.h (OMP_CLAUSE_LINEAR_STMT): Define.
* tree.h (OMP_CLAUSE_LINEAR_STMT): Define.
	* tree.c (omp_clause_num_ops): Increase OMP_CLAUSE_LINEAR
	number of operands to 3.
	(walk_tree_1): Walk all operands of OMP_CLAUSE_LINEAR.
	* tree-nested.c (convert_nonlocal_omp_clauses,
	convert_local_omp_clauses): Handle OMP_CLAUSE_DEPEND.
	* gimplify.c (gimplify_scan_omp_clauses): Handle
	OMP_CLAUSE_LINEAR_STMT.
	* omp-low.c (lower_rec_input_clauses): Fix typo.
	(maybe_add_implicit_barrier_cancel, lower_omp_1): Add
	cast between Fortran boolean_type_node and C _Bool if
	needed.
gcc/fortran/
	* gfortran.h (gfc_statement): Add ST_OMP_CANCEL,
	ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
	ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
	ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
	ST_OMP_DECLARE_SIMD.
	(gfc_omp_namelist): New typedef.
	(gfc_get_omp_namelist): Define.
	(OMP_LIST_UNIFORM, OMP_LIST_ALIGNED, OMP_LIST_LINEAR,
	OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): New clause list kinds.
	(gfc_omp_proc_bind_kind, gfc_omp_cancel_kind): New enums.
	(gfc_omp_clauses): Change type of lists to gfc_omp_namelist *.
	Add inbranch, notinbranch, cancel, proc_bind, safelen_expr and
	simdlen_expr fields.
	(gfc_omp_declare_simd): New typedef.
	(gfc_get_omp_declare_simd): Define.
	(gfc_namespace): Add omp_declare_simd field.
	(gfc_exec_op): Add EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
	EXEC_OMP_TASKGROUP, EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and
	EXEC_OMP_PARALLEL_DO_SIMD.
	(gfc_omp_atomic_op): Add GFC_OMP_ATOMIC_MASK, GFC_OMP_ATOMIC_SEQ_CST
	and GFC_OMP_ATOMIC_SWAP.
	(gfc_code): Change type of omp_namelist field to gfc_omp_namelist *.
	(gfc_free_omp_namelist, gfc_free_omp_declare_simd,
	gfc_free_omp_declare_simd_list, gfc_resolve_omp_declare_simd): New
	prototypes.
	* trans-stmt.h (gfc_trans_omp_declare_simd): New prototype.
	* symbol.c (gfc_free_namespace): Call gfc_free_omp_declare_simd.
	* openmp.c (gfc_free_omp_clauses): Free safelen_expr and
	simdlen_expr.  Use gfc_free_omp_namelist instead of
	gfc_free_namelist.
	(gfc_free_omp_declare_simd, gfc_free_omp_declare_simd_list): New
	functions.
	(gfc_match_omp_variable_list): Add end_colon, headp and
	allow_sections arguments.  Handle parsing of array sections.
	Use *omp_namelist* instead of *namelist* data structure and
	functions/macros.  Allow termination at : character.
	(OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH,
	OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND,
	OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM): Define.
	(gfc_match_omp_clauses): Change first and needs_space variables
	into arguments with default values.  Parse inbranch, notinbranch,
	proc_bind, safelen, simdlen, uniform, linear, aligned and
	depend clauses.
	(OMP_PARALLEL_CLAUSES): Add OMP_CLAUSE_PROC_BIND.
	(OMP_DECLARE_SIMD_CLAUSES, OMP_SIMD_CLAUSES): Define.
	(OMP_TASK_CLAUSES): Add OMP_CLAUSE_DEPEND.
	(gfc_match_omp_do_simd): New function.
	(gfc_match_omp_flush): Use *omp_namelist* instead of *namelist*
	data structure and functions/macros.
	(gfc_match_omp_simd, gfc_match_omp_declare_simd,
	gfc_match_omp_parallel_do_simd): New functions.
	(gfc_match_omp_atomic): Handle seq_cst clause.  Handle atomic swap.
	(gfc_match_omp_taskgroup, gfc_match_omp_cancel_kind,
	gfc_match_omp_cancel, gfc_match_omp_cancellation_point): New
	functions.
	(resolve_omp_clauses): Add where, omp_clauses and ns arguments.
	Use *omp_namelist* instead of *namelist* data structure and
	functions/macros.  Resolve uniform, aligned, linear, depend,
	safelen and simdlen clauses.
	(resolve_omp_atomic): Adjust for GFC_OMP_ATOMIC_{MASK,SEQ_CST,SWAP}
	addition, recognize atomic swap.
	(gfc_resolve_omp_parallel_blocks): Use gfc_omp_namelist instead
	of gfc_namelist.  Handle EXEC_OMP_PARALLEL_DO_SIMD the same as
	EXEC_OMP_PARALLEL_DO.
	(gfc_resolve_do_iterator): Use *omp_namelist* instead of *namelist*
	data structure and functions/macros.
	(resolve_omp_do): Likewise.  Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD.
	(gfc_resolve_omp_directive): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD and EXEC_OMP_CANCEL.  Adjust
	resolve_omp_clauses caller.
	(gfc_resolve_omp_declare_simd): New function.
	* parse.c (decode_omp_directive): Parse cancellation point, cancel,
	declare simd, end do simd, end simd, end parallel do simd,
	end taskgroup, parallel do simd, simd and taskgroup directives.
	(case_executable): Add ST_OMP_CANCEL and ST_OMP_CANCELLATION_POINT.
	(case_exec_markers): Add ST_OMP_TASKGROUP, case ST_OMP_SIMD,
	ST_OMP_DO_SIMD and ST_OMP_PARALLEL_DO_SIMD.
	(case_decl): Add ST_OMP_DECLARE_SIMD.
	(gfc_ascii_statement): Handle ST_OMP_CANCEL,
	ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
	ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
	ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
	ST_OMP_DECLARE_SIMD.
	(parse_omp_do): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD and
	ST_OMP_PARALLEL_DO_SIMD.
	(parse_omp_atomic): Adjust for GFC_OMP_ATOMIC_* additions.
	(parse_omp_structured_block): Handle ST_OMP_TASKGROUP and
	ST_OMP_PARALLEL_DO_SIMD.
	(parse_executable): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD,
	ST_OMP_PARALLEL_DO_SIMD and ST_OMP_TASKGROUP.
	* trans-decl.c (gfc_get_extern_function_decl,
	gfc_create_function_decl): Call gfc_trans_omp_declare_simd if
	needed.
	* frontend-passes.c (gfc_code_walker): Handle EXEC_OMP_SIMD,
	EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD.  Walk
	safelen_expr and simdlen_expr.  Walk expressions in gfc_omp_namelist
	of depend, aligned and linear clauses.
	* match.c (match_exit_cycle): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD
	and EXEC_OMP_PARALLEL_DO_SIMD.
	(gfc_free_omp_namelist): New function.
	* dump-parse-tree.c (show_namelist): Removed.
	(show_omp_namelist): New function.
	(show_omp_node): Handle OpenMP 4.0 additions.
	(show_code_node): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
	EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and
	EXEC_OMP_TASKGROUP.
	* match.h (gfc_match_omp_cancel, gfc_match_omp_cancellation_point,
	gfc_match_omp_declare_simd, gfc_match_omp_do_simd,
	gfc_match_omp_parallel_do_simd, gfc_match_omp_simd,
	gfc_match_omp_taskgroup): New prototypes.
	* trans-openmp.c (gfc_trans_omp_variable): Add declare_simd
	argument, handle it.  Allow current_function_decl to be NULL.
	(gfc_trans_omp_variable_list): Add declare_simd argument, pass
	it through to gfc_trans_omp_variable and disregard whether
	sym is referenced if declare_simd is true.  Work on gfc_omp_namelist
	instead of gfc_namelist.
	(gfc_trans_omp_reduction_list): Work on gfc_omp_namelist instead of
	gfc_namelist.  Adjust gfc_trans_omp_variable caller.
	(gfc_trans_omp_clauses): Add declare_simd argument, pass it through
	to gfc_trans_omp_variable{,_list} callers.  Work on gfc_omp_namelist
	instead of gfc_namelist.  Handle inbranch, notinbranch, safelen,
	simdlen, depend, uniform, linear, proc_bind and aligned clauses.
	Handle cancel kind.
	(gfc_trans_omp_atomic): Handle seq_cst clause, handle atomic swap,
	adjust for GFC_OMP_ATOMIC_* changes.
	(gfc_trans_omp_cancel, gfc_trans_omp_cancellation_point): New
	functions.
	(gfc_trans_omp_do): Add op argument, handle simd translation into
	generic.
	(GFC_OMP_SPLIT_SIMD, GFC_OMP_SPLIT_DO, GFC_OMP_SPLIT_PARALLEL,
	GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_SIMD, GFC_OMP_MASK_DO,
	GFC_OMP_MASK_PARALLEL): New.
	(gfc_split_omp_clauses, gfc_trans_omp_do_simd): New functions.
	(gfc_trans_omp_parallel_do): Rework to use gfc_split_omp_clauses.
	(gfc_trans_omp_parallel_do_simd, gfc_trans_omp_taskgroup): New
	functions.
	(gfc_trans_omp_directive): Handle EXEC_OMP_CANCEL,
	EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
	Adjust gfc_trans_omp_do caller.
	(gfc_trans_omp_declare_simd): New function.
	* st.c (gfc_free_statement): Handle EXEC_OMP_CANCEL,
	EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
	For EXEC_OMP_FLUSH call gfc_free_omp_namelist instead of
	gfc_free_namelist.
	* module.c (omp_declare_simd_clauses): New variable.
	(mio_omp_declare_simd): New function.
	(mio_symbol): Call it.
	* trans.c (trans_code): Handle EXEC_OMP_CANCEL,
	EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
	* resolve.c (gfc_resolve_blocks): Handle EXEC_OMP_DO_SIMD,  
	EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
	(resolve_code): Handle EXEC_OMP_CANCEL,
	EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
	(resolve_types): Call gfc_resolve_omp_declare_simd.
gcc/testsuite/
	* gfortran.dg/gomp/affinity-1.f90: New test.
libgomp/
	* testsuite/libgomp.fortran/cancel-do-1.f90: New test.
	* testsuite/libgomp.fortran/cancel-do-2.f90: New test.
	* testsuite/libgomp.fortran/cancel-parallel-1.f90: New test.
	* testsuite/libgomp.fortran/cancel-parallel-3.f90: New test.
	* testsuite/libgomp.fortran/cancel-sections-1.f90: New test.
	* testsuite/libgomp.fortran/cancel-taskgroup-2.f90: New test.
	* testsuite/libgomp.fortran/declare-simd-1.f90: New test.
	* testsuite/libgomp.fortran/declare-simd-2.f90: New test.
	* testsuite/libgomp.fortran/declare-simd-3.f90: New test.
	* testsuite/libgomp.fortran/depend-1.f90: New test.
	* testsuite/libgomp.fortran/depend-2.f90: New test.
	* testsuite/libgomp.fortran/omp_atomic5.f90: New test.
	* testsuite/libgomp.fortran/simd1.f90: New test.
	* testsuite/libgomp.fortran/simd2.f90: New test.
	* testsuite/libgomp.fortran/simd3.f90: New test.
	* testsuite/libgomp.fortran/simd4.f90: New test.
	* testsuite/libgomp.fortran/taskgroup1.f90: New test.

From-SVN: r210313
2014-05-11 22:26:36 +02:00
Jakub Jelinek 95782571f3 gimplify.c (gimplify_adjust_omp_clauses_1): Handle GOVD_FIRSTPRIVATE | GOVD_LASTPRIVATE.
* gimplify.c (gimplify_adjust_omp_clauses_1): Handle
	GOVD_FIRSTPRIVATE | GOVD_LASTPRIVATE.
	(gimplify_adjust_omp_clauses): Simd region is never
	directly nested in combined parallel.  Instead, for linear
	with copyin/copyout, if in combined for simd loop, make decl
	firstprivate/lastprivate on OMP_FOR.
	* omp-low.c (expand_omp_for_generic, expand_omp_for_static_nochunk,
	expand_omp_for_static_chunk): When setting endvar, also set
	fd->loop.v to the same value.
libgomp/
	* testsuite/libgomp.c/simd-10.c: New test.
	* testsuite/libgomp.c/simd-11.c: New test.
	* testsuite/libgomp.c/simd-12.c: New test.
	* testsuite/libgomp.c/simd-13.c: New test.

From-SVN: r210009
2014-05-02 19:43:40 +02:00
Jakub Jelinek 42056eaced c-parser.c (c_parser_omp_atomic): Allow seq_cst before atomic-clause...
gcc/c/
	* c-parser.c (c_parser_omp_atomic): Allow seq_cst before
	atomic-clause, allow comma in between atomic-clause and
	seq_cst.
gcc/cp/
	* parser.c (cp_parser_omp_atomic): Allow seq_cst before
	atomic-clause, allow comma in between atomic-clause and
	seq_cst.
gcc/testsuite/
	* c-c++-common/gomp/atomic-16.c: Remove all dg-error directives.
	Replace load with read and store with write.
libgomp/
	* testsuite/libgomp.c++/atomic-14.C: Allow seq_cst and
	atomic type clauses in any order and optional comma in between.
	* testsuite/libgomp.c++/atomic-15.C: Likewise.
	* testsuite/libgomp.c/atomic-17.c: Likewise.

From-SVN: r209762
2014-04-24 23:20:28 +02:00
Jakub Jelinek f7468577f8 tree.h (OMP_CLAUSE_LINEAR_GIMPLE_SEQ): Define.
* tree.h (OMP_CLAUSE_LINEAR_GIMPLE_SEQ): Define.
	* gimplify.c (omp_is_private): Change last argument's type to int.
	Only diagnose lastprivate if the simd argument is 1, only diagnose
	linear if the simd argument is 2.
	(gimplify_omp_for): Adjust omp_is_private callers.  When adding
	lastprivate or private, add the clause to OMP_FOR_CLAUSES.  Pass
	GOVD_EXPLICIT to omp_add_variable.  For simd with collapse == 1
	create OMP_CLAUSE_LINEAR rather than OMP_CLAUSE_PRIVATE for var.
	If var != decl and decl is in OMP_CLAUSE_LINEAR, gimplify decl
	increment to OMP_CLAUSE_LINEAR_GIMPLE_SEQ.
	* omp-low.c (scan_sharing_clauses, lower_lastprivate_clauses): Handle
	OMP_CLAUSE_LINEAR_GIMPLE_SEQ.
	* tree-nested.c (convert_nonlocal_omp_clauses,
	convert_local_omp_clauses): Handle OMP_CLAUSE_LINEAR.

	* testsuite/libgomp.c/simd-7.c: New test.
	* testsuite/libgomp.c/simd-8.c: New test.
	* testsuite/libgomp.c/simd-9.c: New test.
	* testsuite/libgomp.c/loop-16.c: New test.

From-SVN: r209760
2014-04-24 23:17:32 +02:00
Richard Henderson ab18f2f51c libgomp: Fix default futex vs errno
* config/linux/futex.h (futex_wait): Get error value from errno.
	(futex_wake): Likewise.

From-SVN: r209035
2014-04-02 13:27:29 -07:00
Jakub Jelinek 8bcc90b0af re PR c++/60331 (ICE with OpenMP #pragma omp declare reduction in template class)
PR c++/60331
	* semantics.c (potential_constant_expression_1): Handle
	DECL_EXPR.

	* testsuite/libgomp.c++/udr-11.C: New test.
	* testsuite/libgomp.c++/udr-12.C: New test.
	* testsuite/libgomp.c++/udr-13.C: New test.
	* testsuite/libgomp.c++/udr-14.C: New test.
	* testsuite/libgomp.c++/udr-15.C: New test.
	* testsuite/libgomp.c++/udr-16.C: New test.
	* testsuite/libgomp.c++/udr-17.C: New test.
	* testsuite/libgomp.c++/udr-18.C: New test.
	* testsuite/libgomp.c++/udr-19.C: New test.

From-SVN: r208806
2014-03-25 10:30:10 +01:00
Richard Sandiford 18d73c7f59 Update copyright years in libgomp/
From-SVN: r206297
2014-01-02 22:25:54 +00:00
Richard Sandiford f9030485a3 arc-common.c, [...]: Use the standard form for the copyright notice.
gcc/
	* common/config/arc/arc-common.c, config/arc/arc-modes.def,
	config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h,
	config/arc/arc.md, config/arc/arc.opt, config/arm/arm_neon_builtins.def,
	config/arm/crypto.def, config/i386/avx512cdintrin.h,
	config/i386/avx512erintrin.h, config/i386/avx512fintrin.h,
	config/i386/avx512pfintrin.h, config/i386/btver2.md,
	config/i386/shaintrin.h, config/i386/slm.md, config/linux-protos.h,
	config/linux.c, config/winnt-c.c, diagnostic-color.c,
	diagnostic-color.h, gimple-ssa-isolate-paths.c, vtable-verify.c,
	vtable-verify.h: Use the standard form for the copyright notice.

gcc/c-family/
	* array-notation-common.c, c-cilkplus.c: Use the standard form for
	the copyright notice.

gcc/c/
	* c-array-notation.c: Use the standard form for the copyright notice.

gcc/cp/
	* cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
	the standard form for the copyright notice.

gcc/testsuite/
	* gcc.target/arc/arc.exp: Use the standard form for the copyright
	notice.

libgcc/
	* config/arc/asm.h, config/arc/crtg.S, config/arc/crtgend.S,
	config/arc/crti.S, config/arc/crtn.S, config/arc/divtab-arc700.c,
	config/arc/dp-hack.h, config/arc/fp-hack.h,
	config/arc/ieee-754/adddf3.S, config/arc/ieee-754/addsf3.S,
	config/arc/ieee-754/arc600-dsp/divdf3.S,
	config/arc/ieee-754/arc600-dsp/divsf3.S,
	config/arc/ieee-754/arc600-dsp/muldf3.S,
	config/arc/ieee-754/arc600-dsp/mulsf3.S,
	config/arc/ieee-754/arc600-mul64/divdf3.S,
	config/arc/ieee-754/arc600-mul64/divsf3.S,
	config/arc/ieee-754/arc600-mul64/muldf3.S,
	config/arc/ieee-754/arc600-mul64/mulsf3.S,
	config/arc/ieee-754/arc600/divsf3.S,
	config/arc/ieee-754/arc600/mulsf3.S,
	config/arc/ieee-754/divdf3.S, config/arc/ieee-754/divsf3-stdmul.S,
	config/arc/ieee-754/divsf3.S, config/arc/ieee-754/divtab-arc-df.c,
	config/arc/ieee-754/divtab-arc-sf.c, config/arc/ieee-754/eqdf2.S,
	config/arc/ieee-754/eqsf2.S, config/arc/ieee-754/extendsfdf2.S,
	config/arc/ieee-754/fixdfsi.S, config/arc/ieee-754/fixsfsi.S,
	config/arc/ieee-754/fixunsdfsi.S, config/arc/ieee-754/floatsidf.S,
	config/arc/ieee-754/floatsisf.S, config/arc/ieee-754/floatunsidf.S,
	config/arc/ieee-754/gedf2.S, config/arc/ieee-754/gesf2.S,
	config/arc/ieee-754/gtdf2.S, config/arc/ieee-754/gtsf2.S,
	config/arc/ieee-754/muldf3.S, config/arc/ieee-754/mulsf3.S,
	config/arc/ieee-754/orddf2.S, config/arc/ieee-754/ordsf2.S,
	config/arc/ieee-754/truncdfsf2.S, config/arc/ieee-754/uneqdf2.S,
	config/arc/ieee-754/uneqsf2.S, config/arc/initfini.c,
	config/arc/lib1funcs.S, config/arc/t-arc, config/arc/t-arc-newlib,
	config/cris/umulsidi3.S, config/msp430/cmpsi2.S,
	config/msp430/epilogue.S, config/msp430/lib2bitcountHI.c,
	config/msp430/lib2divHI.c, config/msp430/lib2divQI.c,
	config/msp430/lib2divSI.c, config/msp430/lib2mul.c,
	config/msp430/msp430-divmod.h, config/msp430/msp430-mul.h,
	config/msp430/slli.S, config/msp430/srai.S, config/msp430/srli.S,
	config/rl78/divmodhi.S, config/rl78/divmodqi.S, config/rl78/divmodsi.S,
	config/rl78/signbit.S, vtv_end.c, vtv_end_preinit.c, vtv_start.c,
	vtv_start_preinit.c: Use the standard form for the copyright notice.

libgomp/
	* hashtab.h: Use the standard form for the copyright notice.

libstdc++-v3/
	* testsuite/18_support/new_handler.cc,
	testsuite/18_support/terminate_handler.cc,
	testsuite/18_support/unexpected_handler.cc: Use the standard form for
	the copyright notice.

From-SVN: r206288
2014-01-02 22:09:02 +00:00
Tobias Burnus 98db73df84 gnat_ugn.texi: Bump @copying's copyright year.
2014-01-02  Tobias Burnus  <burnus@net-b.de>

gcc/ada/
        * gnat_ugn.texi: Bump @copying's copyright year.

gcc/
        * gcc.c (process_command): Update copyright notice dates.
        * gcov-dump.c: Ditto.
        * gcov.c: Ditto.
        * doc/cpp.texi: Bump @copying's copyright year.
        * doc/cppinternals.texi: Ditto.
        * doc/gcc.texi: Ditto.
        * doc/gccint.texi: Ditto.
        * doc/gcov.texi: Ditto.
        * doc/install.texi: Ditto.
        * doc/invoke.texi: Ditto.

gcc/fortran/
        * gfortranspec.c (lang_specific_driver): Update copyright notice
        dates.
        * gfc-internals.texi: Bump @copying's copyright year.
        * gfortran.texi: Ditto.
        * intrinsic.texi: Ditto.
        * invoke.texi: Ditto.

gcc/go/
        * gcc/go/gccgo.texi: Ditto.

gcc/java/
        * jcf-dump.c (version): Update copyright notice dates.
        * gcj.texi: Bump @copying's copyright year.

libgomp/
        * libgomp.texi: Bump @copying's copyright year.

libitm/
        * libitm.texi: Bump @copying's copyright year.

libjava/
        * classpath/gnu/java/rmi/registry/RegistryImpl.java (version):
        * Update
        copyright notice dates.
        * classpath/tools/gnu/classpath/tools/orbd/Main.java (run):
        * Ditto.
        * gnu/gcj/convert/Convert.java (version): Update copyright
        * notice
        dates.
        * gnu/gcj/tools/gcj_dbtool/Main.java (main): Ditto.

libquadmath/
        * libquadmath.texi: Bump @copying's copyright year.

From-SVN: r206286
2014-01-02 22:25:41 +01:00
Andreas Tobler ae246f7f1d affinity-1.c: Remove alloca.h inlcude.
2013-12-17  Andreas Tobler  <andreast@gcc.gnu.org>

    * testsuite/libgomp.c/affinity-1.c: Remove alloca.h inlcude. Replace
    alloca () with __builtin_alloca ().
    * testsuite/libgomp.c/icv-2.c: Add FreeBSD coverage.
    * testsuite/libgomp.c/lock-3.c: Likewise.
    * testsuite/libgomp.c/pr48591.c: Likewise.

From-SVN: r206063
2013-12-17 19:05:32 +01:00
Jakub Jelinek fa00a5fe2a re PR testsuite/59534 (FAIL: libgomp.fortran/retval1.f90 execution test due to denormals)
PR testsuite/59534
	* testsuite/libgomp.fortran/retval1.f90 (e5): Avoid non-shortcircuited
	comparisons.

From-SVN: r206051
2013-12-17 16:17:00 +01:00
Jakub Jelinek e9792e1d9d re PR libgomp/58756 (FAIL: libgomp.c/pr58392.c execution test)
PR libgomp/58756
	* omp-low.c (lower_rec_input_clauses) <case OMP_CLAUSE_REDUCTION>: For
	reductions without placeholder if is_simd, but when not using
	GOMP_SIMD* internal calls, also perform the reduction operation
	on the outer var rather than simple assignment.

	* testsuite/libgomp.c/pr58756.c: New test.

From-SVN: r206011
2013-12-16 11:34:28 +01:00
Jakub Jelinek cab37c89d1 re PR libgomp/59467 (copyprivate in the fortran testsuite)
PR libgomp/59467
	* gimplify.c (omp_check_private): Add copyprivate argument, if it
	is true, don't check omp_privatize_by_reference.
	(gimplify_scan_omp_clauses): For OMP_CLAUSE_COPYPRIVATE verify
	decl is private in outer context.  Adjust omp_check_private caller.

	* gfortran.dg/gomp/pr59467.f90: New test.
	* c-c++-common/gomp/pr59467.c: New test.

	* testsuite/libgomp.fortran/crayptr2.f90: Add private (d) clause to
	!$omp parallel.

From-SVN: r205922
2013-12-12 09:52:06 +01:00
Thomas Schwinge 1707a5de88 libgomp: Prepare for testcases without -fopenmp.
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
2013-11-07 16:07:58 +01:00
Thomas Schwinge 70f05c4362 Add missing include.
libgomp/
	* libgomp_g.h: Include <stddef.h> for size_t.

From-SVN: r204518
2013-11-07 16:07:46 +01:00
Thomas Schwinge de14871c88 Generally link to libgomp for -ftree-parallelize-loops=*.
gcc/
	* config/arc/arc.h (LINK_COMMAND_SPEC): For
	-ftree-parallelize-loops=*, link to libgomp and its dependencies.
	* config/ia64/hpux.h (LIB_SPEC): Likewise.
	* config/pa/pa-hpux11.h (LIB_SPEC): Likewise.
	* config/pa/pa64-hpux.h (LIB_SPEC): Likewise.
	* gcc.c (GOMP_SELF_SPECS): Update comment about libgomp's
	dependencies.
	libgomp/
	* libgomp.spec.in: Update comment about libgomp's dependencies.
	* configure.ac: Likewise.
	* configure: Regenerate.

From-SVN: r204517
2013-11-07 16:07:34 +01:00
Tobias Burnus 83fd6c5b8c intrinsic.texi (OpenMP Modules): Update to OpenMPv4.
gcc/fortran/
2013-10-16  Tobias Burnus  <burnus@net-b.de>

        * intrinsic.texi (OpenMP Modules): Update to OpenMPv4.
        Document omp_proc_bind_kind.

libgomp/
2013-10-16  Tobias Burnus  <burnus@net-b.de>

        * libgomp.texi: (Runtime Library Routines): Update references
        * for
        OpenMP 4.0. Add omp_get_cancellation, omp_get_default_device,
        omp_get_num_devices, omp_get_num_teams, omp_get_proc_bind,
        omp_get_team_num, omp_is_initial_device, omp_set_default_device.
        (Environment Variables): Update references for OpenMP 4.0. Add
        OMP_CANCELLATION, OMP_DEFAULT_DEVICE, OMP_PLACES.
        Move OMP_DISPLAY_ENV and OMP_PROC_BIND up to be in alphabetical
        order.

From-SVN: r203635
2013-10-16 00:08:46 +02:00
Jakub Jelinek c86738810e env.c (parse_bind_var): Initialize value to avoid (false positive) warning.
* env.c (parse_bind_var): Initialize value to avoid
	(false positive) warning.

From-SVN: r203514
2013-10-14 10:26:18 +02:00
Jakub Jelinek f89163fd48 re PR libgomp/58691 (OpenMP 4: Surprising results with OMP_PLACES=)
PR libgomp/58691
	* config/linux/proc.c (gomp_cpuset_popcount): Add unused attribute
	to check variable.
	(gomp_init_num_threads): Move i variable declaration into
	#ifdef CPU_ALLOC_SIZE block.
	* config/linux/affinity.c (gomp_affinity_init_level): Test
	gomp_places_list_len == 0 rather than gomp_places_list == 0
	when checking for topology reading error.
	* team.c (gomp_team_start): Don't handle bind == omp_proc_bind_false.
	* env.c (parse_affinity): Add ignore argument, if true, don't populate
	gomp_places_list, only parse env var and always return false.
	(parse_places_var): Likewise.  Don't check gomp_global_icv.bind_var.
	(initialize_env): Always parse OMP_PLACES and GOMP_CPU_AFFINITY env
	vars, default to OMP_PROC_BIND=true if OMP_PROC_BIND wasn't specified
	and either of these variables were parsed correctly into a places
	list.

From-SVN: r203479
2013-10-12 09:52:15 +02:00
Thomas Schwinge 1d3406389c force-parallel-1.c: Expect 4 instead of 5 loopfn matches.
libgomp/
	* testsuite/libgomp.graphite/force-parallel-1.c: Expect 4 instead
	of 5 loopfn matches.
	* testsuite/libgomp.graphite/force-parallel-2.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-3.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-4.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-6.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-9.c: Likewise.

As changed in gomp-4_0-branch, r203282.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r203424
2013-10-11 12:43:59 +02:00
Thomas Schwinge bd87f7313c Makefile.am (omp_lib.mod): Streamline rule.
libgomp/
	* Makefile.am (omp_lib.mod): Streamline rule.

From-SVN: r203423
2013-10-11 12:43:48 +02:00
Thomas Schwinge f5745bedf7 libgomp.texi (Runtime Library Routines): C linkage, don't throw exceptions.
libgomp/
	* libgomp.texi (Runtime Library Routines): C linkage, don't throw
	exceptions.

From-SVN: r203421
2013-10-11 12:43:26 +02:00
Thomas Schwinge b5512c66a7 lib-1.c (main): Add missing error check.
libgomp/
	* testsuite/libgomp.c/lib-1.c (main): Add missing error check.
	* testsuite/libgomp.fortran/lib1.f90: Likewise.
	* testsuite/libgomp.fortran/lib2.f: Likewise.
	* testsuite/libgomp.fortran/lib3.f: Likewise.

From-SVN: r203420
2013-10-11 12:43:15 +02:00
Thomas Schwinge 451c19c488 configure.ac: Typo fix.
libgomp/
	* configure.ac: Typo fix.

From-SVN: r203418
2013-10-11 12:42:53 +02:00
Thomas Schwinge 86a6016dcc _OPENMP pre-processor checks, openmp_version Fortran instrinsic checks.
gcc/testsuite/
	* c-c++-common/cpp/openmp-define-1.c: New file.
	* c-c++-common/cpp/openmp-define-2.c: Likewise.
	* c-c++-common/cpp/openmp-define-3.c: Likewise.
	* gfortran.dg/openmp-define-1.f90: Likewise.
	* gfortran.dg/openmp-define-2.f90: Likewise.
	* gfortran.dg/openmp-define-3.f90: Likewise.
	libgomp/
	* testsuite/libgomp.fortran/openmp_version-1.f: New file.
	* testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.

From-SVN: r203417
2013-10-11 12:42:42 +02:00
Thomas Schwinge 71a81c218e omp.h.in: Don't touch the user's namespace.
libgomp/
	* omp.h.in: Don't touch the user's namespace.

From-SVN: r203411
2013-10-11 12:41:34 +02:00
Jakub Jelinek acf0174b6f target.c: New file.
libgomp/
	* target.c: New file.
	* Makefile.am (libgomp_la_SOURCES): Add target.c.
	* Makefile.in: Regenerated.
	* libgomp_g.h (GOMP_task): Add depend argument.
	(GOMP_barrier_cancel, GOMP_loop_end_cancel,
	GOMP_sections_end_cancel, GOMP_target, GOMP_target_data,
	GOMP_target_end_data, GOMP_target_update, GOMP_teams,
	GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
	GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
	GOMP_parallel, GOMP_cancel, GOMP_cancellation_point,
	GOMP_taskgroup_start, GOMP_taskgroup_end,
	GOMP_parallel_sections): New prototypes.
	* fortran.c (omp_is_initial_device): Add ialias_redirect.
	(omp_is_initial_device_): New function.
	(ULP, STR1, STR2, ialias_redirect): Removed.
	(omp_get_cancellation_, omp_get_proc_bind_, omp_set_default_device_,
	omp_set_default_device_8_, omp_get_default_device_,
	omp_get_num_devices_, omp_get_num_teams_, omp_get_team_num_): New
	functions.
	* libgomp.map (GOMP_barrier_cancel, GOMP_loop_end_cancel,
	GOMP_sections_end_cancel, GOMP_target, GOMP_target_data,
	GOMP_target_end_data, GOMP_target_update, GOMP_teams): Export
	@@GOMP_4.0.
	(omp_is_initial_device, omp_is_initial_device_, omp_get_cancellation,
	omp_get_cancellation_, omp_get_proc_bind, omp_get_proc_bind_,
	omp_set_default_device, omp_set_default_device_,
	omp_set_default_device_8_, omp_get_default_device,
	omp_get_default_device_, omp_get_num_devices, omp_get_num_devices_,
	omp_get_num_teams, omp_get_num_teams_, omp_get_team_num,
	omp_get_team_num_): Export @@OMP_4.0.
	* team.c (struct gomp_thread_start_data): Add place field.
	(gomp_thread_start): Clear thr->thread_pool and
	thr->task before returning.  Use gomp_team_barrier_wait_final
	instead of gomp_team_barrier_wait.  Initialize thr->place.
	(gomp_new_team): Initialize work_shares_to_free, work_share_cancelled,
	team_cancelled and task_queued_count fields.
	(gomp_free_pool_helper): Clear thr->thread_pool and thr->task
	before calling pthread_exit.
	(gomp_free_thread): No longer static.  Use
	gomp_managed_threads_lock instead of gomp_remaining_threads_lock.
	(gomp_team_start): Add flags argument.  Set
	thr->thread_pool->threads_busy to nthreads immediately after creating
	new pool.  Use gomp_managed_threads_lock instead of
	gomp_remaining_threads_lock.  Handle OpenMP 4.0 affinity.
	(gomp_team_end): Use gomp_managed_threads_lock instead of
	gomp_remaining_threads_lock.  Use gomp_team_barrier_wait_final instead
	of gomp_team_barrier_wait.  If team->team_cancelled, call
	gomp_fini_worshare on ws chain starting at team->work_shares_to_free
	rather than thr->ts.work_share.
	(initialize_team): Don't call gomp_sem_init here.
	* sections.c (GOMP_parallel_sections_start): Adjust gomp_team_start
	caller.
	(GOMP_parallel_sections, GOMP_sections_end_cancel): New functions.
	* env.c (gomp_global_icv): Add default_device_var, target_data and
	bind_var initializers.
	(gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
	(gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
	gomp_places_list_len): New variables.
	(parse_bind_var, parse_one_place, parse_places_var): New functions.
	(parse_affinity): Rewritten to construct OMP_PLACES list with unit
	sized places.
	(gomp_cancel_var): New global variable.
	(parse_int): New function.
	(handle_omp_display_env): New function.
	(initialize_env): Use it.  Initialize default_device_var.
	Parse OMP_CANCELLATION env var.  Use parse_bind_var to parse
	OMP_PROC_BIND instead of parse_boolean.  Use parse_places_var for
	OMP_PLACES parsing.  Don't call parse_affinity if OMP_PLACES has
	been successfully parsed (and call gomp_init_affinity in that case).
	(omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
	omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
	omp_get_team_num, omp_is_initial_device): New functions.
	* libgomp.h: Include stdlib.h.
	(ialias_ulp, ialias_str1, ialias_str2, ialias_redirect, ialias_call):
	Define.
	(struct target_mem_desc): Forward declare.
	(struct gomp_task_icv): Add default_device_var, target_data, bind_var
	and thread_limit_var fields.
	(gomp_get_num_devices): New prototype.
	(gomp_cancel_var): New extern decl.
	(struct gomp_team): Add work_shares_to_free, work_share_cancelled,
	team_cancelled and task_queued_count fields.  Add comments about
	task_{,queued_,running_}count.
	(gomp_cancel_kind): New enum.
	(gomp_work_share_end_cancel): New prototype.
	(struct gomp_task): Add next_taskgroup, prev_taskgroup, taskgroup,
	copy_ctors_done, dependers, depend_hash, depend_count, num_dependees
	and depend fields.
	(struct gomp_taskgroup): New type.
	(struct gomp_task_depend_entry,
	struct gomp_dependers_vec): New types.
	(gomp_finish_task): Free depend_hash if non-NULL.
	(struct gomp_team_state): Add place_partition_off
	and place_partition_len fields.
	(gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
	gomp_places_list_len): New extern decls.
	(struct gomp_thread): Add place field.
	(gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
	(gomp_init_thread_affinity): Add place argument.
	(gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
	gomp_affinity_remove_cpu, gomp_affinity_copy_place,
	gomp_affinity_same_place, gomp_affinity_finalize_place_list,
	gomp_affinity_init_level, gomp_affinity_print_place): New
	prototypes.
	(gomp_team_start): Add flags argument.
	(gomp_thread_limit_var, gomp_remaining_threads_count,
	gomp_remaining_threads_lock): Remove.
	(gomp_managed_threads_lock): New variable.
	(struct gomp_thread_pool): Add threads_busy field.
	(gomp_free_thread): New prototype.
	* task.c: Include hashtab.h.
	(hash_entry_type): New typedef.
	(htab_alloc, htab_free, htab_hash, htab_eq): New inlines.
	(gomp_init_task): Clear dependers, depend_hash, depend_count,
	copy_ctors_done and taskgroup fields.
	(GOMP_task): Add depend argument, handle depend clauses.  If
	gomp_team_barrier_cancelled or if it's taskgroup has been
	cancelled, don't queue or start new tasks.  Set copy_ctors_done
	field if needed.  Initialize taskgroup field.  If copy_ctors_done
	and already cancelled, don't discard the task.  If taskgroup is
	non-NULL, enqueue the task into taskgroup queue.  Increment
	num_children field in taskgroup.  Increment task_queued_count.
	(gomp_task_run_pre, gomp_task_run_post_remove_parent,
	gomp_task_run_post_remove_taskgroup): New inline functions.
	(gomp_task_run_post_handle_depend_hash,
	gomp_task_run_post_handle_dependers,
	gomp_task_run_post_handle_depend): New functions.
	(GOMP_taskwait): Use them.  If more than one new tasks
	have been queued, wake other threads if needed.
	(gomp_barrier_handle_tasks): Likewise.  If
	gomp_team_barrier_cancelled, don't start any new tasks, just free
	all tasks.
	(GOMP_taskgroup_start, GOMP_taskgroup_end): New functions.
	* omp_lib.f90.in
	(omp_proc_bind_kind, omp_proc_bind_false,
	omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
	omp_proc_bind_spread): New params.
	(omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
	omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
	omp_get_team_num, omp_is_initial_device): New interfaces.
	(omp_get_dynamic, omp_get_nested, omp_in_parallel,
	omp_get_max_threads, omp_get_num_procs, omp_get_num_threads,
	omp_get_thread_num, 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_in_final): Remove
	useless use omp_lib_kinds.
	* omp.h.in (omp_proc_bind_t): New typedef.
	(omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
	omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
	omp_get_team_num, omp_is_initial_device): New prototypes.
	* loop.c (gomp_parallel_loop_start): Add flags argument, pass it
	through to gomp_team_start.
	(GOMP_parallel_loop_static_start, GOMP_parallel_loop_dynamic_start,
	GOMP_parallel_loop_guided_start, GOMP_parallel_loop_runtime_start):
	Adjust gomp_parallel_loop_start callers.
	(GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
	GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
	GOMP_loop_end_cancel): New functions.
	(GOMP_parallel_end): Add ialias_redirect.
	* hashtab.h: New file.
	* libgomp.texi (Environment Variables): Minor cleanup,
	update section refs to OpenMP 4.0rc2.
	(OMP_DISPLAY_ENV, GOMP_SPINCOUNT): Document these
	environment variables.
	* work.c (gomp_work_share_end, gomp_work_share_end_nowait): Set
	team->work_shares_to_free to thr->ts.work_share before calling
	free_work_share.
	(gomp_work_share_end_cancel): New function.
	* config/linux/proc.c: Include errno.h.
	(gomp_get_cpuset_size, gomp_cpuset_size, gomp_cpusetp): New variables.
	(gomp_cpuset_popcount): Add cpusetsize argument, use it instead of
	sizeof (cpu_set_t) to determine number of iterations.  Fix up check
	extern decl.  Use CPU_COUNT_S if available, or CPU_COUNT if
	gomp_cpuset_size is sizeof (cpu_set_t).
	(gomp_init_num_threads): Initialize gomp_cpuset_size,
	gomp_get_cpuset_size and gomp_cpusetp here, use gomp_cpusetp instead
	of &cpuset and pass gomp_cpuset_size instead of sizeof (cpu_set_t)
	to pthread_getaffinity_np.  Free and clear gomp_cpusetp if it didn't
	contain any logical CPUs.
	(get_num_procs): Don't call pthread_getaffinity_np if gomp_cpusetp
	is NULL.  Use gomp_cpusetp instead of &cpuset and pass
	gomp_get_cpuset_size instead of sizeof (cpu_set_t) to
	pthread_getaffinity_np.  Check gomp_places_list instead of
	gomp_cpu_affinity.  Adjust gomp_cpuset_popcount caller.
	* config/linux/bar.c (gomp_barrier_wait_end,
	gomp_barrier_wait_last): Use BAR_* defines.
	(gomp_team_barrier_wait_end): Likewise.  Clear BAR_CANCELLED
	from state where needed.  Set work_share_cancelled to 0 on last
	thread.
	(gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel_end,
	gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New
	functions.
	* config/linux/proc.h (gomp_cpuset_popcount): Add attribute_hidden.
	Add cpusetsize argument.
	(gomp_cpuset_size, gomp_cpusetp): Declare.
	* config/linux/affinity.c: Include errno.h, stdio.h and string.h.
	(affinity_counter): Remove.
	(CPU_ISSET_S, CPU_ZERO_S, CPU_SET_S, CPU_CLR_S): Define
	if CPU_ALLOC_SIZE isn't defined.
	(gomp_init_affinity): Rewritten, if gomp_places_list is NULL, try
	silently create OMP_PLACES=threads, if it is non-NULL afterwards,
	bind current thread to the first place.
	(gomp_init_thread_affinity): Rewritten.  Add place argument, just
	pthread_setaffinity_np to gomp_places_list[place].
	(gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
	gomp_affinity_remove_cpu, gomp_affinity_copy_place,
	gomp_affinity_same_place, gomp_affinity_finalize_place_list,
	gomp_affinity_init_level, gomp_affinity_print_place): New functions.
	* config/linux/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
	BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define.
	(gomp_barrier_t): Add awaited_final field.
	(gomp_barrier_init): Initialize awaited_final field.
	(gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel,
	gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New
	prototypes.
	(gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.  Use BAR_*
	defines.
	(gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final_start,
	gomp_team_barrier_cancelled): New inline functions.
	(gomp_barrier_last_thread,
	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): Use BAR_* defines.
	* config/posix/bar.c (gomp_barrier_init): Clear cancellable field.
	(gomp_barrier_wait_end): Use BAR_* defines.
	(gomp_team_barrier_wait_end): Clear BAR_CANCELLED from state.
	Set work_share_cancelled to 0 on last thread, use __atomic_load_n.
	Use BAR_* defines.
	(gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel,
	gomp_team_barrier_cancel): New functions.
	* config/posix/affinity.c (gomp_init_thread_affinity): Add place
	argument.
	(gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
	gomp_affinity_remove_cpu, gomp_affinity_copy_place,
	gomp_affinity_same_place, gomp_affinity_finalize_place_list,
	gomp_affinity_init_level, gomp_affinity_print_place): New stubs.
	* config/posix/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
	BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define.
	(gomp_barrier_t): Add cancellable field.
	(gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end,
	gomp_team_barrier_cancel): New prototypes.
	(gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.
	(gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final,
	gomp_team_barrier_cancelled): New inline functions.
	(gomp_barrier_wait_start, gomp_barrier_last_thread,
	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): Use BAR_* defines.
	* barrier.c (GOMP_barrier_cancel): New function.
	* omp_lib.h.in (omp_proc_bind_kind, omp_proc_bind_false,
	omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
	omp_proc_bind_spread): New params.
	(omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
	omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
	omp_get_team_num, omp_is_initial_device): New externals.
	* parallel.c (GOMP_parallel, GOMP_cancel, GOMP_cancellation_point):
	New functions.
	(gomp_resolve_num_threads): Adjust for thread_limit now being in
	icv->thread_limit_var.  Use UINT_MAX instead of ULONG_MAX as
	infinity.  If not nested, just return minimum of max_num_threads
	and icv->thread_limit_var and if thr->thread_pool, set threads_busy
	to the returned value.  Otherwise, don't update atomically
	gomp_remaining_threads_count, but instead thr->thread_pool->threads_busy.
	(GOMP_parallel_end): Adjust for thread_limit now being in
	icv->thread_limit_var.  Use UINT_MAX instead of ULONG_MAX as
	infinity.  Adjust threads_busy in the pool rather than
	gomp_remaining_threads_count.  Remember team->nthreads and call
	gomp_team_end before adjusting threads_busy, if not nested
	afterwards, just set it to 1 non-atomically.  Add ialias.
	(GOMP_parallel_start): Adjust gomp_team_start caller.
	* testsuite/libgomp.c/atomic-14.c: Add parens to make it valid.
	* testsuite/libgomp.c/affinity-1.c: New test.
	* testsuite/libgomp.c/atomic-15.c: New test.
	* testsuite/libgomp.c/atomic-16.c: New test.
	* testsuite/libgomp.c/atomic-17.c: New test.
	* testsuite/libgomp.c/cancel-for-1.c: New test.
	* testsuite/libgomp.c/cancel-for-2.c: New test.
	* testsuite/libgomp.c/cancel-parallel-1.c: New test.
	* testsuite/libgomp.c/cancel-parallel-2.c: New test.
	* testsuite/libgomp.c/cancel-parallel-3.c: New test.
	* testsuite/libgomp.c/cancel-sections-1.c: New test.
	* testsuite/libgomp.c/cancel-taskgroup-1.c: New test.
	* testsuite/libgomp.c/cancel-taskgroup-2.c: New test.
	* testsuite/libgomp.c/depend-1.c: New test.
	* testsuite/libgomp.c/depend-2.c: New test.
	* testsuite/libgomp.c/depend-3.c: New test.
	* testsuite/libgomp.c/depend-4.c: New test.
	* testsuite/libgomp.c/for-1.c: New test.
	* testsuite/libgomp.c/for-1.h: New file.
	* testsuite/libgomp.c/for-2.c: New test.
	* testsuite/libgomp.c/for-2.h: New file.
	* testsuite/libgomp.c/for-3.c: New test.
	* testsuite/libgomp.c/pr58392.c: New test.
	* testsuite/libgomp.c/simd-1.c: New test.
	* testsuite/libgomp.c/simd-2.c: New test.
	* testsuite/libgomp.c/simd-3.c: New test.
	* testsuite/libgomp.c/simd-4.c: New test.
	* testsuite/libgomp.c/simd-5.c: New test.
	* testsuite/libgomp.c/simd-6.c: New test.
	* testsuite/libgomp.c/target-1.c: New test.
	* testsuite/libgomp.c/target-2.c: New test.
	* testsuite/libgomp.c/target-3.c: New test.
	* testsuite/libgomp.c/target-4.c: New test.
	* testsuite/libgomp.c/target-5.c: New test.
	* testsuite/libgomp.c/target-6.c: New test.
	* testsuite/libgomp.c/target-7.c: New test.
	* testsuite/libgomp.c/taskgroup-1.c: New test.
	* testsuite/libgomp.c/thread-limit-1.c: New test.
	* testsuite/libgomp.c/thread-limit-2.c: New test.
	* testsuite/libgomp.c/thread-limit-3.c: New test.
	* testsuite/libgomp.c/udr-1.c: New test.
	* testsuite/libgomp.c/udr-2.c: New test.
	* testsuite/libgomp.c/udr-3.c: New test.
	* testsuite/libgomp.c++/affinity-1.C: New test.
	* testsuite/libgomp.c++/atomic-10.C: New test.
	* testsuite/libgomp.c++/atomic-11.C: New test.
	* testsuite/libgomp.c++/atomic-12.C: New test.
	* testsuite/libgomp.c++/atomic-13.C: New test.
	* testsuite/libgomp.c++/atomic-14.C: New test.
	* testsuite/libgomp.c++/atomic-15.C: New test.
	* testsuite/libgomp.c++/cancel-for-1.C: New test.
	* testsuite/libgomp.c++/cancel-for-2.C: New test.
	* testsuite/libgomp.c++/cancel-parallel-1.C: New test.
	* testsuite/libgomp.c++/cancel-parallel-2.C: New test.
	* testsuite/libgomp.c++/cancel-parallel-3.C: New test.
	* testsuite/libgomp.c++/cancel-sections-1.C: New test.
	* testsuite/libgomp.c++/cancel-taskgroup-1.C: New test.
	* testsuite/libgomp.c++/cancel-taskgroup-2.C: New test.
	* testsuite/libgomp.c++/cancel-taskgroup-3.C: New test.
	* testsuite/libgomp.c++/cancel-test.h: New file.
	* testsuite/libgomp.c++/for-9.C: New test.
	* testsuite/libgomp.c++/for-10.C: New test.
	* testsuite/libgomp.c++/for-11.C: New test.
	* testsuite/libgomp.c++/simd-1.C: New test.
	* testsuite/libgomp.c++/simd-2.C: New test.
	* testsuite/libgomp.c++/simd-3.C: New test.
	* testsuite/libgomp.c++/simd-4.C: New test.
	* testsuite/libgomp.c++/simd-5.C: New test.
	* testsuite/libgomp.c++/simd-6.C: New test.
	* testsuite/libgomp.c++/simd-7.C: New test.
	* testsuite/libgomp.c++/simd-8.C: New test.
	* testsuite/libgomp.c++/target-1.C: New test.
	* testsuite/libgomp.c++/target-2.C: New test.
	* testsuite/libgomp.c++/target-2-aux.cc: New file.
	* testsuite/libgomp.c++/target-3.C: New test.
	* testsuite/libgomp.c++/taskgroup-1.C: New test.
	* testsuite/libgomp.c++/udr-1.C: New test.
	* testsuite/libgomp.c++/udr-2.C: New test.
	* testsuite/libgomp.c++/udr-3.C: New test.
	* testsuite/libgomp.c++/udr-4.C: New test.
	* testsuite/libgomp.c++/udr-5.C: New test.
	* testsuite/libgomp.c++/udr-6.C: New test.
	* testsuite/libgomp.c++/udr-7.C: New test.
	* testsuite/libgomp.c++/udr-8.C: New test.
	* testsuite/libgomp.c++/udr-9.C: New test.
gcc/
	* tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__LOOPTEMP_
	and new OpenMP 4.0 clauses, handle UDR OMP_CLAUSE_REDUCTION,
	formatting fixes, use pp_colon instead of pp_character (..., ':'),
	similarly pp_right_paren.
	(dump_generic_node): Handle OMP_DISTRIBUTE, OMP_TEAMS,
	OMP_TARGET_DATA, OMP_TARGET, OMP_TARGET_UPDATE, OMP_TASKGROUP,
	allow OMP_FOR_INIT to be NULL, handle OMP_ATOMIC_SEQ_CST.
	* tree.c (omp_clause_num_ops, omp_clause_code_name): Add OpenMP 4.0
	clauses.
	(omp_declare_simd_clauses_equal,
	omp_remove_redundant_declare_simd_attrs): New functions.
	(attribute_value_equal): Use omp_declare_simd_clauses_equal.
	(walk_tree_1): Handle new OpenMP 4.0 clauses.
	* tree.h (OMP_LOOP_CHECK): Define.
	(OMP_FOR_BODY, OMP_FOR_CLAUSES, OMP_FOR_INIT, OMP_FOR_COND,
	OMP_FOR_INCR, OMP_FOR_PRE_BODY): Use it.
	(OMP_TASKGROUP_BODY, OMP_TEAMS_BODY, OMP_TEAMS_CLAUSES,
	OMP_TARGET_DATA_BODY, OMP_TARGET_DATA_CLAUSES, OMP_TARGET_BODY,
	OMP_TARGET_CLAUSES, OMP_TARGET_UPDATE_CLAUSES, OMP_CLAUSE_SIZE,
	OMP_ATOMIC_SEQ_CST, OMP_CLAUSE_DEPEND_KIND, OMP_CLAUSE_MAP_KIND,
	OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION, OMP_CLAUSE_PROC_BIND_KIND,
	OMP_CLAUSE_REDUCTION_OMP_ORIG_REF, OMP_CLAUSE_ALIGNED_ALIGNMENT,
	OMP_CLAUSE_NUM_TEAMS_EXPR, OMP_CLAUSE_THREAD_LIMIT_EXPR,
	OMP_CLAUSE_DEVICE_ID, OMP_CLAUSE_DIST_SCHEDULE_CHUNK_EXPR,
	OMP_CLAUSE_SIMDLEN_EXPR): Define.
	(OMP_CLAUSE_DECL): Change range up to OMP_CLAUSE__LOOPTEMP_.
	(omp_remove_redundant_declare_simd_attrs): New prototype.
	* gimple.def (GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET,
	GIMPLE_OMP_TEAMS): New codes.
	(GIMPLE_OMP_RETURN): Use GSS_OMP_ATOMIC_STORE instead of GSS_BASE.
	* omp-low.c (struct omp_context): Add cancel_label and cancellable
	fields.
	(target_nesting_level): New variable.
	(extract_omp_for_data): Handle GF_OMP_FOR_KIND_DISTRIBUTE and
	OMP_CLAUSE_DIST_SCHEDULE.  Don't fallback to library implementation
	for collapse > 1 static schedule unless ordered.
	(get_ws_args_for): Add par_stmt argument.  Handle combined loops.
	(determine_parallel_type): Adjust get_ws_args_for caller.
	(install_var_field): Handle mask & 4 for double indirection.
	(scan_sharing_clauses): Ignore shared clause on teams construct.
	Handle OMP_CLAUSE__LOOPTEMP_ and new OpenMP 4.0 clauses.
	(create_omp_child_function): If inside target or declare target
	constructs, set "omp declare target" attribute on the child
	function.
	(find_combined_for): New function.
	(scan_omp_parallel): Handle combined loops.
	(scan_omp_target, scan_omp_teams): New functions.
	(check_omp_nesting_restrictions): Check new OpenMP 4.0 nesting
	restrictions and set ctx->cancellable for cancellable constructs.
	(scan_omp_1_stmt): Call check_omp_nesting_restrictions also on
	selected builtin calls.  Handle GIMPLE_OMP_TASKGROUP,
	GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS.
	(build_omp_barrier): Add lhs argument, return gimple rather than
	tree.
	(omp_clause_aligned_alignment): New function.
	(lower_rec_simd_input_clauses): Only call SET_DECL_VALUE_EXPR
	on decls.
	(lower_rec_input_clauses): Add FD argument.  Ignore shared clauses
	on teams constructs.  Handle user defined reductions and new
	OpenMP 4.0 clauses.
	(lower_reduction_clauses): Don't set placeholder to address of ref
	if it has already the right type.
	(lower_send_clauses): Handle OMP_CLAUSE__LOOPTEMP_.
	(expand_parallel_call): Use the new non-_start suffixed builtins,
	handle OMP_CLAUSE_PROC_BIND, don't call the outlined function
	and GOMP_parallel_end after the call.
	(expand_task_call): Handle OMP_CLAUSE_DEPEND.
	(expand_omp_for_init_counts): Handle combined loops.
	(expand_omp_for_init_vars): Add inner_stmt argument, handle combined
	loops.
	(expand_omp_for_generic): Likewise.  Use GOMP_loop_end_cancel at the
	end of cancellable loops.
	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk):
	Likewise.  Handle collapse > 1 loops.
	(expand_omp_simd): Handle combined loops.
	(expand_omp_for): Add inner_stmt argument, adjust callers of
	expand_omp_for* functions, use expand_omp_for_static*chunk even
	for collapse > 1 unless ordered.
	(expand_omp_sections): Use GOMP_sections_end_cancel at the end
	of cancellable sections.
	(expand_omp_single): Remove need_barrier variable, just rely on
	gimple_omp_return_nowait_p.  Adjust build_omp_barrier caller.
	(expand_omp_synch): Allow GIMPLE_OMP_TASKGROUP and GIMPLE_OMP_TEAMS.
	(expand_omp_atomic_load, expand_omp_atomic_store,
	expand_omp_atomic_fetch_op): Handle gimple_omp_atomic_seq_cst_p.
	(expand_omp_target): New function.
	(expand_omp): Handle combined loops.  Handle GIMPLE_OMP_TASKGROUP,
	GIMPLE_OMP_TEAMS, GIMPLE_OMP_TARGET.
	(build_omp_regions_1): Immediately close region for
	GF_OMP_TARGET_KIND_UPDATE.
	(maybe_add_implicit_barrier_cancel): New function.
	(lower_omp_sections): Adjust lower_rec_input_clauses caller.  Handle
	cancellation.
	(lower_omp_single): Likewise.  Add clobber after the barrier.
	(lower_omp_taskgroup): New function.
	(lower_omp_for): Handle combined loops.  Adjust
	lower_rec_input_clauses caller.  Handle cancellation.
	(lower_depend_clauses): New function.
	(lower_omp_taskreg): Lower depend clauses.  Adjust
	lower_rec_input_clauses caller.  Add clobber after the call.  Handle
	cancellation.
	(lower_omp_target, lower_omp_teams): New functions.
	(lower_omp_1): Handle cancellation.  Handle GIMPLE_OMP_TASKGROUP,
	GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GOMP_barrier, GOMP_cancel
	and GOMP_cancellation_point calls.
	(lower_omp): Fold stmts inside of target region.
	(diagnose_sb_1, diagnose_sb_2): Handle GIMPLE_OMP_TASKGROUP,
	GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
	* builtin-types.def (DEF_FUNCTION_TYPE_8): Document.
	(BT_FN_VOID_OMPFN_PTR_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG,
	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove.
	(BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT,
	BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL, BT_FN_VOID_UINT_UINT,
	BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR,
	BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR,
	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New.
	* tree-ssa-alias.c (ref_maybe_used_by_call_p_1,
	call_may_clobber_ref_p_1): Handle BUILT_IN_GOMP_BARRIER_CANCEL,
	BUILT_IN_GOMP_TASKGROUP_END, BUILT_IN_GOMP_LOOP_END_CANCEL,
	BUILT_IN_GOMP_SECTIONS_END_CANCEL.  Don't handle
	BUILT_IN_GOMP_PARALLEL_END.
	* gimple-low.c (lower_stmt): Handle GIMPLE_OMP_TASKGROUP,
	GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
	* gimple-pretty-print.c (dump_gimple_omp_for): Handle
	GF_OMP_FOR_KIND_DISTRIBUTE.
	(dump_gimple_omp_target, dump_gimple_omp_teams): New functions.
	(dump_gimple_omp_block): Handle GIMPLE_OMP_TASKGROUP.
	(dump_gimple_omp_return): Print lhs if it has any.
	(dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Handle
	gimple_omp_atomic_seq_cst_p.
	(pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET
	and GIMPLE_OMP_TEAMS.
	* langhooks.c (lhd_omp_mappable_type): New function.
	* tree-vectorizer.c (struct simd_array_to_simduid): Fix up comment.
	* langhooks.h (struct lang_hooks_for_types): Add omp_mappable_type
	hook.
	* gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP,
	GOVD_ALIGNED and GOVD_MAP_TO_ONLY.
	(enum omp_region_type): Add ORT_TEAMS, ORT_TARGET_DATA and
	ORT_TARGET.
	(struct gimplify_omp_ctx): Add combined_loop field.
	(gimplify_call_expr, gimplify_modify_expr): Don't call fold_stmt
	on stmts inside of target region.
	(is_gimple_stmt): Return true for OMP_DISTRIBUTE and OMP_TASKGROUP.
	(omp_firstprivatize_variable): Handle GOVD_MAP, GOVD_ALIGNED,
	ORT_TARGET and ORT_TARGET_DATA.
	(omp_add_variable): Avoid checks on readding var for GOVD_ALIGNED.
	Handle GOVD_MAP.
	(omp_notice_threadprivate_variable): Complain about threadprivate
	variables in target region.
	(omp_notice_variable): Complain about vars with non-mappable type
	in target region.  Handle ORT_TEAMS, ORT_TARGET and ORT_TARGET_DATA.
	(omp_check_private): Ignore ORT_TARGET* regions.
	(gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses_1,
	gimplify_adjust_omp_clauses): Handle new OpenMP 4.0 clauses.
	(find_combined_omp_for): New function.
	(gimplify_omp_for): Handle gimplification of combined loops.
	(gimplify_omp_workshare): Gimplify also OMP_TARGET, OMP_TARGET_DATA,
	OMP_TEAMS.
	(gimplify_omp_target_update): New function.
	(gimplify_omp_atomic): Handle OMP_ATOMIC_SEQ_CST.
	(gimplify_expr): Handle OMP_DISTRIBUTE, OMP_TARGET, OMP_TARGET_DATA,
	OMP_TARGET_UPDATE, OMP_TEAMS, OMP_TASKGROUP.
	(gimplify_body): If fndecl has "omp declare target" attribute, add
	implicit ORT_TARGET context around it.
	* tree.def (OMP_DISTRIBUTE, OMP_TEAMS, OMP_TARGET_DATA, OMP_TARGET,
	OMP_TASKGROUP, OMP_TARGET_UPDATE): New tree codes.
	* tree-nested.c (convert_nonlocal_reference_stmt,
	convert_local_reference_stmt, convert_gimple_call): Handle
	GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP.
	* omp-builtins.def (BUILT_IN_GOMP_TASK): Use
	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR
	instead of BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT.
	(BUILT_IN_GOMP_TARGET, BUILT_IN_GOMP_TARGET_DATA,
	BUILT_IN_GOMP_TARGET_END_DATA, BUILT_IN_GOMP_TARGET_UPDATE,
	BUILT_IN_GOMP_TEAMS, BUILT_IN_BARRIER_CANCEL,
	BUILT_IN_GOMP_LOOP_END_CANCEL,
	BUILT_IN_GOMP_SECTIONS_END_CANCEL, BUILT_IN_OMP_GET_TEAM_NUM,
	BUILT_IN_OMP_GET_NUM_TEAMS, BUILT_IN_GOMP_TASKGROUP_START,
	BUILT_IN_GOMP_TASKGROUP_END, BUILT_IN_GOMP_PARALLEL_LOOP_STATIC,
	BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC,
	BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED,
	BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME, BUILT_IN_GOMP_PARALLEL,
	BUILT_IN_GOMP_PARALLEL_SECTIONS, BUILT_IN_GOMP_CANCEL,
	BUILT_IN_GOMP_CANCELLATION_POINT): New built-ins.
	(BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START,
	BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START,
	BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START,
	BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START,
	BUILT_IN_GOMP_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END,
	BUILT_IN_GOMP_PARALLEL_SECTIONS_START): Remove.
	* tree-inline.c (remap_gimple_stmt, estimate_num_insns):
	Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP.
	* gimple.c (gimple_build_omp_taskgroup, gimple_build_omp_target,
	gimple_build_omp_teams): New functions.
	(walk_gimple_op): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and
	GIMPLE_OMP_TASKGROUP.  Walk optional lhs on GIMPLE_OMP_RETURN.
	(walk_gimple_stmt, gimple_copy): Handle GIMPLE_OMP_TARGET,
	GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP.
	* gimple.h (enum gf_mask): GF_OMP_FOR_KIND_DISTRIBUTE,
	GF_OMP_FOR_COMBINED, GF_OMP_FOR_COMBINED_INTO,
	GF_OMP_TARGET_KIND_MASK, GF_OMP_TARGET_KIND_REGION,
	GF_OMP_TARGET_KIND_DATA, GF_OMP_TARGET_KIND_UPDATE,
	GF_OMP_ATOMIC_SEQ_CST): New.
	(gimple_build_omp_taskgroup, gimple_build_omp_target,
	gimple_build_omp_teams): New prototypes.
	(gimple_has_substatements): Handle GIMPLE_OMP_TARGET,
	GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP.
	(gimple_omp_subcode): Use GIMPLE_OMP_TEAMS instead of
	GIMPLE_OMP_SINGLE as end of range.
	(gimple_omp_return_set_lhs, gimple_omp_return_lhs,
	gimple_omp_return_lhs_ptr, gimple_omp_atomic_seq_cst_p,
	gimple_omp_atomic_set_seq_cst, gimple_omp_for_combined_p,
	gimple_omp_for_set_combined_p, gimple_omp_for_combined_into_p,
	gimple_omp_for_set_combined_into_p, gimple_omp_target_clauses,
	gimple_omp_target_clauses_ptr, gimple_omp_target_set_clauses,
	gimple_omp_target_kind, gimple_omp_target_set_kind,
	gimple_omp_target_child_fn, gimple_omp_target_child_fn_ptr,
	gimple_omp_target_set_child_fn, gimple_omp_target_data_arg,
	gimple_omp_target_data_arg_ptr, gimple_omp_target_set_data_arg,
	gimple_omp_teams_clauses, gimple_omp_teams_clauses_ptr,
	gimple_omp_teams_set_clauses): New inlines.
	(CASE_GIMPLE_OMP): Add GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS
	and GIMPLE_OMP_TASKGROUP.
	* tree-core.h (enum omp_clause_code): Add new OpenMP 4.0 clause
	codes.
	(enum omp_clause_depend_kind, enum omp_clause_map_kind,
	enum omp_clause_proc_bind_kind): New.
	(union omp_clause_subcode): Add depend_kind, map_kind and
	proc_bind_kind fields.
	* tree-cfg.c (make_edges): Handle GIMPLE_OMP_TARGET,
	GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP.
	* langhooks-def.h (lhd_omp_mappable_type): New prototype.
	(LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
	(LANG_HOOKS_FOR_TYPES_INITIALIZER): Add it.
gcc/c-family/
	* c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
	201307 instead of 201107.
	* c-common.c (DEF_FUNCTION_TYPE_8): Define.
	(c_common_attribute_table): Add "omp declare target" and
	"omp declare simd" attributes.
	(handle_omp_declare_target_attribute,
	handle_omp_declare_simd_attribute): New functions.
	* c-omp.c: Include c-pragma.h.
	(c_finish_omp_taskgroup): New function.
	(c_finish_omp_atomic): Add swapped argument, if true,
	build the operation first with rhs, lhs arguments and use NOP_EXPR
	build_modify_expr.
	(c_finish_omp_for): Add code argument, pass it down to make_code.
	(c_omp_split_clauses): New function.
	(c_split_parallel_clauses): Removed.
	(c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
	c_omp_declare_simd_clauses_to_decls): New functions.
	* c-common.h (omp_clause_mask): New type.
	(OMP_CLAUSE_MASK_1): Define.
	(omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
	omp_clause_mask::operator |=, omp_clause_mask::operator ~,
	omp_clause_mask::operator |, omp_clause_mask::operator &,
	omp_clause_mask::operator <<, omp_clause_mask::operator >>,
	omp_clause_mask::operator ==): New methods.
	(enum c_omp_clause_split): New.
	(c_finish_omp_taskgroup): New prototype.
	(c_finish_omp_atomic): Add swapped argument.
	(c_finish_omp_for): Add code argument.
	(c_omp_split_clauses): New prototype.
	(c_split_parallel_clauses): Removed.
	(c_omp_declare_simd_clauses_to_numbers,
	c_omp_declare_simd_clauses_to_decls): New prototypes.
	* c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
	* c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
	PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
	PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
	PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
	Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
	(enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
	PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
	PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
	PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
	PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
	PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
	PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
	PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
	PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
	PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
	PRAGMA_OMP_CLAUSE_UNIFORM.
gcc/ada/
	* gcc-interface/utils.c (DEF_FUNCTION_TYPE_8): Define.
gcc/fortran/
	* trans-openmp.c (gfc_omp_clause_default_ctor,
	gfc_omp_clause_dtor): Return NULL for OMP_CLAUSE_REDUCTION.
	* f95-lang.c (ATTR_NULL, DEF_FUNCTION_TYPE_8): Define.
	* types.def (DEF_FUNCTION_TYPE_8): Document.
	(BT_FN_VOID_OMPFN_PTR_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG,
	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove.
	(BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT,
	BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL, BT_FN_VOID_UINT_UINT,
	BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR,
	BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR,
	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New.
gcc/lto/
	* lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
gcc/c/
	* c-lang.h (current_omp_declare_target_attribute): New extern
	decl.
	* c-parser.c: Include c-lang.h.
	(struct c_parser): Change tokens to c_token *.
	Add tokens_buf field.  Change tokens_avail type to unsigned int.
	(c_parser_consume_token): If parser->tokens isn't
	&parser->tokens_buf[0], increment parser->tokens.
	(c_parser_consume_pragma): Likewise.
	(enum pragma_context): Add pragma_struct and pragma_param.
	(c_parser_external_declaration): Adjust
	c_parser_declaration_or_fndef caller.
	(c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
	argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
	Adjust recursive call.
	(c_parser_struct_or_union_specifier): Use pragma_struct instead
	of pragma_external.
	(c_parser_parameter_declaration): Use pragma_param instead of
	pragma_external.
	(c_parser_compound_statement_nostart, c_parser_label,
	c_parser_for_statement): Adjust
	c_parser_declaration_or_fndef callers.
	(c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
	it through to c_parser_conditional_expression.
	(c_parser_conditional_expression): Add omp_atomic_lhs argument,
	pass it through to c_parser_binary_expression.  Adjust recursive
	call.
	(c_parser_binary_expression): Remove prec argument, add
	omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
	omp_atomic_lhs is non-NULL and one of the arguments of toplevel
	binop matches it, use build2 instead of parser_build_binary_op.
	(c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
	PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
	PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
	Handle pragma_struct and pragma_param the same as pragma_external.
	(c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
	(c_parser_omp_variable_list): Parse array sections for
	OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
	(c_parser_omp_clause_collapse): Fully fold collapse expression.
	(c_parser_omp_clause_reduction): Handle user defined reductions.
	(c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
	c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
	c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
	c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
	c_parser_omp_clause_depend, c_parser_omp_clause_map,
	c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
	c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
	c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
	(c_parser_omp_all_clauses): Add finish_p argument.  Don't call
	c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
	(c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
	present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
	(c_parser_omp_for_loop): Add CODE argument, pass it through
	to c_finish_omp_for.  Change last argument to cclauses,
	and adjust uses to grab parallel clauses from the array of all
	the split clauses.  Adjust c_parser_binary_expression,
	c_parser_declaration_or_fndef and c_finish_omp_for callers.
	(omp_split_clauses): New function.
	(c_parser_omp_simd): New function.
	(c_parser_omp_for): Add p_name, mask and cclauses arguments.
	Allow the function to be called also when parsing combined constructs,
	and call c_parser_omp_simd when parsing for simd.
	(c_parser_omp_sections_scope): If section-sequence doesn't start with
	#pragma omp section, require exactly one structured-block instead of
	sequence of statements.
	(c_parser_omp_sections): Add p_name, mask and cclauses arguments.
	Allow the function to be called also when parsing combined constructs.
	(c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
	Allow the function to be called also when parsing combined
	constructs.
	(c_parser_omp_taskgroup, c_parser_omp_cancel,
	c_parser_omp_cancellation_point, c_parser_omp_distribute,
	c_parser_omp_teams, c_parser_omp_target_data,
	c_parser_omp_target_update, c_parser_omp_target,
	c_parser_omp_declare_simd, c_finish_omp_declare_simd,
	c_parser_omp_declare_target, c_parser_omp_end_declare_target,
	c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
	(c_parser_omp_construct): Add p_name and mask vars.  Handle
	PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
	PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
	and c_parser_omp_sections callers.
	(c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
	(OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
	OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
	(OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
	(OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
	OMP_CLAUSE_DEPEND.
	(OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
	OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
	OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
	OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
	OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
	* c-typeck.c: Include tree-inline.h.
	(c_finish_omp_cancel, c_finish_omp_cancellation_point,
	handle_omp_array_sections_1, handle_omp_array_sections,
	c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
	(c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
	user defined reductions.
	(c_tree_equal): New function.
	* c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
	c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
	c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
	c_check_omp_declare_reduction_r): New prototypes.
	* c-decl.c (current_omp_declare_target_attribute): New variable.
	(c_decl_attributes): New function.
	(start_decl, start_function): Use it instead of decl_attributes.
	(temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
	c_omp_reduction_decl, c_omp_reduction_lookup,
	c_check_omp_declare_reduction_r): New functions.
gcc/cp/
	* decl.c (duplicate_decls): Error out for redeclaration of UDRs.
	(declare_simd_adjust_this): New function.
	(grokfndecl): If "omp declare simd" attribute is present,
	call declare_simd_adjust_this if needed and
	c_omp_declare_simd_clauses_to_numbers.
	* cp-array-notation.c (expand_array_notation_exprs): Handle
	OMP_TASKGROUP.
	* cp-gimplify.c (cp_gimplify_expr): Handle OMP_SIMD and
	OMP_DISTRIBUTE.  Handle is_invisiref_parm decls in
	OMP_CLAUSE_REDUCTION.
	(cp_genericize_r): Handle OMP_SIMD and OMP_DISTRIBUTE like
	OMP_FOR.
	(cxx_omp_privatize_by_reference): Return true for
	is_invisiref_parm decls.
	(cxx_omp_finish_clause): Adjust cxx_omp_create_clause_info
	caller.
	* pt.c (apply_late_template_attributes): For "omp declare simd"
	attribute call tsubst_omp_clauses,
	c_omp_declare_simd_clauses_to_decls, finish_omp_clauses
	and c_omp_declare_simd_clauses_to_numbers.
	(instantiate_class_template_1): Call cp_check_omp_declare_reduction
	for UDRs.
	(tsubst_decl): Handle UDRs.
	(tsubst_omp_clauses): Add declare_simd argument, if true don't
	call finish_omp_clauses.  Handle new OpenMP 4.0 clauses.
	Handle non-NULL OMP_CLAUSE_REDUCTION_PLACEHOLDER on
	OMP_CLAUSE_REDUCTION.
	(tsubst_expr): For UDRs call pushdecl and
	cp_check_omp_declare_reduction.  Adjust tsubst_omp_clauses
	callers.  Handle OMP_SIMD, OMP_DISTRIBUTE, OMP_TEAMS,
	OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TARGET, OMP_TASKGROUP.
	Adjust finish_omp_atomic caller.
	(tsubst_omp_udr): New function.
	(instantiate_decl): For UDRs at block scope, don't call
	start_preparsed_function/finish_function.  Call tsubst_omp_udr.
	* semantics.c (cxx_omp_create_clause_info): Add need_dtor argument,
	use it instead of need_default_ctor || need_copy_ctor.
	(struct cp_check_omp_declare_reduction_data): New type.
	(handle_omp_array_sections_1, handle_omp_array_sections,
	omp_reduction_id, omp_reduction_lookup,
	cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction_r,
	cp_check_omp_declare_reduction, clone_omp_udr,
	find_omp_placeholder_r, finish_omp_reduction_clause): New functions.
	(finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined
	reductions.
	(finish_omp_for): Add CODE argument, use it instead of hardcoded
	OMP_FOR.  Adjust c_finish_omp_for caller.
	(finish_omp_atomic): Add seq_cst argument, adjust
	c_finish_omp_atomic callers, handle seq_cst and new OpenMP 4.0
	atomic variants.
	(finish_omp_cancel, finish_omp_cancellation_point): New functions.
	* decl2.c (mark_used): Force immediate instantiation of
	DECL_OMP_DECLARE_REDUCTION_P decls.
	(is_late_template_attribute): Return true for "omp declare simd"
	attribute.
	(cp_omp_mappable_type): New function.
	(cplus_decl_attributes): Add implicit "omp declare target" attribute
	if requested.
	* parser.c (cp_debug_parser): Print
	parser->colon_doesnt_start_class_def_p.
	(cp_ensure_no_omp_declare_simd, cp_finalize_omp_declare_simd): New
	functions.
	(enum pragma_context): Add pragma_member and pragma_objc_icode.
	(cp_parser_binary_expression): Handle no_toplevel_fold_p
	even for binary operations other than comparison.
	(cp_parser_linkage_specification): Call
	cp_ensure_no_omp_declare_simd if needed.
	(cp_parser_namespace_definition): Likewise.
	(cp_parser_init_declarator): Call cp_finalize_omp_declare_simd.
	(cp_parser_direct_declarator): Pass declarator to
	cp_parser_late_return_type_opt.
	(cp_parser_late_return_type_opt): Add declarator argument,
	call cp_parser_late_parsing_omp_declare_simd for declare simd.
	(cp_parser_class_specifier_1): Call cp_ensure_no_omp_declare_simd.
	Parse UDRs before all other methods.
	(cp_parser_member_specification_opt): Use pragma_member instead of
	pragma_external.
	(cp_parser_member_declaration): Call cp_finalize_omp_declare_simd.
	(cp_parser_function_definition_from_specifiers_and_declarator,
	cp_parser_save_member_function_body): Likewise.
	(cp_parser_late_parsing_for_member): Handle UDRs specially.
	(cp_parser_next_token_starts_class_definition_p): Don't allow
	CPP_COLON if colon_doesnt_start_class_def_p flag is true.
	(cp_parser_objc_interstitial_code): Use pragma_objc_icode
	instead of pragma_external.
	(cp_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
	(cp_parser_omp_var_list_no_open): Parse array sections for
	OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.  Add COLON argument,
	if non-NULL, allow parsing to end with a colon rather than close
	paren.
	(cp_parser_omp_var_list): Adjust cp_parser_omp_var_list_no_open
	caller.
	(cp_parser_omp_clause_reduction): Handle user defined reductions.
	(cp_parser_omp_clause_branch, cp_parser_omp_clause_cancelkind,
	cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
	cp_parser_omp_clause_aligned, cp_parser_omp_clause_linear,
	cp_parser_omp_clause_safelen, cp_parser_omp_clause_simdlen,
	cp_parser_omp_clause_depend, cp_parser_omp_clause_map,
	cp_parser_omp_clause_device, cp_parser_omp_clause_dist_schedule,
	cp_parser_omp_clause_proc_bind, cp_parser_omp_clause_to,
	cp_parser_omp_clause_from, cp_parser_omp_clause_uniform): New
	functions.
	(cp_parser_omp_all_clauses): Add finish_p argument.  Don't call
	finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
	(cp_parser_omp_atomic): Parse seq_cst clause, pass
	true if it is present to finish_omp_atomic.  Handle new OpenMP 4.0
	atomic forms.
	(cp_parser_omp_for_loop): Add CODE argument, pass it through
	to finish_omp_for.  Change last argument to cclauses,
	and adjust uses to grab parallel clauses from the array of all
	the split clauses.
	(cp_omp_split_clauses): New function.
	(cp_parser_omp_simd): New function.
	(cp_parser_omp_for): Add p_name, mask and cclauses arguments.
	Allow the function to be called also when parsing combined constructs,
	and call c_parser_omp_simd when parsing for simd.
	(cp_parser_omp_sections_scope): If section-sequence doesn't start with
	#pragma omp section, require exactly one structured-block instead of
	sequence of statements.
	(cp_parser_omp_sections): Add p_name, mask and cclauses arguments.
	Allow the function to be called also when parsing combined constructs.
	(cp_parser_omp_parallel): Add p_name, mask and cclauses arguments.
	Allow the function to be called also when parsing combined
	constructs.
	(cp_parser_omp_taskgroup, cp_parser_omp_cancel,
	cp_parser_omp_cancellation_point, cp_parser_omp_distribute,
	cp_parser_omp_teams, cp_parser_omp_target_data,
	cp_parser_omp_target_update, cp_parser_omp_target,
	cp_parser_omp_declare_simd, cp_parser_late_parsing_omp_declare_simd,
	cp_parser_omp_declare_target, cp_parser_omp_end_declare_target,
	cp_parser_omp_declare_reduction_exprs, cp_parser_omp_declare_reduction,
	cp_parser_omp_declare): New functions.
	(cp_parser_omp_construct): Add p_name and mask vars.  Handle
	PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
	PRAGMA_OMP_TEAMS.  Adjust cp_parser_omp_for, cp_parser_omp_parallel
	and cp_parser_omp_sections callers.
	(cp_parser_pragma): Handle PRAGMA_OMP_CANCEL,
	PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
	PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
	PRAGMA_OMP_TEAMS, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET.
	Handle pragma_member and pragma_objc_icode like pragma_external.
	(OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
	OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
	(OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
	(OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
	OMP_CLAUSE_DEPEND.
	(OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
	OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
	OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
	OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
	OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
	* parser.h (struct cp_omp_declare_simd_data): New type.
	(struct cp_parser): Add colon_doesnt_start_class_def_p and
	omp_declare_simd fields.
	* cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
	* cp-tree.h (struct lang_decl_fn): Add omp_declare_reduction_p
	bit.
	(DECL_OMP_DECLARE_REDUCTION_P): Define.
	(OMP_FOR_GIMPLIFYING_P): Use OMP_LOOP_CHECK macro.
	(struct saved_scope): Add omp_declare_target_attribute field.
	(cp_omp_mappable_type, omp_reduction_id,
	cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction,
	finish_omp_cancel, finish_omp_cancellation_point): New prototypes.
	(finish_omp_for): Add CODE argument.
	(finish_omp_atomic): Add seq_cst argument.
	(cxx_omp_create_clause_info): Add need_dtor argument.
gcc/testsuite/
	* c-c++-common/gomp/atomic-15.c: Adjust for C diagnostics.
	Remove error test that is now valid in OpenMP 4.0.
	* c-c++-common/gomp/atomic-16.c: New test.
	* c-c++-common/gomp/cancel-1.c: New test.
	* c-c++-common/gomp/depend-1.c: New test.
	* c-c++-common/gomp/depend-2.c: New test.
	* c-c++-common/gomp/map-1.c: New test.
	* c-c++-common/gomp/pr58472.c: New test.
	* c-c++-common/gomp/sections1.c: New test.
	* c-c++-common/gomp/simd1.c: New test.
	* c-c++-common/gomp/simd2.c: New test.
	* c-c++-common/gomp/simd3.c: New test.
	* c-c++-common/gomp/simd4.c: New test.
	* c-c++-common/gomp/simd5.c: New test.
	* c-c++-common/gomp/single1.c: New test.
	* g++.dg/gomp/block-0.C: Adjust for stricter #pragma omp sections
	parser.
	* g++.dg/gomp/block-3.C: Likewise.
	* g++.dg/gomp/clause-3.C: Adjust error messages.
	* g++.dg/gomp/declare-simd-1.C: New test.
	* g++.dg/gomp/declare-simd-2.C: New test.
	* g++.dg/gomp/depend-1.C: New test.
	* g++.dg/gomp/depend-2.C: New test.
	* g++.dg/gomp/target-1.C: New test.
	* g++.dg/gomp/target-2.C: New test.
	* g++.dg/gomp/taskgroup-1.C: New test.
	* g++.dg/gomp/teams-1.C: New test.
	* g++.dg/gomp/udr-1.C: New test.
	* g++.dg/gomp/udr-2.C: New test.
	* g++.dg/gomp/udr-3.C: New test.
	* g++.dg/gomp/udr-4.C: New test.
	* g++.dg/gomp/udr-5.C: New test.
	* g++.dg/gomp/udr-6.C: New test.
	* gcc.dg/autopar/outer-1.c: Expect 4 instead of 5 loopfn matches.
	* gcc.dg/autopar/outer-2.c: Likewise.
	* gcc.dg/autopar/outer-3.c: Likewise.
	* gcc.dg/autopar/outer-4.c: Likewise.
	* gcc.dg/autopar/outer-5.c: Likewise.
	* gcc.dg/autopar/outer-6.c: Likewise.
	* gcc.dg/autopar/parallelization-1.c: Likewise.
	* gcc.dg/gomp/block-3.c: Adjust for stricter #pragma omp sections
	parser.
	* gcc.dg/gomp/clause-1.c: Adjust error messages.
	* gcc.dg/gomp/combined-1.c: Look for GOMP_parallel_loop_runtime
	instead of GOMP_parallel_loop_runtime_start.
	* gcc.dg/gomp/declare-simd-1.c: New test.
	* gcc.dg/gomp/declare-simd-2.c: New test.
	* gcc.dg/gomp/nesting-1.c: Adjust for stricter #pragma omp sections
	parser.  Add further #pragma omp sections nesting tests.
	* gcc.dg/gomp/target-1.c: New test.
	* gcc.dg/gomp/target-2.c: New test.
	* gcc.dg/gomp/taskgroup-1.c: New test.
	* gcc.dg/gomp/teams-1.c: New test.
	* gcc.dg/gomp/udr-1.c: New test.
	* gcc.dg/gomp/udr-2.c: New test.
	* gcc.dg/gomp/udr-3.c: New test.
	* gcc.dg/gomp/udr-4.c: New test.
	* gfortran.dg/gomp/appendix-a/a.35.5.f90: Add dg-error.

Co-Authored-By: Richard Henderson <rth@redhat.com>
Co-Authored-By: Tobias Burnus <burnus@net-b.de>

From-SVN: r203408
2013-10-11 11:26:50 +02:00
Jakub Jelinek bd599dea43 re PR testsuite/57605 (colors break note pruning in the testsuite)
PR testsuite/57605
libstdc++-v3/
	* testsuite/lib/libstdc++.exp (libstdc++_init): Prepend
	-fdiagnostics-color=never to cxxflags.
libmudflap/
	* testsuite/lib/libmudflap.exp (libmudflap-init): Append
	-fdiagnostics-color=never to cxxflags.
libgomp/
	* testsuite/lib/libgomp.exp: Add -fdiagnostics-color=never to
	ALWAYS_CFLAGS.

From-SVN: r202791
2013-09-20 19:52:29 +02:00
Alan Modra 3cbe17f7de libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical ppc host match.
* libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical
	ppc host match.  Support little-endian powerpc linux hosts.
Regenerate configure throughout.

From-SVN: r202773
2013-09-20 19:17:52 +09:30
Jakub Jelinek 4befd127ca omp-low.c (expand_omp_sections): Always pass len - 1 to GOMP_sections_start, even if !exit_reachable.
* omp-low.c (expand_omp_sections): Always pass len - 1 to
	GOMP_sections_start, even if !exit_reachable.
libgomp/
	* testsuite/libgomp.c/sections-2.c: New test.

From-SVN: r202738
2013-09-19 13:52:52 +02:00
Marcus Shawcroft 946c8f7bff Disable strassen.f90 test for aarch64 tiny memory.
This test case is too large to fit into the aarch64 tiny memory model.

From-SVN: r200521
2013-06-28 12:45:57 +00:00
Iain Sandoe 1ef3b58e57 libgomp.exp: Reorder lib loads into dependency order.
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
2013-06-20 16:48:26 +00:00
Thomas Schwinge 9275f73ae5 forced.C: Extend current handling of Linux-based x86 systems to cover all GNU systems.
gcc/testsuite/
	* g++.dg/abi/forced.C: Extend current handling of Linux-based x86
	systems to cover all GNU systems.
	* g++.dg/abi/guard2.C: Likewise.
	* g++.dg/cpp0x/constexpr-rom.C: Likewise.
	* g++.dg/eh/sighandle.C: Likewise.
	* g++.dg/ext/cleanup-10.C: Likewise.
	* g++.dg/ext/cleanup-11.C: Likewise.
	* g++.dg/ext/cleanup-8.C: Likewise.
	* g++.dg/ext/cleanup-9.C: Likewise.
	* g++.dg/opt/const5.C: Likewise.
	* g++.dg/opt/life1.C: Likewise.
	* g++.dg/other/pr39496.C: Likewise.
	* g++.old-deja/g++.abi/aggregates.C: Likewise.
	* g++.old-deja/g++.abi/align.C: Likewise.
	* g++.old-deja/g++.abi/bitfields.C: Likewise.
	* g++.old-deja/g++.law/weak.C: Likewise.
	* g++.old-deja/g++.pt/asm1.C: Likewise.
	* gcc.c-torture/execute/20030125-1.x: Likewise.
	* gcc.c-torture/execute/990127-2.x: Likewise.
	* gcc.dg/20041106-1.c: Likewise.
	* gcc.dg/20050503-1.c: Likewise.
	* gcc.dg/builtin-object-size-5.c: Likewise.
	* gcc.dg/cleanup-10.c: Likewise.
	* gcc.dg/cleanup-11.c: Likewise.
	* gcc.dg/cleanup-8.c: Likewise.
	* gcc.dg/cleanup-9.c: Likewise.
	* gcc.dg/complex-5.c: Likewise.
	* gcc.dg/debug/dwarf2/asm-line1.c: Likewise.
	* gcc.dg/debug/dwarf2/discriminator.c: Likewise.
	* gcc.dg/dfp/convert-dfp-round-thread.c: Likewise.
	* gcc.dg/dfp/pr35739.c: Likewise.
	* gcc.dg/fdata-sections-1.c: Likewise.
	* gcc.dg/lto/20090206-1_0.c: Likewise.
	* gcc.dg/lto/20090206-2_0.c: Likewise.
	* gcc.dg/pr30360.c: Likewise.
	* gcc.dg/pr37303.c: Likewise.
	* gcc.dg/pr39323-1.c: Likewise.
	* gcc.dg/pr39323-2.c: Likewise.
	* gcc.dg/pr39323-3.c: Likewise.
	* gcc.dg/pr45416.c: Likewise.
	* gcc.dg/setjmp-2.c: Likewise.
	* gcc.dg/split-1.c: Likewise.
	* gcc.dg/split-3.c: Likewise.
	* gcc.dg/split-4.c: Likewise.
	* gcc.dg/strlenopt-12g.c: Likewise.
	* gcc.dg/strlenopt-14g.c: Likewise.
	* gcc.dg/strlenopt-14gf.c: Likewise.
	* gcc.dg/strlenopt-16g.c: Likewise.
	* gcc.dg/strlenopt-17g.c: Likewise.
	* gcc.dg/strlenopt-18g.c: Likewise.
	* gcc.dg/strlenopt-1f.c: Likewise.
	* gcc.dg/strlenopt-22g.c: Likewise.
	* gcc.dg/strlenopt-2f.c: Likewise.
	* gcc.dg/strlenopt-4g.c: Likewise.
	* gcc.dg/strlenopt-4gf.c: Likewise.
	* gcc.dg/struct-ret-3.c: Likewise.
	* gcc.dg/torture/stackalign/setjmp-2.c: Likewise.
	* gcc.misc-tests/linkage.exp: Likewise.
	* gcc.target/i386/20000724-1.c: Likewise.
	* gcc.target/i386/align-main-3.c: Likewise.
	* gcc.target/i386/cleanup-1.c: Likewise.
	* gcc.target/i386/inline-mcpy.c: Likewise.
	* gcc.target/i386/pr32268.c: Likewise.
	* gcc.target/i386/pr36613.c: Likewise.
	* gcc.target/i386/pr39013-1.c: Likewise.
	* gcc.target/i386/pr39013-2.c: Likewise.
	* gcc.target/i386/pr39496.c: Likewise.
	* gcc.target/i386/pr40906-3.c: Likewise.
	* gcc.target/i386/pr46084.c: Likewise.
	* lib/target-supports.exp (check_effective_target_pie): Likewise.

libgomp/
	* testsuite/libgomp.c/icv-2.c: Extend current handling of
	Linux-based x86 systems to cover all GNU systems.
	* testsuite/libgomp.c/lock-3.c: Likewise.
	* testsuite/libgomp.c/pr48591.c: Likewise.

libstdc++-v3/
	* testsuite/17_intro/headers/c++1998/49745.cc: Extend current
	handling of Linux-based x86 systems to cover all GNU systems.
	* testsuite/18_support/bad_exception/23591_thread-1.c: Likewise.
	* testsuite/18_support/pthread_guard.cc: Likewise.
	* testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc:
	Likewise.
	* testsuite/21_strings/basic_string/pthread18185.cc: Likewise.
	* testsuite/21_strings/basic_string/pthread4.cc: Likewise.
	* testsuite/22_locale/ctype/is/char/2.cc: Likewise.
	* testsuite/22_locale/ctype/is/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/locale/cons/12658_thread-1.cc: Likewise.
	* testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise.
	* testsuite/23_containers/list/pthread1.cc: Likewise.
	* testsuite/23_containers/list/pthread5.cc: Likewise.
	* testsuite/23_containers/map/pthread6.cc: Likewise.
	* testsuite/23_containers/vector/debug/multithreaded_swap.cc:
	Likewise.
	* testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
	Likewise.
	* testsuite/27_io/basic_ofstream/pthread2.cc: Likewise.
	* testsuite/27_io/basic_ostringstream/pthread3.cc: Likewise.
	* testsuite/30_threads/async/42819.cc: Likewise.
	* testsuite/30_threads/async/49668.cc: Likewise.
	* testsuite/30_threads/async/54297.cc: Likewise.
	* testsuite/30_threads/async/any.cc: Likewise.
	* testsuite/30_threads/async/async.cc: Likewise.
	* testsuite/30_threads/async/launch.cc: Likewise.
	* testsuite/30_threads/async/sync.cc: Likewise.
	* testsuite/30_threads/call_once/39909.cc: Likewise.
	* testsuite/30_threads/call_once/49668.cc: Likewise.
	* testsuite/30_threads/call_once/call_once1.cc: Likewise.
	* testsuite/30_threads/condition_variable/54185.cc: Likewise.
	* testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
	* testsuite/30_threads/condition_variable/members/1.cc: Likewise.
	* testsuite/30_threads/condition_variable/members/2.cc: Likewise.
	* testsuite/30_threads/condition_variable/members/53841.cc:
	Likewise.
	* testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
	Likewise.
	* testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
	* testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
	* testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
	* testsuite/30_threads/condition_variable_any/members/1.cc:
	Likewise.
	* testsuite/30_threads/condition_variable_any/members/2.cc:
	Likewise.
	* testsuite/30_threads/future/cons/move.cc: Likewise.
	* testsuite/30_threads/future/members/45133.cc: Likewise.
	* testsuite/30_threads/future/members/get.cc: Likewise.
	* testsuite/30_threads/future/members/get2.cc: Likewise.
	* testsuite/30_threads/future/members/share.cc: Likewise.
	* testsuite/30_threads/future/members/valid.cc: Likewise.
	* testsuite/30_threads/future/members/wait.cc: Likewise.
	* testsuite/30_threads/future/members/wait_for.cc: Likewise.
	* testsuite/30_threads/future/members/wait_until.cc: Likewise.
	* testsuite/30_threads/lock/1.cc: Likewise.
	* testsuite/30_threads/lock/2.cc: Likewise.
	* testsuite/30_threads/lock/3.cc: Likewise.
	* testsuite/30_threads/lock/4.cc: Likewise.
	* testsuite/30_threads/mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
	* testsuite/30_threads/mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
	* testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
	* testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/packaged_task/49668.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/move_assign.cc:
	Likewise.
	* testsuite/30_threads/packaged_task/members/get_future.cc:
	Likewise.
	* testsuite/30_threads/packaged_task/members/get_future2.cc:
	Likewise.
	* testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
	* testsuite/30_threads/promise/cons/1.cc: Likewise.
	* testsuite/30_threads/promise/cons/alloc.cc: Likewise.
	* testsuite/30_threads/promise/cons/move.cc: Likewise.
	* testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
	* testsuite/30_threads/promise/members/get_future.cc: Likewise.
	* testsuite/30_threads/promise/members/get_future2.cc: Likewise.
	* testsuite/30_threads/promise/members/set_exception.cc: Likewise.
	* testsuite/30_threads/promise/members/set_exception2.cc:
	Likewise.
	* testsuite/30_threads/promise/members/set_value.cc: Likewise.
	* testsuite/30_threads/promise/members/set_value2.cc: Likewise.
	* testsuite/30_threads/promise/members/set_value3.cc: Likewise.
	* testsuite/30_threads/promise/members/swap.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
	Likewise.
	* testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/native_handle/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
	Likewise.
	* testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/unlock/1.cc:
	Likewise.
	* testsuite/30_threads/shared_future/cons/move.cc: Likewise.
	* testsuite/30_threads/shared_future/members/45133.cc: Likewise.
	* testsuite/30_threads/shared_future/members/get.cc: Likewise.
	* testsuite/30_threads/shared_future/members/get2.cc: Likewise.
	* testsuite/30_threads/shared_future/members/valid.cc: Likewise.
	* testsuite/30_threads/shared_future/members/wait.cc: Likewise.
	* testsuite/30_threads/shared_future/members/wait_for.cc:
	Likewise.
	* testsuite/30_threads/shared_future/members/wait_until.cc:
	Likewise.
	* testsuite/30_threads/this_thread/1.cc: Likewise.
	* testsuite/30_threads/this_thread/2.cc: Likewise.
	* testsuite/30_threads/this_thread/3.cc: Likewise.
	* testsuite/30_threads/this_thread/4.cc: Likewise.
	* testsuite/30_threads/thread/cons/1.cc: Likewise.
	* testsuite/30_threads/thread/cons/2.cc: Likewise.
	* testsuite/30_threads/thread/cons/3.cc: Likewise.
	* testsuite/30_threads/thread/cons/4.cc: Likewise.
	* testsuite/30_threads/thread/cons/49668.cc: Likewise.
	* testsuite/30_threads/thread/cons/5.cc: Likewise.
	* testsuite/30_threads/thread/cons/6.cc: Likewise.
	* testsuite/30_threads/thread/cons/7.cc: Likewise.
	* testsuite/30_threads/thread/cons/8.cc: Likewise.
	* testsuite/30_threads/thread/cons/9.cc: Likewise.
	* testsuite/30_threads/thread/cons/moveable.cc: Likewise.
	* testsuite/30_threads/thread/members/1.cc: Likewise.
	* testsuite/30_threads/thread/members/2.cc: Likewise.
	* testsuite/30_threads/thread/members/3.cc: Likewise.
	* testsuite/30_threads/thread/members/4.cc: Likewise.
	* testsuite/30_threads/thread/members/5.cc: Likewise.
	* testsuite/30_threads/thread/members/hardware_concurrency.cc:
	Likewise.
	* testsuite/30_threads/thread/native_handle/cancel.cc: Likewise.
	* testsuite/30_threads/thread/native_handle/typesizes.cc:
	Likewise.
	* testsuite/30_threads/thread/swap/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/dest/destructor_locked.cc:
	Likewise.
	* testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
	Likewise.
	* testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
	* testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/try_lock/1.cc: Likewise.
	* testsuite/30_threads/try_lock/2.cc: Likewise.
	* testsuite/30_threads/try_lock/3.cc: Likewise.
	* testsuite/30_threads/try_lock/4.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
	* testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
	* testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise.
	* testsuite/ext/mt_allocator/22309_thread.cc: Likewise.
	* testsuite/ext/profile/mh.cc: Likewise.
	* testsuite/ext/rope/pthread7-rope.cc: Likewise.
	* testsuite/lib/libstdc++.exp (libstdc++_init): Likewise.
	* testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc:
	Likewise.
	* testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc:
	Likewise.
	* testsuite/util/testsuite_performance.h: Extend current handling
	of Linux-based systems to cover all glibc-based systems.

From-SVN: r199880
2013-06-10 09:21:29 +02:00
Thomas Schwinge 48df3acb54 configure.tgt (XCFLAGS): Add -ftls-model=initial-exec for GNU/Hurd, as done for Linux-based systems.
libgomp/
	* configure.tgt (XCFLAGS): Add -ftls-model=initial-exec for
	GNU/Hurd, as done for Linux-based systems.

From-SVN: r199725
2013-06-06 12:04:49 +02:00
Thomas Schwinge 492992e223 ptrlock.h: Fix comment.
libgomp/
	* config/posix/ptrlock.h: Fix comment.

From-SVN: r199724
2013-06-06 12:04:34 +02:00
Tobias Burnus 4fed6b2544 re PR fortran/57423 (Incorrect keyword argument names in Fortran OpenMP procedure interfaces in omp_lib)
2013-05-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/57423
        * libgomp.texi (omp_set_dynamic, omp_set_nested, omp_set_nested,
        omp_set_num_threads, omp_init_lock, omp_set_lock, omp_test_lock,
        omp_unset_lock, omp_destroy_lock, omp_init_nest_lock,
        omp_set_nest_lock, omp_test_nest_lock, omp_unset_nest_lock,
        omp_destroy_nest_lock): Correct arguments to match the one in
        the OpenMP spec.
        * omp_lib.f90.in (omp_init_lock, omp_init_nest_lock,  omp_destroy_lock
        omp_destroy_nest_lock, omp_set_lock, omp_set_nest_lock, omp_unset_lock,
        omp_unset_nest_lock, omp_set_dynamic, omp_set_nested,
        omp_set_num_threads, omp_test_lock, omp_test_nest_lock): Ditto.

From-SVN: r199351
2013-05-27 11:28:48 +02:00
Jakub Jelinek 5a0f4dd395 omp-low.c (extract_omp_for_data): For collapsed loops...
* omp-low.c (extract_omp_for_data): For collapsed loops,
	if at least one of the loops is known at compile time to
	iterate zero times, set count to 0.
	(expand_omp_regimplify_p): New function.
	(expand_omp_for_generic): For collapsed loops, if at least
	one of the loops isn't known to iterate at least once,
	add runtime check with setting count to 0.
	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk):
	For unsigned types if it isn't known at compile time that
	the loop will iterate at least once, add runtime check to bypass
	the whole loop if initial condition isn't true.

	* testsuite/libgomp.c/loop-13.c: New test.
	* testsuite/libgomp.c/loop-14.c: New test.
	* testsuite/libgomp.c/loop-15.c: New test.
	* testsuite/libgomp.c++/loop-13.C: New test.
	* testsuite/libgomp.c++/loop-14.C: New test.
	* testsuite/libgomp.c++/loop-15.C: New test.

From-SVN: r198966
2013-05-16 12:43:33 +02:00
Jakub Jelinek 6d840d9980 re PR c++/56217 (ICE: OpenMP: when combining shared() and a move constructor)
PR middle-end/56217
	* omp-low.c (use_pointer_for_field): Return false if
	lower_send_shared_vars doesn't generate any copy-out code.

	* g++.dg/gomp/pr56217.C: New test.

	* testsuite/libgomp.c++/pr56217.C: New test.

From-SVN: r195796
2013-02-06 11:34:53 +01:00
Alan Modra bed8d8a692 task.c (GOMP_task, [...]): Comment.
* task.c (GOMP_task, GOMP_taskwait): Comment.

From-SVN: r195647
2013-02-01 23:22:41 +10:30
Dmitry Vyukov 3b35cd045f re PR sanitizer/55561 (TSAN: provide a TSAN instrumented libgomp)
PR libgomp/55561
	* config/linux/wait.h (do_spin): Use atomic load for addr.
	* config/linux/ptrlock.c (gomp_ptrlock_get_slow): Use atomic
	for intptr and ptrlock.
	* config/linux/ptrlock.h (gomp_ptrlock_get): Use atomic load
	for ptrlock.

Co-Authored-By: Joost VandeVondele <Joost.VandeVondele@mat.ethz.ch>

From-SVN: r195618
2013-01-31 17:57:09 +01:00
Alan Modra 9a64728823 re PR libgomp/51376 (libgomp taskwait failure)
PR libgomp/51376
	PR libgomp/56073
	* task.c (GOMP_task): Revert 2011-12-09 change.
	(GOMP_taskwait): Likewise.  Instead use atomic load with acquire
	barrier to read task->children..
	(gomp_barrier_handle_tasks): ..and matching atomic store with
	release barrier here when setting parent->children to NULL.

From-SVN: r195370
2013-01-22 22:11:53 +10:30
Jason Merrill 5af057d8bd re PR target/54908 (misc regressions on emutls targets remain from dynamic initialization of non-function-local TLS variables)
PR target/54908
c-family/
	* c.opt (-fextern-tls-init): New.
	* c-opts.c (c_common_post_options): Handle it.
cp/
	* decl2.c (get_local_tls_init_fn): New.
	(get_tls_init_fn): Handle flag_extern_tls_init.  Don't bother
	with aliases for internal variables.  Don't use weakrefs if
	the variable needs destruction.
	(generate_tls_wrapper): Mark the wrapper as const if no
	initialization is needed.
	(handle_tls_init): Don't require aliases.

From-SVN: r195310
2013-01-19 00:25:25 -05:00
Jakub Jelinek f34dea0300 re PR driver/55884 (FAIL: libgomp.fortran/omp_parse3.f90 -O0 (test for excess errors))
gcc/fortran/
2013-01-16  Jakub Jelinek  <jakub@redhat.com>
            Tobias Burnus  <burnus@net-b.de>

        PR driver/55884
        * lang.opt (fintrinsic-modules-path): Don't accept Joined.
        (fintrinsic-modules-path=): New.
        * options.c (gfc_handle_option, gfc_get_option_string,
        gfc_get_option_string): Handle the latter.

libgomp/
2013-01-16  Jakub Jelinek  <jakub@redhat.com>
            Tobias Burnus  <burnus@net-b.de>

        PR driver/55884
        * testsuite/libgomp.fortran/fortran.exp: Use
        -fintrinsic-modules-path= instead of
        -fintrinsic-modules-path.


Co-Authored-By: Tobias Burnus <burnus@net-b.de>

From-SVN: r195242
2013-01-16 17:19:32 +01:00
Richard Sandiford 8129609c6e Update copyright years in libgomp.
From-SVN: r195166
2013-01-14 18:18:49 +00:00
Tobias Burnus aa86bf1e9c fortran.exp: Set -fintrinsic-modules-path.
2012-12-19  Tobias Burnus  <burnus@net-b.de>

        * testsuite/libgomp.fortran/fortran.exp: Set
        -fintrinsic-modules-path.

From-SVN: r194613
2012-12-19 16:53:01 +01:00
Tobias Burnus 2865ea6615 use_intrinsic_1.f90: New; moved from gcc/testsuite/gfortran.dg/gomp/use_intrinsic_1.f90.
libgomp/
2012-12-19  Tobias Burnus  <burnus@net-b.de>

        * testsuite/libgomp.fortran/use_intrinsic_1.f90: New; moved
        from gcc/testsuite/gfortran.dg/gomp/use_intrinsic_1.f90.

gcc/testsuite/
2012-12-19  Tobias Burnus  <burnus@net-b.de>

        * gfortran.dg/gomp/use_intrinsic_1.f90: Moved
        to libgomp/testsuite/libgomp.fortran/use_intrinsic_1.f90.

From-SVN: r194611
2012-12-19 16:02:50 +01:00
Jakub Jelinek 4c5ba8d0db re PR libgomp/55411 (OMP threads lose their OMP_WAIT_POLICY when another OMP thread gets destructed)
PR libgomp/55411
	* team.c (gomp_free_thread): Decrease gomp_managed_threads
	if pool had any threads_used.

From-SVN: r193706
2012-11-21 21:29:14 +01:00
Jack Howarth e9f958c283 Use -Wl,-undefined,dynamic_lookup on darwin
* testsuite/libgomp.c++/pr24455.C: Use
	-Wl,-undefined,dynamic_lookup on darwin.

From-SVN: r193318
2012-11-07 15:12:27 -08:00
David Edelsohn a57d75dc70 * testsuite/libgomp.c++/pr24455.C: Use -Wl,-G on AIX.
From-SVN: r193296
2012-11-07 09:16:04 -05:00
Jason Merrill 57c3feb40a * semantics.c (finish_omp_threadprivate): Call complete_type.
From-SVN: r192812
2012-10-25 11:53:40 -04:00
Dominique d'Humieres c6c084858c force-parallel-6.c: Adjust the loops.
2012-10-24  Dominique d'Humieres  <dominiq@lps.ens.fr>

        * testsuite/libgomp.graphite/force-parallel-6.c: Adjust the loops.

From-SVN: r192761
2012-10-24 09:46:06 +00:00
Ian Bolton c1f37c00b7 AArch64 [9/10]
2012-10-23  Ian Bolton  <ian.bolton@arm.com>
	    Jim MacArthur  <jim.macarthur@arm.com>
	    Marcus Shawcroft  <marcus.shawcroft@arm.com>
	    Nigel Stephens  <nigel.stephens@arm.com>
	    Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
	    Richard Earnshaw  <rearnsha@arm.com>
	    Sofiane Naci  <sofiane.naci@arm.com>
	    Stephen Thomas  <stephen.thomas@arm.com>
	    Tejas Belagod  <tejas.belagod@arm.com>
	    Yufeng Zhang  <yufeng.zhang@arm.com>

	* configure.tgt: Add AArch64.



Co-Authored-By: Jim MacArthur <jim.macarthur@arm.com>
Co-Authored-By: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-Authored-By: Nigel Stephens <nigel.stephens@arm.com>
Co-Authored-By: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-Authored-By: Richard Earnshaw <rearnsha@arm.com>
Co-Authored-By: Sofiane Naci <sofiane.naci@arm.com>
Co-Authored-By: Stephen Thomas <stephen.thomas@arm.com>
Co-Authored-By: Tejas Belagod <tejas.belagod@arm.com>
Co-Authored-By: Yufeng Zhang <yufeng.zhang@arm.com>

From-SVN: r192730
2012-10-23 17:29:35 +00:00
Jason Merrill 7c424acd9a Allow dynamic initialization of thread_locals.
gcc/cp/
	* decl.c: Define tls_aggregates.
	(expand_static_init): Remove sorry.  Add to tls_aggregates.
	* cp-tree.h: Declare tls_aggregates.
	* call.c (set_up_extended_ref_temp): Add to tls_aggregates.
	* decl2.c (var_needs_tls_wrapper): New.
	(var_defined_without_dynamic_init): New.
	(get_tls_init_fn, get_tls_wrapper_fn): New.
	(generate_tls_wrapper, handle_tls_init): New.
	(cp_write_global_declarations): Call handle_tls_init and
	enerate_tls_wrapper.
	* mangle.c (write_guarded_var_name): Split out from..
	(mangle_guard_variable): ...here.
	(mangle_tls_init_fn, mangle_tls_wrapper_fn): Use it.
	(decl_tls_wrapper_p): New.
	* semantics.c (finish_id_expression): Replace use of thread_local
	variable with a call to its wrapper.
libiberty/
	* cp-demangle.c (d_special_name, d_dump): Handle TH and TW.
	(d_make_comp, d_print_comp): Likewise.
include/
	* demangle.h (enum demangle_component_type): Add
	DEMANGLE_COMPONENT_TLS_INIT and DEMANGLE_COMPONENT_TLS_WRAPPER.

From-SVN: r192211
2012-10-08 10:45:37 -04:00
David Edelsohn 6608378bce * configure: Regenerated.
From-SVN: r191322
2012-09-14 19:33:57 -04:00
Chung-Lin Tang c24dbebb44 futex.h (sys_futex0): Change to static function with noinline, nomips16 attributes under MIPS16.
2012-08-29  Chung-Lin Tang  <cltang@codesourcery.com>

	libgomp/
	* config/linux/mips/futex.h (sys_futex0): Change to static
	function with noinline, nomips16 attributes under MIPS16. Adjust
	asm statement to place 'li v0,SYS_futex' immediately before
	syscall insn.

From-SVN: r190772
2012-08-29 09:29:55 +00:00
Sandra Loosemore 3d3949df0f libgomp.texi (Library Index): Renamed from "Index" to prevent conflict with index.html on case-insensitive...
2012-07-04  Sandra Loosemore <sandra@codesourcery.com>

	libgomp/
	* libgomp.texi (Library Index): Renamed from "Index" to prevent
	conflict with index.html on case-insensitive file systems.

From-SVN: r189278
2012-07-04 22:53:03 -04:00
Uros Bizjak 68a12ef35b xmmintrin.h (_mm_sfence): Use __builtin_ia32_pause.
gcc/

2012-07-03  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/xmmintrin.h (_mm_sfence): Use __builtin_ia32_pause.

libgomp/

2012-07-03  Uros Bizjak  <ubizjak@gmail.com>

	* config/linux/x86/futex.h (cpu_relax): Use __builtin_ia32_pause.
	* testsuite/libgomp.c/sort-1.c (busy_wait): Ditto.

libitm/

2012-07-03  Uros Bizjak  <ubizjak@gmail.com>

	* config/x86/target.h (cpu_relax): Use __builtin_ia32_pause.

From-SVN: r189194
2012-07-03 09:24:10 +02:00
Richard Guenther 33ad93b9f4 cloog.m4: Set up to work against ISL only.
2012-07-02  Richard Guenther  <rguenther@suse.de>
	Michael Matz  <matz@suse.de>
	Tobias Grosser <tobias@grosser.es>
	Sebastian Pop <sebpop@gmail.com>

	config/
	* cloog.m4: Set up to work against ISL only.
	* isl.m4: New file.

	* Makefile.def: Add ISL host module, remove PPL host module.
	Adjust ClooG host module to use the proper ISL.
	* Makefile.tpl: Pass ISL include flags instead of PPL ones.
	* configure.ac: Include config/isl.m4.  Add ISL host library,
	remove PPL.  Remove PPL configury, add ISL configury, adjust
	ClooG configury.
	* Makefile.in: Regenerated.
	* configure: Likewise.

	gcc/
	* Makefile.in: Remove PPL flags in favor of ISL ones.
	(BACKENDLIBS): Remove PPL libs.
	(INCLUDES): Remove PPL includes in favor of ISL ones.
	(graphite-clast-to-gimple.o): Remove graphite-dependences.h and
	graphite-cloog-compat.h dependencies.
	(graphite-dependences.o): Likewise.
	(graphite-poly.o): Likewise.
	* configure.ac: Declare ISL vars instead of PPL ones.
	* configure: Regenerated.
	* doc/install.texi: Replace PPL requirement documentation
	with ISL one.
	* graphite-blocking.c: Remove PPL code, add ISL equivalent.
	* graphite-clast-to-gimple.c: Likewise.
	* graphite-dependences.c: Likewise.
	* graphite-interchange.c: Likewise.
	* graphite-poly.h: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* graphite.c: Likewise.
	* graphite-scop-detection.c: Re-arrange includes.
	* graphite-cloog-util.c: Remove.
	* graphite-cloog-util.h: Likewise.
	* graphite-ppl.h: Likewise.
	* graphite-ppl.c: Likewise.
	* graphite-dependences.h: Likewise.

	libgomp/
	* testsuite/libgomp.graphite/force-parallel-4.c: Adjust.
	* testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-8.c: Likewise.

Co-Authored-By: Michael Matz <matz@suse.de>
Co-Authored-By: Sebastian Pop <sebpop@gmail.com>
Co-Authored-By: Tobias Grosser <tobias@grosser.es>

From-SVN: r189156
2012-07-02 11:43:46 +00:00
Andreas Schwab e6fdc91823 * libgomp.texi: Include gpl_v3.texi instead of gpl.texi.
From-SVN: r189041
2012-06-28 09:01:38 +00:00
Richard Guenther 62e0a1ed43 [multiple changes]
2012-06-22  Richard Guenther  <rguenther@suse.de>

	Merge from graphite branch
	2011-08-10  Sebastian Pop <sebpop@gmail.com>
    
	* graphite-sese-to-poly.c (build_scop_drs): Fix memory leak.

	2012-01-13  Tobias Grosser  <tobias@grosser.es>

	* tree-flow.h (parallelized_function_p): Declare.
	* tree-parloops.c (parallelized_function_p): Export.
	* graphite.c (graphite_transform_loops): Do not run graphite on
	already parallel functions.

	libgomp/
	* testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
	* testsuite/libgomp.graphite/force-parallel-2.c: Likewise.

From-SVN: r188885
2012-06-22 12:29:33 +00:00
Jakub Jelinek 26127932dd re PR c/53580 (Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives)
PR middle-end/53580
	* omp-low.c (scan_omp): Change first argument to
	gimple_seq *, call walk_gimple_seq_mod instead of
	walk_gimple_seq.
	(scan_sharing_clauses, scan_omp_parallel, scan_omp_task,
	scan_omp_for, scan_omp_sections, scan_omp_single,
	execute_lower_omp): Adjust callers.
	(scan_omp_1_stmt): Likewise.  If check_omp_nesting_restrictions
	returns false, replace stmt with GIMPLE_NOP.
	(check_omp_nesting_restrictions): Instead of issuing warnings,
	issue errors and return false if any errors were reported.

	* gcc.dg/gomp/nesting-1.c: Expect errors rather than warnings.
	* gcc.dg/gomp/critical-4.c: Likewise.
	* gfortran.dg/gomp/appendix-a/a.35.1.f90: Likewise.
	* gfortran.dg/gomp/appendix-a/a.35.3.f90: Likewise.
	* gfortran.dg/gomp/appendix-a/a.35.4.f90: Likewise.
	* gfortran.dg/gomp/appendix-a/a.35.6.f90: Likewise.
	* c-c++-common/gomp/pr53580.c: New test.

	* testsuite/libgomp.c/pr26943-2.c: Remove #pragma omp barrier,
	use GOMP_barrier () call instead.
	* testsuite/libgomp.c/pr26943-3.c: Likewise.
	* testsuite/libgomp.c/pr26943-4.c: Likewise.
	* testsuite/libgomp.fortran/vla4.f90: Remove !$omp barrier,
	call GOMP_barrier instead.
	* testsuite/libgomp.fortran/vla5.f90: Likewise.

From-SVN: r188298
2012-06-07 08:36:55 +02:00
Jakub Jelinek 43fa5db598 re PR libgomp/52993 (gomp_init_nest_lock_25: possible bad call to memset)
PR libgomp/52993
	* config/linux/lock.c (gomp_init_nest_lock_25): Fix up last
	argument to memset call.

From-SVN: r188276
2012-06-06 20:31:06 +02:00
H.J. Lu e6d5f8c9c4 Regenerate configure files for libtool.m4 change
boehm-gc/

	* configure: Regenerated.

gcc/

	* configure: Regenerated.

libatomic/

	* configure: Regenerated.

libffi/

	* configure: Regenerated.

libgfortran/

	* configure: Regenerated.

libgomp/

	* configure: Regenerated.

libitm/

	* configure: Regenerated.

libjava/classpath/

	* configure: Regenerated.

libjava/

	* configure: Regenerated.

libmudflap/

	* configure: Regenerated.

libobjc/

	* configure: Regenerated.

libquadmath/

	* configure: Regenerated.

libssp/

	* configure: Regenerated.

libstdc++-v3/

	* configure: Regenerated.

lto-plugin/

	* configure: Regenerated.

zlib/

	* configure: Regenerated.

From-SVN: r187616
2012-05-16 15:11:18 -07:00
Manuel López-Ibáñez 559d990c3c prune.exp (TEST_ALWAYS_FLAGS): If undefined, set to empty.
2012-04-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>

testsuite/
	* lib/prune.exp (TEST_ALWAYS_FLAGS): If undefined, set to empty.
libgomp/
	* testsuite/lib/libgomp.exp: Add -fno-diagnostics-show-caret.

From-SVN: r186353
2012-04-11 20:15:35 +00:00
H.J. Lu b9c23a61a8 Handle -mx32 like -m64
libgomp/

2012-03-31  H.J. Lu  <hongjiu.lu@intel.com>

	PR bootstrap/52812
	* configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.

libitm/

2012-03-31  H.J. Lu  <hongjiu.lu@intel.com>

	PR bootstrap/52812
	* configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.

From-SVN: r186050
2012-03-31 14:08:22 -07:00
Jakub Jelinek c140ddf392 re PR middle-end/52547 (ICE with openmp with nested function which requires a trampoline)
PR middle-end/52547
	* tree-nested.c (convert_tramp_reference_stmt): Call declare_vars
	on any new_local_var_chain vars declared during recursing on
	GIMPLE_OMP_PARALLEL or GIMPLE_OMP_TASK body.

	* testsuite/libgomp.c/pr52547.c: New test.

From-SVN: r185707
2012-03-22 20:25:36 +01:00
Bernhard Reutner-Fischer 6a26a74d8e lib{gomp,itm}/testsuite: load missing fortran-modules.exp
libgomp/ChangeLog
2012-03-16  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>

	* testsuite/lib/libgomp.exp: load fortran-modules.exp

libitm/ChangeLog
2012-03-16  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>

	* testsuite/lib/libitm.exp: load fortran-modules.exp

From-SVN: r185460
2012-03-16 10:51:06 +01:00
Rainer Orth b24513a1a2 Remove obsolete IRIX 6.5 support
libstdc++-v3:
	* configure.host (irix6.5*): Remove.
	* config/os/irix: Remove.
	* config/io/basic_file_stdio.cc (__basic_file<char>::showmanyc())
	[_GLIBCXX_FIONREAD_TAKES_OFF_T]: Remove.

	* doc/xml/faq.xml: Remove IRIX reference.
	* doc/xml/manual/using.xml (Finding Dynamic or Shared Libraries):
	Remove IRIX example.

	* testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
	Remove mips-sgi-irix6* handling.
	* testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
	* testsuite/21_strings/basic_string/pthread18185.cc: Likewise.
	* testsuite/21_strings/basic_string/pthread4.cc: Likewise.
	* testsuite/22_locale/locale/cons/12658_thread-1.cc: Likewise.
	* testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise.
	* testsuite/23_containers/list/pthread1.cc: Likewise.
	* testsuite/23_containers/list/pthread5.cc: Likewise.
	* testsuite/23_containers/map/pthread6.cc: Likewise.
	* testsuite/23_containers/vector/debug/multithreaded_swap.cc: Likewise.
	* testsuite/27_io/basic_ofstream/pthread2.cc: Likewise.
	* testsuite/27_io/basic_ostringstream/pthread3.cc: Likewise.
	* testsuite/30_threads/async/42819.cc: Likewise.
	* testsuite/30_threads/async/49668.cc: Likewise.
	* testsuite/30_threads/async/any.cc: Likewise.
	* testsuite/30_threads/async/async.cc: Likewise.
	* testsuite/30_threads/async/launch.cc: Likewise.
	* testsuite/30_threads/async/sync.cc: Likewise.
	* testsuite/30_threads/call_once/39909.cc: Likewise.
	* testsuite/30_threads/call_once/49668.cc: Likewise.
	* testsuite/30_threads/call_once/call_once1.cc: Likewise.
	* testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
	* testsuite/30_threads/condition_variable/members/1.cc: Likewise.
	* testsuite/30_threads/condition_variable/members/2.cc: Likewise.
	* testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
	Likewise.
	* testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
	* testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
	* testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
	* testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
	* testsuite/30_threads/future/cons/move.cc: Likewise.
	* testsuite/30_threads/future/members/45133.cc: Likewise.
	* testsuite/30_threads/future/members/get.cc: Likewise.
	* testsuite/30_threads/future/members/get2.cc: Likewise.
	* testsuite/30_threads/future/members/share.cc: Likewise.
	* testsuite/30_threads/future/members/valid.cc: Likewise.
	* testsuite/30_threads/future/members/wait.cc: Likewise.
	* testsuite/30_threads/future/members/wait_for.cc: Likewise.
	* testsuite/30_threads/future/members/wait_until.cc: Likewise.
	* testsuite/30_threads/lock/1.cc: Likewise.
	* testsuite/30_threads/lock/2.cc: Likewise.
	* testsuite/30_threads/lock/3.cc: Likewise.
	* testsuite/30_threads/lock/4.cc: Likewise.
	* testsuite/30_threads/lock_guard/cons/1.cc: Likewise.
	* testsuite/30_threads/mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
	* testsuite/30_threads/mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
	* testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
	* testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/packaged_task/49668.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
	* testsuite/30_threads/promise/cons/1.cc: Likewise.
	* testsuite/30_threads/promise/cons/alloc.cc: Likewise.
	* testsuite/30_threads/promise/cons/move.cc: Likewise.
	* testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
	* testsuite/30_threads/promise/members/get_future.cc: Likewise.
	* testsuite/30_threads/promise/members/get_future2.cc: Likewise.
	* testsuite/30_threads/promise/members/set_exception.cc: Likewise.
	* testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
	* testsuite/30_threads/promise/members/set_value.cc: Likewise.
	* testsuite/30_threads/promise/members/set_value2.cc: Likewise.
	* testsuite/30_threads/promise/members/set_value3.cc: Likewise.
	* testsuite/30_threads/promise/members/swap.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
	Likewise.
	* testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
	Likewise.
	* testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/shared_future/cons/move.cc: Likewise.
	* testsuite/30_threads/shared_future/members/45133.cc: Likewise.
	* testsuite/30_threads/shared_future/members/get.cc: Likewise.
	* testsuite/30_threads/shared_future/members/get2.cc: Likewise.
	* testsuite/30_threads/shared_future/members/valid.cc: Likewise.
	* testsuite/30_threads/shared_future/members/wait.cc: Likewise.
	* testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
	* testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
	* testsuite/30_threads/this_thread/1.cc: Likewise.
	* testsuite/30_threads/this_thread/2.cc: Likewise.
	* testsuite/30_threads/this_thread/3.cc: Likewise.
	* testsuite/30_threads/this_thread/4.cc: Likewise.
	* testsuite/30_threads/thread/cons/1.cc: Likewise.
	* testsuite/30_threads/thread/cons/2.cc: Likewise.
	* testsuite/30_threads/thread/cons/3.cc: Likewise.
	* testsuite/30_threads/thread/cons/4.cc: Likewise.
	* testsuite/30_threads/thread/cons/49668.cc: Likewise.
	* testsuite/30_threads/thread/cons/5.cc: Likewise.
	* testsuite/30_threads/thread/cons/6.cc: Likewise.
	* testsuite/30_threads/thread/cons/7.cc: Likewise.
	* testsuite/30_threads/thread/cons/8.cc: Likewise.
	* testsuite/30_threads/thread/cons/9.cc: Likewise.
	* testsuite/30_threads/thread/cons/moveable.cc: Likewise.
	* testsuite/30_threads/thread/members/1.cc: Likewise.
	* testsuite/30_threads/thread/members/2.cc: Likewise.
	* testsuite/30_threads/thread/members/3.cc: Likewise.
	* testsuite/30_threads/thread/members/4.cc: Likewise.
	* testsuite/30_threads/thread/members/5.cc: Likewise.
	* testsuite/30_threads/thread/members/hardware_concurrency.cc: Likewise.
	* testsuite/30_threads/thread/native_handle/typesizes.cc: Likewise.
	* testsuite/30_threads/thread/swap/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise.
	* testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
	* testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/try_lock/1.cc: Likewise.
	* testsuite/30_threads/try_lock/2.cc: Likewise.
	* testsuite/30_threads/try_lock/3.cc: Likewise.
	* testsuite/30_threads/try_lock/4.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
	* testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
	* testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise.
	* testsuite/ext/rope/pthread7-rope.cc: Likewise.
	* testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc:
	Likewise.
	* testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc:
	Likewise.

	* testsuite/23_containers/vector/capacity/resize/1.cc: Remove
	dg-options for mips*-*-irix6*.

	* testsuite/27_io/ios_base/storage/1.cc: Likewise.
	* testsuite/27_io/ios_base/storage/2.cc: Likewise.
	* testsuite/27_io/ios_base/storage/3.cc: Likewise.

	* testsuite/lib/libstdc++.exp (v3-build_support): Remove IRIX 6
	workaround.

	libjava:
	* configure.ac (libgcj_cv_exidx): Remove IRIX 6 ld workaround.
	(mips-sgi-irix6*): Remove.
	(mips-sgi-irix*): Remove.
	(AC_CHECK_HEADERS): Remove bstring.h.
	* configure: Regenerate.
	* include/config.h.in: Regenerate.
	* configure.host (mips-sgi-irix6*): Remove.

	* include/posix-signal.h [__sgi__]: Remove.

	* gnu/java/net/natPlainDatagramSocketImplPosix.cc
	[HAVE_BSTRING_H]: Remove.
	* gnu/java/net/natPlainDatagramSocketImplWin32.cc: Likewise.
	* gnu/java/net/natPlainSocketImplPosix.cc: Likewise.

	libitm:
	* configure.tgt (*-*-irix6*): Remove.

	libgomp:
	* configure.tgt (mips-sgi-irix6*): Remove.

	libgfortran:
	* intrinsics/c99_functions.c [__sgi__ && !HAVE_COMPLEX_H]: Remove.

	libgcc:
	* config.host (mips-sgi-irix6.5*): Remove.
	* config/mips/irix-crti.S: Remove.
	* config/mips/irix-crtn.S: Remove.
	* config/mips/irix6-unwind.h: Remove.
	* config/mips/t-irix6: Remove.
	* config/mips/t-slibgcc-irix: Remove.

	gnattools:
	* configure.ac (mips-sgi-irix*): Remove.
	* configure: Regenerate.

	gcc/testsuite:
	* g++.dg/other/anon5.C: Don't skip on mips-sgi-irix*.
	* g++.dg/tree-prof/partition1.C: Likewise.
	* g++.dg/tree-prof/partition2.C: Likewise.
	* g++.old-deja/g++.other/init19.C: Remove mips-sgi-irix*
	handling.
	* gcc.c-torture/compile/labels-3.c: Remove dg-options.
	* gcc.c-torture/execute/20010724-1.c: Remove.
	* gcc.c-torture/execute/20010724-1.x: Remove.
	* gcc.c-torture/execute/20040208-2.c: Remove.
	* gcc.c-torture/execute/20040208-2.x: Remove.
	* gcc.c-torture/execute/ieee/20000320-1.c [__mips__ && __sgi__]:
	Remove.
	(main) [__mips__ && __sgi__]: Remove.
	* gcc.c-torture/execute/ieee/copysign1.c: Remove IRIX reference.
	* gcc.c-torture/execute/ieee/copysign2.c: Likewise.
	* gcc.c-torture/execute/ieee/mul-subnormal-single-1.x: Remove
	mips-sgi-irix6* handling.
	* gcc.dg/cpp/assert4.c [__mips__]: Remove __sgi__, sgi.
	* gcc.dg/torture/20090618-1.c: Don't skip on mips-sgi-irix*.
	* gcc.dg/torture/builtin-frexp-1.c: Remove mips*-*-irix6*
	handling.
	* gcc.dg/torture/builtin-logb-1.c: Likewise.
	* gcc.dg/torture/pr47917.c: Remove mips-sgi-irix6.5 handling.
	* gcc.dg/tree-ssa/ssa-store-ccp-3.c: Don't skip on mips*-*-irix*.
	* gcc.misc-tests/linkage.exp: Remove mips-sgi-irix6* handling.
	* gcc.target/mips/args-1.c [!__sgi__]: Remove.
	* gcc.target/mips/interrupt_handler-2.c: Don't skip on
	mips-sgi-irix6*.
	* gcc.target/mips/interrupt_handler-3.c: Likewise.
	* gcc.target/mips/save-restore-1.c: Don't skip on mips-sgi-irix6*.
	* gcc.target/mips/save-restore-3.c: Likewise.
	* gcc.target/mips/save-restore-4.c: Likewise.
	* gcc.target/mips/save-restore-5.c: Likewise.
	* gfortran.dg/g77/cabs.f: Don't xfail on mips-sgi-irix6*.
	* lib/prune.exp (prune_gcc_output): Remove pruning of IRIX 6 ld
	messages.
	* lib/target-libpath.exp (set_ld_library_path_env_vars): Remove
	IRIX 6 handling.
	(restore_ld_library_path_env_vars): Likewise.
	* lib/target-supports.exp (check_profiling_available): Remove
	mips*-*-irix* handling.
	(check_ascii_locale_available): Remove mips-sgi-irix* handling.
	(add_options_for_c99_runtime): Remove mips-sgi-irix6.5* handling.
	* objc.dg/stabs-1.m: Don't xfail on mips-sgi-irix6.5.

	gcc/ada:
	* gcc-interface/Makefile.in (mips-sgi-irix6*): Remove.

	* a-intnam-irix.ads, mlib-tgt-specific-irix.adb,
	s-intman-irix.adb, s-mastop-irix.adb, s-osinte-irix.adb,
	s-osinte-irix.ads, s-proinf-irix-athread.adb,
	s-proinf-irix-athread.ads, s-taprop-irix.adb, s-tasinf-irix.ads,
	system-irix-n32.ads, system-irix-n64.ads, system-irix-o32.ads:
	Remove.

	* adaint.c [__mips && __sgi]: Remove.
	(__gnat_number_of_cpus) [__mips && __sgi]: Remove.
	[IS_CROSS && !(__mips && __sgi)]: Remove.
	* adaint.h [sgi && _LFAPI]: Remove.
	* cstreams.c (__gnat_full_name) [sgi]: Remove.
	* env.c (__gnat_unsetenv) [__mips && __sgi]: Remove.
	(__gnat_clearenv) [__mips && __sgi]: Remove.
	* errno.c (_SGI_MP_SOURCE): Remove.
	* gsocket.h [sgi]: Remove.
	* init.c: Remove IRIX reference.
	[sgi]: Remove.
	* link.c [sgi]: Remove.
	* s-oscons-tmplt.c [__mips && __sgi] (IOV_MAX): Don't define.
	(main) [__mips && __sgi] (MAX_tv_sec): Don't define.
	(CLOCK_SGI_FAST, CLOCK_SGI_CYCLE): Remove.
	* sysdep.c [sgi]: Remove.
	(getc_immediate_common) [sgi]: Remove.
	(__gnat_localtime_tzoff) [sgi]: Remove.
	* terminals.c [__mips && __sgi] (IRIX): Don't define.
	[IRIX] (USE_GETPTY): Don't define.
	(allocate_pty_desc) [USE_GETPTY]: Remove.

	* g-traceb.ads: Remove IRIX reference.
	* g-trasym.ads: Likewise.
	* memtrack.adb: Likewise.
	* s-interr-sigaction.adb: Likewise.

	* gnat_rm.texi (Implementation Advice): Remove SGI info.
	(Implementation Defined Characteristics): Likewise.
	* gnat_ugn.texi (Summary of Run-Time Configurations, mips-irix):
	Remove.
	(Irix-Specific Considerations): Remove.

	gcc/cp:
	* Make-lang.in (doc/g++.1): Remove IRIX 6.5 reference.

	gcc:
	* config.gcc (enable_obsolete): Remove mips-sgi-irix6.5.
	(mips-sgi-irix6.5*): Remove.
	* config.host (mips-sgi-irix*): Remove.
	* configure.ac (enable_fixed_point): Remove mips*-sgi-irix*.
	(set_have_as_tls): Remove *-*-irix6*.
	(gcc_cv_ld_static_dynamic): Remove mips-sgi-irix6*.
	* configure: Regenerate.

	* config/mips/iris6.h: Remove.
	* config/mips/iris6.opt: Remove.
	* config/mips/t-irix6: Remove.

	* config/mips/mips.h (TARGET_GPWORD): Remove IRIX 6 N64 handling.
	(TARGET_IRIX6): Remove.
	(TARGET_CPU_CPP_BUILTINS): Remove IRIX 6 handling.
	Don't define LANGUAGE_C, _LANGUAGE_C for Objective-C.
	* config/mips/mips.c (mips_build_builtin_va_list): Remove IRIX 6
	handling.
	(mips_file_start): Likewise.
	* config/mips/mips-protos.h (irix_asm_output_align): Remove.

	* config/mips/driver-native.c [__sgi__]: Remove.
	(host_detect_local_cpu) [__sgi__]: Remove.

	* config/mips/gnu-user.h: Remove iris5.h reference.

	* config/mips/mips-modes.def: Remove IRIX 6 reference.
	* config/mips/gnu-user64.h (MIPS_TFMODE_FORMAT): Remove.
	* config/mips/mips.c (mips_option_override) [MIPS_TFMODE_FORMAT]:
	Remove.

	* gcc.c (main): Move asm_debug initialization ...
	(asm_debug): ... here.

	* ginclude/stddef.h (__STDDEF_H__): Don't define.

	* defaults.h (LINK_ELIMINATE_DUPLICATE_LDIRECTORIES): Remove.
	* system.h (LINK_ELIMINATE_DUPLICATE_LDIRECTORIES): Poison.
	* collect2.c [LINK_ELIMINATE_DUPLICATE_LDIRECTORIES]: Remove.
	(main) [LINK_ELIMINATE_DUPLICATE_LDIRECTORIES]: Remove.
	[LINK_ELIMINATE_DUPLICATE_LDIRECTORIES] (is_in_args): Remove.
	* doc/tm.texi.in (Driver, LINK_ELIMINATE_DUPLICATE_LDIRECTORIES):
	Remove.
	* doc/tm.texi: Regenerate.

	* doc/invoke.texi (Debugging Options, -gdwarf-<version>): Remove
	IRIX 6 reference.
	(MIPS Options, -march): Remove IRIX reference.
	* doc/install.texi (Binaries, SGI IRIX): Remove.
	(Specific, mips-sgi-irix6): Document IRIX 6.5 removal, remove rest
	of section.
	* doc/trouble.texi (Interoperation): Remove -lgl_s handling.

	fixincludes:
	* inclhack.def (broken_cabs): Remove IRIX and SunOS 4 support.
	(irix___restrict): Remove.
	(irix___generic1): Remove.
	(irix___generic2): Remove.
	(irix_asm_apostrophe): Remove.
	(irix_complex): Remove.
	(irix_pthread_init): Remove.
	(irix_socklen_t): Remove.
	(irix_stdint_c99_mode): Remove.
	(irix_stdint_c99_types): Remove.
	(irix_stdint_c99_macros): Remove.
	(irix_stdio_va_list): Remove IRIX 6.5 support.
	(irix_wcsftime): Remove.
	(stdio_va_list): Remove IRIX 6.5 support.
	(svr4_profil): Remove IRIX bypass.
	* fixincl.x: Regenerate.

	* tests/base/complex.h [IRIX_COMPLEX_CHECK]: Remove.
	* tests/base/internal/math_core.h: Remove.
	* tests/base/internal/sgimacros.h: Remove.
	* tests/base/internal/wchar_core.h: Remove.
	* tests/base/math.h [BROKEN_CABS_CHECK]: Remove IRIX and SunOS 4
	support.
	* tests/base/pthread.h [IRIX_PTHREAD_INIT_CHECK]: Remove.
	* tests/base/stdint-irix65.h: Remove.
	* tests/base/stdint.h [IRIX_STDINT_C99_MODE_CHECK]: Remove.
	* tests/base/sys/asm.h: Remove.
	* tests/base/sys/socket.h [IRIX_SOCKLEN_T_CHECK]: Remove.

	contrib:
	* config-list.mk (LIST): Remove mips-sgi-irix6.5.

	toplevel:
	* MAINTAINERS (OS Port Maintainers): Remove irix.
	* configure.ac (enable_libgomp): Remove *-*-irix6*.
	(unsupported_languages): Remove mips-sgi-irix6.*.
	(noconfigdirs): Don't add ${libgcj} for mips*-*-irix6*.
	(with_stabs): Remove.
	* configure: Regenerate.

From-SVN: r185390
2012-03-14 16:33:37 +00:00
Rainer Orth 5c30094f48 Remove obsolete Tru64 UNIX V5.1B support
libstdc++-v3:
	* configure.host: Remove osf* handling.
	* config/os/osf: Remove.
	* doc/xml/manual/using.xml: Remove OSF reference.

	* testsuite/18_support/pthread_guard.cc: Remove alpha*-*-osf*
	handling.
	* testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc:
	Likewise.
	* testsuite/21_strings/basic_string/pthread18185.cc: Likewise.
	* testsuite/21_strings/basic_string/pthread4.cc: Likewise.
	* testsuite/22_locale/locale/cons/12658_thread-1.cc: Likewise.
	* testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise.
	* testsuite/23_containers/list/pthread1.cc: Likewise.
	* testsuite/23_containers/list/pthread5.cc: Likewise.
	* testsuite/23_containers/map/pthread6.cc: Likewise.
	* testsuite/23_containers/vector/debug/multithreaded_swap.cc:
	Likewise.
	* testsuite/27_io/basic_ofstream/pthread2.cc: Likewise.
	* testsuite/27_io/basic_ostringstream/pthread3.cc: Likewise.
	* testsuite/30_threads/async/42819.cc: Likewise.

	* libstdc++-v3/testsuite/30_threads/async/49668.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/async/any.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/async/async.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/async/launch.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/async/sync.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/call_once/39909.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/call_once/49668.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/call_once/call_once1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/condition_variable/cons/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/condition_variable/members/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/condition_variable/members/2.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/condition_variable_any/members/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/condition_variable_any/members/2.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/future/cons/move.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/future/members/45133.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/future/members/get.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/future/members/get2.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/future/members/share.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/future/members/valid.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/future/members/wait.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/lock/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/lock/2.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/lock/3.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/lock/4.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/mutex/dest/destructor_locked.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/mutex/unlock/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/promise/cons/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/promise/cons/move.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/promise/members/swap.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_mutex/lock/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/2.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/this_thread/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/this_thread/2.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/this_thread/3.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/this_thread/4.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/cons/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/cons/2.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/cons/3.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/cons/4.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/cons/5.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/cons/6.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/cons/7.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/cons/8.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/cons/9.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/cons/moveable.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/members/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/members/2.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/members/3.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/members/4.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/members/5.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/members/hardware_concurrency.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/thread/swap/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/try_lock/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/try_lock/2.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/try_lock/3.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/try_lock/4.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
	* libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/1.cc:
	Likewise.
	* libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/2.cc:
	Likewise.
	* libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc: Likewise.
	* libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc:
	Likewise.
	* libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.

	libobjc:
	* configure.ac (enable_objc_gc): Remove alpha*-dec-osf* handling.
	* configure: Regenerate.

	* thr.c (_XOPEN_SOURCE): Define unconditionally.

	libjava:
	* configure.ac (alpha*-dec-osf*): Remove.
	* configure: Regenerate.
	* configure.host (alpha*-dec-osf*): Remove.

	* gnu/java/net/natPlainDatagramSocketImplPosix.cc (setOption): Use
	IPV6_MULTICAST_IF unconditionally.
	* gnu/java/net/natPlainDatagramSocketImplWin32.cc (setOption):
	Likewise.
	* gnu/java/net/natPlainSocketImplPosix.cc
	(gnu::java::net::PlainSocketImpl::accept): Use ::accept instead of
	_Jv_accept.
	* include/posix-signal.h [__alpha__ && __osf__]: Remove.
	* include/posix.h (_POSIX_PII_SOCKET): Don't define.
	(_Jv_accept): Remove.

	* java/io/File.java (File._access): Rename to access.
	Change callers.
	(File._stat): Likewise.
	* java/io/File.h: Regenerate.
	* classpath/lib/java/io/File.class: Regenerate.
	* java/io/natFilePosix.cc (java::io::File::_access): Rename to
	access.
	(java::io::File::_stat): Rename to stat.
	* java/io/natFileWin32.cc: Likewise.

	* testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation):
	Remove alpha*-dec-osf* handling.
	* testsuite/libjava.jvmti/jvmti-interp.exp
	(gcj_jni_compile_c_to_so): Likewise.
	* testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o):
	Likewise.

	libitm:
	* configure.tgt (*-*-osf*): Remove.
	* configure: Regenerate.

	libgomp:
	* configure.tgt (alpha*-dec-osf*): Remove.

	* config/osf/sem.h: Remove.
	* config/posix/lock.c (_XOPEN_SOURCE): Define unconditionally.

	libgfortran:
	* configure.ac: Remove Tru64 reference.
	* acinclude.m4 (LIBGFOR_GTHREAD_WEAK): Remove alpha*-dec-osf*
	handling.
	* configure: Regenerate.
	* intrinsics/c99_functions.c [__osf__]: Remove.

	libgcc:
	* config.host: Remove alpha*-dec-osf5.1* handling.
	* config/alpha/gthr-posix.c: Remove.
	* config/alpha/libgcc-osf5.ver: Remove.
	* config/alpha/osf5-unwind.h: Remove.
	* config/alpha/t-osf-pthread: Remove.
	* config/alpha/t-slibgcc-osf: Remove.
	* config/t-crtfm (crtfastmath.o): Remove -frandom-seed.
	* gthr-posix.h [!_REENTRANT && __osf__] (_REENTRANT): Don't define.
	[__osf__ && _PTHREAD_USE_MANGLED_NAMES_]: Remove.
	* mkmap-flat.awk: Remove osf_export handling.

	gnattools:
	* configure.ac: Remove alpha*-dec-osf* handling.
	* configure: Regenerate.

	gcc/testsuite:
	* g++.dg/abi/rtti3.C: Remove alpha*-dec-osf* handling.
	* g++.dg/abi/thunk4.C: Likewise.
	* g++.dg/cdce3.C: Don't skip on*-dec-osf5*.
	Adapt line numbers.
	* g++.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf*
	handling.
	* g++.dg/cpp0x/constexpr-rom.C: Likewise.
	* g++.dg/eh/spbp.C: Likewise.
	* g++.dg/ext/label13.C: Likewise.
	* g++.dg/guality/guality.exp: Likewise.
	* g++.dg/other/anon5.C: Likewise.
	* g++.dg/other/pragma-ep-1.C: Remove.
	* g++.dg/warn/miss-format-1.C: Remove alpha*-dec-osf* handling.
	* g++.dg/warn/pr31246.C: Likewise.
	* g++.dg/warn/weak1.C: Likewise.
	* g++.old-deja/g++.eh/badalloc1.C: Likewise.
	* g++.old-deja/g++.ext/attrib5.C: Likewise.
	* gcc.c-torture/compile/limits-declparen.c: Likewise.
	* gcc.c-torture/compile/limits-pointer.c: Likewise.
	* gcc.c-torture/execute/20001229-1.c: Remove __osf__ handling.
	* gcc.dg/attr-weakref-1.c: Remove alpha*-dec-osf* handling.
	* gcc.dg/c99-stdint-6.c: Remove alpha*-dec-osf5* handling.
	* gcc.dg/c99-tgmath-1.c: Likewise.
	* gcc.dg/c99-tgmath-2.c: Likewise.
	* gcc.dg/c99-tgmath-3.c: Likewise.
	* gcc.dg/c99-tgmath-4.c: Likewise.
	* gcc.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf*
	handling.
	* gcc.dg/debug/pr49032.c: Likewise.
	* gcc.dg/guality/guality.exp: Likewise.
	* gcc.dg/intmax_t-1.c: Likewise.
	* gcc.dg/pr48616.c: Likewise.
	* gcc.dg/pragma-ep-1.c: Remove.
	* gcc.dg/pragma-ep-2.c: Remove.
	* gcc.dg/pragma-ep-3.c: Remove.
	* gcc.dg/torture/pr47917.c: Remove alpha*-dec-osf5* handling.
	* gcc.dg/tree-ssa/pr42585.c: Remove alpha*-dec-osf* handling.
	* gcc.misc-tests/gcov-14.c: Likewise.
	* gfortran.dg/guality/guality.exp: Likewise.
	* lib/target-supports.exp (check_weak_available): Likewise.
	(add_options_for_tls): Likewise.
	(check_ascii_locale_available): Likewise.
	* obj-c++.dg/dwarf-2.mm: Likewise.
	* objc.dg/dwarf-1.m: Likewise.
	* objc.dg/dwarf-2.m: Likewise.

	gcc/c-family:
	* c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
	handling.
	* c-pragma.c (handle_pragma_extern_prefix): Remove.
	(init_pragma): Don't register extern_prefix.

	gcc/po:
	* EXCLUDES (mips-tdump.c, mips-tfile.c): Remove.

	gcc:
	* config.gcc (alpha*-dec-osf5.1*): Remove.
	* config.host (alpha*-dec-osf*): Remove.
	* configure.ac (*-*-osf*): Remove.
	(alpha*-dec-osf*): Remove.
	* configure: Regenerate.

	* config/alpha/host-osf.c, config/alpha/osf5.h,
	config/alpha/osf5.opt, config/alpha/va_list.h, config/alpha/x-osf:
	Remove.

	* config/alpha/alpha.h (TARGET_LD_BUGGY_LDGP): Remove.
	* config/alpha/alpha.c (struct machine_function): Update comment.
	(alpha_start_function): Remove Tru64 UNIX as handling for
	max_frame_size.
	* config/alpha/alpha.md ("exception_receiver"): Remove
	TARGET_LD_BUGGY_LDGP.
	("*exception_receiver_2"): Likewise.
	* except.c (finish_eh_generation): Remove Tru64 reference.
	* ginclude/stdarg.h [_HIDDEN_VA_LIST]: Don't undef _VA_LIST.
	* system.h (TARGET_HANDLE_PRAGMA_EXTERN_PREFIX): Poison.
	* target.def (handle_pragma_extern_prefix): Remove.

	* Makefile.in (mips-tfile.o-warn): Remove.
	(ALL_HOST_BACKEND_OBJS): Remove mips-tfile.o, mips-tdump.o.
	(mips-tfile, mips-tfile.o, mips-tdump, mips-tdump.o): Remove.
	* mips-tdump.c, mips-tfile.c: Remove.

	* doc/extend.texi (Symbol-Renaming Pragmas): Remove #pragma
	extern_prefix.
	* doc/install.texi (Binaries): Remove Tru64 UNIX reference.
	(Specific, alpha*-dec-osf5.1): Note removal.
	* doc/tm.texi.in (Misc, TARGET_HANDLE_PRAGMA_EXTERN_PREFIX):
	Remove.
	* doc/tm.texi: Regenerate.
	* doc/trouble.texi (Cross-Compiler Problems): Remove.

	gcc/ada:
	* gcc-interface/Makefile.in (alpha*-dec-osf*): Remove.
	* a-intnam-tru64.ads, mlib-tgt-specific-tru64.adb,
	s-mastop-tru64.adb, s-osinte-tru64.adb, s-osinte-tru64.ads,
	s-taprop-tru64.adb, s-tasinf-tru64.ads, s-taspri-tru64.ads,
	system-tru64.ads: Remove.

	* adaint.c (__gnat_number_of_cpus) [__alpha__ && __osf__]:
	Remove.
	[IS_CROSS] [!(__alpha__ && __osf__)]: Remove.
	* env.c [__alpha__ && __osf__]: Remove.
	* gsocket.h (_OSF_SOURCE): Remove.
	(HAVE_THREAD_SAFE_GETxxxBYyyy) [__osf__]: Remove.
	* init.c [__alpha__ && __osf__]: Remove.
	* link.c [__osf__]: Remove.
	* s-oscons-tmplt.c [__alpha__ && __osf__]: Remove.
	[__osf__ && !_SS_MAXSIZE]: Remove.
	* sysdep.c [__osf__]: Remove.
	* terminals.c [__alpha__ && __osf__]: Remove.
	[OSF1]: Remove.

	* g-traceb.ads: Remove Tru64 reference.
	* g-trasym.ads: Likewise.
	* gnat_ugn.texi (Linking a Mixed C++ & Ada Program): Likewise.
	(Summary of Run-Time Configurations): Likewise.
	* memtrack.adb: Likewise.

	fixincludes:
	* inclhack.def (alpha___extern_prefix): Remove.
	(alpha___extern_prefix_standards): Remove.
	(alpha___extern_prefix_sys_stat): Remove.
	(alpha_bad_lval): Remove.
	(alpha_pthread): Remove.
	(alpha_pthread_gcc): Remove.
	(alpha_pthread_init): Remove.
	* fixincl.x: Regenerate.
	* tests/base/pthread.h [ALPHA_PTHREAD_CHECK]: Remove.
	[ALPHA_PTHREAD_GCC_CHECK]: Remove.
	[ALPHA_PTHREAD_INIT_CHECK]: Remove.
	* tests/base/standards.h: Remove.
	* tests/base/sys/stat.h [ALPHA___EXTERN_PREFIX_SYS_STAT_CHECK]:
	Remove.
	* tests/base/testing.h [ALPHA___EXTERN_PREFIX_CHECK]: Remove.
	[ALPHA_BAD_LVAL_CHECK]: Remove.

	contrib:
	* config-list.mk (LIST): Remove alpha-dec-osf5.1.

	config:
	* weakref.m4 (GCC_CHECK_ELF_STYLE_WEAKREF): Remove
	alpha*-dec-osf*.

	toplevel:
	* MAINTAINERS (OS Port Maintainers): Remove osf.
	* configure.ac (enable_libgomp): Remove *-*-osf*.
	(with_stabs): Remove alpha*-*-osf*.
	* configure: Regenerate.

From-SVN: r185240
2012-03-12 15:35:56 +00:00
Eric Botcazou a339c9d606 * config/linux/sparc/futex.h (cpu_relax): Read from CC register.
From-SVN: r184672
2012-02-29 20:49:30 +00:00
Rainer Orth cc2de92d5a Fix Solaris symbol versioning (PR libstdc++/52188)
contrib:
	PR libstdc++/52188
	* make_sunver.pl: Remove #ifdef handling.

	libgomp:
	PR libstdc++/52188
	* acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Remove	symvers_renaming.
	Remove ENABLE_SYMVERS_SOL2.
	* configure: Regenerate.
	* Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB] (comma): New variable.
	(PREPROCESS): New variable.
	(libgomp.ver): New target.
	[LIBGOMP_BUILD_VERSIONED_SHLIB &&
	LIBGOMP_BUILD_VERSIONED_SHLIB_GNU]: Remove
	LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2 handling.
	Use libgomp.ver.
	[LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]: Use libgomp.ver, libgomp.ver-sun.
	* Makefile.in: Regenerate.

	libstdc++-v3:
	PR libstdc++/52188
	* acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Remove symvers_renaming.
	Remove ENABLE_SYMVERS_SOL2.
	* configure: Regenerate.
	* src/Makefile.am [ENABLE_SYMVERS] (libstdc++-symbols.ver):
	Postprocess mapfile.
	[ENABLE_SYMVERS_GNU]: Remove ENABLE_SYMVERS_SOL2 handling.
	* src/Makefile.in: Regenerate.

	* config/abi/pre/gnu.ver (GLIBCXX_3.4.5) [!__sun__ && !__svr4__]:
	Don't export
	_ZNSt19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEppEv.

From-SVN: r184598
2012-02-27 13:51:50 +00:00
Walter Lee dd552284fd Add ports for TILE-Gx and TILEPro.
.
	* MAINTAINERS (tilegx port): Add myself.
	(tilepro port): Add myself.

contrib
	* config-list.mk (LIST): Add tilegx-linux-gnu and
	tilepro-linux-gnu.
	* gcc_update (gcc/config/tilegx/mul-tables.c): New dependencies.
	(gcc/config/tilepro/mul-tables.c): New dependencies.

gcc
	* config.gcc: Handle tilegx and tilepro.
	* configure.ac (gcc_cv_as_dwarf2_debug_line): Enable test for
	tilegx and tilepro.
	Add HAVE_AS_TLS check for tilegx and tilepro.
	* configure: Regenerate.
	* doc/contrib.texi: Add Mat Hostetter and self.
	* doc/extend.texi (TILE-Gx Built-in Functions): New node.
	Document instruction intrinsics and network accessing intrinsics.
	(TILEPro Built-in Functions): New node.	 Document instruction
	intrinsics and network accessing intrinsics.
	* doc/install.texi (Specific, tilegx-*-linux*): Document it.
	(Specific, tilepro-*-linux*): Likewise.
	* doc/invoke.texi (TILE-Gx Options): New section.
	(TILEPro Options): New section.
	* doc/md.texi (TILE-Gx): New section.
	(TILEPro): New section.
	* common/config/tilegx: New directory for tilegx.
	* common/config/tilepro: New directory for tilepro.
	* config/tilegx: New directory for tilegx.
	* config/tilepro: New directory for tilepro.

gcc/testsuite
	* g++.dg/other/PR23205.C: Disable test on tile.
	* g++.dg/other/pr23205-2.C: Disable test on tile.
	* gcc.dg/20020312-2.c: Add a condition for __tile__.
	* gcc.dg/20040813-1.c: Disable test on tile.
	* gcc.dg/lower-subreg-1.c: Disable test on tilegx.
	* gcc.misc-tests/linkage.exp: Handle tilegx.

libcpp
	* configure.ac: Require 64-bit hwint for tilegx and tilepro.
	* configure: Regenerate.

libgcc
	* config.host: Handle tilegx and tilepro.
	* config/tilegx: New directory for tilegx.
	* config/tilepro: New directory for tilepro.

libgomp
	* configure.tgt: Handle tilegx and tilepro.
	* config/linux/tile: New directory for tilegx and tilepro.

Added:
     trunk/gcc/common/config/tilegx/tilegx-common.c
     trunk/gcc/common/config/tilepro/tilepro-common.c
     trunk/gcc/config/tilegx/constraints.md
     trunk/gcc/config/tilegx/linux.h
     trunk/gcc/config/tilegx/mul-tables.c
     trunk/gcc/config/tilegx/predicates.md
     trunk/gcc/config/tilegx/sync.md
     trunk/gcc/config/tilegx/t-tilegx
     trunk/gcc/config/tilegx/tilegx-builtins.h
     trunk/gcc/config/tilegx/tilegx-c.c
     trunk/gcc/config/tilegx/tilegx-generic.md
     trunk/gcc/config/tilegx/tilegx-modes.def
     trunk/gcc/config/tilegx/tilegx-multiply.h
     trunk/gcc/config/tilegx/tilegx-protos.h
     trunk/gcc/config/tilegx/tilegx.c
     trunk/gcc/config/tilegx/tilegx.h
     trunk/gcc/config/tilegx/tilegx.md
     trunk/gcc/config/tilegx/tilegx.opt
     trunk/gcc/config/tilepro/constraints.md
     trunk/gcc/config/tilepro/gen-mul-tables.cc
     trunk/gcc/config/tilepro/linux.h
     trunk/gcc/config/tilepro/mul-tables.c
     trunk/gcc/config/tilepro/predicates.md
     trunk/gcc/config/tilepro/t-tilepro
     trunk/gcc/config/tilepro/tilepro-builtins.h
     trunk/gcc/config/tilepro/tilepro-c.c
     trunk/gcc/config/tilepro/tilepro-generic.md
     trunk/gcc/config/tilepro/tilepro-modes.def
     trunk/gcc/config/tilepro/tilepro-multiply.h
     trunk/gcc/config/tilepro/tilepro-protos.h
     trunk/gcc/config/tilepro/tilepro.c
     trunk/gcc/config/tilepro/tilepro.h
     trunk/gcc/config/tilepro/tilepro.md
     trunk/gcc/config/tilepro/tilepro.opt
     trunk/libgcc/config/tilegx/sfp-machine.h
     trunk/libgcc/config/tilegx/sfp-machine32.h
     trunk/libgcc/config/tilegx/sfp-machine64.h
     trunk/libgcc/config/tilegx/t-crtstuff
     trunk/libgcc/config/tilegx/t-softfp
     trunk/libgcc/config/tilegx/t-tilegx
     trunk/libgcc/config/tilepro/atomic.c
     trunk/libgcc/config/tilepro/atomic.h
     trunk/libgcc/config/tilepro/linux-unwind.h
     trunk/libgcc/config/tilepro/sfp-machine.h
     trunk/libgcc/config/tilepro/softdivide.c
     trunk/libgcc/config/tilepro/softmpy.S
     trunk/libgcc/config/tilepro/t-crtstuff
     trunk/libgcc/config/tilepro/t-tilepro
     trunk/libgomp/config/linux/tile/futex.h
Modified:
     trunk/MAINTAINERS
     trunk/contrib/config-list.mk
     trunk/contrib/gcc_update
     trunk/gcc/config.gcc
     trunk/gcc/configure
     trunk/gcc/configure.ac
     trunk/gcc/doc/contrib.texi
     trunk/gcc/doc/extend.texi
     trunk/gcc/doc/install.texi
     trunk/gcc/doc/invoke.texi
     trunk/gcc/doc/md.texi
     trunk/gcc/testsuite/g++.dg/other/PR23205.C
     trunk/gcc/testsuite/g++.dg/other/pr23205-2.C
     trunk/gcc/testsuite/gcc.dg/20020312-2.c
     trunk/gcc/testsuite/gcc.dg/20040813-1.c
     trunk/gcc/testsuite/gcc.dg/lower-subreg-1.c
     trunk/gcc/testsuite/gcc.misc-tests/linkage.exp
     trunk/libcpp/configure
     trunk/libcpp/configure.ac
     trunk/libgcc/config.host
     trunk/libgomp/configure.tgt

From-SVN: r184203
2012-02-14 10:02:21 +00:00
Richard Guenther 31432e219f re PR tree-optimization/46886 (wrong code with -ftree-parallelize-loops -fno-tree-ch)
2012-03-08  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/46886
	* tree-flow.h (do_while_loop_p): Declare.
	* tree-ssa-loop-ch.c (do_while_loop_p): Export.
	* tree-parloops.c (parallelize_loops): Only parallelize do-while
	loops.

	* testsuite/libgomp.c/pr46886.c: New testcase.

From-SVN: r184010
2012-02-08 15:28:01 +00:00
Matthias Klose b9264b5f91 arm: Remove empty directory.
2012-01-25  Matthias Klose  <doko@ubuntu.com>

        * config/linux/arm: Remove empty directory.
        * configure.tgt (config_path): Remove linux-arm for arm*-*-linux*.

From-SVN: r183516
2012-01-25 12:13:12 +00:00
Alan Modra fbf7be801c re PR libgomp/51376 (libgomp taskwait failure)
PR libgomp/51376
	* task.c (GOMP_taskwait): Don't access task->children outside of
	task_lock mutex region.
	(GOMP_task): Likewise.

From-SVN: r182151
2011-12-09 12:51:43 +10:30
Jakub Jelinek 5de62d003b re PR libgomp/51132 (FAIL: libgomp.graphite/force-parallel-[678].c)
PR libgomp/51132
	* testsuite/libgomp.graphite/force-parallel-1.c: Move large arrays
	to file scope.
	* testsuite/libgomp.graphite/force-parallel-3.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-6.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
	* testsuite/libgomp.graphite/force-parallel-9.c: Likewise.

From-SVN: r182050
2011-12-06 15:32:54 +01:00
Alan Modra 45608a43c4 affinity.c: Use atomic rather than sync builtin.
* config/linux/affinity.c: Use atomic rather than sync builtin.
	* config/linux/lock.c: Likewise.
	* config/linux/ptrlock.h: Likewise.
	* config/linux/ptrlock.c: Likewise.
	* config/linux/ptrlock.h (gomp_ptrlock_set): Always write here..
	* config/linux/ptrlock.c (gomp_ptrlock_set_slow): ..not here.
	* config/linux/futex.h (atomic_write_barrier): Delete unused function.
	* config/linux/alpha/futex.h (atomic_write_barrier): Likewise.
	* config/linux/ia64/futex.h (atomic_write_barrier): Likewise.
	* config/linux/mips/futex.h (atomic_write_barrier): Likewise.
	* config/linux/powerpc/futex.h (atomic_write_barrier): Likewise.
	* config/linux/s390/futex.h (atomic_write_barrier): Likewise.
	* config/linux/sparc/futex.h (atomic_write_barrier): Likewise.
	* config/linux/x86/futex.h (atomic_write_barrier): Likewise.

From-SVN: r181906
2011-12-02 21:24:02 +10:30
Alan Modra ab6dd406ba re PR libgomp/51298 (libgomp team_barrier locking failures)
PR libgomp/51298
	* config/linux/bar.h: Use atomic rather than sync builtins.
	* config/linux/bar.c: Likewise.  Add missing acquire
	synchronisation on generation field.
	* task.c (gomp_barrier_handle_tasks): Regain lock so as to not
	double unlock.

From-SVN: r181833
2011-11-30 15:14:13 +10:30
Alan Modra b40c885f18 ordered.c (gomp_ordered_sync): Add MEMMODEL_ACQ_REL fence.
* ordered.c (gomp_ordered_sync): Add MEMMODEL_ACQ_REL fence.
	* critical.c (GOMP_critical_start): Add MEMMODEL_RELEASE fence.
	* config/linux/mutex.h: Use atomic rather than sync builtins.
	* config/linux/mutex.c: Likewise.  Comment.  Use -1 for waiting state.
	* config/linux/omp-lock.h: Comment fix.
	* config/linux/arm/mutex.h: Delete.
	* config/linux/powerpc/mutex.h: Delete.
	* config/linux/ia64/mutex.h: Delete.
	* config/linux/mips/mutex.h: Delete.

From-SVN: r181832
2011-11-30 14:32:53 +10:30
Alan Modra 3e348fccfa re PR libgomp/51249 (semaphore implemetation for linux leaves threads blocked)
PR libgomp/51249
	* config/linux/sem.h: Rewrite.
	* config/linux/sem.c: Rewrite.

From-SVN: r181831
2011-11-30 14:13:57 +10:30
Richard Henderson cef86eb288 * libgomp.h (enum memmodel): New.
From-SVN: r181794
2011-11-28 18:19:05 -08:00
Andreas Tobler c6084f681e Additional fixes for FreeBSD-10 build:
/:			* libtool.m4: Additional FreeBSD 10 fixes.

boehm-gc/:		* configure: Regenerate.
gcc/:			* configure: Regenerate.
libffi/:		* configure: Regenerate.
libgfortran/:		* configure: Regenerate.
libgomp/:		* configure: Regenerate.
libitm/:		* configure: Regenerate.
libjava/:		* configure.ac: Fix some more FreeBSD 10 issues..
			* configure: Regenerate.
libjava/libltdl/:	* acinclude.m4: Additional FreeBSD 10 fixes.
			* configure: Regenerate.
libmudflap/:		* configure: Regenerate.
libobjc/:		* configure: Regenerate.
libquadmath/:		* configure: Regenerate.
libssp/:		* configure: Regenerate.
libstdc++-v3/:		* configure: Regenerate.
lto-plugin/:		* configure: Regenerate.
zlib/:			* configure: Regenerate.

From-SVN: r181593
2011-11-21 20:22:35 +01:00
Matthias Klose 06fe026c0c posix95: Remove empty directory.
2011-10-10  Matthias Klose  <doko@ubuntu.com>

        * config/posix95: Remove empty directory.

From-SVN: r179771
2011-10-10 19:27:31 +00:00
Jakub Jelinek a6c975bd8e trans-decl.c (get_proc_pointer_decl): Set DECL_TLS_MODEL if threadprivate.
* trans-decl.c (get_proc_pointer_decl): Set DECL_TLS_MODEL
	if threadprivate.
	* symbol.c (check_conflict): Allow threadprivate attribute with
	FL_PROCEDURE if proc_pointer.

	* testsuite/libgomp.fortran/threadprivate4.f90: New test.

From-SVN: r178114
2011-08-26 16:55:05 +02:00
Jakub Jelinek c26dffff5c re PR fortran/49792 (OpenMP workshare: Wrong result with array assignment)
PR fortran/49792
	* trans-expr.c (gfc_trans_assignment_1): Set OMPWS_SCALARIZER_WS
	bit in ompws_flags only if loop.temp_ss is NULL, and clear it if
	lhs needs reallocation.
	* trans-openmp.c (gfc_trans_omp_workshare): Don't return early if
	code is NULL, emit a barrier if workshare emitted no code at all
	and NOWAIT clause isn't present.

	* testsuite/libgomp.fortran/pr49792-1.f90: New test.
	* testsuite/libgomp.fortran/pr49792-2.f90: New test.

From-SVN: r177898
2011-08-19 15:25:22 +02:00
Rainer Orth ddaad3c8b1 configure.ac (THREADS): Remove posix95.
boehm-gc:
	* configure.ac (THREADS): Remove posix95.
	* configure: Regenerate.

	gcc:
	* gthr-posix95.h: Remove.
	* gthr.h [_PTHREADS95]: Remove.
	* configure.ac (enable_threads): Remove posix95.
	* configure: Regenerate.
	* doc/install.texi (Configuration, --enable-threads): Remove
	posix95.

	libgomp:
	* config/posix95/lock.c, posix95/omp-lock.h: Remove.

	libjava:
	* configure.ac (THREADS): Remove posix95.
	* configure: Regenerate.

From-SVN: r177568
2011-08-08 15:39:35 +00:00
Rainer Orth 98d0368392 re PR target/49965 (libgomp.c++/reduction-4.C and libgomp.c++/task-8.C FAIL on Solaris 11/SPARC)
PR libgomp/49965
	* testsuite/libgomp.c++/task-8.C: Replaced err by errval.

From-SVN: r177428
2011-08-05 12:22:10 +00:00
Uros Bizjak e0b23d9fd3 proc.h: New.
* config/linux/proc.h: New.
	* config/linux/proc.c: Include "proc.h".  Do not include <sched.h>.
	(gomp_cpuset_popcount): Rename from cpuset_popcount.  No more static.
	(gomp_init_num_threads): Update call to cpuset_popcount.
	(get_num_procs): Ditto.
	* config/linux/affinity.c (gomp_init_affinity): Call
	gomp_cpuset_popcount.

From-SVN: r177265
2011-08-03 12:46:04 +02:00
Jakub Jelinek 20906c66f2 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause)
Merge from gomp-3_1-branch branch:

2011-08-02  Jakub Jelinek  <jakub@redhat.com>

gcc/
	* c-parser.c (enum c_parser_prec): New enum, moved from within
	c_parser_binary_expression.
	(c_parser_binary_expression): Add PREC argument.  Stop parsing
	if operator has lower or equal precedence than PREC.
	(c_parser_conditional_expression, c_parser_omp_for_loop): Adjust
	callers.
	(c_parser_omp_atomic): Handle parsing OpenMP 3.1 atomics.
	Adjust c_finish_omp_atomic caller.
	(c_parser_omp_taskyield): New function.
	(c_parser_pragma): Handle PRAGMA_OMP_TASKYIELD.
	(c_parser_omp_clause_name): Handle final and mergeable clauses.
	(c_parser_omp_clause_final, c_parser_omp_clause_mergeable): New
	functions.
	(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FINAL
	and PRAGMA_OMP_CLAUSE_MERGEABLE.
	(OMP_TASK_CLAUSE_MASK): Allow final and mergeable clauses.
	(c_parser_omp_clause_reduction): Handle min and max.
	* c-typeck.c (c_finish_omp_clauses): Don't complain about
	const qualified predetermined vars in firstprivate clause.
	andle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE.
	Handle MIN_EXPR and MAX_EXPR.
	* tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_FINAL
	and OMP_CLAUSE_MERGEABLE.
	(dump_generic_node): Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD
	and OMP_ATOMIC_CAPTURE_NEW.
	* tree.c (omp_clause_num_ops): Add OMP_CLAUSE_FINAL and
	OMP_CLAUSE_MERGEABLE.
	(omp_clause_code_name): Likewise.
	(walk_tree_1): Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE.
	* tree.h (enum omp_clause_code): Add OMP_CLAUSE_FINAL
	and OMP_CLAUSE_MERGEABLE.
	(OMP_CLAUSE_FINAL_EXPR): Define.
	* omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE_FINAL and
	OMP_CLAUSE_MERGEABLE.
	(expand_task_call): Likewise.
	(expand_omp_atomic_load, expand_omp_atomic_store): New functions.
	(expand_omp_atomic_fetch_op): Handle cases where old or new
	value is needed afterwards.
	(expand_omp_atomic): Call expand_omp_atomic_load resp.
	expand_omp_atomic_store.
	* gimplify.c (gimplify_omp_atomic, gimplify_expr): Handle
	OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and OMP_ATOMIC_CAPTURE_NEW.
	(gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses): Handle
	OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE.
	* tree-nested.c (convert_nonlocal_omp_clauses,
	convert_local_omp_clauses): Likewise.
	* tree.def (OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD,
	OMP_ATOMIC_CAPTURE_NEW): New.
	* gimple.h (GF_OMP_ATOMIC_NEED_VALUE): New.
	(gimple_omp_atomic_need_value_p, gimple_omp_atomic_set_need_value):
	New inlines.
	* omp-builtins.def (BUILT_IN_GOMP_TASKYIELD): New builtin.
	* doc/generic.texi: Mention OMP_CLAUSE_COLLAPSE,
	OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE.
gcc/c-family/
	* c-common.h (c_finish_omp_atomic): Adjust prototype.
	(c_finish_omp_taskyield): New prototype.
	* c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
	arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
	OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC.  If LHS1
	or RHS1 have side-effects, evaluate those too in the right spot,
	if it is a decl and LHS is also a decl, error out if they
	aren't the same.
	(c_finish_omp_taskyield): New function.
	* c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
	* c-pragma.c (omp_pragmas): Add taskyield.
	* c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
	(enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
	PRAGMA_OMP_CLAUSE_MERGEABLE.
gcc/cp/
	* cp-tree.h (finish_omp_atomic): Adjust prototype.
	(cxx_omp_const_qual_no_mutable): New prototype.
	(finish_omp_taskyield): New prototype.
	* parser.c (cp_parser_omp_atomic): (cp_parser_omp_atomic): Handle
	parsing OpenMP 3.1 atomics.  Adjust finish_omp_atomic caller.
	(cp_parser_omp_clause_name): Handle final and mergeable clauses.
	(cp_parser_omp_clause_final, cp_parser_omp_clause_mergeable): New
	functions.
	(cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FINAL
	and PRAGMA_OMP_CLAUSE_MERGEABLE.
	(OMP_TASK_CLAUSE_MASK): Allow final and mergeable clauses.
	(cp_parser_omp_taskyield): New function.
	(cp_parser_pragma): Handle PRAGMA_OMP_TASKYIELD.
	(cp_parser_omp_clause_reduction): Handle min and max.
	* pt.c (tsubst_expr) <case OMP_ATOMIC>: Handle OpenMP 3.1 atomics.
	(tsubst_omp_clauses): Handle OMP_CLAUSE_FINAL and
	OMP_CLAUSE_MERGEABLE.
	* semantics.c (finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
	arguments.  Handle OpenMP 3.1 atomics.  Adjust c_finish_omp_atomic
	caller.
	(finish_omp_clauses): Don't complain about const qualified
	predetermined vars and static data members in firstprivate clause.
	Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. Handle MIN_EXPR
	and MAX_EXPR.
	(finish_omp_taskyield): New function.
	* cp-gimplify.c (cxx_omp_const_qual_no_mutable): New function.
	(cxx_omp_predetermined_sharing): Use it.
gcc/fortran/
	PR fortran/46752
	* cpp.c (cpp_define_builtins): Change _OPENMP to 201107.
	* openmp.c (gfc_free_omp_clauses): Free also final_expr.
	(OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE): Define.
	(gfc_match_omp_clauses): Handle parsing final and mergeable
	clauses.
	(OMP_TASK_CLAUSES): Allow final and mergeable clauses.
	(gfc_match_omp_taskyield): New function.
	(resolve_omp_clauses): Resolve final clause.  Allow POINTERs and
	Cray pointers in clauses other than REDUCTION.
	(gfc_match_omp_atomic): Match optional
	read/write/update/capture keywords after !$omp atomic.
	(resolve_omp_atomic): Handle all OpenMP 3.1 atomic forms.
	* dump-parse-tree.c (show_omp_node): Handle EXEC_OMP_TASKYIELD,
	print final and mergeable clauses.
	(show_code_node): Handle EXEC_OMP_TASKYIELD.
	* trans-openmp.c (gfc_trans_omp_clauses): Handle final and
	mergeable clauses.
	(gfc_trans_omp_taskyield): New function.
	(gfc_trans_omp_directive): Handle EXEC_OMP_TASKYIELD.
	(gfc_trans_omp_atomic): Handle all OpenMP 3.1 atomic forms.
	(gfc_omp_clause_copy_ctor): Handle non-allocated allocatable.
	(gfc_omp_predetermined_sharing): Adjust comment.
	* gfortran.h (gfc_statement): Add ST_OMP_TASKYIELD and
	ST_OMP_END_ATOMIC.
	(gfc_omp_clauses): Add final_expr and mergeable fields.
	(gfc_exec_op): Add EXEC_OMP_TASKYIELD.
	(gfc_omp_atomic_op): New enum typedef.
	(struct gfc_code): Add ext.omp_atomic.
	* trans.c (trans_code): Handle EXEC_OMP_TASKYIELD.
	* frontend-passes.c (gfc_code_walker): Also walk final_expr.
	* resolve.c (gfc_resolve_blocks, resolve_code): Handle
	EXEC_OMP_TASKYIELD.
	* st.c (gfc_free_statement): Likewise.
	* match.h (gfc_match_omp_taskyield): New prototype.
	* parse.c (decode_omp_directive): Handle taskyield directive.
	Handle !$omp end atomic.
	(case_executable): Add ST_OMP_TASKYIELD case.
	(gfc_ascii_statement): Handle ST_OMP_TASKYIELD.
	(parse_omp_atomic): Return gfc_statement instead of void.
	For !$omp atomic capture parse two assignments instead of
	just one and require !$omp end atomic afterwards, for
	other !$omp atomic forms just allow !$omp end atomic at the
	end.
	(parse_omp_structured_block, parse_executable): Adjust
	parse_omp_atomic callers.

2011-08-02  Tobias Burnus  <burnus@net-b.de>

	* intrinsic.c (OMP_LIB): Updated openmp_version's
	value to 201107.
	* gfortran.texi (OpenMP): Update ref to OpenMP 3.1.
	* intrinsic.texi (OpenMP Modules): Update ref to OpenMP 3.1;
	remove deleted omp_integer_kind and omp_logical_kind constants.
gcc/testsuite/
	PR fortran/46752
	* gcc.dg/gomp/atomic-5.c: Adjust expected diagnostics.
	* gcc.dg/gomp/atomic-15.c: New test.
	* g++.dg/gomp/atomic-5.C: Adjust expected diagnostics.
	* g++.dg/gomp/atomic-15.C: New test.
	* g++.dg/gomp/private-1.C: New test.
	* g++.dg/gomp/sharing-2.C: New test.
	* gfortran.dg/gomp/crayptr1.f90: Don't expect error
	about Cray pointer in FIRSTPRIVATE/LASTPRIVATE.
	* gfortran.dg/gomp/omp_atomic2.f90: New test.
libgomp/
	PR fortran/42041
	PR fortran/46752
	* omp.h.in (omp_in_final): New prototype.
	* omp_lib.f90.in (omp_in_final): New interface.
	(omp_integer_kind, omp_logical_kind): Remove
	and replace all its uses in the module with 4.
	(openmp_version): Change to 201107.
	* omp_lib.h.in (omp_sched_static, omp_sched_dynamic,
	omp_sched_guided, omp_sched_auto): Use omp_sched_kind
	kind for the parameters.
	(omp_in_final): New external.
	(openmp_version): Change to 201107.
	* task.c (omp_in_final): New function.
	(gomp_init_task): Initialize final_task.
	(GOMP_task): Remove unused attribute from flags.  Handle final
	tasks.
	(GOMP_taskyield): New function.
	(omp_in_final): Return true if if (false) or final (true) task
	or descendant of final (true).
	* fortran.c (omp_in_final_): New function.
	* libgomp.map (OMP_3.1): Export omp_in_final and omp_in_final_.
	(GOMP_3.0): Export GOMP_taskyield.
	* env.c (gomp_nthreads_var_list, gomp_nthreads_var_list_len): New
	variables.
	(parse_unsigned_long_list): New function.
	(initialize_env): Use it for OMP_NUM_THREADS.  Call parse_boolean
	with "OMP_PROC_BIND".  If OMP_PROC_BIND=true, call gomp_init_affinity
	even if parse_affinity returned false.
	* config/linux/affinity.c (gomp_init_affinity): Handle
	gomp_cpu_affinity_len == 0.
	* libgomp_g.h (GOMP_taskyield): New prototype.
	* libgomp.h (struct gomp_task): Add final_task field.
	(gomp_nthreads_var_list, gomp_nthreads_var_list_len): New externs.
	* team.c (gomp_team_start): Override new task's nthreads_var icv
	if list form OMP_NUM_THREADS has been used and it has value for
	the new nesting level.

	* testsuite/libgomp.c/atomic-11.c: New test.
	* testsuite/libgomp.c/atomic-12.c: New test.
	* testsuite/libgomp.c/atomic-13.c: New test.
	* testsuite/libgomp.c/atomic-14.c: New test.
	* testsuite/libgomp.c/reduction-6.c: New test.
	* testsuite/libgomp.c/task-5.c: New test.
	* testsuite/libgomp.c++/atomic-2.C: New test.
	* testsuite/libgomp.c++/atomic-3.C: New test.
	* testsuite/libgomp.c++/atomic-4.C: New test.
	* testsuite/libgomp.c++/atomic-5.C: New test.
	* testsuite/libgomp.c++/atomic-6.C: New test.
	* testsuite/libgomp.c++/atomic-7.C: New test.
	* testsuite/libgomp.c++/atomic-8.C: New test.
	* testsuite/libgomp.c++/atomic-9.C: New test.
	* testsuite/libgomp.c++/task-8.C: New test.
	* testsuite/libgomp.c++/reduction-4.C: New test.
	* testsuite/libgomp.fortran/allocatable7.f90: New test.
	* testsuite/libgomp.fortran/allocatable8.f90: New test.
	* testsuite/libgomp.fortran/crayptr3.f90: New test.
	* testsuite/libgomp.fortran/omp_atomic3.f90: New test.
	* testsuite/libgomp.fortran/omp_atomic4.f90: New test.
	* testsuite/libgomp.fortran/pointer1.f90: New test.
	* testsuite/libgomp.fortran/pointer2.f90: New test.
	* testsuite/libgomp.fortran/task4.f90: New test.

2011-08-02  Tobias Burnus  <burnus@net-b.de>

	* libgomp.texi: Update OpenMP spec references to 3.1.
	(omp_in_final,OMP_PROC_BIND): New sections.
	(OMP_NUM_THREADS): Document that the value can be now a list.
	(GOMP_STACKSIZE,GOMP_CPU_AFFINITY): Update @ref.

From-SVN: r177194
2011-08-02 18:13:29 +02:00
H.J. Lu c01ecafca3 Check __x86_64__ instead of __LP64__ for x86 futex.
2011-08-02  H.J. Lu  <hongjiu.lu@intel.com>

	* config/linux/x86/futex.h: Check __x86_64__ instead of
	__LP64__.

From-SVN: r177166
2011-08-02 07:44:06 -07:00
Jakub Jelinek 2514265077 re PR middle-end/49897 (nesting lastprivate gives incorrect result)
PR middle-end/49897
	PR middle-end/49898
	* omp-low.c (use_pointer_for_field): If disallowing copy-in/out
	in nested parallel and outer is a gimple_reg, mark it as addressable
	and set its bit in task_shared_vars bitmap too.

	* testsuite/libgomp.c/pr49897-1.c: New test.
	* testsuite/libgomp.c/pr49897-2.c: New test.
	* testsuite/libgomp.c/pr49898-1.c: New test.
	* testsuite/libgomp.c/pr49898-2.c: New test.

From-SVN: r176945
2011-07-29 19:45:42 +02:00
H.J. Lu f53d712fa9 Check ia32 instead of ilp32 for ia32 tests.
2011-07-28  H.J. Lu  <hongjiu.lu@intel.com>

	* testsuite/lib/libgomp.exp (libgomp_init): Add -march=i486
	for ia32 instead of ilp32.

	* testsuite/libgomp.c/atomic-1.c: Require ia32 instead of ilp32.
	* testsuite/libgomp.c/atomic-6.c: Likewise.

From-SVN: r176893
2011-07-28 13:35:32 -07:00
Sebastian Pop 3689198db0 Fix PR49471: canonicalize_loop_ivs should not generate unsigned types.
2011-07-27  Sebastian Pop  <sebastian.pop@amd.com>

	PR tree-optimization/49471
	* tree-ssa-loop-manip.c (canonicalize_loop_ivs): Build an unsigned
	iv only when the largest type is unsigned.  Do not call
	lang_hooks.types.type_for_size.

	* testsuite/libgomp.graphite/force-parallel-1.c: Un-xfail.
	* testsuite/libgomp.graphite/force-parallel-2.c: Adjust pattern.

From-SVN: r176838
2011-07-27 16:53:09 +00:00
Sebastian Pop cbc1994b2f Fix PR47653: do not handle loops using wrapping semantics in graphite
2011-07-26  Sebastian Pop  <sebastian.pop@amd.com>

	PR middle-end/47653
	* graphite-scop-detection.c (graphite_can_represent_loop): Discard
	loops using wrapping semantics.

	* gcc.dg/graphite/run-id-pr47653.c: New.
	* gcc.dg/graphite/interchange-3.c: Do not use unsigned types for
	induction variables.
	* gcc.dg/graphite/scop-16.c: Same.
	* gcc.dg/graphite/scop-17.c: Same.
	* gcc.dg/graphite/scop-21.c: Same.

From-SVN: r176802
2011-07-26 18:48:08 +00:00
Rainer Orth 1a79cb7341 re PR libgomp/45351 (many unaligned accesses in libgomp tests)
PR libgomp/45351
	* config/osf/sem.h: New file.
	* configure.tgt (alpha*-dec-osf*): Prepend osf to config_path.

From-SVN: r176755
2011-07-25 15:39:52 +00:00
Rainer Orth c1f5148401 re PR target/49541 (TLS support partially broken in 64-bit mode)
PR target/49541
	* testsuite/lib/libgomp.exp (libgomp_init): Don't add -lgomp to
	ldflags.

From-SVN: r176393
2011-07-18 12:09:18 +00:00
Jakub Jelinek bfee0724e0 wait.h (do_spin): New inline...
* config/linux/wait.h (do_spin): New inline, largely copied
	from do_wait, just don't do futex_wait here, instead return true if
	it should be done.
	(do_wait): Implement using do_spin.
	* config/linux/mutex.h (gomp_mutex_lock_slow): Add an int argument
	to prototype.
	(gomp_mutex_lock): Use __sync_val_compare_and_swap instead of
	__sync_bool_compare_and_swap, pass the oldval to
	gomp_mutex_lock_slow.
	* config/linux/mutex.c (gomp_mutex_lock_slow): Add oldval argument.
	If all mutex contenders are just spinning and not sleeping, don't
	change state to 2 unnecessarily.  Optimize the loop when state has
	already become 2 to use just one atomic operation per loop instead
	of two.
	* config/linux/ia64/mutex.h (gomp_mutex_lock_slow): Add an int argument
	to prototype.
	(gomp_mutex_lock): Use __sync_val_compare_and_swap instead of
	__sync_bool_compare_and_swap, pass the oldval to
	gomp_mutex_lock_slow.

From-SVN: r176326
2011-07-15 21:46:11 +02:00
Jakub Jelinek fb79f500af re PR libgomp/49490 (suboptimal load balancing in loops)
PR libgomp/49490
	* omp-low.c (expand_omp_for_static_nochunk): Only
	use n ceil/ nthreads size for the first
	n % nthreads threads in the team instead of
	all threads except for the last few ones which
	get less work or none at all.

	* iter.c (gomp_iter_static_next): For chunk size 0
	only use n ceil/ nthreads size for the first
	n % nthreads threads in the team instead of
	all threads except for the last few ones which
	get less work or none at all.
	* iter_ull.c (gomp_iter_ull_static_next): Likewise.
	* env.c (parse_schedule): If OMP_SCHEDULE doesn't have
	chunk argument, set run_sched_modifier to 0 for static
	resp. 1 for other kinds.  If chunk argument is 0
	and not static, set value to 1.

From-SVN: r175315
2011-06-22 22:39:25 +02:00
Jakub Jelinek ea93a47bc8 re PR c++/49043 ([OpenMP & C++0x]: Compiler error when lambda-function within OpenMP loop)
PR c++/49043
	* decl.c (check_omp_return): Stop searching on sk_function_parms.

	* testsuite/libgomp.c++/pr49043.C: New test.

From-SVN: r173907
2011-05-19 15:11:56 +02:00
Jakub Jelinek 4577f7309a re PR c++/48869 (OpenMP task construct fails to instantiate copy constructor(same as Bug 36523))
PR c++/48869
	* method.c (get_dtor, get_copy_ctor): Add COMPLAIN argument,
	pass it down to locate_fn_flags.
	* cp-tree.h (get_dtor, get_copy_ctor): Adjust prototypes.
	* semantics.c (cxx_omp_create_clause_info): Adjust callers.
	* cp-gimplify.c: Include splay-tree.h.
	(splay_tree_compare_decl_uid, omp_var_to_track,
	omp_cxx_notice_variable): New functions.
	(struct cp_genericize_omp_taskreg): New type.
	(struct cp_genericize_data): Add omp_ctx field.
	(cp_genericize_r): Attempt to determine implicitly determined
	firstprivate class type variables.
	(cp_genericize): Clear omp_ctx.
	* Make-lang.in (cp/cp-gimplify.o): Depend on $(SPLAY_TREE_H).

	* testsuite/libgomp.c++/pr48869.C: New test.

From-SVN: r173888
2011-05-19 09:44:31 +02:00
Jakub Jelinek e7385332a0 re PR fortran/48894 (generic omp_get_ancestor_thread_num(l(i)) produces incorrect output)
PR fortran/48894
	* fortran.c: Include limits.h.
	(TO_INT): Define.
	(omp_set_dynamic_8_, omp_set_num_threads_8_): Use !!*set instead of
	*set.
	(omp_set_num_threads_8_, omp_set_schedule_8_,
	omp_set_max_active_levels_8_, omp_get_ancestor_thread_num_8_,
	omp_get_team_size_8_): Use TO_INT macro.
	* testsuite/libgomp.fortran/pr48894.f90: New test.

From-SVN: r173476
2011-05-06 12:11:07 +02:00
Jakub Jelinek 20790697dd re PR middle-end/48591 (OpenMP ICE with atomics on __float128 in 32-bit only i686 cc1)
PR middle-end/48591
	* omp-low.c (expand_omp_atomic_fetch_op): Return false if decl is
	NULL.
	(expand_omp_atomic_pipeline): Return false if cmpxchg is NULL.

	* gcc.dg/gomp/pr48591.c: New test.

	* testsuite/libgomp.c/pr48591.c: New test.

From-SVN: r172379
2011-04-13 17:50:02 +02:00
Rainer Orth bf382f5fe4 re PR bootstrap/48135 (build fails on Solaris2.8 due to Glob.pm not found within /usr/perl5)
libgfortran:
	PR bootstrap/48135
	* configure.ac (gfortran_use_symver): Handle --disable-symvers.
	* configure: Regenerate.

	libgomp:
	PR bootstrap/48135
	* acinclude.m4 (enable_symvers): Handle --disable-symvers.
	* configure: Regenerate.

	libjava:
	PR bootstrap/48135
	* configure.ac (libjava_cv_anon_version_script): Handle
	--disable-symvers.
	* configure: Regenerate.

	libquadmath:
	PR bootstrap/48135
	* configure.ac (quadmath_use_symver): Handle --disable-symvers.
	* configure: Regenerate.

	libssp:
	PR bootstrap/48135
	* configure.ac (ssp_use_symver): Handle --disable-symvers.
	* configure: Regenerate.

From-SVN: r171224
2011-03-21 12:24:17 +00:00
Jakub Jelinek 113a53c142 re PR fortran/47886 (ICE: OpenMP !$omp task if(omp_get_num_threads() > 0))
PR fortran/47886
	* gfortran.dg/gomp/task-1.f90: Removed.

	* testsuite/libgomp.fortran/task3.f90: New test.

From-SVN: r170535
2011-02-27 13:05:36 +01:00
Tobias Burnus 0024f1af57 libgomp.texi (GOMP_STACKSIZE): Fix @ref to OMP_STACKSIZE.
2011-02-24  Tobias Burnus  <burnus@net-b.de>

        * libgomp.texi (GOMP_STACKSIZE): Fix @ref to OMP_STACKSIZE.

From-SVN: r170479
2011-02-24 22:58:06 +01:00
Jakub Jelinek 21e1e594a9 re PR libgomp/47854 (omp_get_wtime documentation incorrect)
PR libgomp/47854
	* libgomp.texi (omp_get_wtime): Don't say time in the past
	must be Unix Epoch.

From-SVN: r170434
2011-02-23 09:58:16 +01:00
Jakub Jelinek 67962076d9 re PR libgomp/47804 (libgomp LD_LIBRARY_PATH doesn't include path to libgfortran)
PR libgomp/47804
	* testsuite/libgomp.fortran/fortran.exp: Check for both
	libquadmath.a and libquadmath.${shlib_ext}.  If neither exists,
	but $blddir != "", still append ${blddir}/${lang_library_path}
	to ld_library_path.

From-SVN: r170285
2011-02-18 21:44:44 +01:00
Tobias Burnus 3808007ca0 re PR libgomp/47758 (729 unexpected failures in the libgomp test suite on powerpc-apple-darwin8)
2011-02-16  Tobias Burnus  <burnus@net-b.de>

        PR libgomp/47758
        * testsuite/libgomp.fortran/fortran.exp: Check for the existence
        of libquadmath.a before adding its libpath to ldflags.

From-SVN: r170216
2011-02-16 18:44:45 +01:00
Jakub Jelinek 53b4d41df8 re PR libgomp/47731 (futex_wait broken on Linux)
PR libgomp/47731
	* config/linux/futex.h (futex_wait): Pass NULL as timeout argument
	to FUTEX_WAIT futex syscall.
	* config/linux/wait.h: Include <futex.h> instead of "futex.h".

From-SVN: r170133
2011-02-14 16:08:23 +01:00
Ralf Wildenhues 029c8f3e77 Remove freebsd1 from libtool.m4 macros and config.rpath.
/:
	Import from Libtool and gnulib:

	2011-01-27  Gerald Pfeifer  <gerald@pfeifer.com>

	Prepare for supporting FreeBSD 10.
	* config.rpath: Remove handling of freebsd1* which soon would
	match FreeBSD 10.0.

	2011-01-20  Gerald Pfeifer  <gerald@pfeifer.com>  (tiny change)

	Remove support for FreeBSD 1.x.
	* libtool.m4 (_LT_LINKER_SHLIBS)
	(_LT_SYS_DYNAMIC_LINKER): Remove handling of freebsd1* which
	soon would incorrectly match FreeBSD 10.0.

boehm-gc/:
	* configure: Regenerate.

gcc/:
	* configure: Regenerate.

libffi/:
	* configure: Regenerate.

libgfortran/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* configure: Likewise.

libgo/:
	* config/libtool.m4: (_LT_LINKER_SHLIBS)
	(_LT_SYS_DYNAMIC_LINKER): Remove handling of freebsd1* which
	soon would incorrectly match FreeBSD 10.0.
	* configure: Regenerate.

libgomp/:
	* configure: Regenerate.

libjava/:
	* configure: Regenerate.
	* shlibpath.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER): Remove handling
	of freebsd1* which soon would incorrectly match FreeBSD 10.0.

libjava/classpath/:
	* config.rpath, ltcf-c.sh, ltcf-gcj.sh, ltconfig: Remove
	handling of freebsd1* which soon would match FreeBSD 10.0.
	* configure: Regenerate.

libjava/libltdl/:
	* acinclude.m4 (AC_LIBTOOL_PROG_LD_SHLIBS)
	(AC_LIBTOOL_SYS_DYNAMIC_LINKER): Remove handling
	of freebsd1* which soon would incorrectly match FreeBSD 10.0.
	* configure: Regenerate.

libmudflap/:
	* configure: Regenerate.

libobjc/:
	* configure: Regenerate.

libquadmath/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* configure: Likewise.

libssp/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* configure: Likewise.

libstdc++-v3/:
	* configure: Regenerate.

lto-plugin/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

zlib/:
	* configure: Regenerate.

From-SVN: r170106
2011-02-13 11:45:53 +00:00
Benjamin Kosnik bddd662631 re PR libstdc++/36104 (gnu-versioned-namespace is broken)
2011-01-20  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/36104
	* acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Accept gnu variants.

From-SVN: r169072
2011-01-20 23:41:24 +00:00
Gerald Pfeifer f1d4ab26bc * configure.tgt (*-*-freebsd*): Add -lpthread to XLDFLAGS.
From-SVN: r168858
2011-01-16 19:38:04 +00:00
Jakub Jelinek d652f226fc Update Copyright years for files modified in 2010.
From-SVN: r168438
2011-01-03 21:52:22 +01:00
Jakub Jelinek 2b50313607 re PR fortran/46874 ([OpenMP] ICE in gfc_conv_descriptor_data_get, at fortran/trans-array.c:147)
PR fortran/46874
	* trans-openmp.c (gfc_trans_omp_array_reduction): Handle allocatable
	dummy variables.

	* libgomp.fortran/allocatable6.f90: New test.

From-SVN: r167799
2010-12-14 14:59:20 +01:00
Jakub Jelinek af3fcdb4ac re PR fortran/46874 ([OpenMP] ICE in gfc_conv_descriptor_data_get, at fortran/trans-array.c:147)
PR fortran/46874
	* trans-openmp.c (gfc_trans_omp_array_reduction): Handle allocatable
	dummy variables.

	* libgomp.fortran/allocatable6.f90: New test.

From-SVN: r167798
2010-12-14 14:56:25 +01:00
Rainer Orth c0f9d583f0 acinclude.m4 (symvers_renaming): Also set if enable_symvers = no.
libgomp:
	* acinclude.m4 (symvers_renaming): Also set if enable_symvers = no.
	* configure: Regenerate.

	libstdc++-v3:
	* acinclude.m4 (symvers_renaming): Also set if enable_symvers = no.
	* configure: Regenerate.

From-SVN: r167505
2010-12-06 17:10:09 +00:00
Dave Korn 7de6ba7a0b re PR target/40125 (libgcc_s DLL installed in wrong directory in cross toolchain)
config/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* lthostflags.m4: New file.
	(ACX_LT_HOST_FLAGS): Define.

libgfortran/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* configure.ac: Invoke ACX_LT_HOST_FLAGS.
	* Makefile.am (LTLDFLAGS): Use lt_host_flags.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

libgomp/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* configure.ac: Invoke ACX_LT_HOST_FLAGS.
	* Makefile.am (libgomp_la_LDFLAGS): Use lt_host_flags.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libjava/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* configure.ac: Invoke ACX_LT_HOST_FLAGS.
	* configure.host (libgcj_sublib_ltflags): Use lt_host_flags.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* gcj/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libobjc/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* configure.ac (extra_ldflags_libobjc): Invoke ACX_LT_HOST_FLAGS.
	* Makefile.in (lt_host_flags): Import AC_SUBST'd value.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libquadmath/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* configure.ac: Invoke ACX_LT_HOST_FLAGS.
	* Makefile.am (libquadmath_la_LDFLAGS): Use lt_host_flags.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

libssp/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* configure.ac: Invoke ACX_LT_HOST_FLAGS.
	* Makefile.am (libssp_la_LDFLAGS): Use lt_host_flags.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

libstdc++-v3/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* configure.ac: Invoke ACX_LT_HOST_FLAGS.
	* configure.host (OPT_LDFLAGS): Use lt_host_flags for cygming.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

lto-plugin/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* configure.ac: Invoke ACX_LT_HOST_FLAGS.
	* Makefile.am (liblto_plugin_la_LDFLAGS): Use lt_host_flags but
	override -bindir setting.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

From-SVN: r167480
2010-12-06 00:50:04 +00:00
Jakub Jelinek edaadf74d4 re PR fortran/46753 (ICE: OpenMP - in extract_omp_for_data, at omp-low.c:335)
PR fortran/46753
	* trans-openmp.c (gfc_trans_omp_do): Use build2_loc instead of
	fold_build2_loc for OMP_FOR conditions.

	* libgomp.fortran/pr46753.f90: New test.

From-SVN: r167372
2010-12-02 15:37:20 +01:00
Jakub Jelinek 4c698cf891 re PR libgomp/43706 (scheduling two threads on one core leads to starvation)
PR libgomp/43706
	* env.c (initialize_env): Default to spin count 300000
	instead of 20000000 if neither OMP_WAIT_POLICY nor GOMP_SPINCOUNT
	is specified.

From-SVN: r167371
2010-12-02 15:31:27 +01:00
Jakub Jelinek b7516041a1 re PR libgomp/45240 (parallel.c: GOMP_parallel_end locks a mutex but fails to unlock it after atomic operation complete)
PR libgomp/45240
	* parallel.c (GOMP_parallel_end): Unlock gomp_remaining_threads_lock
	at the end if sync builtins aren't supported.

From-SVN: r167370
2010-12-02 15:30:37 +01:00
Rainer Orth 6b43a34c3c * configure.tgt (mips-sgi-irix6*): Add -lpthread to XLDFLAGS.
From-SVN: r167333
2010-12-01 14:01:48 +00:00
Rainer Orth 950691fafd * testsuite/libgomp.fortran/vla8.f90: Use dg-timeout-factor 2.0.
From-SVN: r167328
2010-12-01 13:41:59 +00:00
Iain Sandoe fb9041eab3 fortran.exp: Add paths for libquadmath.
libgomp:

	* testsuite/libgomp.fortran/fortran.exp: Add paths for libquadmath.

From-SVN: r167127
2010-11-24 19:26:27 +00:00
Francois-Xavier Coudert 1ec601bf9f re PR fortran/32049 (Support on x86_64 also kind=16)
/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        * Makefile.def: Add libquadmath; build it with language=fortran.
        * configure.ac: Add libquadmath.
        * Makefile.tpl: Handle multiple libs in check-[+language+].
        * Makefile.in: Regenerate.
        * configure: Regenerate.

libquadmath/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        Initial implementation and checkin.

gcc/fortran/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        * gfortranspec.c (find_spec_file): New function.
        (lang_specific_driver): Try to find .spec file and use it.
        * trans-io.c (iocall): Define
        * IOCALL_X_REAL128/COMPLEX128(,write).
        (gfc_build_io_library_fndecls): Build decl for __float128 I/O.
        (transfer_expr): Call __float128 I/O functions.
        * trans-types.c (gfc_init_kinds): Allow kind-16 belonging
        to __float128.

gcc/testsuite/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        * gfortran.dg/quad_1.f90: New.
        * lib/gcc-defs.exp (gcc-set-multilib-library-path): Use also
        compiler arguments.
        * lib/gfortran.exp (gfortran_link_flags): Add libquadmath to
        library search path; call gcc-set-multilib-library-path with
        arguments such that libgfortran.spec is found.
        (gfortran_init): Add path for libgfortran.spec to
GFORTRAN_UNDER_TEST.

libgomp/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        * configure.ac: 
        * configure: Regenerate.

libgfortran/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        * Makefile.am: Add missing pow_r16_i4.c, add transfer128.c,
        link libquadmath, if used.
        * acinclude.m4 (LIBGFOR_CHECK_FLOAT128): Add.
        * configure.ac: Use it, touch spec file.
        * gfortran.map: Add pow_r16_i4 and
        transfer_(real,complex)128(,write) functions.
        * intrinsics/cshift0.c (cshift0): Handle __float128 type.
        * intrinsics/erfc_scaled_inc.c: Ditto.
        * intrinsics/pack_generic.c (pack): Ditto
        * intrinsics/spread_generic.c (spread): Ditto.
        * intrinsics/unpack_generic.c (unpack1): Ditto.
        * io/read.c (convert_real): Ditto.
        * io/transfer.c: Update comments.
        * io/transfer128.c: New file.
        * io/write_float.def (write_float): Handle __float128 type.
        * libgfortran.h: #include quadmath_weak.h, define __builtin_infq
        and nanq.
        * m4/mtype.m4: Handle __float128 type.
        * runtime/in_pack_generic.c (internal_pack): Ditto.
        * runtime/in_unpack_generic.c (internal_unpack): Ditto.
        * kinds-override.h: New file.
        * libgfortran.spec.in: Ditto.
        * generated/pow_r16_i4.c: Generated.
        * Makefile.in: Regenerate.
        * configure: Regenerate.
        * config.h: Regenerate.
        * bessel_r10.c: Regenerate.
        * bessel_r16.c: Regenerate.
        * bessel_r4.c: Regenerate.
        * bessel_r8.c: Regenerate.
        * exponent_r16.c: Regenerate.
        * fraction_r16.c: Regenerate.
        * nearest_r16.c: Regenerate.
        * norm2_r10.c: Regenerate.
        * norm2_r16.c: Regenerate.
        * norm2_r4.c: Regenerate.
        * norm2_r8.c: Regenerate.
        * rrspacing_r16.c: Regenerate.
        * set_exponent_r16.c: Regenerate.
        * spacing_r16.c: Regenerate.


Co-Authored-By: Tobias Burnus <burnus@net-b.de>

From-SVN: r166825
2010-11-16 22:23:19 +01:00
Marcus Shawcroft d213e92e53 futex.h: New.
2010-10-06  Marcus Shawcroft  <marcus.shawcroft@arm.com>

	* config/linux/futex.h: New.
	* config/linux/arm/mutex.h: New.
	* configure.tgt (arm*-*-linux*): Add config path.

From-SVN: r165054
2010-10-06 16:42:50 +00:00
Sebastian Pop 89d5c66f36 Adjust failing testsuite pattern.
2010-09-30  Sebastian Pop  <sebastian.pop@amd.com>

	* testsuite/libgomp.graphite/force-parallel-1.c: Adjust.

From-SVN: r164814
2010-09-30 21:22:16 +00:00
Tobias Burnus 87350d4af5 intrinsic.texi (OpenMP modules): Add named constants of OMP_LIB.
gcc/fortran/
2010-09-23  Tobias Burnus  <burnus@net-b.de>

        * intrinsic.texi (OpenMP modules): Add named constants of
        OMP_LIB.

libgomp/
2010-09-23  Tobias Burnus  <burnus@net-b.de>

        * libgomp.texi (omp_get_nested, omp_set_nested,
        * omp_set_dynamic):
        Change Fortran datatype to LOGICAL.
        (omp_set_lock, omp_test_lock, omp_unset_lock, omp_set_nested_lock,
        omp_unset_nested_lock): Use intent(inout) instead of intent(out).

From-SVN: r164551
2010-09-23 11:01:32 +02:00
Ralf Wildenhues 75bc9e5e0d Fix misquoting in stdint.m4.
config/:
	PR target/45084
	* stdint.m4 (GCC_HEADER_STDINT): Use m4 quotes for arguments
	of AC_MSG_ERROR.

libdecnumber/:
	* configure: Regenerate.

libgfortran/:
	* configure: Regenerate.

libgomp/:
	* configure: Regenerate.

libstdc++-v3/:
	* configure: Regenerate.

From-SVN: r163441
2010-08-21 12:18:02 +00:00
Jakub Jelinek acb5c916ea libgomp.texi: Add function keyword to a couple of Fortran interfaces...
* libgomp.texi: Add function keyword to a couple of Fortran
	interfaces, use integer instead of int for Fortran.

From-SVN: r162540
2010-07-26 18:22:18 +02:00
Aldy Hernandez 6a2ba1839d libgomp.texi: Fix spelling and pasto problems throughout.
* libgomp.texi: Fix spelling and pasto problems throughout.
        Adjust prototypes to match code.

From-SVN: r162538
2010-07-26 15:26:17 +00:00
Tobias Burnus df161b697c re PR fortran/45045 (Named COMMON with different size: No warning with -fwhole-file)
gcc/fortran/
2010-07-24  Tobias Burnus  <burnus@net-b.de>

        * options.c (gfc_init_options): Enable -fwhole-file by default.
        * interface.c (compare_parameter): Assume a Hollerith constant is
        compatible with all other argument types.

libgomp/
2010-07-24  Tobias Burnus  <burnus@net-b.de>

        * testsuite/libgomp.fortran/appendix-a/a.28.5.f90: Add -w to
        silence -fwhole-file warning.

gcc/testsuite/
2010-07-24  Tobias Burnus  <burnus@net-b.de>

        * gfortran.dg/func_decl_4.f90: Split test into two ...
        * gfortran.dg/func_decl_5.f90: ... parts.
        * gfortran.dg/common_resize_1.f: xfail two warnings (cf. PR 45045).
        * gfortran.dg/bounds_temporaries_1.f90: Add new dg-warning.
        * gfortran.dg/global_references_1.f90: Add new dg-warning.
        * gfortran.dg/generic_actual_arg.f90: Add new dg-warning.
        * gfortran.dg/entry_17.f90: Remove no-longer needed dg-warning.
        * gfortran.dg/used_before_typed_4.f90: Add new dg-warning.
        * gfortran.dg/bounds_check_strlen_1.f90: Add new dg-warning.
        * gfortran.dg/intrinsic_std_1.f90: Split by remove tree dump ...
        * gfortran.dg/intrinsic_std_6.f90: ... and create a dump test.
        * gfortran.dg/sizeof.f90: Make test valid.
        * gfortran.dg/pr20865.f90: Add new dg-error.
        * gfortran.dg/integer_exponentiation_2.f90: Add new dg-warnings.
        * gfortran.dg/g77/19990218-0.f: Ditto.
        * gfortran.dg/g77/19990218-1.f: Ditto.
        * gfortran.dg/g77/970625-2.f: Ditto.
        * gfortran.dg/pr37243.f: Fix function declaration.
        * gfortran.dg/use_only_1.f90: Fix implicit typing.
        * gfortran.dg/loc_1.f90: Fix pointer datatype.

From-SVN: r162491
2010-07-24 00:15:51 +02:00
Rainer Orth 16c9d3b171 re PR target/18788 ("-pthreads" option with "-shared" does not cause libpthread.so to be linked in.)
libjava:
	* configure.ac (*-*-solaris2.8): Use alternate thread library.
	Add libthread.
	(*-*-solaris2.9): Use libthread.
	* configure: Regenerate.

	libgomp:
	* configure.tgt (*-*-solaris2.[56]*): Removed.

	gcc:
	* configure.ac: Don't disable TLS on Solaris 8/9 by default
	Set tga_func for Solaris 2/x86 resp. SPARC.
	Remove duplicate parts of sparc*-sun-solaris2.* TLS check.
	(LIB_THREAD_LDFLAGS_SPEC): Define.
	(LIB_TLS_SPEC): Define.
	Check for required Sun ld version.
	* configure: Regenerate.
	* config.in: Regenerate.
	* config/sol2.h (LIB_SPEC): Use LIB_THREAD_LDFLAGS_SPEC with
	-pthread, -threads, LIB_TLS_SPEC with -pthread.
	* doc/install.texi (Specific, *-*-solaris2*): Document use of
	alternate thread libraries on Solaris 8.
	Document TLS patch requirements.
	* doc/sourcebuild.texi (Add Options): Sort alphabetically.
	Document tls.

	PR target/18788
	* config/sol2.h (LIB_SPEC): Link with thread libraries even with
	-shared.

	gcc/testsuite:
	* lib/target-supports.exp (add_options_for_tls): New proc.
	* g++.dg/tls/static-1.C: Use dg-add-options tls.
	* g++.dg/tls/static-1a.cc: Likewise.
	* gcc.dg/tls/emutls-1.c: Likewise.
	* gcc.dg/tls/opt-11.c: Likewise.
	* gcc.dg/tls/opt-12.c: Likewise.
	* gcc.dg/tls/pr24428-2.c: Likewise.
	* gcc.dg/tls/pr24428.c: Likewise.
	* obj-c++.dg/tls/static-1.mm: Likewise.
	* obj-c++.dg/torture/tls/thr-init-1.mm: Likewise.
	* obj-c++.dg/torture/tls/thr-init-2.mm: Likewise.
	* obj-c++.dg/torture/tls/thr-init-3.mm: Likewise.
	* objc.dg/torture/tls/thr-init-2.m: Likewise.
	* objc.dg/torture/tls/thr-init-3.m: Likewise.
	* objc.dg/torture/tls/thr-init.m: Likewise.
	* gcc.dg/lto/20090210_0.c: Add -pthread for *-*-solaris2.[89].

From-SVN: r162478
2010-07-23 17:58:57 +00:00
Rainer Orth 6d28b93370 acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Handle sun style.
* acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Handle sun style.
	Define LIBGOMP_BUILD_VERSIONED_SHLIB_GNU,
	LIBGOMP_BUILD_VERSIONED_SHLIB_SUN automake conditionals.
	(HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT): Define unless
	targetting solaris2*.
	* configure: Regenerate.
	* config.h.in: Regenerate.

	* Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB]: Protect
	libgomp_version_script with LIBGOMP_BUILD_VERSIONED_SHLIB_GNU.
	Add libgomp_version_dep.
	[LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]: Handle Sun symbol
	versioning.
	[!LIBGOMP_BUILD_VERSIONED_SHLIB]: Add libgomp_version_dep.
	(libgomp_la_DEPENDENCIES): Set to $(libgomp_version_dep).
	* Makefile.in: Regenerate.

	* libgomp.h (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef unless
	HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT.
	* libgomp.map (OMP_1.0): Move symbols both in OMP_1.0 and OMP_3.0
	to common block, protected by
	HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT.

From-SVN: r161842
2010-07-05 17:19:33 +00:00
Gerald Pfeifer 07a67d6a95 fdl.texi: Move to GFDL version 1.3.
gcc:
	* doc/include/fdl.texi: Move to GFDL version 1.3.

	* doc/cpp.texi: Move to GFDL version 1.3.
	* doc/gcc.texi: Move to GFDL version 1.3.  Fix copyright years.
	* doc/gccint.texi: Move to GFDL version 1.3.
	* doc/gcov.texi: Move to GFDL version 1.3.  Update copyright years.
	* doc/install.texi: Move to GFDL version 1.3.  Fix copyright years.
	* doc/invoke.texi: Move to GFDL version 1.3.

gcc/fortran:
	* gfc-internals.texi: Move to GFDL 1.3.
	* gfortran.texi: Ditto.
	* intrinsic.texi: Ditto.
	* invoke.texi: Ditto.

gcc/java:
	* gcj.texi: Move to GFDL version 1.3.  Fix copyright years.

libgomp:
	* libgomp.texi: Move to GFDL version 1.3.  Update copyright years.

From-SVN: r160518
2010-06-09 23:46:33 +00:00
Iain Sandoe dbd34b899f re PR bootstrap/43170 (gcc 4.5 20100218 bootstrap compare fails on os x 10.6)
config:
	PR bootstrap/43170
	* tls.m4 (GCC_CHECK_TLS): Add volatile qualifier to the test 
	references.  Move the main () test reference ahead of 
	pthread_create().  Add a comment to explain the requirements
	of the test.
libgomp:
	PR bootstrap/43170
	* configure: Regenerate.
libjava:
	PR bootstrap/43170
	* configure: Regenerate.
libmudflap:
	PR bootstrap/43170
	* configure: Regenerate.
libstdc++-v3:
	PR bootstrap/43170
	* configure: Regenerate.

From-SVN: r160457
2010-06-09 09:27:04 +00:00
Ralf Wildenhues 13917ae3b9 no-dist in non-imported automake dirs.
libgfortran/:
	PR other/43620
	* configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

libgomp/:
	PR other/43620
	* configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libjava/:
	PR other/43620
	* configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
	* Makefile.in: Regenerate.
	* gcj/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libjava/libltdl/:
	PR other/43620
	* Makefile.am (AUTOMAKE_OPTIONS): Add no-dist.
	* Makefile.in: Regenerate.

libmudflap/:
	PR other/43620
	* configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
	* Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libssp/:
	PR other/43620
	* configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
	* Makefile.in: Regenerate.

libstdc++-v3/:
	PR other/43620
	* configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

lto-plugin/:
	PR other/43620
	* configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
	* Makefile.in: Regenerate.

From-SVN: r159041
2010-05-04 18:58:11 +00:00
Jakub Jelinek b83a701b0f re PR c/43893 (Error: Invalid controlling predicate with -fopenmp)
PR c/43893
	* c-omp.c (c_finish_omp_for): Handle also EQ_EXPR.

	* testsuite/libgomp.c/pr43893.c: New test.
	* testsuite/libgomp.c++/pr43893.C: New test.

From-SVN: r158745
2010-04-26 22:07:10 +02:00
Jakub Jelinek 78db7d92ce re PR middle-end/43570 (OpenMP: Invalid read of size 1 (libgomp.fortran/vla6.f90))
PR middle-end/43570
	* omp-low.c (scan_sharing_clauses): Don't scan_omp_op
	OMP_CLAUSE_DECL for OMP_CLAUSE_COPYPRIVATE.
	(lower_copyprivate_clauses): Use private var in outer
	context instead of original var.  Make sure the types
	are correct for VLAs.

	* testsuite/libgomp.fortran/vla8.f90: New test.

From-SVN: r158594
2010-04-21 13:57:42 +02:00
Jakub Jelinek e4ba7a600e re PR libgomp/43706 (scheduling two threads on one core leads to starvation)
PR libgomp/43706
	* config/linux/affinity.c (gomp_init_affinity): Decrease
	gomp_available_cpus if affinity mask confines the process to fewer
	CPUs.
	* config/linux/proc.c (get_num_procs): If gomp_cpu_affinity is
	non-NULL, just return gomp_available_cpus.

From-SVN: r158565
2010-04-20 17:37:51 +02:00
Jakub Jelinek 5221d7a91b re PR libgomp/43569 (libgomp: Conditional jump or move depends on uninitialised value)
PR libgomp/43569
	* sections.c (gomp_sections_init): Initialize ws->mode.

From-SVN: r158564
2010-04-20 17:36:45 +02:00
Uros Bizjak 289a9f867a acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS): Remove set but not unused bar variable.
* acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS): Remove set but
	not unused bar variable.
	* configure: Regenerate.

From-SVN: r158344
2010-04-14 14:57:43 +02:00
Ralf Wildenhues 4d9e844614 Update to Automake 1.11.1.
gcc/:
	PR other/43620
	* doc/install.texi (Prerequisites): Bump Automake version to 1.11.1.
	* aclocal.m4: Regenerate.

lto-plugin/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.

intl/:
	* aclocal.m4: Regenerate.

boehm-gc/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* include/Makefile.in: Regenerate.

fixincludes/:
	* aclocal.m4: Regenerate.

libcpp/:
	* aclocal.m4: Regenerate.

libdecnumber/:
	* aclocal.m4: Regenerate.

libffi/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* include/Makefile.in: Regenerate.
	* man/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libgfortran/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.

libgomp/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libjava/classpath/:
	* HACKING: Update required Automake version.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* doc/Makefile.in: Regenerate.
	* doc/api/Makefile.in: Regenerate.
	* examples/Makefile.in: Regenerate.
	* external/Makefile.in: Regenerate.
	* external/jsr166/Makefile.in: Regenerate.
	* external/relaxngDatatype/Makefile.in: Regenerate.
	* external/sax/Makefile.in: Regenerate.
	* external/w3c_dom/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* lib/Makefile.in: Regenerate.
	* native/Makefile.in: Regenerate.
	* native/fdlibm/Makefile.in: Regenerate.
	* native/jawt/Makefile.in: Regenerate.
	* native/jni/Makefile.in: Regenerate.
	* native/jni/classpath/Makefile.in: Regenerate.
	* native/jni/gconf-peer/Makefile.in: Regenerate.
	* native/jni/gstreamer-peer/Makefile.in: Regenerate.
	* native/jni/gtk-peer/Makefile.in: Regenerate.
	* native/jni/java-io/Makefile.in: Regenerate.
	* native/jni/java-lang/Makefile.in: Regenerate.
	* native/jni/java-math/Makefile.in: Regenerate.
	* native/jni/java-net/Makefile.in: Regenerate.
	* native/jni/java-nio/Makefile.in: Regenerate.
	* native/jni/java-util/Makefile.in: Regenerate.
	* native/jni/midi-alsa/Makefile.in: Regenerate.
	* native/jni/midi-dssi/Makefile.in: Regenerate.
	* native/jni/native-lib/Makefile.in: Regenerate.
	* native/jni/qt-peer/Makefile.in: Regenerate.
	* native/jni/xmlj/Makefile.in: Regenerate.
	* native/plugin/Makefile.in: Regenerate.
	* resource/Makefile.in: Regenerate.
	* scripts/Makefile.in: Regenerate.
	* tools/Makefile.in: Regenerate.

libjava/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* gcj/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libjava/libltdl/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.

libmudflap/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libobjc/:
	* aclocal.m4: Regenerate.

libssp/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.

libstdc++-v3/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* doc/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

zlib/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.

From-SVN: r157949
2010-04-02 18:18:06 +00:00
Jakub Jelinek 80f046cced re PR libgomp/42942 (OpenMP omp_set_max_active_levels(0) isn't resetting value)
PR libgomp/42942
	* env.c (parse_unsigned_long): Add ALLOW_ZERO argument.
	(initialize_env): Adjust callers.
	(omp_set_max_active_levels): Set gomp_max_active_levels_var even
	when the argument is 0.

	* testsuite/libgomp.c/pr42942.c: New test.

From-SVN: r157635
2010-03-22 16:16:52 +01:00
Sebastian Pop b58543c3e5 Add ChangeLog entries.
From-SVN: r157292
2010-03-08 17:50:17 +00:00
Tobias Grosser 73102986df Add forgotten ChangeLog entries.
Eric pointed out that my ChangeLog was incorrect. As I forgot to
commit it at all, here the corrected ChangeLogs for the last commit.

gcc/
2010-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
	    Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>

	* graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
	handle conversions from pointer to integers.
	(gcc_type_for_cloog_iv): Choose the smalles signed integer as an
	induction variable, to be able to work with code generated by
	CLooG.
	* graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
	(build_poly_scop): Bail out if we cannot codegen a loop.

gcc/testsuite/
2010-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>

	* gcc.dg/graphite/id-18.c: New.
	* gcc.dg/graphite/run-id-pr42644.c: New.

libgomp/
2010-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>

	* testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
	* testsuite/libgomp.graphite/force-parallel-2.c: Adjust.

From-SVN: r157287
2010-03-08 17:49:42 +00:00
Tobias Grosser 68d3ff9044 Fix type problems in loop ivs.
Fix pr42644.
Fix pr42130 (dealII).

2010-03-03  Tobias Grosser  <grosser@fim.uni-passau.de>

	* gcc/graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
	handle conversions from pointer to integers.
	(gcc_type_for_cloog_iv): Choose the smalles signed integer as an
	induction variable, to be able to work with code generated by
	CLooG.
	* gcc/graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
	(build_poly_scop): Bail out if we cannot codegen a loop.
	* gcc/testsuite/gcc.dg/graphite/id-18.c: New.
	* gcc/testsuite/gcc.dg/graphite/run-id-pr42644.c: New.
	* libgomp/testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
	* libgomp/testsuite/libgomp.graphite/force-parallel-2.c: Adjust.

From-SVN: r157286
2010-03-08 17:49:36 +00:00
Sebastian Pop 8d2220b234 Fix PR42988: handle unknown_dependence.
2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>

	PR middle-end/42988
	* graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
	to unknown_dependence.
	(graphite_legal_transform_dr): Handle the unknown_dependence.
	(graphite_carried_dependence_level_k): Same.

	* testsuite/libgomp.graphite/force-parallel-5.c: Un-XFAILed.
	* testsuite/libgomp.graphite/pr41118.c: Renamed from pr4118.

From-SVN: r156582
2010-02-07 19:49:06 +00:00
Rainer Orth 41d1138f79 task-1.C: Renamed err to e.
* testsuite/libgomp.c++/task-1.C: Renamed err to e.
	* testsuite/libgomp.c++/task-6.C: Likewise.

From-SVN: r156354
2010-01-29 15:34:07 +00:00
Steve Ellcey 6684eb28f6 configure.tgt (*-*-hpux*): Add -frandom-seed flag.
2010-01-28  Steve Ellcey  <sje@cup.hp.com>

	* configure.tgt (*-*-hpux*): Add -frandom-seed flag.

From-SVN: r156334
2010-01-28 21:47:59 +00:00
Paolo Bonzini 2122aa973e configure.ac: Test for executability of _the first word_ of GFORTRAN.
2010-01-26  Paolo Bonzini  <bonzini@gnu.org>

	* configure.ac: Test for executability of _the first word_ of GFORTRAN.
	* configure: Regenerate.

From-SVN: r156264
2010-01-26 21:32:28 +00:00
Jakub Jelinek 057dd91d0c re PR fortran/42866 (ICE for REDUCTION with ALLOCATABLE array as variable on SECTIONS)
PR fortran/42866
	* omp-low.c (expand_omp_sections): Only use single_pred if
	l2_bb is single_pred_p.

	* testsuite/libgomp.fortran/allocatable5.f90: New test.

From-SVN: r156235
2010-01-26 10:47:45 +01:00
Paolo Bonzini d0709b6aee configure.ac: Test for executability of GFORTRAN.
2010-01-20  Paolo Bonzini  <bonzini@gnu.org>

	* configure.ac: Test for executability of GFORTRAN.
	* configure: Regenerate.

From-SVN: r156232
2010-01-26 07:57:21 +00:00
Rainer Orth b9497ab5ed stdint.m4 (GCC_HEADER_STDINT): Don't typedef uint8_t etc.
config:
	* stdint.m4 (GCC_HEADER_STDINT): Don't typedef uint8_t etc. if
	corresponding macros already exist.

	libdecnumber:
	* configure: Regenerate.

	libgfortran:
	* configure: Regenerate.

	libgomp:
	* configure: Regenerate.

	libstdc++-v3:
	* configure: Regenerate.

From-SVN: r155648
2010-01-05 14:02:37 +00:00
H.J. Lu 45de56481a Make 's' atomic
2010-01-04  H.J. Lu  <hongjiu.lu@intel.com>

	PR libgomp/42602
	* libgomp.fortran/recursion1.f90 (sub): Make 's' atomic.

From-SVN: r155615
2010-01-04 06:28:30 -08:00
Richard Guenther e74003a1b8 re PR testsuite/42583 (FAIL: gfortran.dg/gomp/recursion1.f90: gfortran: libgomp.spec: No such file or directory)
2010-01-03  Richard Guenther  <rguenther@suse.de>

	PR testsuite/42583
	* gfortran.dg/gomp/recursion1.f90: Remove.

	libgomp/
	* testsuite/libgomp.fortran/recursion1.f90: New testcase.

From-SVN: r155597
2010-01-03 22:44:56 +00:00
Sebastian Pop 1b3abda87d Add missing testcases.
2009-12-23  Sebastian Pop  <sebpop@gmail.com>

	* g++.dg/graphite/id-1.C: New.
	* g++.dg/graphite/pr41305.C: New.
	* gcc.dg/graphite/id-16.c: New.
	* gcc.dg/graphite/interchange-10.c: New.
	* gcc.dg/graphite/interchange-11.c: New.
	* gcc.dg/graphite/interchange-mvt.c: New.
	* gcc.dg/graphite/pr40281.c: New.
	* gcc.dg/graphite/run-id-2.c: New.
	* gcc.dg/graphite/scop-dsyr2k.c: New.
	* gcc.dg/graphite/scop-dsyrk.c: New.
	* gcc.dg/graphite/scop-mvt.c: New.
	* gcc.dg/graphite/scop-sor.c: New.
	* gfortran.dg/graphite/id-18.f90: New.
	* gfortran.dg/graphite/interchange-3.f90: New.
	* gfortran.dg/graphite/pr42050.f90: New.

	* testsuite/libgomp.graphite/pr4118.c: New.

From-SVN: r155424
2009-12-23 07:51:19 +00:00
Iain Sandoe e19977d379 crayptr2.f90: Remove forced static linkage for darwin...
2009-12-22  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>

	* testsuite/libgomp.fortran/crayptr2.f90: Remove forced static linkage
	for darwin, protect the test with require-effective-target tls_runtime.
	* testsuite/libgomp.fortran/pr32550.f90: Ditto.

From-SVN: r155409
2009-12-22 22:16:02 +00:00
Iain Sandoe 1d32a77299 re PR target/41605 (Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.)
2009-12-22  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>

gcc/
	PR target/41605
	* lib/g++.exp: Provide -B options to allow for link spec %s
	substitutions for static libraries.

libstdc++-v3/
	PR target/41605
	* testsuite/libstdc++-abi/abi.exp: Provide -B options to allow for
	link spec %s substitutions for static libraries.
	* testsuite/lib/libstdc++.exp: Ditto

libgomp/
	PR target/41605
	* testsuite/lib/libgomp.exp: Provide -B options to allow for
	link spec %s substitutions for static libraries.

From-SVN: r155408
2009-12-22 22:11:27 +00:00
Jack Howarth deb109b24d re PR testsuite/42135 (FAIL: libgomp.graphite/force-parallel-2.c execution test)
Fix PR42135.

2009-12-18  Jack Howarth <howarth@bromo.med.uc.edu>

	PR testsuite/42135
	* libgomp.graphite/force-parallel-2.c: Reduce array size.

From-SVN: r155337
2009-12-18 07:38:06 +00:00
Ralf Wildenhues 43e02a8a71 Sync from git Libtool and regenerate.
/:
	PR target/38384
	PR bootstrap/40972
	* libtool.m4: Sync from git Libtool.
	* ltoptions.m4: Likewise.
	* ltversion.m4: Likewise.
	* lt~obsolete.m4: Likewise.
	* ltmain.sh: Likewise.

boehm-gc/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* include/Makefile.in: Regenerate.

fixincludes/:
	* configure: Regenerate.

gcc/:
	* configure: Regenerate.

libffi/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* include/Makefile.in: Regenerate.
	* man/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libgfortran/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

libgomp/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libjava/classpath/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* doc/api/Makefile.in: Regenerate.
	* examples/Makefile.in: Regenerate.
	* external/Makefile.in: Regenerate.
	* external/jsr166/Makefile.in: Regenerate.
	* external/relaxngDatatype/Makefile.in: Regenerate.
	* external/sax/Makefile.in: Regenerate.
	* external/w3c_dom/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* lib/Makefile.in: Regenerate.
	* native/Makefile.in: Regenerate.
	* native/fdlibm/Makefile.in: Regenerate.
	* native/jawt/Makefile.in: Regenerate.
	* native/jni/Makefile.in: Regenerate.
	* native/jni/classpath/Makefile.in: Regenerate.
	* native/jni/gconf-peer/Makefile.in: Regenerate.
	* native/jni/gstreamer-peer/Makefile.in: Regenerate.
	* native/jni/gtk-peer/Makefile.in: Regenerate.
	* native/jni/java-io/Makefile.in: Regenerate.
	* native/jni/java-lang/Makefile.in: Regenerate.
	* native/jni/java-math/Makefile.in: Regenerate.
	* native/jni/java-net/Makefile.in: Regenerate.
	* native/jni/java-nio/Makefile.in: Regenerate.
	* native/jni/java-util/Makefile.in: Regenerate.
	* native/jni/midi-alsa/Makefile.in: Regenerate.
	* native/jni/midi-dssi/Makefile.in: Regenerate.
	* native/jni/native-lib/Makefile.in: Regenerate.
	* native/jni/qt-peer/Makefile.in: Regenerate.
	* native/jni/xmlj/Makefile.in: Regenerate.
	* native/plugin/Makefile.in: Regenerate.
	* resource/Makefile.in: Regenerate.
	* scripts/Makefile.in: Regenerate.
	* tools/Makefile.in: Regenerate.

libjava/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* gcj/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libmudflap/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libobjc/:
	* configure: Regenerate.

libssp/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

libstdc++-v3/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

lto-plugin/:
	* configure: Regenerate.
	* Makefile.in: Regenerate.

zlib/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

From-SVN: r155012
2009-12-05 17:18:53 +00:00
Dave Korn 17f35e2332 libgomp.exp (libgomp_init): Add host-dependent settings for LC_ALL and LANG.
libgomp/ChangeLog

2009-11-30  Dave Korn  <dave.korn.cygwin@gmail.com>

	* testsuite/lib/libgomp.exp (libgomp_init): Add host-dependent
	settings for LC_ALL and LANG.

gcc/testsuite/ChangeLog

2009-11-30  Dave Korn  <dave.korn.cygwin@gmail.com>

	* lib/g++.exp (g++_init): Add host-dependent settings for
	LC_ALL and LANG.
	* lib/gcc-dg.exp: Likewise.
	* lib/options.exp: Likewise.
	* lib/objc.exp (objc_init): Likewise.
	* lib/gfortran.exp (gfortran_init): Likewise.

libjava/ChangeLog

2009-11-30  Dave Korn  <dave.korn.cygwin@gmail.com>

	* testsuite/lib/libjava.exp (libjava_init):  Add host-dependent
	settings for LC_ALL and LANG.

From-SVN: r154854
2009-11-30 23:30:57 +00:00
Jakub Jelinek 281e33e1bb re PR fortran/42162 (OpenMP: ICE: tree check in omp_add_variable, at gimplify.c:5282)
PR fortran/42162
	* trans-openmp.c (gfc_trans_omp_do): When dovar isn't a VAR_DECL,
	don't use simple loop and handle clauses properly.

	* testsuite/libgomp.fortran/pr42162.f90: New test.

From-SVN: r154654
2009-11-25 21:28:56 +01:00
Sebastian Pop 7f05acf925 ChangeLog.graphite: New.
2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>

	* ChangeLog.graphite: New.
	* testsuite/libgomp.graphite/graphite.exp (PARALLEL_CFLAGS): Add
	-fno-loop-block.

From-SVN: r154571
2009-11-25 04:59:10 +00:00
Li Feng 1825f9a2f4 re PR tree-optimization/41118 (Wrong dependence analysis in graphite for unrestricted pointers)
2009-09-17 Li Feng  <nemokingdom@gmail.com>

	PR middle-end/41118
	* graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
	(pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
	(graphite_carried_dependence_level_k): Ditto.
	* graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
	* graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
	(new_poly_dr): Adjust declaration.
	* graphite-sese-to-poly.c (free_data_refs_aux): New.
	(free_gimple_bb): Added free_data_refs_aux.
	(build_poly_dr): Add dr_base_object_set.
	(partition_drs_to_sets): New.
	(dr_same_base_object_p): New.
	(build_alias_set_for_drs): New.
	(build_base_object_set_for_drs): New.
	(build_scop_drs): Add build_base_obj_set_for_drs.
	* graphite-sese-to-poly.h: Added #define for alias set number index and
	base object set index.
	* libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
	* libgomp/testsuite/libgomp.graphite/pr4118.c: New.

From-SVN: r154549
2009-11-25 04:48:51 +00:00
Jakub Jelinek 2b32c27d98 re PR middle-end/42029 (ICE with complex data type and openmp for reduction clause)
PR middle-end/42029
	* gimplify.c (gimplify_omp_atomic): Set DECL_GIMPLE_REG_P on
	tmp_load if needed.

	* libgomp.c/pr42029.c: New test.

From-SVN: r154161
2009-11-13 19:38:36 +01:00
Eric Botcazou 7e06c3d67d Fix nits
From-SVN: r153586
2009-10-27 10:09:04 +00:00
Jakub Jelinek 89c74f4afa re PR libstdc++/38923 (symbol versioning disabled due to non-portable sed script)
PR libstdc++/38923
	* acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Avoid using too many
	*s.  Accept ld version without text in ()s.
	* configure: Regenerated.

	* acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid using too many
	*s.  Accept ld version without text in ()s.
	* configure: Regenerated.

From-SVN: r153570
2009-10-26 21:28:24 +01:00
Razya Ladelsky 487102294c cfgloopmanip.c (duplicate_subloops): Export.
2009-10-22  Razya Ladelsky  <razya@il.ibm.com>

        * cfgloopmanip.c  (duplicate_subloops): Export.
        * tree-parloops.c (loop_parallel_p): Dump if loop is innermost.
        (transform_to_exit_first_loop): Duplicate bbs starting from 
        header up to loop->latch instead of exit->src.
        Initialize control variable to the correct number of iterations.
        (gather_scalar_reductions): Do not register double reductions.
        (parallelize_loops): Dump which loop is tested. 
        Indicate whether the parallelized loop is inner or not. 
        Remove the innermost-loop requirement.
        * cfgloop.h (duplicate_subloops): Export. 
        * tree-cfg.c (add_phi_args_after_redirect): New function.
        (gimple_duplicate_sese_tail): Remove the no-subloops constraint.
        Call duplicate_subloops.
        Update number of iterations at the exit condition.
        Don't redirect nexits always to the loop exit.
        Redirect copied edges from latch to the loop exit.
        * testsuite/libgomp.graphite/force-parallel-2.c: Adjust scan.
        * testsuite/gcc.dg/autopar/outer-1.c: New testcase.
        * testsuite/gcc.dg/autopar/outer-2.c: New testcase.
        * testsuite/gcc.dg/autopar/outer-3.c: New testcase.
        * testsuite/gcc.dg/autopar/outer-4.c: New testcase.
        * testsuite/gcc.dg/autopar/outer-5.c: New testcase.
        * testsuite/gcc.dg/autopar/outer-6.c: New testcase.

From-SVN: r153457
2009-10-22 14:43:40 +00:00
Ralf Wildenhues 0046b1a727 Fix libgomp without --enable-languages=fortran.
libgomp/:
	PR libgomp/41418
	* configure.ac: Set FC to "no" if $GFORTRAN starts with "no"
	or a hyphen (happens with fortran language disabled).
	* configure: Regenerate.

From-SVN: r152931
2009-10-17 07:34:47 +00:00
Ralf Wildenhues c82852f706 sed and head portability fixes in ld version check.
libstdc++-v3/:
	PR libstdc++/38923
	* acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Avoid 'head',
	use sed script portable to Solaris /bin/sed for extracting ld
	version.
	* configure: Regenerate.

libgomp/:
	* acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid 'head',
	use sed script portable to Solaris /bin/sed for extracting ld
	version.
	* configure: Regenerate.

From-SVN: r152315
2009-09-30 00:43:28 +00:00
Alexander Monakov 98f3eb1f98 graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only for ARRAY_REFs.
2009-09-17  Alexander Monakov  <amonakov@ispras.ru>

gcc:
	* graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
	for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.

libgomp:
	* testsuite/libgomp.graphite/bounds.c: New test.

From-SVN: r151802
2009-09-17 17:33:37 +04:00
Ralf Wildenhues 878f62e5bd Override all per-target *_LINK variables correctly.
boehm-gc/:
	* Makefile.am (libgcjgc_la_LINK, gctest_LINK): New.
	(gctest_LDADD): Depend on libgcjgc.la instead of ./libgcjgc.la,
	so that library dependency resolution works with portable make.
	* Makefile.in: Regenerate.

libgfortran/:
	* Makefile.am (libgfortranbegin_la_LINK): New.
	* Makefile.in: Regenerate.

libgomp/:
	* Makefile.am (libgomp_la_LINK): New.
	* Makefile.in: Regenerate.

libjava/:
	* Makefile.am (libgij_la_LINK, libjvm_la_LINK): New.
	* Makefile.in: Regenerate.

libstdc++-v3/:
	* src/Makefile.am (libstdc___la_LINK): New.
	* src/Makefile.in: Regenerate.

From-SVN: r151627
2009-09-11 05:02:20 +00:00
Ralf Wildenhues df58e64872 Update AC_PREREQ entries to 2.64
/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

intl/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

libdecnumber/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

libiberty/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

libjava/classpath/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

libjava/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

libjava/libltdl/:
	* configure.ac (AC_PREREQ): Bump to 2.64.  Remove FIXME.

libssp/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

libobjc/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

libstdc++-v3/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

libada/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

libgcc/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

libgfortran/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

boehm-gc/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

gnattools/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

gcc/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

fixincludes/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

libmudflap/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

zlib/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

libffi/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

libcpp/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

libgomp/:
	* configure.ac (AC_PREREQ): Bump to 2.64.

From-SVN: r151059
2009-08-24 19:08:51 +00:00
Ralf Wildenhues 70fa0efaf4 Cleanups after the update to Autoconf 2.64, Automake 1.11.
/:
	* configure.ac: Remove --with-datarootdir, --with-docdir,
	--with-pdfdir, --with-htmldir switches.
	* configure: Regenerate.

gcc/:
	* configure.ac: Remove --with-datarootdir, --with-docdir,
	--with-htmldir switches.  No need to call AC_SUBST for
	datarootdir, docdir, htmldir any more.
	* configure: Regenerate.
	* doc/install.texi (Configuration): Document --datarootdir,
	--docdir, --htmldir, --pdfdir; update documentation for
	--infodir, --mandir.
	(Prerequisites): Bump Autoconf version to 2.64, Automake to
	1.11, M4 to 1.4.6.

libgfortran/:
	* Makefile.am (install-html, install-pdf): Remove.
	* Makefile.in: Regenerate.

libjava/classpath/:
	* doc/cp-hacking.texinfo (Needed Tools and Libraries): Bump
	Autoconf version to 2.64, Automake to 1.11, M4 to 1.4.6.

libjava/:
	* HACKING: Use aclocal-1.11 and autoconf-2.64 in example.
	* Makefile.am (install-html, install-pdf): Remove.
	* Makefile.in: Regenerate.

libstdc++-v3/:
	* doc/xml/manual/build_hacking.xml: Use tools from Autoconf
	2.64 and Automake 1.11 in examples; update link to Autoconf
	manual page about quadrigraphs.
	* Makefile.am (install-html, install-pdf): Remove.
	* Makefile.in: Regenerate.

libssp/:
	* Makefile.am (install-html, install-pdf): Remove.
	* Makefile.in: Regenerate.

boehm-gc/:
	* Makefile.am (install-html, install-pdf): Remove.
	* Makefile.in: Regenerate.

libmudflap/:
	* Makefile.am (install-html, install-pdf): Remove.
	* Makefile.in: Regenerate.

zlib/:
	* Makefile.am (install-html, install-pdf, html): Remove.
	* Makefile.in: Regenerate.

libffi/:
	* Makefile.am (install-html, install-pdf): Remove.
	* Makefile.in: Regenerate.

libgomp/:
	* Makefile.am (install-html, install-pdf): Remove.
	* Makefile.in: Regenerate.

From-SVN: r151015
2009-08-22 13:41:50 +00:00
Ralf Wildenhues 5213506e24 Regenerate tree using Autoconf 2.64 and Automake 1.11.
config/:
	* override.m4 (_GCC_AUTOCONF_VERSION): Bump to 2.64.

:
	* configure: Regenerate.

intl/:
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* config.h.in: Regenerate.

libiberty/:
	* config.in: Regenerate.
	* configure: Regenerate.

boehm-gc/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* include/Makefile.in: Regenerate.
	* include/gc_config.h.in: Regenerate.

fixincludes/:
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* config.h.in: Regenerate.

gcc/:
	* aclocal.m4: Regenerate.
	* config.in: Regenerate.
	* configure: Regenerate.

libgcc/:
	* configure: Regenerate.

gnattools/:
	* configure: Regenerate.

libada/:
	* configure: Regenerate.

libcpp/:
	* aclocal.m4: Regenerate.
	* config.in: Regenerate.
	* configure: Regenerate.

libdecnumber/:
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* config.in: Regenerate.

libffi/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* fficonfig.h.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* man/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libgfortran/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.

libgomp/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libjava/classpath/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* doc/api/Makefile.in: Regenerate.
	* examples/Makefile.in: Regenerate.
	* external/Makefile.in: Regenerate.
	* external/jsr166/Makefile.in: Regenerate.
	* external/relaxngDatatype/Makefile.in: Regenerate.
	* external/sax/Makefile.in: Regenerate.
	* external/w3c_dom/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* include/config.h.in: Regenerate.
	* lib/Makefile.in: Regenerate.
	* native/Makefile.in: Regenerate.
	* native/fdlibm/Makefile.in: Regenerate.
	* native/jawt/Makefile.in: Regenerate.
	* native/jni/Makefile.in: Regenerate.
	* native/jni/classpath/Makefile.in: Regenerate.
	* native/jni/gconf-peer/Makefile.in: Regenerate.
	* native/jni/gstreamer-peer/Makefile.in: Regenerate.
	* native/jni/gtk-peer/Makefile.in: Regenerate.
	* native/jni/java-io/Makefile.in: Regenerate.
	* native/jni/java-lang/Makefile.in: Regenerate.
	* native/jni/java-math/Makefile.in: Regenerate.
	* native/jni/java-net/Makefile.in: Regenerate.
	* native/jni/java-nio/Makefile.in: Regenerate.
	* native/jni/java-util/Makefile.in: Regenerate.
	* native/jni/midi-alsa/Makefile.in: Regenerate.
	* native/jni/midi-dssi/Makefile.in: Regenerate.
	* native/jni/native-lib/Makefile.in: Regenerate.
	* native/jni/qt-peer/Makefile.in: Regenerate.
	* native/jni/xmlj/Makefile.in: Regenerate.
	* native/plugin/Makefile.in: Regenerate.
	* resource/Makefile.in: Regenerate.
	* scripts/Makefile.in: Regenerate.
	* tools/Makefile.in: Regenerate.

libjava/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* gcj/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* include/config.h.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libjava/libltdl/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* config-h.in: Regenerate.
	* configure: Regenerate.

libmudflap/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libobjc/:
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* config.h.in: Regenerate.

libssp/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.

libstdc++-v3/:
	* Makefile.in: Regenerate.
	* acinclude.m4: Regenerate.
	* aclocal.m4: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

zlib/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

From-SVN: r151014
2009-08-22 13:22:20 +00:00
Ralf Wildenhues 84fec8a537 LIBTOOLFLAGS, and *_LINK fixes for Automake 1.11
boehm-gc/:
	* Makefile.am (LTCOMPILE, LTLINK): Add $(AM_LIBTOOLFLAGS)
	and $(LIBTOOLFLAGS).
	* Makefile.in: Regenerate.

libgfortran/:
	* Makefile.am (libgfortran_la_LINK): Add $(libgfortran_la_LDFLAGS).
	* Makefile.in: Regenerate.

libjava/:
	* Makefile.am (libgcj_la_LINK, libgcj_tools_la_LINK)
	(lib_gnu_awt_xlib_la_LINK, libgcj_bc_la_LINK, jv_convert_LINK)
	(gcj_dbtool_LINK, gc_analyze_LINK, gij_LINK, ecjx_LINK)
	(gappletviewer_LINK, gjarsigner_LINK, gkeytool_LINK)
	(gjar_LINK, gjavah_LINK, gcjh_LINK, gnative2ascii_LINK)
	(gorbd_LINK, grmid_LINK, gserialver_LINK, gtnameserv_LINK)
	(grmic_LINK, grmiregistry_LINK, gjdoc_LINK): Add $(gjdoc_LDFLAGS).
	(GCJLINK, LIBLINK, CXXLINK): Add $(LIBTOOLFLAGS).
	* Makefile.in: Regenerate.

libstdc++-v3/:
	* libsupc++/Makefile.am (LTCOMPILE, LTCXXCOMPILE, CXXLINK): Add
	$(LIBTOOLFLAGS).
	* libsupc++/Makefile.in: Regenerate.
	* src/Makefile.am (LTCXXCOMPILE, CXXLINK): Add $(AM_LIBTOOLFLAGS)
	and $(LIBTOOLFLAGS).
	* src/Makefile.in: Regenerate.

libgomp/:
	* Makefile.am (LINK): Add $(AM_LIBTOOLFLAGS) and $(LIBTOOLFLAGS).
	* Makefile.in: Regenerate.

libobjc/:
	* Makefile.in (LIBTOOL): Add $(LIBTOOLFLAGS).

From-SVN: r151013
2009-08-22 12:43:24 +00:00
Dave Korn 197c68cc97 Makefile.am (libgomp_la_LDFLAGS): Add -bindir flag.
libgomp/ChangeLog:

	* Makefile.am (libgomp_la_LDFLAGS): Add -bindir flag.
	* Makefile.in: Regenerate.

ChangeLog:

	* ltmain.sh (func_normal_abspath): New function.
	(func_relative_path): Likewise.
	(func_mode_help): Document new -bindir option for link mode.
	(func_mode_link): Add new -bindir option, and use it to place
	output DLL if specified.

libgfortran/ChangeLog:

	* Makefile.am (LTLDFLAGS): Add -bindir flag.
	* Makefile.in: Regenerate.

libssp/ChangeLog:

	* Makefile.am (libssp_la_LDFLAGS): Add -bindir flag.
	* Makefile.in: Regenerate.

libjava/libltdl/ChangeLog:

	* Makefile.am (libltdl_la_LDFLAGS): Add -bindir flag.
	* Makefile.in: Regenerate.

libjava/classpath/ChangeLog:

	* ltmain.sh (func_normal_abspath): New function.
	(func_relative_path): Likewise.
	(func_mode_help): Document new -bindir option for link mode.
	(func_mode_link): Add new -bindir option, and use it to place
	output DLL if specified.

From-SVN: r150960
2009-08-20 11:11:34 +00:00
Tobias Burnus 693d54f279 re PR fortran/41102 (Ease error checking of included files located in the SYSTEM_INCLUDE_DIR/ending in .h)
2009-08-19  Tobias Burnus  <burnus@net-b.de>

        PR fortran/41102
        omp_lib.h.in: Fix -std=f95 errors.

From-SVN: r150931
2009-08-19 08:38:29 +02:00
David Edelsohn 8cac884c9a graphite_autopar: Move to libgomp testsuite.
gcc/testsuite/
        * gcc.dg/graphite/graphite_autopar: Move to libgomp testsuite.

libgomp/
        * testsuite/libgomp.graphite: Move from gcc.dg/graphite.
        * testsuite/libgomp.graphite/graphite_autopar.exp: Delete.
        * testsuite/libgomp.graphite/graphite.exp: New.

From-SVN: r150755
2009-08-14 10:02:43 -04:00
Andreas Tobler 78729ee244 fortran.exp: Add flags in case of shared only build.
2009-08-05  Andreas Tobler  <a.tobler@schweiz.org>

	* testsuite/libgomp.fortran/fortran.exp: Add flags in case of shared
	only build.

From-SVN: r150495
2009-08-05 18:11:54 +02:00
David Daney b13b7f3990 mutex.h (gomp_mutex_unlock): Add comment about needed memory barrier semantics.
2009-08-04  David Daney  <ddaney@caviumnetworks.com>

	* config/linux/mutex.h (gomp_mutex_unlock): Add comment about
	needed memory barrier semantics.
	* config/linux/mips/mutex.h: New file.

From-SVN: r150463
2009-08-04 17:25:42 +00:00
Ralf Wildenhues 1b3b24c2a6 extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Do not expand for Autoconf 2.62 or newer.
config/
	* extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Do not expand
	for Autoconf 2.62 or newer.
	* tls.m4 (GCC_CHECK_TLS): Fix m4 quotation.
	* no-executables.m4 (_AC_COMPILER_EXEEXT): Fix m4 quotation.
	* override.m4 (m4_copy_force, m4_rename_force): Provide
	macros if not defined.
	(AC_PREREQ): Use m4_copy_force.

boehm-gc/
	* configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.

libada/
	* configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.

libffi/
	* configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.

libgfortran/
	* configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.

libgomp/
	* configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.

libjava/
	* configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.

libmudflap/
	* configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.

libobjc/
	* configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.

libssp/
	* configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.

zlib/
	* configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.

libstdc++-v3/
	* acinclude.m4 (GLIBCXX_CONFIGURE): Use m4_rename_force.

From-SVN: r150269
2009-07-30 19:41:13 +00:00
Joseph Myers 396b7fa48a tls.m4 (GCC_CHECK_TLS): Also test TLS in a shared library when cross-compiling.
config:
	* tls.m4 (GCC_CHECK_TLS): Also test TLS in a shared library when
	cross-compiling.

libgomp:
	* configure: Regenerate.

libjava:
	* configure: Regenerate.

libmudflap:
	* configure: Regenerate.

libstdc++-v3:
	* configure: Regenerate.

From-SVN: r149725
2009-07-17 00:18:08 +01:00
Richard Sandiford 33cde5161f re PR testsuite/40699 (All sparcv9 libjava execution tests fail on Solaris 11/SPARC)
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
2009-07-11 06:10:49 +00:00
Richard Sandiford bc21bfa5e3 libgomp.exp (libgomp_init): Use the ALWAYS_CFLAGS options when choosing a multilib.
libgomp/
	* testsuite/lib/libgomp.exp (libgomp_init): Use the ALWAYS_CFLAGS
	options when choosing a multilib.

From-SVN: r149195
2009-07-02 20:55:23 +00:00
Richard Sandiford b30bfd402f gcc-defs.exp (gcc-set-multilib-library-path): Delete.
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
2009-06-30 18:37:57 +00:00
Nathan Froyd 479c15c22a Makefile.am (LTLDFLAGS): Define.
* Makefile.am (LTLDFLAGS): Define.
	(LINK): Define.
	* Makefile.in: Regenerate.

From-SVN: r148311
2009-06-09 14:37:31 +00:00
Janne Blomqvist 667e6f8924 Don't link to or test existence of libgfortranbegin
From-SVN: r147929
2009-05-27 23:02:02 +03:00
Jakub Jelinek 6dea8e99a9 re PR libgomp/40174 (Memory leak when using '#pragma omp parallel')
PR libgomp/40174
	* team.c (gomp_thread_start): Destroy thr->release semaphore.
	(gomp_free_pool_helper): Likewise.

From-SVN: r147747
2009-05-20 22:54:45 +02:00
Vasilis Liaskovitis 34d01e1d17 re PR fortran/35423 (Implement OpenMP workshare)
PR fortran/35423
	* trans.h (OMPWS_WORKSHARE_FLAG, OMPWS_CURR_SINGLEUNIT,
	OMPWS_SCALARIZER_WS, OMPWS_NOWAIT): Define.
	(ompws_flags): New extern decl.
	* trans-array.c (gfc_trans_scalarized_loop_end): Build OMP_FOR
	for the outer dimension if ompws_flags allow it.
	* trans.c (gfc_generate_code): Clear ompws_flags.
	* trans-expr.c (gfc_trans_assignment_1): Allow worksharing
	array assignments inside of !$omp workshare.
	* trans-stmt.c (gfc_trans_where_3): Similarly for where statements
	and constructs.
	* trans-openmp.c (ompws_flags): New variable.
	(gfc_trans_omp_workshare): Rewritten.

	* testsuite/libgomp.fortran/workshare2.f90: New test.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r146397
2009-04-20 12:59:59 +02:00
Jakub Jelinek 748086b7b2 Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.
From-SVN: r145841
2009-04-09 17:00:19 +02:00
Jakub Jelinek 4f0ae266e0 re PR middle-end/39573 (Linking fails on AMD with -march=native and -fopenmp, works with generic x86_64)
PR middle-end/39573
	* omp-low.c (expand_omp_taskreg): Finalize taskreg static local_decls
	variables.

	* libgomp.c++/pr39573.C: New test.

From-SVN: r145772
2009-04-08 22:04:45 +02:00
Jakub Jelinek 03742a9b01 re PR other/39591 (GOMP_loop_end illegally optmized into GOMP_loop_end_nowait)
PR other/39591
	* omp-low.c (remove_exit_barrier): Don't optimize if there are any
	addressable variables in the parallel that could go out of scope while
	running queued tasks.

	* testsuite/libgomp.c/pr39591-1.c: New test.
	* testsuite/libgomp.c/pr39591-2.c: New test.
	* testsuite/libgomp.c/pr39591-3.c: New test.

From-SVN: r145390
2009-04-01 08:54:52 +02:00
Uros Bizjak e50ea10b75 atomic-5.c: Cleanup cpuid usage.
* testsuite/libgomp.c/atomic-5.c: Cleanup cpuid usage.
	* testsuite/libgomp.c/atomic-6.c: Ditto.

From-SVN: r145061
2009-03-25 14:36:02 +01:00
Jakub Jelinek c5cdb03fb9 re PR c/39495 (OMP parallel loop w/ unsigned index var rejected)
PR c/39495
	* c-parser.c (c_parser_omp_for_loop): Call c_parser_binary_expression
	instead of c_parser_expression_conv, if original_code isn't one of the
	4 allowed comparison codes, fail.

	* semantics.c (handle_omp_for_class_iterator): Swap cond operands and
	code if iter is the second operand.
	* parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
	argument.  If it is set, don't build the toplevel expression with
	build_x_binary_op, but build2.
	(cp_parser_assignment_expression,  cp_parser_omp_for_incr): Adjust
	callers.
	(cp_parser_omp_for_cond): Don't assume the first operand of the
	comparison must be decl.

	* gcc.dg/gomp/pr39495-2.c: Remove xfails.

	* testsuite/libgomp.c/loop-12.c: New test.
	* testsuite/libgomp.c/loop-11.c: New test.
	* testsuite/libgomp.c++/loop-11.C: New test.
	* testsuite/libgomp.c++/loop-12.C: New test.
	* testsuite/libgomp.c++/for-8.C: New test.

From-SVN: r145014
2009-03-23 22:05:30 +01:00
Ralf Wildenhues 7a9d3fe886 backport: Support GNU/kOpenSolaris.
Backport from git Libtool:

	2009-01-19  Robert Millan  <rmh@aybabtu.com>
	Support GNU/kOpenSolaris.
	* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER)
	(_LT_CHECK_MAGIC_METHOD, _LT_COMPILER_PIC, _LT_LINKER_SHLIBS)
	(_LT_LANG_CXX_CONFIG) [kopensolaris*-gnu]: Recognize
	GNU/kOpenSolaris.

libjava/classpath/
	* configure: Regenerate.

libjava/
	* configure: Regenerate.

libssp/
	* configure: Regenerate.

libobjc/
	* configure: Regenerate.

libstdc++-v3/
	* configure: Regenerate.

libgfortran/
	* configure: Regenerate.

boehm-gc/
	* configure: Regenerate.

gcc/
	* configure: Regenerate.

libmudflap/
	* configure: Regenerate.

zlib/
	* configure: Regenerate.

libffi/
	* configure: Regenerate.

libgomp/
	* configure: Regenerate.

From-SVN: r144527
2009-03-01 17:49:31 +00:00
Adam Nemet a16b68bb66 Fixed location of libgomp.exp.
From-SVN: r144433
2009-02-25 20:14:34 +00:00
Jakub Jelinek 3ad6b2669b re PR middle-end/39154 (Miscompilation of VLAs in nested parallel regions)
PR middle-end/39154
	* gimplify.c (omp_notice_variable): If adding GOVD_SEEN
	bit to variable length decl's flags, add it also to its
	pointer replacement variable.

	* testsuite/libgomp.c/pr39154.c: New test.

From-SVN: r144111
2009-02-11 22:57:52 +01:00
Ian Lance Taylor b39dea08d9 acinclude.m4 (LIBCOMP_CHECK_LINKER_FEATURES): Set libgomp_ld_is_gold.
* acinclude.m4 (LIBCOMP_CHECK_LINKER_FEATURES): Set
	libgomp_ld_is_gold.  Get gold version number.
	(LIBGOMP_ENABLE_SYMVERS): Gold always support symbol versioning.
	* configure: Rebuild.

From-SVN: r143822
2009-01-31 17:09:24 +00:00
Iain Sandoe 72c6659693 darwin.h: Add static-libgfortran to LINK_SPEC.
2009-01-19  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>

gcc/
        * config/darwin.h: Add static-libgfortran to LINK_SPEC.
gcc/testsuite/
        * lib/gfortran.exp: Add -B options for targets that use
	libgfortran.a%s in their specs.
libgomp/
        * testsuite/lib/libgomp.exp: Add -B option for targets that
	use libgfortran.a%s in their specs.

From-SVN: r143507
2009-01-20 00:59:24 +00:00
Jakub Jelinek 876080ffb7 re PR libgomp/38086 (libgomp fails to build if assembler doesn't support .symver)
PR libgomp/38086
	* acinclude.m4 (HAVE_AS_SYMVER_DIRECTIVE): New check.
	* libgomp.h (LIBGOMP_GNU_SYMBOL_VERSIONING): Undefine if
	HAVE_AS_SYMVER_DIRECTIVE is not defined.
	* configure: Regenerated.
	* config.h.in: Likewise.

From-SVN: r143168
2009-01-07 23:48:03 +01:00
Jakub Jelinek e4ebaef35b re PR c++/38650 (Trouble with volatile and #pragma omp for)
PR c++/38650
	* semantics.c (finish_omp_for): Don't add CLEANUP_POINT_EXPR
	around volatile iteration var in condition and/or increment
	expression.

	* testsuite/libgomp.c/pr38650.c: New test.
	* testsuite/libgomp.c++/pr38650.C: New test.

From-SVN: r142940
2008-12-28 21:06:00 +01:00