summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-11 15:19:27 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-11 15:19:27 +0000
commit84e39114ef36f4f202028695936e3725b9a08474 (patch)
tree1b76344540036a57ec23806ad0e4e22b62c916c3 /libgomp
parentf778423557464b07c76cbf36e2032cccb94c02bc (diff)
downloadgcc-84e39114ef36f4f202028695936e3725b9a08474.tar.gz
2008-03-11 Basile Starynkevitch <basile@starynkevitch.net>
merged with trunk r133107 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@133113 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog21
-rw-r--r--libgomp/Makefile.in25
-rw-r--r--libgomp/aclocal.m42
-rw-r--r--libgomp/config.h.in13
-rw-r--r--libgomp/configure.ac1
-rw-r--r--libgomp/env.c13
-rw-r--r--libgomp/testsuite/Makefile.in5
-rw-r--r--libgomp/testsuite/libgomp.c/atomic-3.c50
-rw-r--r--libgomp/testsuite/libgomp.fortran/fortran.exp2
9 files changed, 106 insertions, 26 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 44286ca469f..84c70491ece 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,24 @@
+2008-03-06 Jakub Jelinek <jakub@redhat.com>
+
+ * testsuite/libgomp.c/atomic-3.c: New test.
+
+2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/33197
+ * testsuite/libgomp.fortran/fortran.exp: Add .f08 and
+ .F08 file suffixes.
+
+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.
+
2008-02-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/35196
diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in
index 6ba3dcc9a28..21eb046ceb4 100644
--- a/libgomp/Makefile.in
+++ b/libgomp/Makefile.in
@@ -52,11 +52,11 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/enable.m4 \
+ $(top_srcdir)/../config/futex.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/stdint.m4 \
- $(top_srcdir)/../config/tls.m4 \
- $(top_srcdir)/../config/futex.m4 $(top_srcdir)/../ltoptions.m4 \
+ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/../ltoptions.m4 \
$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
@@ -217,9 +217,12 @@ USE_FORTRAN_TRUE = @USE_FORTRAN_TRUE@
VERSION = @VERSION@
XCFLAGS = @XCFLAGS@
XLDFLAGS = @XLDFLAGS@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_FC = @ac_ct_FC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
@@ -235,9 +238,6 @@ build_os = @build_os@
build_vendor = @build_vendor@
config_path = @config_path@
datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
@@ -246,7 +246,6 @@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
-htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
@@ -254,17 +253,14 @@ libdir = @libdir@
libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@
link_gomp = @link_gomp@
-localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
multi_basedir = @multi_basedir@
oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
-psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -545,13 +541,10 @@ dist-info: $(INFO_DEPS)
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
if test -f $$base; then d=.; else d=$(srcdir); fi; \
- base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
- for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
- if test -f $$file; then \
- relfile=`expr "$$file" : "$$d/\(.*\)"`; \
- test -f $(distdir)/$$relfile || \
- cp -p $$file $(distdir)/$$relfile; \
- else :; fi; \
+ for file in $$d/$$base*; do \
+ relfile=`expr "$$file" : "$$d/\(.*\)"`; \
+ test -f $(distdir)/$$relfile || \
+ cp -p $$file $(distdir)/$$relfile; \
done; \
done
diff --git a/libgomp/aclocal.m4 b/libgomp/aclocal.m4
index 1746f255949..eee6ec06b28 100644
--- a/libgomp/aclocal.m4
+++ b/libgomp/aclocal.m4
@@ -859,11 +859,11 @@ AC_SUBST([am__untar])
m4_include([../config/acx.m4])
m4_include([../config/depstand.m4])
m4_include([../config/enable.m4])
+m4_include([../config/futex.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/multi.m4])
m4_include([../config/stdint.m4])
m4_include([../config/tls.m4])
-m4_include([../config/futex.m4])
m4_include([../ltoptions.m4])
m4_include([../ltsugar.m4])
m4_include([../ltversion.m4])
diff --git a/libgomp/config.h.in b/libgomp/config.h.in
index b21360ab386..eed8a8837af 100644
--- a/libgomp/config.h.in
+++ b/libgomp/config.h.in
@@ -91,24 +91,27 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* The size of `char', as computed by sizeof. */
+/* The size of a `char', as computed by sizeof. */
#undef SIZEOF_CHAR
-/* The size of `int', as computed by sizeof. */
+/* The size of a `int', as computed by sizeof. */
#undef SIZEOF_INT
-/* The size of `long', as computed by sizeof. */
+/* The size of a `long', as computed by sizeof. */
#undef SIZEOF_LONG
-/* The size of `short', as computed by sizeof. */
+/* The size of a `short', as computed by sizeof. */
#undef SIZEOF_SHORT
-/* The size of `void *', as computed by sizeof. */
+/* The size of a `void *', as computed by sizeof. */
#undef SIZEOF_VOID_P
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* Define if you can safely include both <string.h> and <strings.h>. */
+#undef STRING_WITH_STRINGS
+
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
diff --git a/libgomp/configure.ac b/libgomp/configure.ac
index 0cda749d593..47c61bea625 100644
--- a/libgomp/configure.ac
+++ b/libgomp/configure.ac
@@ -153,6 +153,7 @@ AC_SUBST(libtool_VERSION)
# Check header files.
AC_STDC_HEADERS
AC_HEADER_TIME
+ACX_HEADER_STRING
AC_CHECK_HEADERS(unistd.h semaphore.h sys/loadavg.h sys/time.h)
GCC_HEADER_STDINT(gstdint.h)
diff --git a/libgomp/env.c b/libgomp/env.c
index 4a07bfa4975..6c6a35228eb 100644
--- a/libgomp/env.c
+++ b/libgomp/env.c
@@ -32,7 +32,18 @@
#include "libgomp_f.h"
#include <ctype.h>
#include <stdlib.h>
-#include <string.h>
+#ifdef STRING_WITH_STRINGS
+# include <string.h>
+# include <strings.h>
+#else
+# ifdef HAVE_STRING_H
+# include <string.h>
+# else
+# ifdef HAVE_STRINGS_H
+# include <strings.h>
+# endif
+# endif
+#endif
#include <limits.h>
#include <errno.h>
diff --git a/libgomp/testsuite/Makefile.in b/libgomp/testsuite/Makefile.in
index fa3cba6f8f2..aaf23dcbc6d 100644
--- a/libgomp/testsuite/Makefile.in
+++ b/libgomp/testsuite/Makefile.in
@@ -42,13 +42,14 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/enable.m4 \
+ $(top_srcdir)/../config/futex.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/stdint.m4 \
$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../ltoptions.m4 \
$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
diff --git a/libgomp/testsuite/libgomp.c/atomic-3.c b/libgomp/testsuite/libgomp.c/atomic-3.c
new file mode 100644
index 00000000000..5b8fdc1a79e
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/atomic-3.c
@@ -0,0 +1,50 @@
+/* { dg-do run } */
+/* { dg-options "-fopenmp -O0" } */
+
+#include <omp.h>
+#include <stdlib.h>
+
+short e[64];
+int g;
+_Complex double d, f;
+int num_threads;
+
+__attribute__((noinline)) void
+foo (int x, long long y)
+{
+#pragma omp parallel num_threads (4)
+ {
+ int i;
+ #pragma omp barrier
+ for (i = 0; i < 2400; i++)
+ {
+ if (i == 0)
+ num_threads = omp_get_num_threads ();
+ #pragma omp atomic
+ e[0] += x;
+ #pragma omp atomic
+ e[16] += x;
+ #pragma omp atomic
+ g += y;
+ #pragma omp atomic
+ __real__ d += x;
+ #pragma omp atomic
+ __imag__ f += x;
+ }
+ }
+}
+
+int
+main (void)
+{
+ int i;
+ foo (3, 3LL);
+ if (g != 3 * 2400 * num_threads
+ || __real__ d != g || __imag__ d != 0
+ || __real__ f != 0 || __imag__ f != g)
+ abort ();
+ for (i = 0; i < 64; i++)
+ if (e[i] != ((i && i != 16) ? 0 : g))
+ abort ();
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.fortran/fortran.exp b/libgomp/testsuite/libgomp.fortran/fortran.exp
index ec0f878c821..b7d6b1072e7 100644
--- a/libgomp/testsuite/libgomp.fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.fortran/fortran.exp
@@ -10,7 +10,7 @@ dg-init
if [file exists "${blddir}/${lang_test_file}"] {
# Gather a list of all tests.
- set tests [lsort [find $srcdir/$subdir *.\[fF\]{,90,95,03}]]
+ set tests [lsort [find $srcdir/$subdir *.\[fF\]{,90,95,03,08}]]
set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}"
set_ld_library_path_env_vars