aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2009-06-19 22:51:53 +0000
committerIan Lance Taylor <iant@google.com>2009-06-19 22:51:53 +0000
commita95a8cc6278e38e77d7b8202837740eb5134763e (patch)
treee74b706b8a45b69f7ec64e3409e65fa9293887d6
parent7e62919fabb0e4816e4377ada3e9b9ee369c331b (diff)
Merge from trunk revision 148566.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-in-cxx@148733 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libffi/ChangeLog30
-rwxr-xr-xlibffi/configure27
-rw-r--r--libffi/configure.ac2
-rw-r--r--libffi/src/powerpc/ffi.c13
-rw-r--r--libffi/src/powerpc/sysv.S35
-rw-r--r--libffi/testsuite/lib/libffi-dg.exp7
-rw-r--r--libffi/testsuite/libffi.call/cls_align_sint64.c6
-rw-r--r--libffi/testsuite/libffi.call/cls_align_uint64.c6
-rw-r--r--libffi/testsuite/libffi.call/cls_longdouble_va.c4
-rw-r--r--libffi/testsuite/libffi.call/cls_ulonglong.c6
-rw-r--r--libffi/testsuite/libffi.call/ffitest.h9
-rw-r--r--libffi/testsuite/libffi.call/return_ll1.c2
-rw-r--r--libffi/testsuite/libffi.call/stret_medium2.c6
-rw-r--r--libffi/testsuite/libffi.special/ffitestcxx.h10
-rw-r--r--libiberty/ChangeLog6
-rw-r--r--libiberty/testsuite/test-demangle.c10
-rw-r--r--libjava/classpath/ChangeLog.gcj10
-rw-r--r--libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.classbin80179 -> 79930 bytes
-rw-r--r--libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main.classbin29564 -> 29338 bytes
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.java15
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/gjdoc/Main.java11
-rw-r--r--libstdc++-v3/ChangeLog13
-rw-r--r--libstdc++-v3/include/std/thread4
-rw-r--r--libstdc++-v3/libsupc++/exception_ptr.h12
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/move.cc45
25 files changed, 202 insertions, 87 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 8d1f66dc791..b08b72720cc 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,33 @@
+2009-06-16 Wim Lewis <wiml@hhhh.org>
+
+ * src/powerpc/ffi.c: Avoid clobbering cr3 and cr4, which are
+ supposed to be callee-saved.
+ * src/powerpc/sysv.S (small_struct_return_value): Fix overrun of
+ return buffer for odd-size structs.
+
+2009-06-16 Andreas Tobler <a.tobler@schweiz.org>
+
+ PR libffi/40444
+ * testsuite/lib/libffi-dg.exp (libffi_target_compile): Add
+ allow_stack_execute for Darwin.
+
+2009-06-16 Andrew Haley <aph@redhat.com>
+
+ * configure.ac (TARGETDIR): Add missing blank lines.
+ * configure: Regenerate.
+
+2009-06-16 Andrew Haley <aph@redhat.com>
+
+ * testsuite/libffi.call/cls_align_sint64.c,
+ testsuite/libffi.call/cls_align_uint64.c,
+ testsuite/libffi.call/cls_longdouble_va.c,
+ testsuite/libffi.call/cls_ulonglong.c,
+ testsuite/libffi.call/return_ll1.c,
+ testsuite/libffi.call/stret_medium2.c: Fix printf format
+ specifiers.
+ * testsuite/libffi.call/ffitest.h,
+ testsuite/libffi.special/ffitestcxx.h (PRIdLL, PRIuLL): Define.
+
2009-06-15 Andrew Haley <aph@redhat.com>
* testsuite/libffi.call/err_bad_typedef.c: xfail everywhere.
diff --git a/libffi/configure b/libffi/configure
index 05d3fab618e..f8665f73163 100755
--- a/libffi/configure
+++ b/libffi/configure
@@ -459,7 +459,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CFLAGS CCAS CCASFLAGS LIBTOOL SED EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S OBJDUMP ac_ct_OBJDUMP AR ac_ct_AR RANLIB ac_ct_RANLIB lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 CPP CPPFLAGS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT TESTSUBDIR_TRUE TESTSUBDIR_FALSE AM_RUNTESTFLAGS MIPS_TRUE MIPS_FALSE SPARC_TRUE SPARC_FALSE X86_TRUE X86_FALSE X86_FREEBSD_TRUE X86_FREEBSD_FALSE X86_WIN32_TRUE X86_WIN32_FALSE X86_DARWIN_TRUE X86_DARWIN_FALSE ALPHA_TRUE ALPHA_FALSE IA64_TRUE IA64_FALSE M32R_TRUE M32R_FALSE M68K_TRUE M68K_FALSE POWERPC_TRUE POWERPC_FALSE POWERPC_AIX_TRUE POWERPC_AIX_FALSE POWERPC_DARWIN_TRUE POWERPC_DARWIN_FALSE POWERPC_FREEBSD_TRUE POWERPC_FREEBSD_FALSE ARM_TRUE ARM_FALSE LIBFFI_CRIS_TRUE LIBFFI_CRIS_FALSE FRV_TRUE FRV_FALSE S390_TRUE S390_FALSE X86_64_TRUE X86_64_FALSE SH_TRUE SH_FALSE SH64_TRUE SH64_FALSE PA_LINUX_TRUE PA_LINUX_FALSE PA_HPUX_TRUE PA_HPUX_FALSE PA64_HPUX_TRUE PA64_HPUX_FALSE ALLOCA HAVE_LONG_DOUBLE TARGET TARGETDIR toolexecdir toolexeclibdir LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CFLAGS CCAS CCASFLAGS LIBTOOL SED EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S OBJDUMP ac_ct_OBJDUMP AR ac_ct_AR RANLIB ac_ct_RANLIB lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 CPP CPPFLAGS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT TESTSUBDIR_TRUE TESTSUBDIR_FALSE AM_RUNTESTFLAGS MIPS_TRUE MIPS_FALSE SPARC_TRUE SPARC_FALSE X86_TRUE X86_FALSE X86_FREEBSD_TRUE X86_FREEBSD_FALSE X86_WIN32_TRUE X86_WIN32_FALSE X86_WIN64_TRUE X86_WIN64_FALSE X86_DARWIN_TRUE X86_DARWIN_FALSE ALPHA_TRUE ALPHA_FALSE IA64_TRUE IA64_FALSE M32R_TRUE M32R_FALSE M68K_TRUE M68K_FALSE POWERPC_TRUE POWERPC_FALSE POWERPC_AIX_TRUE POWERPC_AIX_FALSE POWERPC_DARWIN_TRUE POWERPC_DARWIN_FALSE POWERPC_FREEBSD_TRUE POWERPC_FREEBSD_FALSE ARM_TRUE ARM_FALSE LIBFFI_CRIS_TRUE LIBFFI_CRIS_FALSE FRV_TRUE FRV_FALSE S390_TRUE S390_FALSE X86_64_TRUE X86_64_FALSE SH_TRUE SH_FALSE SH64_TRUE SH64_FALSE PA_LINUX_TRUE PA_LINUX_FALSE PA_HPUX_TRUE PA_HPUX_FALSE PA64_HPUX_TRUE PA64_HPUX_FALSE ALLOCA HAVE_LONG_DOUBLE TARGET TARGETDIR toolexecdir toolexeclibdir LIBOBJS LTLIBOBJS'
ac_subst_files=''
ac_pwd=`pwd`
@@ -11107,8 +11107,11 @@ case "$host" in
x86_64-*-darwin*)
TARGET=X86_DARWIN; TARGETDIR=x86
;;
+
x86_64-*-cygwin* | x86_64-*-mingw*)
+ TARGET=X86_WIN64; TARGETDIR=x86
;;
+
x86_64-*-*)
TARGET=X86_64; TARGETDIR=x86
;;
@@ -11174,6 +11177,16 @@ fi
+if test x$TARGET = xX86_WIN64; then
+ X86_WIN64_TRUE=
+ X86_WIN64_FALSE='#'
+else
+ X86_WIN64_TRUE='#'
+ X86_WIN64_FALSE=
+fi
+
+
+
if test x$TARGET = xX86_DARWIN; then
X86_DARWIN_TRUE=
X86_DARWIN_FALSE='#'
@@ -13618,6 +13631,13 @@ echo "$as_me: error: conditional \"X86_WIN32\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${X86_WIN64_TRUE}" && test -z "${X86_WIN64_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"X86_WIN64\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"X86_WIN64\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${X86_DARWIN_TRUE}" && test -z "${X86_DARWIN_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"X86_DARWIN\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -14198,6 +14218,9 @@ ac_configure_args="${multilib_arg} ${ac_configure_args}"
multi_basedir="$multi_basedir"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
CC="$CC"
+CXX="$CXX"
+GFORTRAN="$GFORTRAN"
+GCJ="$GCJ"
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
@@ -14659,6 +14682,8 @@ s,@X86_FREEBSD_TRUE@,$X86_FREEBSD_TRUE,;t t
s,@X86_FREEBSD_FALSE@,$X86_FREEBSD_FALSE,;t t
s,@X86_WIN32_TRUE@,$X86_WIN32_TRUE,;t t
s,@X86_WIN32_FALSE@,$X86_WIN32_FALSE,;t t
+s,@X86_WIN64_TRUE@,$X86_WIN64_TRUE,;t t
+s,@X86_WIN64_FALSE@,$X86_WIN64_FALSE,;t t
s,@X86_DARWIN_TRUE@,$X86_DARWIN_TRUE,;t t
s,@X86_DARWIN_FALSE@,$X86_DARWIN_FALSE,;t t
s,@ALPHA_TRUE@,$ALPHA_TRUE,;t t
diff --git a/libffi/configure.ac b/libffi/configure.ac
index fe3a5fb075a..2ab5902746e 100644
--- a/libffi/configure.ac
+++ b/libffi/configure.ac
@@ -145,9 +145,11 @@ case "$host" in
x86_64-*-darwin*)
TARGET=X86_DARWIN; TARGETDIR=x86
;;
+
x86_64-*-cygwin* | x86_64-*-mingw*)
TARGET=X86_WIN64; TARGETDIR=x86
;;
+
x86_64-*-*)
TARGET=X86_64; TARGETDIR=x86
;;
diff --git a/libffi/src/powerpc/ffi.c b/libffi/src/powerpc/ffi.c
index a0426f46750..fbbfbe2e2ea 100644
--- a/libffi/src/powerpc/ffi.c
+++ b/libffi/src/powerpc/ffi.c
@@ -43,11 +43,12 @@ enum {
FLAG_RETURNS_64BITS = 1 << (31-28),
FLAG_RETURNS_128BITS = 1 << (31-27), /* cr6 */
-
- FLAG_SYSV_SMST_R4 = 1 << (31-16), /* cr4, use r4 for FFI_SYSV 8 byte
+ FLAG_SYSV_SMST_R4 = 1 << (31-26), /* use r4 for FFI_SYSV 8 byte
structs. */
- FLAG_SYSV_SMST_R3 = 1 << (31-15), /* cr3, use r3 for FFI_SYSV 4 byte
+ FLAG_SYSV_SMST_R3 = 1 << (31-25), /* use r3 for FFI_SYSV 4 byte
structs. */
+ /* Bits (31-24) through (31-19) store shift value for SMST */
+
FLAG_ARG_NEEDS_COPY = 1 << (31- 7),
FLAG_FP_ARGUMENTS = 1 << (31- 6), /* cr1.eq; specified by ABI */
FLAG_4_GPR_ARGUMENTS = 1 << (31- 5),
@@ -685,14 +686,14 @@ ffi_prep_cif_machdep (ffi_cif *cif)
if (size <= 4)
{
flags |= FLAG_SYSV_SMST_R3;
- flags |= 8 * (4 - size) << 4;
+ flags |= 8 * (4 - size) << 8;
break;
}
/* These structs are returned in r3 and r4. See above. */
if (size <= 8)
{
- flags |= FLAG_SYSV_SMST_R4;
- flags |= 8 * (8 - size) << 4;
+ flags |= FLAG_SYSV_SMST_R3 | FLAG_SYSV_SMST_R4;
+ flags |= 8 * (8 - size) << 8;
break;
}
}
diff --git a/libffi/src/powerpc/sysv.S b/libffi/src/powerpc/sysv.S
index c06311fd591..96ea22b0b40 100644
--- a/libffi/src/powerpc/sysv.S
+++ b/libffi/src/powerpc/sysv.S
@@ -136,29 +136,18 @@ L(float_return_value):
b L(done_return_value)
L(small_struct_return_value):
- mtcrf 0x10,%r31 /* cr3 */
- bt- 15,L(smst_one_register)
- mtcrf 0x08,%r31 /* cr4 */
- bt- 16,L(smst_two_register)
- b L(done_return_value)
-
-L(smst_one_register):
- rlwinm %r5,%r31,5+23,32-5,31 /* Extract the value to shift. */
- slw %r3,%r3,%r5
- stw %r3,0(%r30)
- b L(done_return_value)
-L(smst_two_register):
- rlwinm %r5,%r31,5+23,32-5,31 /* Extract the value to shift. */
- cmpwi %r5,0
- subfic %r9,%r5,32
- slw %r29,%r3,%r5
- srw %r9,%r4,%r9
- beq- L(smst_8byte)
- or %r3,%r9,%r29
- slw %r4,%r4,%r5
-L(smst_8byte):
- stw %r3,0(%r30)
- stw %r4,4(%r30)
+ extrwi %r6,%r31,2,19 /* number of bytes padding = shift/8 */
+ mtcrf 0x02,%r31 /* copy flags to cr[24:27] (cr6) */
+ extrwi %r5,%r31,5,19 /* r5 <- number of bits of padding */
+ subfic %r6,%r6,4 /* r6 <- number of useful bytes in r3 */
+ bf- 25,L(done_return_value) /* struct in r3 ? if not, done. */
+/* smst_one_register: */
+ slw %r3,%r3,%r5 /* Left-justify value in r3 */
+ mtxer %r6 /* move byte count to XER ... */
+ stswx %r3,0,%r30 /* ... and store that many bytes */
+ bf+ 26,L(done_return_value) /* struct in r3:r4 ? */
+ add %r6,%r6,%r30 /* adjust pointer */
+ stswi %r4,%r6,4 /* store last four bytes */
b L(done_return_value)
.LFE1:
diff --git a/libffi/testsuite/lib/libffi-dg.exp b/libffi/testsuite/lib/libffi-dg.exp
index 5ec6c4dc76b..8db38c286a8 100644
--- a/libffi/testsuite/lib/libffi-dg.exp
+++ b/libffi/testsuite/lib/libffi-dg.exp
@@ -187,6 +187,13 @@ proc libffi_target_compile { source dest type options } {
lappend options "additional_flags=-I${libffi_include} -I${srcdir}/../include -I${libffi_include}/.."
lappend options "additional_flags=${libffi_link_flags}"
+ # Darwin needs a stack execution allowed flag.
+
+ if { [istarget "*-*-darwin9*"] || [istarget "*-*-darwin1*"]
+ || [istarget "*-*-darwin2*"] } {
+ lappend options "additional_flags=-Wl,-allow_stack_execute"
+ }
+
# If you're building the compiler with --prefix set to a place
# where it's not yet installed, then the linker won't be able to
# find the libgcc used by libffi.dylib. We could pass the
diff --git a/libffi/testsuite/libffi.call/cls_align_sint64.c b/libffi/testsuite/libffi.call/cls_align_sint64.c
index d8b73e95783..2b15c983886 100644
--- a/libffi/testsuite/libffi.call/cls_align_sint64.c
+++ b/libffi/testsuite/libffi.call/cls_align_sint64.c
@@ -22,7 +22,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
- printf("%d %lld %d %d %lld %d: %d %lld %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c);
+ printf("%d %" PRIdLL " %d %d %" PRIdLL " %d: %d %" PRIdLL " %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c);
return result;
}
@@ -77,14 +77,14 @@ int main (void)
ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
/* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */
- printf("res: %d %lld %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
+ printf("res: %d %" PRIdLL " %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */
- printf("res: %d %lld %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
+ printf("res: %d %" PRIdLL " %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
exit(0);
diff --git a/libffi/testsuite/libffi.call/cls_align_uint64.c b/libffi/testsuite/libffi.call/cls_align_uint64.c
index a3886f48962..215584f60a4 100644
--- a/libffi/testsuite/libffi.call/cls_align_uint64.c
+++ b/libffi/testsuite/libffi.call/cls_align_uint64.c
@@ -23,7 +23,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
- printf("%d %llu %d %d %llu %d: %d %llu %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c);
+ printf("%d %" PRIdLL " %d %d %" PRIdLL " %d: %d %" PRIdLL " %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c);
return result;
}
@@ -78,14 +78,14 @@ int main (void)
ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
/* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */
- printf("res: %d %llu %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
+ printf("res: %d %" PRIdLL " %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */
- printf("res: %d %llu %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
+ printf("res: %d %" PRIdLL " %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
exit(0);
diff --git a/libffi/testsuite/libffi.call/cls_longdouble_va.c b/libffi/testsuite/libffi.call/cls_longdouble_va.c
index 0e910d5bd37..3d725bd731a 100644
--- a/libffi/testsuite/libffi.call/cls_longdouble_va.c
+++ b/libffi/testsuite/libffi.call/cls_longdouble_va.c
@@ -42,9 +42,9 @@ int main (void)
args[2] = NULL;
ffi_call(&cif, FFI_FN(printf), &res, args);
- // { dg-output "7.0" { xfail i*86-*-linux-* x86_64-*-linux-* sh*-*-linux-* } }
+ // { dg-output "7.0" { xfail i*86-*-linux-* x86_64-*-linux-* } }
printf("res: %d\n", (int) res);
- // { dg-output "\nres: 4" { xfail i*86-*-linux-* x86_64-*-linux-* sh*-*-linux-* } }
+ // { dg-output "\nres: 4" { xfail i*86-*-linux-* x86_64-*-linux-* } }
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_longdouble_va_fn, NULL, code) == FFI_OK);
diff --git a/libffi/testsuite/libffi.call/cls_ulonglong.c b/libffi/testsuite/libffi.call/cls_ulonglong.c
index ed891e35a2b..c3cf0d6ec01 100644
--- a/libffi/testsuite/libffi.call/cls_ulonglong.c
+++ b/libffi/testsuite/libffi.call/cls_ulonglong.c
@@ -12,7 +12,7 @@ static void cls_ret_ulonglong_fn(ffi_cif* cif __UNUSED__, void* resp,
{
*(unsigned long long *)resp= *(unsigned long long *)args[0];
- printf("%llu: %llu\n",*(unsigned long long *)args[0],
+ printf("%" PRIuLL ": %" PRIuLL "\n",*(unsigned long long *)args[0],
*(unsigned long long *)(resp));
}
typedef unsigned long long (*cls_ret_ulonglong)(unsigned long long);
@@ -34,12 +34,12 @@ int main (void)
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_ret_ulonglong_fn, NULL, code) == FFI_OK);
res = (*((cls_ret_ulonglong)code))(214LL);
/* { dg-output "214: 214" } */
- printf("res: %llu\n", res);
+ printf("res: %" PRIdLL "\n", res);
/* { dg-output "\nres: 214" } */
res = (*((cls_ret_ulonglong)code))(9223372035854775808LL);
/* { dg-output "\n9223372035854775808: 9223372035854775808" } */
- printf("res: %llu\n", res);
+ printf("res: %" PRIdLL "\n", res);
/* { dg-output "\nres: 9223372035854775808" } */
exit(0);
diff --git a/libffi/testsuite/libffi.call/ffitest.h b/libffi/testsuite/libffi.call/ffitest.h
index 8a437e46b82..c7cb76cb3b5 100644
--- a/libffi/testsuite/libffi.call/ffitest.h
+++ b/libffi/testsuite/libffi.call/ffitest.h
@@ -45,6 +45,15 @@
#endif
+/* MinGW kludge. */
+#ifdef WIN64
+#define PRIdLL "PRId64"
+#define PRIuLL "PRIu64"
+#else
+#define PRIdLL "lld"
+#define PRIuLL "llu"
+#endif
+
#ifdef USING_MMAP
static inline void *
allocate_mmap (size_t size)
diff --git a/libffi/testsuite/libffi.call/return_ll1.c b/libffi/testsuite/libffi.call/return_ll1.c
index 5681d84b407..dad90c17ff3 100644
--- a/libffi/testsuite/libffi.call/return_ll1.c
+++ b/libffi/testsuite/libffi.call/return_ll1.c
@@ -36,7 +36,7 @@ int main (void)
ll2 = 11111111;
ffi_call(&cif, FFI_FN(return_ll), &rlonglong, values);
- printf("res: %lld, %lld\n", rlonglong, ll0 + ll1 + ll2);
+ printf("res: %" PRIdLL ", %" PRIdLL "\n", rlonglong, ll0 + ll1 + ll2);
/* { dg-output "res: 11111133333222, 11111133333222" } */
exit(0);
}
diff --git a/libffi/testsuite/libffi.call/stret_medium2.c b/libffi/testsuite/libffi.call/stret_medium2.c
index 43703b21dd5..a012f9e6813 100644
--- a/libffi/testsuite/libffi.call/stret_medium2.c
+++ b/libffi/testsuite/libffi.call/stret_medium2.c
@@ -39,7 +39,7 @@ struct_72byte cls_struct_72byte_fn(
result.h = b0.h + b1.h + b2.h + b3.h;
result.i = b0.i + b1.i + b2.i + b3.i;
- printf("%g %g %g %g %g %g %g %g %lld\n", result.a, result.b, result.c,
+ printf("%g %g %g %g %g %g %g %g %" PRIdLL "\n", result.a, result.b, result.c,
result.d, result.e, result.f, result.g, result.h, result.i);
return result;
@@ -107,7 +107,7 @@ int main (void)
ffi_call(&cif, FFI_FN(cls_struct_72byte_fn), &res_dbl, args_dbl);
/* { dg-output "22 15 17 25 6 13 19 18 16" } */
- printf("res: %g %g %g %g %g %g %g %g %lld\n", res_dbl.a, res_dbl.b, res_dbl.c,
+ printf("res: %g %g %g %g %g %g %g %g %" PRIdLL "\n", res_dbl.a, res_dbl.b, res_dbl.c,
res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g, res_dbl.h, res_dbl.i);
/* { dg-output "\nres: 22 15 17 25 6 13 19 18 16" } */
@@ -116,7 +116,7 @@ int main (void)
res_dbl = ((struct_72byte(*)(struct_72byte, struct_72byte,
struct_72byte, struct_72byte))(code))(e_dbl, f_dbl, g_dbl, h_dbl);
/* { dg-output "\n22 15 17 25 6 13 19 18 16" } */
- printf("res: %g %g %g %g %g %g %g %g %lld\n", res_dbl.a, res_dbl.b, res_dbl.c,
+ printf("res: %g %g %g %g %g %g %g %g %" PRIdLL "\n", res_dbl.a, res_dbl.b, res_dbl.c,
res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g, res_dbl.h, res_dbl.i);
/* { dg-output "\nres: 22 15 17 25 6 13 19 18 16" } */
diff --git a/libffi/testsuite/libffi.special/ffitestcxx.h b/libffi/testsuite/libffi.special/ffitestcxx.h
index b9f0d48761f..92fb6568017 100644
--- a/libffi/testsuite/libffi.special/ffitestcxx.h
+++ b/libffi/testsuite/libffi.special/ffitestcxx.h
@@ -43,6 +43,16 @@
#endif
+
+/* MinGW kludge. */
+#ifdef WIN64
+#define PRIdLL "PRId64"
+#define PRIuLL "PRIu64"
+#else
+#define PRIdLL "lld"
+#define PRIuLL "llu"
+#endif
+
#ifdef USING_MMAP
static inline void *
allocate_mmap (size_t size)
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 69d3617d6e8..f5ac7832942 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-16 Nick Clifton <nickc@redhat.com>
+
+ PR 10197
+ * testsuite/test-demangle.c: Rename getline to get_line to avoid
+ conflicts with system function of the same name.
+
2009-05-30 Eli Zaretskii <eliz@gnu.org>
* snprintf.c: Doc fix.
diff --git a/libiberty/testsuite/test-demangle.c b/libiberty/testsuite/test-demangle.c
index 12b07dd6476..1c982d6ef20 100644
--- a/libiberty/testsuite/test-demangle.c
+++ b/libiberty/testsuite/test-demangle.c
@@ -46,7 +46,7 @@ static unsigned int lineno;
#define LINELEN 80
static void
-getline(buf)
+get_line(buf)
struct line *buf;
{
char *data = buf->data;
@@ -196,12 +196,12 @@ main(argc, argv)
{
const char *inp;
- getline (&format);
+ get_line (&format);
if (feof (stdin))
break;
- getline (&input);
- getline (&expect);
+ get_line (&input);
+ get_line (&expect);
inp = protect_end (input.data);
@@ -322,7 +322,7 @@ main(argc, argv)
if (no_params)
{
- getline (&expect);
+ get_line (&expect);
result = cplus_demangle (inp, DMGL_ANSI|DMGL_TYPES);
if (result
diff --git a/libjava/classpath/ChangeLog.gcj b/libjava/classpath/ChangeLog.gcj
index e4d7c2fae3c..6398644ad7d 100644
--- a/libjava/classpath/ChangeLog.gcj
+++ b/libjava/classpath/ChangeLog.gcj
@@ -1,3 +1,13 @@
+2009-06-16 Matthias Klose <doko@ubuntu.com>
+
+ * tools/gnu/classpath/tools/gjdoc/Main.java (getGjdocVersion): Use
+ gnu.classpath.Configuration.CLASSPATH_VERSION as version number.
+ * tools/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.java
+ (getDocletVersion): Likewise.
+ * tools/classes/gnu/classpath/tools/gjdoc/Main*.class: Regenerate.
+ * tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet*.class:
+ Regenerate.
+
2009-03-16 Matthias Klose <doko@ubuntu.com>
* configure.ac: Detect xulrunner-1.9.
diff --git a/libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.class b/libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.class
index 6e9981b5ee7..e76e4ad0885 100644
--- a/libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.class
+++ b/libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.class
Binary files differ
diff --git a/libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main.class b/libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main.class
index 1ce24d1d49c..e53a62553b3 100644
--- a/libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main.class
+++ b/libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main.class
Binary files differ
diff --git a/libjava/classpath/tools/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.java b/libjava/classpath/tools/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.java
index 837333ddf0f..e49e1c57341 100644
--- a/libjava/classpath/tools/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.java
+++ b/libjava/classpath/tools/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.java
@@ -3736,20 +3736,7 @@ public class HtmlDoclet
protected String getDocletVersion()
{
if (null == docletVersion) {
- try {
- Properties versionProperties = new Properties();
- InputStream in = getClass().getResourceAsStream("/version.properties");
- if (in == null) {
- in = new FileInputStream("src/resources/version.properties");
- }
- versionProperties.load(in);
- docletVersion = versionProperties.getProperty("gjdoc.version");
- }
- catch (IOException ignore) {
- }
- if (null == docletVersion) {
- docletVersion = "unknown";
- }
+ docletVersion = gnu.classpath.Configuration.CLASSPATH_VERSION;
}
return docletVersion;
}
diff --git a/libjava/classpath/tools/gnu/classpath/tools/gjdoc/Main.java b/libjava/classpath/tools/gnu/classpath/tools/gjdoc/Main.java
index d1316b34183..cbbc8f4f7dd 100644
--- a/libjava/classpath/tools/gnu/classpath/tools/gjdoc/Main.java
+++ b/libjava/classpath/tools/gnu/classpath/tools/gjdoc/Main.java
@@ -1825,16 +1825,7 @@ public final class Main
public String getGjdocVersion()
{
if (null == gjdocVersion) {
- try {
- Properties versionProperties = new Properties();
- versionProperties.load(getClass().getResourceAsStream("version.properties"));
- gjdocVersion = versionProperties.getProperty("gjdoc.version");
- }
- catch (IOException ignore) {
- }
- if (null == gjdocVersion) {
- gjdocVersion = "unknown";
- }
+ gjdocVersion = gnu.classpath.Configuration.CLASSPATH_VERSION;
}
return gjdocVersion;
}
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 2ca72ea84fa..03c011072c1 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,16 @@
+2009-06-16 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * libsupc++/exception_ptr.h (exception_ptr::swap(exception_ptr&&)):
+ Remove.
+ (exception_ptr::operator=(exception_ptr&&)): Cast source to
+ rvalue-reference so that move constructor is called.
+ * testsuite/18_support/exception_ptr/move.cc: New.
+
+2009-06-16 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/std/thread (~thread(), operator=(thread&&)): Call terminate
+ if joinable.
+
2009-06-15 Tom Tromey <tromey@redhat.com>
* python/libstdcxx/v6/printers.py (StdMapPrinter.__init__): Don't
diff --git a/libstdc++-v3/include/std/thread b/libstdc++-v3/include/std/thread
index fbdfe2ee53f..bf282cc0365 100644
--- a/libstdc++-v3/include/std/thread
+++ b/libstdc++-v3/include/std/thread
@@ -135,7 +135,7 @@ namespace std
~thread()
{
if (joinable())
- detach();
+ std::terminate();
}
thread& operator=(const thread&) = delete;
@@ -143,7 +143,7 @@ namespace std
thread& operator=(thread&& __t)
{
if (joinable())
- detach();
+ std::terminate();
swap(__t);
return *this;
}
diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h
index 37f3132d7ae..23477c9c3a6 100644
--- a/libstdc++-v3/libsupc++/exception_ptr.h
+++ b/libstdc++-v3/libsupc++/exception_ptr.h
@@ -123,7 +123,7 @@ namespace std
exception_ptr&
operator=(exception_ptr&& __o) throw()
{
- exception_ptr(__o).swap(*this);
+ exception_ptr(static_cast<exception_ptr&&>(__o)).swap(*this);
return *this;
}
#endif
@@ -133,16 +133,6 @@ namespace std
void
swap(exception_ptr&) throw();
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- void
- swap(exception_ptr &&__o) throw()
- {
- void *__tmp = _M_exception_object;
- _M_exception_object = __o._M_exception_object;
- __o._M_exception_object = __tmp;
- }
-#endif
-
#ifdef _GLIBCXX_EH_PTR_COMPAT
// Retained for compatibility with CXXABI_1.3.
bool operator!() const throw() __attribute__ ((__pure__));
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
new file mode 100644
index 00000000000..ce97bc28c25
--- /dev/null
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
@@ -0,0 +1,45 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-atomic-builtins "" }
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <exception>
+#include <utility>
+#include <testsuite_hooks.h>
+
+// Verify move construction and assignment are efficient and do not copy.
+// This behaviour is a GNU extension provided for efficiency.
+void test01()
+{
+ bool test = true;
+
+ std::exception_ptr p1 = std::copy_exception(test);
+ std::exception_ptr p2 = std::move(p1);
+ VERIFY( p1 == 0 );
+ VERIFY( !(p2 == 0) );
+
+ p1 = std::move(p2);
+ VERIFY( !(p1 == 0) );
+ VERIFY( p2 == 0 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}