Commit Graph

159 Commits

Author SHA1 Message Date
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