Commit Graph

358 Commits

Author SHA1 Message Date
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
Jakub Jelinek 382017a6e8 * testsuite/libgomp.c/collapse-1.c (main): Add private(k) clause.
From-SVN: r142932
2008-12-27 16:20:28 +01:00
Uros Bizjak 79644b2756 atomic-6.c: Add -mieee for alpha*-*-* targets.
* testsuite/libgomp.c/atomic-6.c: Add -mieee for alpha*-*-* targets.

From-SVN: r142927
2008-12-26 17:35:22 +01:00
Ralf Wildenhues baafc53472 Backport from upstream Libtool:
* libltdl.m4 (_LT_SYS_DYNAMIC_LINKER)
	(_LT_LINKER_SHLIBS): Add cache variables to tests that
	require the linker to work.  For shlibpath_overrides_runpath,
	this also changes the semantics to let the result from the C
	compiler take precedence.

boehm-gc/

	* configure: Regenerate.

fixincludes/

	* configure: Regenerate.

gcc/

	* configure: Regenerate.

libffi/

	* configure: Regenerate.

libgfortran/

	* configure: Regenerate.

libgomp/

	* configure: Regenerate.

libjava/classpath/

	* configure: Regenerate.

libjava/

	* configure: Regenerate.

libmudflap/

	* configure: Regenerate.

libobjc/

	* configure: Regenerate.

libssp/

	* configure: Regenerate.

libstdc++-v3/

	* configure: Regenerate.

zlib/

	* configure: Regenerate.

From-SVN: r142817
2008-12-18 20:04:55 +00:00
Jakub Jelinek d9c194cb9e re PR middle-end/36802 (pop_gimplify_context ICE using openmp task construct)
PR middle-end/36802
	* omp-low.c (use_pointer_for_field): Only call maybe_lookup_decl
	on parallel and task contexts.

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

From-SVN: r142546
2008-12-08 11:36:01 +01:00
Janis Johnson 86a182bf47 re PR libgomp/38270 (libgomp test failures due to missing memory barrier)
PR libgomp/38270
	* config/linux/powerpc/mutex.h: New.

From-SVN: r142341
2008-12-02 00:18:56 +00:00
Jakub Jelinek a2d4cdc96a re PR c++/38257 (ICE with auto and #pragma omp parallel)
PR c++/38257
	* parser.c (cp_parser_omp_for_loop): Handle auto.
	* pt.c (tsubst_omp_for_iterator): Likewise.

	* testsuite/libgomp.c++/for-7.C: New test.

From-SVN: r142320
2008-12-01 16:27:12 +01:00
Jakub Jelinek 956adfaf9f re PR c++/38348 (ICE from c_finish_omp_for)
PR c++/38348
	* c-omp.c (c_finish_omp_for): Only transform pointer
	++ or -- into MODIFY_EXPR if second argument is non-NULL.

	* g++.dg/gomp/for-19.C: New test.

	* testsuite/libgomp.c++/for-6.C: New test.

From-SVN: r142318
2008-12-01 16:10:25 +01:00
Janis Johnson d4038ca243 re PR testsuite/28870 (configuring, over-riding timeout values in testsuite)
gcc/
	PR testsuite/28870
	* doc/sourcebuild.texi (Test Directives): Add dg-timeout and
	dg-timeout-factor.

gcc/testsuite/
	PR testsuite/28870
	* lib/timeout.exp: New.
	* lib/timeout-dg.exp: New.
	* lib/gcc-dg.exp: Include new timeout library files.
	(dg-test): Unset timeout variables.
	* lib/gcc.exp (gcc_target_compile): Set timeout value from new proc.
	* lib/g++.exp (g++_target_compile): Ditto.
	* lib/gfortran.exp (gfortran_target_compile): Ditto.
	* lib/objc.exp (objc_target_compile): Ditto.
	* lib/obj-c++.exp (obj-c++_target_compile): Ditto.
	* lib/obj-c++.exp (obj-c++_target_compile): Ditto.
	* lib/gnat.exp (gnat_target_compile): Ditto.

libstdc++-v3/
	PR testsuite/28870
	* testsuite/lib/libstdc++.exp: Include new timeout library files.
	(libstdc++_init): Define tool_timeout.
	(dg-test): Override DejaGnu proc.
	(v3_target_compile): Set timeout value from new proc.
	(v3_target_compile_as_c): Ditto.

libmudflap/
	PR testsuite/28870
	* testsuite/lib/mfdg.exp (dg-test): Use new timeout support.
	(dg-timeout): Remove.
	(standard-wait): Remove.
	* testsuite/lib/libmudflap.exp: Include new timeout library files.
	(libmudflap_target_compile): Set timeout value from new proc.

libgomp/
	PR testsuite/28870
	* testsuite/lib/libgomp.exp: Include new timeout library files.
	(libgomp_target_compile): Set timeout value from new proc.

From-SVN: r142225
2008-11-26 18:51:07 +00:00
Steve Ellcey 8b159eea9d re PR libgomp/37938 (libgomp testsuite failures on ia64-linux)
PR libgomp/37938
	* config/linux/ia64/mutex.h: New.

From-SVN: r141830
2008-11-13 21:06:38 +00:00
Tobias Burnus 5c6ed53afc re PR libgomp/37935 (omp_set_schedule not documented in libgomp.texi)
2008-11-04  Tobias Burnus  <burnus@net-b.de>

        PR libgomp/37935
        * libgomp.texi (Runtime library routines, environment
        * variables):
        Update for OpenMP version 3.0.

From-SVN: r141583
2008-11-04 19:16:17 +01:00
Peter O'Gorman 6b4a97edb1 configure: Regenerate for new libtool.
* configure: Regenerate for new libtool.
        * Makefile.in: Ditto.
        * testsuite/Makefile.in: Ditto.

Co-Authored-By: Steve Ellcey <sje@cup.hp.com>

From-SVN: r140699
2008-09-26 16:24:34 +00:00
Andreas Tobler 8c3b36006d Fix typo s/darwin/bsd
From-SVN: r140498
2008-09-19 22:28:53 +02:00
Jakub Jelinek e2b3410665 proc.c: New file.
2008-09-19  Jakub Jelinek  <jakub@redhat.com>
	    Andreas Tobler  <a.tobler@schweiz.org>

	* config/bsd/proc.c: New file.
	* configure.tgt (*-*-darwin*): Use config_path "darwin posix".
	* configure.ac: Check for header <sys/sysctl.h>
	* configure: Regenerate.
	* config.h.in: Likewise.

Co-Authored-By: Andreas Tobler <a.tobler@schweiz.org>

From-SVN: r140497
2008-09-19 22:27:11 +02:00
Janis Johnson 3606b8bf77 testsuite/ligbomp.c/c.exp: Unset lang_test_file only if it exists.
From-SVN: r140043
2008-09-05 19:29:26 +00:00
Aaron W. LaFramboise 6528b88d94 Makefile.am (libgomp_la_LDFLAGS): Add -no-undefined.
2008-08-31  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>

	* Makefile.am (libgomp_la_LDFLAGS): Add -no-undefined.
	* Makefile.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.

From-SVN: r139838
2008-08-31 12:16:09 -06:00
Nathan Froyd d9b14b120c Fix ChangeLog typo
From-SVN: r139394
2008-08-21 15:45:37 +00:00
Nathan Froyd 8c9570dfda libgomp.exp (libgomp_init): Only set things that depend on blddir if blddir exists.
* testsuite/libgomp.exp (libgomp_init): Only set things that
	depend on blddir if blddir exists.
	(libgomp_target_compile): Likewise.
	* testsuite/libgomp.c++/c++.exp: Likewise.
	* testsuite/libgomp.fortran/fortran.exp: Likewise.

From-SVN: r139393
2008-08-21 15:37:05 +00:00
Ralf Wildenhues 70b1e37631 re PR ada/15479 (Ada manual problems)
gcc/ada/
	PR documentation/15479
	* gnat-style.texi: Remove AdaCore copyright statement and GPL
	statement for GNAT.  Add @copying stanza, use it.  Update to
	GFDL 1.2.  Do not list GFDL as Invariant Section, do not list
	title as Front-Cover Text.
	* gnat_rm.texi: Likewise.
	* gnat_ugn.texi: Likewise.

gcc/
	* doc/cpp.texi: Update to GFDL 1.2.
	* doc/gcc.texi: Do not list GPL as Invariant Section.
	* doc/gccint.texi: Likewise.  Update copyright years.
	* doc/install.texi: Update copyright years.

gcc/fortran/
	* gfc-internals.texi: Update to GFDL 1.2.  Do not list GPL as
	Invariant Section.
	* gfortran.texi: Likewise.
	* intrinsic.texi: Do not list GPL as Invariant Section.
	* invoke.texi: Likewise.  Update copyright years.

gcc/java/
	* gcj.texi: Update copyright years.  Do not list GPL as
	Invariant Section.

libgomp/
	* libgomp.texi: Update to GFDL 1.2.  Update copyright years.
	Do not list GPL as Invariant Section.

From-SVN: r138293
2008-07-30 05:28:53 +00:00
Ilie Garbacea 318e8c3ff6 configure.tgt: Enable futex for MIPS.
* configure.tgt: Enable futex for MIPS.
* config/linux/mips/futex.h: New file.

Co-Authored-By: Chao-ying Fu <fu@mips.com>

From-SVN: r138214
2008-07-28 18:47:44 +00:00
Jakub Jelinek 4db72361fe team.c (gomp_team_end): Free team immediately if it has just one thread.
* team.c (gomp_team_end): Free team immediately if it has
	just one thread.

From-SVN: r137886
2008-07-16 17:35:26 +02:00
David Edelsohn 87bd23b8e9 c++.exp: Append multilib library path.
* testsuite/libgomp.c++/c++.exp: Append multilib library path.
	* testsuite/libgomp.fortran/fortran.exp: Same.
	* testsuite/libgomp.c/c.exp: Same.
	* testsuite/lib/libgomp.exp: Append AIX libgcc pthread multilib
	directory to library path first.

From-SVN: r137638
2008-07-08 15:13:29 -04:00
Krister Walfridsson 323ff90332 env.c (parse_stacksize): Add cast to avoid warning.
2008-06-29  Krister Walfridsson  <krister.walfridsson@gmail.com>

	* env.c (parse_stacksize): Add cast to avoid warning.
	(parse_spincount): Likewise.

From-SVN: r137260
2008-06-29 21:41:03 +00:00
Jakub Jelinek ca2b131143 gimplify.c (omp_is_private): Don't return true if decl is not already private on #pragma omp for or #pragma...
* gimplify.c (omp_is_private): Don't return true if decl
	is not already private on #pragma omp for or #pragma omp parallel for.

	* gcc.dg/gomp/pr27388-3.c: Adjust dg-final.

	* testsuite/libgomp.c/loop-10.c: New test.
	* libgomp.c/loop-3.c (main): Add lastprivate clause.
	* libgomp.c++/loop-6.C (main): Likewise.

From-SVN: r137199
2008-06-27 21:45:14 +02:00
Jakub Jelinek b357f682db re PR debug/36617 (Debug info for OpenMP code is almost non-existent)
PR debug/36617
	* tree-cfg.c (struct move_stmt_d): Replace block field with
	orig_block and new_block fields.
	(move_stmt_r): Only set TREE_BLOCK to p->new_block if
	if it used to be NULL, p->orig_block or if p->orig_block is NULL.
	(move_block_to_fn): Replace vars_map and new_label_map arguments
	with struct move_stmt_d pointer.
	(replace_block_vars_by_duplicates): New function.
	(move_sese_region_to_fn): Add ORIG_BLOCK argument.  Adjust
	move_block_to_fn caller.  If ORIG_BLOCK is non-NULL, move over
	all subblocks of ORIG_BLOCK to the new function.  Call
	replace_block_vars_by_duplicates.
	* tree-flow.h (move_sese_region_to_fn): Adjust prototype.
	* omp-low.c (expand_omp_taskreg): Set TREE_USED on DECL_INITIAL
	BLOCK of the new function.  Adjust move_sese_region_to_fn caller.
	Prune vars with original DECL_CONTEXT from child_cfun->local_decls.
	(expand_omp): Temporarily set input_location to the location of
	region's controlling stmt.
	(lower_omp_sections, lower_omp_for): Add a BLOCK into outermost
	BIND_EXPR, push ctx->block_vars and gimplification vars into
	the BIND_EXPR and its block's BLOCK_VARS instead of directly
	into dest function.
	(lower_omp_single): Set TREE_USED on the BIND_EXPR's BLOCK if
	there are any BLOCK_VARS.
	(lower_omp_taskreg): Set BLOCK on a BIND_EXPR containing the
	OMP_PARALLEL or OMP_TASK stmt.
	(lower_omp): Save and restore input_location around the lower_omp_1
	call.

	* testsuite/libgomp.c/debug-1.c: New test.

From-SVN: r137198
2008-06-27 21:42:32 +02:00
Jakub Jelinek 2368a460c8 re PR c++/36523 (OpenMP task construct fails to instantiate copy constructor)
PR c++/36523
	* cgraphunit.c (cgraph_process_new_functions): Don't clear
	node->needed and node->reachable.
	* cgraphbuild.c (record_reference): Handle OMP_PARALLEL and OMP_TASK.
	* omp-low.c (delete_omp_context): Call finalize_task_copyfn.
	(expand_task_call): Don't call expand_task_copyfn.
	(expand_task_copyfn): Renamed to...
	(finalize_task_copyfn): ... this.

	* testsuite/libgomp.c++/task-7.C: New function.

From-SVN: r136977
2008-06-20 04:18:07 +02:00
Jakub Jelinek 09a46078e1 * testsuite/libgomp.c/nqueens-1.c: New test.
From-SVN: r136942
2008-06-19 12:51:30 +02:00
Ralf Wildenhues 18c04407bf Makefile.tpl ($(srcdir)/configure): Update dependencies.
* Makefile.tpl ($(srcdir)/configure): Update dependencies.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

config/
	* override.m4: Use m4_version_prereq throughout.
	(_AC_ARG_VAR_VALIDATE, AC_MSG_FAILURE): Backport from git
	Autoconf: output pwd along with fatal errors, so the right
	config.log file is hinted at more prominently.
	(PARSE_ARGS): Push setting of ac_pwd in this diversion.
	(_GCC_AUTOCONF_VERSION): New, define to 2.59 if not defined.
	(_GCC_AUTOCONF_VERSION_CHECK): New macro, require use of Autoconf
	version _GCC_AUTOCONF_VERSION throughout the tree.
	(m4_wrap): New override, fix for Posix semantics of m4wrap.

libgcc/
	* configure.ac: sinclude override.m4.
	* configure: Regenerate.

gnattools/
	* configure.ac: move sinclude of acx.m4 before AC_INIT,
	also sinclude override.m4.
	* Makefile.in ($(srcdir)/configure): Update dependencies.
	* configure: Regenerate.

libada/
	* configure.ac: move sinclude of acx.m4 before AC_INIT,
	also sinclude override.m4.
	* Makefile.in ($(srcdir)/configure): Update dependencies.
	* configure: Regenerate.

intl/
	* configure: Regenerate.

libiberty/
	* configure: Regenerate.

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

fixincludes/
	* configure: Regenerate.

gcc/
	* configure: Regenerate.

libcpp/
	* Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
	* configure: Regenerate.

libdecnumber/
	* Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
	* configure: Regenerate.

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

libgfortran/
	* configure: Regenerate.

libgomp/
	* configure: 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-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/
	* configure: Regenerate.
	* gcj/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libjava/libltdl/
	* Makefile.in: Regenerate.
	* configure: Regenerate.

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

libobjc/
	* configure: Regenerate.

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

libstdc++-v3/
	* configure: Regenerate.

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

From-SVN: r136876
2008-06-17 23:13:35 +00:00
John David Anglin 9c4e59e00c env.c (initialize_env): Always initialize gomp_remaining_threads_lock mutex when...
* env.c (initialize_env): Always initialize gomp_remaining_threads_lock
	mutex when HAVE_SYNC_BUILTINS isn't defined.

From-SVN: r136827
2008-06-15 21:41:26 +00:00
Ralf Wildenhues 6ccde948ad libgomp.texi (omp_test_lock): Fix typo.
libgomp/
	* libgomp.texi (omp_test_lock): Fix typo.

gcc/
	* doc/sourcebuild.texi (Config Fragments): Remove obsolete
	FIXME note about gcc/config.guess.
	* doc/options.texi (Option file format): Remove non-ASCII bytes.
	* doc/cpp.texi: Expand TABs, drop indentation outside examples.
	* doc/cppopts.texi: Likewise.
	* doc/extend.texi: Likewise.
	* doc/gcc.texi: Likewise.
	* doc/gccint.texi: Likewise.
	* doc/gcov.texi: Likewise.
	* doc/gty.texi: Likewise.
	* doc/hostconfig.texi: Likewise.
	* doc/install.texi: Likewise.
	* doc/invoke.texi: Likewise.
	* doc/loop.texi: Likewise.
	* doc/makefile.texi: Likewise.
	* doc/md.texi: Likewise.
	* doc/passes.texi: Likewise.
	* doc/tm.texi: Likewise.
	* doc/tree-ssa.texi: Likewise.
	* doc/trouble.texi: Likewise.

libiberty/
	* libiberty.texi: Expand TABs, drop indentation outside examples.
	* obstacks.texi: Likewise.

gcc/fortran/
	* gfc-internals.texi: Expand TABs, drop indentation outside examples.
	* gfortran.texi: Likewise.
	* intrinsic.texi: Likewise.
	* invoke.texi: Likewise.

gcc/java/
	* gcj.texi: Expand TABs, remove whitespace from blank lines.

gcc/ada/
	* gnat_rm.texi (Implementation Defined Characteristics)
	(Standard Library Routines): Use @smallexample for indented
	text.  Drop Indentation outside examples.
	* gnat_ugn.texi: Likewise.

From-SVN: r136802
2008-06-15 09:42:13 +00:00
Tobias Burnus b896f9fd47 omp_lib.f90.in: Add "implicit none".
2008-06-12  Tobias Burnus  <burnus@net-b.de>

        * omp_lib.f90.in: Add "implicit none".

From-SVN: r136703
2008-06-12 14:15:29 +02:00
Jakub Jelinek c34938a8aa re PR middle-end/36506 (Broken #pragma omp sections reduction (+:x))
PR middle-end/36506
	* omp-low.c (expand_omp_sections): Handle #pragma omp sections with
	reductions.

	* testsuite/libgomp.c/reduction-5.c: New test.

From-SVN: r136696
2008-06-12 13:03:50 +02:00
Jakub Jelinek 5f836cbbc1 libgomp.h (struct gomp_task): Add in_tied_task field.
* libgomp.h (struct gomp_task): Add in_tied_task field.
	* task.c (gomp_init_task): Initialize it.
	(GOMP_task): Likewise.  Call gomp_team_barrier_set_task_pending
	unconditionally.  Don't call gomp_team_barrier_wake if
	current task is implicit or if(0) from implicit and number of
	running tasks is equal to nthreads - 1.

From-SVN: r136682
2008-06-11 23:43:45 +02:00
Jakub Jelinek 01501fc82c re PR libgomp/36471 (omp_get_ancestor_thread_num_8 has no implicit type.)
PR libgomp/36471
	* omp_lib.f90.in (omp_get_ancestor_thread_num_8,
	omp_get_team_size_8): Fix pastos.

From-SVN: r136654
2008-06-11 09:06:14 +02:00
Jakub Jelinek 976e44e324 re PR libgomp/36469 (bootstrap broken on HPUX PA)
PR libgomp/36469
	* configure.ac: Add AC_CHECK_FUNCS (strtoull).
	* configure: Regenerated.
	* config.h.in: Regenerated.
	* env.c (strtoull): Define to strtoul if HAVE_STRTOULL is not
	defined.

From-SVN: r136650
2008-06-11 08:27:04 +02:00
Andreas Tobler e919209b4e re PR bootstrap/36452 (Broken bootstrap while building libgomp.)
2008-06-06  Andreas Tobler  <a.tobler@schweiz.org>

	PR bootstrap/36452
	* loop_ull.c (GOMP_loop_ull_static_start): Adjust API.
	(GOMP_loop_ull_dynamic_start): Likewise.
	(GOMP_loop_ull_guided_start): Likewise.
	(GOMP_loop_ull_ordered_static_start): Likewise.
	(GOMP_loop_ull_ordered_dynamic_start): Likewise.
	(GOMP_loop_ull_ordered_guided_start): Likewise.

From-SVN: r136503
2008-06-06 22:30:31 +02:00
Jakub Jelinek a68ab35173 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805.
* c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to
	200805.
	* langhooks.h (struct lang_hooks_for_decls): Add omp_finish_clause.
	Add omp_private_outer_ref hook, add another argument to
	omp_clause_default_ctor hook.
	* langhooks-def.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
	(LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
	(LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): Change to
	hook_tree_tree_tree_tree_null.
	(LANG_HOOKS_DECLS): Add LANG_HOOKS_OMP_FINISH_CLAUSE and
	LANG_HOOKS_OMP_PRIVATE_OUTER_REF.
	* hooks.c (hook_tree_tree_tree_tree_null): New function.
	* hooks.h (hook_tree_tree_tree_tree_null): New prototype.
	* tree.def (OMP_TASK): New tree code.
	* tree.h (OMP_TASK_COPYFN, OMP_TASK_ARG_SIZE, OMP_TASK_ARG_ALIGN,
	OMP_CLAUSE_PRIVATE_OUTER_REF, OMP_CLAUSE_LASTPRIVATE_STMT,
	OMP_CLAUSE_COLLAPSE_ITERVAR, OMP_CLAUSE_COLLAPSE_COUNT,
	OMP_TASKREG_CHECK, OMP_TASKREG_BODY, OMP_TASKREG_CLAUSES,
	OMP_TASKREG_FN, OMP_TASKREG_DATA_ARG, OMP_TASK_BODY,
	OMP_TASK_CLAUSES, OMP_TASK_FN, OMP_TASK_DATA_ARG,
	OMP_CLAUSE_COLLAPSE_EXPR): Define.
	(enum omp_clause_default_kind): Add OMP_CLAUSE_DEFAULT_FIRSTPRIVATE.
	(OMP_DIRECTIVE_P): Add OMP_TASK.
	(OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): New clause codes.
	(OMP_CLAUSE_SCHEDULE_AUTO): New schedule kind.
	* tree.c (omp_clause_code_name): Add OMP_CLAUSE_COLLAPSE
	and OMP_CLAUSE_UNTIED entries.
	(omp_clause_num_ops): Likewise.  Increase OMP_CLAUSE_LASTPRIVATE
	num_ops to 2.
	(walk_tree_1): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED.
	Walk OMP_CLAUSE_LASTPRIVATE_STMT.
	* tree-pretty-print.c (dump_omp_clause): Handle
	OMP_CLAUSE_SCHEDULE_AUTO, OMP_CLAUSE_UNTIED, OMP_CLAUSE_COLLAPSE,
	OMP_CLAUSE_DEFAULT_FIRSTPRIVATE.
	(dump_generic_node): Handle OMP_TASK and collapsed OMP_FOR loops.
	* c-omp.c (c_finish_omp_for): Allow pointer iterators.  Remove
	warning about unsigned iterators.  Change decl/init/cond/incr
	arguments to TREE_VECs, check arguments for all collapsed loops.
	(c_finish_omp_taskwait): New function.
	(c_split_parallel_clauses): Put OMP_CLAUSE_COLLAPSE clause to
	ws_clauses.
	* c-parser.c (c_parser_omp_for_loop): Parse collapsed loops.  Call
	default_function_array_conversion on init.  Add par_clauses argument.
	If decl is present in parallel's lastprivate clause, change it to
	shared and add lastprivate clause for decl to OMP_FOR_CLAUSES.
	Add clauses argument, on success set OMP_FOR_CLAUSES to it.  Look up
	collapse count in clauses.
	(c_parser_omp_for, c_parser_omp_parallel): Adjust
	c_parser_omp_for_loop callers.
	(OMP_FOR_CLAUSE_MASK): Add 1 << PRAGMA_OMP_CLAUSE_COLLAPSE.
	(c_parser_pragma): Handle PRAGMA_OMP_TASKWAIT.
	(c_parser_omp_clause_name): Handle collapse and untied clauses.
	(c_parser_omp_clause_collapse, c_parser_omp_clause_untied): New
	functions.
	(c_parser_omp_clause_schedule): Handle schedule(auto).
	Include correct location in the error message.
	(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
	and PRAGMA_OMP_CLAUSE_UNTIED.
	(OMP_TASK_CLAUSE_MASK): Define.
	(c_parser_omp_task, c_parser_omp_taskwait): New functions.
	(c_parser_omp_construct): Handle PRAGMA_OMP_TASK.
	* tree-nested.c (convert_nonlocal_omp_clauses,
	convert_local_omp_clauses): Handle OMP_CLAUSE_LASTPRIVATE_STMT,
	OMP_CLAUSE_REDUCTION_INIT, OMP_CLAUSE_REDUCTION_MERGE,
	OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED.
	Don't handle TREE_STATIC or DECL_EXTERNAL VAR_DECLs in
	OMP_CLAUSE_DECL.
	(conver_nonlocal_reference, convert_local_reference,
	convert_call_expr): Handle OMP_TASK the same as OMP_PARALLEL.  Use
	OMP_TASKREG_* macros rather than OMP_PARALLEL_*.
	(walk_omp_for): Adjust for OMP_FOR_{INIT,COND,INCR} changes.
	* tree-gimple.c (is_gimple_stmt): Handle OMP_TASK.
	* c-tree.h (c_begin_omp_task, c_finish_omp_task): New prototypes.
	* c-pragma.h (PRAGMA_OMP_TASK, PRAGMA_OMP_TASKWAIT): New.
	(PRAGMA_OMP_CLAUSE_COLLAPSE, PRAGMA_OMP_CLAUSE_UNTIED): New.
	* c-typeck.c (c_begin_omp_task, c_finish_omp_task): New functions.
	(c_finish_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
	OMP_CLAUSE_UNTIED.
	* c-pragma.c (init_pragma): Init omp task and omp taskwait pragmas.
	* c-common.h (c_finish_omp_taskwait): New prototype.
	* gimple-low.c (lower_stmt): Handle OMP_TASK.
	* tree-parloops.c (create_parallel_loop): Create 1 entry
	vectors for OMP_FOR_{INIT,COND,INCR}.
	* tree-cfg.c (remove_useless_stmts_1): Handle OMP_* containers.
	(make_edges): Handle OMP_TASK.
	* tree-ssa-operands.c (get_expr_operands): Handle collapsed OMP_FOR
	loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
	* tree-inline.c (estimate_num_insns_1): Handle OMP_TASK.
	* builtin-types.def (BT_PTR_ULONGLONG, BT_PTR_FN_VOID_PTR_PTR,
	BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
	BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
	BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
	* omp-builtins.def (BUILT_IN_GOMP_TASK, BUILT_IN_GOMP_TASKWAIT,
	BUILT_IN_GOMP_LOOP_ULL_STATIC_START,
	BUILT_IN_GOMP_LOOP_ULL_DYNAMIC_START,
	BUILT_IN_GOMP_LOOP_ULL_GUIDED_START,
	BUILT_IN_GOMP_LOOP_ULL_RUNTIME_START,
	BUILT_IN_GOMP_LOOP_ULL_ORDERED_STATIC_START,
	BUILT_IN_GOMP_LOOP_ULL_ORDERED_DYNAMIC_START,
	BUILT_IN_GOMP_LOOP_ULL_ORDERED_GUIDED_START,
	BUILT_IN_GOMP_LOOP_ULL_ORDERED_RUNTIME_START,
	BUILT_IN_GOMP_LOOP_ULL_STATIC_NEXT,
	BUILT_IN_GOMP_LOOP_ULL_DYNAMIC_NEXT,
	BUILT_IN_GOMP_LOOP_ULL_GUIDED_NEXT,
	BUILT_IN_GOMP_LOOP_ULL_RUNTIME_NEXT,
	BUILT_IN_GOMP_LOOP_ULL_ORDERED_STATIC_NEXT,
	BUILT_IN_GOMP_LOOP_ULL_ORDERED_DYNAMIC_NEXT,
	BUILT_IN_GOMP_LOOP_ULL_ORDERED_GUIDED_NEXT,
	BUILT_IN_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT): New builtins.
	* gimplify.c (gimplify_omp_for): Allow pointer type for decl,
	handle POINTER_PLUS_EXPR.  If loop counter has been replaced and
	original iterator is present in lastprivate clause or if
	collapse > 1, set OMP_CLAUSE_LASTPRIVATE_STMT.  Handle collapsed
	OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
	(gimplify_expr): Handle OMP_SECTIONS_SWITCH and OMP_TASK.
	(enum gimplify_omp_var_data): Add GOVD_PRIVATE_OUTER_REF.
	(omp_notice_variable): Set GOVD_PRIVATE_OUTER_REF if needed,
	if it is set, lookup var in outer contexts too.  Handle
	OMP_CLAUSE_DEFAULT_FIRSTPRIVATE.  Handle vars that are supposed
	to be implicitly determined firstprivate for task regions.
	(gimplify_scan_omp_clauses): Set GOVD_PRIVATE_OUTER_REF if needed,
	if it is set, lookup var in outer contexts too.  Set
	OMP_CLAUSE_PRIVATE_OUTER_REF if GOVD_PRIVATE_OUTER_REF is set.
	Handle OMP_CLAUSE_LASTPRIVATE_STMT, OMP_CLAUSE_COLLAPSE and
	OMP_CLAUSE_UNTIED.  Take region_type as last argument
	instead of in_parallel and in_combined_parallel.
	(gimplify_omp_parallel, gimplify_omp_for, gimplify_omp_workshare):
	Adjust callers.
	(gimplify_adjust_omp_clauses_1): Set OMP_CLAUSE_PRIVATE_OUTER_REF if
	GOVD_PRIVATE_OUTER_REF is set.  Call omp_finish_clause
	langhook.
	(new_omp_context): Set default_kind to
	OMP_CLAUSE_DEFAULT_UNSPECIFIED for OMP_TASK regions.
	(omp_region_type): New enum.
	(struct gimplify_omp_ctx): Remove is_parallel and is_combined_parallel
	fields, add region_type.
	(new_omp_context): Take region_type as argument instead of is_parallel
	and is_combined_parallel.
	(gimple_add_tmp_var, omp_firstprivatize_variable, omp_notice_variable,
	omp_is_private, omp_check_private): Adjust ctx->is_parallel and
	ctx->is_combined_parallel checks.
	(gimplify_omp_task): New function.
	(gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
	OMP_CLAUSE_UNTIED.
	* omp-low.c (extract_omp_for_data): Use schedule(static)
	for schedule(auto).  Handle pointer and unsigned iterators.
	Compute fd->iter_type.  Handle POINTER_PLUS_EXPR increments.
	Add loops argument.  Extract data for collapsed OMP_FOR loops.
	(expand_parallel_call): Assert sched_kind isn't auto,
	map runtime schedule to index 3.
	(struct omp_for_data_loop): New type.
	(struct omp_for_data): Remove v, n1, n2, step, cond_code fields.
	Add loop, loops, collapse and iter_type fields.
	(workshare_safe_to_combine_p): Disallow combined for if
	iter_type is unsigned long long.  Don't combine collapse > 1 loops
	unless all bounds and steps are constant.  Adjust extract_omp_for_data
	caller.
	(expand_omp_for_generic): Handle pointer, unsigned and long long
	iterators.  Handle collapsed OMP_FOR loops.  Adjust
	for struct omp_for_data changes.  If libgomp function doesn't return
	boolean_type_node, add comparison of the return value with 0.
	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
	pointer, unsigned and long long iterators.  Adjust for struct
	omp_for_data changes.
	(expand_omp_for): Assert sched_kind isn't auto, map runtime schedule
	to index 3.  Use GOMP_loop_ull*{start,next} if iter_type is
	unsigned long long.  Allocate loops array, pass it to
	extract_omp_for_data.  For collapse > 1 loops use always
	expand_omp_for_generic.
	(omp_context): Add sfield_map and srecord_type fields.
	(is_task_ctx, lookup_sfield): New functions.
	(use_pointer_for_field): Use is_task_ctx helper.  Change first
	argument's type from const_tree to tree.  Clarify comment.
	In OMP_TASK disallow copy-in/out sharing.
	(build_sender_ref): Call lookup_sfield instead of lookup_field.
	(install_var_field): Add mask argument.  Populate both record_type
	and srecord_type if needed.
	(delete_omp_context): Destroy sfield_map, clear DECL_ABSTRACT_ORIGIN
	in srecord_type.
	(fixup_child_record_type): Also remap FIELD_DECL's DECL_SIZE{,_UNIT}
	and DECL_FIELD_OFFSET.
	(scan_sharing_clauses): Adjust install_var_field callers.  For
	firstprivate clauses on explicit tasks allocate the var by value in
	record_type unconditionally, rather than by reference.
	Handle OMP_CLAUSE_PRIVATE_OUTER_REF.  Scan OMP_CLAUSE_LASTPRIVATE_STMT.
	Use is_taskreg_ctx instead of is_parallel_ctx.
	Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED.
	(create_omp_child_function_name): Add task_copy argument, use
	*_omp_cpyfn* names if it is true.
	(create_omp_child_function): Add task_copy argument, if true create
	*_omp_cpyfn* helper function.
	(scan_omp_parallel): Adjust create_omp_child_function callers.
	Rename parallel_nesting_level to taskreg_nesting_level.
	(scan_omp_task): New function.
	(lower_rec_input_clauses): Don't run constructors for firstprivate
	explicit task vars which are initialized by *_omp_cpyfn*.  
	Pass outer var ref to omp_clause_default_ctor hook if
	OMP_CLAUSE_PRIVATE_OUTER_REF or OMP_CLAUSE_LASTPRIVATE.
	Replace OMP_CLAUSE_REDUCTION_PLACEHOLDER decls in
	OMP_CLAUSE_REDUCTION_INIT.
	(lower_send_clauses): Clear DECL_ABSTRACT_ORIGIN if in task to
	avoid duplicate setting of fields.  Handle
	OMP_CLAUSE_PRIVATE_OUTER_REF.
	(lower_send_shared_vars): Use srecord_type if non-NULL.  Don't
	copy-out if TREE_READONLY, only copy-in.
	(expand_task_copyfn): New function.
	(expand_task_call): New function.
	(struct omp_taskcopy_context): New type.
	(task_copyfn_copy_decl, task_copyfn_remap_type, create_task_copyfn):
	New functions.
	(lower_omp_parallel): Rename to...
	(lower_omp_taskreg): ... this.  Use OMP_TASKREG_* macros where needed.
	Call create_task_copyfn if srecord_type is needed.  Adjust
	sender_decl type.
	(task_shared_vars): New variable.
	(check_omp_nesting_restrictions): Warn if work-sharing,
	barrier, master or ordered region is closely nested inside OMP_TASK.
	Add warnings for barrier if closely nested inside of work-sharing,
	ordered, or master region.
	(scan_omp_1): Call check_omp_nesting_restrictions even for
	GOMP_barrier calls.  Rename parallel_nesting_level to
	taskreg_nesting_level.  Handle OMP_TASK.
	(lower_lastprivate_clauses): Even if some lastprivate is found on a
	work-sharing construct, continue looking for them on parent parallel
	construct.
	(lower_omp_for_lastprivate): Add lastprivate clauses
	to the beginning of dlist rather than end.  Adjust for struct
	omp_for_data changes.
	(lower_omp_for): Add rec input clauses before OMP_FOR_PRE_BODY,
	not after it.  Handle collapsed OMP_FOR loops, adjust for
	OMP_FOR_{INIT,COND,INCR} changes, adjust extract_omp_for_data
	caller.
	(get_ws_args_for): Adjust extract_omp_for_data caller.
	(scan_omp_for): Handle collapsed OMP_FOR
	loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
	(lower_omp_single_simple): If libgomp function doesn't return
	boolean_type_node, add comparison of the return value with 0.
	(diagnose_sb_1, diagnose_sb_2): Handle collapsed OMP_FOR
	loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.  Handle OMP_TASK.
	(parallel_nesting_level): Rename to...
	(taskreg_nesting_level): ... this.
	(is_taskreg_ctx): New function.
	(build_outer_var_ref, omp_copy_decl): Use is_taskreg_ctx instead
	of is_parallel_ctx.
	(execute_lower_omp): Rename parallel_nesting_level to
	taskreg_nesting_level.
	(expand_omp_parallel): Rename to...
	(expand_omp_taskreg): ... this.  Use OMP_TASKREG_* macros where needed.
	Call omp_task_call for OMP_TASK regions.
	(expand_omp): Adjust caller, handle OMP_TASK.
	(lower_omp_1): Adjust lower_omp_taskreg caller, handle OMP_TASK.

	* bitmap.c (bitmap_default_obstack_depth): New variable.
	(bitmap_obstack_initialize, bitmap_obstack_release): Do nothing
	if argument is NULL and bitmap_default_obstack is already initialized.
	* ipa-struct-reorg.c (do_reorg_1): Call bitmap_obstack_release
	at the end.
	* matrix-reorg.c (matrix_reorg): Likewise.
cp/
	* cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
	dependent_omp_for_p, begin_omp_task, finish_omp_task,
	finish_omp_taskwait): New prototypes.
	(cxx_omp_clause_default_ctor): Add outer argument.
	(finish_omp_for): Add new clauses argument.
	* cp-gimplify.c (cxx_omp_finish_clause): New function.
	(cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
	(cxx_omp_clause_default_ctor): Add outer argument.
	(cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
	* cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
	* parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
	Add par_clauses argument.  If decl is present in parallel's
	lastprivate clause, change that clause to shared and add
	a lastprivate clause for decl to OMP_FOR_CLAUSES.
	Fix wording of error messages.  Adjust finish_omp_for caller.
	Add clauses argument.  Parse loops with random access iterators.
	(cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
	functions.
	(cp_parser_omp_for, cp_parser_omp_parallel): Adjust
	cp_parser_omp_for_loop callers.
	(cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
	functions.
	(cp_parser_omp_clause_name): Handle collapse and untied
	clauses.
	(cp_parser_omp_clause_schedule): Handle auto schedule.
	(cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
	and PRAGMA_OMP_CLAUSE_UNTIED.
	(OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
	(OMP_TASK_CLAUSE_MASK): Define.
	(cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
	(cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
	(cp_parser_pragma): Handle PRAGMA_OMP_TASK and
	PRAGMA_OMP_TASKWAIT.
	* pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
	OMP_CLAUSE_UNTIED.  Handle OMP_CLAUSE_LASTPRIVATE_STMT.
	(tsubst_omp_for_iterator): New function.
	(dependent_omp_for_p): New function.
	(tsubst_expr) <case OMP_FOR>: Use it.  Handle collapsed OMP_FOR
	loops.  Adjust finish_omp_for caller.  Handle loops with random
	access iterators.  Adjust for OMP_FOR_{INIT,COND,INCR} changes.
	(tsubst_expr): Handle OMP_TASK.
	* semantics.c (cxx_omp_create_clause_info): New function.
	(finish_omp_clauses): Call it.  Handle OMP_CLAUSE_UNTIED and
	OMP_CLAUSE_COLLAPSE.
	(cxx_omp_predetermined_sharing): Removed.
	* semantics.c (finish_omp_for): Allow pointer iterators.  Use
	handle_omp_for_class_iterator and dependent_omp_for_p.  Handle
	collapsed for loops.  Adjust c_finish_omp_for caller.  Add new
	clauses argument.  Fix check for type dependent cond or incr.
	Set OMP_FOR_CLAUSES to clauses.  Use cp_convert instead of
	fold_convert to convert incr amount to difference_type.  Only
	fold if not in template.  If decl is mentioned in lastprivate
	clause, set OMP_CLAUSE_LASTPRIVATE_STMT.  Handle loops with random
	access iterators.  Adjust for OMP_FOR_{INIT,COND,INCR}
	changes.
	(finish_omp_threadprivate): Allow static class members of the
	current class.
	(handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
	finish_omp_taskwait): New functions.

	* parser.c (cp_parser_binary_expression): Add prec argument.
	(cp_parser_assignment_expression): Adjust caller.
	* cp-tree.h (outer_curly_brace_block): New prototype.
	* decl.c (outer_curly_brace_block): No longer static.
fortran/
	* scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
	* parse.c (next_free): Allow tab after !$omp.
	(decode_omp_directive): Handle !$omp task, !$omp taskwait
	and !$omp end task.
	(case_executable): Add ST_OMP_TASKWAIT.
	(case_exec_markers): Add ST_OMP_TASK.
	(gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
	ST_OMP_TASKWAIT.
	(parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
	* gfortran.h (gfc_find_sym_in_expr): New prototype.
	(gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
	(gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
	OMP_DEFAULT_FIRSTPRIVATE to default_sharing.  Add collapse and
	untied fields.
	(gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
	* f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
	LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
	LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
	* trans.h (gfc_omp_clause_default_ctor): Add another argument.
	(gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
	gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
	* types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
	BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
	BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
	BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
	BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
	(BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
	than boolean_type_node.
	* dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
	EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
	untied and collapse clauses.
	(gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
	* trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
	EXEC_OMP_TASKWAIT.
	* st.c (gfc_free_statement): Likewise.
	* resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
	(find_sym_in_expr): Rename to...
	(gfc_find_sym_in_expr): ... this.  No longer static.
	(resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
	* match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
	prototypes.
	* openmp.c (resolve_omp_clauses): Allow allocatable arrays in
	firstprivate, lastprivate, reduction, copyprivate and copyin
	clauses.
	(omp_current_do_code): Made static.
	(omp_current_do_collapse): New variable.
	(gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
	clear omp_current_do_code and omp_current_do_collapse on return.
	(gfc_resolve_do_iterator): Handle collapsed do loops.
	(resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
	(OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
	(gfc_match_omp_clauses): Handle default (firstprivate),
	schedule (auto), untied and collapse (n) clauses.
	(OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
	(OMP_TASK_CLAUSES): Define.
	(gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
	* trans-openmp.c (gfc_omp_private_outer_ref): New function.
	(gfc_omp_clause_default_ctor): Add outer argument.  For allocatable
	arrays allocate them with the bounds of the outer var if outer
	var is allocated.
	(gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
	gfc_omp_clause_dtor): New functions.
	(gfc_trans_omp_array_reduction): If decl is allocatable array,
	allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
	and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
	(gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
	for assumed-size arrays.
	(gfc_trans_omp_do): Add par_clauses argument.  If dovar is
	present in lastprivate clause and do loop isn't simple,
	set OMP_CLAUSE_LASTPRIVATE_STMT.  If dovar is present in
	parallel's lastprivate clause, change it to shared and add
	lastprivate clause to OMP_FOR_CLAUSES.  Handle collapsed do loops.
	(gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
	(gfc_trans_omp_parallel_do): Likewise.  Move collapse clause to
	OMP_FOR from OMP_PARALLEL.
	(gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
	OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
	(gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
	(gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
	EXEC_OMP_TASKWAIT.
gcc/testsuite/
	* gcc.dg/gomp/collapse-1.c: New test.
	* gcc.dg/gomp/nesting-1.c: New test.
	* g++.dg/gomp/task-1.C: New test.
	* g++.dg/gomp/predetermined-1.C: New test.
	* g++.dg/gomp/tls-4.C: New test.
	* gfortran.dg/gomp/collapse1.f90: New test.
	* gfortran.dg/gomp/sharing-3.f90: New test.
	* gcc.dg/gomp/pr27499.c (foo): Remove is unsigned dg-warning.
	* g++.dg/gomp/pr27499.C (foo): Likewise.
	* g++.dg/gomp/for-16.C (foo): Likewise.
	* g++.dg/gomp/tls-3.C: Remove dg-error, add S::s definition.
	* g++.dg/gomp/pr34607.C: Adjust dg-error location.
	* g++.dg/gomp/for-16.C (foo): Add a new dg-error.
	* gcc.dg/gomp/appendix-a/a.35.4.c: Add dg-warning.
	* gcc.dg/gomp/appendix-a/a.35.6.c: Likewise.
	* gfortran.dg/gomp/appendix-a/a.35.4.f90: Likewise.
	* gfortran.dg/gomp/appendix-a/a.35.6.f90: Likewise.
	* gfortran.dg/gomp/omp_parse1.f90: Remove !$omp tab test.
	* gfortran.dg/gomp/appendix-a/a.33.4.f90: Remove dg-error
	about allocatable array.
	* gfortran.dg/gomp/reduction1.f90: Likewise.
libgomp/
	* configure.ac (LIBGOMP_GNU_SYMBOL_VERSIONING): New AC_DEFINE.
	Substitute also OMP_*LOCK_25*.
	* configure: Regenerated.
	* config.h.in: Regenerated.
	* Makefile.am (libgomp_la_SOURCES): Add loop_ull.c, iter_ull.c,
	ptrlock.c and task.c.
	* Makefile.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.
	* task.c: New file.
	* loop_ull.c: New file.
	* iter_ull.c: New file.
	* libgomp.h: Include ptrlock.h.
	(enum gomp_task_kind): New type.
	(struct gomp_team): Add task_lock, task_queue, task_count,
	task_running_count, single_count fields.  Add
	work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS.
	Remove work_share_lock, generation_mask,
	oldest_live_gen, num_live_gen and init_work_shares fields, add
	work work_share_list_alloc, work_share_list_free and work_share_chunk
	fields.  Change work_shares from pointer to pointers into an array.
	Change ordered_release field into gomp_sem_t ** from flexible array
	member.  Add implicit_task and initial_work_shares fields.
	Move close to the end of the struct.
	(struct gomp_team_state): Add single_count, last_work_share,
	active_level and level fields, remove work_share_generation.
	(gomp_barrier_handle_tasks): New prototype.
	(gomp_finish_task): New inline function.
	(struct gomp_work_share): Move chunk_size, end, incr into
	transparent union/struct, add chunk_size_ull, end_ll, incr_ll and
	next_ll fields.  Reshuffle fields.  Add next_alloc,
	next_ws, next_free and inline_ordered_team_ids fields, change
	ordered_team_ids into pointer from flexible array member.
	Add mode field.  Put lock and next into a different cache line
	from most of the write-once fields.
	(gomp_iter_ull_static_next, gomp_iter_ull_dynamic_next_locked,
	gomp_iter_ull_guided_next_locked, gomp_iter_ull_dynamic_next,
	gomp_iter_ull_guided_next): New prototypes.
	(gomp_new_icv): New prototype.
	(struct gomp_thread): Add thread_pool and task fields.
	(struct gomp_thread_pool): New type.
	(gomp_new_team): New prototype.
	(gomp_team_start): Change type of last argument.
	(gomp_new_work_share): Removed.
	(gomp_init_work_share, gomp_fini_work_share): New prototypes.
	(gomp_work_share_init_done): New static inline.
	(gomp_throttled_spin_count_var, gomp_available_cpus,
	gomp_managed_threads): New extern decls.
	(gomp_init_task): New prototype.
	(gomp_spin_count_var): New extern var decl.
	(LIBGOMP_GNU_SYMBOL_VERSIONING): Undef if no visibility
	or no alias support, or if not PIC.
	(gomp_init_lock_30, gomp_destroy_lock_30, gomp_set_lock_30,
	gomp_unset_lock_30, gomp_test_lock_30, gomp_init_nest_lock_30,
	gomp_destroy_nest_lock_30, gomp_set_nest_lock_30,
	gomp_unset_nest_lock_30, gomp_test_nest_lock_30, gomp_init_lock_25,
	gomp_destroy_lock_25, gomp_set_lock_25, gomp_unset_lock_25,
	gomp_test_lock_25, gomp_init_nest_lock_25, gomp_destroy_nest_lock_25,
	gomp_set_nest_lock_25, gomp_unset_nest_lock_25,
	gomp_test_nest_lock_25): New prototypes.
	(omp_lock_symver, strong_alias): Define.
	(gomp_remaining_threads_count, gomp_remaining_threads_lock): New
	decls.
	(gomp_end_task): New.
	(struct gomp_task_icv, gomp_global_icv): New.
	(gomp_thread_limit_var, gomp_max_active_levels_var): New.
	(struct gomp_task): New.
	(gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
	gomp_run_sched_var, gomp_run_sched_chunk): Remove.
	(gomp_icv): New.
	(gomp_schedule_type): Reorder enum to match
	omp_sched_t.
	* team.c (struct gomp_thread_start_data): Add thread_pool and task
	fields.
	(gomp_thread_start): Add gomp_team_barrier_wait call.
	For non-nested case remove clearing of docked thread thr fields.
	Use pool fields instead of global gomp_* variables.  Use
	gomp_barrier_wait_last when needed.  Initialize ts.active_level.
	Create tasks for each member thread.
	(free_team): Only destroy team barrier, task_lock here and free it.
	(gomp_free_thread): Free last_team if non-NULL.
	(gomp_team_end): Call gomp_team_barrier_wait instead of
	gomp_barrier_wait.  For nested case call one extra
	gomp_barrier_wait.  Move here some destruction from free_team.
	Call free_team on pool->last_team if any, rather than freeing
	current team.  Destroy work_share_list_free_lock ifndef
	HAVE_SYNC_BUILTINS.
	(gomp_new_icv): New function.
	(gomp_threads, gomp_threads_size, gomp_threads_used,
	gomp_threads_dock): Removed.
	(gomp_thread_destructor): New variable.
	(gomp_new_thread_pool, gomp_free_pool_helper, gomp_free_thread): New
	functions.
	(gomp_team_start): Create new pool if current thread doesn't have
	one.  Use pool fields instead of global gomp_* variables. 
	Initialize thread_pool field for new threads.  Clear single_count.
	Change last argument from ws to team, don't create
	new team, set ts.work_share to &team->work_shares[0] and clear
	ts.last_work_share.  Don't clear ts.work_share_generation.
	If number of threads changed, adjust atomically gomp_managed_threads.
	Use gomp_init_task instead of gomp_new_task,
	set thr->task to the corresponding implicit_task array entry.
	Create tasks for each member thread.  Initialize ts.level.
	(initialize_team): Call pthread_key_create on
	gomp_thread_destructor.
	(team_destructor): New function.
	(new_team): Removed.
	(gomp_new_team): New function.
	(free_team): Free gomp_work_share blocks chained through next_alloc,
	instead of freeing work_shares and destroying work_share_lock.
	(gomp_team_end): Call gomp_fini_work_share.  If number of threads
	changed, adjust atomically gomp_managed_threads.  Use gomp_end_task.
	* barrier.c (GOMP_barrier): Call gomp_team_barrier_wait instead
	of gomp_barrier_wait.
	* single.c (GOMP_single_copy_start): Call gomp_team_barrier_wait
	instead of gomp_barrier_wait.  Call gomp_work_share_init_done
	if gomp_work_share_start returned true.  Don't unlock ws->lock.
	(GOMP_single_copy_end): Call gomp_team_barrier_wait instead
	of gomp_barrier_wait.
	(GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS.  Call
	gomp_work_share_init_done if gomp_work_share_start returned true.
	Don't unlock ws->lock.
	* work.c: Include stddef.h.
	(free_work_share): Use work_share_list_free_lock instead
	of atomic chaining ifndef HAVE_SYNC_BUILTINS.  Add team argument.
	Call gomp_fini_work_share and then either free ws if orphaned, or
	put it into work_share_list_free list of the current team.
	(alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New
	functions.
	(gomp_work_share_start, gomp_work_share_end,
	gomp_work_share_end_nowait): Rewritten.
	* omp_lib.f90.in Change some tabs to spaces to prevent warnings.
	(openmp_version): Set to 200805.
	(omp_sched_kind, omp_sched_static, omp_sched_dynamic,
	omp_sched_guided, omp_sched_auto): New parameters.
	(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
	omp_set_max_active_levels, omp_get_max_active_levels,
	omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
	omp_get_active_level): New interfaces.
	* omp_lib.h.in (openmp_version): Set to 200805.
	(omp_sched_kind, omp_sched_static, omp_sched_dynamic,
	omp_sched_guided, omp_sched_auto): New parameters.
	(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
	omp_set_max_active_levels, omp_get_max_active_levels,
	omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
	omp_get_active_level): New externals.
	* loop.c: Include limits.h.
	(GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Handle
	GFS_AUTO.
	(GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start):
	Likewise.  Use gomp_icv.
	(gomp_loop_static_start, gomp_loop_dynamic_start): Clear
	ts.static_trip here.
	(gomp_loop_static_start, gomp_loop_ordered_static_start): Call
	gomp_work_share_init_done after gomp_loop_init.  Don't unlock ws->lock.
	(gomp_loop_dynamic_start, gomp_loop_guided_start): Call
	gomp_work_share_init_done after gomp_loop_init.  If HAVE_SYNC_BUILTINS,
	don't unlock ws->lock, otherwise lock it.
	(gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call
	gomp_work_share_init_done after gomp_loop_init.  Lock ws->lock.
	(gomp_parallel_loop_start): Call gomp_new_team instead of
	gomp_new_work_share.  Call gomp_loop_init on &team->work_shares[0].
	Adjust gomp_team_start caller.  Pass 0 as second argument to
	gomp_resolve_num_threads.
	(gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr.
	If adding ws->chunk_size nthreads + 1 times after end won't
	overflow, set ws->mode to 1.
	* libgomp_g.h (GOMP_loop_ull_static_start, GOMP_loop_ull_dynamic_start,
	GOMP_loop_ull_guided_start, GOMP_loop_ull_runtime_start,
	GOMP_loop_ull_ordered_static_start,
	GOMP_loop_ull_ordered_dynamic_start,
	GOMP_loop_ull_ordered_guided_start,
	GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_static_next,
	GOMP_loop_ull_dynamic_next, GOMP_loop_ull_guided_next,
	GOMP_loop_ull_runtime_next, GOMP_loop_ull_ordered_static_next,
	GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_guided_next,
	GOMP_loop_ull_ordered_runtime_next, GOMP_task, GOMP_taskwait): New
	prototypes.
	* libgomp.map: Export lock routines also @@OMP_2.0.
	(GOMP_loop_ordered_dynamic_first,
	GOMP_loop_ordered_guided_first, GOMP_loop_ordered_runtime_first,
	GOMP_loop_ordered_static_first): Remove.
	(GOMP_loop_ull_dynamic_next, GOMP_loop_ull_dynamic_start,
	GOMP_loop_ull_guided_next, GOMP_loop_ull_guided_start,
	GOMP_loop_ull_ordered_dynamic_next,
	GOMP_loop_ull_ordered_dynamic_start,
	GOMP_loop_ull_ordered_guided_next,
	GOMP_loop_ull_ordered_guided_start,
	GOMP_loop_ull_ordered_runtime_next,
	GOMP_loop_ull_ordered_runtime_start,
	GOMP_loop_ull_ordered_static_next,
	GOMP_loop_ull_ordered_static_start,
	GOMP_loop_ull_runtime_next, GOMP_loop_ull_runtime_start,
	GOMP_loop_ull_static_next, GOMP_loop_ull_static_start,
	GOMP_task, GOMP_taskwait): Export @@GOMP_2.0.
	(omp_set_schedule, omp_get_schedule,
	omp_get_thread_limit, omp_set_max_active_levels,
	omp_get_max_active_levels, omp_get_level,
	omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level,
	omp_set_schedule_, omp_set_schedule_8_,
	omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
	omp_set_max_active_levels_, omp_set_max_active_levels_8_,
	omp_get_max_active_levels_, omp_get_level_,
	omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
	omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
	New exports @@OMP_3.0.
	* omp.h.in (omp_sched_t): New type.
	(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
	omp_set_max_active_levels, omp_get_max_active_levels,
	omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
	omp_get_active_level): New prototypes.
	* env.c (gomp_spin_count_var, gomp_throttled_spin_count_var,
	gomp_available_cpus, gomp_managed_threads, gomp_max_active_levels_var,
	gomp_thread_limit_var, gomp_remaining_threads_count,
	gomp_remaining_threads_lock): New variables.
	(parse_spincount): New function.
	(initialize_env): Call gomp_init_num_threads unconditionally.
	Initialize gomp_available_cpus.  Call parse_spincount,
	initialize gomp_{,throttled_}spin_count_var
	depending on presence and value of OMP_WAIT_POLICY and
	GOMP_SPINCOUNT env vars.  Handle GOMP_BLOCKTIME env var.
	Handle OMP_WAIT_POLICY, OMP_MAX_ACTIVE_LEVELS,
	OMP_THREAD_LIMIT, OMP_STACKSIZE env vars.  Handle unit specification
	for GOMP_STACKSIZE.  Initialize gomp_remaining_threads_count and
	gomp_remaining_threads_lock if needed.  Use gomp_global_icv.
	(gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
	gomp_run_sched_var, gomp_run_sched_chunk): Remove.
	(gomp_global_icv): New.
	(parse_schedule): Use it.  Parse "auto".
	(omp_set_num_threads): Use gomp_icv.
	(omp_set_dynamic, omp_get_dynamic, omp_set_nested, omp_get_nested):
	Likewise.
	(omp_get_max_threads): Move from parallel.c.
	(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
	omp_set_max_active_levels, omp_get_max_active_levels): New functions,
	add ialias.
	(parse_stacksize, parse_wait_policy): New functions.
	* fortran.c: Rewrite lock wrappers, if symbol versioning provide
	both wrappers for compatibility and new locks.
	(omp_set_schedule, omp_get_schedule,
	omp_get_thread_limit, omp_set_max_active_levels,
	omp_get_max_active_levels, omp_get_level,
	omp_get_ancestor_thread_num, omp_get_team_size,
	omp_get_active_level): New ialias_redirect.
	(omp_set_schedule_, omp_set_schedule_8_,
	omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
	omp_set_max_active_levels_, omp_set_max_active_levels_8_,
	omp_get_max_active_levels_, omp_get_level_,
	omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
	omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
	New functions.
	* parallel.c: Include limits.h.
	(gomp_resolve_num_threads): Add count argument.  Rewritten.
	(GOMP_parallel_start): Call gomp_new_team and pass that as last
	argument to gomp_team_start.  Pass 0 as second argument to
	gomp_resolve_num_threads.
	(GOMP_parallel_end): Decrease gomp_remaining_threads_count
	if gomp_thread_limit_var != ULONG_MAX.
	(omp_in_parallel): Implement using ts.active_level.
	(omp_get_max_threads): Move to env.c.
	(omp_get_level, omp_get_ancestor_thread_num,
	omp_get_team_size, omp_get_active_level): New functions,
	add ialias.
	* sections.c (GOMP_sections_start): Call gomp_work_share_init_done
	after gomp_sections_init.  If HAVE_SYNC_BUILTINS, call
	gomp_iter_dynamic_next instead of the _locked variant and don't take
	lock around it, otherwise acquire it before calling
	gomp_iter_dynamic_next_locked.
	(GOMP_sections_next): If HAVE_SYNC_BUILTINS, call
	gomp_iter_dynamic_next instead of the _locked variant and don't take
	lock around it.
	(GOMP_parallel_sections_start): Call gomp_new_team instead of
	gomp_new_work_share.  Call gomp_sections_init on &team->work_shares[0].
	Adjust gomp_team_start caller.  Pass count as second argument to
	gomp_resolve_num_threads, don't adjust num_threads after the call.
	Use gomp_icv.
	* iter.c (gomp_iter_dynamic_next_locked): Don't multiply
	ws->chunk_size by incr.
	(gomp_iter_dynamic_next): Likewise.  If ws->mode, use more efficient
	code.
	* libgomp_f.h.in (omp_lock_25_arg_t, omp_nest_lock_25_arg_t): New
	types.
	(omp_lock_25_arg, omp_nest_lock_25_arg): New macros.
	(omp_check_defines): Check even the compat defines.
	* config/linux/ptrlock.c: New file.
	* config/linux/ptrlock.h: New file.
	* config/linux/wait.h: New file.
	* config/posix/ptrlock.c: New file.
	* config/posix/ptrlock.h: New file.
	* config/linux/bar.h (gomp_team_barrier_wait,
	gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
	(gomp_team_barrier_set_task_pending,
	gomp_team_barrier_clear_task_pending,
	gomp_team_barrier_set_waiting_for_tasks,
	gomp_team_barrier_waiting_for_tasks,
	gomp_team_barrier_done): New inlines.
	(gomp_barrier_t): Rewritten.
	(gomp_barrier_state_t): New typedef.
	(gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy,
	gomp_barrier_wait_start): Rewritten.
	(gomp_barrier_wait_end): Change second argument to
	gomp_barrier_state_t.
	(gomp_barrier_last_thread, gomp_barrier_wait_last): New static
	inlines.
	* config/linux/bar.c: Include wait.h instead of libgomp.h and
	futex.h.
	(gomp_barrier_wait_end): Rewritten.
	(gomp_team_barrier_wait, gomp_team_barrier_wait_end,
	gomp_team_barrier_wake, gomp_barrier_wait_last): New functions.
	* config/posix/bar.h (gomp_barrier_t): Add generation field.
	(gomp_barrier_state_t): New typedef.
	(gomp_team_barrier_wait,
	gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
	(gomp_barrier_wait_start): Or all but low 2 bits from generation
	into the return value.  Return gomp_barrier_state_t.
	(gomp_team_barrier_set_task_pending,
	gomp_team_barrier_clear_task_pending,
	gomp_team_barrier_set_waiting_for_tasks,
	gomp_team_barrier_waiting_for_tasks,
	gomp_team_barrier_done): New inlines.
	(gomp_barrier_wait_end): Change second argument to
	gomp_barrier_state_t.
	(gomp_barrier_last_thread, gomp_barrier_wait_last): New static
	inlines.
	* config/posix/bar.c (gomp_barrier_init): Clear generation field.
	(gomp_barrier_wait_end): Change second argument to
	gomp_barrier_state_t. 
	(gomp_team_barrier_wait, gomp_team_barrier_wait_end,
	gomp_team_barrier_wake): New functions.
	* config/linux/mutex.c: Include wait.h instead of libgomp.h and
	futex.h.
	(gomp_futex_wake, gomp_futex_wait): New variables.
	(gomp_mutex_lock_slow): Call do_wait instead of futex_wait.
	* config/linux/lock.c: Rewrite to make locks task owned,
	for backwards compatibility provide the old entrypoints
	if symbol versioning.  Include wait.h instead of libgomp.h and
	futex.h.
	(gomp_set_nest_lock_25): Call do_wait instead of futex_wait.
	* config/posix95/lock.c: Rewrite to make locks task owned,
	for backwards compatibility provide the old entrypoints
	if symbol versioning.
	* config/posix/lock.c: Rewrite to make locks task owned,
	for backwards compatibility provide the old entrypoints
	if symbol versioning.
	* config/linux/proc.c (gomp_init_num_threads): Use gomp_global_icv.
	(get_num_procs, gomp_dynamic_max_threads): Use gomp_icv.
	* config/posix/proc.c, config/mingw32/proc.c: Similarly.
	* config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
	(sys_futex0): Return error code.
	(futex_wake, futex_wait): If ENOSYS was returned, clear
	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
	(cpu_relax, atomic_write_barrier): New static inlines.
	* config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
	(futex_wake, futex_wait): If ENOSYS was returned, clear
	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
	(cpu_relax, atomic_write_barrier): New static inlines.
	* config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
	(sys_futex0): Return error code.
	(futex_wake, futex_wait): If ENOSYS was returned, clear
	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
	(cpu_relax, atomic_write_barrier): New static inlines.
	* config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
	(sys_futex0): Return error code.
	(futex_wake, futex_wait): If ENOSYS was returned, clear
	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
	(cpu_relax, atomic_write_barrier): New static inlines.
	* config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
	(sys_futex0): Return error code.
	(futex_wake, futex_wait): If ENOSYS was returned, clear
	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
	(cpu_relax, atomic_write_barrier): New static inlines.
	* config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
	(sys_futex0): Return error code.
	(futex_wake, futex_wait): If ENOSYS was returned, clear
	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
	(cpu_relax, atomic_write_barrier): New static inlines.
	* config/linux/sem.c: Include wait.h instead of libgomp.h and
	futex.h.
	(gomp_sem_wait_slow): Call do_wait instead of futex_wait.
	* config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS.
	* config/linux/omp-lock.h (omp_lock_25_t, omp_nest_lock_25_t): New
	types.
	(omp_nest_lock_t): Change owner into void *, add lock field.
	* config/posix95/omp-lock.h: Include semaphore.h.
	(omp_lock_25_t, omp_nest_lock_25_t): New types.
	(omp_lock_t): Use sem_t instead of mutex if semaphores
	aren't broken.
	(omp_nest_lock_t): Likewise.  Change owner to void *.
	* config/posix/omp-lock.h: Include semaphore.h.
	(omp_lock_25_t, omp_nest_lock_25_t): New types.
	(omp_lock_t): Use sem_t instead of mutex if semaphores
	aren't broken.
	(omp_nest_lock_t): Likewise.  Add owner field.

	* testsuite/libgomp.c/collapse-1.c: New test.
	* testsuite/libgomp.c/collapse-2.c: New test.
	* testsuite/libgomp.c/collapse-3.c: New test.
	* testsuite/libgomp.c/icv-1.c: New test.
	* testsuite/libgomp.c/icv-2.c: New test.
	* testsuite/libgomp.c/lib-2.c: New test.
	* testsuite/libgomp.c/lock-1.c: New test.
	* testsuite/libgomp.c/lock-2.c: New test.
	* testsuite/libgomp.c/lock-3.c: New test.
	* testsuite/libgomp.c/loop-4.c: New test.
	* testsuite/libgomp.c/loop-5.c: New test.
	* testsuite/libgomp.c/loop-6.c: New test.
	* testsuite/libgomp.c/loop-7.c: New test.
	* testsuite/libgomp.c/loop-8.c: New test.
	* testsuite/libgomp.c/loop-9.c: New test.
	* testsuite/libgomp.c/nested-3.c: New test.
	* testsuite/libgomp.c/nestedfn-6.c: New test.
	* testsuite/libgomp.c/sort-1.c: New test.
	* testsuite/libgomp.c/task-1.c: New test.
	* testsuite/libgomp.c/task-2.c: New test.
	* testsuite/libgomp.c/task-3.c: New test.
	* testsuite/libgomp.c/task-4.c: New test.
	* testsuite/libgomp.c++/c++.exp: Add libstdc++-v3 build includes
	to C++ testsuite default compiler options.
	* testsuite/libgomp.c++/collapse-1.C: New test.
	* testsuite/libgomp.c++/collapse-2.C: New test.
	* testsuite/libgomp.c++/ctor-10.C: New test.
	* testsuite/libgomp.c++/for-1.C: New test.
	* testsuite/libgomp.c++/for-2.C: New test.
	* testsuite/libgomp.c++/for-3.C: New test.
	* testsuite/libgomp.c++/for-4.C: New test.
	* testsuite/libgomp.c++/for-5.C: New test.
	* testsuite/libgomp.c++/loop-8.C: New test.
	* testsuite/libgomp.c++/loop-9.C: New test.
	* testsuite/libgomp.c++/loop-10.C: New test.
	* testsuite/libgomp.c++/task-1.C: New test.
	* testsuite/libgomp.c++/task-2.C: New test.
	* testsuite/libgomp.c++/task-3.C: New test.
	* testsuite/libgomp.c++/task-4.C: New test.
	* testsuite/libgomp.c++/task-5.C: New test.
	* testsuite/libgomp.c++/task-6.C: New test.
	* testsuite/libgomp.fortran/allocatable1.f90: New test.
	* testsuite/libgomp.fortran/allocatable2.f90: New test.
	* testsuite/libgomp.fortran/allocatable3.f90: New test.
	* testsuite/libgomp.fortran/allocatable4.f90: New test.
	* testsuite/libgomp.fortran/collapse1.f90: New test.
	* testsuite/libgomp.fortran/collapse2.f90: New test.
	* testsuite/libgomp.fortran/collapse3.f90: New test.
	* testsuite/libgomp.fortran/collapse4.f90: New test.
	* testsuite/libgomp.fortran/lastprivate1.f90: New test.
	* testsuite/libgomp.fortran/lastprivate2.f90: New test.
	* testsuite/libgomp.fortran/lib4.f90: New test.
	* testsuite/libgomp.fortran/lock-1.f90: New test.
	* testsuite/libgomp.fortran/lock-2.f90: New test.
	* testsuite/libgomp.fortran/nested1.f90: New test.
	* testsuite/libgomp.fortran/nestedfn4.f90: New test.
	* testsuite/libgomp.fortran/strassen.f90: New test.
	* testsuite/libgomp.fortran/tabs1.f90: New test.
	* testsuite/libgomp.fortran/tabs2.f: New test.
	* testsuite/libgomp.fortran/task1.f90: New test.
	* testsuite/libgomp.fortran/task2.f90: New test.
	* testsuite/libgomp.fortran/vla4.f90: Add dg-warning.
	* testsuite/libgomp.fortran/vla5.f90: Likewise.
	* testsuite/libgomp.c/pr26943-2.c: Likewise.
	* testsuite/libgomp.c/pr26943-3.c: Likewise.
	* testsuite/libgomp.c/pr26943-4.c: Likewise.

Co-Authored-By: Jakob Blomer <jakob.blomer@ira.uka.de>
Co-Authored-By: Richard Henderson <rth@redhat.com>
Co-Authored-By: Ulrich Drepper <drepper@redhat.com>

From-SVN: r136433
2008-06-06 15:01:54 +02:00
Jakub Jelinek 7a0112e7a4 re PR c++/36308 (OpenMP privatized vars don't get dtors called if they are virtual)
PR c++/36308
	* semantics.c (omp_clause_info_fndecl): New function.
	(finish_omp_clauses): Use it.

	* testsuite/libgomp.c++/ctor-11.C: New test.
	* testsuite/libgomp.c++/ctor-12.C: New test.

From-SVN: r135798
2008-05-23 13:52:44 +02:00
Janis Johnson 91a5b3943e libgomp.exp: Load torture-options.exp from gcc lib.
libgomp:
	* testsuite/lib/libgomp.exp: Load torture-options.exp from gcc lib.

gcc/doc:
	* doc/sourcebuild.texi: Document support for torture tests.

gcc/testsuite:
	* lib/torture-options.exp: New support for torture options.
	* lib/gfortran-dg.exp (gfortran-dg-runtest): Use new torture
	procs.
	* lib/c-torture.exp: Define C_TORTURE_OPTIONS instead of
	TORTURE_OPTIONS; don't define torture_with_loops and
	torture_without_loops.
	* lib/gcc-dg.exp: Define DG_TORTURE_OPTIONS instead of
	TORTURE_OPTIONS; don't define torture_with_loops and
	torture_without_loops.
	(gcc-dg-runtest): Use new torture procs if no torture options
	defined.
	* lib/fortran-torture.exp: Define FORTRAN_TORTURE_OPTIONS instead of
	TORTURE_OPTIONS.
	(fortran-torture-execute): Use torture_with_loops instead of
	TORTURE_OPTIONS.
	(fortran-torture): Ditto.
	* lib/objc-torture.exp: Define OBJC_TORTURE_OPTIONS instead of
	TORTURE_OPTIONS; don't define torture_with_loops and
	torture_without_loops.
	* gcc.c-torture/execute/execute.exp: Use new torture procs.
	* gcc.c-torture/execute/builtins/builtins.exp: Ditto.
	* gcc.c-torture/execute/ieee/ieee.exp: Ditto.
	* gcc.c-torture/unsorted/unsorted.exp: Ditto.
	* gfortran.fortran-torture/execute/execute.exp: Ditto.
	* gfortran.fortran-torture/compile/compile.exp: Ditto.
	* gcc.target/x86_64/abi/abi-x86_64.exp: Ditto.
	* gcc.target/i386/math-torture/math-torture.exp: Define
	MATH_TORTURE_OPTIONS, use new torture procs.
	* gcc.dg/pch/pch.exp: Use new torture procs.
	* gcc.dg/format/format.exp: Ditto.
	* gcc.misc-tests/i386-prefetch.exp: Ditto.
	* gcc.misc-tests/dectest.exp: Ditto.
	* objc.dg/pch/pch.exp: Ditto.
	* objc/execute/execute.exp: Ditto.
	* objc/execute/exceptions/exceptions.exp: Ditto.
	* objc/compile/compile.exp: Ditto.

From-SVN: r135381
2008-05-15 16:59:21 +00:00
Jakub Jelinek c18c98c0ad re PR middle-end/36106 (#pragma omp atomic issues with floating point types)
PR middle-end/36106
	* omp-low.c (expand_omp_atomic_pipeline): Load value using the
	integral type rather than floating point, then VIEW_CONVERT_EXPR
	to the floating point type.

	* testsuite/libgomp.c/atomic-5.c: New test.
	* testsuite/libgomp.c/atomic-6.c: New test.
	* testsuite/libgomp.c/autopar-1.c: New test.

From-SVN: r135027
2008-05-07 09:28:14 +02:00
Ralf Wildenhues 6d26724a16 libgomp/
* acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS)
	(LIBGOMP_CHECK_ATTRIBUTE_VISIBILITY)
	(LIBGOMP_CHECK_ATTRIBUTE_DLLEXPORT)
	(LIBGOMP_CHECK_ATTRIBUTE_ALIAS): Fix cache variable names.
	* configure: Regenerate.
	* Makefile.in, testsuite/Makefile.in: Likewise.

libstdc++-v3/
	* acinclude.m4 (GLIBCXX_CHECK_SETRLIMIT, GLIBCXX_ENABLE_C99)
	(GLIBCXX_CHECK_C99_TR1, GLIBCXX_CHECK_RANDOM_TR1)
	(GLIBCXX_ENABLE_VISIBILITY): Fix cache variable names.
	(GLIBCXX_CHECK_SYSTEM_ERROR): Likewise.  Factorize.
	* configure: Regenerate.

libgfortran/
	* acinclude.m4 (LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY)
	(LIBGFOR_CHECK_ATTRIBUTE_DLLEXPORT)
	(LIBGFOR_CHECK_ATTRIBUTE_ALIAS, LIBGFOR_CHECK_SYNC_FETCH_AND_ADD)
	(LIBGFOR_GTHREAD_WEAK, LIBGFOR_CHECK_UNLINK_OPEN_FILE)
	(LIBGFOR_CHECK_CRLF, LIBGFOR_CHECK_FOR_BROKEN_ISFINITE)
	(LIBGFOR_CHECK_FOR_BROKEN_ISNAN)
	(LIBGFOR_CHECK_FOR_BROKEN_FPCLASSIFY, LIBGFOR_CHECK_WORKING_STAT)
	(LIBGFOR_CHECK_FPSETMASK, LIBGFOR_CHECK_MINGW_SNPRINTF):
	Fix cache variable names.
	* configure, Makefile.in: Regenerate.

From-SVN: r134531
2008-04-21 20:55:19 +00:00
Paolo Bonzini deb984e6de re PR other/35457 (Error building GCC trunk on CELL SPU)
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* configure.ac: Include override.m4.
	* configure: Regenerate.

libgomp:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libdecnumber:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

gcc:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libstdc++-v3:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libobjc:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

intl:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libgfortran:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libmudflap:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

boehm-gc:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libiberty:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Add override.m4.
	* configure: Regenerate.

libffi:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libssp:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

config:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457

	* confsubdir.m4: Rename to...
	* override.m4: ... this.  Make sure aclocal always picks it.
	Add more lenient precious variable check, backported from
	autoconf trunk.

libjava/libltdl:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libjava/classpath:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libjava:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libcpp:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

fixincludes:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* Makefile.in: Rewrite aclocal.m4 rule.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

From-SVN: r134434
2008-04-18 10:28:53 +00:00
Jakub Jelinek 8119fc9307 re PR middle-end/35611 (FAIL: libgomp.c/omp-nested-1.c execution test)
PR middle-end/35611
	* gimplify.c (gimplify_expr): Gimplify second operand of
	OMP_ATOMIC_LOAD.

	* testsuite/libgomp.c/atomic-4.c: New test.

From-SVN: r133309
2008-03-18 13:21:02 +01:00
Jakub Jelinek 9e7759638a re PR libgomp/35625 (schedule(guided) loops forever if ((end - start) % incr) != 0)
PR libgomp/35625
	* iter.c (gomp_iter_guided_next_locked): If q > n, set end to ws->end.
	(gomp_iter_guided_next): Likewise.
	* testsuite/libgomp.c/pr35625.c: New test.

From-SVN: r133306
2008-03-18 10:54:21 +01:00
Ralf Wildenhues 38d24731e9 configure.ac: m4_include config/proginstall.m4.
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * configure.ac: m4_include config/proginstall.m4.
        * configure: Regenerate.

config/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * proginstall.m4: New file, with fixed AC_PROG_INSTALL.

libjava/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * Makefile.am (install-data-local): Rewrite to be more efficient,
        using awk, and `install' with multiple files at once.  Do not gather
        more than 50 files in one go to avoid hitting command line limits.
        (install_data_local_split): New variable.
        * aclocal.m4: Regenerate.
        * configure: Likewise.
        * Makefile.in: Likewise.
        * gcj/Makefile.in: Likewise.
        * include/Makefile.in: Likewise.
        * testsuite/Makefile.in: Likewise.

boehm-gc/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

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

libffi/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

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

libgfortran/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

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

libgomp/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

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

libmudflap/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

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

libssp/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * aclocal.m4: Regenerate.
        * configure: Likewise.
        * Makefile.in: Likewise.
libssp/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

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

libstdc++-v3/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * aclocal.m4: Regenerate.
        * configure: Likewise.
        * Makefile.in: Likewise.
        * doc/Makefile.in: Likewise.
        * include/Makefile.in: Likewise.
        * libmath/Makefile.in: Likewise.
        * libsupc++/Makefile.in: Likewise.
        * po/Makefile.in: Likewise.
        * src/Makefile.in: Likewise.
        * testsuite/Makefile.in: Likewise.

zlib/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

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

From-SVN: r133269
2008-03-16 08:19:08 +00:00
Jakub Jelinek d0fb20beb1 re PR middle-end/35185 (ICE using openmp with g++-4.2)
PR middle-end/35185
	* omp-low.c (lower_regimplify, init_tmp_var, save_tmp_var): Removed.
	(lower_omp_2): New function.
	(lower_omp_1, lower_omp): Rewritten.

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

From-SVN: r133162
2008-03-13 10:26:25 +01:00
Jakub Jelinek 7c8f7639c5 re PR middle-end/35549 (Invalid use of copy-in/out for shared vars in nested parallels)
PR middle-end/35549
	* omp-low.c (maybe_lookup_decl): Constify first argument.
	(use_pointer_for_field): Change last argument from bool to
	omp_context *.  Disallow shared copy-in/out in nested
	parallel if decl is shared in outer parallel too.
	(build_outer_var_ref, scan_sharing_clauses,
	lower_rec_input_clauses, lower_copyprivate_clauses,
	lower_send_clauses, lower_send_shared_vars): Adjust callers.

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

From-SVN: r133136
2008-03-12 10:55:48 +01:00
Jakub Jelinek 251923f5e4 gimplify.c (goa_lhs_expr_p): Allow different ADDR_EXPR nodes for the same VAR_DECL.
* gimplify.c (goa_lhs_expr_p): Allow different ADDR_EXPR nodes
	for the same VAR_DECL.

	* testsuite/libgomp.c/atomic-3.c: New test.

From-SVN: r132977
2008-03-06 18:28:54 +01:00
François-Xavier Coudert f489fba128 re PR fortran/33197 (Fortran 2008: math functions)
PR fortran/33197

gcc/fortran/
	* intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
	ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
	ERFC_SCALED, LOG_GAMMA and HYPOT.
	* intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
	gfc_resolve_hypot): New prototypes.
	* mathbuiltins.def: Add HYPOT builtin. Make complex versions of
	ACOSH, ASINH and ATANH available.
	* gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
	* lang.opt: Add -std=f2008 option.
	* libgfortran.h: Define GFC_STD_F2008.
	* lang-specs.h: Add .f08 and .F08 file suffixes.
	* iresolve.c (gfc_resolve_hypot): New function.
	* parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
	* check.c (gfc_check_hypot): New function.
	* trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
	* options.c (set_default_std_flags): Allow Fortran 2008 by default.
	(form_from_filename): Add .f08 suffix.
	(gfc_handle_option): Handle -std=f2008 option.
	* simplify.c (gfc_simplify_hypot): New function.
	* gfortran.texi: Document Fortran 2008 status and file extensions.
	* intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
	as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
	ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
	* invoke.texi: Document the new -std=f2008 option.

libgomp/
	* testsuite/libgomp.fortran/fortran.exp: Add .f08 and
	.F08 file suffixes.

gcc/testsuite/
	* gfortran.dg/gomp/gomp.exp: Add .f08 and .F08 file suffixes.
	* gfortran.dg/dg.exp: Likewise.
	* gfortran.dg/vect/vect.exp: Likewise.
	* gfortran.fortran-torture/execute/execute.exp: Likewise.
	* gfortran.fortran-torture/compile/compile.exp: Likewise.
	* gfortran.dg/gamma_1.f90: Also check log_gamma.
	* gfortran.dg/invalid_contains_1.f90: Remove warning about
	empty CONTAINS.
	* gfortran.dg/gamma_2.f90: Add a few error messages.
	* gfortran.dg/invalid_contains_2.f90: Remove warning about
	empty CONTAINS.
	* gfortran.dg/gamma_3.f90: Adjust error message.
	* gfortran.dg/gamma_4.f90: Test for log_gamma instead of lgamma.
	* gfortran.dg/bind_c_usage_9.f03: Adjust error messages.
	* gfortran.dg/bessel_1.f90: New test.
	* gfortran.dg/recursive_check_3.f90: Remove warnings.
	* gfortran.dg/besxy.f90: Also check for new F2008 intrinsics.
	* gfortran.dg/derived_function_interface_1.f90: Remove warning.
	* gfortran.dg/contains_empty_1.f03: New test.
	* gfortran.dg/erfc_scaled_1.f90: New test.
	* gfortran.dg/hypot_1.f90: New test.
	* gfortran.dg/contains_empty_2.f03: New test.

libgfortran/
	* intrinsics/erfc_scaled_inc.c: New file.
	* intrinsics/erfc_scaled.c: New file.
	* gfortran.map (GFORTRAN_1.0): Add _gfortran_erfc_scaled_r*.
	* Makefile.am: Add intrinsics/erfc_scaled.c.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

From-SVN: r132846
2008-03-03 23:46:20 +00:00
Peter O'Gorman a1b25e49f8 re PR libgomp/33131 (libgomp/env.c:60: warning: implicit declaration of function 'strncasecmp')
2008-03-03  Peter O'Gorman  <pogma@thewrittenword.com>

	PR libgomp/33131
	* configure.ac: Add ACX_HEADER_STRING.
	* env.c: Include strings.h.
	* aclocal.m4: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

From-SVN: r132844
2008-03-03 22:35:13 +00:00
Jakub Jelinek ac84c0623d re PR middle-end/35196 (lastprivate broken for static non-ordered loops)
PR middle-end/35196
	* omp-low.c (expand_omp_for_generic): Don't initialize fd->v
	in entry_bb.
	(expand_omp_for_static_nochunk): Initialize fd->v in seq_start_bb
	rather than in entry_bb.

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

From-SVN: r132351
2008-02-15 18:42:25 +01:00
Jakub Jelinek 6837b3b895 re PR middle-end/35130 (OpenMP: Private variable passed to subroutine)
PR middle-end/35130
	* tree-nested.c (convert_call_expr): Put FRAME.* vars into
	OMP_CLAUSE_SHARED rather than OMP_CLAUSE_FIRSTPRIVATE clause.

	* testsuite/libgomp.fortran/pr35130.f90: New test.
	* testsuite/libgomp.c/pr35130.c: New test.

From-SVN: r132349
2008-02-15 18:36:43 +01:00
Jakub Jelinek c256730cef re PR middle-end/33880 (ICE: in extract_omp_for_data, at omp-low.c:162)
PR middle-end/33880
	* tree-nested.c (walk_omp_for): New function.
	(convert_nonlocal_reference, convert_local_reference): Call
	walk_omp_for on OMP_FOR.
	(convert_call_expr): Call walk_body on OMP_FOR's
	OMP_FOR_PRE_INIT_BODY.

	* testsuite/libgomp.c/pr33880.c: New test.
	* testsuite/libgomp.fortran/pr33880.f90: New test.

From-SVN: r131825
2008-01-25 13:54:42 +01:00
David Edelsohn c8e9554201 Fix date.
From-SVN: r131786
2008-01-24 11:25:43 -05:00
David Edelsohn d653fdfb25 * configure: Regenerate.
From-SVN: r131784
2008-01-24 11:23:13 -05:00
Jakub Jelinek 0f3e711eef configure.ac (--enable-linux-futex): Add new configure option.
libstdc++-v3/
	* configure.ac (--enable-linux-futex): Add new configure option.
	(HAVE_LINUX_FUTEX): New AC_DEFINE.
	* Makefile.in: Rebuilt.
	* aclocal.m4: Rebuilt.
	* configure: Rebuilt.
	* config.h.in: Rebuilt.
	* config/cpu/generic/cxxabi_tweaks.h (_GLIBCXX_GUARD_BIT,
	_GLIBCXX_GUARD_PENDING_BIT, _GLIBCXX_GUARD_WAITING_BIT): Define.
	* config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_BIT,
	_GLIBCXX_GUARD_PENDING_BIT, _GLIBCXX_GUARD_WAITING_BIT): Define.
	* libsupc++/guard.cc: Include climits and syscall.h.
	(_GLIBCXX_USE_FUTEX): Define if futex syscall and atomic builtins
	are supported.
	(_GLIBCXX_FUTEX_WAIT, _GLIBCXX_FUTEX_WAKE): Likewise.
	(__guard_test_bit): New static inline.
	(__cxa_guard_acquire, __cxa_guard_release, __cxa_guard_abort): Use
	atomic builtins and futex syscall if _GLIBCXX_USE_FUTEX.
config/
	* futex.m4: New file.
libgomp/
	* configure.ac: Move futex checking into ../config/futex.m4.
	* configure: Rebuilt.
	* aclocal.m4: Rebuilt.
	* Makefile.in: Rebuilt.

	* configure.tgt: Rename have_tls to gcc_cv_have_tls to match
	2007-10-15 ../config/tls.m4 change.

From-SVN: r131399
2008-01-08 17:14:49 +01:00
Jakub Jelinek 5259c81310 re PR c++/34513 (static variable not found for C++ OpenMP)
PR c++/34513
	* parser.c (cp_parser_omp_parallel): For non-combined parallel
	call cp_parser_statement rather than
	cp_parser_already_scoped_statement.

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

From-SVN: r131059
2007-12-19 13:58:32 +01:00
Jack Howarth ae8d887945 re PR target/32765 (Testsuite failures due to undefined symbol ___emutls_get_address)
2007-12-17  Jack Howarth  <howarth@bromo.med.uc.edu>

	PR target/32765
	* testsuite/libgomp.fortran/crayptr2.f90: Move dg-options for darwin.

From-SVN: r131012
2007-12-17 19:30:08 +00:00
Jakub Jelinek 2b4cf99125 omp-low.c (optimize_omp_library_calls): New function.
* omp-low.c (optimize_omp_library_calls): New function.
	(expand_omp_parallel): Call it if optimizing.

	* omp.h.in (__GOMP_NOTHROW): Define.  Use it on omp_* prototypes.

From-SVN: r130610
2007-12-04 23:01:04 +01:00
Jakub Jelinek d2dda7fed0 omp-low.c (lookup_decl_in_outer_ctx): Allow calling this with !ctx->is_nested.
* omp-low.c (lookup_decl_in_outer_ctx): Allow calling this
	with !ctx->is_nested.
	(maybe_lookup_decl_in_outer_ctx): Look up in outer contexts
	even if !ctx->is_nested.
	(lower_copyprivate_clauses, lower_send_clauses,
	lower_send_shared_vars): Call lookup_decl_in_outer_ctx
	unconditionally.

	* testsuite/libgomp.c/private-1.c: New test.

From-SVN: r130590
2007-12-04 00:06:55 +01:00
Paolo Bonzini d683ec81d2 [multiple changes]
2007-11-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* config-ml.in: Robustify against white space in absolute file
	names.

	* config-ml.in (multi-clean): Substitute ${Makefile}.
	Remove superfluous ${Makefile} in list.

libgomp:
2007-11-29  Andris Pavenis <andris.pavenis@iki.fi>
	    Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.am: Use space as vpath separator.  Use 'vpath %'
	instead of 'VPATH ='.
	* Makefile.in: Regenerate.

gcc:
2007-11-29  Andris Pavenis <andris.pavenis@iki.fi>

	* Makefile.in: Use separate vpath lines for each path.


libstdc++-v3:
2007-11-29  Andris Pavenis <andris.pavenis@iki.fi>

    	* src/Makefile.am: Use separate vpath lines for each path.

M    libgomp/Makefile.in
M    libgomp/ChangeLog
M    libgomp/Makefile.am
M    gcc/ChangeLog
M    gcc/Makefile.in
M    libstdc++-v3/src/Makefile.in
M    libstdc++-v3/src/Makefile.am
M    libstdc++-v3/ChangeLog
M    ChangeLog

From-SVN: r130514
2007-11-29 15:34:21 +00:00
Matthias Klose a7415017a8 configure.ac: Adjust makeinfo version check.
2007-11-23  Matthias Klose  <doko@ubuntu.com>

       * configure.ac: Adjust makeinfo version check.
       * configure: Regenerate.

From-SVN: r130367
2007-11-23 09:29:44 +00:00
Jakub Jelinek 78e4746337 re PR fortran/34020 (Bogus codegen for openmp atomics w/ indirects operands on IPF)
PR fortran/34020
	* gimplify.c (goa_lhs_expr_p): Inside INDIRECT_REF handle unshared
	nops.

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

From-SVN: r130069
2007-11-10 08:51:55 +01:00
Jakub Jelinek 239371f9c7 re PR c++/33894 (pragma omp atomic broken)
PR c++/33894
	* cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
	OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
	* pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
	* semantics.c (finish_omp_atomic): Revert most of the
	2007-02-05 changes, just keep the new representation of
	OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.

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

From-SVN: r129919
2007-11-06 09:26:50 +01:00
Jakub Jelinek 98a5fa9468 re PR libgomp/33275 (Transient libgomp.fortran/omp_parse3.f90 -O0 failure)
PR libgomp/33275
	* testsuite/libgomp.fortran/omp_parse3.f90 (test_threadprivate):
	Make x and y integers rather than (implicit) reals.  Add private (j)
	clause to the last omp parallel.

From-SVN: r129631
2007-10-25 22:25:12 +02:00
Maciej W. Rozycki 3afcaaf4e9 tls.m4 (GCC_CHECK_TLS): Rename have_tls to gcc_cv_have_tls.
config/:
2007-10-15  Maciej W. Rozycki  <macro@linux-mips.org>

	* tls.m4 (GCC_CHECK_TLS): Rename have_tls to gcc_cv_have_tls.
	(GCC_CHECK_CC_TLS): Rename have_cc_tls to gcc_cv_have_cc_tls.

libgomp/:
2007-10-15  Maciej W. Rozycki  <macro@linux-mips.org>

	* configure: Regenerate following changes to ../config/tls.m4.

libjava/:
2007-10-15  Maciej W. Rozycki  <macro@linux-mips.org>

	* configure: Regenerate following changes to ../config/tls.m4.

libmudflap/:
2007-10-15  Maciej W. Rozycki  <macro@linux-mips.org>

	* configure: Regenerate following changes to ../config/tls.m4.

From-SVN: r129364
2007-10-15 18:09:32 +00:00
Jakub Jelinek bd69daef03 openmp_stack.f90: Removed.
* gfortran.dg/openmp_stack.f90: Removed.

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

From-SVN: r128863
2007-09-28 15:22:18 +02:00
Danny Smith 1d0bd356ad * config/mingw32/proc.c: New file.
From-SVN: r128321
2007-09-10 02:27:29 +00:00
Uros Bizjak b3172cabd2 cpuid.h: New file.
* gcc/config/i386/cpuid.h: New file.
	* gcc/config/i386/driver-i386.c: Include cpuid.h.
	(describe_cache): Shrink size and line strings to 100 bytes.
	(detect_caches_amd): Return "" for unsupported max_ext_level.
	Use __cpuid function.
	(detect_caches_intel): Return "" for unsupported max_level.
	Use __cpuid function.
	(host_detect_local_cpu): Change feature flag variables to
	unsigned int.  Initialize only extended feature flag variables.
	Use __get_cpuid_max to determine max supported cpuid level.
	Use __cpuid function to determine supported features.  Fix
	calculation of family id.  Remove is_amd and check signature
	directly.  Check for Geode signature.  Handle family 4 id.
	[PROCESSOR_GENERIC32]: New default for unknown family id. Move
	cpu discovery code to other part of the function.
	[PROCESSOR_PENTIUM, PROCESSOR_K6, PROCESSOR_ATHLON]: Do not tune
	for sub-architecture.
	[PROCESSOR_PENTIUMPRO]: Simplify cpu discovery code.
	[PROCESSOR_K8]: Add k8-sse3 architecture.
	[PROCESSOR_GENERIC64]: Remove.
	* gcc/config/i386/x-i386 (driver-i386.o): Depend on cpuid.h.
	* gcc/config/i386/crtfastmath.c: Include cpuid.h.  Use __get_cpuid
	to check for SSE and FXSAVE support.
	* gcc/config/i386/t-crtfm (crtfastmath.o): Depend on cpuid.h.
	Add -minline-all-stringops.
	* gcc/config.gcc (i[34567]86-*-*): Add cpuid.h to extra_headers.
	(x86_64-*-*): Ditto.

testsuite/ChangeLog:

	* gcc.dg/i386-cpuid.h: Remove.
	* gcc.target/i386/mmx-check.h: Include cpuid.h.  Use __get_cpuid.
	* gcc.target/i386/sse-check.h: Ditto.
	* gcc.target/i386/sse2-check.h: Ditto.
	* gcc.target/i386/sse3-check.h: Ditto.
	* gcc.target/i386/ssse3-check.h: Ditto.
	* gcc.target/i386/sse4_1-check.h: Ditto.
	* gcc.target/i386/sse4_2-check.h: Ditto.
	* gcc.target/i386/sse4a-check.h: Ditto.
	* gcc.dg/torture/pr16104-1.c: Ditto.
	* gcc.target/i386/mmx-4.c: Do not use NOINLINE.
	* gcc.target/i386/sse-6.c: Ditto.
	* gcc.target/i386/sse-7.c: Ditto.
	* g++.dg/other/i386-1.C: Include cpuid.h.
	(main): New function.  Use __get_cpuid to check target fetaures.

libgomp/ChangeLog:

	* testsuite/libgomp.c/atomic-1.c: Include cpuid.h for i386 targets.
	(main): Use __get_cpuid to get i386 target fetaures.
	* testsuite/libgomp.c/atomic-2.c: Include cpuid.h for x86_64 targets.
	(main): Use __get_cpuid to get x86_64 target fetaures.

From-SVN: r128141
2007-09-05 19:43:01 +02:00
Jack Howarth 6da1739222 re PR target/32765 (Testsuite failures due to undefined symbol ___emutls_get_address)
PR target/32765
	* testsuite/libgomp.fortran/pr32550.f90: Use -static-libgcc on Darwin.
	* testsuite/libgomp.fortran/crayptr2.f90: Likwise.

From-SVN: r127514
2007-08-15 13:11:40 +00:00
Jakub Jelinek e1c8221962 re PR fortran/32550 (openmp: COPYPRIVATE of pointer variables fails)
PR fortran/32550
	* trans.h (GFC_POINTER_TYPE_P): Define.
	* trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
	* trans-openmp.c (gfc_omp_privatize_by_reference): Return false
	if GFC_POINTER_TYPE_P is set on the type.

	* testsuite/libgomp.fortran/pr32550.f90: New test.
	* testsuite/libgomp.fortran/crayptr2.f90: New test.

From-SVN: r126583
2007-07-12 14:16:54 +02:00
H.J. Lu 12a27363b0 Regenerate aclocal.m4 in boehm-gc, libffi, libgfortran, libgomp,
libjava, libmudflap, libobjc, libssp and zlib.

From-SVN: r126373
2007-07-05 10:54:10 -07:00
Tobias Burnus 5349080dd3 re PR fortran/32359 (incorrect error: Threadprivate isn't SAVEd (implicit save attribute undefined))
gcc/fortran/
2007-07-05  Daniel Franke  <franke.daniel@gmail.com>
	    Tobias Burnus  <burnus@net-b.de>

	PR fortran/32359
	* gfortran.h (symbol_attribute): Change save attribute into an enum.
	* decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
	* symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
	* resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
	(resolve_symbol): Allow OMP threadprivate with
	initialization SAVEd and save_all variable.
	* trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.


libgomp/
2007-07-05  Tobias Burnus  <burnus@net-b.de>

	PR fortran/32359
	* testsuite/libgomp.fortran/pr32359.f90: New.

gcc/testsuite/
2007-07-05  Tobias Burnus  <burnus@net-b.de>

	PR fortran/32359
	* gfortran.dg/module_md5_1.f90: Update MD5 number.

From-SVN: r126366
2007-07-05 14:51:51 +02:00
Jakub Jelinek 4f9c450c2f re PR libgomp/32468 (number of threads in a parallel region depends on number of SECTIONs and MAX_THREADS)
PR libgomp/32468
	* sections.c (GOMP_parallel_sections_start): Only decrease
	number of threads to COUNT if dyn_var is true.
	* testsuite/libgomp.c/pr32468.c: New test.

From-SVN: r126224
2007-07-02 21:19:28 +02:00
Rainer Orth 28c67ed737 re PR libgomp/26308 (libgomp bootstrap failure on Tru64 UNIX V4.0F)
PR libgomp/26308
	* config/posix/lock.c (_XOPEN_SOURCE): Don't define on Tru64 UNIX.

From-SVN: r126208
2007-07-02 14:38:13 +00:00
Jakub Jelinek 64964499f4 re PR middle-end/32362 (ICE: in lookup_decl_in_outer_ctx, at omp-low.c:1508)
PR middle-end/32362
	* omp-low.c (lookup_decl_in_outer_ctx): Don't ICE if t is NULL,
	but decl is a global var, instead return decl.
	* gimplify.c (gimplify_adjust_omp_clauses_1): Add shared clauses
	even for is_global_var decls, if they are private in some outer
	context.

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

From-SVN: r125917
2007-06-21 14:11:00 +02:00
Jakub Jelinek 46d8fbd1a2 team.c (gomp_team_start): Fix setting up thread_attr stack size.
* team.c (gomp_team_start): Fix setting up thread_attr
	stack size.

From-SVN: r125542
2007-06-07 22:16:53 +02:00
Paolo Bonzini 82a6cadf50 configure: Regenerate.
boehm-gc:
2007-06-02  Paolo Bonzini  <bonzini@gnu.org>

	* configure: Regenerate.

libffi:
2007-06-02  Paolo Bonzini  <bonzini@gnu.org>

	* configure: Regenerate.

libgfortran:
2007-06-02  Paolo Bonzini  <bonzini@gnu.org>

	* configure: Regenerate.

libgomp:
2007-06-02  Paolo Bonzini  <bonzini@gnu.org>

	* configure: Regenerate.

libjava:
2007-06-02  Paolo Bonzini  <bonzini@gnu.org>

	* configure: Regenerate.

libmudflap:
2007-06-02  Paolo Bonzini  <bonzini@gnu.org>

	* configure: Regenerate.

libobjc:
2007-06-02  Paolo Bonzini  <bonzini@gnu.org>

	* configure: Regenerate.

libssp:
2007-06-02  Paolo Bonzini  <bonzini@gnu.org>

	* configure: Regenerate.

libstdc++-v3:
2007-06-02  Paolo Bonzini  <bonzini@gnu.org>

	* configure: Regenerate.

zlib:
2007-06-02  Paolo Bonzini  <bonzini@gnu.org>

	* configure: Regenerate.

From-SVN: r125278
2007-06-02 08:18:15 +00:00
Steve Ellcey 1cf3d07da6 ltmain.sh: Update from ToT Libtool.
* ltmain.sh: Update from ToT Libtool.
        * libtool.m4: Update from ToT Libtool.
        * ltsugar.m4: New. Update from ToT Libtool.
        * ltversion.m4: New. Update from ToT Libtool.
        * ltoptions.m4: New. Update from ToT Libtool.
        * ltconfig: Remove.
        * ltcf-c.sh: Remove.
        * ltcf-cxx.sh: Remove.
        * ltcf-gcj.sh: Remove.
	* Regenerate all subdirs

From-SVN: r125032
2007-05-24 16:37:27 +00:00
Jakub Jelinek f1028b0230 re PR libgomp/28482 (Cannot use libgomp in shared library)
PR libgomp/28482
	* configure.tgt: Don't link with -Wl,-z,nodlopen even on Linux.

From-SVN: r124445
2007-05-04 21:21:18 +02:00
Jakub Jelinek 12aac30b21 * config/linux/proc.c: New file.
From-SVN: r124443
2007-05-04 21:19:10 +02:00
Daniel Franke 06785a48be libgomp.texi (GOMP_CPU_AFFINITY): Updated.
2007-04-19  Daniel Franke  <franke.daniel@gmail.com>

        * libgomp.texi (GOMP_CPU_AFFINITY): Updated.

From-SVN: r123976
2007-04-19 15:36:34 -04:00
Matthias Klose b3b08ba044 configure.tgt (i[456]86-*-linux*): Only add ia32 specific flags if not building with -m64.
2007-04-16  Matthias Klose  <doko@debian.org>

        * configure.tgt (i[456]86-*-linux*): Only add ia32 specific
        flags if not building with -m64.
        * testsuite/lib/libgomp-dg.exp (libgomp_init): Don't add -march
        flag for i?86-*-* targets, if current target matches -m64.

From-SVN: r123887
2007-04-16 20:09:40 +00:00
Steve Ellcey 6b2c5ce091 Makefile.am: Add -I ..
* Makefile.am: Add -I .. to ACLOCAL_AMFLAGS.
	* Makefile.in: Regenerate.

From-SVN: r123826
2007-04-14 19:49:42 +00:00
John David Anglin dd56fe7c23 re PR testsuite/31369 (100's of new libgomp fails)
PR testsuite/31369
	* testsuite/libgomp.c++/c++.exp: Don't use concat when setting
	ld_library_path.
	* testsuite/libgomp.fortran/fortran.exp: Likewise.

From-SVN: r123638
2007-04-07 15:10:06 +00:00
Jakub Jelinek a0884cf09e libgomp.h (gomp_cpu_affinity, [...]): New extern decls.
* libgomp.h (gomp_cpu_affinity, gomp_cpu_affinity_len): New extern
	decls.
	(gomp_init_affinity, gomp_init_thread_affinity): New prototypes.
	* env.c (gomp_cpu_affinity, gomp_cpu_affinity_len): New variables.
	(parse_affinity): New function.
	(initialize_env): Call it and gomp_init_affinity.
	* team.c (gomp_team_start): If gomp_cpu_affinity != NULL,
	create new pthread_attr_t and call gomp_init_thread_affinity
	on it for each thread before passing the attribute to pthread_create.
	* config/linux/affinity.c: New file.
	* config/posix/affinity.c: New file.
	* configure.ac (HAVE_PTHREAD_AFFINITY_NP): New test.
	* configure: Rebuilt.
	* config.h.in: Rebuilt.
	* Makefile.am (libgomp_la_SOURCES): Add affinity.c.
	* Makefile.in: Rebuilt.

From-SVN: r123494
2007-04-04 17:44:20 +02:00
Andreas Tobler 1850744bdd libgomp.exp (libgomp_init): Add -shared-libgcc for *-*-darwin*.
2007-03-23  Andreas Tobler  <a.tobler@schweiz.org>

	* testsuite/lib/libgomp.exp (libgomp_init): Add -shared-libgcc for
	*-*-darwin*.
	* testsuite/libgomp.c++/c++.exp: Look for shared libstdc++ library
	and use it if found.

From-SVN: r123162
2007-03-23 20:25:19 +01:00
Uros Bizjak 516f1ed8ca default.exp: New file.
* testsuite/config/default.exp: New file.
	* testsuite/lib/libgomp.exp: New file.
	* testsuite/lib/libgomp.dg (load_gcc_lib, libgomp_init,
	libgomp_target_compile, libgomp_option_help, libgomp_option_proc,
	load_lib *, load_gcc_lib *): Move to libgomp.exp.
	(libgomp_load): Remove.
	* testsuite/lib/libgomp.exp (libgomp_init): Compute
	always_ld_library_path, not ld_library_path.  Set additional_flags
	to -march=i486 for ilp32 x86_64-*-* and i386-*-* targets.
	(target_compile): Do not call libgomp_init.  Append lang_library_path
	and lang_link_flags to options.
	* testsuite/libgomp.c/c.exp: Set DEFAULT_FLAGS to -O2.  Set
	ld_library_path from always_ld_library_path.  Set LD_LIBRARY_PATH
	here.
	* testsuite/libgomp.c++/c++.exp: Set ld_library_path from
	always_ld_library_path.  Set LD_LIBRARY_PATH here.
	* testsuite/libgomp.fortran/fortran.exp: Ditto.
	* testsuite/libgomp.c/atomic-1.c: Set dg-options to
	"-O2 -march=pentium" for ilp32 x86 targets. Simplify check for
	CX8 flag.
	* testsuite/libgomp.c/atomic-2.c: Set dg-options to "-O2 -mcx16" for
	lp64 x86 targets. Do not check for SSE3 bit. Do not define bit_SSE3.
	* testsuite/libgomp.c/pr29947-1.c: Remove default dg-options.
	* testsuite/libgomp.c/pr29947-1.c: Ditto.
	* testsuite/libgomp.c/atomic-10.c: Ditto.

From-SVN: r123125
2007-03-22 08:00:08 +01:00
Jakub Jelinek 2ada56f5a0 a.22.8.f90: Add dg-final cleanup-modules line.
* testsuite/libgomp.fortran/appendix-a/a.22.8.f90: Add
	dg-final cleanup-modules line.
	* testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Likewise.
	* testsuite/libgomp.fortran/appendix-a/a.31.5.f90: Likewise.
	* testsuite/libgomp.fortran/appendix-a/a.31.4.f90: Likewise.
	* testsuite/libgomp.fortran/threadprivate2.f90: Likewise.
	* testsuite/libgomp.fortran/reduction5.f90: Likewise.
	* testsuite/libgomp.fortran/threadprivate3.f90: Likewise.
	* testsuite/libgomp.fortran/threadprivate1.f90: Likewise.

From-SVN: r123116
2007-03-21 20:43:14 +01:00
Andreas Schwab f210f1cd67 acinclude.m4: Adjust regular expression for ld version extraction.
* acinclude.m4: Adjust regular expression for ld version
	extraction.
	* configure: Regenerate.

From-SVN: r123035
2007-03-18 11:17:44 +00:00
Brooks Moses c4dc950de7 Makefile.am: Add install-pdf target as copied from automake v1.10 rules.
* Makefile.am: Add install-pdf target as copied from
automake v1.10 rules.
* Makefile.in: Regenerate

From-SVN: r122451
2007-03-01 16:03:11 -08:00
Jakub Jelinek 78e075d40b [multiple changes]
2007-02-07  Bruno Haible  <bruno@clisp.org>

config/
	PR libgomp/28468
	* config/tls.m4 (GCC_CHECK_TLS): Also check whether the libc supports
	TLS via __thread.

2007-02-07  Jakub Jelinek  <jakub@redhat.com>

{libgomp,libstdc++-v3,libmudflap,libjava}/
	PR libgomp/28468
	* configure: Regenerate.

From-SVN: r121689
2007-02-07 14:35:17 +01:00
Jakub Jelinek e02a048f46 re PR c++/30703 (ICE Segmentation fault on using OpenMP)
PR c++/30703
	* gimplify.c (gimplify_scan_omp_clauses): Remove special casing
	of INDIRECT_REF <RESULT_DECL>.

	* cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
	parameters and result decls in omp clauses.
	(cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
	by reference.

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

From-SVN: r121688
2007-02-07 13:16:22 +01:00
Jakub Jelinek 60def7edd2 revert: configure.ac: Depend addition of -pthread on host OS.
Revert:
	2006-07-05  Eric Christopher  <echristo@apple.com>
	* configure.ac: Depend addition of -pthread on host OS.
	* configure: Regenerate.

From-SVN: r121497
2007-02-02 13:27:43 +01:00
Ralf Wildenhues f1b0882e68 libgomp.texi: Fix spacing after abbreviations.
2007-01-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* libgomp.texi: Fix spacing after abbreviations.

From-SVN: r121458
2007-01-31 21:37:21 -08:00
Daniel Franke 748b9d7c08 re PR libgomp/30546 (build fail in libgomp when building from SVN because makeinfo is missing)
2007-01-31  Daniel Franke <franke.daniel@gmail.com>

        PR libgomp/30546
        * configure.ac: Add check for makeinfo
        * Makefile.am: Redefined target libgomp.info, build libgomp.info only
        if an appropiate version of makeinfo is found.
        * aclocal.m4: Regenerated.
        * configure: Regenerated.
        * Makefile.in: Regenerated.
        * testsuite/Makefile.in: Regenerated.

From-SVN: r121440
2007-01-31 16:30:16 -05:00
Daniel Franke 14734fc701 re PR libgomp/30540 (Document default value of implementation-dependent OpenMP settings)
2007-01-29  Daniel Franke <franke.daniel@gmail.com>

        PR libgomp/30540
        * libgomp.texi: More about implementation-dependent settings.

From-SVN: r121360
2007-01-30 16:16:30 -05:00
Tobias Burnus 7befd5d26a lang-specs.h: Add support for .f03 and .F03 extensions.
fortran/
2007-01-26  Tobias Burnus  <burnus@net-b.de>

	* lang-specs.h: Add support for .f03 and .F03 extensions.
	* gfortran.texi: Document .f03 extension.
	* options.c (form_from_filename): Recognize .f03.

testsuite/
2007-01-26  Tobias Burnus  <burnus@net-b.de>

        * gfortran.dg/gomp/gomp.exp: Support .f03 extension.
        * gfortran.dg/vect/vect.exp: Ditto.
        * gfortran.dg/dg.exp: Ditto.
        * gfortran.fortran-torture/execute/execute.exp: Ditto.
        * gfortran.fortran-torture/compile/compile.exp: Ditto.

libgomp/
2007-01-26  Tobias Burnus  <burnus@net-b.de>

	* testsuite/libgomp.fortran/fortran.exp: Support .f03 extension.

From-SVN: r121201
2007-01-26 09:35:19 +01:00
Jakub Jelinek 4288fea212 re PR middle-end/30494 (ICE with VLA and openmp)
PR middle-end/30494
	* gimplify.c (omp_add_variable): Don't call omp_notice_variable
	on TYPE_SIZE_UNIT for GOVD_LOCAL VLAs.

	* gcc.dg/gomp/pr30494.c: New test.
	* g++.dg/gomp/pr30494.C: New test.

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

From-SVN: r121132
2007-01-24 21:56:45 +01:00
Tom Tromey 627ab4b862 configure: Rebuilt.
* configure: Rebuilt.
	* configure.ac: Fixed comment.

From-SVN: r120817
2007-01-16 02:57:41 +00:00
Daniel Franke 7c2b7f4582 libgomp.texi: Document implementation specific default values of environment variables.
2007-01-14  Daniel Franke  <franke.daniel@gmail.com>

        * libgomp.texi: Document implementation specific default values of
        environment variables.

From-SVN: r120783
2007-01-14 15:16:57 -05:00
Daniel Franke 3721b9e1ee re PR libgomp/28209 (None of the GOMP_* environment variables are documented)
2006-12-21  Daniel Franke  <franke.daniel@gmail.com>

	PR libgomp/28209
	* libgomp.texi: New file.
	* configure.ac: Add --enable-generated-files-in-srcdir option.
	* Makefile.am: Add info, dvi, pdf, html targets. On request, copy
	files to srcdir.
	* Makefile.in: Regenerated.
	* config.h.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.
	* NOTES: Removed.

From-SVN: r120122
2006-12-21 17:29:08 -05:00
Daniel Franke 62bd621610 re PR libgomp/29949 (implement argument checking for user accessable runtime routines)
PR libgomp/29949
	* env.c (omp_set_num_threads): Set illegal thread count to 1.

From-SVN: r119511
2006-12-04 16:35:19 -05:00
Eric Botcazou aad741f435 tls.m4 (GCC_CHECK_TLS): Do not test TLS with static linking if static linking doesn't even work.
config/
        * tls.m4 (GCC_CHECK_TLS): Do not test TLS with static linking
        if static linking doesn't even work.

libgomp/
        * configure: Regenerate.

libmudflap/
        * configure: Regenerate.

libjava/
        * configure: Regenerate.

libstdc++-v3/
        * configure: Regenerate.

From-SVN: r119487
2006-12-04 11:10:38 +00:00
Jakub Jelinek 22568cc62c re PR middle-end/29947 (OpenMP parallel for fails for reversed loop range)
PR libgomp/29947
	* omp-low.c (expand_omp_for_static_nochunk,
	expand_omp_for_static_chunk): Do all arithmetics in signed rather than
	unsigned type.

	* loop.c (gomp_loop_init): Make parameters signed.  Set ws->end to
	start if there shouldn't be any loop iterations.
	(gomp_loop_ordered_static_start): Remove start == end test.
	* testsuite/libgomp.c/pr29947-1.c: New test.
	* testsuite/libgomp.c/pr29947-2.c: New test.

From-SVN: r119485
2006-12-04 11:26:00 +01:00
Eric Botcazou a969000990 configure.tgt: Force initial-exec TLS model on Linux only.
* configure.tgt: Force initial-exec TLS model on Linux only.

From-SVN: r119452
2006-12-02 20:01:34 +00:00
Daniel Jacobowitz 597c25e65d * tls.m4 (GCC_CHECK_TLS): Fall back to a link test.
From-SVN: r118777
2006-11-13 20:35:20 +00:00
Uros Bizjak 6acf0b3843 env.c (parse_schedule): Reject out of range values.
* env.c (parse_schedule): Reject out of range values.
        (parse_unsigned_long): Reject out of range, negative or zero values.

From-SVN: r118626
2006-11-09 20:41:36 +01:00
Jakub Jelinek a7a53ca582 re PR fortran/29629 (ICE on OpenMP-enabled program (gfc_conv_variable, at fortran/trans-expr.c:404))
PR fortran/29629
	* trans-openmp.c (gfc_trans_omp_array_reduction): Set attr.flavor
	of init_val_sym and outer_sym to FL_VARIABLE.

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

From-SVN: r118134
2006-10-29 11:27:39 +01:00
Eric Botcazou 6d4d216add re PR libgomp/29494 (libgomp build fails with missing pthread_mutexattr_settype)
PR libgomp/29494
	* configure.tgt: Use posix95 configuration for Solaris 2.5.1 and 2.6.
	* config/posix95: New directory.
	* config/posix95/omp-lock.h: New file.
	* config/posix95/lock.c: Likewise.

From-SVN: r118004
2006-10-24 13:59:06 +00:00
Geoffrey Keating 5b043f0845 Index: config/ChangeLog
2006-10-14  Geoffrey Keating  <geoffk@apple.com>

	* multi.m4: New file, from automake version 2 branch.

Index: libgomp/ChangeLog
2006-10-14  Geoffrey Keating  <geoffk@apple.com>

	* aclocal.m4: Regenerate.
	* configure: Regenerate.

Index: libstdc++-v3/ChangeLog
2006-10-14  Geoffrey Keating  <geoffk@apple.com>

	* aclocal.m4: Regenerate.
	* configure: Regenerate with released autoconf-2.59.

Index: libobjc/ChangeLog
2006-10-14  Geoffrey Keating  <geoffk@apple.com>

	* Makefile.in: Use multi_basedir instead of toplevel_srcdir.
	* configure.ac: Use multi.m4 from aclocal rather than custom
	code.  Use multi_basedir instead of toplevel_srcdir.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

Index: libssp/ChangeLog
2006-10-14  Geoffrey Keating  <geoffk@apple.com>

	* aclocal.m4: Regenerate.
	* configure: Regenerate.

From-SVN: r117741
2006-10-15 07:42:57 +00:00
Danny Smith b50019f0aa barrier-1.c: Change timestamp tests from '<' to '<='.
* testsuite/libgomp.c/barrier-1.c: Change timestamp tests from
	'<' to '<='.

From-SVN: r117491
2006-10-06 08:32:33 +00:00
Danny Smith 8887708edc acinclude.m4 (HAVE_ATTRIBUTE_ALIAS): Remove __USER_LABEL_PREFIX__ from test.
* acinclude.m4 (HAVE_ATTRIBUTE_ALIAS): Remove __USER_LABEL_PREFIX__ from test.
	* configure: Regenerate.
	* fortran.c  (ialias_redirect): Add __USER_LABEL_PREFIX__ to alias.

From-SVN: r117490
2006-10-06 08:25:32 +00:00
Jakub Jelinek a70ad3bb3e re PR middle-end/25261 ([gomp] Nested function calls in #pragma omp parallel blocks)
PR middle-end/25261
	PR middle-end/28790
	* tree-nested.c (struct nesting_info): Added static_chain_added.
	(convert_call_expr): Set static_chain_added when adding static
	chain.  Handle OMP_PARALLEL and OMP_SECTION.

	* gcc.dg/gomp/nestedfn-1.c: New test.

	* testsuite/libgomp.c/nestedfn-4.c: New test.
	* testsuite/libgomp.c/nestedfn-5.c: New test.
	* testsuite/libgomp.fortran/nestedfn3.f90: New test.

From-SVN: r117235
2006-09-26 20:10:58 +02:00
Jakub Jelinek 9b9e4cd6a9 re PR fortran/29097 (!$ include 'omp_lib.h' does not work)
PR fortran/29097
	* scanner.c (include_line): Handle conditional include.

	* testsuite/libgomp.fortran/condinc1.f: New test.
	* testsuite/libgomp.fortran/condinc2.f: New test.
	* testsuite/libgomp.fortran/condinc3.f90: New test.
	* testsuite/libgomp.fortran/condinc4.f90: New test.
	* testsuite/libgomp.fortran/condinc1.inc: New file.

From-SVN: r117234
2006-09-26 20:06:55 +02:00
Tom Tromey 2fb3145567 tls.m4 (GCC_CHECK_TLS): Pass empty argument as "help arg" to GCC_ENABLE.
config
	* tls.m4 (GCC_CHECK_TLS): Pass empty argument as "help arg" to
	GCC_ENABLE.
libgomp
	* configure: Rebuilt.
libstdc++-v3
	* configure: Rebuilt.
libmudflap
	* configure: Rebuilt.
libjava
	* configure: Rebuilt.

From-SVN: r117049
2006-09-19 01:48:06 +00:00
Joseph Myers c663e30103 re PR c/28768 (Preprocessor doesn't parse tokens correctly?)
libcpp:
	PR c/28768
	PR preprocessor/14634
	* lex.c (lex_string): Pedwarn for unterminated literals.

libgomp:
	* configure.ac (HAVE_CLOCK_GETTIME): Add missing second argument
	to AC_DEFINE.
	* configure: Regenerate.

gcc/testsuite:
	* gcc.dg/cpp/include2.c, gcc.dg/cpp/macspace1.c,
	gcc.dg/cpp/macspace2.c, gcc.dg/cpp/multiline.c,
	gcc.dg/cpp/trad/literals-2.c: Update expected diagnostics.

From-SVN: r116915
2006-09-13 02:04:18 +01:00
Steven G. Kargl 38371be988 reduction3.f90: Change -2147483648 to -huge(i)-1 to avoid overflow.
2006-09-08  Steven G. Kargl  <kargl@gcc.gnu.org>

	* testsuite/libgomp.fortran/reduction3.f90: Change
	-2147483648 to -huge(i)-1 to avoid overflow.
	* testsuite/libgomp.fortran/reduction4.f90: Change
	Z'ffffffff' to not(0) to avoid overflow.

From-SVN: r116786
2006-09-08 20:57:55 +00:00
Joseph Myers 571d5ac5e9 re PR libgomp/25938 (libgomp installs header files in version and target independent location)
PR libgomp/25938
	* Makefile.am (libsubincludedir): New.
	(nodist_include_HEADERS): Rename to nodist_libsubinclude_HEADERS.
	* Makefile.in: Regenerate.

From-SVN: r116475
2006-08-26 19:30:44 +01:00
Jakub Jelinek 89b3e3cda1 re PR libgomp/28725 (Case Sensitive OpenMP environment variables and patch)
PR libgomp/28725
	* env.c: Include ctype.h.
	(parse_schedule, parse_unsigned_long, parse_boolean): Allow
	leading and/or trailing whitespace and compare strings case
	insensitively.

From-SVN: r116209
2006-08-17 09:58:02 +02:00
Jakub Jelinek 742fae059b re PR fortran/28390 (Broken !$omp parallel do lastprivate(iterationvar))
PR fortran/28390
	* trans-openmp.c (gfc_trans_omp_do): Look for LASTPRIVATE in
	code->exp.omp_clauses rather than in the 3rd function argument.

	* testsuite/libgomp.fortran/pr28390.f: New test.

From-SVN: r115504
2006-07-16 22:19:27 +02:00
Eric Christopher a1daed2dea configure.ac: Depend addition of -pthread on host OS.
2006-07-05  Eric Christopher  <echristo@apple.com>

        * configure.ac: Depend addition of -pthread on host OS.
        * configure: Regenerate.

From-SVN: r115205
2006-07-05 17:32:41 +00:00
Jakub Jelinek 5d7b51995e critical.c (GOMP_critical_name_start): Fix *pptr initialization when gomp_mutex_t is larger than pointer and...
* critical.c (GOMP_critical_name_start): Fix *pptr initialization
	when gomp_mutex_t is larger than pointer and HAVE_SYNC_BUILTINS is
	defined.

From-SVN: r114843
2006-06-21 10:59:44 +02:00
Jakub Jelinek fe5568e990 re PR libgomp/26175 (In gcc-4.2.0 libgomp/.../powerpc/futex.h SYS_futex undefined)
PR libgomp/26175
	PR libgomp/26477
	* configure.ac: If neither --enable-linux-futex nor
	--disable-linux-futex is passed, determine the default by checking
	for compiling and/or running against NPTL.  With --enable-linux-futex,
	check if SYS_gettid and SYS_futex are defined.
	* configure: Rebuilt.

From-SVN: r114809
2006-06-20 11:55:42 +02:00
Richard Henderson c3b11a40d0 re PR libgomp/28008 (build failure due to PTHREAD_STACK_MIN not being declared)
PR libgomp/28008
        * env.c (initialize_env): Avoid using PTHREAD_STACK_MIN when
        undefined.  Use GOMP_STACKSIZE not OMP_STACKSIZE for environment.

From-SVN: r114643
2006-06-14 08:20:01 -07:00
Richard Henderson d0d1b24d89 env.c (gomp_nthreads_var): Change to unsigned long.
* env.c (gomp_nthreads_var): Change to unsigned long.
        (gomp_run_sched_chunk): Likewise.
        (parse_unsigned_long): Rename from parse_num_threads and generalize.
        (initialize_env): Initialize gomp_thread_attr.
        * libgomp.h (gomp_nthreads_var): Update decl.
        (gomp_run_sched_chunk): Likewise.
        (gomp_thread_attr): Declare.
        * team.c (gomp_thread_attr): Export.
        (initialize_team): Don't initialize it.

From-SVN: r114525
2006-06-09 15:08:55 -07:00
Jakub Jelinek cd75853e1d re PR fortran/27916 (Problem with allocatable arrays inside OpenMP do loop)
PR fortran/27916
	* trans-openmp.c (gfc_omp_clause_default_ctor): New function.
	* trans.h (gfc_omp_clause_default_ctor): New prototype.
	* f95-lang.c (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): Define.

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

From-SVN: r114520
2006-06-09 23:18:42 +02:00
Francois-Xavier Coudert 33815e0c91 time.c: New file.
* config/mingw32/time.c: New file.
	* configure.tgt: Use it.

	* config/i386/mingw32.h (GOMP_SELF_SPECS): Define.

From-SVN: r114442
2006-06-06 17:54:02 +00:00
Carlos O'Donell 6667de0def Makefile.am: Add install-html target.
2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>

	* Makefile.am: Add install-html target. Add install-html to .PHONY
	* Makefile.in: Regenerate.

From-SVN: r114032
2006-05-24 01:28:16 +00:00
John David Anglin e962c46b20 re PR libgomp/27612 (Tests use __sync_lock_test_and_set_4')
PR libgomp/27612
	* testsuite/libgomp.c/sections-1.c: Require sync_int_long.
	* testsuite/libgomp.c/critical-1.c: Likewise.
	* testsuite/libgomp.c/loop-1.c: Likewise.
	* testsuite/libgomp.c/loop-2.c: Likewise.
	* testsuite/libgomp.c/single-1.c: Likewise.
	* testsuite/libgomp.c/ordered-1.c: Likewise.
	* testsuite/libgomp.c/ordered-2.c: Likewise.

From-SVN: r113988
2006-05-22 19:10:45 +00:00
Jakub Jelinek eeb1d9e08e re PR middle-end/27416 (ICE on invalid firstprivate/lastprivate)
PR middle-end/27416
	* omp-low.c (build_outer_var_ref): If VAR is reference in orphaned
	construct, return *VAR.

	* libgomp.fortran/pr27416-1.f90: New test.

From-SVN: r113788
2006-05-15 11:59:30 +02:00
Jakub Jelinek 693d710f2a re PR fortran/27395 (Problem with arrays in the OpenMP REDUCTION clause in Fortran)
PR fortran/27395
	* gimplify.c (gimplify_scan_omp_clauses): Compare OMP_CLAUSE_CODE
	rather than TREE_CODE to OMP_CLAUSE_REDUCTION.  Set also GOVD_SEEN
	bit for OMP_CLAUSE_REDUCTION_PLACEHOLDER.

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

From-SVN: r113494
2006-05-03 14:51:33 +02:00
Jakub Jelinek 8ca5b2a2d4 re PR c++/26943 ([gomp] firstprivate + lastprivate uses inefficient barrier)
PR c++/26943
	* omp-low.c (maybe_lookup_decl_in_outer_ctx): New function.
	(build_outer_var_ref): Use maybe_lookup_decl_in_outer_ctx
	to find if var will be a global variable even in the nested context.
	(omp_copy_decl): Only check for global variable at the end, it might
	be overridden in outer contexts.
	(scan_sharing_clauses): For global variables don't create a field.
	(lower_rec_input_clauses): Do nothing for global shared variables.
	Emit a barrier at the end of ILIST if there were any decls in both
	firstprivate and lastprivate clauses.
	(lower_send_clauses): Do nothing for global variables except for
	COPYIN.

	* testsuite/libgomp.c/pr26943-1.c: New test.
	* testsuite/libgomp.c/pr26943-2.c: New test.
	* testsuite/libgomp.c/pr26943-3.c: New test.
	* testsuite/libgomp.c/pr26943-4.c: New test.
	* testsuite/libgomp.c++/pr27337.C: Remove barrier.
	* testsuite/libgomp.c++/pr26943.C: New test.

From-SVN: r113483
2006-05-02 22:03:38 +02:00
Jakub Jelinek 077b0dfbfe re PR middle-end/27337 (OpenMP ICE in expand_expr_real_1 at expr.c:6814)
PR middle-end/27337
	* gimplify.c (gimplify_scan_omp_clauses): Handle INDIRECT_REF
	around RESULT_DECL for result passed by reference.
	(gimplify_expr): Call omp_notice_variable when RESULT_DECL is seen.
	* omp-low.c (use_pointer_for_field): Don't look at
	DECL_HAS_VALUE_EXPR_P for RESULT_DECLs.
	(scan_omp_1): Call remap_decl on RESULT_DECLs.
	(lower_rec_input_clauses): Don't allocate VLA memory for the second
	time or var for passing by reference for
	OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE clauses.  Allow creation of
	TREE_ADDRESSABLE variables when passing by reference.

	* omp-low.c (dump_omp_region): Fix output formatting.
cp/
	* cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
	* cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
	* cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
testsuite/
	* g++.dg/gomp/pr27337-1.C: New test.
	* g++.dg/gomp/pr27337-2.C: New test.
libgomp/
	* testsuite/libgomp.c++/pr27337.C: New test.

From-SVN: r113456
2006-05-02 12:44:55 +02:00
Jakub Jelinek 91b6c26dd2 re PR c/26171 (#pragma omp threadprivate requires -funit-at-a-time)
PR c/26171
	* cgraph.c (cgraph_varpool_finalize_decl): Don't call
	cgraph_varpool_assemble_pending_decls if -fopenmp, unless
	cgraph_global_info_ready.

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

From-SVN: r113271
2006-04-26 10:26:06 +02:00
Richard Henderson 60e1758f60 re PR libgomp/25865 (libgomp incorrectly detects support for TLS)
PR libgomp/25865
        * configure.ac: Use GCC_CHECK_TLS.
        * acinclude.m4 (LIBGOMP_CHECK_TLS): Remove.
        * Makefile.in, aclocal.m4, configure: Regenerate.

From-SVN: r113256
2006-04-25 13:58:25 -07:00
Matthias Klose 615baed708 libjava.exp (libjava_init): Recognize multilib directory names containing underscores.
gcc/testsuite:
2006-04-10  Matthias Klose  <doko@debian.org>

	* testsuite/lib/libjava.exp (libjava_init): Recognize multilib
	directory names containing underscores.

libffi:
2006-04-10  Matthias Klose  <doko@debian.org>

	* testsuite/lib/libjava.exp (libjava_init): Recognize multilib
	directory names containing underscores.

libgomp:
2006-04-10  Matthias Klose  <doko@debian.org>

	* testsuite/lib/libjava.exp (libjava_init): Recognize multilib
	directory names containing underscores.

libjava:
2006-04-10  Matthias Klose  <doko@debian.org>

	* testsuite/lib/libjava.exp (libjava_init): Recognize multilib
	directory names containing underscores.

libmudflap:
2006-04-10  Matthias Klose  <doko@debian.org>

	* testsuite/lib/libjava.exp (libjava_init): Recognize multilib
	directory names containing underscores.

libstdc++:
2006-04-10  Matthias Klose  <doko@debian.org>

	* testsuite/lib/libjava.exp (libjava_init): Recognize multilib
	directory names containing underscores.

From-SVN: r112833
2006-04-10 21:34:19 +00:00
Jakub Jelinek fae2b46b09 re PR c++/26691 (Wrong code for constructor with default value)
PR c++/26691
	* cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.

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

From-SVN: r112251
2006-03-21 17:21:24 +01:00
Jakub Jelinek 11a5f60849 trans-openmp.c (gfc_trans_omp_variable): Handle references to parent result.
* trans-openmp.c (gfc_trans_omp_variable): Handle references
	to parent result.
	* trans-expr.c (gfc_conv_variable): Remove useless setting
	of parent_flag, formatting.

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

From-SVN: r112026
2006-03-13 22:44:04 +01:00
Richard Henderson 1799e5d5ca Merge C++ from gomp-20050608-branch.
From-SVN: r111867
2006-03-09 10:14:39 -08:00
Andreas Tobler d349482e96 [multiple changes]
2006-02-25  Shantonu Sen  <ssen@opendarwin.org>

	* config/posix/sem.h: Define BROKEN_POSIX_SEMAPHORES functions.
	* config/posix/sem.c: Implement the above.

2006-02-25  Andreas Tobler  <a.tobler@schweiz.ch>

	* configure.ac (HAVE_BROKEN_POSIX_SEMAPHORES): Check for darwin and
	define HAVE_BROKEN_POSIX_SEMAPHORES.
	* configure: Rebuilt.
	* config.h.in: Rebuilt.

From-SVN: r111441
2006-02-25 22:23:09 +01:00
Francois-Xavier Coudert 124452c9fc re PR bootstrap/26161 (Configure tests for pthread.h sometimes need to use -pthread)
PR bootstrap/26161
	* configure.ac: Remove AC_CHECK_HEADER for pthread.h. Add comment
	for the other pthread check.
	* configure: Regenerate.
	* config.h.in: Regenerate.

From-SVN: r111205
2006-02-17 19:01:04 +00:00
Jakub Jelinek dd8d6dfe79 re PR libgomp/25938 (libgomp installs header files in version and target independent location)
PR libgomp/25938
	PR libgomp/25984
fortran/
	* Make-lang.in (install-finclude-dir): New goal.
	(fortran.install-common): Depend on install-finclude-dir.
	* lang-specs.h: If not -nostdinc, add -I finclude.
libgomp/
	* Makefile.am (fincludedir): New variable.
	(nodist_include_HEADERS): Remove Fortran files.
	(nodist_finclude_HEADERS): New variable.
	* Makefile.in: Regenerated.

From-SVN: r111018
2006-02-15 08:46:39 +01:00
Jakub Jelinek 6c7a4dfdb6 re PR fortran/25162 (Issue with OpenMP COPYIN and gfortran)
gcc/fortran/
2006-02-14  Jakub Jelinek  <jakub@redhat.com>
	    Richard Henderson  <rth@redhat.com>
	    Diego Novillo  <dnovillo@redhat.com>

	* invoke.texi: Document -fopenmp.
	* gfortran.texi (Extensions): Document OpenMP.

	Backport from gomp-20050608-branch
	* trans-openmp.c: Call build_omp_clause instead of
	make_node when creating OMP_CLAUSE_* trees.
	(gfc_trans_omp_reduction_list): Remove argument 'code'.
	Adjust all callers.

	* trans.h (build4_v): Define.
	* trans-openmp.c: Call build4_v to create OMP_PARALLEL nodes.
	Call build3_v to create OMP_SECTIONS nodes.

	PR fortran/25162
	* openmp.c (gfc_match_omp_variable_list): Call gfc_set_sym_referenced
	on all symbols added to the variable list.

	* openmp.c (gfc_match_omp_clauses): Fix check for non-INTRINSIC
	procedure symbol in REDUCTION.

	* trans-openmp.c (gfc_trans_omp_array_reduction): Use gfc_add
	for MINUS_EXPR OMP_CLAUSE_REDUCTION_CODE.

	* trans-openmp.c (gfc_trans_omp_do): Add PBLOCK argument.  If PBLOCK
	is non-NULL, evaluate INIT/COND/INCR and chunk size expressions in
	that statement block.
	(gfc_trans_omp_parallel_do): Pass non-NULL PBLOCK to gfc_trans_omp_do
	for non-ordered non-static combined loops.
	(gfc_trans_omp_directive): Pass NULL PBLOCK to gfc_trans_omp_do.

	* openmp.c: Include target.h and toplev.h.
	(gfc_match_omp_threadprivate): Emit diagnostic if target does
	not support TLS.
	* Make-lang.in (fortran/openmp.o): Add dependencies on
	target.h and toplev.h.

	* trans-decl.c (gfc_get_fake_result_decl): Set GFC_DECL_RESULT.
	* trans-openmp.c (gfc_omp_privatize_by_reference): Make
	DECL_ARTIFICIAL vars predetermined shared except GFC_DECL_RESULT.
	(gfc_omp_disregard_value_expr): Handle GFC_DECL_RESULT.
	(gfc_trans_omp_variable): New function.
	(gfc_trans_omp_variable_list, gfc_trans_omp_reduction_list): Use it.
	* trans.h (GFC_DECL_RESULT): Define.

	* trans-openmp.c (gfc_omp_firstprivatize_type_sizes): New function.
	* f95-lang.c (LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define.
	* trans.h (gfc_omp_firstprivatize_type_sizes): New prototype.

	* trans-openmp.c (gfc_omp_privatize_by_reference): Return
	true if a pointer has GFC_DECL_SAVED_DESCRIPTOR set.
	(gfc_trans_omp_array_reduction, gfc_trans_omp_reduction_list): New
	functions.
	(gfc_trans_omp_clauses): Add WHERE argument.  Call
	gfc_trans_omp_reduction_list rather than gfc_trans_omp_variable_list
	for reductions.
	(gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do,
	gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare,
	gfc_trans_omp_sections, gfc_trans_omp_single): Adjust
	gfc_trans_omp_clauses callers.

	* openmp.c (omp_current_do_code): New var.
	(gfc_resolve_omp_do_blocks): New function.
	(gfc_resolve_omp_parallel_blocks): Call it.
	(gfc_resolve_do_iterator): Add CODE argument.  Don't propagate
	predetermination if argument is !$omp do or !$omp parallel do
	iteration variable.
	* resolve.c (resolve_code): Call gfc_resolve_omp_do_blocks
	for EXEC_OMP_DO.  Adjust gfc_resolve_do_iterator caller.
	* fortran.h (gfc_resolve_omp_do_blocks): New prototype.
	(gfc_resolve_do_iterator): Add CODE argument.

	* trans.h (gfc_omp_predetermined_sharing,
	gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New
	prototypes.
	(GFC_DECL_COMMON_OR_EQUIV, GFC_DECL_CRAY_POINTEE): Define.
	* trans-openmp.c (gfc_omp_predetermined_sharing,
	gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New
	functions.
	* trans-common.c (build_equiv_decl, build_common_decl,
	create_common): Set GFC_DECL_COMMON_OR_EQUIV flag on the decls.
	* trans-decl.c (gfc_finish_cray_pointee): Set GFC_DECL_CRAY_POINTEE
	on the decl.
	* f95-lang.c (LANG_HOOKS_OMP_PREDETERMINED_SHARING,
	LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR,
	LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE): Define.

	* openmp.c (resolve_omp_clauses): Remove extraneous comma.

	* symbol.c (check_conflict): Add conflict between cray_pointee and
	threadprivate.
	* openmp.c (gfc_match_omp_threadprivate): Fail if
	gfc_add_threadprivate returned FAILURE.
	(resolve_omp_clauses): Diagnose Cray pointees in SHARED,
	{,FIRST,LAST}PRIVATE and REDUCTION clauses and Cray pointers in
	{FIRST,LAST}PRIVATE and REDUCTION clauses.

	* resolve.c (omp_workshare_flag): New variable.
	(resolve_function): Diagnose use of non-ELEMENTAL user defined
	function in WORKSHARE construct.
	(resolve_code): Cleanup forall_save use.  Make sure omp_workshare_flag
	is set to correct value in different contexts.

	* openmp.c (resolve_omp_clauses): Replace %s with '%s' when printing
	variable name.
	(resolve_omp_atomic): Likewise.

	PR fortran/24493
	* scanner.c (skip_free_comments): Set at_bol at the beginning of the
	loop, not before it.
	(skip_fixed_comments): Handle ! comments in the middle of line here
	as well.
	(gfc_skip_comments): Use skip_fixed_comments for FIXED_FORM even if
	not at BOL.
	(gfc_next_char_literal): Fix expected canonicalized *$omp string.

	* trans-openmp.c (gfc_trans_omp_do): Use make_node and explicit
	initialization to build OMP_FOR instead of build.

	* trans-decl.c (gfc_gimplify_function): Invoke
	diagnose_omp_structured_block_errors.

	* trans-openmp.c (gfc_trans_omp_master): Use OMP_MASTER.
	(gfc_trans_omp_ordered): Use OMP_ORDERED.

	* gfortran.h (gfc_resolve_do_iterator, gfc_resolve_blocks,
	gfc_resolve_omp_parallel_blocks): New prototypes.
	* resolve.c (resolve_blocks): Renamed to...
	(gfc_resolve_blocks): ... this.  Remove static.
	(gfc_resolve_forall): Adjust caller.
	(resolve_code): Only call gfc_resolve_blocks if code->block != 0
	and not for EXEC_OMP_PARALLEL* directives.  Call
	gfc_resolve_omp_parallel_blocks for EXEC_OMP_PARALLEL* directives.
	Call gfc_resolve_do_iterator if resolved successfully EXEC_DO
	iterator.
	* openmp.c: Include pointer-set.h.
	(omp_current_ctx): New variable.
	(gfc_resolve_omp_parallel_blocks, gfc_resolve_do_iterator): New
	functions.
	* Make-lang.in (fortran/openmp.o): Depend on pointer-set.h.

	* openmp.c (gfc_match_omp_clauses): For max/min/iand/ior/ieor,
	look up symbol if it exists, use its name instead and, if it is not
	INTRINSIC, issue diagnostics.

	* parse.c (parse_omp_do): Handle implied end do properly.
	(parse_executable): If parse_omp_do returned ST_IMPLIED_ENDDO,
	return it instead of continuing.

	* trans-openmp.c (gfc_trans_omp_critical): Update for changed
	operand numbering.
	(gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do,
	gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare,
	gfc_trans_omp_sections, gfc_trans_omp_single): Likewise.

	* trans.h (gfc_omp_privatize_by_reference): New prototype.
	* f95-lang.c (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Redefine
	to gfc_omp_privatize_by_reference.
	* trans-openmp.c (gfc_omp_privatize_by_reference): New function.

	* trans-stmt.h (gfc_trans_omp_directive): Add comment.

	* openmp.c (gfc_match_omp_variable_list): Add ALLOW_COMMON argument.
	Disallow COMMON matching if it is set.
	(gfc_match_omp_clauses, gfc_match_omp_flush): Adjust all callers.
	(resolve_omp_clauses): Show locus in error messages.  Check that
	variable types in reduction clauses are appropriate for reduction
	operators.

	* resolve.c (resolve_symbol): Don't error if a threadprivate module
	variable isn't SAVEd.

	* trans-openmp.c (gfc_trans_omp_do): Put count into BLOCK, not BODY.
	Fix typo in condition.  Fix DOVAR initialization.

	* openmp.c (gfc_match_omp_clauses): Match min/iand/ior/ieor
	rather than .min. etc.

	* trans-openmpc.c (omp_not_yet): Remove.
	(gfc_trans_omp_parallel_do): Keep listprivate clause on parallel.
	Force creation of BIND_EXPR around the workshare construct.
	(gfc_trans_omp_parallel_sections): Likewise.
	(gfc_trans_omp_parallel_workshare): Likewise.

	* types.def (BT_I16, BT_FN_I16_VPTR_I16,
	BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.

	* trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_DEFAULT.
	(gfc_trans_omp_code): New function.
	(gfc_trans_omp_do): Use it, remove omp_not_yet uses.
	(gfc_trans_omp_parallel, gfc_trans_omp_single): Likewise.
	(gfc_trans_omp_sections): Likewise.  Only treat empty last section
	specially if lastprivate clause is present.
	* f95-lang.c (gfc_init_builtin_functions): Create BUILT_IN_TRAP
	builtin.

	* trans-openmp.c (gfc_trans_omp_variable_list): Update for
	OMP_CLAUSE_DECL name change.
	(gfc_trans_omp_do): Likewise.

	* trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_REDUCTION
	clauses.
	(gfc_trans_omp_atomic): Build OMP_ATOMIC instead of expanding
	sync builtins directly.
	(gfc_trans_omp_single): Build OMP_SINGLE statement.

	* trans-openmp.c (gfc_trans_add_clause): New.
	(gfc_trans_omp_variable_list): Take a tree code and build the clause
	node here.  Link it to the head of a list.
	(gfc_trans_omp_clauses): Update to match.
	(gfc_trans_omp_do): Use gfc_trans_add_clause.

	* trans-openmp.c (gfc_trans_omp_clauses): Change second argument to
	gfc_omp_clauses *.  Use gfc_evaluate_now instead of creating
	temporaries by hand.
	(gfc_trans_omp_atomic, gfc_trans_omp_critical): Use buildN_v macros.
	(gfc_trans_omp_do): New function.
	(gfc_trans_omp_master): Dont' check for gfc_trans_code returning NULL.
	(gfc_trans_omp_parallel): Adjust gfc_trans_omp_clauses caller.
	Use buildN_v macros.
	(gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections,
	gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections,
	gfc_trans_omp_single, gfc_trans_omp_workshare): New functions.
	(gfc_trans_omp_directive): Use them.
	* parse.c (parse_omp_do): Allow new_st.op == EXEC_NOP.
	* openmp.c (resolve_omp_clauses): Check for list items present
	in multiple clauses.
	(resolve_omp_do): Check that iteration variable is not THREADPRIVATE
	and is not present in any clause variable lists other than PRIVATE
	or LASTPRIVATE.

	* gfortran.h (symbol_attribute): Add threadprivate bit.
	(gfc_common_head): Add threadprivate member, change use_assoc
	and saved into char to save space.
	(gfc_add_threadprivate): New prototype.
	* symbol.c (check_conflict): Handle threadprivate.
	(gfc_add_threadprivate): New function.
	(gfc_copy_attr): Copy threadprivate.
	* trans-openmp.c (gfc_trans_omp_clauses): Avoid creating a temporary
	if IF or NUM_THREADS is constant.  Create OMP_CLAUSE_SCHEDULE and
	OMP_CLAUSE_ORDERED.
	* resolve.c (resolve_symbol): Complain if a THREADPRIVATE symbol
	outside a module and not in COMMON has is not SAVEd.
	(resolve_equivalence): Ensure THREADPRIVATE objects don't get
	EQUIVALENCEd.
	* trans-common.c: Include target.h and rtl.h.
	(build_common_decl): Set DECL_TLS_MODEL if THREADPRIVATE.
	* trans-decl.c: Include rtl.h.
	(gfc_finish_var_decl): Set DECL_TLS_MODEL if THREADPRIVATE.
	* dump-parse-tree.c (gfc_show_attr): Handle THREADPRIVATE.
	* Make-lang.in (fortran/trans-decl.o): Depend on $(RTL_H).
	(fortran/trans-common.o): Depend on $(RTL_H) and $(TARGET_H).
	* openmp.c (gfc_match_omp_variable_list): Ensure COMMON block
	is from current namespace.
	(gfc_match_omp_threadprivate): Rewrite.
	(resolve_omp_clauses): Check some clause restrictions.
	* module.c (ab_attribute): Add AB_THREADPRIVATE.
	(attr_bits): Add THREADPRIVATE.
	(mio_symbol_attribute, mio_symbol_attribute): Handle threadprivate.
	(load_commons, write_common, write_blank_common): Adjust for type
	change of saved, store/load threadprivate bit from the integer
	as well.

	* types.def (BT_FN_UINT_UINT): New.
	(BT_FN_VOID_UINT_UINT): Remove.

	* trans-openmp.c (gfc_trans_omp_clauses, gfc_trans_omp_barrier,
	gfc_trans_omp_critical, gfc_trans_omp_flush, gfc_trans_omp_master,
	gfc_trans_omp_ordered, gfc_trans_omp_parallel): New functions.
	(gfc_trans_omp_directive): Use them.

	* openmp.c (expr_references_sym): Add SE argument, don't look
	into SE tree.
	(is_conversion): New function.
	(resolve_omp_atomic): Adjust expr_references_sym callers.  Handle
	promoted expressions.
	* trans-openmp.c (gfc_trans_omp_atomic): New function.
	(gfc_trans_omp_directive): Call it.

	* f95-lang.c (builtin_type_for_size): New function.
	(gfc_init_builtin_functions): Initialize synchronization and
	OpenMP builtins.
	* types.def: New file.
	* Make-lang.in (f95-lang.o): Depend on $(BUILTINS_DEF) and
	fortran/types.def.

	* trans-openmp.c: Rename GOMP_* tree codes into OMP_*.

	* dump-parse-tree.c (show_symtree): Don't crash if ns->proc_name
	is NULL.

	* dump-parse-tree.c (gfc_show_namelist, gfc_show_omp_node): New
	functions.
	(gfc_show_code_node): Call gfc_show_omp_node for EXEC_OMP_* nodes.

	* parse.c (parse_omp_do): Call pop_state before next_statement.
	* openmp.c (expr_references_sym, resolve_omp_atomic, resolve_omp_do):
	New functions.
	(gfc_resolve_omp_directive): Call them.
	* match.c (match_exit_cycle): Issue error if EXIT or CYCLE statement
	leaves an OpenMP structured block or if EXIT terminates !$omp do
	loop.

	* Make-lang.in (F95_PARSER_OBJS): Add fortran/openmp.o.
	(F95_OBJS): Add fortran/trans-openmp.o.
	(fortran/trans-openmp.o): Depend on $(GFORTRAN_TRANS_DEPS).
	* lang.opt: Add -fopenmp option.
	* options.c (gfc_init_options): Initialize it.
	(gfc_handle_option): Handle it.
	* gfortran.h (ST_OMP_ATOMIC, ST_OMP_BARRIER, ST_OMP_CRITICAL,
	ST_OMP_END_CRITICAL, ST_OMP_END_DO, ST_OMP_END_MASTER,
	ST_OMP_END_ORDERED, ST_OMP_END_PARALLEL, ST_OMP_END_PARALLEL_DO,
	ST_OMP_END_PARALLEL_SECTIONS, ST_OMP_END_PARALLEL_WORKSHARE,
	ST_OMP_END_SECTIONS, ST_OMP_END_SINGLE, ST_OMP_END_WORKSHARE,
	ST_OMP_DO, ST_OMP_FLUSH, ST_OMP_MASTER, ST_OMP_ORDERED,
	ST_OMP_PARALLEL, ST_OMP_PARALLEL_DO, ST_OMP_PARALLEL_SECTIONS,
	ST_OMP_PARALLEL_WORKSHARE, ST_OMP_SECTIONS, ST_OMP_SECTION,
	ST_OMP_SINGLE, ST_OMP_THREADPRIVATE, ST_OMP_WORKSHARE): New
	statement codes.
	(OMP_LIST_PRIVATE, OMP_LIST_FIRSTPRIVATE, OMP_LIST_LASTPRIVATE,
	OMP_LIST_COPYPRIVATE, OMP_LIST_SHARED, OMP_LIST_COPYIN,
	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, OMP_LIST_NUM):
	New OpenMP variable list types.
	(gfc_omp_clauses): New typedef.
	(gfc_get_omp_clauses): Define.
	(EXEC_OMP_CRITICAL, EXEC_OMP_DO, EXEC_OMP_FLUSH, EXEC_OMP_MASTER,
	EXEC_OMP_ORDERED, EXEC_OMP_PARALLEL, EXEC_OMP_PARALLEL_DO,
	EXEC_OMP_PARALLEL_SECTIONS, EXEC_OMP_PARALLEL_WORKSHARE,
	EXEC_OMP_SECTIONS, EXEC_OMP_SINGLE, EXEC_OMP_WORKSHARE,
	EXEC_OMP_ATOMIC, EXEC_OMP_BARRIER, EXEC_OMP_END_NOWAIT,
	EXEC_OMP_END_SINGLE): New OpenMP gfc_exec_op codes.
	(struct gfc_code): Add omp_clauses, omp_name, omp_namelist
	and omp_bool fields to ext union.
	(flag_openmp): Declare.
	(gfc_free_omp_clauses, gfc_resolve_omp_directive): New prototypes.
	* scanner.c (openmp_flag, openmp_locus): New variables.
	(skip_free_comments, skip_fixed_comments, gfc_next_char_literal):
	Handle OpenMP directive lines and conditional compilation magic
	comments.
	* parse.h (COMP_OMP_STRUCTURED_BLOCK): New compile state.
	* parse.c (decode_omp_directive, parse_omp_do, parse_omp_atomic,
	parse_omp_structured_block): New functions.
	(next_free, next_fixed): Parse OpenMP directives.
	(case_executable, case_exec_markers, case_decl): Add ST_OMP_*
	codes.
	(gfc_ascii_statement): Handle ST_OMP_* codes.
	(parse_executable): Rearrange the loop slightly, so that
	parse_omp_do can return next_statement.
	* match.h (gfc_match_omp_eos, gfc_match_omp_atomic,
	gfc_match_omp_barrier, gfc_match_omp_critical, gfc_match_omp_do,
	gfc_match_omp_flush, gfc_match_omp_master, gfc_match_omp_ordered,
	gfc_match_omp_parallel, gfc_match_omp_parallel_do,
	gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare,
	gfc_match_omp_sections, gfc_match_omp_single,
	gfc_match_omp_threadprivate, gfc_match_omp_workshare,
	gfc_match_omp_end_nowait, gfc_match_omp_end_single): New prototypes.
	* resolve.c (resolve_blocks): Ignore EXEC_OMP_* block directives.
	(resolve_code): Call gfc_resolve_omp_directive on EXEC_OMP_*
	directives.
	* trans.c (gfc_trans_code): Call gfc_trans_omp_directive for
	EXEC_OMP_* directives.
	* st.c (gfc_free_statement): Handle EXEC_OMP_* statement freeing.
	* trans-stmt.h (gfc_trans_omp_directive): New prototype.
	* openmp.c: New file.
	* trans-openmp.c: New file.

gcc/testsuite/
2006-02-14  Jakub Jelinek  <jakub@redhat.com>
	    Diego Novillo  <dnovillo@redhat.com>
	    Uros Bizjak  <uros@kss-loka.si>

	* gfortran.dg/gomp: New directory.

libgomp/
2006-02-14  Jakub Jelinek  <jakub@redhat.com>

	* testsuite/libgomp.fortran/vla7.f90: Add -w to options.
	Remove tests for returning assumed character length arrays.

Co-Authored-By: Diego Novillo <dnovillo@redhat.com>
Co-Authored-By: Richard Henderson <rth@redhat.com>
Co-Authored-By: Uros Bizjak <uros@kss-loka.si>

From-SVN: r110984
2006-02-14 17:38:03 +01:00
Roger Sayle 5142e08b2f re PR libgomp/25936 (libgomp needs to link against rt on HPUX)
2006-02-12  Roger Sayle  <roger@eyesopen.com>
	    John David Anglin  <dave@hiauly1.hia.nrc.ca>

	PR libgomp/25936
	* configure.tgt: Link against -lrt for sem_init on HPUX v11 systems.
 

Co-Authored-By: John David Anglin <dave@hiauly1.hia.nrc.ca>

From-SVN: r110908
2006-02-13 02:33:37 +00:00
Ulrich Weigand 5821fba848 * testsuite/lib/libgomp-dg.exp: Load scanrtl.exp library.
From-SVN: r110773
2006-02-08 22:36:39 +00:00
Eric Botcazou cb2bbc673b libgomp-dg.exp (libgomp_init): Compute multilib-related part of LD_LIBRARY_PATH manually.
* testsuite/lib/libgomp-dg.exp (libgomp_init): Compute multilib-related
	part of LD_LIBRARY_PATH manually.

From-SVN: r110720
2006-02-07 21:57:38 +00:00
H.J. Lu f05ee80cc1 re PR libgomp/25852 (libgomp testing does not work for multilib (-m32 on x86_64-linux-gnu))
2006-02-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR libgomp/25852
	* testsuite/lib/libgomp-dg.exp (blddir): Set it in
	libgomp_init.

From-SVN: r110552
2006-02-03 10:37:11 -08:00
Paolo Bonzini 03b8fe495d re PR libgomp/25884 (libgomp should not require perl to compile)
PR libgomp/25884
        * Makefile.am (omp.h, omp_lib.h, omp_lib.f90, libgomp_f.h): Remove.
        * configure.ac (PERL): Don't set.
        (gstdint.h, omp.h, omp_lib.h, omp_lib.f90, libgomp_f.h): Create here.
        (OMP_LOCK_SIZE, OMP_LOCK_ALIGN, OMP_LOCK_KIND, OMP_NEST_LOCK_SIZE,
        OMP_NEST_LOCK_ALIGN, OMP_NEST_LOCK_KIND): New substitutions.
        * omp.h.in: Wrap the new configure substitutions with @ characters.
        * omp_lib.h.in, omp_lib.f90.in, libgomp_f.h.in: Likewise.
        * aclocal.m4, configure, Makefile.in: Regenerate.
        * mkomp_h.pl: Delete.

From-SVN: r110220
2006-01-25 11:17:57 -08:00
Paolo Bonzini 18cbfd85b2 re PR libgomp/25259 (bootstrap failures on non-C99 platforms (no stdint.h))
PR libgomp/25259
        * configure.ac: Use GCC_HEADER_STDINT.
        * libgomp.h: Include gstdint.h.
        * libgomp_f.h.in: Don't include stdint.h or inttypes.h.
        * configure, Makefile.in, testsuite/Makefile.in, aclocal.m4: Rebuild.

From-SVN: r110179
2006-01-24 13:06:07 -08:00
Richard Henderson c41303c681 re PR libgomp/25942 (SVN checked out GCC does not bootstrap)
PR libgomp/25942
        * configure.ac: Add AM_MAINTAINER_MODE.
        * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Rebuild.

From-SVN: r110176
2006-01-24 08:52:09 -08:00
Diego Novillo 149b9553f3 Makefile.in: Regenerate.
* Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.

From-SVN: r110173
2006-01-24 10:31:32 -05:00
Andreas Tobler 192a50ad41 proc.c: Conditional include of sys/loadavg.h for Solaris.
2006-01-23  Andreas Tobler  <a.tobler@schweiz.ch>

	* config/posix/proc.c: Conditional include of sys/loadavg.h for
	Solaris.
	* configure.ac: Add check for loadavg.h.
	(link_gomp): Adjust comment.
	* configure: Regenerate.
	* config.h.in: Regenerate.

From-SVN: r110141
2006-01-23 19:28:51 +01:00
Steve Ellcey a55b8e1826 re PR libgomp/25877 (team.c:269: warning: implicit declaration of function 'alloca')
PR libgomp/25877
	* configure.ac: Remove check for alloca.h.
	* configure: Regenerate.
	* config.h.in: Regenerate.
	* libgomp.h: define gomp_alloca to be __builtin_alloca.
	* team.c: Remove use of alloca.h.
	Call gomp_alloca instead of alloca.

From-SVN: r110068
2006-01-21 17:57:01 +00:00
Steve Ellcey 692eeb3453 re PR libgomp/25877 (team.c:269: warning: implicit declaration of function 'alloca')
PR libgomp/25877
	* team.c: Add include of alloca.h.
	* configure.ac: Add check for alloca.h.
	* configure: Regenerate.
	* config.h.in: Regenerate.

From-SVN: r110031
2006-01-20 18:17:28 +00:00
Diego Novillo 953ff28998 [multiple changes]
2006-01-18  Richard Henderson  <rth@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* libgomp: New directory.
	* Makefile.def: Add target_module libgomp.
	* Makefile.in: Regenerate.
	* configure.in (target_libraries): Add target-libgomp.
	* configure: Regenerate.


contrib/

2006-01-18  Richard Henderson  <rth@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* gcc_update (files_and_dependencies): Add libgomp files.


gcc/

2006-01-18  Richard Henderson  <rth@redhat.com>
            Aldy Hernandez  <aldyh@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* omp-low.c: New file.
	* c-omp.c: New file.

2006-01-18  Richard Henderson  <rth@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* doc/invoke.texi: Document -fopenmp.
	* tree-dump.h (debug_function): Declare.

	* hooks.c (hook_bool_tree_bool_false): New function.
	(hook_tree_tree_null): Remove.
	(hook_tree_tree_tree_null): New.
	* hooks.h: Update to match.

	* tree-pretty-print.c (debug_tree_chain): New.
	(print_generic_expr): Handle TDF_CHAIN.
	(dump_generic_node): Handle BLOCK.
	Do not abort with incomplete SWITCH_EXPRs.
	Do not dump body of an OpenMP directive if TDF_SLIM is given.
	<case OMP_PARALLEL, OMP_FOR, OMP_SECTIONS>: Don't
	print space after directive name.
	<OMP_FOR>: Handle printing OMP_FOR_PRE_BODY.
	Handle OMP_MASTER and OMP_ORDERED.
	Handle printing of OMP_BODY just in one place, goto
	dump_omp_body in the rest of OMP_* nodes that have
	OMP_BODY.
	Don't handle clause nodes here.  Update omp statements to
	use dump_omp_clauses.
	Handle OMP_SINGLE, OMP_SECTIONS, OMP_SECTION,
	OMP_CLAUSE_ORDERED, OMP_CLAUSE_SCHEDULE, OMP_ATOMIC,
	OMP_CRITICAL, OMP_CLAUSE_NOWAIT, GOMP_CLAUSE_IF,
	GOMP_CLAUSE_NUM_THREADS, GOMP_FOR, GOMP_CLAUSE_SHARED,
	GOMP_CLAUSE_FIRSTPRIVATE, GOMP_CLAUSE_LASTPRIVATE,
	GOMP_CLAUSE_COPYIN and GOMP_CLAUSE_COPYPRIVATE.
	Adjust output for GOMP_PARALLEL.
	(dump_omp_clauses): New.
	(print_declaration): Dump DECL_VALUE_EXPR.
	(op_symbol_1): Split out of op_symbol.
	(dumping_stmts): Remove.  Update all users.

	* cgraph.c (cgraph_analyze_queue): New.
	(cgraph_add_new_function): New.
	* cgraph.h (cgraph_analyze_queue): Declare.
	(cgraph_add_new_function): Declare.
	(cgraph_lower_function): Remove.

	* tree.c (walk_tree): Walk OMP_CLAUSE_CHAIN of OMP_CLAUSE_*
	nodes.  Use switch for all nodes, handle most of IS_EXPR_CODE_CLASS
	and TYPE_P nodes in its default clause.
	(empty_body_p): New.
	(tree_range_check_failed): New.
	(build5_stat): New.

	* tree.h (OMP_CLAUSE_REDUCTION_INIT,
	OMP_CLAUSE_REDUCTION_MERGE,
	OMP_CLAUSE_REDUCTION_PLACEHOLDER,
	OMP_CLAUSE_PRIVATE_DEBUG,
	OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE, OMP_FOR_PRE_BODY,
	OMP_MASTER_BODY, OMP_ORDERED_BODY OMP_BODY,
	OMP_CLAUSES, OMP_CLAUSE_DECL, OMP_CLAUSE_DEFAULT_KIND,
	OMP_CLAUSE_CHAIN, OMP_CLAUSE_OUTER_DECL,
	OMP_CLAUSE_INNER_DECL, OMP_CLAUSE_NUM_THREADS_EXPR,
	OMP_CLAUSE_IF_EXPR, OMP_CLAUSE_SCHEDULE_CHUNK_EXPR,
	OMP_CLAUSE_SCHEDULE_CHUNK_SIZE. OMP_PARALLEL_VAR_INIT,
	OMP_PARALLEL_VAR_REDUC, OMP_FOR_VAR_INIT,
	OMP_FOR_VAR_LAST, OMP_FOR_VAR_REDUC,
	OMP_SECTIONS_VAR_INIT, OMP_SECTIONS_VAR_LAST,
	OMP_SECTIONS_VAR_REDUC, OMP_CLAUSE_REDUCTION_CODE
	OMP_SINGLE_CLAUSES, OMP_SINGLE_BODY,
	OMP_CLAUSE_SCHEDULE_CHUNK_SIZE, OMP_SECTION_BODY,
	OMP_CRITICAL_NAME, OMP_CRITICAL_BODY): New.
	(TREE_RANGE_CHECK): New.
	(empty_body_p): Declare.
	(enum omp_clause_default_kind): New.
	(build_string_literal): Declare.
	(enum omp_clause_schedule_kind, OMP_CLAUSE_SCHEDULE_KIND): New.
	(build5_stat, build5): Declare.

	* tree-pass.h (TDF_CHAIN): Define.
	* tree-pass.h (PROP_gimple_lomp): Define.
	(pass_lower_omp): Declare.

	* diagnostic.h (debug_tree_chain): Declare.

	* builtins.c (get_builtin_sync_mode): Use 0 as last argument to
	mode_for_size.
	(expand_builtin): Handle sync BUILT_IN_*_16 builtins.
	* builtins.c (build_string_literal): Make extern.

	* gcc.c (include_spec_function): New.
	(static_spec_functions): Add it.
	(main): Move load of libgomp.spec ...
	(LINK_COMMAND_SPEC): ... here.
	(link_gomp_spec): New.
	(static_specs): Include it.
	(LINK_COMMAND_SPEC): Add link_gomp.
	(GOMP_SELF_SPECS): New.
	(driver_self_specs): Include it.
	(switch_matches): Don't mark inline.
	(main): Load libgomp.spec.

	* tree-gimple.c (is_gimple_stmt): True for OMP_MASTER,
	OMP_ORDERED, OMP_CRITICAL, OMP_SECTIONS, OMP_SECTION,
	and OMP_SINGLE, OMP_FOR and OMP_PARALLEL.

	* tree-gimple.h (enum omp_parallel): Declare.
	(determine_parallel_type): Declare.
	(omp_firstprivatize_variable): Declare.
	(omp_reduction_init): Declare.
	(diagnose_omp_structured_block_errors): Declare.
	(struct walk_stmt_info): Add want_return_expr.
	(struct walk_stmt_info): Add want_bind_expr, want_locations.
	(find_omp_clause): Declare.
	(insert_field_into_struct): Declare.
	(struct walk_stmt_info): Move from tree-nested.c
	(walk_stmts): Declare.

	* c-cppbuiltin.c (c_cpp_builtins): If -fopenmp, #define _OPENMP
	to 200505.

	* cgraphunit.c (cgraph_lower_function): Make static.
	(cgraph_finalize_pending_functions): New.
	(cgraph_finalize_function): Call it.
	(cgraph_finalize_compilation_unit): Likewise.

	* builtin-types.def (BT_I16, BT_FN_I16_VPTR_I16,
	BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.
	(BT_FN_UINT_UINT): New.
	(DEF_FUNCTION_TYPE_6, DEF_FUNCTION_TYPE_7,
	DEF_FUNCTION_TYPE_VAR_4): Document.
	(BT_PTR_LONG, BT_PTR_PTR, BT_FN_BOOL, BT_FN_INT,
	BT_FN_VOID_PTRPTR, BT_PTR_FN_VOID_PTR,
	BT_FN_BOOL_LONGPTR_LONGPTR, BT_FN_VOID_OMPFN_PTR_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_UINT,
	BT_FN_BOOL_LONG_LONG_LONG_LONGPTR_LONGPTR,
	BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG): New.

	* builtins.def: Update DEF_BUILTIN comment to include COND argument.
	Move all DEF_SYNC_BUILTIN () and DEF_GOMP_BUILTIN () builtins
	into separate files.
	(DEF_GOMP_BUILTIN): New.
	(BUILT_IN_OMP_GET_THREAD_NUM, BUILT_IN_GOMP_BARRIER,
	BUILT_IN_GOMP_CRITICAL_START, BUILT_IN_GOMP_CRITICAL_END,
	BUILT_IN_GOMP_CRITICAL_NAME_START, BUILT_IN_GOMP_CRITICAL_NAME_END,
	BUILT_IN_GOMP_LOOP_STATIC_START, BUILT_IN_GOMP_LOOP_DYNAMIC_START,
	BUILT_IN_GOMP_LOOP_GUIDED_START, BUILT_IN_GOMP_LOOP_RUNTIME_START,
	BUILT_IN_GOMP_LOOP_ORDERED_STATIC_START,
	BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_START,
	BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_START,
	BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_START,
	BUILT_IN_GOMP_LOOP_STATIC_NEXT, BUILT_IN_GOMP_LOOP_DYNAMIC_NEXT,
	BUILT_IN_GOMP_LOOP_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_RUNTIME_NEXT,
	BUILT_IN_GOMP_LOOP_ORDERED_STATIC_NEXT,
	BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_NEXT,
	BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_NEXT,
	BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_NEXT,
	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_LOOP_END, BUILT_IN_GOMP_LOOP_END_NOWAIT,
	BUILT_IN_GOMP_ORDERED_START, BUILT_IN_GOMP_ORDERED_END,
	BUILT_IN_GOMP_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END,
	BUILT_IN_GOMP_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_NEXT,
	BUILT_IN_GOMP_PARALLEL_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_END,
	BUILT_IN_GOMP_SECTIONS_END_NOWAIT, BUILT_IN_GOMP_SINGLE_START,
	BUILT_IN_GOMP_SINGLE_COPY_START, BUILT_IN_GOMP_SINGLE_COPY_END): New.
	* sync-builtins.def: New file, moved from builtins.def.
	* omp-builtins.def: New file, moved from builtins.def.

	* c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.

	* gimple-low.c (lower_function_body): Clear data.
	(lower_stmt): Do not handle COMPOUND_EXPR.
	Remove call to print_node_brief.

	* c-tree.h (c_finish_omp_clauses): New prototype.
	(C_DECL_THREADPRIVATE_P): Define.
	(lookup_name_no_remap, c_omp_remap_private): Remove
	(c_begin_omp_parallel, c_finish_omp_parallel): Update.
	(check_for_loop_decls): Update decl.
	(lookup_name_no_remap, c_omp_remap_private): Declare.
	(build_indirect_ref, build_modify_expr, pushdecl,
	pushdecl_top_level): Move to c-common.h.

	* dwarf2out.c (loc_descriptor_from_tree_1): Don't set unsignedp
	before the switch, but just in the 2 places that need it.

	* c-decl.c (diagnose_mismatched_decls): Do not check for
	mismatched thread-local attributes when OLDDECL is marked
	threadprivate and NEWDECL has no thread-local attributes.
	(merge_decls): Merge C_DECL_THREADPRIVATE_P.
	(c_gimple_diagnostics_recursively): Rename from
	c_warn_unused_result_recursively.  Invoke
	diagnose_omp_structured_block_errors.
	(check_for_loop_decls): Return a singular decl found.

	* langhooks.c (lhd_omp_predetermined_sharing): Return
	OMP_CLAUSE_DEFAULT_SHARED for DECL_ARTIFICIAL decls.
	(lhd_omp_firstprivatize_type_sizes): New.
	(lhd_omp_assignment): New.
	(lhd_omp_predetermined_sharing): New.

	* langhooks.h (struct gimplify_omp_ctx): Forward declare.
	(struct lang_hooks_for_types): Add
	omp_firstprivatize_type_sizes, omp_privatize_by_reference,
	omp_predetermined_sharing, omp_disregard_value_expr,
	omp_private_debug_clause, omp_clause_default_ctor,
	omp_clause_copy_ctor, omp_clause_assign_op, omp_clause_dtor.

	(c_finish_omp_clauses): New.
	(c_finish_bc_stmt): Diagnose break within omp for.
	(c_begin_omp_parallel, c_finish_omp_parallel): New.
	(build_unary_op): Return error_mark after reporting
	a readonly_error.
	(build_modify_expr): Likewise.

	* gimplify.c: Include optabs.h and pointer-set.h.
	(enum gimplify_omp_var_data): Declare.
	(struct gimplify_omp_ctx): Declare.
	(struct gimplify_ctx): Add fields prev_context, combined_pre_p
	and combined_ctxp.
	(gimplify_ctxp, gimplify_omp_ctxp): New local variables.
	(push_gimplify_context, pop_gimplify_context): Allow nesting.
	(splay_tree_compare_decl_uid): New.
	(new_omp_context): New.
	(delete_omp_context): New.
	(gimple_add_tmp_var): Call omp_add_variable.
	(gimplify_bind_expr): Likewise.
	(gimplify_var_or_parm_decl): If omp_notice_variable returned
	true, disregard DECL_VALUE_EXPR on the decl if any.
	(gimplify_expr_in_ctx): New.
	(omp_firstprivatize_variable, omp_firstprivatize_type_sizes
	omp_add_variable, omp_notice_variable, omp_is_private
	gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses_1
	gimplify_adjust_omp_clauses, gimplify_omp_parallel
	gimplify_omp_for, gimplify_omp_workshare, goa_lhs_expr_p
	gimplify_omp_atomic_fetch_op, goa_stabilize_expr
	gimplify_omp_atomic_pipeline, gimplify_omp_atomic_mutex
	gimplify_omp_atomic): New.
	(gimplify_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
	OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED,
	OMP_CRITICAL and OMP_ATOMIC.
	(gimplify_body): Verify gimplify_ctxp is empty after gimplification.

	* c-pragma.h (enum pragma_kind): Add
	PRAGMA_OMP_ATOMIC, PRAGMA_OMP_BARRIER,
	PRAGMA_OMP_CRITICAL, PRAGMA_OMP_FLUSH, PRAGMA_OMP_FOR,
	PRAGMA_OMP_MASTER, PRAGMA_OMP_ORDERED,
	PRAGMA_OMP_PARALLEL, PRAGMA_OMP_PARALLEL_FOR,
	PRAGMA_OMP_PARALLEL_SECTIONS, PRAGMA_OMP_SECTION,
	PRAGMA_OMP_SECTIONS, PRAGMA_OMP_SINGLE,
	PRAGMA_OMP_THREADPRIVATE.

	* tree.def (OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
	OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED,
	OMP_CRITICAL, OMP_ATOMIC, OMP_CLAUSE_PRIVATE,
	OMP_CLAUSE_SHARED, OMP_CLAUSE_FIRSTPRIVATE,
	OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_REDUCTION,
	OMP_CLAUSE_COPYIN, OMP_CLAUSE_COPYPRIVATE,
	OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS,
	OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_NOWAIT,
	OMP_CLAUSE_ORDERED, OMP_CLAUSE_DEFAULT): Define.

	* print-tree.c (print_node): Dump DECL_VALUE_EXPR.

	* tree-ssa-dce.c (find_control_dependence): Do not assume that
	ENTRY_BLOCK_PTR->next_bb == single_succ (ENTRY_BLOCK_PTR).

	* tree-nested.c (convert_call_expr): Call walk_body on OMP_BODY for
	OpenMP directives.
	(struct nesting_info): Add field_map,
	suppress_expansion, debug_var_chain.
	(create_nesting_tree): Initialize them.
	(lookup_field_for_decl): Use field_map.
	(get_nonlocal_debug_decl, get_local_debug_decl): New.
	(convert_local_omp_clauses): New.
	(finalize_nesting_tree_1): Add debug_var_chain to toplevel block.
	(walk_body): Split out of walk_function.
	(convert_nonlocal_omp_clauses, convert_local_omp_clauses): New.
	(convert_nonlocal_reference): Handle omp statements.
	(convert_local_reference): Likewise.
	(unnest_nesting_tree_1): Split out of finalize_nesting_tree_1.
	(unnest_nesting_tree): New.
	(lower_nested_functions): Call it.
	(insert_field_into_struct): Make extern.
	(struct walk_stmt_info): Move to tree-gimple.h.
	(walk_stmts): Make extern.

	* omp-builtins.def: New file.

	* tree-iterator.c (expr_only): Clarify comment.

	* c-common.h (pushdecl_top_level, pushdecl,
	build_modify_expr, build_indirect_ref,
	c_finish_omp_master, c_finish_omp_critical,
	c_finish_omp_ordered, c_finish_omp_barrier,
	c_finish_omp_atomic, c_finish_omp_flush,
	c_finish_omp_for, c_split_parallel_clauses,
	omp_clause_default_kind, c_omp_sharing_predetermined,
	c_omp_remap_decl): Declare.

	* Makefile.in (BUILTINS_DEF): Add omp-builtins.def.
	(OBJS-common): Add omp-low.o.
	(c-omp.o, omp-low.o): Add.
	(gimplify.o): Add dependency on $(OPTABS_H).
	(GTFILES): Add omp-low.c.
	(gt-stringpool.h): Add.

	* tree-cfg.c (set_bb_for_stmt): Do not update the
	block-to-labels map if we are currently expanding to RTL.
	(tree_node_can_be_shared): Remove unnecessary CONSTANT_CLASS_P
	checks.
	Handle IDENTIFIER_NODE.
	(tree_verify_flow_info): Do not ICE when emitting error
	messages about invalid labels.
	(dump_function_to_file): Reset CFUN before emitting the body
	of the function.
	(debug_function): New.

	* passes.c (init_optimization_passes): Schedule
	pass_lower_omp.

	* langhooks-def.h (lhd_omp_predetermined_sharing,
	lhd_omp_assignment, lhd_omp_firstprivatize_type_sizes):
	Declare.
	(LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define.
	(LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
	(LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE,
	LANG_HOOKS_OMP_PREDETERMINED_SHARING,
	LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR,
	LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE,
	LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR,
	LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
	LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP,
	LANG_HOOKS_OMP_CLAUSE_DTOR): Define.
	(LANG_HOOK_DECLS): Use them.


2006-01-18  Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
	    Richard Henderson  <rth@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* c-parser.c (pragma_omp_clause): Define.
	(c_parser_declaration_or_fndef): Document OpenMP syntax.
	(c_parser_compound_statement): Likewise.
	(c_parser_statement): Likewise.
	(c_parser_pragma): Handle omp pragmas.
	(OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
	OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK): Define.
	(c_parser_omp_clause_name, check_no_duplicate_clause,
	c_parser_omp_variable_list,
	c_parser_omp_var_list_parens, c_parser_omp_clause_copyin,
	c_parser_omp_clause_copyprivate,
	c_parser_omp_clause_default,
	c_parser_omp_clause_firstprivate, c_parser_omp_clause_if,
	c_parser_omp_clause_lastprivate,
	c_parser_omp_clause_nowait,
	c_parser_omp_clause_num_threads,
	c_parser_omp_clause_ordered, c_parser_omp_clause_private,
	c_parser_omp_clause_reduction,
	c_parser_omp_clause_schedule, c_parser_omp_clause_shared,
	c_parser_omp_all_clauses, c_parser_omp_structured_block,
	c_parser_omp_atomic, c_parser_omp_barrier,
	c_parser_omp_critical, c_parser_omp_flush,
	c_parser_omp_for_loop, c_parser_omp_for,
	c_parser_omp_master, c_parser_omp_ordered,
	c_parser_omp_sections_scope, c_parser_omp_sections,
	c_parser_omp_parallel, c_parser_omp_single,
	c_parser_omp_construct, c_parser_omp_threadprivate): New.
	* c-pragma.c (init_pragma): Do omp pragma registration here.
	* c.opt (fopenmp): New flag.


2006-01-18  Eric Christopher  <echristo@apple.com>

	* gcc.c (GOMP_SELF_SPECS): Bracket in #ifndef/#endif.
	* config/darwin.h (GOMP_SELF_SPECS): Define.


testsuite/

2006-01-18  Richard Henderson  <rth@redhat.com>
            Aldy Hernandez  <aldyh@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>
            Uros Bizjak  <uros@kss-loka.si>

	* testsuite/gcc.dg/gomp: New directory.

From-SVN: r109902
2006-01-18 14:21:25 -05:00