Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
Fedora Release Engineering | b3ffe03947 | |
Bill Nottingham | d8678deded | |
Jakub Jelinek | 0d16b6923b | |
Jakub Jelinek | fbb762ea3b | |
Jesse Keating | 43f61a6638 |
|
@ -1,8 +1 @@
|
|||
/gcc-10.0.1-20200118.tar.xz
|
||||
/newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz
|
||||
/nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz
|
||||
/gcc-10.0.1-20200121.tar.xz
|
||||
/gcc-10.0.1-20200123.tar.xz
|
||||
/gcc-10.0.1-20200126.tar.xz
|
||||
/gcc-10.0.1-20200130.tar.xz
|
||||
/gcc-10.0.1-20200216.tar.xz
|
||||
gcc-4.1.2-20071124.tar.bz2
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
gcjwebplugin is a Firefox plugin for running Java applets. It is now
|
||||
included in the libgcj sub-package, though it is not enabled by
|
||||
default.
|
||||
|
||||
GNU Classpath and libgcj's security implementation is under active
|
||||
development, but it is not ready to be declared secure. Specifically,
|
||||
it cannot run untrusted applets safely.
|
||||
|
||||
When gcjwebplugin is enabled, it prompts you with a dialog before
|
||||
loading an applet. The dialog tells you that a certain URL would like
|
||||
to load an applet, and asks if you trust the applet. Be aware though
|
||||
that this dialog is mostly informative and doesn't provide much
|
||||
protection:
|
||||
|
||||
- http and DNS can be spoofed meaning that the URL named in the
|
||||
warning dialog cannot be trusted
|
||||
|
||||
- someone could create a browser denial-of-service attack by creating a
|
||||
page with hundreds of applet tags, causing gcjwebplugin to create
|
||||
warning dialog after warning dialog. The browser would have to be
|
||||
closed to eliminate the latest dialog
|
||||
|
||||
- the whitelist is provided as a convenience, but it is unsafe because a
|
||||
domain may change hands from a trusted owner to an untrusted owner.
|
||||
If that domain is in the whitelist then the warning dialog will not
|
||||
appear when loading the new malicious applet.
|
||||
|
||||
CURRENTLY GCJWEBPLUGIN RUNS WITH NO SECURITY MANAGER. THIS MEANS THAT
|
||||
APPLETS CAN DO ANYTHING A JAVA APPLICATION THAT YOU DOWNLOAD AND RUN
|
||||
COULD DO. BE *VERY* CAREFUL WHICH APPLETS YOU RUN. DO NOT USE
|
||||
GCJWEBPLUGIN ON YOUR SYSTEM IF YOUR SYSTEM STORES IMPORTANT DATA.
|
||||
THIS DATA CAN BE DESTROYED OR STOLEN.
|
||||
|
||||
The same warning applies to gappletviewer, which also runs with no
|
||||
security manager (in fact, gcjwebplugin spawns gappletviewer to do the
|
||||
applet loading). When run on the command line, gappletviewer issues a
|
||||
warning on startup and asks you if you want to continue.
|
||||
|
||||
Even considering the risks involved, you may still want to try
|
||||
gcjwebplugin. GNU Classpath's AWT and Swing implementations are now
|
||||
sufficiently mature that they're able to run many applets deployed on
|
||||
the web. If you're interested in trying gcjwebplugin, you can do so
|
||||
by creating a symbolic link in ~/.mozilla/plugins like so:
|
||||
|
||||
ln -s /usr/lib/gcj-@VERSION@/libgcjwebplugin.so ~/.mozilla/plugins/
|
||||
|
||||
Type about:plugins in Firefox's URL bar to confirm that the plugin has
|
||||
been loaded. To see gcjwebplugin debugging output, run:
|
||||
|
||||
firefox -g
|
||||
|
||||
then at the GDB prompt, type
|
||||
|
||||
run
|
||||
|
||||
Please report bugs in Red Hat Bugzilla: http://bugzilla.redhat.com
|
35
STAGE1-gcc
35
STAGE1-gcc
|
@ -1,35 +0,0 @@
|
|||
srpm gcc
|
||||
mcd $BUILDDIR/gcc
|
||||
|
||||
# These are for gcc cross-tools (politics sometime result in slightly
|
||||
# different arch names)
|
||||
GCC_CONFIGARGS="--prefix=$PREFIX
|
||||
--libdir=$PREFIX/lib${SUFFIX}
|
||||
--target=$TARGET
|
||||
${GCC_CONFIG_EXTRA}
|
||||
--enable-languages=c,c++
|
||||
--with-sysroot=$ROOTFS
|
||||
--with-build-sysroot=$ROOTFS
|
||||
--cache-file=config.cache
|
||||
--disable-bootstrap
|
||||
--enable-threads=posix
|
||||
--enable-64-bit-bfd
|
||||
--disable-lto
|
||||
$WITHPPL
|
||||
"
|
||||
|
||||
# prefill gcc cache
|
||||
echo 'lt_cv_shlibpath_overrides_runpath=no' > config.cache
|
||||
echo 'gcc_cv_libc_provides_ssp=yes' >> config.cache
|
||||
|
||||
if [ ! "$BUILDER_ARCH" = "$TARGET_ARCH" ]; then
|
||||
WITH_HEADERS="--with-headers=$ROOTFS/usr/include"
|
||||
fi
|
||||
|
||||
$SRC/gcc-*/configure $GCC_CONFIGARGS $WITH_HEADERS
|
||||
notparallel
|
||||
make $J
|
||||
make $J install
|
||||
mcd $ROOTFS/lib${SUFFIX}/gcc
|
||||
rsync -av $PREFIX/lib${SUFFIX}/gcc/ $ROOTFS/lib${SUFFIX}/gcc/
|
||||
rsync -av $PREFIX/$TARGET/lib/ $ROOTFS/lib${SUFFIX}/
|
|
@ -1,48 +0,0 @@
|
|||
srpm gcc
|
||||
mcd $BUILDDIR/gcc-host
|
||||
|
||||
# These are for gcc cross-tools (politics sometime result in slightly
|
||||
# different arch names)
|
||||
GCC_CONFIGARGS="--prefix=$PREFIX
|
||||
--libdir=$PREFIX/lib${SUFFIX}
|
||||
--target=$TARGET
|
||||
${GCC_CONFIG_EXTRA}
|
||||
--enable-languages=c,c++
|
||||
--with-sysroot=$ROOTFS
|
||||
--with-build-sysroot=$ROOTFS
|
||||
--cache-file=config.cache
|
||||
--disable-bootstrap
|
||||
--enable-threads=posix
|
||||
--enable-64-bit-bfd
|
||||
--disable-lto
|
||||
$WITHPPL
|
||||
"
|
||||
|
||||
# prefill gcc cache
|
||||
echo 'lt_cv_shlibpath_overrides_runpath=no' > config.cache
|
||||
echo 'gcc_cv_libc_provides_ssp=yes' >> config.cache
|
||||
|
||||
if [ ! "$BUILDER_ARCH" = "$TARGET_ARCH" ]; then
|
||||
WITH_HEADERS="--with-headers=$ROOTFS/usr/include"
|
||||
fi
|
||||
|
||||
$SRC/gcc-*/configure $GCC_CONFIGARGS $WITH_HEADERS
|
||||
notparallel
|
||||
|
||||
# Pass gcc_cv_libc_provides_ssp down, because the config.cache
|
||||
# version is not passed down to the gcc subdir.
|
||||
make $J all-host gcc_cv_libc_provides_ssp=yes
|
||||
make $J install-host gcc_cv_libc_provides_ssp=yes
|
||||
|
||||
|
||||
if false; then
|
||||
mkdirp $ROOTFS/usr/lib${SUFFIX}
|
||||
for o in crt Scrt1 crti crtbegin crtbeginS crtend crtendS crtn
|
||||
do
|
||||
$TARGET-gcc -nostdlib -nostartfiles -c -x c /dev/null -c -o $ROOTFS/usr/lib${SUFFIX}/$o.o
|
||||
done
|
||||
for so in gcc gcc_s c
|
||||
do
|
||||
$TARGET-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o $ROOTFS/usr/lib${SUFFIX}/lib$so.so
|
||||
done
|
||||
fi
|
|
@ -1,34 +0,0 @@
|
|||
srpm gcc
|
||||
mcd $BUILDDIR/gcc-libgcc
|
||||
|
||||
# These are for gcc cross-tools (politics sometime result in slightly
|
||||
# different arch names)
|
||||
GCC_CONFIGARGS="--prefix=$PREFIX
|
||||
--libdir=$PREFIX/lib${SUFFIX}
|
||||
--target=$TARGET
|
||||
${GCC_CONFIG_EXTRA}
|
||||
--enable-languages=c,c++
|
||||
--with-sysroot=$ROOTFS
|
||||
--with-build-sysroot=$ROOTFS
|
||||
--cache-file=config.cache
|
||||
--disable-bootstrap
|
||||
--enable-threads=posix
|
||||
--enable-64-bit-bfd
|
||||
--disable-lto
|
||||
$WITHPPL
|
||||
"
|
||||
|
||||
# prefill gcc cache
|
||||
echo 'lt_cv_shlibpath_overrides_runpath=no' > config.cache
|
||||
echo 'gcc_cv_libc_provides_ssp=yes' >> config.cache
|
||||
|
||||
if [ ! "$BUILDER_ARCH" = "$TARGET_ARCH" ]; then
|
||||
WITH_HEADERS="--with-headers=$ROOTFS/usr/include"
|
||||
fi
|
||||
|
||||
$SRC/gcc-*/configure $GCC_CONFIGARGS $WITH_HEADERS
|
||||
notparallel
|
||||
# Pass gcc_cv_libc_provides_ssp down, because the config.cache
|
||||
# version is not passed down to the gcc subdir.
|
||||
make $J all-target-libgcc all-target-libssp gcc_cv_libc_provides_ssp=yes
|
||||
make $J install-target-libgcc install-target-libssp gcc_cv_libc_provides_ssp=yes
|
28
STAGE1-t-gcc
28
STAGE1-t-gcc
|
@ -1,28 +0,0 @@
|
|||
srpm gcc
|
||||
mcd $BUILDDIR/t-gcc
|
||||
|
||||
GCC_TCONFIGARGS="--prefix=/usr
|
||||
--libdir=/usr/lib${SUFFIX}
|
||||
--with-sysroot=/
|
||||
--with-build-sysroot=$ROOTFS
|
||||
--build=$BUILD
|
||||
--host=$TARGET
|
||||
--target=$TARGET
|
||||
--disable-bootstrap
|
||||
--enable-werror=no
|
||||
--enable-cxx
|
||||
${GCC_CONFIG_EXTRA}
|
||||
--enable-languages=c,c++
|
||||
--enable-threads=posix
|
||||
--enable-linker-build-id
|
||||
"
|
||||
|
||||
$SRC/gcc-*/configure $GCC_TCONFIGARGS
|
||||
notparallel
|
||||
make $J
|
||||
make $J install DESTDIR=${ROOTFS}
|
||||
test -e ${ROOTFS}/usr/bin/cc && rm ${ROOTFS}/usr/bin/cc
|
||||
ln -s gcc ${ROOTFS}/usr/bin/cc
|
||||
mkdir -p ${ROOTFS}/usr/share/gdb/auto-load/usr/lib${SUFFIX}
|
||||
mv -f ${ROOTFS}/usr/lib${SUFFIX}/libstdc++*gdb.py* \
|
||||
${ROOTFS}/usr/share/gdb/auto-load/usr/lib${SUFFIX}
|
|
@ -1,27 +0,0 @@
|
|||
2017-02-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* configure.ac: When adding -Wno-format, also add -Wno-format-security.
|
||||
* configure: Regenerated.
|
||||
|
||||
--- gcc/configure.ac.jj 2017-02-13 12:20:53.000000000 +0100
|
||||
+++ gcc/configure.ac 2017-02-25 12:42:32.859175403 +0100
|
||||
@@ -480,7 +480,7 @@ AC_ARG_ENABLE(build-format-warnings,
|
||||
AS_HELP_STRING([--disable-build-format-warnings],[don't use -Wformat while building GCC]),
|
||||
[],[enable_build_format_warnings=yes])
|
||||
AS_IF([test $enable_build_format_warnings = no],
|
||||
- [wf_opt=-Wno-format],[wf_opt=])
|
||||
+ [wf_opt="-Wno-format -Wno-format-security"],[wf_opt=])
|
||||
ACX_PROG_CXX_WARNING_OPTS(
|
||||
m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings ],
|
||||
[-Wcast-qual -Wno-error=format-diag $wf_opt])),
|
||||
--- gcc/configure.jj 2017-02-13 12:20:52.000000000 +0100
|
||||
+++ gcc/configure 2017-02-25 12:42:50.041946391 +0100
|
||||
@@ -6647,7 +6647,7 @@ else
|
||||
fi
|
||||
|
||||
if test $enable_build_format_warnings = no; then :
|
||||
- wf_opt=-Wno-format
|
||||
+ wf_opt="-Wno-format -Wno-format-security"
|
||||
else
|
||||
wf_opt=
|
||||
fi
|
|
@ -1,20 +0,0 @@
|
|||
2019-01-17 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* d-spec.cc (lang_specific_driver): Make -shared-libphobos
|
||||
the default rather than -static-libphobos.
|
||||
|
||||
--- gcc/d/d-spec.cc.jj 2019-01-01 12:37:49.502444257 +0100
|
||||
+++ gcc/d/d-spec.cc 2019-01-17 17:09:45.364949246 +0100
|
||||
@@ -405,9 +405,9 @@ lang_specific_driver (cl_decoded_option
|
||||
/* Add `-lgphobos' if we haven't already done so. */
|
||||
if (phobos_library != PHOBOS_NOLINK && need_phobos)
|
||||
{
|
||||
- /* Default to static linking. */
|
||||
- if (phobos_library != PHOBOS_DYNAMIC)
|
||||
- phobos_library = PHOBOS_STATIC;
|
||||
+ /* Default to shared linking. */
|
||||
+ if (phobos_library != PHOBOS_STATIC)
|
||||
+ phobos_library = PHOBOS_DYNAMIC;
|
||||
|
||||
#ifdef HAVE_LD_STATIC_DYNAMIC
|
||||
if (phobos_library == PHOBOS_DYNAMIC && static_link)
|
|
@ -1,122 +0,0 @@
|
|||
2019-01-17 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* gcc.c (offload_targets_default): New variable.
|
||||
(process_command): Set it if -foffload is defaulted.
|
||||
(driver::maybe_putenv_OFFLOAD_TARGETS): Add OFFLOAD_TARGET_DEFAULT=1
|
||||
into environment if -foffload has been defaulted.
|
||||
* lto-wrapper.c (OFFLOAD_TARGET_DEFAULT_ENV): Define.
|
||||
(compile_offload_image): If OFFLOAD_TARGET_DEFAULT
|
||||
is in the environment, don't fail if corresponding mkoffload
|
||||
can't be found.
|
||||
(compile_images_for_offload_targets): Likewise. Free and clear
|
||||
offload_names if no valid offload is found.
|
||||
libgomp/
|
||||
* target.c (gomp_load_plugin_for_device): If a plugin can't be
|
||||
dlopened, assume it has no devices silently.
|
||||
|
||||
--- gcc/gcc.c.jj 2017-01-17 10:28:40.000000000 +0100
|
||||
+++ gcc/gcc.c 2017-01-20 16:26:29.649962902 +0100
|
||||
@@ -290,6 +290,10 @@ static const char *spec_host_machine = D
|
||||
|
||||
static char *offload_targets = NULL;
|
||||
|
||||
+/* Set to true if -foffload has not been used and offload_targets
|
||||
+ is set to the configured in default. */
|
||||
+static bool offload_targets_default;
|
||||
+
|
||||
/* Nonzero if cross-compiling.
|
||||
When -b is used, the value comes from the `specs' file. */
|
||||
|
||||
@@ -4457,7 +4461,10 @@ process_command (unsigned int decoded_op
|
||||
/* If the user didn't specify any, default to all configured offload
|
||||
targets. */
|
||||
if (ENABLE_OFFLOADING && offload_targets == NULL)
|
||||
- handle_foffload_option (OFFLOAD_TARGETS);
|
||||
+ {
|
||||
+ handle_foffload_option (OFFLOAD_TARGETS);
|
||||
+ offload_targets_default = true;
|
||||
+ }
|
||||
|
||||
if (output_file
|
||||
&& strcmp (output_file, "-") != 0
|
||||
@@ -7693,6 +7700,8 @@ driver::maybe_putenv_OFFLOAD_TARGETS ()
|
||||
obstack_grow (&collect_obstack, offload_targets,
|
||||
strlen (offload_targets) + 1);
|
||||
xputenv (XOBFINISH (&collect_obstack, char *));
|
||||
+ if (offload_targets_default)
|
||||
+ xputenv ("OFFLOAD_TARGET_DEFAULT=1");
|
||||
}
|
||||
|
||||
free (offload_targets);
|
||||
--- gcc/lto-wrapper.c.jj 2017-01-01 12:45:34.000000000 +0100
|
||||
+++ gcc/lto-wrapper.c 2017-01-20 16:34:18.294016997 +0100
|
||||
@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3.
|
||||
/* Environment variable, used for passing the names of offload targets from GCC
|
||||
driver to lto-wrapper. */
|
||||
#define OFFLOAD_TARGET_NAMES_ENV "OFFLOAD_TARGET_NAMES"
|
||||
+#define OFFLOAD_TARGET_DEFAULT_ENV "OFFLOAD_TARGET_DEFAULT"
|
||||
|
||||
enum lto_mode_d {
|
||||
LTO_MODE_NONE, /* Not doing LTO. */
|
||||
@@ -822,6 +823,12 @@ compile_offload_image (const char *targe
|
||||
break;
|
||||
}
|
||||
|
||||
+ if (!compiler && getenv (OFFLOAD_TARGET_DEFAULT_ENV))
|
||||
+ {
|
||||
+ free_array_of_ptrs ((void **) paths, n_paths);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
if (!compiler)
|
||||
fatal_error (input_location,
|
||||
"could not find %s in %s (consider using %<-B%>)",
|
||||
@@ -885,6 +892,7 @@ compile_images_for_offload_targets (unsi
|
||||
unsigned num_targets = parse_env_var (target_names, &names, NULL);
|
||||
|
||||
int next_name_entry = 0;
|
||||
+ bool hsa_seen = false;
|
||||
const char *compiler_path = getenv ("COMPILER_PATH");
|
||||
if (!compiler_path)
|
||||
goto out;
|
||||
@@ -897,18 +905,26 @@ compile_images_for_offload_targets (unsi
|
||||
/* HSA does not use LTO-like streaming and a different compiler, skip
|
||||
it. */
|
||||
if (strcmp (names[i], "hsa") == 0)
|
||||
- continue;
|
||||
+ {
|
||||
+ hsa_seen = true;
|
||||
+ continue;
|
||||
+ }
|
||||
|
||||
offload_names[next_name_entry]
|
||||
= compile_offload_image (names[i], compiler_path, in_argc, in_argv,
|
||||
compiler_opts, compiler_opt_count,
|
||||
linker_opts, linker_opt_count);
|
||||
if (!offload_names[next_name_entry])
|
||||
- fatal_error (input_location,
|
||||
- "problem with building target image for %s", names[i]);
|
||||
+ continue;
|
||||
next_name_entry++;
|
||||
}
|
||||
|
||||
+ if (next_name_entry == 0 && !hsa_seen)
|
||||
+ {
|
||||
+ free (offload_names);
|
||||
+ offload_names = NULL;
|
||||
+ }
|
||||
+
|
||||
out:
|
||||
free_array_of_ptrs ((void **) names, num_targets);
|
||||
}
|
||||
--- libgomp/target.c.jj 2017-01-01 12:45:52.000000000 +0100
|
||||
+++ libgomp/target.c 2017-01-20 20:12:13.756710875 +0100
|
||||
@@ -2356,7 +2356,7 @@ gomp_load_plugin_for_device (struct gomp
|
||||
|
||||
void *plugin_handle = dlopen (plugin_name, RTLD_LAZY);
|
||||
if (!plugin_handle)
|
||||
- goto dl_fail;
|
||||
+ return 0;
|
||||
|
||||
/* Check if all required functions are available in the plugin and store
|
||||
their handlers. None of the symbols can legitimately be NULL,
|
126
gcc10-hack.patch
126
gcc10-hack.patch
|
@ -1,126 +0,0 @@
|
|||
--- libada/Makefile.in.jj 2019-01-09 13:01:18.015608205 +0100
|
||||
+++ libada/Makefile.in 2019-01-11 18:16:23.441726931 +0100
|
||||
@@ -71,18 +71,40 @@ version := $(shell @get_gcc_base_ver@ $(
|
||||
libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
|
||||
ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
|
||||
|
||||
+DEFAULTMULTIFLAGS :=
|
||||
+ifeq ($(MULTISUBDIR),)
|
||||
+targ:=$(subst -, ,$(target))
|
||||
+arch:=$(word 1,$(targ))
|
||||
+ifeq ($(words $(targ)),2)
|
||||
+osys:=$(word 2,$(targ))
|
||||
+else
|
||||
+osys:=$(word 3,$(targ))
|
||||
+endif
|
||||
+ifeq ($(strip $(filter-out i%86 x86_64 powerpc% ppc% s390% sparc% linux%, $(arch) $(osys))),)
|
||||
+ifeq ($(shell $(CC) $(CFLAGS) -print-multi-os-directory),../lib64)
|
||||
+DEFAULTMULTIFLAGS := -m64
|
||||
+else
|
||||
+ifeq ($(strip $(filter-out s390%, $(arch))),)
|
||||
+DEFAULTMULTIFLAGS := -m31
|
||||
+else
|
||||
+DEFAULTMULTIFLAGS := -m32
|
||||
+endif
|
||||
+endif
|
||||
+endif
|
||||
+endif
|
||||
+
|
||||
# exeext should not be used because it's the *host* exeext. We're building
|
||||
# a *target* library, aren't we?!? Likewise for CC. Still, provide bogus
|
||||
# definitions just in case something slips through the safety net provided
|
||||
# by recursive make invocations in gcc/ada/Makefile.in
|
||||
LIBADA_FLAGS_TO_PASS = \
|
||||
"MAKEOVERRIDES=" \
|
||||
- "LDFLAGS=$(LDFLAGS)" \
|
||||
+ "LDFLAGS=$(LDFLAGS) $(DEFAULTMULTIFLAGS)" \
|
||||
"LN_S=$(LN_S)" \
|
||||
"SHELL=$(SHELL)" \
|
||||
- "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
|
||||
- "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
|
||||
- "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
|
||||
+ "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
|
||||
+ "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
|
||||
+ "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
|
||||
"PICFLAG_FOR_TARGET=$(PICFLAG)" \
|
||||
"THREAD_KIND=$(THREAD_KIND)" \
|
||||
"TRACE=$(TRACE)" \
|
||||
@@ -93,7 +115,7 @@ LIBADA_FLAGS_TO_PASS = \
|
||||
"exeext=.exeext.should.not.be.used " \
|
||||
'CC=the.host.compiler.should.not.be.needed' \
|
||||
"GCC_FOR_TARGET=$(CC)" \
|
||||
- "CFLAGS=$(CFLAGS)"
|
||||
+ "CFLAGS=$(CFLAGS) $(DEFAULTMULTIFLAGS)"
|
||||
|
||||
.PHONY: libada gnatlib gnatlib-shared gnatlib-sjlj gnatlib-zcx osconstool
|
||||
|
||||
--- config-ml.in.jj 2019-01-09 12:50:16.646501448 +0100
|
||||
+++ config-ml.in 2019-01-11 18:16:23.442726914 +0100
|
||||
@@ -511,6 +511,8 @@ multi-do:
|
||||
ADAFLAGS="$(ADAFLAGS) $${flags}" \
|
||||
prefix="$(prefix)" \
|
||||
exec_prefix="$(exec_prefix)" \
|
||||
+ mandir="$(mandir)" \
|
||||
+ infodir="$(infodir)" \
|
||||
GOCFLAGS="$(GOCFLAGS) $${flags}" \
|
||||
GDCFLAGS="$(GDCFLAGS) $${flags}" \
|
||||
CXXFLAGS="$(CXXFLAGS) $${flags}" \
|
||||
--- libcpp/macro.c.jj 2019-01-09 13:01:21.420552123 +0100
|
||||
+++ libcpp/macro.c 2019-01-11 18:18:17.736876285 +0100
|
||||
@@ -3256,8 +3256,6 @@ static cpp_macro *
|
||||
create_iso_definition (cpp_reader *pfile)
|
||||
{
|
||||
bool following_paste_op = false;
|
||||
- const char *paste_op_error_msg =
|
||||
- N_("'##' cannot appear at either end of a macro expansion");
|
||||
unsigned int num_extra_tokens = 0;
|
||||
unsigned nparms = 0;
|
||||
cpp_hashnode **params = NULL;
|
||||
@@ -3382,7 +3380,9 @@ create_iso_definition (cpp_reader *pfile
|
||||
function-like macros, but not at the end. */
|
||||
if (following_paste_op)
|
||||
{
|
||||
- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
|
||||
+ cpp_error (pfile, CPP_DL_ERROR,
|
||||
+ "'##' cannot appear at either end of a macro "
|
||||
+ "expansion");
|
||||
goto out;
|
||||
}
|
||||
if (!vaopt_tracker.completed ())
|
||||
@@ -3397,7 +3397,9 @@ create_iso_definition (cpp_reader *pfile
|
||||
function-like macros, but not at the beginning. */
|
||||
if (macro->count == 1)
|
||||
{
|
||||
- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
|
||||
+ cpp_error (pfile, CPP_DL_ERROR,
|
||||
+ "'##' cannot appear at either end of a macro "
|
||||
+ "expansion");
|
||||
goto out;
|
||||
}
|
||||
|
||||
--- libcpp/expr.c.jj 2019-01-09 13:01:22.415535734 +0100
|
||||
+++ libcpp/expr.c 2019-01-11 18:16:23.444726882 +0100
|
||||
@@ -788,16 +788,17 @@ cpp_classify_number (cpp_reader *pfile,
|
||||
if ((result & CPP_N_WIDTH) == CPP_N_LARGE
|
||||
&& CPP_OPTION (pfile, cpp_warn_long_long))
|
||||
{
|
||||
- const char *message = CPP_OPTION (pfile, cplusplus)
|
||||
- ? N_("use of C++11 long long integer constant")
|
||||
- : N_("use of C99 long long integer constant");
|
||||
-
|
||||
if (CPP_OPTION (pfile, c99))
|
||||
cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
|
||||
- 0, message);
|
||||
+ 0, CPP_OPTION (pfile, cplusplus)
|
||||
+ ? N_("use of C++11 long long integer constant")
|
||||
+ : N_("use of C99 long long integer constant"));
|
||||
else
|
||||
cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
|
||||
- virtual_location, 0, message);
|
||||
+ virtual_location, 0,
|
||||
+ CPP_OPTION (pfile, cplusplus)
|
||||
+ ? N_("use of C++11 long long integer constant")
|
||||
+ : N_("use of C99 long long integer constant"));
|
||||
}
|
||||
|
||||
result |= CPP_N_INTEGER;
|
|
@ -1,11 +0,0 @@
|
|||
--- libgomp/configure.tgt.jj 2008-01-10 20:53:48.000000000 +0100
|
||||
+++ libgomp/configure.tgt 2008-03-27 12:44:51.000000000 +0100
|
||||
@@ -67,7 +67,7 @@ if test $enable_linux_futex = yes; then
|
||||
;;
|
||||
*)
|
||||
if test -z "$with_arch"; then
|
||||
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
|
||||
+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
|
||||
fi
|
||||
esac
|
||||
;;
|
|
@ -1,715 +0,0 @@
|
|||
--- gcc/Makefile.in.jj 2015-06-06 10:00:25.000000000 +0200
|
||||
+++ gcc/Makefile.in 2015-11-04 14:56:02.643536437 +0100
|
||||
@@ -1063,7 +1063,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
|
||||
# and the system's installed libraries.
|
||||
LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \
|
||||
$(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS)
|
||||
-BACKENDLIBS = $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
|
||||
+BACKENDLIBS = $(if $(ISLLIBS),-ldl) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
|
||||
$(ZLIB) $(ZSTD_LIB)
|
||||
# Any system libraries needed just for GNAT.
|
||||
SYSLIBS = @GNAT_LIBEXC@
|
||||
@@ -2302,6 +2302,15 @@ $(out_object_file): $(out_file)
|
||||
$(common_out_object_file): $(common_out_file)
|
||||
$(COMPILE) $<
|
||||
$(POSTCOMPILE)
|
||||
+
|
||||
+graphite%.o : \
|
||||
+ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
|
||||
+graphite.o : \
|
||||
+ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
|
||||
+graphite%.o : \
|
||||
+ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS))
|
||||
+graphite.o : \
|
||||
+ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS))
|
||||
#
|
||||
# Generate header and source files from the machine description,
|
||||
# and compile them.
|
||||
--- gcc/graphite.h.jj 2016-01-27 12:44:06.000000000 +0100
|
||||
+++ gcc/graphite.h 2016-01-27 13:26:38.309876856 +0100
|
||||
@@ -39,6 +39,590 @@ along with GCC; see the file COPYING3.
|
||||
#include <isl/schedule_node.h>
|
||||
#include <isl/id.h>
|
||||
#include <isl/space.h>
|
||||
+#include <isl/version.h>
|
||||
+#include <dlfcn.h>
|
||||
+
|
||||
+#define DYNSYMS \
|
||||
+ DYNSYM (isl_aff_add_coefficient_si); \
|
||||
+ DYNSYM (isl_aff_free); \
|
||||
+ DYNSYM (isl_aff_get_space); \
|
||||
+ DYNSYM (isl_aff_set_coefficient_si); \
|
||||
+ DYNSYM (isl_aff_set_constant_si); \
|
||||
+ DYNSYM (isl_aff_zero_on_domain); \
|
||||
+ DYNSYM (isl_band_free); \
|
||||
+ DYNSYM (isl_band_get_children); \
|
||||
+ DYNSYM (isl_band_get_partial_schedule); \
|
||||
+ DYNSYM (isl_band_has_children); \
|
||||
+ DYNSYM (isl_band_list_free); \
|
||||
+ DYNSYM (isl_band_list_get_band); \
|
||||
+ DYNSYM (isl_band_list_get_ctx); \
|
||||
+ DYNSYM (isl_band_list_n_band); \
|
||||
+ DYNSYM (isl_band_n_member); \
|
||||
+ DYNSYM (isl_basic_map_add_constraint); \
|
||||
+ DYNSYM (isl_basic_map_project_out); \
|
||||
+ DYNSYM (isl_basic_map_universe); \
|
||||
+ DYNSYM (isl_constraint_set_coefficient_si); \
|
||||
+ DYNSYM (isl_constraint_set_constant_si); \
|
||||
+ DYNSYM (isl_ctx_alloc); \
|
||||
+ DYNSYM (isl_ctx_free); \
|
||||
+ DYNSYM (isl_equality_alloc); \
|
||||
+ DYNSYM (isl_id_alloc); \
|
||||
+ DYNSYM (isl_id_copy); \
|
||||
+ DYNSYM (isl_id_free); \
|
||||
+ DYNSYM (isl_inequality_alloc); \
|
||||
+ DYNSYM (isl_local_space_copy); \
|
||||
+ DYNSYM (isl_local_space_free); \
|
||||
+ DYNSYM (isl_local_space_from_space); \
|
||||
+ DYNSYM (isl_local_space_range); \
|
||||
+ DYNSYM (isl_map_add_constraint); \
|
||||
+ DYNSYM (isl_map_add_dims); \
|
||||
+ DYNSYM (isl_map_align_params); \
|
||||
+ DYNSYM (isl_map_apply_range); \
|
||||
+ DYNSYM (isl_map_copy); \
|
||||
+ DYNSYM (isl_map_dim); \
|
||||
+ DYNSYM (isl_map_dump); \
|
||||
+ DYNSYM (isl_map_equate); \
|
||||
+ DYNSYM (isl_map_fix_si); \
|
||||
+ DYNSYM (isl_map_flat_product); \
|
||||
+ DYNSYM (isl_map_flat_range_product); \
|
||||
+ DYNSYM (isl_map_free); \
|
||||
+ DYNSYM (isl_map_from_basic_map); \
|
||||
+ DYNSYM (isl_map_from_pw_aff); \
|
||||
+ DYNSYM (isl_map_from_union_map); \
|
||||
+ DYNSYM (isl_map_get_ctx); \
|
||||
+ DYNSYM (isl_map_get_space); \
|
||||
+ DYNSYM (isl_map_get_tuple_id); \
|
||||
+ DYNSYM (isl_map_insert_dims); \
|
||||
+ DYNSYM (isl_map_intersect); \
|
||||
+ DYNSYM (isl_map_intersect_domain); \
|
||||
+ DYNSYM (isl_map_intersect_range); \
|
||||
+ DYNSYM (isl_map_is_empty); \
|
||||
+ DYNSYM (isl_map_lex_ge); \
|
||||
+ DYNSYM (isl_map_lex_le); \
|
||||
+ DYNSYM (isl_map_n_out); \
|
||||
+ DYNSYM (isl_map_range); \
|
||||
+ DYNSYM (isl_map_set_tuple_id); \
|
||||
+ DYNSYM (isl_map_universe); \
|
||||
+ DYNSYM (isl_options_set_on_error); \
|
||||
+ DYNSYM (isl_options_set_schedule_serialize_sccs); \
|
||||
+ DYNSYM (isl_printer_set_yaml_style); \
|
||||
+ DYNSYM (isl_options_set_schedule_max_constant_term); \
|
||||
+ DYNSYM (isl_options_set_schedule_maximize_band_depth); \
|
||||
+ DYNSYM (isl_printer_free); \
|
||||
+ DYNSYM (isl_printer_print_aff); \
|
||||
+ DYNSYM (isl_printer_print_constraint); \
|
||||
+ DYNSYM (isl_printer_print_map); \
|
||||
+ DYNSYM (isl_printer_print_set); \
|
||||
+ DYNSYM (isl_printer_to_file); \
|
||||
+ DYNSYM (isl_pw_aff_add); \
|
||||
+ DYNSYM (isl_pw_aff_alloc); \
|
||||
+ DYNSYM (isl_pw_aff_copy); \
|
||||
+ DYNSYM (isl_pw_aff_eq_set); \
|
||||
+ DYNSYM (isl_pw_aff_free); \
|
||||
+ DYNSYM (isl_pw_aff_from_aff); \
|
||||
+ DYNSYM (isl_pw_aff_ge_set); \
|
||||
+ DYNSYM (isl_pw_aff_gt_set); \
|
||||
+ DYNSYM (isl_pw_aff_is_cst); \
|
||||
+ DYNSYM (isl_pw_aff_le_set); \
|
||||
+ DYNSYM (isl_pw_aff_lt_set); \
|
||||
+ DYNSYM (isl_pw_aff_mul); \
|
||||
+ DYNSYM (isl_pw_aff_ne_set); \
|
||||
+ DYNSYM (isl_pw_aff_nonneg_set); \
|
||||
+ DYNSYM (isl_pw_aff_set_tuple_id); \
|
||||
+ DYNSYM (isl_pw_aff_sub); \
|
||||
+ DYNSYM (isl_pw_aff_zero_set); \
|
||||
+ DYNSYM (isl_schedule_free); \
|
||||
+ DYNSYM (isl_schedule_get_band_forest); \
|
||||
+ DYNSYM (isl_set_add_constraint); \
|
||||
+ DYNSYM (isl_set_add_dims); \
|
||||
+ DYNSYM (isl_set_apply); \
|
||||
+ DYNSYM (isl_set_coalesce); \
|
||||
+ DYNSYM (isl_set_copy); \
|
||||
+ DYNSYM (isl_set_dim); \
|
||||
+ DYNSYM (isl_set_fix_si); \
|
||||
+ DYNSYM (isl_set_free); \
|
||||
+ DYNSYM (isl_set_get_space); \
|
||||
+ DYNSYM (isl_set_get_tuple_id); \
|
||||
+ DYNSYM (isl_set_intersect); \
|
||||
+ DYNSYM (isl_set_is_empty); \
|
||||
+ DYNSYM (isl_set_n_dim); \
|
||||
+ DYNSYM (isl_set_nat_universe); \
|
||||
+ DYNSYM (isl_set_project_out); \
|
||||
+ DYNSYM (isl_set_set_tuple_id); \
|
||||
+ DYNSYM (isl_set_universe); \
|
||||
+ DYNSYM (isl_space_add_dims); \
|
||||
+ DYNSYM (isl_space_alloc); \
|
||||
+ DYNSYM (isl_space_copy); \
|
||||
+ DYNSYM (isl_space_dim); \
|
||||
+ DYNSYM (isl_space_domain); \
|
||||
+ DYNSYM (isl_space_find_dim_by_id); \
|
||||
+ DYNSYM (isl_space_free); \
|
||||
+ DYNSYM (isl_space_from_domain); \
|
||||
+ DYNSYM (isl_space_get_tuple_id); \
|
||||
+ DYNSYM (isl_space_params_alloc); \
|
||||
+ DYNSYM (isl_space_range); \
|
||||
+ DYNSYM (isl_space_set_alloc); \
|
||||
+ DYNSYM (isl_space_set_dim_id); \
|
||||
+ DYNSYM (isl_space_set_tuple_id); \
|
||||
+ DYNSYM (isl_union_map_add_map); \
|
||||
+ DYNSYM (isl_union_map_align_params); \
|
||||
+ DYNSYM (isl_union_map_apply_domain); \
|
||||
+ DYNSYM (isl_union_map_apply_range); \
|
||||
+ DYNSYM (isl_union_map_compute_flow); \
|
||||
+ DYNSYM (isl_union_map_copy); \
|
||||
+ DYNSYM (isl_union_map_empty); \
|
||||
+ DYNSYM (isl_union_map_flat_range_product); \
|
||||
+ DYNSYM (isl_union_map_foreach_map); \
|
||||
+ DYNSYM (isl_union_map_free); \
|
||||
+ DYNSYM (isl_union_map_from_map); \
|
||||
+ DYNSYM (isl_union_map_get_ctx); \
|
||||
+ DYNSYM (isl_union_map_get_space); \
|
||||
+ DYNSYM (isl_union_map_gist_domain); \
|
||||
+ DYNSYM (isl_union_map_gist_range); \
|
||||
+ DYNSYM (isl_union_map_intersect_domain); \
|
||||
+ DYNSYM (isl_union_map_is_empty); \
|
||||
+ DYNSYM (isl_union_map_subtract); \
|
||||
+ DYNSYM (isl_union_map_union); \
|
||||
+ DYNSYM (isl_union_set_add_set); \
|
||||
+ DYNSYM (isl_union_set_compute_schedule); \
|
||||
+ DYNSYM (isl_union_set_copy); \
|
||||
+ DYNSYM (isl_union_set_empty); \
|
||||
+ DYNSYM (isl_union_set_from_set); \
|
||||
+ DYNSYM (isl_aff_add_constant_val); \
|
||||
+ DYNSYM (isl_aff_get_coefficient_val); \
|
||||
+ DYNSYM (isl_aff_get_ctx); \
|
||||
+ DYNSYM (isl_aff_mod_val); \
|
||||
+ DYNSYM (isl_ast_build_ast_from_schedule); \
|
||||
+ DYNSYM (isl_ast_build_free); \
|
||||
+ DYNSYM (isl_ast_build_from_context); \
|
||||
+ DYNSYM (isl_ast_build_get_ctx); \
|
||||
+ DYNSYM (isl_ast_build_get_schedule); \
|
||||
+ DYNSYM (isl_ast_build_get_schedule_space); \
|
||||
+ DYNSYM (isl_ast_build_set_before_each_for); \
|
||||
+ DYNSYM (isl_ast_build_set_options); \
|
||||
+ DYNSYM (isl_ast_expr_free); \
|
||||
+ DYNSYM (isl_ast_expr_from_val); \
|
||||
+ DYNSYM (isl_ast_expr_get_ctx); \
|
||||
+ DYNSYM (isl_ast_expr_get_id); \
|
||||
+ DYNSYM (isl_ast_expr_get_op_arg); \
|
||||
+ DYNSYM (isl_ast_expr_get_op_n_arg); \
|
||||
+ DYNSYM (isl_ast_expr_get_op_type); \
|
||||
+ DYNSYM (isl_ast_expr_get_type); \
|
||||
+ DYNSYM (isl_ast_expr_get_val); \
|
||||
+ DYNSYM (isl_ast_expr_sub); \
|
||||
+ DYNSYM (isl_ast_node_block_get_children); \
|
||||
+ DYNSYM (isl_ast_node_for_get_body); \
|
||||
+ DYNSYM (isl_ast_node_for_get_cond); \
|
||||
+ DYNSYM (isl_ast_node_for_get_inc); \
|
||||
+ DYNSYM (isl_ast_node_for_get_init); \
|
||||
+ DYNSYM (isl_ast_node_for_get_iterator); \
|
||||
+ DYNSYM (isl_ast_node_free); \
|
||||
+ DYNSYM (isl_ast_node_get_annotation); \
|
||||
+ DYNSYM (isl_ast_node_get_type); \
|
||||
+ DYNSYM (isl_ast_node_if_get_cond); \
|
||||
+ DYNSYM (isl_ast_node_if_get_else); \
|
||||
+ DYNSYM (isl_ast_node_if_get_then); \
|
||||
+ DYNSYM (isl_ast_node_list_free); \
|
||||
+ DYNSYM (isl_ast_node_list_get_ast_node); \
|
||||
+ DYNSYM (isl_ast_node_list_n_ast_node); \
|
||||
+ DYNSYM (isl_ast_node_user_get_expr); \
|
||||
+ DYNSYM (isl_constraint_set_coefficient_val); \
|
||||
+ DYNSYM (isl_constraint_set_constant_val); \
|
||||
+ DYNSYM (isl_id_get_user); \
|
||||
+ DYNSYM (isl_local_space_get_ctx); \
|
||||
+ DYNSYM (isl_map_fix_val); \
|
||||
+ DYNSYM (isl_options_set_ast_build_atomic_upper_bound); \
|
||||
+ DYNSYM (isl_printer_print_ast_node); \
|
||||
+ DYNSYM (isl_printer_print_str); \
|
||||
+ DYNSYM (isl_printer_set_output_format); \
|
||||
+ DYNSYM (isl_pw_aff_mod_val); \
|
||||
+ DYNSYM (isl_schedule_constraints_compute_schedule); \
|
||||
+ DYNSYM (isl_schedule_constraints_on_domain); \
|
||||
+ DYNSYM (isl_schedule_constraints_set_coincidence); \
|
||||
+ DYNSYM (isl_schedule_constraints_set_proximity); \
|
||||
+ DYNSYM (isl_schedule_constraints_set_validity); \
|
||||
+ DYNSYM (isl_set_get_dim_id); \
|
||||
+ DYNSYM (isl_set_max_val); \
|
||||
+ DYNSYM (isl_set_min_val); \
|
||||
+ DYNSYM (isl_set_params); \
|
||||
+ DYNSYM (isl_space_align_params); \
|
||||
+ DYNSYM (isl_space_map_from_domain_and_range); \
|
||||
+ DYNSYM (isl_space_set_tuple_name); \
|
||||
+ DYNSYM (isl_space_wrap); \
|
||||
+ DYNSYM (isl_union_map_from_domain_and_range); \
|
||||
+ DYNSYM (isl_union_map_range); \
|
||||
+ DYNSYM (isl_union_set_union); \
|
||||
+ DYNSYM (isl_union_set_universe); \
|
||||
+ DYNSYM (isl_val_2exp); \
|
||||
+ DYNSYM (isl_val_add_ui); \
|
||||
+ DYNSYM (isl_val_copy); \
|
||||
+ DYNSYM (isl_val_free); \
|
||||
+ DYNSYM (isl_val_int_from_si); \
|
||||
+ DYNSYM (isl_val_int_from_ui); \
|
||||
+ DYNSYM (isl_val_mul); \
|
||||
+ DYNSYM (isl_val_neg); \
|
||||
+ DYNSYM (isl_val_sub); \
|
||||
+ DYNSYM (isl_printer_print_union_map); \
|
||||
+ DYNSYM (isl_pw_aff_get_ctx); \
|
||||
+ DYNSYM (isl_val_is_int); \
|
||||
+ DYNSYM (isl_ctx_get_max_operations); \
|
||||
+ DYNSYM (isl_ctx_set_max_operations); \
|
||||
+ DYNSYM (isl_ctx_last_error); \
|
||||
+ DYNSYM (isl_ctx_reset_operations); \
|
||||
+ DYNSYM (isl_map_coalesce); \
|
||||
+ DYNSYM (isl_printer_print_schedule); \
|
||||
+ DYNSYM (isl_set_set_dim_id); \
|
||||
+ DYNSYM (isl_union_map_coalesce); \
|
||||
+ DYNSYM (isl_multi_val_set_val); \
|
||||
+ DYNSYM (isl_multi_val_zero); \
|
||||
+ DYNSYM (isl_options_set_schedule_max_coefficient); \
|
||||
+ DYNSYM (isl_options_set_tile_scale_tile_loops); \
|
||||
+ DYNSYM (isl_schedule_copy); \
|
||||
+ DYNSYM (isl_schedule_get_map); \
|
||||
+ DYNSYM (isl_schedule_map_schedule_node_bottom_up); \
|
||||
+ DYNSYM (isl_schedule_node_band_get_permutable); \
|
||||
+ DYNSYM (isl_schedule_node_band_get_space); \
|
||||
+ DYNSYM (isl_schedule_node_band_tile); \
|
||||
+ DYNSYM (isl_schedule_node_child); \
|
||||
+ DYNSYM (isl_schedule_node_free); \
|
||||
+ DYNSYM (isl_schedule_node_get_child); \
|
||||
+ DYNSYM (isl_schedule_node_get_ctx); \
|
||||
+ DYNSYM (isl_schedule_node_get_type); \
|
||||
+ DYNSYM (isl_schedule_node_n_children); \
|
||||
+ DYNSYM (isl_union_map_is_equal); \
|
||||
+ DYNSYM (isl_union_access_info_compute_flow); \
|
||||
+ DYNSYM (isl_union_access_info_from_sink); \
|
||||
+ DYNSYM (isl_union_access_info_set_may_source); \
|
||||
+ DYNSYM (isl_union_access_info_set_must_source); \
|
||||
+ DYNSYM (isl_union_access_info_set_schedule); \
|
||||
+ DYNSYM (isl_union_flow_free); \
|
||||
+ DYNSYM (isl_union_flow_get_may_dependence); \
|
||||
+ DYNSYM (isl_union_flow_get_must_dependence); \
|
||||
+ DYNSYM (isl_aff_var_on_domain); \
|
||||
+ DYNSYM (isl_multi_aff_from_aff); \
|
||||
+ DYNSYM (isl_schedule_get_ctx); \
|
||||
+ DYNSYM (isl_multi_aff_set_tuple_id); \
|
||||
+ DYNSYM (isl_multi_aff_dim); \
|
||||
+ DYNSYM (isl_schedule_get_domain); \
|
||||
+ DYNSYM (isl_union_set_is_empty); \
|
||||
+ DYNSYM (isl_union_set_get_space); \
|
||||
+ DYNSYM (isl_union_pw_multi_aff_empty); \
|
||||
+ DYNSYM (isl_union_set_foreach_set); \
|
||||
+ DYNSYM (isl_union_set_free); \
|
||||
+ DYNSYM (isl_multi_union_pw_aff_from_union_pw_multi_aff); \
|
||||
+ DYNSYM (isl_multi_union_pw_aff_apply_multi_aff); \
|
||||
+ DYNSYM (isl_schedule_insert_partial_schedule); \
|
||||
+ DYNSYM (isl_union_pw_multi_aff_free); \
|
||||
+ DYNSYM (isl_pw_multi_aff_project_out_map); \
|
||||
+ DYNSYM (isl_union_pw_multi_aff_add_pw_multi_aff); \
|
||||
+ DYNSYM (isl_schedule_from_domain); \
|
||||
+ DYNSYM (isl_schedule_sequence); \
|
||||
+ DYNSYM (isl_ast_build_node_from_schedule); \
|
||||
+ DYNSYM (isl_ast_node_mark_get_node); \
|
||||
+ DYNSYM (isl_schedule_node_band_member_get_ast_loop_type); \
|
||||
+ DYNSYM (isl_schedule_node_band_member_set_ast_loop_type); \
|
||||
+ DYNSYM (isl_val_n_abs_num_chunks); \
|
||||
+ DYNSYM (isl_val_get_abs_num_chunks); \
|
||||
+ DYNSYM (isl_val_int_from_chunks); \
|
||||
+ DYNSYM (isl_val_is_neg); \
|
||||
+ DYNSYM (isl_version); \
|
||||
+ DYNSYM (isl_options_get_on_error); \
|
||||
+ DYNSYM (isl_ctx_reset_error);
|
||||
+
|
||||
+extern struct isl_pointers_s__
|
||||
+{
|
||||
+ bool inited;
|
||||
+ void *h;
|
||||
+#define DYNSYM(x) __typeof (x) *p_##x
|
||||
+ DYNSYMS
|
||||
+#undef DYNSYM
|
||||
+} isl_pointers__;
|
||||
+
|
||||
+#define isl_aff_add_coefficient_si (*isl_pointers__.p_isl_aff_add_coefficient_si)
|
||||
+#define isl_aff_free (*isl_pointers__.p_isl_aff_free)
|
||||
+#define isl_aff_get_space (*isl_pointers__.p_isl_aff_get_space)
|
||||
+#define isl_aff_set_coefficient_si (*isl_pointers__.p_isl_aff_set_coefficient_si)
|
||||
+#define isl_aff_set_constant_si (*isl_pointers__.p_isl_aff_set_constant_si)
|
||||
+#define isl_aff_zero_on_domain (*isl_pointers__.p_isl_aff_zero_on_domain)
|
||||
+#define isl_band_free (*isl_pointers__.p_isl_band_free)
|
||||
+#define isl_band_get_children (*isl_pointers__.p_isl_band_get_children)
|
||||
+#define isl_band_get_partial_schedule (*isl_pointers__.p_isl_band_get_partial_schedule)
|
||||
+#define isl_band_has_children (*isl_pointers__.p_isl_band_has_children)
|
||||
+#define isl_band_list_free (*isl_pointers__.p_isl_band_list_free)
|
||||
+#define isl_band_list_get_band (*isl_pointers__.p_isl_band_list_get_band)
|
||||
+#define isl_band_list_get_ctx (*isl_pointers__.p_isl_band_list_get_ctx)
|
||||
+#define isl_band_list_n_band (*isl_pointers__.p_isl_band_list_n_band)
|
||||
+#define isl_band_n_member (*isl_pointers__.p_isl_band_n_member)
|
||||
+#define isl_basic_map_add_constraint (*isl_pointers__.p_isl_basic_map_add_constraint)
|
||||
+#define isl_basic_map_project_out (*isl_pointers__.p_isl_basic_map_project_out)
|
||||
+#define isl_basic_map_universe (*isl_pointers__.p_isl_basic_map_universe)
|
||||
+#define isl_constraint_set_coefficient_si (*isl_pointers__.p_isl_constraint_set_coefficient_si)
|
||||
+#define isl_constraint_set_constant_si (*isl_pointers__.p_isl_constraint_set_constant_si)
|
||||
+#define isl_ctx_alloc (*isl_pointers__.p_isl_ctx_alloc)
|
||||
+#define isl_ctx_free (*isl_pointers__.p_isl_ctx_free)
|
||||
+#define isl_equality_alloc (*isl_pointers__.p_isl_equality_alloc)
|
||||
+#define isl_id_alloc (*isl_pointers__.p_isl_id_alloc)
|
||||
+#define isl_id_copy (*isl_pointers__.p_isl_id_copy)
|
||||
+#define isl_id_free (*isl_pointers__.p_isl_id_free)
|
||||
+#define isl_inequality_alloc (*isl_pointers__.p_isl_inequality_alloc)
|
||||
+#define isl_local_space_copy (*isl_pointers__.p_isl_local_space_copy)
|
||||
+#define isl_local_space_free (*isl_pointers__.p_isl_local_space_free)
|
||||
+#define isl_local_space_from_space (*isl_pointers__.p_isl_local_space_from_space)
|
||||
+#define isl_local_space_range (*isl_pointers__.p_isl_local_space_range)
|
||||
+#define isl_map_add_constraint (*isl_pointers__.p_isl_map_add_constraint)
|
||||
+#define isl_map_add_dims (*isl_pointers__.p_isl_map_add_dims)
|
||||
+#define isl_map_align_params (*isl_pointers__.p_isl_map_align_params)
|
||||
+#define isl_map_apply_range (*isl_pointers__.p_isl_map_apply_range)
|
||||
+#define isl_map_copy (*isl_pointers__.p_isl_map_copy)
|
||||
+#define isl_map_dim (*isl_pointers__.p_isl_map_dim)
|
||||
+#define isl_map_dump (*isl_pointers__.p_isl_map_dump)
|
||||
+#define isl_map_equate (*isl_pointers__.p_isl_map_equate)
|
||||
+#define isl_map_fix_si (*isl_pointers__.p_isl_map_fix_si)
|
||||
+#define isl_map_flat_product (*isl_pointers__.p_isl_map_flat_product)
|
||||
+#define isl_map_flat_range_product (*isl_pointers__.p_isl_map_flat_range_product)
|
||||
+#define isl_map_free (*isl_pointers__.p_isl_map_free)
|
||||
+#define isl_map_from_basic_map (*isl_pointers__.p_isl_map_from_basic_map)
|
||||
+#define isl_map_from_pw_aff (*isl_pointers__.p_isl_map_from_pw_aff)
|
||||
+#define isl_map_from_union_map (*isl_pointers__.p_isl_map_from_union_map)
|
||||
+#define isl_map_get_ctx (*isl_pointers__.p_isl_map_get_ctx)
|
||||
+#define isl_map_get_space (*isl_pointers__.p_isl_map_get_space)
|
||||
+#define isl_map_get_tuple_id (*isl_pointers__.p_isl_map_get_tuple_id)
|
||||
+#define isl_map_insert_dims (*isl_pointers__.p_isl_map_insert_dims)
|
||||
+#define isl_map_intersect (*isl_pointers__.p_isl_map_intersect)
|
||||
+#define isl_map_intersect_domain (*isl_pointers__.p_isl_map_intersect_domain)
|
||||
+#define isl_map_intersect_range (*isl_pointers__.p_isl_map_intersect_range)
|
||||
+#define isl_map_is_empty (*isl_pointers__.p_isl_map_is_empty)
|
||||
+#define isl_map_lex_ge (*isl_pointers__.p_isl_map_lex_ge)
|
||||
+#define isl_map_lex_le (*isl_pointers__.p_isl_map_lex_le)
|
||||
+#define isl_map_n_out (*isl_pointers__.p_isl_map_n_out)
|
||||
+#define isl_map_range (*isl_pointers__.p_isl_map_range)
|
||||
+#define isl_map_set_tuple_id (*isl_pointers__.p_isl_map_set_tuple_id)
|
||||
+#define isl_map_universe (*isl_pointers__.p_isl_map_universe)
|
||||
+#define isl_options_set_on_error (*isl_pointers__.p_isl_options_set_on_error)
|
||||
+#define isl_options_set_schedule_serialize_sccs (*isl_pointers__.p_isl_options_set_schedule_serialize_sccs)
|
||||
+#define isl_printer_set_yaml_style (*isl_pointers__.p_isl_printer_set_yaml_style)
|
||||
+#define isl_options_set_schedule_max_constant_term (*isl_pointers__.p_isl_options_set_schedule_max_constant_term)
|
||||
+#define isl_options_set_schedule_maximize_band_depth (*isl_pointers__.p_isl_options_set_schedule_maximize_band_depth)
|
||||
+#define isl_printer_free (*isl_pointers__.p_isl_printer_free)
|
||||
+#define isl_printer_print_aff (*isl_pointers__.p_isl_printer_print_aff)
|
||||
+#define isl_printer_print_constraint (*isl_pointers__.p_isl_printer_print_constraint)
|
||||
+#define isl_printer_print_map (*isl_pointers__.p_isl_printer_print_map)
|
||||
+#define isl_printer_print_set (*isl_pointers__.p_isl_printer_print_set)
|
||||
+#define isl_printer_to_file (*isl_pointers__.p_isl_printer_to_file)
|
||||
+#define isl_pw_aff_add (*isl_pointers__.p_isl_pw_aff_add)
|
||||
+#define isl_pw_aff_alloc (*isl_pointers__.p_isl_pw_aff_alloc)
|
||||
+#define isl_pw_aff_copy (*isl_pointers__.p_isl_pw_aff_copy)
|
||||
+#define isl_pw_aff_eq_set (*isl_pointers__.p_isl_pw_aff_eq_set)
|
||||
+#define isl_pw_aff_free (*isl_pointers__.p_isl_pw_aff_free)
|
||||
+#define isl_pw_aff_from_aff (*isl_pointers__.p_isl_pw_aff_from_aff)
|
||||
+#define isl_pw_aff_ge_set (*isl_pointers__.p_isl_pw_aff_ge_set)
|
||||
+#define isl_pw_aff_gt_set (*isl_pointers__.p_isl_pw_aff_gt_set)
|
||||
+#define isl_pw_aff_is_cst (*isl_pointers__.p_isl_pw_aff_is_cst)
|
||||
+#define isl_pw_aff_le_set (*isl_pointers__.p_isl_pw_aff_le_set)
|
||||
+#define isl_pw_aff_lt_set (*isl_pointers__.p_isl_pw_aff_lt_set)
|
||||
+#define isl_pw_aff_mul (*isl_pointers__.p_isl_pw_aff_mul)
|
||||
+#define isl_pw_aff_ne_set (*isl_pointers__.p_isl_pw_aff_ne_set)
|
||||
+#define isl_pw_aff_nonneg_set (*isl_pointers__.p_isl_pw_aff_nonneg_set)
|
||||
+#define isl_pw_aff_set_tuple_id (*isl_pointers__.p_isl_pw_aff_set_tuple_id)
|
||||
+#define isl_pw_aff_sub (*isl_pointers__.p_isl_pw_aff_sub)
|
||||
+#define isl_pw_aff_zero_set (*isl_pointers__.p_isl_pw_aff_zero_set)
|
||||
+#define isl_schedule_free (*isl_pointers__.p_isl_schedule_free)
|
||||
+#define isl_schedule_get_band_forest (*isl_pointers__.p_isl_schedule_get_band_forest)
|
||||
+#define isl_set_add_constraint (*isl_pointers__.p_isl_set_add_constraint)
|
||||
+#define isl_set_add_dims (*isl_pointers__.p_isl_set_add_dims)
|
||||
+#define isl_set_apply (*isl_pointers__.p_isl_set_apply)
|
||||
+#define isl_set_coalesce (*isl_pointers__.p_isl_set_coalesce)
|
||||
+#define isl_set_copy (*isl_pointers__.p_isl_set_copy)
|
||||
+#define isl_set_dim (*isl_pointers__.p_isl_set_dim)
|
||||
+#define isl_set_fix_si (*isl_pointers__.p_isl_set_fix_si)
|
||||
+#define isl_set_free (*isl_pointers__.p_isl_set_free)
|
||||
+#define isl_set_get_space (*isl_pointers__.p_isl_set_get_space)
|
||||
+#define isl_set_get_tuple_id (*isl_pointers__.p_isl_set_get_tuple_id)
|
||||
+#define isl_set_intersect (*isl_pointers__.p_isl_set_intersect)
|
||||
+#define isl_set_is_empty (*isl_pointers__.p_isl_set_is_empty)
|
||||
+#define isl_set_n_dim (*isl_pointers__.p_isl_set_n_dim)
|
||||
+#define isl_set_nat_universe (*isl_pointers__.p_isl_set_nat_universe)
|
||||
+#define isl_set_project_out (*isl_pointers__.p_isl_set_project_out)
|
||||
+#define isl_set_set_tuple_id (*isl_pointers__.p_isl_set_set_tuple_id)
|
||||
+#define isl_set_universe (*isl_pointers__.p_isl_set_universe)
|
||||
+#define isl_space_add_dims (*isl_pointers__.p_isl_space_add_dims)
|
||||
+#define isl_space_alloc (*isl_pointers__.p_isl_space_alloc)
|
||||
+#define isl_space_copy (*isl_pointers__.p_isl_space_copy)
|
||||
+#define isl_space_dim (*isl_pointers__.p_isl_space_dim)
|
||||
+#define isl_space_domain (*isl_pointers__.p_isl_space_domain)
|
||||
+#define isl_space_find_dim_by_id (*isl_pointers__.p_isl_space_find_dim_by_id)
|
||||
+#define isl_space_free (*isl_pointers__.p_isl_space_free)
|
||||
+#define isl_space_from_domain (*isl_pointers__.p_isl_space_from_domain)
|
||||
+#define isl_space_get_tuple_id (*isl_pointers__.p_isl_space_get_tuple_id)
|
||||
+#define isl_space_params_alloc (*isl_pointers__.p_isl_space_params_alloc)
|
||||
+#define isl_space_range (*isl_pointers__.p_isl_space_range)
|
||||
+#define isl_space_set_alloc (*isl_pointers__.p_isl_space_set_alloc)
|
||||
+#define isl_space_set_dim_id (*isl_pointers__.p_isl_space_set_dim_id)
|
||||
+#define isl_space_set_tuple_id (*isl_pointers__.p_isl_space_set_tuple_id)
|
||||
+#define isl_union_map_add_map (*isl_pointers__.p_isl_union_map_add_map)
|
||||
+#define isl_union_map_align_params (*isl_pointers__.p_isl_union_map_align_params)
|
||||
+#define isl_union_map_apply_domain (*isl_pointers__.p_isl_union_map_apply_domain)
|
||||
+#define isl_union_map_apply_range (*isl_pointers__.p_isl_union_map_apply_range)
|
||||
+#define isl_union_map_compute_flow (*isl_pointers__.p_isl_union_map_compute_flow)
|
||||
+#define isl_union_map_copy (*isl_pointers__.p_isl_union_map_copy)
|
||||
+#define isl_union_map_empty (*isl_pointers__.p_isl_union_map_empty)
|
||||
+#define isl_union_map_flat_range_product (*isl_pointers__.p_isl_union_map_flat_range_product)
|
||||
+#define isl_union_map_foreach_map (*isl_pointers__.p_isl_union_map_foreach_map)
|
||||
+#define isl_union_map_free (*isl_pointers__.p_isl_union_map_free)
|
||||
+#define isl_union_map_from_map (*isl_pointers__.p_isl_union_map_from_map)
|
||||
+#define isl_union_map_get_ctx (*isl_pointers__.p_isl_union_map_get_ctx)
|
||||
+#define isl_union_map_get_space (*isl_pointers__.p_isl_union_map_get_space)
|
||||
+#define isl_union_map_gist_domain (*isl_pointers__.p_isl_union_map_gist_domain)
|
||||
+#define isl_union_map_gist_range (*isl_pointers__.p_isl_union_map_gist_range)
|
||||
+#define isl_union_map_intersect_domain (*isl_pointers__.p_isl_union_map_intersect_domain)
|
||||
+#define isl_union_map_is_empty (*isl_pointers__.p_isl_union_map_is_empty)
|
||||
+#define isl_union_map_subtract (*isl_pointers__.p_isl_union_map_subtract)
|
||||
+#define isl_union_map_union (*isl_pointers__.p_isl_union_map_union)
|
||||
+#define isl_union_set_add_set (*isl_pointers__.p_isl_union_set_add_set)
|
||||
+#define isl_union_set_compute_schedule (*isl_pointers__.p_isl_union_set_compute_schedule)
|
||||
+#define isl_union_set_copy (*isl_pointers__.p_isl_union_set_copy)
|
||||
+#define isl_union_set_empty (*isl_pointers__.p_isl_union_set_empty)
|
||||
+#define isl_union_set_from_set (*isl_pointers__.p_isl_union_set_from_set)
|
||||
+#define isl_aff_add_constant_val (*isl_pointers__.p_isl_aff_add_constant_val)
|
||||
+#define isl_aff_get_coefficient_val (*isl_pointers__.p_isl_aff_get_coefficient_val)
|
||||
+#define isl_aff_get_ctx (*isl_pointers__.p_isl_aff_get_ctx)
|
||||
+#define isl_aff_mod_val (*isl_pointers__.p_isl_aff_mod_val)
|
||||
+#define isl_ast_build_ast_from_schedule (*isl_pointers__.p_isl_ast_build_ast_from_schedule)
|
||||
+#define isl_ast_build_free (*isl_pointers__.p_isl_ast_build_free)
|
||||
+#define isl_ast_build_from_context (*isl_pointers__.p_isl_ast_build_from_context)
|
||||
+#define isl_ast_build_get_ctx (*isl_pointers__.p_isl_ast_build_get_ctx)
|
||||
+#define isl_ast_build_get_schedule (*isl_pointers__.p_isl_ast_build_get_schedule)
|
||||
+#define isl_ast_build_get_schedule_space (*isl_pointers__.p_isl_ast_build_get_schedule_space)
|
||||
+#define isl_ast_build_set_before_each_for (*isl_pointers__.p_isl_ast_build_set_before_each_for)
|
||||
+#define isl_ast_build_set_options (*isl_pointers__.p_isl_ast_build_set_options)
|
||||
+#define isl_ast_expr_free (*isl_pointers__.p_isl_ast_expr_free)
|
||||
+#define isl_ast_expr_from_val (*isl_pointers__.p_isl_ast_expr_from_val)
|
||||
+#define isl_ast_expr_get_ctx (*isl_pointers__.p_isl_ast_expr_get_ctx)
|
||||
+#define isl_ast_expr_get_id (*isl_pointers__.p_isl_ast_expr_get_id)
|
||||
+#define isl_ast_expr_get_op_arg (*isl_pointers__.p_isl_ast_expr_get_op_arg)
|
||||
+#define isl_ast_expr_get_op_n_arg (*isl_pointers__.p_isl_ast_expr_get_op_n_arg)
|
||||
+#define isl_ast_expr_get_op_type (*isl_pointers__.p_isl_ast_expr_get_op_type)
|
||||
+#define isl_ast_expr_get_type (*isl_pointers__.p_isl_ast_expr_get_type)
|
||||
+#define isl_ast_expr_get_val (*isl_pointers__.p_isl_ast_expr_get_val)
|
||||
+#define isl_ast_expr_sub (*isl_pointers__.p_isl_ast_expr_sub)
|
||||
+#define isl_ast_node_block_get_children (*isl_pointers__.p_isl_ast_node_block_get_children)
|
||||
+#define isl_ast_node_for_get_body (*isl_pointers__.p_isl_ast_node_for_get_body)
|
||||
+#define isl_ast_node_for_get_cond (*isl_pointers__.p_isl_ast_node_for_get_cond)
|
||||
+#define isl_ast_node_for_get_inc (*isl_pointers__.p_isl_ast_node_for_get_inc)
|
||||
+#define isl_ast_node_for_get_init (*isl_pointers__.p_isl_ast_node_for_get_init)
|
||||
+#define isl_ast_node_for_get_iterator (*isl_pointers__.p_isl_ast_node_for_get_iterator)
|
||||
+#define isl_ast_node_free (*isl_pointers__.p_isl_ast_node_free)
|
||||
+#define isl_ast_node_get_annotation (*isl_pointers__.p_isl_ast_node_get_annotation)
|
||||
+#define isl_ast_node_get_type (*isl_pointers__.p_isl_ast_node_get_type)
|
||||
+#define isl_ast_node_if_get_cond (*isl_pointers__.p_isl_ast_node_if_get_cond)
|
||||
+#define isl_ast_node_if_get_else (*isl_pointers__.p_isl_ast_node_if_get_else)
|
||||
+#define isl_ast_node_if_get_then (*isl_pointers__.p_isl_ast_node_if_get_then)
|
||||
+#define isl_ast_node_list_free (*isl_pointers__.p_isl_ast_node_list_free)
|
||||
+#define isl_ast_node_list_get_ast_node (*isl_pointers__.p_isl_ast_node_list_get_ast_node)
|
||||
+#define isl_ast_node_list_n_ast_node (*isl_pointers__.p_isl_ast_node_list_n_ast_node)
|
||||
+#define isl_ast_node_user_get_expr (*isl_pointers__.p_isl_ast_node_user_get_expr)
|
||||
+#define isl_constraint_set_coefficient_val (*isl_pointers__.p_isl_constraint_set_coefficient_val)
|
||||
+#define isl_constraint_set_constant_val (*isl_pointers__.p_isl_constraint_set_constant_val)
|
||||
+#define isl_id_get_user (*isl_pointers__.p_isl_id_get_user)
|
||||
+#define isl_local_space_get_ctx (*isl_pointers__.p_isl_local_space_get_ctx)
|
||||
+#define isl_map_fix_val (*isl_pointers__.p_isl_map_fix_val)
|
||||
+#define isl_options_set_ast_build_atomic_upper_bound (*isl_pointers__.p_isl_options_set_ast_build_atomic_upper_bound)
|
||||
+#define isl_printer_print_ast_node (*isl_pointers__.p_isl_printer_print_ast_node)
|
||||
+#define isl_printer_print_str (*isl_pointers__.p_isl_printer_print_str)
|
||||
+#define isl_printer_set_output_format (*isl_pointers__.p_isl_printer_set_output_format)
|
||||
+#define isl_pw_aff_mod_val (*isl_pointers__.p_isl_pw_aff_mod_val)
|
||||
+#define isl_schedule_constraints_compute_schedule (*isl_pointers__.p_isl_schedule_constraints_compute_schedule)
|
||||
+#define isl_schedule_constraints_on_domain (*isl_pointers__.p_isl_schedule_constraints_on_domain)
|
||||
+#define isl_schedule_constraints_set_coincidence (*isl_pointers__.p_isl_schedule_constraints_set_coincidence)
|
||||
+#define isl_schedule_constraints_set_proximity (*isl_pointers__.p_isl_schedule_constraints_set_proximity)
|
||||
+#define isl_schedule_constraints_set_validity (*isl_pointers__.p_isl_schedule_constraints_set_validity)
|
||||
+#define isl_set_get_dim_id (*isl_pointers__.p_isl_set_get_dim_id)
|
||||
+#define isl_set_max_val (*isl_pointers__.p_isl_set_max_val)
|
||||
+#define isl_set_min_val (*isl_pointers__.p_isl_set_min_val)
|
||||
+#define isl_set_params (*isl_pointers__.p_isl_set_params)
|
||||
+#define isl_space_align_params (*isl_pointers__.p_isl_space_align_params)
|
||||
+#define isl_space_map_from_domain_and_range (*isl_pointers__.p_isl_space_map_from_domain_and_range)
|
||||
+#define isl_space_set_tuple_name (*isl_pointers__.p_isl_space_set_tuple_name)
|
||||
+#define isl_space_wrap (*isl_pointers__.p_isl_space_wrap)
|
||||
+#define isl_union_map_from_domain_and_range (*isl_pointers__.p_isl_union_map_from_domain_and_range)
|
||||
+#define isl_union_map_range (*isl_pointers__.p_isl_union_map_range)
|
||||
+#define isl_union_set_union (*isl_pointers__.p_isl_union_set_union)
|
||||
+#define isl_union_set_universe (*isl_pointers__.p_isl_union_set_universe)
|
||||
+#define isl_val_2exp (*isl_pointers__.p_isl_val_2exp)
|
||||
+#define isl_val_add_ui (*isl_pointers__.p_isl_val_add_ui)
|
||||
+#define isl_val_copy (*isl_pointers__.p_isl_val_copy)
|
||||
+#define isl_val_free (*isl_pointers__.p_isl_val_free)
|
||||
+#define isl_val_int_from_si (*isl_pointers__.p_isl_val_int_from_si)
|
||||
+#define isl_val_int_from_ui (*isl_pointers__.p_isl_val_int_from_ui)
|
||||
+#define isl_val_mul (*isl_pointers__.p_isl_val_mul)
|
||||
+#define isl_val_neg (*isl_pointers__.p_isl_val_neg)
|
||||
+#define isl_val_sub (*isl_pointers__.p_isl_val_sub)
|
||||
+#define isl_printer_print_union_map (*isl_pointers__.p_isl_printer_print_union_map)
|
||||
+#define isl_pw_aff_get_ctx (*isl_pointers__.p_isl_pw_aff_get_ctx)
|
||||
+#define isl_val_is_int (*isl_pointers__.p_isl_val_is_int)
|
||||
+#define isl_ctx_get_max_operations (*isl_pointers__.p_isl_ctx_get_max_operations)
|
||||
+#define isl_ctx_set_max_operations (*isl_pointers__.p_isl_ctx_set_max_operations)
|
||||
+#define isl_ctx_last_error (*isl_pointers__.p_isl_ctx_last_error)
|
||||
+#define isl_ctx_reset_operations (*isl_pointers__.p_isl_ctx_reset_operations)
|
||||
+#define isl_map_coalesce (*isl_pointers__.p_isl_map_coalesce)
|
||||
+#define isl_printer_print_schedule (*isl_pointers__.p_isl_printer_print_schedule)
|
||||
+#define isl_set_set_dim_id (*isl_pointers__.p_isl_set_set_dim_id)
|
||||
+#define isl_union_map_coalesce (*isl_pointers__.p_isl_union_map_coalesce)
|
||||
+#define isl_multi_val_set_val (*isl_pointers__.p_isl_multi_val_set_val)
|
||||
+#define isl_multi_val_zero (*isl_pointers__.p_isl_multi_val_zero)
|
||||
+#define isl_options_set_schedule_max_coefficient (*isl_pointers__.p_isl_options_set_schedule_max_coefficient)
|
||||
+#define isl_options_set_tile_scale_tile_loops (*isl_pointers__.p_isl_options_set_tile_scale_tile_loops)
|
||||
+#define isl_schedule_copy (*isl_pointers__.p_isl_schedule_copy)
|
||||
+#define isl_schedule_get_map (*isl_pointers__.p_isl_schedule_get_map)
|
||||
+#define isl_schedule_map_schedule_node_bottom_up (*isl_pointers__.p_isl_schedule_map_schedule_node_bottom_up)
|
||||
+#define isl_schedule_node_band_get_permutable (*isl_pointers__.p_isl_schedule_node_band_get_permutable)
|
||||
+#define isl_schedule_node_band_get_space (*isl_pointers__.p_isl_schedule_node_band_get_space)
|
||||
+#define isl_schedule_node_band_tile (*isl_pointers__.p_isl_schedule_node_band_tile)
|
||||
+#define isl_schedule_node_child (*isl_pointers__.p_isl_schedule_node_child)
|
||||
+#define isl_schedule_node_free (*isl_pointers__.p_isl_schedule_node_free)
|
||||
+#define isl_schedule_node_get_child (*isl_pointers__.p_isl_schedule_node_get_child)
|
||||
+#define isl_schedule_node_get_ctx (*isl_pointers__.p_isl_schedule_node_get_ctx)
|
||||
+#define isl_schedule_node_get_type (*isl_pointers__.p_isl_schedule_node_get_type)
|
||||
+#define isl_schedule_node_n_children (*isl_pointers__.p_isl_schedule_node_n_children)
|
||||
+#define isl_union_map_is_equal (*isl_pointers__.p_isl_union_map_is_equal)
|
||||
+#define isl_union_access_info_compute_flow (*isl_pointers__.p_isl_union_access_info_compute_flow)
|
||||
+#define isl_union_access_info_from_sink (*isl_pointers__.p_isl_union_access_info_from_sink)
|
||||
+#define isl_union_access_info_set_may_source (*isl_pointers__.p_isl_union_access_info_set_may_source)
|
||||
+#define isl_union_access_info_set_must_source (*isl_pointers__.p_isl_union_access_info_set_must_source)
|
||||
+#define isl_union_access_info_set_schedule (*isl_pointers__.p_isl_union_access_info_set_schedule)
|
||||
+#define isl_union_flow_free (*isl_pointers__.p_isl_union_flow_free)
|
||||
+#define isl_union_flow_get_may_dependence (*isl_pointers__.p_isl_union_flow_get_may_dependence)
|
||||
+#define isl_union_flow_get_must_dependence (*isl_pointers__.p_isl_union_flow_get_must_dependence)
|
||||
+#define isl_aff_var_on_domain (*isl_pointers__.p_isl_aff_var_on_domain)
|
||||
+#define isl_multi_aff_from_aff (*isl_pointers__.p_isl_multi_aff_from_aff)
|
||||
+#define isl_schedule_get_ctx (*isl_pointers__.p_isl_schedule_get_ctx)
|
||||
+#define isl_multi_aff_set_tuple_id (*isl_pointers__.p_isl_multi_aff_set_tuple_id)
|
||||
+#define isl_multi_aff_dim (*isl_pointers__.p_isl_multi_aff_dim)
|
||||
+#define isl_schedule_get_domain (*isl_pointers__.p_isl_schedule_get_domain)
|
||||
+#define isl_union_set_is_empty (*isl_pointers__.p_isl_union_set_is_empty)
|
||||
+#define isl_union_set_get_space (*isl_pointers__.p_isl_union_set_get_space)
|
||||
+#define isl_union_pw_multi_aff_empty (*isl_pointers__.p_isl_union_pw_multi_aff_empty)
|
||||
+#define isl_union_set_foreach_set (*isl_pointers__.p_isl_union_set_foreach_set)
|
||||
+#define isl_union_set_free (*isl_pointers__.p_isl_union_set_free)
|
||||
+#define isl_multi_union_pw_aff_from_union_pw_multi_aff (*isl_pointers__.p_isl_multi_union_pw_aff_from_union_pw_multi_aff)
|
||||
+#define isl_multi_union_pw_aff_apply_multi_aff (*isl_pointers__.p_isl_multi_union_pw_aff_apply_multi_aff)
|
||||
+#define isl_schedule_insert_partial_schedule (*isl_pointers__.p_isl_schedule_insert_partial_schedule)
|
||||
+#define isl_union_pw_multi_aff_free (*isl_pointers__.p_isl_union_pw_multi_aff_free)
|
||||
+#define isl_pw_multi_aff_project_out_map (*isl_pointers__.p_isl_pw_multi_aff_project_out_map)
|
||||
+#define isl_union_pw_multi_aff_add_pw_multi_aff (*isl_pointers__.p_isl_union_pw_multi_aff_add_pw_multi_aff)
|
||||
+#define isl_schedule_from_domain (*isl_pointers__.p_isl_schedule_from_domain)
|
||||
+#define isl_schedule_sequence (*isl_pointers__.p_isl_schedule_sequence)
|
||||
+#define isl_ast_build_node_from_schedule (*isl_pointers__.p_isl_ast_build_node_from_schedule)
|
||||
+#define isl_ast_node_mark_get_node (*isl_pointers__.p_isl_ast_node_mark_get_node)
|
||||
+#define isl_schedule_node_band_member_get_ast_loop_type (*isl_pointers__.p_isl_schedule_node_band_member_get_ast_loop_type)
|
||||
+#define isl_schedule_node_band_member_set_ast_loop_type (*isl_pointers__.p_isl_schedule_node_band_member_set_ast_loop_type)
|
||||
+#define isl_val_n_abs_num_chunks (*isl_pointers__.p_isl_val_n_abs_num_chunks)
|
||||
+#define isl_val_get_abs_num_chunks (*isl_pointers__.p_isl_val_get_abs_num_chunks)
|
||||
+#define isl_val_int_from_chunks (*isl_pointers__.p_isl_val_int_from_chunks)
|
||||
+#define isl_val_is_neg (*isl_pointers__.p_isl_val_is_neg)
|
||||
+#define isl_version (*isl_pointers__.p_isl_version)
|
||||
+#define isl_options_get_on_error (*isl_pointers__.p_isl_options_get_on_error)
|
||||
+#define isl_ctx_reset_error (*isl_pointers__.p_isl_ctx_reset_error)
|
||||
|
||||
typedef struct poly_dr *poly_dr_p;
|
||||
|
||||
@@ -461,5 +1045,6 @@ extern void build_scops (vec<scop_p> *);
|
||||
extern void dot_all_sese (FILE *, vec<sese_l> &);
|
||||
extern void dot_sese (sese_l &);
|
||||
extern void dot_cfg ();
|
||||
+extern const char *get_isl_version (bool);
|
||||
|
||||
#endif
|
||||
--- gcc/graphite.c.jj 2015-11-04 14:15:32.000000000 +0100
|
||||
+++ gcc/graphite.c 2015-11-04 14:56:02.645536409 +0100
|
||||
@@ -60,6 +60,35 @@ along with GCC; see the file COPYING3.
|
||||
#include "tree-into-ssa.h"
|
||||
#include "graphite.h"
|
||||
|
||||
+__typeof (isl_pointers__) isl_pointers__;
|
||||
+
|
||||
+static bool
|
||||
+init_isl_pointers (void)
|
||||
+{
|
||||
+ void *h;
|
||||
+
|
||||
+ if (isl_pointers__.inited)
|
||||
+ return isl_pointers__.h != NULL;
|
||||
+ h = dlopen ("libisl.so.15", RTLD_LAZY);
|
||||
+ isl_pointers__.h = h;
|
||||
+ if (h == NULL)
|
||||
+ return false;
|
||||
+#define DYNSYM(x) \
|
||||
+ do \
|
||||
+ { \
|
||||
+ union { __typeof (isl_pointers__.p_##x) p; void *q; } u; \
|
||||
+ u.q = dlsym (h, #x); \
|
||||
+ if (u.q == NULL) \
|
||||
+ return false; \
|
||||
+ isl_pointers__.p_##x = u.p; \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+ DYNSYMS
|
||||
+#undef DYNSYM
|
||||
+ isl_pointers__.inited = true;
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
/* Print global statistics to FILE. */
|
||||
|
||||
static void
|
||||
@@ -365,6 +394,15 @@ graphite_transform_loops (void)
|
||||
if (parallelized_function_p (cfun->decl))
|
||||
return;
|
||||
|
||||
+ if (number_of_loops (cfun) <= 1)
|
||||
+ return;
|
||||
+
|
||||
+ if (!init_isl_pointers ())
|
||||
+ {
|
||||
+ sorry ("Graphite loop optimizations cannot be used");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
calculate_dominance_info (CDI_DOMINATORS);
|
||||
|
||||
/* We rely on post-dominators during merging of SESE regions so those
|
||||
@@ -455,6 +493,14 @@ graphite_transform_loops (void)
|
||||
}
|
||||
}
|
||||
|
||||
+const char *
|
||||
+get_isl_version (bool force)
|
||||
+{
|
||||
+ if (force)
|
||||
+ init_isl_pointers ();
|
||||
+ return (isl_pointers__.inited && isl_version) ? isl_version () : "none";
|
||||
+}
|
||||
+
|
||||
#else /* If isl is not available: #ifndef HAVE_isl. */
|
||||
|
||||
static void
|
||||
--- gcc/toplev.c.jj 2017-02-19 13:02:31.000000000 +0100
|
||||
+++ gcc/toplev.c 2017-02-19 16:50:25.536301350 +0100
|
||||
@@ -94,6 +94,7 @@ along with GCC; see the file COPYING3.
|
||||
|
||||
#ifdef HAVE_isl
|
||||
#include <isl/version.h>
|
||||
+extern const char *get_isl_version (bool);
|
||||
#endif
|
||||
|
||||
static void general_init (const char *, bool);
|
||||
@@ -683,7 +684,7 @@ print_version (FILE *file, const char *i
|
||||
#ifndef HAVE_isl
|
||||
"none"
|
||||
#else
|
||||
- isl_version ()
|
||||
+ get_isl_version (*indent == 0)
|
||||
#endif
|
||||
);
|
||||
if (strcmp (GCC_GMP_STRINGIFY_VERSION, gmp_version))
|
|
@ -1,17 +0,0 @@
|
|||
2008-06-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* omp.h.in (omp_nest_lock_t): Fix up for Linux multilibs.
|
||||
|
||||
--- libgomp/omp.h.in.jj 2008-06-09 13:34:05.000000000 +0200
|
||||
+++ libgomp/omp.h.in 2008-06-09 13:34:48.000000000 +0200
|
||||
@@ -42,8 +42,8 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
- unsigned char _x[@OMP_NEST_LOCK_SIZE@]
|
||||
- __attribute__((__aligned__(@OMP_NEST_LOCK_ALIGN@)));
|
||||
+ unsigned char _x[8 + sizeof (void *)]
|
||||
+ __attribute__((__aligned__(sizeof (void *))));
|
||||
} omp_nest_lock_t;
|
||||
#endif
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
--- libstdc++-v3/doc/html/index.html.jj 2011-01-03 12:53:21.282829010 +0100
|
||||
+++ libstdc++-v3/doc/html/index.html 2011-01-04 18:06:28.999851145 +0100
|
||||
@@ -5,6 +5,8 @@
|
||||
<a class="link" href="https://www.fsf.org" target="_top">FSF
|
||||
</a>
|
||||
</p><p>
|
||||
+ Release 10.0.1
|
||||
+ </p><p>
|
||||
Permission is granted to copy, distribute and/or modify this
|
||||
document under the terms of the GNU Free Documentation
|
||||
License, Version 1.2 or any later version published by the
|
||||
--- libstdc++-v3/doc/html/api.html.jj 2011-01-03 12:53:21.000000000 +0100
|
||||
+++ libstdc++-v3/doc/html/api.html 2011-01-04 18:12:01.672757784 +0100
|
||||
@@ -20,7 +20,9 @@
|
||||
member functions for the library classes, finding out what is in a
|
||||
particular include file, looking at inheritance diagrams, etc.
|
||||
</p><p>
|
||||
- The API documentation, rendered into HTML, can be viewed online
|
||||
+ The API documentation, rendered into HTML, can be viewed locally
|
||||
+ <a class="link" href="api/index.html" target="_top">for the 10.0.1 release</a>,
|
||||
+ online
|
||||
<a class="link" href="http://gcc.gnu.org/onlinedocs/" target="_top">for each GCC release</a>
|
||||
and
|
||||
<a class="link" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/index.html" target="_top">
|
|
@ -1,27 +0,0 @@
|
|||
libtool sucks.
|
||||
--- ltmain.sh.jj 2007-12-07 14:53:21.000000000 +0100
|
||||
+++ ltmain.sh 2008-09-05 21:51:48.000000000 +0200
|
||||
@@ -5394,6 +5394,7 @@ EOF
|
||||
rpath="$finalize_rpath"
|
||||
test "$mode" != relink && rpath="$compile_rpath$rpath"
|
||||
for libdir in $rpath; do
|
||||
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
if test -z "$hardcode_libdirs"; then
|
||||
@@ -6071,6 +6072,7 @@ EOF
|
||||
rpath=
|
||||
hardcode_libdirs=
|
||||
for libdir in $compile_rpath $finalize_rpath; do
|
||||
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
if test -z "$hardcode_libdirs"; then
|
||||
@@ -6120,6 +6122,7 @@ EOF
|
||||
rpath=
|
||||
hardcode_libdirs=
|
||||
for libdir in $finalize_rpath; do
|
||||
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
if test -z "$hardcode_libdirs"; then
|
|
@ -1,37 +0,0 @@
|
|||
2010-02-08 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* config/gnu-user.h (LINK_EH_SPEC): Pass --no-add-needed to the linker.
|
||||
* config/alpha/elf.h (LINK_EH_SPEC): Likewise.
|
||||
* config/ia64/linux.h (LINK_EH_SPEC): Likewise.
|
||||
|
||||
--- gcc/config/alpha/elf.h.jj 2011-01-03 12:52:31.118056764 +0100
|
||||
+++ gcc/config/alpha/elf.h 2011-01-04 18:14:10.931874160 +0100
|
||||
@@ -168,5 +168,5 @@ extern int alpha_this_gpdisp_sequence_nu
|
||||
I imagine that other systems will catch up. In the meantime, it
|
||||
doesn't harm to make sure that the data exists to be used later. */
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
-#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
|
||||
+#define LINK_EH_SPEC "--no-add-needed %{!static|static-pie:--eh-frame-hdr} "
|
||||
#endif
|
||||
--- gcc/config/ia64/linux.h.jj 2011-01-03 13:02:11.462994522 +0100
|
||||
+++ gcc/config/ia64/linux.h 2011-01-04 18:14:10.931874160 +0100
|
||||
@@ -76,7 +76,7 @@ do { \
|
||||
Signalize that because we have fde-glibc, we don't need all C shared libs
|
||||
linked against -lgcc_s. */
|
||||
#undef LINK_EH_SPEC
|
||||
-#define LINK_EH_SPEC ""
|
||||
+#define LINK_EH_SPEC "--no-add-needed "
|
||||
|
||||
#undef TARGET_INIT_LIBFUNCS
|
||||
#define TARGET_INIT_LIBFUNCS ia64_soft_fp_init_libfuncs
|
||||
--- gcc/config/gnu-user.h.jj 2011-01-03 12:53:03.739057299 +0100
|
||||
+++ gcc/config/gnu-user.h 2011-01-04 18:14:10.932814884 +0100
|
||||
@@ -106,7 +106,7 @@ see the files COPYING3 and COPYING.RUNTI
|
||||
#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
|
||||
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
-#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
|
||||
+#define LINK_EH_SPEC "--no-add-needed %{!static|static-pie:--eh-frame-hdr} "
|
||||
#endif
|
||||
|
||||
#define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \
|
|
@ -1,30 +0,0 @@
|
|||
crt files and statically linked libgcc objects cause false positives
|
||||
in annobin coverage, so we add the assembler flag to generate notes
|
||||
for them.
|
||||
|
||||
The patch also adds notes to libgcc_s.so, but this is harmless because
|
||||
these notes only confer that there is no other annobin markup.
|
||||
|
||||
2018-07-25 Florian Weimer <fweimer@redhat.com>
|
||||
|
||||
* Makefile.in (LIBGCC2_CFLAGS, CRTSTUFF_CFLAGS): Add
|
||||
-Wa,--generate-missing-build-notes=yes.
|
||||
|
||||
--- libgcc/Makefile.in 2018-01-13 13:05:41.000000000 +0100
|
||||
+++ libgcc/Makefile.in 2018-07-25 13:15:02.036226940 +0200
|
||||
@@ -246,6 +246,7 @@ LIBGCC2_DEBUG_CFLAGS = -g
|
||||
LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
|
||||
$(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \
|
||||
-fbuilding-libgcc -fno-stack-protector \
|
||||
+ -Wa,--generate-missing-build-notes=yes \
|
||||
$(INHIBIT_LIBC_CFLAGS)
|
||||
|
||||
# Additional options to use when compiling libgcc2.a.
|
||||
@@ -301,6 +302,7 @@ CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(IN
|
||||
$(NO_PIE_CFLAGS) -finhibit-size-directive -fno-inline -fno-exceptions \
|
||||
-fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
|
||||
-fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \
|
||||
+ -Wa,--generate-missing-build-notes=yes \
|
||||
$(INHIBIT_LIBC_CFLAGS) $(USE_TM_CLONE_REGISTRY)
|
||||
|
||||
# Extra flags to use when compiling crt{begin,end}.o.
|
|
@ -1,40 +0,0 @@
|
|||
--- gcc/config.gcc.jj 2008-04-24 15:42:46.000000000 -0500
|
||||
+++ gcc/config.gcc 2008-04-24 15:44:51.000000000 -0500
|
||||
@@ -2790,7 +2790,7 @@ sparc-*-rtems*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
|
||||
tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems"
|
||||
;;
|
||||
-sparc-*-linux*)
|
||||
+sparc-*-linux* | sparcv9-*-linux*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
|
||||
extra_options="${extra_options} sparc/long-double-switch.opt"
|
||||
case ${target} in
|
||||
@@ -2844,7 +2844,7 @@ sparc64-*-rtems*)
|
||||
extra_options="${extra_options}"
|
||||
tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64"
|
||||
;;
|
||||
-sparc64-*-linux*)
|
||||
+sparc64*-*-linux*)
|
||||
tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default64.h sparc/linux64.h sparc/tso.h"
|
||||
extra_options="${extra_options} sparc/long-double-switch.opt"
|
||||
tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
|
||||
--- libgcc/config.host.jj 2008-04-24 15:46:19.000000000 -0500
|
||||
+++ libgcc/config.host 2008-04-24 15:46:49.000000000 -0500
|
||||
@@ -1002,7 +1002,7 @@ sparc-*-elf*)
|
||||
tmake_file="${tmake_file} t-fdpbit t-crtfm"
|
||||
extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
|
||||
;;
|
||||
-sparc-*-linux*) # SPARC's running GNU/Linux, libc6
|
||||
+sparc-*-linux* | sparcv9-*-linux*) # SPARC's running GNU/Linux, libc6
|
||||
tmake_file="${tmake_file} t-crtfm"
|
||||
if test "${host_address}" = 64; then
|
||||
tmake_file="$tmake_file sparc/t-linux64"
|
||||
@@ -1050,7 +1050,7 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd*
|
||||
tmake_file="$tmake_file t-crtfm"
|
||||
extra_parts="$extra_parts crtfastmath.o"
|
||||
;;
|
||||
-sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux
|
||||
+sparc64*-*-linux*) # 64-bit SPARC's running GNU/Linux
|
||||
extra_parts="$extra_parts crtfastmath.o"
|
||||
tmake_file="${tmake_file} t-crtfm sparc/t-linux"
|
||||
if test "${host_address}" = 64; then
|
|
@ -0,0 +1,19 @@
|
|||
--- gcc/testsuite/ada/acats/run_all.sh 26 Apr 2004 21:15:54 -0000 1.18
|
||||
+++ gcc/testsuite/ada/acats/run_all.sh 17 Feb 2005 14:24:49 -0000
|
||||
@@ -11,9 +11,16 @@
|
||||
|
||||
gccflags="-O2"
|
||||
gnatflags="-gnatws"
|
||||
+timeout=120
|
||||
|
||||
target_run () {
|
||||
+ sh -c "(sleep $timeout; kill \$\$) &
|
||||
+x=\$!
|
||||
$*
|
||||
+s=\$?
|
||||
+kill \$x
|
||||
+exit \$s
|
||||
+"
|
||||
}
|
||||
|
||||
# End of customization section.
|
|
@ -0,0 +1,67 @@
|
|||
2004-10-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* gnat_ugn.texi: Add : and . to direntry.
|
||||
* gnat-style.texi: Change dircategory to GNU Ada tools.
|
||||
|
||||
2005-02-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* Makefile.in (gnatlib-shared-default): Disallow dlopening of
|
||||
libgnat.so.
|
||||
|
||||
--- gcc/ada/gnat-style.texi (.../gcc-4_0-branch) (revision 107266)
|
||||
+++ gcc/ada/gnat-style.texi (.../redhat/gcc-4_0-branch) (revision 107414)
|
||||
@@ -28,7 +28,7 @@
|
||||
@setchapternewpage odd
|
||||
|
||||
|
||||
-@dircategory Programming
|
||||
+@dircategory GNU Ada tools
|
||||
@direntry
|
||||
* gnat-style: (gnat-style). GNAT Coding Style
|
||||
@end direntry
|
||||
--- gcc/ada/Makefile.in (.../gcc-4_0-branch) (revision 107266)
|
||||
+++ gcc/ada/Makefile.in (.../redhat/gcc-4_0-branch) (revision 107414)
|
||||
@@ -1316,7 +1316,7 @@
|
||||
LIBRARY_VERSION := $(LIB_VERSION)
|
||||
endif
|
||||
|
||||
-ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
|
||||
+ifeq ($(strip $(filter-out powerpc% ppc% linux%,$(arch) $(osys))),)
|
||||
LIBGNAT_TARGET_PAIRS = \
|
||||
a-intnam.ads<a-intnam-linux.ads \
|
||||
s-inmaop.adb<s-inmaop-posix.adb \
|
||||
@@ -1862,7 +1862,7 @@
|
||||
THREAD_KIND="$(THREAD_KIND)" \
|
||||
gnatlib
|
||||
$(RM) rts/libgna*$(soext)
|
||||
- cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
|
||||
+ cd rts; ../../xgcc -B../../ -shared -Wl,-z,nodlopen $(TARGET_LIBGCC2_CFLAGS) \
|
||||
-o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
|
||||
$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
|
||||
$(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
|
||||
--- gcc/ada/gnat_ugn.texi (.../gcc-4_0-branch) (revision 107266)
|
||||
+++ gcc/ada/gnat_ugn.texi (.../redhat/gcc-4_0-branch) (revision 107414)
|
||||
@@ -101,7 +101,7 @@
|
||||
@settitle @value{EDITION} User's Guide @value{PLATFORM}
|
||||
@dircategory GNU Ada tools
|
||||
@direntry
|
||||
-* @value{EDITION} User's Guide (@value{FILE}) @value{PLATFORM}
|
||||
+* @value{EDITION} User's Guide: (@value{FILE}). User's Guide for GNU Ada Tools.
|
||||
@end direntry
|
||||
|
||||
@include gcc-common.texi
|
||||
--- gcc/ada/link.c (.../gcc-4_0-branch) (revision 107266)
|
||||
+++ gcc/ada/link.c (.../redhat/gcc-4_0-branch) (revision 107414)
|
||||
@@ -164,9 +164,9 @@
|
||||
|
||||
#elif defined (linux)
|
||||
const char *__gnat_object_file_option = "";
|
||||
-const char *__gnat_run_path_option = "-Wl,-rpath,";
|
||||
-char __gnat_shared_libgnat_default = STATIC;
|
||||
-int __gnat_link_max = 8192;
|
||||
+const char *__gnat_run_path_option = "";
|
||||
+char __gnat_shared_libgnat_default = SHARED;
|
||||
+int __gnat_link_max = 131072;
|
||||
unsigned char __gnat_objlist_file_supported = 1;
|
||||
unsigned char __gnat_using_gnu_linker = 1;
|
||||
const char *__gnat_object_library_extension = ".a";
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,74 @@
|
|||
2007-07-22 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* config/rs6000/sysv4.h (LINK_EH_SPEC): Add --build-id for
|
||||
non-relocatable link.
|
||||
* config/linux.h (LINK_EH_SPEC): Likewise.
|
||||
* config/sparc/linux.h (LINK_EH_SPEC): Likewise.
|
||||
* config/sparc/linux64.h (LINK_EH_SPEC): Likewise.
|
||||
* config/alpha/elf.h (LINK_EH_SPEC): Likewise.
|
||||
* config/ia64/linux.h (LINK_EH_SPEC): Likewise.
|
||||
|
||||
--- gcc/config/rs6000/sysv4.h.~1~
|
||||
+++ gcc/config/rs6000/sysv4.h
|
||||
@@ -1044,7 +1044,7 @@ extern int fixuplabelno;
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
|
||||
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
-# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
+# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
|
||||
#endif
|
||||
|
||||
#define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
|
||||
--- gcc/config/linux.h.~1~
|
||||
+++ gcc/config/linux.h
|
||||
@@ -85,7 +85,7 @@ Boston, MA 02110-1301, USA. */
|
||||
} while (0)
|
||||
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
|
||||
#endif
|
||||
|
||||
/* Define this so we can compile MS code for use with WINE. */
|
||||
--- gcc/config/sparc/linux64.h.~1~
|
||||
+++ gcc/config/sparc/linux64.h
|
||||
@@ -316,7 +316,7 @@ do { \
|
||||
#define DITF_CONVERSION_LIBFUNCS 1
|
||||
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_AS_TLS
|
||||
--- gcc/config/sparc/linux.h.~1~
|
||||
+++ gcc/config/sparc/linux.h
|
||||
@@ -188,7 +188,7 @@ do { \
|
||||
#define DITF_CONVERSION_LIBFUNCS 1
|
||||
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_AS_TLS
|
||||
--- gcc/config/alpha/elf.h.~1~
|
||||
+++ gcc/config/alpha/elf.h
|
||||
@@ -453,5 +453,5 @@ extern int alpha_this_gpdisp_sequence_nu
|
||||
I imagine that other systems will catch up. In the meantime, it
|
||||
doesn't harm to make sure that the data exists to be used later. */
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
|
||||
#endif
|
||||
--- gcc/config/ia64/linux.h.~1~
|
||||
+++ gcc/config/ia64/linux.h
|
||||
@@ -56,7 +56,7 @@ do { \
|
||||
Signalize that because we have fde-glibc, we don't need all C shared libs
|
||||
linked against -lgcc_s. */
|
||||
#undef LINK_EH_SPEC
|
||||
-#define LINK_EH_SPEC ""
|
||||
+#define LINK_EH_SPEC "%{!r:--build-id} "
|
||||
|
||||
#define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h"
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
2007-10-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* decl.c (duplicate_decls): When redeclaring a builtin function,
|
||||
keep the merged decl builtin whenever types match, even if new
|
||||
decl defines a function.
|
||||
|
||||
* gcc.dg/builtins-65.c: New test.
|
||||
* g++.dg/ext/builtin10.C: New test.
|
||||
|
||||
--- gcc/cp/decl.c.jj 2007-10-01 22:11:09.000000000 +0200
|
||||
+++ gcc/cp/decl.c 2007-10-02 11:39:46.000000000 +0200
|
||||
@@ -1988,23 +1988,21 @@ duplicate_decls (tree newdecl, tree oldd
|
||||
DECL_ARGUMENTS (olddecl) = DECL_ARGUMENTS (newdecl);
|
||||
DECL_RESULT (olddecl) = DECL_RESULT (newdecl);
|
||||
}
|
||||
+ /* If redeclaring a builtin function, it stays built in. */
|
||||
+ if (types_match && DECL_BUILT_IN (olddecl))
|
||||
+ {
|
||||
+ DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
|
||||
+ DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
|
||||
+ /* If we're keeping the built-in definition, keep the rtl,
|
||||
+ regardless of declaration matches. */
|
||||
+ COPY_DECL_RTL (olddecl, newdecl);
|
||||
+ }
|
||||
if (new_defines_function)
|
||||
/* If defining a function declared with other language
|
||||
linkage, use the previously declared language linkage. */
|
||||
SET_DECL_LANGUAGE (newdecl, DECL_LANGUAGE (olddecl));
|
||||
else if (types_match)
|
||||
{
|
||||
- /* If redeclaring a builtin function, and not a definition,
|
||||
- it stays built in. */
|
||||
- if (DECL_BUILT_IN (olddecl))
|
||||
- {
|
||||
- DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
|
||||
- DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
|
||||
- /* If we're keeping the built-in definition, keep the rtl,
|
||||
- regardless of declaration matches. */
|
||||
- COPY_DECL_RTL (olddecl, newdecl);
|
||||
- }
|
||||
-
|
||||
DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
|
||||
/* Don't clear out the arguments if we're redefining a function. */
|
||||
if (DECL_ARGUMENTS (olddecl))
|
||||
--- gcc/testsuite/gcc.dg/builtins-65.c.jj 2007-10-02 11:23:51.000000000 +0200
|
||||
+++ gcc/testsuite/gcc.dg/builtins-65.c 2007-10-02 11:24:12.000000000 +0200
|
||||
@@ -0,0 +1,25 @@
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+typedef __SIZE_TYPE__ size_t;
|
||||
+extern void __chk_fail (void);
|
||||
+extern int snprintf (char *, size_t, const char *, ...);
|
||||
+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
|
||||
+{
|
||||
+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
|
||||
+ __chk_fail ();
|
||||
+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
|
||||
+}
|
||||
+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
|
||||
+
|
||||
+char buf[10];
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ snprintf (buf, 10, "%d%d\n", 10, 10);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-assembler "mysnprintf" } } */
|
||||
+/* { dg-final { scan-assembler-not "__chk_fail" } } */
|
||||
--- gcc/testsuite/g++.dg/ext/builtin10.C.jj 2007-10-02 11:19:45.000000000 +0200
|
||||
+++ gcc/testsuite/g++.dg/ext/builtin10.C 2007-10-02 11:23:26.000000000 +0200
|
||||
@@ -0,0 +1,27 @@
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-O2" }
|
||||
+
|
||||
+typedef __SIZE_TYPE__ size_t;
|
||||
+extern "C" {
|
||||
+extern void __chk_fail (void);
|
||||
+extern int snprintf (char *, size_t, const char *, ...);
|
||||
+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
|
||||
+{
|
||||
+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
|
||||
+ __chk_fail ();
|
||||
+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
|
||||
+}
|
||||
+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
|
||||
+}
|
||||
+
|
||||
+char buf[10];
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ snprintf (buf, 10, "%d%d\n", 10, 10);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+// { dg-final { scan-assembler "mysnprintf" } }
|
||||
+// { dg-final { scan-assembler-not "__chk_fail" } }
|
|
@ -0,0 +1,65 @@
|
|||
2007-10-01 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* decl.c (duplicate_decls): Preserve linkage flags for mere
|
||||
redeclarations of gnu_inline definitions.
|
||||
|
||||
* g++.dg/ext/gnu-inline-global-redecl.C: New.
|
||||
|
||||
--- gcc/cp/decl.c.orig 2007-09-28 00:02:33.000000000 -0300
|
||||
+++ gcc/cp/decl.c 2007-10-01 16:33:10.000000000 -0300
|
||||
@@ -1846,24 +1846,24 @@ duplicate_decls (tree newdecl, tree oldd
|
||||
new_template = NULL_TREE;
|
||||
if (DECL_LANG_SPECIFIC (newdecl) && DECL_LANG_SPECIFIC (olddecl))
|
||||
{
|
||||
- bool old_decl_gnu_inline;
|
||||
+ bool new_redefines_gnu_inline = false;
|
||||
|
||||
- if ((DECL_INTERFACE_KNOWN (olddecl)
|
||||
- && TREE_CODE (olddecl) == FUNCTION_DECL)
|
||||
- || (TREE_CODE (olddecl) == TEMPLATE_DECL
|
||||
- && TREE_CODE (DECL_TEMPLATE_RESULT (olddecl)) == FUNCTION_DECL))
|
||||
+ if (new_defines_function
|
||||
+ && ((DECL_INTERFACE_KNOWN (olddecl)
|
||||
+ && TREE_CODE (olddecl) == FUNCTION_DECL)
|
||||
+ || (TREE_CODE (olddecl) == TEMPLATE_DECL
|
||||
+ && (TREE_CODE (DECL_TEMPLATE_RESULT (olddecl))
|
||||
+ == FUNCTION_DECL))))
|
||||
{
|
||||
tree fn = olddecl;
|
||||
|
||||
if (TREE_CODE (fn) == TEMPLATE_DECL)
|
||||
fn = DECL_TEMPLATE_RESULT (olddecl);
|
||||
|
||||
- old_decl_gnu_inline = GNU_INLINE_P (fn) && DECL_INITIAL (fn);
|
||||
+ new_redefines_gnu_inline = GNU_INLINE_P (fn) && DECL_INITIAL (fn);
|
||||
}
|
||||
- else
|
||||
- old_decl_gnu_inline = false;
|
||||
|
||||
- if (!old_decl_gnu_inline)
|
||||
+ if (!new_redefines_gnu_inline)
|
||||
{
|
||||
DECL_INTERFACE_KNOWN (newdecl) |= DECL_INTERFACE_KNOWN (olddecl);
|
||||
DECL_NOT_REALLY_EXTERN (newdecl) |= DECL_NOT_REALLY_EXTERN (olddecl);
|
||||
--- gcc/testsuite/g++.dg/ext/gnu-inline-global-redecl.C 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gcc/testsuite/g++.dg/ext/gnu-inline-global-redecl.C 2007-10-01 16:45:49.000000000 -0300
|
||||
@@ -0,0 +1,19 @@
|
||||
+/* Test __attribute__((gnu_inline)).
|
||||
+
|
||||
+ Check that we don't get out-of-line definitions for extern inline
|
||||
+ gnu_inline functions, regardless of redeclaration.
|
||||
+
|
||||
+ */
|
||||
+
|
||||
+/* { dg-do link } */
|
||||
+/* { dg-options "-O" } */ // such that static functions are optimized out
|
||||
+
|
||||
+#include "gnu-inline-common.h"
|
||||
+
|
||||
+decl(extern, fn)
|
||||
+gnuindef(fn, 0)
|
||||
+decl(extern, fn)
|
||||
+
|
||||
+int main () {
|
||||
+ fn ();
|
||||
+}
|
|
@ -0,0 +1,36 @@
|
|||
2007-09-06 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* g++.dg/ext/visibility/guard1.C: New test.
|
||||
|
||||
--- gcc/testsuite/g++.dg/ext/visibility/guard1.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/ext/visibility/guard1.C (revision 128226)
|
||||
@@ -0,0 +1,29 @@
|
||||
+// { dg-options "-fvisibility=hidden" }
|
||||
+// { dg-require-visibility "" }
|
||||
+// { dg-final { scan-not-hidden "_ZGVZN5otherclEvE4s_cd" } }
|
||||
+
|
||||
+extern "C" int printf (const char *, ...);
|
||||
+
|
||||
+#define DLLEXPORT __attribute__ ((visibility("default")))
|
||||
+
|
||||
+struct class_data
|
||||
+{
|
||||
+ int apple;
|
||||
+ class_data() { printf("non trivial ctor\n"); }
|
||||
+};
|
||||
+
|
||||
+struct DLLEXPORT other
|
||||
+{
|
||||
+ class_data* operator ()()
|
||||
+ {
|
||||
+ static class_data s_cd;
|
||||
+ return &s_cd;
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+int main()
|
||||
+{
|
||||
+ other aFoo;
|
||||
+ aFoo();
|
||||
+ return 0;
|
||||
+}
|
|
@ -0,0 +1,33 @@
|
|||
2007-12-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* dwarf2out.c (gen_array_type_die, gen_descr_array_type_die): For
|
||||
Fortran multi-dimensional arrays use DW_AT_ordering
|
||||
DW_ORD_col_major.
|
||||
|
||||
--- gcc/dwarf2out.c (revision 130741)
|
||||
+++ gcc/dwarf2out.c (revision 130742)
|
||||
@@ -11636,6 +11636,12 @@ gen_array_type_die (tree type, dw_die_re
|
||||
add_AT_flag (array_die, DW_AT_GNU_vector, 1);
|
||||
}
|
||||
|
||||
+ /* For Fortran multidimensional arrays use DW_ORD_col_major ordering. */
|
||||
+ if (is_fortran ()
|
||||
+ && TREE_CODE (type) == ARRAY_TYPE
|
||||
+ && TREE_CODE (TREE_TYPE (type)) == ARRAY_TYPE)
|
||||
+ add_AT_unsigned (array_die, DW_AT_ordering, DW_ORD_col_major);
|
||||
+
|
||||
#if 0
|
||||
/* We default the array ordering. SDB will probably do
|
||||
the right things even if DW_AT_ordering is not present. It's not even
|
||||
@@ -11787,6 +11793,11 @@ gen_descr_array_type_die (tree type, str
|
||||
add_name_attribute (array_die, type_tag (type));
|
||||
equate_type_number_to_die (type, array_die);
|
||||
|
||||
+ /* For Fortran multidimensional arrays use DW_ORD_col_major ordering. */
|
||||
+ if (is_fortran ()
|
||||
+ && info->ndimensions >= 2)
|
||||
+ add_AT_unsigned (array_die, DW_AT_ordering, DW_ORD_col_major);
|
||||
+
|
||||
if (info->data_location)
|
||||
add_descr_info_field (array_die, DW_AT_data_location, info->data_location,
|
||||
info->base_decl);
|
|
@ -0,0 +1,22 @@
|
|||
2006-05-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* crtstuff.c (__dso_handle): Make __dso_handle const.
|
||||
|
||||
--- gcc/crtstuff.c.jj 2005-11-16 10:02:51.000000000 +0100
|
||||
+++ gcc/crtstuff.c 2006-05-12 18:28:18.000000000 +0200
|
||||
@@ -226,12 +226,12 @@ STATIC void *__JCR_LIST__[]
|
||||
dynamic linker takes care of this. */
|
||||
|
||||
#ifdef HAVE_GAS_HIDDEN
|
||||
-extern void *__dso_handle __attribute__ ((__visibility__ ("hidden")));
|
||||
+extern void *const __dso_handle __attribute__ ((__visibility__ ("hidden")));
|
||||
#endif
|
||||
#ifdef CRTSTUFFS_O
|
||||
-void *__dso_handle = &__dso_handle;
|
||||
+void *const __dso_handle = (void *) &__dso_handle;
|
||||
#else
|
||||
-void *__dso_handle = 0;
|
||||
+void *const __dso_handle = 0;
|
||||
#endif
|
||||
|
||||
/* The __cxa_finalize function may not be available so we use only a
|
|
@ -0,0 +1,295 @@
|
|||
2007-09-23 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* expr.c (expand_expr_real_1) <case CALL_EXPR>: Use get_callee_fndecl
|
||||
instead of checking CALL_EXPR_FN directly to test for builtins.
|
||||
If error or warning attributes are present, print
|
||||
error resp. warning.
|
||||
* c-common.c (handle_error_attribute): New function.
|
||||
(c_common_attribute_table): Add error and warning
|
||||
attributes.
|
||||
* doc/extend.texi: Document error and warning attributes.
|
||||
|
||||
* gcc.dg/va-arg-pack-len-1.c: Use error and warning
|
||||
attributes.
|
||||
* gcc.dg/va-arg-pack-len-2.c: New test.
|
||||
* g++.dg/ext/va-arg-pack-len-1.C: Use error and warning
|
||||
attributes.
|
||||
* g++.dg/ext/va-arg-pack-len-2.C: New test.
|
||||
|
||||
--- gcc/doc/extend.texi.jj 2007-09-25 15:04:15.000000000 +0200
|
||||
+++ gcc/doc/extend.texi 2007-09-25 15:32:22.000000000 +0200
|
||||
@@ -1589,8 +1589,8 @@ attributes are currently defined for fun
|
||||
@code{section}, @code{constructor}, @code{destructor}, @code{used},
|
||||
@code{unused}, @code{deprecated}, @code{weak}, @code{malloc},
|
||||
@code{alias}, @code{warn_unused_result}, @code{nonnull},
|
||||
-@code{gnu_inline}, @code{externally_visible} and @code{artificial}.
|
||||
-Several other
|
||||
+@code{gnu_inline}, @code{externally_visible}, @code{artificial},
|
||||
+@code{error} and @code{warning}. Several other
|
||||
attributes are defined for functions on particular target systems. Other
|
||||
attributes, including @code{section} are supported for variables declarations
|
||||
(@pxref{Variable Attributes}) and for types (@pxref{Type Attributes}).
|
||||
@@ -1688,6 +1688,30 @@ Whether the function itself is considere
|
||||
the current inlining parameters. The @code{flatten} attribute only works
|
||||
reliably in unit-at-a-time mode.
|
||||
|
||||
+@item error ("@var{message}")
|
||||
+@cindex @code{error} function attribute
|
||||
+If this attribute is used on a function declaration and a call to such a function
|
||||
+is not eliminated through dead code elimination or other optimizations, an error
|
||||
+which will include @var{message} will be diagnosed. This is useful
|
||||
+for compile time checking, especially together with @code{__builtin_constant_p}
|
||||
+and inline functions where checking the inline function arguments is not
|
||||
+possible through @code{extern char [(condition) ? 1 : -1];} tricks.
|
||||
+While it is possible to leave the function undefined and thus invoke
|
||||
+a link failure, when using this attribute the problem will be diagnosed
|
||||
+earlier and with exact location of the call even in presence of inline
|
||||
+functions or when not emitting debugging information.
|
||||
+
|
||||
+@item warning ("@var{message}")
|
||||
+@cindex @code{warning} function attribute
|
||||
+If this attribute is used on a function declaration and a call to such a function
|
||||
+is not eliminated through dead code elimination or other optimizations, a warning
|
||||
+which will include @var{message} will be diagnosed. This is useful
|
||||
+for compile time checking, especially together with @code{__builtin_constant_p}
|
||||
+and inline functions. While it is possible to define the function with
|
||||
+a message in @code{.gnu.warning*} section, when using this attribute the problem
|
||||
+will be diagnosed earlier and with exact location of the call even in presence
|
||||
+of inline functions or when not emitting debugging information.
|
||||
+
|
||||
@item cdecl
|
||||
@cindex functions that do pop the argument stack on the 386
|
||||
@opindex mrtd
|
||||
--- gcc/expr.c.jj 2007-09-25 14:58:40.000000000 +0200
|
||||
+++ gcc/expr.c 2007-09-25 15:19:15.000000000 +0200
|
||||
@@ -7513,19 +7513,31 @@ expand_expr_real_1 (tree exp, rtx target
|
||||
inlining. */
|
||||
if (CALL_EXPR_VA_ARG_PACK (exp))
|
||||
error ("invalid use of %<__builtin_va_arg_pack ()%>");
|
||||
- /* Check for a built-in function. */
|
||||
- if (TREE_CODE (TREE_OPERAND (exp, 0)) == ADDR_EXPR
|
||||
- && (TREE_CODE (TREE_OPERAND (TREE_OPERAND (exp, 0), 0))
|
||||
- == FUNCTION_DECL)
|
||||
- && DECL_BUILT_IN (TREE_OPERAND (TREE_OPERAND (exp, 0), 0)))
|
||||
- {
|
||||
- if (DECL_BUILT_IN_CLASS (TREE_OPERAND (TREE_OPERAND (exp, 0), 0))
|
||||
- == BUILT_IN_FRONTEND)
|
||||
- return lang_hooks.expand_expr (exp, original_target,
|
||||
- tmode, modifier,
|
||||
- alt_rtl);
|
||||
- else
|
||||
- return expand_builtin (exp, target, subtarget, tmode, ignore);
|
||||
+ {
|
||||
+ tree fndecl = get_callee_fndecl (exp), attr;
|
||||
+
|
||||
+ if (fndecl
|
||||
+ && (attr = lookup_attribute ("error",
|
||||
+ DECL_ATTRIBUTES (fndecl))) != NULL)
|
||||
+ error ("call to %qs declared with attribute error: %s",
|
||||
+ lang_hooks.decl_printable_name (fndecl, 1),
|
||||
+ TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr))));
|
||||
+ if (fndecl
|
||||
+ && (attr = lookup_attribute ("warning",
|
||||
+ DECL_ATTRIBUTES (fndecl))) != NULL)
|
||||
+ warning (0, "call to %qs declared with attribute warning: %s",
|
||||
+ lang_hooks.decl_printable_name (fndecl, 1),
|
||||
+ TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr))));
|
||||
+
|
||||
+ /* Check for a built-in function. */
|
||||
+ if (fndecl && DECL_BUILT_IN (fndecl))
|
||||
+ {
|
||||
+ if (DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_FRONTEND)
|
||||
+ return lang_hooks.expand_expr (exp, original_target,
|
||||
+ tmode, modifier, alt_rtl);
|
||||
+ else
|
||||
+ return expand_builtin (exp, target, subtarget, tmode, ignore);
|
||||
+ }
|
||||
}
|
||||
|
||||
return expand_call (exp, target, ignore);
|
||||
--- gcc/c-common.c.jj 2007-09-25 15:01:49.000000000 +0200
|
||||
+++ gcc/c-common.c 2007-09-25 15:24:34.000000000 +0200
|
||||
@@ -508,6 +508,7 @@ static tree handle_always_inline_attribu
|
||||
static tree handle_gnu_inline_attribute (tree *, tree, tree, int, bool *);
|
||||
static tree handle_artificial_attribute (tree *, tree, tree, int, bool *);
|
||||
static tree handle_flatten_attribute (tree *, tree, tree, int, bool *);
|
||||
+static tree handle_error_attribute (tree *, tree, tree, int, bool *);
|
||||
static tree handle_used_attribute (tree *, tree, tree, int, bool *);
|
||||
static tree handle_unused_attribute (tree *, tree, tree, int, bool *);
|
||||
static tree handle_externally_visible_attribute (tree *, tree, tree, int,
|
||||
@@ -641,6 +642,10 @@ const struct attribute_spec c_common_att
|
||||
handle_warn_unused_result_attribute },
|
||||
{ "sentinel", 0, 1, false, true, true,
|
||||
handle_sentinel_attribute },
|
||||
+ { "warning", 1, 1, true, false, false,
|
||||
+ handle_error_attribute },
|
||||
+ { "error", 1, 1, true, false, false,
|
||||
+ handle_error_attribute },
|
||||
{ NULL, 0, 0, false, false, false, NULL }
|
||||
};
|
||||
|
||||
@@ -4226,6 +4231,26 @@ handle_flatten_attribute (tree *node, tr
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
+/* Handle a "warning" or "error" attribute; arguments as in
|
||||
+ struct attribute_spec.handler. */
|
||||
+
|
||||
+static tree
|
||||
+handle_error_attribute (tree *node, tree name, tree args,
|
||||
+ int ARG_UNUSED (flags), bool *no_add_attrs)
|
||||
+{
|
||||
+ if (TREE_CODE (*node) == FUNCTION_DECL
|
||||
+ || TREE_CODE (TREE_VALUE (args)) == STRING_CST)
|
||||
+ /* Do nothing else, just set the attribute. We'll get at
|
||||
+ it later with lookup_attribute. */
|
||||
+ ;
|
||||
+ else
|
||||
+ {
|
||||
+ warning (OPT_Wattributes, "%qE attribute ignored", name);
|
||||
+ *no_add_attrs = true;
|
||||
+ }
|
||||
+
|
||||
+ return NULL_TREE;
|
||||
+}
|
||||
|
||||
/* Handle a "used" attribute; arguments as in
|
||||
struct attribute_spec.handler. */
|
||||
--- gcc/testsuite/gcc.dg/va-arg-pack-len-1.c.jj 2007-09-25 12:23:05.000000000 +0200
|
||||
+++ gcc/testsuite/gcc.dg/va-arg-pack-len-1.c 2007-09-25 15:16:03.000000000 +0200
|
||||
@@ -3,8 +3,10 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
-extern int warn_open_missing_mode (void);
|
||||
-extern int warn_open_too_many_arguments (void);
|
||||
+extern int error_open_missing_mode (void)
|
||||
+ __attribute__((__error__ ("open with O_CREAT needs 3 arguments, only 2 were given")));
|
||||
+extern int warn_open_too_many_arguments (void)
|
||||
+ __attribute__((__warning__ ("open called with more than 3 arguments")));
|
||||
extern void abort (void);
|
||||
|
||||
char expected_char;
|
||||
@@ -83,7 +85,7 @@ myopen (const char *path, int oflag, ...
|
||||
{
|
||||
if ((oflag & 0x40) != 0 && __builtin_va_arg_pack_len () < 1)
|
||||
{
|
||||
- warn_open_missing_mode ();
|
||||
+ error_open_missing_mode ();
|
||||
return myopen2 (path, oflag);
|
||||
}
|
||||
return myopenva (path, oflag, __builtin_va_arg_pack ());
|
||||
--- gcc/testsuite/gcc.dg/va-arg-pack-len-2.c.jj 2007-09-25 15:16:03.000000000 +0200
|
||||
+++ gcc/testsuite/gcc.dg/va-arg-pack-len-2.c 2007-09-25 15:16:03.000000000 +0200
|
||||
@@ -0,0 +1,42 @@
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+#include <stdarg.h>
|
||||
+
|
||||
+extern int error_open_missing_mode (void)
|
||||
+ __attribute__((__error__ ("open with O_CREAT needs 3 arguments, only 2 were given")));
|
||||
+extern int warn_open_too_many_arguments (void)
|
||||
+ __attribute__((__warning__ ("open called with more than 3 arguments")));
|
||||
+
|
||||
+extern int myopen2 (const char *path, int oflag);
|
||||
+extern int myopenva (const char *path, int oflag, ...);
|
||||
+
|
||||
+extern inline __attribute__((always_inline, gnu_inline)) int
|
||||
+myopen (const char *path, int oflag, ...)
|
||||
+{
|
||||
+ if (__builtin_va_arg_pack_len () > 1)
|
||||
+ warn_open_too_many_arguments (); /* { dg-warning "called with more than 3" } */
|
||||
+
|
||||
+ if (__builtin_constant_p (oflag))
|
||||
+ {
|
||||
+ if ((oflag & 0x40) != 0 && __builtin_va_arg_pack_len () < 1)
|
||||
+ {
|
||||
+ error_open_missing_mode (); /* { dg-error "needs 3 arguments, only 2 were given" } */
|
||||
+ return myopen2 (path, oflag);
|
||||
+ }
|
||||
+ return myopenva (path, oflag, __builtin_va_arg_pack ());
|
||||
+ }
|
||||
+
|
||||
+ if (__builtin_va_arg_pack_len () < 1)
|
||||
+ return myopen2 (path, oflag);
|
||||
+
|
||||
+ return myopenva (path, oflag, __builtin_va_arg_pack ());
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ myopen ("h", 0x43);
|
||||
+ myopen ("i", 0x43, 0644, 0655);
|
||||
+ return 0;
|
||||
+}
|
||||
--- gcc/testsuite/g++.dg/ext/va-arg-pack-len-1.C.jj 2007-09-25 12:23:05.000000000 +0200
|
||||
+++ gcc/testsuite/g++.dg/ext/va-arg-pack-len-1.C 2007-09-25 15:16:03.000000000 +0200
|
||||
@@ -3,8 +3,10 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
-extern "C" int warn_open_missing_mode (void);
|
||||
-extern "C" int warn_open_too_many_arguments (void);
|
||||
+extern "C" int error_open_missing_mode (void)
|
||||
+ __attribute__((__error__ ("open with O_CREAT needs 3 arguments, only 2 were given")));
|
||||
+extern "C" int warn_open_too_many_arguments (void)
|
||||
+ __attribute__((__warning__ ("open called with more than 3 arguments")));
|
||||
extern "C" void abort (void);
|
||||
|
||||
char expected_char;
|
||||
@@ -83,7 +85,7 @@ myopen (const char *path, int oflag, ...
|
||||
{
|
||||
if ((oflag & 0x40) != 0 && __builtin_va_arg_pack_len () < 1)
|
||||
{
|
||||
- warn_open_missing_mode ();
|
||||
+ error_open_missing_mode ();
|
||||
return myopen2 (path, oflag);
|
||||
}
|
||||
return myopenva (path, oflag, __builtin_va_arg_pack ());
|
||||
--- gcc/testsuite/g++.dg/ext/va-arg-pack-len-2.C.jj 2007-09-25 15:16:03.000000000 +0200
|
||||
+++ gcc/testsuite/g++.dg/ext/va-arg-pack-len-2.C 2007-09-25 15:16:03.000000000 +0200
|
||||
@@ -0,0 +1,42 @@
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-O2" }
|
||||
+
|
||||
+#include <stdarg.h>
|
||||
+
|
||||
+extern int error_open_missing_mode (void)
|
||||
+ __attribute__((__error__ ("open with O_CREAT needs 3 arguments, only 2 were given")));
|
||||
+extern int warn_open_too_many_arguments (void)
|
||||
+ __attribute__((__warning__ ("open called with more than 3 arguments")));
|
||||
+
|
||||
+extern int myopen2 (const char *path, int oflag);
|
||||
+extern int myopenva (const char *path, int oflag, ...);
|
||||
+
|
||||
+extern inline __attribute__((always_inline, gnu_inline)) int
|
||||
+myopen (const char *path, int oflag, ...)
|
||||
+{
|
||||
+ if (__builtin_va_arg_pack_len () > 1)
|
||||
+ warn_open_too_many_arguments (); // { dg-warning "called with more than 3" }
|
||||
+
|
||||
+ if (__builtin_constant_p (oflag))
|
||||
+ {
|
||||
+ if ((oflag & 0x40) != 0 && __builtin_va_arg_pack_len () < 1)
|
||||
+ {
|
||||
+ error_open_missing_mode (); // { dg-error "needs 3 arguments, only 2 were given" }
|
||||
+ return myopen2 (path, oflag);
|
||||
+ }
|
||||
+ return myopenva (path, oflag, __builtin_va_arg_pack ());
|
||||
+ }
|
||||
+
|
||||
+ if (__builtin_va_arg_pack_len () < 1)
|
||||
+ return myopen2 (path, oflag);
|
||||
+
|
||||
+ return myopenva (path, oflag, __builtin_va_arg_pack ());
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ myopen ("h", 0x43);
|
||||
+ myopen ("i", 0x43, 0644, 0655);
|
||||
+ return 0;
|
||||
+}
|
|
@ -0,0 +1,50 @@
|
|||
2004-10-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* c-cppbuiltin.c (define__GNUC__): Also define __GNUC_RH_RELEASE__.
|
||||
|
||||
--- gcc/c-cppbuiltin.c.jj 2004-10-07 21:27:38.000000000 +0200
|
||||
+++ gcc/c-cppbuiltin.c 2004-10-19 11:41:50.000000000 +0200
|
||||
@@ -257,13 +257,13 @@ define__GNUC__ (void)
|
||||
{
|
||||
/* The format of the version string, enforced below, is
|
||||
([^0-9]*-)?[0-9]+[.][0-9]+([.][0-9]+)?([- ].*)? */
|
||||
- const char *q, *v = version_string;
|
||||
+ const char *q, *v = version_string, *vstart, *vend;
|
||||
|
||||
while (*v && !ISDIGIT (*v))
|
||||
v++;
|
||||
gcc_assert (*v && (v <= version_string || v[-1] == '-'));
|
||||
|
||||
- q = v;
|
||||
+ vstart = q = v;
|
||||
while (ISDIGIT (*v))
|
||||
v++;
|
||||
builtin_define_with_value_n ("__GNUC__", q, v - q);
|
||||
@@ -289,6 +289,27 @@ define__GNUC__ (void)
|
||||
builtin_define_with_value_n ("__GNUC_PATCHLEVEL__", "0", 1);
|
||||
|
||||
gcc_assert (!*v || *v == ' ' || *v == '-');
|
||||
+
|
||||
+ vend = v;
|
||||
+ v = strchr (v, '(');
|
||||
+ if (v != NULL && strncmp (v + 1, "Red Hat ", 8) == 0)
|
||||
+ {
|
||||
+ v += 9;
|
||||
+ if (strncmp (v, "Linux ", 6) == 0)
|
||||
+ v += 6;
|
||||
+
|
||||
+ gcc_assert (strncmp (v, vstart, vend - vstart) == 0);
|
||||
+ gcc_assert (v[vend - vstart] == '-');
|
||||
+
|
||||
+ v += vend - vstart + 1;
|
||||
+ q = v;
|
||||
+ gcc_assert (ISDIGIT (*v));
|
||||
+ while (ISDIGIT (*v))
|
||||
+ v++;
|
||||
+ builtin_define_with_value_n ("__GNUC_RH_RELEASE__", q, v - q);
|
||||
+
|
||||
+ gcc_assert (!*v || *v == ')' || *v == '.');
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Define macros used by <stdint.h>. Currently only defines limits
|
|
@ -0,0 +1,136 @@
|
|||
2006-07-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/i386/linux.h (LINK_SPEC): Add --hash-style=gnu.
|
||||
* config/i386/linux64.h (LINK_SPEC): Likewise.
|
||||
* config/rs6000/sysv4.h (LINK_OS_LINUX_SPEC): Likewise.
|
||||
* config/rs6000/linux64.h (LINK_OS_LINUX_SPEC32,
|
||||
LINK_OS_LINUX_SPEC64): Likewise.
|
||||
* config/s390/linux.h (LINK_SPEC): Likewise.
|
||||
* config/ia64/linux.h (LINK_SPEC): Likewise.
|
||||
* config/sparc/linux.h (LINK_SPEC): Likewise.
|
||||
* config/sparc/linux64.h (LINK_SPEC, LINK_ARCH32_SPEC,
|
||||
LINK_ARCH64_SPEC): Likewise.
|
||||
* config/alpha/linux-elf.h (LINK_SPEC): Likewise.
|
||||
|
||||
--- gcc/config/rs6000/sysv4.h.jj 2006-07-11 10:54:00.000000000 +0200
|
||||
+++ gcc/config/rs6000/sysv4.h 2006-07-11 12:51:39.000000000 +0200
|
||||
@@ -1039,7 +1039,7 @@ extern int fixuplabelno;
|
||||
|
||||
#define LINK_START_LINUX_SPEC ""
|
||||
|
||||
-#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
|
||||
+#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=gnu %{!shared: %{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
|
||||
|
||||
--- gcc/config/rs6000/linux64.h.jj 2006-07-11 10:54:00.000000000 +0200
|
||||
+++ gcc/config/rs6000/linux64.h 2006-07-11 12:52:14.000000000 +0200
|
||||
@@ -337,11 +337,11 @@ extern int dot_symbols;
|
||||
#undef LINK_OS_DEFAULT_SPEC
|
||||
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
|
||||
|
||||
-#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
|
||||
+#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux --hash-style=gnu %{!shared: %{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
|
||||
|
||||
-#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
|
||||
+#define LINK_OS_LINUX_SPEC64 "-m elf64ppc --hash-style=gnu %{!shared: %{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib64/ld64.so.1}}}"
|
||||
|
||||
--- gcc/config/alpha/linux-elf.h.jj 2006-07-11 10:54:01.000000000 +0200
|
||||
+++ gcc/config/alpha/linux-elf.h 2006-07-11 12:53:48.000000000 +0200
|
||||
@@ -29,7 +29,7 @@ Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
||||
-#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
|
||||
+#define LINK_SPEC "-m elf64alpha --hash-style=gnu %{G*} %{relax:-relax} \
|
||||
%{O*:-O3} %{!O*:-O1} \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
--- gcc/config/s390/linux.h.jj 2006-07-11 10:54:02.000000000 +0200
|
||||
+++ gcc/config/s390/linux.h 2006-07-11 12:52:39.000000000 +0200
|
||||
@@ -79,7 +79,7 @@ Software Foundation, 51 Franklin Street,
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
- "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
|
||||
+ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --hash-style=gnu \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{static:-static} \
|
||||
--- gcc/config/sparc/linux.h.jj 2006-07-11 10:54:03.000000000 +0200
|
||||
+++ gcc/config/sparc/linux.h 2006-07-11 12:54:16.000000000 +0200
|
||||
@@ -127,7 +127,7 @@ Boston, MA 02110-1301, USA. */
|
||||
/* If ELF is the default format, we should not use /lib/elf. */
|
||||
|
||||
#undef LINK_SPEC
|
||||
-#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
|
||||
+#define LINK_SPEC "-m elf32_sparc --hash-style=gnu -Y P,/usr/lib %{shared:-shared} \
|
||||
%{!mno-relax:%{!r:-relax}} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
--- gcc/config/sparc/linux64.h.jj 2006-07-11 10:54:03.000000000 +0200
|
||||
+++ gcc/config/sparc/linux64.h 2006-07-11 12:55:10.000000000 +0200
|
||||
@@ -157,7 +157,7 @@ Boston, MA 02110-1301, USA. */
|
||||
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
|
||||
{ "link_arch", LINK_ARCH_SPEC },
|
||||
|
||||
-#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
|
||||
+#define LINK_ARCH32_SPEC "-m elf32_sparc --hash-style=gnu -Y P,/usr/lib %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
@@ -166,7 +166,7 @@ Boston, MA 02110-1301, USA. */
|
||||
%{static:-static}}} \
|
||||
"
|
||||
|
||||
-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
|
||||
+#define LINK_ARCH64_SPEC "-m elf64_sparc --hash-style=gnu -Y P,/usr/lib64 %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
@@ -247,7 +247,7 @@ Boston, MA 02110-1301, USA. */
|
||||
#else /* !SPARC_BI_ARCH */
|
||||
|
||||
#undef LINK_SPEC
|
||||
-#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
|
||||
+#define LINK_SPEC "-m elf64_sparc --hash-style=gnu -Y P,/usr/lib64 %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
--- gcc/config/i386/linux.h.jj 2006-07-11 10:54:05.000000000 +0200
|
||||
+++ gcc/config/i386/linux.h 2006-07-11 12:44:45.000000000 +0200
|
||||
@@ -113,7 +113,7 @@ Boston, MA 02110-1301, USA. */
|
||||
{ "dynamic_linker", DYNAMIC_LINKER }
|
||||
|
||||
#undef LINK_SPEC
|
||||
-#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
|
||||
+#define LINK_SPEC "-m %(link_emulation) --hash-style=gnu %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
--- gcc/config/i386/linux64.h.jj 2006-07-11 10:54:04.000000000 +0200
|
||||
+++ gcc/config/i386/linux64.h 2006-07-11 12:45:02.000000000 +0200
|
||||
@@ -55,7 +55,7 @@ Boston, MA 02110-1301, USA. */
|
||||
done. */
|
||||
|
||||
#undef LINK_SPEC
|
||||
-#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
|
||||
+#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} --hash-style=gnu \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
--- gcc/config/ia64/linux.h.jj 2006-07-11 10:54:06.000000000 +0200
|
||||
+++ gcc/config/ia64/linux.h 2006-07-11 12:48:19.000000000 +0200
|
||||
@@ -40,7 +40,7 @@ do { \
|
||||
linux.h file. */
|
||||
|
||||
#undef LINK_SPEC
|
||||
-#define LINK_SPEC "\
|
||||
+#define LINK_SPEC "--hash-style=gnu \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
|
@ -0,0 +1,538 @@
|
|||
2004-11-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config.gcc (ia64*-*-linux*): If native and libelf is installed,
|
||||
use ia64/t-glibc-no-libunwind instead of the other t-*unwind*
|
||||
fragments.
|
||||
* config/ia64/t-glibc-no-libunwind: New file.
|
||||
* config/ia64/change-symver.c: New file.
|
||||
* config/ia64/unwind-ia64.c: If USE_SYMVER_GLOBAL and SHARED,
|
||||
define _Unwind_* to __symverglobal_Unwind_*.
|
||||
(alias): Undefine.
|
||||
(symverglobal): Define. Use it on _Unwind_*.
|
||||
* config/ia64/mkmap-symver-multi.awk: New file.
|
||||
* config/ia64/libgcc-ia64-no-libunwind.ver: New file.
|
||||
|
||||
--- gcc/config.gcc.jj 2004-10-04 08:55:44.000000000 -0400
|
||||
+++ gcc/config.gcc 2004-11-13 05:23:50.000000000 -0500
|
||||
@@ -1185,9 +1185,16 @@ ia64*-*-freebsd*)
|
||||
;;
|
||||
ia64*-*-linux*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h"
|
||||
- tmake_file="${tmake_file} ia64/t-ia64 t-libunwind ia64/t-glibc"
|
||||
- if test x$with_system_libunwind != xyes ; then
|
||||
- tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
|
||||
+ tmake_file="${tmake_file} ia64/t-ia64"
|
||||
+ if test x${target} = x${host} && test x${target} = x${build} \
|
||||
+ && grep gelf_getverdef /usr/include/gelf.h > /dev/null 2>&1 \
|
||||
+ && test -f /usr/lib/libelf.so; then
|
||||
+ tmake_file="${tmake_file} ia64/t-glibc-no-libunwind"
|
||||
+ else
|
||||
+ tmake_file="${tmake_file} t-libunwind ia64/t-glibc"
|
||||
+ if test x$with_system_libunwind != xyes ; then
|
||||
+ tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
|
||||
+ fi
|
||||
fi
|
||||
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
|
||||
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
|
||||
--- gcc/config/ia64/t-glibc-no-libunwind.jj 2004-02-18 10:27:36.000000000 -0500
|
||||
+++ gcc/config/ia64/t-glibc-no-libunwind 2004-11-15 09:56:33.000000000 -0500
|
||||
@@ -0,0 +1,30 @@
|
||||
+# Don't use system libunwind library on IA-64 GLIBC based system,
|
||||
+# but make _Unwind_* symbols unversioned, so that created programs
|
||||
+# are usable even when libgcc_s uses libunwind.
|
||||
+LIB2ADDEH += $(srcdir)/config/ia64/fde-glibc.c
|
||||
+SHLIB_MAPFILES += $(srcdir)/config/ia64/libgcc-ia64-no-libunwind.ver
|
||||
+SHLIB_MKMAP = $(srcdir)/config/ia64/mkmap-symver-multi.awk
|
||||
+
|
||||
+SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
|
||||
+ -Wl,--soname=$(SHLIB_SONAME) \
|
||||
+ -Wl,--version-script=$(SHLIB_MAP) \
|
||||
+ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
|
||||
+ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
|
||||
+ if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
|
||||
+ mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
|
||||
+ $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
|
||||
+ else true; fi && \
|
||||
+ gcc -O2 -o $(SHLIB_DIR)/$(SHLIB_SONAME).tweak \
|
||||
+ $(srcdir)/config/ia64/change-symver.c -lelf && \
|
||||
+ $(SHLIB_DIR)/$(SHLIB_SONAME).tweak $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
|
||||
+ GCC_3.4.2 _GLOBAL_ \
|
||||
+ _Unwind_GetGR _Unwind_RaiseException _Unwind_GetRegionStart _Unwind_SetIP \
|
||||
+ _Unwind_GetIP _Unwind_GetLanguageSpecificData _Unwind_Resume \
|
||||
+ _Unwind_DeleteException _Unwind_SetGR _Unwind_ForcedUnwind \
|
||||
+ _Unwind_Backtrace _Unwind_FindEnclosingFunction _Unwind_GetCFA \
|
||||
+ _Unwind_Resume_or_Rethrow _Unwind_GetBSP && \
|
||||
+ rm -f $(SHLIB_DIR)/$(SHLIB_SONAME).tweak && \
|
||||
+ mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
|
||||
+ $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
|
||||
+
|
||||
+TARGET_LIBGCC2_CFLAGS += -DUSE_SYMVER_GLOBAL
|
||||
--- gcc/config/ia64/change-symver.c.jj 2004-02-18 10:27:36.000000000 -0500
|
||||
+++ gcc/config/ia64/change-symver.c 2004-11-13 05:23:50.000000000 -0500
|
||||
@@ -0,0 +1,211 @@
|
||||
+#define _GNU_SOURCE 1
|
||||
+#define _FILE_OFFSET_BITS 64
|
||||
+#include <endian.h>
|
||||
+#include <errno.h>
|
||||
+#include <error.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <fnmatch.h>
|
||||
+#include <gelf.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+int
|
||||
+compute_veridx (const char *name, Elf *elf, Elf_Data *verd, GElf_Shdr *verd_shdr)
|
||||
+{
|
||||
+ if (strcmp (name, "_GLOBAL_") == 0)
|
||||
+ return 1;
|
||||
+
|
||||
+ int cnt;
|
||||
+ size_t offset = 0;
|
||||
+ for (cnt = verd_shdr->sh_info; --cnt >= 0; )
|
||||
+ {
|
||||
+ GElf_Verdef defmem;
|
||||
+ GElf_Verdef *def;
|
||||
+ GElf_Verdaux auxmem;
|
||||
+ GElf_Verdaux *aux;
|
||||
+ unsigned int auxoffset;
|
||||
+
|
||||
+ /* Get the data at the next offset. */
|
||||
+ def = gelf_getverdef (verd, offset, &defmem);
|
||||
+ if (def == NULL)
|
||||
+ break;
|
||||
+
|
||||
+ auxoffset = offset + def->vd_aux;
|
||||
+ aux = gelf_getverdaux (verd, auxoffset, &auxmem);
|
||||
+ if (aux == NULL)
|
||||
+ break;
|
||||
+
|
||||
+ if (strcmp (name, elf_strptr (elf, verd_shdr->sh_link,
|
||||
+ aux->vda_name)) == 0)
|
||||
+ return def->vd_ndx;
|
||||
+
|
||||
+ /* Find the next offset. */
|
||||
+ offset += def->vd_next;
|
||||
+ }
|
||||
+
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (int argc, char **argv)
|
||||
+{
|
||||
+ if (argc < 4)
|
||||
+ error (1, 0, "Usage: change_symver library from_symver to_symver symbol...\nExample: change_symver libfoo.so FOO_1.0 *global* bar baz");
|
||||
+
|
||||
+ const char *fname = argv[1];
|
||||
+
|
||||
+ /* Open the file. */
|
||||
+ int fd;
|
||||
+ fd = open (fname, O_RDWR);
|
||||
+ if (fd == -1)
|
||||
+ error (1, errno, fname);
|
||||
+
|
||||
+ elf_version (EV_CURRENT);
|
||||
+
|
||||
+ /* Now get the ELF descriptor. */
|
||||
+ Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
|
||||
+ if (elf == NULL || elf_kind (elf) != ELF_K_ELF)
|
||||
+ error (1, 0, "Couldn't open %s: %s", fname, elf_errmsg (-1));
|
||||
+
|
||||
+ size_t shstrndx;
|
||||
+ /* Get the section header string table index. */
|
||||
+ if (elf_getshstrndx (elf, &shstrndx) < 0)
|
||||
+ error (1, 0, "cannot get shstrndx from %s", fname);
|
||||
+
|
||||
+ GElf_Ehdr ehdr_mem;
|
||||
+ GElf_Ehdr *ehdr;
|
||||
+
|
||||
+ /* We need the ELF header in a few places. */
|
||||
+ ehdr = gelf_getehdr (elf, &ehdr_mem);
|
||||
+ if (ehdr == NULL)
|
||||
+ error (1, 0, "couldn't get ELF headers %s: %s", fname, elf_errmsg (-1));
|
||||
+
|
||||
+ Elf_Scn *scn = NULL;
|
||||
+ GElf_Shdr shdr_mem, verd_shdr, ver_shdr, dynsym_shdr;
|
||||
+ Elf_Data *ver = NULL, *verd = NULL, *dynsym = NULL;
|
||||
+
|
||||
+ while ((scn = elf_nextscn (elf, scn)) != NULL)
|
||||
+ {
|
||||
+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
|
||||
+
|
||||
+ if (shdr == NULL)
|
||||
+ error (1, 0, "couldn't get shdr from %s", fname);
|
||||
+
|
||||
+ if ((shdr->sh_flags & SHF_ALLOC) != 0)
|
||||
+ {
|
||||
+ const char *name = elf_strptr (elf, shstrndx, shdr->sh_name);
|
||||
+ Elf_Data **p;
|
||||
+
|
||||
+ if (strcmp (name, ".gnu.version") == 0)
|
||||
+ {
|
||||
+ p = &ver;
|
||||
+ ver_shdr = *shdr;
|
||||
+ }
|
||||
+ else if (strcmp (name, ".gnu.version_d") == 0)
|
||||
+ {
|
||||
+ p = &verd;
|
||||
+ verd_shdr = *shdr;
|
||||
+ }
|
||||
+ else if (strcmp (name, ".dynsym") == 0)
|
||||
+ {
|
||||
+ p = &dynsym;
|
||||
+ dynsym_shdr = *shdr;
|
||||
+ }
|
||||
+ else
|
||||
+ continue;
|
||||
+
|
||||
+ if (*p != NULL)
|
||||
+ error (1, 0, "Two %s sections in %s", name, fname);
|
||||
+ *p = elf_getdata (scn, NULL);
|
||||
+ if (*p == NULL || elf_getdata (scn, *p) != NULL)
|
||||
+ error (1, 0, "No data or non-contiguous data in %s section in %s",
|
||||
+ name, fname);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (ver == NULL || verd == NULL || dynsym == NULL)
|
||||
+ error (1, 0, "Couldn't find one of the needed sections in %s", fname);
|
||||
+
|
||||
+ int from_idx = compute_veridx (argv[2], elf, verd, &verd_shdr);
|
||||
+ if (from_idx == -1)
|
||||
+ error (1, 0, "Could not find symbol version %s in %s", argv[2], fname);
|
||||
+
|
||||
+ int to_idx = compute_veridx (argv[3], elf, verd, &verd_shdr);
|
||||
+ if (to_idx == -1)
|
||||
+ error (1, 0, "Could not find symbol version %s in %s", argv[3], fname);
|
||||
+
|
||||
+ if (dynsym_shdr.sh_entsize != gelf_fsize (elf, ELF_T_SYM, 1, ehdr->e_version)
|
||||
+ || dynsym_shdr.sh_size % dynsym_shdr.sh_entsize
|
||||
+ || ver_shdr.sh_entsize != 2
|
||||
+ || (ver_shdr.sh_size & 1)
|
||||
+ || dynsym_shdr.sh_size / dynsym_shdr.sh_entsize != ver_shdr.sh_size / 2)
|
||||
+ error (1, 0, "Unexpected sh_size or sh_entsize in %s", fname);
|
||||
+
|
||||
+ size_t nentries = ver_shdr.sh_size / 2;
|
||||
+ size_t cnt;
|
||||
+ GElf_Versym array[nentries];
|
||||
+ for (cnt = 0; cnt < nentries; ++cnt)
|
||||
+ {
|
||||
+ GElf_Versym vsymmem;
|
||||
+ GElf_Versym *vsym;
|
||||
+
|
||||
+ vsym = gelf_getversym (ver, cnt, &vsymmem);
|
||||
+ if (vsym == NULL)
|
||||
+ error (1, 0, "gelt_getversym failed in %s: %s", fname, elf_errmsg (-1));
|
||||
+
|
||||
+ array[cnt] = *vsym;
|
||||
+ if (*vsym != from_idx)
|
||||
+ continue;
|
||||
+
|
||||
+ GElf_Sym sym_mem;
|
||||
+ GElf_Sym *sym;
|
||||
+ sym = gelf_getsym (dynsym, cnt, &sym_mem);
|
||||
+ if (sym == NULL)
|
||||
+ error (1, 0, "gelt_getsym failed in %s: %s", fname, elf_errmsg (-1));
|
||||
+
|
||||
+ const char *name = elf_strptr (elf, dynsym_shdr.sh_link, sym->st_name);
|
||||
+
|
||||
+ int argn;
|
||||
+ for (argn = 4; argn < argc; ++argn)
|
||||
+ if (fnmatch (argv[argn], name, 0) == 0)
|
||||
+ {
|
||||
+ array[cnt] = to_idx;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (sizeof (array[0]) != 2)
|
||||
+ abort ();
|
||||
+
|
||||
+#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
+ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
|
||||
+ ;
|
||||
+ else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
|
||||
+#elif __BYTE_ORDER == __BIG_ENDIAN
|
||||
+ if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
|
||||
+ ;
|
||||
+ else if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
|
||||
+#else
|
||||
+# error Unsupported endianity
|
||||
+#endif
|
||||
+ {
|
||||
+ for (cnt = 0; cnt < nentries; ++cnt)
|
||||
+ array[cnt] = ((array[cnt] & 0xff) << 8) | ((array[cnt] & 0xff00) >> 8);
|
||||
+ }
|
||||
+ else
|
||||
+ error (1, 0, "Unknown EI_DATA %d in %s", ehdr->e_ident[EI_DATA], fname);
|
||||
+
|
||||
+ if (elf_end (elf) != 0)
|
||||
+ error (1, 0, "couldn't close %s: %s", fname, elf_errmsg (-1));
|
||||
+
|
||||
+ if (lseek (fd, ver_shdr.sh_offset, SEEK_SET) != (off_t) ver_shdr.sh_offset)
|
||||
+ error (1, 0, "failed to seek to %zd in %s", (size_t) ver_shdr.sh_offset,
|
||||
+ fname);
|
||||
+
|
||||
+ if (write (fd, array, 2 * nentries) != (ssize_t) (2 * nentries))
|
||||
+ error (1, 0, "failed to write .gnu.version section into %s", fname);
|
||||
+
|
||||
+ close (fd);
|
||||
+ return 0;
|
||||
+}
|
||||
--- gcc/config/ia64/unwind-ia64.c.jj 2004-10-04 08:55:57.000000000 -0400
|
||||
+++ gcc/config/ia64/unwind-ia64.c 2004-11-15 09:07:45.000000000 -0500
|
||||
@@ -51,6 +51,51 @@
|
||||
#define UNW_FLAG_UHANDLER(x) ((x) & 0x0000000200000000L)
|
||||
#define UNW_LENGTH(x) ((x) & 0x00000000ffffffffL)
|
||||
|
||||
+#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
|
||||
+extern _Unwind_Reason_Code __symverglobal_Unwind_Backtrace
|
||||
+ (_Unwind_Trace_Fn, void *);
|
||||
+extern void __symverglobal_Unwind_DeleteException
|
||||
+ (struct _Unwind_Exception *);
|
||||
+extern void * __symverglobal_Unwind_FindEnclosingFunction (void *);
|
||||
+extern _Unwind_Reason_Code __symverglobal_Unwind_ForcedUnwind
|
||||
+ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
|
||||
+extern _Unwind_Word __symverglobal_Unwind_GetCFA
|
||||
+ (struct _Unwind_Context *);
|
||||
+extern _Unwind_Word __symverglobal_Unwind_GetBSP
|
||||
+ (struct _Unwind_Context *);
|
||||
+extern _Unwind_Word __symverglobal_Unwind_GetGR
|
||||
+ (struct _Unwind_Context *, int );
|
||||
+extern _Unwind_Ptr __symverglobal_Unwind_GetIP (struct _Unwind_Context *);
|
||||
+extern void *__symverglobal_Unwind_GetLanguageSpecificData
|
||||
+ (struct _Unwind_Context *);
|
||||
+extern _Unwind_Ptr __symverglobal_Unwind_GetRegionStart
|
||||
+ (struct _Unwind_Context *);
|
||||
+extern _Unwind_Reason_Code __symverglobal_Unwind_RaiseException
|
||||
+ (struct _Unwind_Exception *);
|
||||
+extern void __symverglobal_Unwind_Resume (struct _Unwind_Exception *);
|
||||
+extern _Unwind_Reason_Code __symverglobal_Unwind_Resume_or_Rethrow
|
||||
+ (struct _Unwind_Exception *);
|
||||
+extern void __symverglobal_Unwind_SetGR
|
||||
+ (struct _Unwind_Context *, int, _Unwind_Word);
|
||||
+extern void __symverglobal_Unwind_SetIP
|
||||
+ (struct _Unwind_Context *, _Unwind_Ptr);
|
||||
+#define _Unwind_Backtrace __symverglobal_Unwind_Backtrace
|
||||
+#define _Unwind_DeleteException __symverglobal_Unwind_DeleteException
|
||||
+#define _Unwind_FindEnclosingFunction __symverglobal_Unwind_FindEnclosingFunction
|
||||
+#define _Unwind_ForcedUnwind __symverglobal_Unwind_ForcedUnwind
|
||||
+#define _Unwind_GetBSP __symverglobal_Unwind_GetBSP
|
||||
+#define _Unwind_GetCFA __symverglobal_Unwind_GetCFA
|
||||
+#define _Unwind_GetGR __symverglobal_Unwind_GetGR
|
||||
+#define _Unwind_GetIP __symverglobal_Unwind_GetIP
|
||||
+#define _Unwind_GetLanguageSpecificData __symverglobal_Unwind_GetLanguageSpecificData
|
||||
+#define _Unwind_GetRegionStart __symverglobal_Unwind_GetRegionStart
|
||||
+#define _Unwind_RaiseException __symverglobal_Unwind_RaiseException
|
||||
+#define _Unwind_Resume __symverglobal_Unwind_Resume
|
||||
+#define _Unwind_Resume_or_Rethrow __symverglobal_Unwind_Resume_or_Rethrow
|
||||
+#define _Unwind_SetGR __symverglobal_Unwind_SetGR
|
||||
+#define _Unwind_SetIP __symverglobal_Unwind_SetIP
|
||||
+#endif
|
||||
+
|
||||
enum unw_application_register
|
||||
{
|
||||
UNW_AR_BSP,
|
||||
@@ -2402,4 +2447,44 @@ alias (_Unwind_SetGR);
|
||||
alias (_Unwind_SetIP);
|
||||
#endif
|
||||
|
||||
+#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
|
||||
+#undef alias
|
||||
+#define symverglobal(name, version) \
|
||||
+__typeof (__symverglobal##name) __symverlocal##name \
|
||||
+ __attribute__ ((alias ("__symverglobal" #name))); \
|
||||
+__asm__ (".symver __symverglobal" #name"," #name "@@GCC_3.4.2");\
|
||||
+__asm__ (".symver __symverlocal" #name"," #name "@" #version)
|
||||
+
|
||||
+#undef _Unwind_Backtrace
|
||||
+#undef _Unwind_DeleteException
|
||||
+#undef _Unwind_FindEnclosingFunction
|
||||
+#undef _Unwind_ForcedUnwind
|
||||
+#undef _Unwind_GetBSP
|
||||
+#undef _Unwind_GetCFA
|
||||
+#undef _Unwind_GetGR
|
||||
+#undef _Unwind_GetIP
|
||||
+#undef _Unwind_GetLanguageSpecificData
|
||||
+#undef _Unwind_GetRegionStart
|
||||
+#undef _Unwind_RaiseException
|
||||
+#undef _Unwind_Resume
|
||||
+#undef _Unwind_Resume_or_Rethrow
|
||||
+#undef _Unwind_SetGR
|
||||
+#undef _Unwind_SetIP
|
||||
+symverglobal (_Unwind_Backtrace, GCC_3.3);
|
||||
+symverglobal (_Unwind_DeleteException, GCC_3.0);
|
||||
+symverglobal (_Unwind_FindEnclosingFunction, GCC_3.3);
|
||||
+symverglobal (_Unwind_ForcedUnwind, GCC_3.0);
|
||||
+symverglobal (_Unwind_GetBSP, GCC_3.3.2);
|
||||
+symverglobal (_Unwind_GetCFA, GCC_3.3);
|
||||
+symverglobal (_Unwind_GetGR, GCC_3.0);
|
||||
+symverglobal (_Unwind_GetIP, GCC_3.0);
|
||||
+symverglobal (_Unwind_GetLanguageSpecificData, GCC_3.0);
|
||||
+symverglobal (_Unwind_GetRegionStart, GCC_3.0);
|
||||
+symverglobal (_Unwind_RaiseException, GCC_3.0);
|
||||
+symverglobal (_Unwind_Resume, GCC_3.0);
|
||||
+symverglobal (_Unwind_Resume_or_Rethrow, GCC_3.3);
|
||||
+symverglobal (_Unwind_SetGR, GCC_3.0);
|
||||
+symverglobal (_Unwind_SetIP, GCC_3.0);
|
||||
+#endif
|
||||
+
|
||||
#endif
|
||||
--- gcc/config/ia64/mkmap-symver-multi.awk.jj 2004-02-18 10:27:36.000000000 -0500
|
||||
+++ gcc/config/ia64/mkmap-symver-multi.awk 2004-11-15 09:46:50.000000000 -0500
|
||||
@@ -0,0 +1,133 @@
|
||||
+# Generate an ELF symbol version map a-la Solaris and GNU ld.
|
||||
+# Contributed by Richard Henderson <rth@cygnus.com>
|
||||
+#
|
||||
+# This file is part of GCC.
|
||||
+#
|
||||
+# GCC 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 2, or (at your option) any later
|
||||
+# version.
|
||||
+#
|
||||
+# GCC 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 GCC; see the file COPYING. If not, write to the Free
|
||||
+# Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
+# 02110-1301, USA.
|
||||
+
|
||||
+BEGIN {
|
||||
+ state = "nm";
|
||||
+ sawsymbol = 0;
|
||||
+}
|
||||
+
|
||||
+# Remove comment and blank lines.
|
||||
+/^ *#/ || /^ *$/ {
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+# We begin with nm input. Collect the set of symbols that are present
|
||||
+# so that we can not emit them into the final version script -- Solaris
|
||||
+# complains at us if we do.
|
||||
+
|
||||
+state == "nm" && /^%%/ {
|
||||
+ state = "ver";
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+state == "nm" && ($1 == "U" || $2 == "U") {
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+state == "nm" && NF == 3 {
|
||||
+ if ($3 ~ /^[^@]*@GCC_[0-9.]*$/) {
|
||||
+ def[$3] = 1
|
||||
+ tl=$3
|
||||
+ sub(/^.*@/,"",tl)
|
||||
+ ver[$3] = tl
|
||||
+ } else {
|
||||
+ sub(/@@?GCC_[0-9.]*$/,"",$3)
|
||||
+ def[$3] = 1;
|
||||
+ }
|
||||
+ sawsymbol = 1;
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+state == "nm" {
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+# Now we process a simplified variant of the Solaris symbol version
|
||||
+# script. We have one symbol per line, no semicolons, simple markers
|
||||
+# for beginning and ending each section, and %inherit markers for
|
||||
+# describing version inheritence. A symbol may appear in more than
|
||||
+# one symbol version, and the last seen takes effect.
|
||||
+
|
||||
+NF == 3 && $1 == "%inherit" {
|
||||
+ inherit[$2] = $3;
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+NF == 2 && $2 == "{" {
|
||||
+ libs[$1] = 1;
|
||||
+ thislib = $1;
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+$1 == "}" {
|
||||
+ thislib = "";
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+{
|
||||
+ ver[$1] = thislib;
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+END {
|
||||
+ if (!sawsymbol)
|
||||
+ {
|
||||
+ print "No symbols seen -- broken or mis-installed nm?" | "cat 1>&2";
|
||||
+ exit 1;
|
||||
+ }
|
||||
+ for (l in libs)
|
||||
+ output(l);
|
||||
+}
|
||||
+
|
||||
+function output(lib) {
|
||||
+ if (done[lib])
|
||||
+ return;
|
||||
+ done[lib] = 1;
|
||||
+ if (inherit[lib])
|
||||
+ output(inherit[lib]);
|
||||
+
|
||||
+ empty=1
|
||||
+ for (sym in ver)
|
||||
+ if ((ver[sym] == lib) && (sym in def))
|
||||
+ {
|
||||
+ if (empty)
|
||||
+ {
|
||||
+ printf("%s {\n", lib);
|
||||
+ printf(" global:\n");
|
||||
+ empty = 0;
|
||||
+ }
|
||||
+ symp = sym;
|
||||
+ sub(/@GCC_[0-9.]*$/,"",symp);
|
||||
+ printf("\t%s;\n", symp);
|
||||
+ if (dotsyms)
|
||||
+ printf("\t.%s;\n", symp);
|
||||
+ }
|
||||
+
|
||||
+ if (empty)
|
||||
+ {
|
||||
+ for (l in libs)
|
||||
+ if (inherit[l] == lib)
|
||||
+ inherit[l] = inherit[lib];
|
||||
+ }
|
||||
+ else if (inherit[lib])
|
||||
+ printf("} %s;\n", inherit[lib]);
|
||||
+ else
|
||||
+ printf ("\n local:\n\t*;\n};\n");
|
||||
+}
|
||||
--- gcc/config/ia64/libgcc-ia64-no-libunwind.ver.jj 2004-02-18 10:27:36.000000000 -0500
|
||||
+++ gcc/config/ia64/libgcc-ia64-no-libunwind.ver 2004-11-15 09:19:56.000000000 -0500
|
||||
@@ -0,0 +1,17 @@
|
||||
+GCC_3.4.2 {
|
||||
+ _Unwind_GetGR
|
||||
+ _Unwind_RaiseException
|
||||
+ _Unwind_GetRegionStart
|
||||
+ _Unwind_SetIP
|
||||
+ _Unwind_GetIP
|
||||
+ _Unwind_GetLanguageSpecificData
|
||||
+ _Unwind_Resume
|
||||
+ _Unwind_DeleteException
|
||||
+ _Unwind_SetGR
|
||||
+ _Unwind_ForcedUnwind
|
||||
+ _Unwind_Backtrace
|
||||
+ _Unwind_FindEnclosingFunction
|
||||
+ _Unwind_GetCFA
|
||||
+ _Unwind_Resume_or_Rethrow
|
||||
+ _Unwind_GetBSP
|
||||
+}
|
|
@ -0,0 +1,316 @@
|
|||
2004-01-23 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* system.h (ICE_EXIT_CODE): Define.
|
||||
* gcc.c (execute): Don't free first string early, but at the end
|
||||
of the function. Call retry_ice if compiler exited with
|
||||
ICE_EXIT_CODE.
|
||||
(retry_ice): New function.
|
||||
* diagnostic.c (diagnostic_count_diagnostic,
|
||||
diagnostic_action_after_output, error_recursion): Exit with
|
||||
ICE_EXIT_CODE instead of FATAL_EXIT_CODE.
|
||||
|
||||
--- gcc/system.h.jj 2004-01-19 17:29:30.000000000 +0100
|
||||
+++ gcc/system.h 2004-01-21 11:53:41.000000000 +0100
|
||||
@@ -153,6 +153,10 @@ extern int errno;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+#ifndef ICE_EXIT_CODE
|
||||
+# define ICE_EXIT_CODE 27
|
||||
+#endif
|
||||
+
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
--- gcc/gcc.c.jj 2004-01-21 11:45:20.000000000 +0100
|
||||
+++ gcc/gcc.c 2004-01-21 11:56:46.000000000 +0100
|
||||
@@ -346,6 +346,9 @@ static void init_gcc_specs (struct obsta
|
||||
#if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
|
||||
static const char *convert_filename (const char *, int, int);
|
||||
#endif
|
||||
+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
|
||||
+static void retry_ice (const char *prog, const char **argv);
|
||||
+#endif
|
||||
|
||||
static const char *if_exists_spec_function (int, const char **);
|
||||
static const char *if_exists_else_spec_function (int, const char **);
|
||||
@@ -2841,7 +2844,7 @@ execute (void)
|
||||
}
|
||||
}
|
||||
|
||||
- if (string != commands[i].prog)
|
||||
+ if (i && string != commands[i].prog)
|
||||
free ((void *) string);
|
||||
}
|
||||
|
||||
@@ -2897,6 +2900,16 @@ See %s for instructions.",
|
||||
else if (WIFEXITED (status)
|
||||
&& WEXITSTATUS (status) >= MIN_FATAL_STATUS)
|
||||
{
|
||||
+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
|
||||
+ /* For ICEs in cc1, cc1obj, cc1plus see if it is
|
||||
+ reproducible or not. */
|
||||
+ char *p;
|
||||
+ if (WEXITSTATUS (status) == ICE_EXIT_CODE
|
||||
+ && i == 0
|
||||
+ && (p = strrchr (commands[0].argv[0], DIR_SEPARATOR))
|
||||
+ && ! strncmp (p + 1, "cc1", 3))
|
||||
+ retry_ice (commands[0].prog, commands[0].argv);
|
||||
+#endif
|
||||
if (WEXITSTATUS (status) > greatest_status)
|
||||
greatest_status = WEXITSTATUS (status);
|
||||
ret_code = -1;
|
||||
@@ -2917,6 +2930,9 @@ See %s for instructions.",
|
||||
}
|
||||
}
|
||||
|
||||
+ if (commands[0].argv[0] != commands[0].prog)
|
||||
+ free ((PTR) commands[0].argv[0]);
|
||||
+
|
||||
return ret_code;
|
||||
}
|
||||
}
|
||||
@@ -5898,6 +5914,224 @@ give_switch (int switchnum, int omit_fir
|
||||
switches[switchnum].validated = 1;
|
||||
}
|
||||
|
||||
+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
|
||||
+#define RETRY_ICE_ATTEMPTS 2
|
||||
+
|
||||
+static void
|
||||
+retry_ice (const char *prog, const char **argv)
|
||||
+{
|
||||
+ int nargs, out_arg = -1, quiet = 0, attempt;
|
||||
+ int pid, retries, sleep_interval;
|
||||
+ const char **new_argv;
|
||||
+ char *temp_filenames[RETRY_ICE_ATTEMPTS * 2 + 2];
|
||||
+
|
||||
+ if (input_filename == NULL || ! strcmp (input_filename, "-"))
|
||||
+ return;
|
||||
+
|
||||
+ for (nargs = 0; argv[nargs] != NULL; ++nargs)
|
||||
+ /* Only retry compiler ICEs, not preprocessor ones. */
|
||||
+ if (! strcmp (argv[nargs], "-E"))
|
||||
+ return;
|
||||
+ else if (argv[nargs][0] == '-' && argv[nargs][1] == 'o')
|
||||
+ {
|
||||
+ if (out_arg == -1)
|
||||
+ out_arg = nargs;
|
||||
+ else
|
||||
+ return;
|
||||
+ }
|
||||
+ /* If the compiler is going to output any time information,
|
||||
+ it might varry between invocations. */
|
||||
+ else if (! strcmp (argv[nargs], "-quiet"))
|
||||
+ quiet = 1;
|
||||
+ else if (! strcmp (argv[nargs], "-ftime-report"))
|
||||
+ return;
|
||||
+
|
||||
+ if (out_arg == -1 || !quiet)
|
||||
+ return;
|
||||
+
|
||||
+ memset (temp_filenames, '\0', sizeof (temp_filenames));
|
||||
+ new_argv = alloca ((nargs + 3) * sizeof (const char *));
|
||||
+ memcpy (new_argv, argv, (nargs + 1) * sizeof (const char *));
|
||||
+ new_argv[nargs++] = "-frandom-seed=0";
|
||||
+ new_argv[nargs] = NULL;
|
||||
+ if (new_argv[out_arg][2] == '\0')
|
||||
+ new_argv[out_arg + 1] = "-";
|
||||
+ else
|
||||
+ new_argv[out_arg] = "-o-";
|
||||
+
|
||||
+ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS + 1; ++attempt)
|
||||
+ {
|
||||
+ int fd = -1;
|
||||
+ int status;
|
||||
+
|
||||
+ temp_filenames[attempt * 2] = make_temp_file (".out");
|
||||
+ temp_filenames[attempt * 2 + 1] = make_temp_file (".err");
|
||||
+
|
||||
+ if (attempt == RETRY_ICE_ATTEMPTS)
|
||||
+ {
|
||||
+ int i;
|
||||
+ int fd1, fd2;
|
||||
+ struct stat st1, st2;
|
||||
+ size_t n, len;
|
||||
+ char *buf;
|
||||
+
|
||||
+ buf = xmalloc (8192);
|
||||
+
|
||||
+ for (i = 0; i < 2; ++i)
|
||||
+ {
|
||||
+ fd1 = open (temp_filenames[i], O_RDONLY);
|
||||
+ fd2 = open (temp_filenames[2 + i], O_RDONLY);
|
||||
+
|
||||
+ if (fd1 < 0 || fd2 < 0)
|
||||
+ {
|
||||
+ i = -1;
|
||||
+ close (fd1);
|
||||
+ close (fd2);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (fstat (fd1, &st1) < 0 || fstat (fd2, &st2) < 0)
|
||||
+ {
|
||||
+ i = -1;
|
||||
+ close (fd1);
|
||||
+ close (fd2);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (st1.st_size != st2.st_size)
|
||||
+ {
|
||||
+ close (fd1);
|
||||
+ close (fd2);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ len = 0;
|
||||
+ for (n = st1.st_size; n; n -= len)
|
||||
+ {
|
||||
+ len = n;
|
||||
+ if (len > 4096)
|
||||
+ len = 4096;
|
||||
+
|
||||
+ if (read (fd1, buf, len) != (int) len
|
||||
+ || read (fd2, buf + 4096, len) != (int) len)
|
||||
+ {
|
||||
+ i = -1;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (memcmp (buf, buf + 4096, len) != 0)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ close (fd1);
|
||||
+ close (fd2);
|
||||
+
|
||||
+ if (n)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ free (buf);
|
||||
+ if (i == -1)
|
||||
+ break;
|
||||
+
|
||||
+ if (i != 2)
|
||||
+ {
|
||||
+ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ fd = open (temp_filenames[attempt * 2], O_RDWR);
|
||||
+ if (fd < 0)
|
||||
+ break;
|
||||
+ write (fd, "//", 2);
|
||||
+ for (i = 0; i < nargs; i++)
|
||||
+ {
|
||||
+ write (fd, " ", 1);
|
||||
+ write (fd, new_argv[i], strlen (new_argv[i]));
|
||||
+ }
|
||||
+ write (fd, "\n", 1);
|
||||
+ new_argv[nargs] = "-E";
|
||||
+ new_argv[nargs + 1] = NULL;
|
||||
+ }
|
||||
+
|
||||
+ /* Fork a subprocess; wait and retry if it fails. */
|
||||
+ sleep_interval = 1;
|
||||
+ pid = -1;
|
||||
+ for (retries = 0; retries < 4; retries++)
|
||||
+ {
|
||||
+ pid = fork ();
|
||||
+ if (pid >= 0)
|
||||
+ break;
|
||||
+ sleep (sleep_interval);
|
||||
+ sleep_interval *= 2;
|
||||
+ }
|
||||
+
|
||||
+ if (pid < 0)
|
||||
+ break;
|
||||
+ else if (pid == 0)
|
||||
+ {
|
||||
+ if (attempt != RETRY_ICE_ATTEMPTS)
|
||||
+ fd = open (temp_filenames[attempt * 2], O_RDWR);
|
||||
+ if (fd < 0)
|
||||
+ exit (-1);
|
||||
+ if (fd != 1)
|
||||
+ {
|
||||
+ close (1);
|
||||
+ dup (fd);
|
||||
+ close (fd);
|
||||
+ }
|
||||
+
|
||||
+ fd = open (temp_filenames[attempt * 2 + 1], O_RDWR);
|
||||
+ if (fd < 0)
|
||||
+ exit (-1);
|
||||
+ if (fd != 2)
|
||||
+ {
|
||||
+ close (2);
|
||||
+ dup (fd);
|
||||
+ close (fd);
|
||||
+ }
|
||||
+
|
||||
+ if (prog == new_argv[0])
|
||||
+ execvp (prog, (char *const *) new_argv);
|
||||
+ else
|
||||
+ execv (new_argv[0], (char *const *) new_argv);
|
||||
+ exit (-1);
|
||||
+ }
|
||||
+
|
||||
+ if (waitpid (pid, &status, 0) < 0)
|
||||
+ break;
|
||||
+
|
||||
+ if (attempt < RETRY_ICE_ATTEMPTS
|
||||
+ && (! WIFEXITED (status) || WEXITSTATUS (status) != ICE_EXIT_CODE))
|
||||
+ {
|
||||
+ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
|
||||
+ break;
|
||||
+ }
|
||||
+ else if (attempt == RETRY_ICE_ATTEMPTS)
|
||||
+ {
|
||||
+ close (fd);
|
||||
+ if (WIFEXITED (status)
|
||||
+ && WEXITSTATUS (status) == SUCCESS_EXIT_CODE)
|
||||
+ {
|
||||
+ notice ("Preprocessed source stored into %s file, please attach this to your bugreport.\n",
|
||||
+ temp_filenames[attempt * 2]);
|
||||
+ /* Make sure it is not deleted. */
|
||||
+ free (temp_filenames[attempt * 2]);
|
||||
+ temp_filenames[attempt * 2] = NULL;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS * 2 + 2; attempt++)
|
||||
+ if (temp_filenames[attempt])
|
||||
+ {
|
||||
+ unlink (temp_filenames[attempt]);
|
||||
+ free (temp_filenames[attempt]);
|
||||
+ }
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/* Search for a file named NAME trying various prefixes including the
|
||||
user's -B prefix and some standard ones.
|
||||
Return the absolute file name found. If nothing is found, return NAME. */
|
||||
--- gcc/diagnostic.c.jj 2003-10-01 12:09:21.000000000 +0200
|
||||
+++ gcc/diagnostic.c 2004-01-21 11:54:47.000000000 +0100
|
||||
@@ -237,14 +237,14 @@ diagnostic_action_after_output (diagnost
|
||||
fnotice (stderr, "Please submit a full bug report,\n"
|
||||
"with preprocessed source if appropriate.\n"
|
||||
"See %s for instructions.\n", bug_report_url);
|
||||
- exit (FATAL_EXIT_CODE);
|
||||
+ exit (ICE_EXIT_CODE);
|
||||
|
||||
case DK_FATAL:
|
||||
if (context->abort_on_error)
|
||||
real_abort ();
|
||||
|
||||
fnotice (stderr, "compilation terminated.\n");
|
||||
- exit (FATAL_EXIT_CODE);
|
||||
+ exit (ICE_EXIT_CODE);
|
||||
|
||||
default:
|
||||
gcc_unreachable ();
|
|
@ -0,0 +1,957 @@
|
|||
2007-05-18 Aurelien Jarno <aurelien@aurel32.net>
|
||||
|
||||
* src/arm/ffi.c (ffi_prep_closure_loc): Renamed and ajusted
|
||||
from (ffi_prep_closure): ... this.
|
||||
(FFI_INIT_TRAMPOLINE): Adjust.
|
||||
|
||||
2005-12-31 Phil Blundell <pb@reciva.com>
|
||||
|
||||
* src/arm/ffi.c (ffi_prep_incoming_args_SYSV,
|
||||
ffi_closure_SYSV_inner, ffi_prep_closure): New, add closure support.
|
||||
* src/arm/sysv.S(ffi_closure_SYSV): Likewise.
|
||||
* src/arm/ffitarget.h (FFI_TRAMPOLINE_SIZE): Likewise.
|
||||
(FFI_CLOSURES): Enable closure support.
|
||||
|
||||
2007-07-03 Andrew Haley <aph@hedges.billgatliff.com>
|
||||
|
||||
* testsuite/libffi.call/cls_multi_ushort.c,
|
||||
testsuite/libffi.call/cls_align_uint16.c,
|
||||
testsuite/libffi.call/nested_struct1.c,
|
||||
testsuite/libffi.call/nested_struct3.c,
|
||||
testsuite/libffi.call/cls_7_1_byte.c,
|
||||
testsuite/libffi.call/cls_double.c,
|
||||
testsuite/libffi.call/cls_sint.c,
|
||||
testsuite/libffi.call/cls_20byte1.c,
|
||||
testsuite/libffi.call/cls_multi_sshortchar.c,
|
||||
testsuite/libffi.call/cls_align_sint64.c,
|
||||
testsuite/libffi.call/cls_3byte2.c,
|
||||
testsuite/libffi.call/cls_multi_schar.c,
|
||||
testsuite/libffi.call/cls_multi_uchar.c,
|
||||
testsuite/libffi.call/cls_19byte.c,
|
||||
testsuite/libffi.call/cls_9byte1.c,
|
||||
testsuite/libffi.call/cls_align_float.c,
|
||||
testsuite/libffi.call/closure_fn1.c,
|
||||
testsuite/libffi.call/problem1.c,
|
||||
testsuite/libffi.call/closure_fn3.c,
|
||||
testsuite/libffi.call/cls_sshort.c,
|
||||
testsuite/libffi.call/closure_fn5.c,
|
||||
testsuite/libffi.call/cls_align_double.c,
|
||||
testsuite/libffi.call/cls_2byte.c,
|
||||
testsuite/libffi.call/nested_struct.c,
|
||||
testsuite/libffi.call/cls_4byte.c,
|
||||
testsuite/libffi.call/cls_6byte.c,
|
||||
testsuite/libffi.call/cls_8byte.c,
|
||||
testsuite/libffi.call/cls_multi_sshort.c,
|
||||
testsuite/libffi.call/cls_align_uint32.c,
|
||||
testsuite/libffi.call/cls_align_sint16.c,
|
||||
testsuite/libffi.call/cls_float.c,
|
||||
testsuite/libffi.call/cls_20byte.c,
|
||||
testsuite/libffi.call/cls_5_1_byte.c,
|
||||
testsuite/libffi.call/nested_struct2.c,
|
||||
testsuite/libffi.call/cls_24byte.c,
|
||||
testsuite/libffi.call/cls_64byte.c,
|
||||
testsuite/libffi.call/cls_uint.c,
|
||||
testsuite/libffi.call/cls_multi_ushortchar.c,
|
||||
testsuite/libffi.call/cls_schar.c,
|
||||
testsuite/libffi.call/cls_uchar.c,
|
||||
testsuite/libffi.call/cls_align_uint64.c,
|
||||
testsuite/libffi.call/cls_ulonglong.c,
|
||||
testsuite/libffi.call/cls_align_longdouble.c,
|
||||
testsuite/libffi.call/cls_1_1byte.c,
|
||||
testsuite/libffi.call/cls_12byte.c,
|
||||
testsuite/libffi.call/cls_3_1byte.c,
|
||||
testsuite/libffi.call/cls_3byte1.c,
|
||||
testsuite/libffi.call/cls_4_1byte.c,
|
||||
testsuite/libffi.call/cls_6_1_byte.c,
|
||||
testsuite/libffi.call/cls_16byte.c,
|
||||
testsuite/libffi.call/cls_18byte.c,
|
||||
testsuite/libffi.call/closure_fn0.c,
|
||||
testsuite/libffi.call/cls_9byte2.c,
|
||||
testsuite/libffi.call/closure_fn2.c,
|
||||
testsuite/libffi.call/closure_fn4.c,
|
||||
testsuite/libffi.call/cls_ushort.c,
|
||||
testsuite/libffi.call/closure_fn6.c,
|
||||
testsuite/libffi.call/cls_5byte.c,
|
||||
testsuite/libffi.call/cls_align_pointer.c,
|
||||
testsuite/libffi.call/cls_7byte.c,
|
||||
testsuite/libffi.call/cls_align_sint32.c,
|
||||
testsuite/libffi.special/unwindtest.cc: Enable for ARM.
|
||||
|
||||
--- libffi/src/arm/ffitarget.h.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/src/arm/ffitarget.h 2007-09-06 14:07:30.000000000 +0200
|
||||
@@ -40,7 +40,8 @@ typedef enum ffi_abi {
|
||||
|
||||
/* ---- Definitions for closures ----------------------------------------- */
|
||||
|
||||
-#define FFI_CLOSURES 0
|
||||
+#define FFI_CLOSURES 1
|
||||
+#define FFI_TRAMPOLINE_SIZE 20
|
||||
#define FFI_NATIVE_RAW_API 0
|
||||
|
||||
#endif
|
||||
--- libffi/src/arm/ffi.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/src/arm/ffi.c 2007-09-06 14:07:30.000000000 +0200
|
||||
@@ -168,3 +168,122 @@ void ffi_call(ffi_cif *cif, void (*fn)()
|
||||
break;
|
||||
}
|
||||
}
|
||||
+
|
||||
+/** private members **/
|
||||
+
|
||||
+static void ffi_prep_incoming_args_SYSV (char *stack, void **ret,
|
||||
+ void** args, ffi_cif* cif);
|
||||
+
|
||||
+void ffi_closure_SYSV (ffi_closure *);
|
||||
+
|
||||
+/* This function is jumped to by the trampoline */
|
||||
+
|
||||
+unsigned int
|
||||
+ffi_closure_SYSV_inner (closure, respp, args)
|
||||
+ ffi_closure *closure;
|
||||
+ void **respp;
|
||||
+ void *args;
|
||||
+{
|
||||
+ // our various things...
|
||||
+ ffi_cif *cif;
|
||||
+ void **arg_area;
|
||||
+
|
||||
+ cif = closure->cif;
|
||||
+ arg_area = (void**) alloca (cif->nargs * sizeof (void*));
|
||||
+
|
||||
+ /* this call will initialize ARG_AREA, such that each
|
||||
+ * element in that array points to the corresponding
|
||||
+ * value on the stack; and if the function returns
|
||||
+ * a structure, it will re-set RESP to point to the
|
||||
+ * structure return address. */
|
||||
+
|
||||
+ ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif);
|
||||
+
|
||||
+ (closure->fun) (cif, *respp, arg_area, closure->user_data);
|
||||
+
|
||||
+ return cif->flags;
|
||||
+}
|
||||
+
|
||||
+/*@-exportheader@*/
|
||||
+static void
|
||||
+ffi_prep_incoming_args_SYSV(char *stack, void **rvalue,
|
||||
+ void **avalue, ffi_cif *cif)
|
||||
+/*@=exportheader@*/
|
||||
+{
|
||||
+ register unsigned int i;
|
||||
+ register void **p_argv;
|
||||
+ register char *argp;
|
||||
+ register ffi_type **p_arg;
|
||||
+
|
||||
+ argp = stack;
|
||||
+
|
||||
+ if ( cif->flags == FFI_TYPE_STRUCT ) {
|
||||
+ *rvalue = *(void **) argp;
|
||||
+ argp += 4;
|
||||
+ }
|
||||
+
|
||||
+ p_argv = avalue;
|
||||
+
|
||||
+ for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++)
|
||||
+ {
|
||||
+ size_t z;
|
||||
+
|
||||
+ /* Align if necessary */
|
||||
+ if ((sizeof(int) - 1) & (unsigned) argp) {
|
||||
+ argp = (char *) ALIGN(argp, sizeof(int));
|
||||
+ }
|
||||
+
|
||||
+ z = (*p_arg)->size;
|
||||
+
|
||||
+ /* because we're little endian, this is what it turns into. */
|
||||
+
|
||||
+ *p_argv = (void*) argp;
|
||||
+
|
||||
+ p_argv++;
|
||||
+ argp += z;
|
||||
+ }
|
||||
+
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
+/* How to make a trampoline. */
|
||||
+
|
||||
+#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \
|
||||
+({ unsigned char *__tramp = (unsigned char*)(TRAMP); \
|
||||
+ unsigned int __fun = (unsigned int)(FUN); \
|
||||
+ unsigned int __ctx = (unsigned int)(CTX); \
|
||||
+ *(unsigned int*) &__tramp[0] = 0xe92d000f; /* stmfd sp!, {r0-r3} */ \
|
||||
+ *(unsigned int*) &__tramp[4] = 0xe59f0000; /* ldr r0, [pc] */ \
|
||||
+ *(unsigned int*) &__tramp[8] = 0xe59ff000; /* ldr pc, [pc] */ \
|
||||
+ *(unsigned int*) &__tramp[12] = __ctx; \
|
||||
+ *(unsigned int*) &__tramp[16] = __fun; \
|
||||
+ register unsigned long _beg __asm ("a1") = (unsigned long) (&__tramp[0]); \
|
||||
+ register unsigned long _end __asm ("a2") = (unsigned long) (&__tramp[19]); \
|
||||
+ register unsigned long _flg __asm ("a3") = 0; \
|
||||
+ __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
|
||||
+ : "=r" (_beg) \
|
||||
+ : "0" (_beg), "r" (_end), "r" (_flg)); \
|
||||
+ })
|
||||
+
|
||||
+
|
||||
+/* the cif must already be prep'ed */
|
||||
+
|
||||
+ffi_status
|
||||
+ffi_prep_closure_loc (ffi_closure* closure,
|
||||
+ ffi_cif* cif,
|
||||
+ void (*fun)(ffi_cif*,void*,void**,void*),
|
||||
+ void *user_data,
|
||||
+ void *codeloc)
|
||||
+{
|
||||
+ FFI_ASSERT (cif->abi == FFI_SYSV);
|
||||
+
|
||||
+ FFI_INIT_TRAMPOLINE (&closure->tramp[0], \
|
||||
+ &ffi_closure_SYSV, \
|
||||
+ codeloc);
|
||||
+
|
||||
+ closure->cif = cif;
|
||||
+ closure->user_data = user_data;
|
||||
+ closure->fun = fun;
|
||||
+
|
||||
+ return FFI_OK;
|
||||
+}
|
||||
--- libffi/src/arm/sysv.S.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/src/arm/sysv.S 2007-09-06 14:08:26.000000000 +0200
|
||||
@@ -207,6 +207,54 @@ LSYM(Lepilogue):
|
||||
.ffi_call_SYSV_end:
|
||||
.size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV)
|
||||
|
||||
+/*
|
||||
+ unsigned int FFI_HIDDEN
|
||||
+ ffi_closure_SYSV_inner (closure, respp, args)
|
||||
+ ffi_closure *closure;
|
||||
+ void **respp;
|
||||
+ void *args;
|
||||
+*/
|
||||
+
|
||||
+ARM_FUNC_START ffi_closure_SYSV
|
||||
+ add ip, sp, #16
|
||||
+ stmfd sp!, {ip, lr}
|
||||
+ add r2, sp, #8
|
||||
+ sub sp, sp, #16
|
||||
+ str sp, [sp, #8]
|
||||
+ add r1, sp, #8
|
||||
+ bl ffi_closure_SYSV_inner
|
||||
+ cmp r0, #FFI_TYPE_INT
|
||||
+ beq .Lretint
|
||||
+ cmp r0, #FFI_TYPE_FLOAT
|
||||
+ beq .Lretfloat
|
||||
+ cmp r0, #FFI_TYPE_DOUBLE
|
||||
+ beq .Lretdouble
|
||||
+ cmp r0, #FFI_TYPE_LONGDOUBLE
|
||||
+ beq .Lretlongdouble
|
||||
+ cmp r0, #FFI_TYPE_SINT64
|
||||
+ beq .Lretlonglong
|
||||
+.Lclosure_epilogue:
|
||||
+ add sp, sp, #16
|
||||
+ ldmfd sp, {sp, pc}
|
||||
+.Lretint:
|
||||
+ ldr r0, [sp]
|
||||
+ b .Lclosure_epilogue
|
||||
+.Lretlonglong:
|
||||
+ ldr r0, [sp]
|
||||
+ ldr r1, [sp, #4]
|
||||
+ b .Lclosure_epilogue
|
||||
+.Lretfloat:
|
||||
+ ldfs f0, [sp]
|
||||
+ b .Lclosure_epilogue
|
||||
+.Lretdouble:
|
||||
+ ldfd f0, [sp]
|
||||
+ b .Lclosure_epilogue
|
||||
+.Lretlongdouble:
|
||||
+ ldfd f0, [sp]
|
||||
+ b .Lclosure_epilogue
|
||||
+.ffi_closure_SYSV_end:
|
||||
+ .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
|
||||
+
|
||||
#if defined __ELF__ && defined __linux__
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
#endif
|
||||
--- libffi/testsuite/libffi.call/cls_multi_ushort.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_multi_ushort.c 2007-09-06 14:07:30.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: PR13221.
|
||||
Originator: <andreast@gcc.gnu.org> 20031129 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
unsigned short test_func_fn(unsigned short a1, unsigned short a2)
|
||||
--- libffi/testsuite/libffi.call/cls_align_uint16.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_uint16.c 2007-09-06 14:07:30.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.call/nested_struct1.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/nested_struct1.c 2007-09-06 14:07:30.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_16byte1 {
|
||||
--- libffi/testsuite/libffi.call/nested_struct3.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/nested_struct3.c 2007-09-06 14:07:30.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030911 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct A {
|
||||
--- libffi/testsuite/libffi.call/cls_7_1_byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_7_1_byte.c 2007-09-06 14:07:30.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20050708 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_7byte {
|
||||
--- libffi/testsuite/libffi.call/cls_double.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_double.c 2007-09-06 14:07:30.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_double_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/cls_sint.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_sint.c 2007-09-06 14:07:33.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20031108 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_sint_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/cls_20byte1.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_20byte1.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -5,7 +5,9 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+
|
||||
+
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_20byte {
|
||||
--- libffi/testsuite/libffi.call/cls_multi_sshortchar.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_multi_sshortchar.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: PR13221.
|
||||
Originator: <andreast@gcc.gnu.org> 20031129 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
signed short test_func_fn(signed char a1, signed short a2,
|
||||
--- libffi/testsuite/libffi.call/cls_align_sint64.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_sint64.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.call/cls_3byte2.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_3byte2.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_3byte_1 {
|
||||
--- libffi/testsuite/libffi.call/cls_multi_schar.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_multi_schar.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: PR13221.
|
||||
Originator: <hos@tamanegi.org> 20031129 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
signed char test_func_fn(signed char a1, signed char a2)
|
||||
--- libffi/testsuite/libffi.call/cls_multi_uchar.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_multi_uchar.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: PR13221.
|
||||
Originator: <andreast@gcc.gnu.org> 20031129 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
unsigned char test_func_fn(unsigned char a1, unsigned char a2,
|
||||
--- libffi/testsuite/libffi.call/cls_19byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_19byte.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030915 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_19byte {
|
||||
--- libffi/testsuite/libffi.call/cls_9byte1.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_9byte1.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030914 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_9byte {
|
||||
--- libffi/testsuite/libffi.call/cls_align_float.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_float.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.call/closure_fn1.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/closure_fn1.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
|
||||
--- libffi/testsuite/libffi.call/problem1.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/problem1.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct my_ffi_struct {
|
||||
--- libffi/testsuite/libffi.call/closure_fn3.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/closure_fn3.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void closure_test_fn3(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/cls_sshort.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_sshort.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20031108 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_sshort_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/closure_fn5.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/closure_fn5.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20031026 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void
|
||||
--- libffi/testsuite/libffi.call/cls_align_double.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_double.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -4,7 +4,9 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+
|
||||
+
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.call/cls_2byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_2byte.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_2byte {
|
||||
--- libffi/testsuite/libffi.call/nested_struct.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/nested_struct.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_16byte1 {
|
||||
--- libffi/testsuite/libffi.call/cls_4byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_4byte.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
|
||||
#include "ffitest.h"
|
||||
|
||||
--- libffi/testsuite/libffi.call/cls_6byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_6byte.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -5,7 +5,8 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_6byte {
|
||||
--- libffi/testsuite/libffi.call/cls_8byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_8byte.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_8byte {
|
||||
--- libffi/testsuite/libffi.call/cls_multi_sshort.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_multi_sshort.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: PR13221.
|
||||
Originator: <andreast@gcc.gnu.org> 20031129 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
signed short test_func_fn(signed short a1, signed short a2)
|
||||
--- libffi/testsuite/libffi.call/cls_align_uint32.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_uint32.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.call/cls_align_sint16.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_sint16.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.call/cls_float.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_float.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_float_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/cls_20byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_20byte.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_20byte {
|
||||
--- libffi/testsuite/libffi.call/cls_5_1_byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_5_1_byte.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20050708 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_5byte {
|
||||
--- libffi/testsuite/libffi.call/nested_struct2.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/nested_struct2.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030911 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct A {
|
||||
--- libffi/testsuite/libffi.call/cls_24byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_24byte.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_24byte {
|
||||
--- libffi/testsuite/libffi.call/cls_64byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_64byte.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_64byte {
|
||||
--- libffi/testsuite/libffi.call/cls_uint.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_uint.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_uint_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/cls_multi_ushortchar.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_multi_ushortchar.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: PR13221.
|
||||
Originator: <andreast@gcc.gnu.org> 20031129 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
unsigned short test_func_fn(unsigned char a1, unsigned short a2,
|
||||
--- libffi/testsuite/libffi.call/cls_schar.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_schar.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,9 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20031108 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+
|
||||
+
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_schar_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/cls_uchar.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_uchar.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_uchar_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/cls_align_uint64.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_uint64.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,8 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.call/cls_ulonglong.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_ulonglong.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_ulonglong_fn(ffi_cif* cif __UNUSED__, void* resp,
|
||||
--- libffi/testsuite/libffi.call/cls_align_longdouble.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_longdouble.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
|
||||
#include "ffitest.h"
|
||||
|
||||
--- libffi/testsuite/libffi.call/cls_1_1byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_1_1byte.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -6,7 +6,9 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030902 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+
|
||||
+
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_1_1byte {
|
||||
--- libffi/testsuite/libffi.call/cls_12byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_12byte.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_12byte {
|
||||
--- libffi/testsuite/libffi.call/cls_3_1byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_3_1byte.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030902 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_3_1byte {
|
||||
--- libffi/testsuite/libffi.call/cls_3byte1.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_3byte1.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_3byte {
|
||||
--- libffi/testsuite/libffi.call/cls_4_1byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_4_1byte.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030902 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_4_1byte {
|
||||
--- libffi/testsuite/libffi.call/cls_6_1_byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_6_1_byte.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20050708 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_6byte {
|
||||
--- libffi/testsuite/libffi.call/cls_16byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_16byte.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_16byte {
|
||||
--- libffi/testsuite/libffi.call/cls_18byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_18byte.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030915 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_18byte {
|
||||
--- libffi/testsuite/libffi.call/closure_fn0.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/closure_fn0.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -6,7 +6,10 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+
|
||||
+
|
||||
+
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void
|
||||
--- libffi/testsuite/libffi.call/cls_9byte2.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_9byte2.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030914 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_9byte {
|
||||
--- libffi/testsuite/libffi.call/closure_fn2.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/closure_fn2.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void closure_test_fn2(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/closure_fn4.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/closure_fn4.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20031026 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
|
||||
#include "ffitest.h"
|
||||
|
||||
--- libffi/testsuite/libffi.call/cls_ushort.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_ushort.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_ushort_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/cls_5byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_5byte.c 2007-09-06 14:07:38.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_5byte {
|
||||
--- libffi/testsuite/libffi.call/cls_align_pointer.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_pointer.c 2007-09-06 14:07:38.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.call/cls_7byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_7byte.c 2007-09-06 14:07:38.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_7byte {
|
||||
--- libffi/testsuite/libffi.call/cls_align_sint32.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_sint32.c 2007-09-06 14:07:38.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.special/unwindtest.cc.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.special/unwindtest.cc 2007-09-06 14:07:39.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: Jeff Sturm <jsturm@one-point.com> */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitestcxx.h"
|
||||
|
||||
void
|
|
@ -0,0 +1,114 @@
|
|||
2007-07-13 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* libgcj.ver: Add __gcj_personality_sj0.
|
||||
|
||||
2007-07-11 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* configure.host (arm*-linux-gnu): New.
|
||||
* sysdep/arm/locks.h: New.
|
||||
|
||||
--- libjava/configure.host (revision 126621)
|
||||
+++ libjava/configure.host (revision 126623)
|
||||
@@ -82,6 +82,10 @@ case "${host}" in
|
||||
enable_getenv_properties_default=no
|
||||
enable_main_args_default=no
|
||||
;;
|
||||
+ arm*-linux-gnu)
|
||||
+ libgcj_interpreter=yes
|
||||
+ sysdeps_dir=arm
|
||||
+ ;;
|
||||
mips-tx39-*|mipstx39-unknown-*)
|
||||
libgcj_flags="${libgcj_flags} -G 0"
|
||||
LDFLAGS="$LDFLAGS -Tjmr3904dram.ld"
|
||||
--- libjava/libgcj.ver (revision 126621)
|
||||
+++ libjava/libgcj.ver (revision 126623)
|
||||
@@ -2,6 +2,6 @@
|
||||
# symbols in libgcj.so.
|
||||
|
||||
{
|
||||
- global: Jv*; _Jv_*; __gcj_personality_v0; _Z*;
|
||||
+ global: Jv*; _Jv_*; __gcj_personality_v0; __gcj_personality_sj0; _Z*;
|
||||
local: *;
|
||||
};
|
||||
--- libjava/sysdep/arm/locks.h (revision 0)
|
||||
+++ libjava/sysdep/arm/locks.h (revision 126623)
|
||||
@@ -0,0 +1,79 @@
|
||||
+// locks.h - Thread synchronization primitives. ARM implementation.
|
||||
+
|
||||
+/* Copyright (C) 2007 Free Software Foundation
|
||||
+
|
||||
+ This file is part of libgcj.
|
||||
+
|
||||
+This software is copyrighted work licensed under the terms of the
|
||||
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
||||
+details. */
|
||||
+
|
||||
+#ifndef __SYSDEP_LOCKS_H__
|
||||
+#define __SYSDEP_LOCKS_H__
|
||||
+
|
||||
+typedef size_t obj_addr_t; /* Integer type big enough for object */
|
||||
+ /* address. */
|
||||
+
|
||||
+/* Atomic compare and exchange. These sequences are not actually
|
||||
+ atomic; there is a race if *ADDR != OLD_VAL and we are preempted
|
||||
+ between the two swaps. However, they are very close to atomic, and
|
||||
+ are the best that a pre-ARMv6 implementation can do without
|
||||
+ operating system support. LinuxThreads has been using these
|
||||
+ sequences for many years. */
|
||||
+
|
||||
+inline static bool
|
||||
+compare_and_swap(volatile obj_addr_t *addr,
|
||||
+ obj_addr_t old_val,
|
||||
+ obj_addr_t new_val)
|
||||
+{
|
||||
+ volatile obj_addr_t result, tmp;
|
||||
+ __asm__ ("\n"
|
||||
+ "0: ldr %[tmp],[%[addr]]\n"
|
||||
+ " cmp %[tmp],%[old_val]\n"
|
||||
+ " movne %[result],#0\n"
|
||||
+ " bne 1f\n"
|
||||
+ " swp %[result],%[new_val],[%[addr]]\n"
|
||||
+ " cmp %[tmp],%[result]\n"
|
||||
+ " swpne %[tmp],%[result],[%[addr]]\n"
|
||||
+ " bne 0b\n"
|
||||
+ " mov %[result],#1\n"
|
||||
+ "1:"
|
||||
+ : [result] "=&r" (result), [tmp] "=&r" (tmp)
|
||||
+ : [addr] "r" (addr), [new_val] "r" (new_val), [old_val] "r" (old_val)
|
||||
+ : "cc", "memory");
|
||||
+
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+inline static void
|
||||
+release_set(volatile obj_addr_t *addr, obj_addr_t new_val)
|
||||
+{
|
||||
+ __asm__ __volatile__("" : : : "memory");
|
||||
+ *(addr) = new_val;
|
||||
+}
|
||||
+
|
||||
+inline static bool
|
||||
+compare_and_swap_release(volatile obj_addr_t *addr,
|
||||
+ obj_addr_t old,
|
||||
+ obj_addr_t new_val)
|
||||
+{
|
||||
+ return compare_and_swap(addr, old, new_val);
|
||||
+}
|
||||
+
|
||||
+// Ensure that subsequent instructions do not execute on stale
|
||||
+// data that was loaded from memory before the barrier.
|
||||
+inline static void
|
||||
+read_barrier()
|
||||
+{
|
||||
+ __asm__ __volatile__("" : : : "memory");
|
||||
+}
|
||||
+
|
||||
+// Ensure that prior stores to memory are completed with respect to other
|
||||
+// processors.
|
||||
+inline static void
|
||||
+write_barrier()
|
||||
+{
|
||||
+ __asm__ __volatile__("" : : : "memory");
|
||||
+}
|
||||
+
|
||||
+#endif
|
|
@ -0,0 +1,33 @@
|
|||
2007-07-15 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* unwind-sjlj.c (_Unwind_GetIPInfo): Check for context->fc != NULL
|
||||
before looking in the context.
|
||||
|
||||
* configure.host:
|
||||
arm*-linux-gnu -> arm*-linux*.
|
||||
|
||||
--- gcc/unwind-sjlj.c (revision 126657)
|
||||
+++ gcc/unwind-sjlj.c (revision 126659)
|
||||
@@ -222,7 +222,10 @@ _Unwind_Ptr
|
||||
_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
|
||||
{
|
||||
*ip_before_insn = 0;
|
||||
- return context->fc->call_site + 1;
|
||||
+ if (context->fc != NULL)
|
||||
+ return context->fc->call_site + 1;
|
||||
+ else
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Set the return landing pad index in CONTEXT. */
|
||||
--- libjava/configure.host (revision 126657)
|
||||
+++ libjava/configure.host (revision 126659)
|
||||
@@ -82,7 +82,7 @@ case "${host}" in
|
||||
enable_getenv_properties_default=no
|
||||
enable_main_args_default=no
|
||||
;;
|
||||
- arm*-linux-gnu)
|
||||
+ arm*-linux*)
|
||||
libgcj_interpreter=yes
|
||||
sysdeps_dir=arm
|
||||
;;
|
|
@ -0,0 +1,138 @@
|
|||
2007-09-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
|
||||
when using the ARM EABI.
|
||||
|
||||
2007-08-29 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* config/arm/libgcc-bpabi.ver: Add _Unwind_Backtrace as GCC_4.3.0.
|
||||
|
||||
2007-08-08 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* config/arm/libunwind.S (UNWIND_WRAPPER _Unwind_Backtrace): New.
|
||||
* config/arm/unwind-arm.h (__gnu_Unwind_Backtrace): New.
|
||||
* config/arm/unwind-arm.c (__gnu_Unwind_Backtrace): New.
|
||||
|
||||
--- gcc/java/decl.c (revision 128085)
|
||||
+++ gcc/java/decl.c (revision 128088)
|
||||
@@ -1075,7 +1075,10 @@ java_init_decl_processing (void)
|
||||
eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS
|
||||
? "__gcj_personality_sj0"
|
||||
: "__gcj_personality_v0");
|
||||
- default_init_unwind_resume_libfunc ();
|
||||
+ if (targetm.arm_eabi_unwinder)
|
||||
+ unwind_resume_libfunc = init_one_libfunc ("__cxa_end_cleanup");
|
||||
+ else
|
||||
+ default_init_unwind_resume_libfunc ();
|
||||
|
||||
lang_eh_runtime_type = do_nothing;
|
||||
|
||||
--- gcc/config/arm/libunwind.S (revision 128085)
|
||||
+++ gcc/config/arm/libunwind.S (revision 128088)
|
||||
@@ -237,5 +237,6 @@ UNWIND_WRAPPER _Unwind_RaiseException 1
|
||||
UNWIND_WRAPPER _Unwind_Resume 1
|
||||
UNWIND_WRAPPER _Unwind_Resume_or_Rethrow 1
|
||||
UNWIND_WRAPPER _Unwind_ForcedUnwind 3
|
||||
+UNWIND_WRAPPER _Unwind_Backtrace 2
|
||||
|
||||
-#endif /* __symbian__ */
|
||||
+#endif /* ndef __symbian__ */
|
||||
--- gcc/config/arm/libgcc-bpabi.ver (revision 128085)
|
||||
+++ gcc/config/arm/libgcc-bpabi.ver (revision 128088)
|
||||
@@ -81,3 +81,11 @@ GCC_3.5 {
|
||||
# GNU-specific entry point.
|
||||
__gnu_unwind_frame
|
||||
}
|
||||
+
|
||||
+%exclude {
|
||||
+ _Unwind_Backtrace
|
||||
+}
|
||||
+%inherit GCC_4.3.0 GCC_4.2.0
|
||||
+GCC_4.3.0 {
|
||||
+ _Unwind_Backtrace
|
||||
+}
|
||||
--- gcc/config/arm/unwind-arm.c (revision 128085)
|
||||
+++ gcc/config/arm/unwind-arm.c (revision 128088)
|
||||
@@ -950,6 +950,66 @@ _Unwind_DeleteException (_Unwind_Excepti
|
||||
}
|
||||
|
||||
|
||||
+/* Perform stack backtrace through unwind data. */
|
||||
+_Unwind_Reason_Code
|
||||
+__gnu_Unwind_Backtrace(_Unwind_Trace_Fn trace, void * trace_argument,
|
||||
+ phase2_vrs * entry_vrs);
|
||||
+_Unwind_Reason_Code
|
||||
+__gnu_Unwind_Backtrace(_Unwind_Trace_Fn trace, void * trace_argument,
|
||||
+ phase2_vrs * entry_vrs)
|
||||
+{
|
||||
+ phase1_vrs saved_vrs;
|
||||
+ _Unwind_Reason_Code code;
|
||||
+
|
||||
+ _Unwind_Control_Block ucb;
|
||||
+ _Unwind_Control_Block *ucbp = &ucb;
|
||||
+
|
||||
+ /* Set the pc to the call site. */
|
||||
+ entry_vrs->core.r[R_PC] = entry_vrs->core.r[R_LR];
|
||||
+
|
||||
+ /* Save the core registers. */
|
||||
+ saved_vrs.core = entry_vrs->core;
|
||||
+ /* Set demand-save flags. */
|
||||
+ saved_vrs.demand_save_flags = ~(_uw) 0;
|
||||
+
|
||||
+ do
|
||||
+ {
|
||||
+ /* Find the entry for this routine. */
|
||||
+ if (get_eit_entry (ucbp, saved_vrs.core.r[R_PC]) != _URC_OK)
|
||||
+ {
|
||||
+ code = _URC_FAILURE;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* The dwarf unwinder assumes the context structure holds things
|
||||
+ like the function and LSDA pointers. The ARM implementation
|
||||
+ caches these in the exception header (UCB). To avoid
|
||||
+ rewriting everything we make the virtual IP register point at
|
||||
+ the UCB. */
|
||||
+ _Unwind_SetGR((_Unwind_Context *)&saved_vrs, 12, (_Unwind_Ptr) ucbp);
|
||||
+
|
||||
+ /* Call trace function. */
|
||||
+ if ((*trace) ((_Unwind_Context *) &saved_vrs, trace_argument)
|
||||
+ != _URC_NO_REASON)
|
||||
+ {
|
||||
+ code = _URC_FAILURE;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* Call the pr to decide what to do. */
|
||||
+ code = ((personality_routine) UCB_PR_ADDR (ucbp))
|
||||
+ (_US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND,
|
||||
+ ucbp, (void *) &saved_vrs);
|
||||
+ }
|
||||
+ while (code != _URC_END_OF_STACK
|
||||
+ && code != _URC_FAILURE);
|
||||
+
|
||||
+ finish:
|
||||
+ restore_non_core_regs (&saved_vrs);
|
||||
+ return code;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/* Common implementation for ARM ABI defined personality routines.
|
||||
ID is the index of the personality routine, other arguments are as defined
|
||||
by __aeabi_unwind_cpp_pr{0,1,2}. */
|
||||
--- gcc/config/arm/unwind-arm.h (revision 128085)
|
||||
+++ gcc/config/arm/unwind-arm.h (revision 128088)
|
||||
@@ -205,6 +205,13 @@ extern "C" {
|
||||
_Unwind_Control_Block *, struct _Unwind_Context *, void *);
|
||||
_Unwind_Reason_Code _Unwind_ForcedUnwind (_Unwind_Control_Block *,
|
||||
_Unwind_Stop_Fn, void *);
|
||||
+ /* @@@ Use unwind data to perform a stack backtrace. The trace callback
|
||||
+ is called for every stack frame in the call chain, but no cleanup
|
||||
+ actions are performed. */
|
||||
+ typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn) (_Unwind_Context *, void *);
|
||||
+ _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn,
|
||||
+ void*);
|
||||
+
|
||||
_Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *);
|
||||
void _Unwind_Complete(_Unwind_Control_Block *ucbp);
|
||||
void _Unwind_DeleteException (_Unwind_Exception *);
|
|
@ -0,0 +1,280 @@
|
|||
2007-09-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* src/arm/sysv.S (UNWIND): New.
|
||||
(Whole file): Conditionally compile unwinder directives.
|
||||
* src/arm/sysv.S: Add unwinder directives.
|
||||
|
||||
* src/arm/ffi.c (ffi_prep_args): Align structs by at least 4 bytes.
|
||||
Only treat r0 as a struct address if we're actually returning a
|
||||
struct by address.
|
||||
Only copy the bytes that are actually within a struct.
|
||||
(ffi_prep_cif_machdep): A Composite Type not larger than 4 bytes
|
||||
is returned in r0, not passed by address.
|
||||
(ffi_call): Allocate a word-sized temporary for the case where
|
||||
a composite is returned in r0.
|
||||
(ffi_prep_incoming_args_SYSV): Align as necessary.
|
||||
|
||||
2007-08-05 Steven Newbury <s_j_newbury@yahoo.co.uk>
|
||||
|
||||
* src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Use __clear_cache instead of
|
||||
directly using the sys_cacheflush syscall.
|
||||
|
||||
2007-07-27 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* src/arm/sysv.S (ffi_closure_SYSV): Add soft-float.
|
||||
|
||||
--- libffi/src/arm/ffi.c (revision 128092)
|
||||
+++ libffi/src/arm/ffi.c (revision 128093)
|
||||
@@ -40,7 +40,7 @@ void ffi_prep_args(char *stack, extended
|
||||
|
||||
argp = stack;
|
||||
|
||||
- if ( ecif->cif->rtype->type == FFI_TYPE_STRUCT ) {
|
||||
+ if ( ecif->cif->flags == FFI_TYPE_STRUCT ) {
|
||||
*(void **) argp = ecif->rvalue;
|
||||
argp += 4;
|
||||
}
|
||||
@@ -58,6 +58,9 @@ void ffi_prep_args(char *stack, extended
|
||||
argp = (char *) ALIGN(argp, (*p_arg)->alignment);
|
||||
}
|
||||
|
||||
+ if ((*p_arg)->type == FFI_TYPE_STRUCT)
|
||||
+ argp = (char *) ALIGN(argp, 4);
|
||||
+
|
||||
z = (*p_arg)->size;
|
||||
if (z < sizeof(int))
|
||||
{
|
||||
@@ -81,7 +84,7 @@ void ffi_prep_args(char *stack, extended
|
||||
break;
|
||||
|
||||
case FFI_TYPE_STRUCT:
|
||||
- *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
|
||||
+ memcpy(argp, *p_argv, (*p_arg)->size);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -115,7 +118,6 @@ ffi_status ffi_prep_cif_machdep(ffi_cif
|
||||
switch (cif->rtype->type)
|
||||
{
|
||||
case FFI_TYPE_VOID:
|
||||
- case FFI_TYPE_STRUCT:
|
||||
case FFI_TYPE_FLOAT:
|
||||
case FFI_TYPE_DOUBLE:
|
||||
cif->flags = (unsigned) cif->rtype->type;
|
||||
@@ -126,6 +128,17 @@ ffi_status ffi_prep_cif_machdep(ffi_cif
|
||||
cif->flags = (unsigned) FFI_TYPE_SINT64;
|
||||
break;
|
||||
|
||||
+ case FFI_TYPE_STRUCT:
|
||||
+ if (cif->rtype->size <= 4)
|
||||
+ /* A Composite Type not larger than 4 bytes is returned in r0. */
|
||||
+ cif->flags = (unsigned)FFI_TYPE_INT;
|
||||
+ else
|
||||
+ /* A Composite Type larger than 4 bytes, or whose size cannot
|
||||
+ be determined statically ... is stored in memory at an
|
||||
+ address passed [in r0]. */
|
||||
+ cif->flags = (unsigned)FFI_TYPE_STRUCT;
|
||||
+ break;
|
||||
+
|
||||
default:
|
||||
cif->flags = FFI_TYPE_INT;
|
||||
break;
|
||||
@@ -141,21 +154,27 @@ void ffi_call(ffi_cif *cif, void (*fn)()
|
||||
{
|
||||
extended_cif ecif;
|
||||
|
||||
+ int small_struct = (cif->flags == FFI_TYPE_INT
|
||||
+ && cif->rtype->type == FFI_TYPE_STRUCT);
|
||||
+
|
||||
ecif.cif = cif;
|
||||
ecif.avalue = avalue;
|
||||
+
|
||||
+ unsigned int temp;
|
||||
|
||||
/* If the return value is a struct and we don't have a return */
|
||||
/* value address then we need to make one */
|
||||
|
||||
if ((rvalue == NULL) &&
|
||||
- (cif->rtype->type == FFI_TYPE_STRUCT))
|
||||
+ (cif->flags == FFI_TYPE_STRUCT))
|
||||
{
|
||||
ecif.rvalue = alloca(cif->rtype->size);
|
||||
}
|
||||
+ else if (small_struct)
|
||||
+ ecif.rvalue = &temp;
|
||||
else
|
||||
ecif.rvalue = rvalue;
|
||||
-
|
||||
-
|
||||
+
|
||||
switch (cif->abi)
|
||||
{
|
||||
case FFI_SYSV:
|
||||
@@ -167,6 +186,8 @@ void ffi_call(ffi_cif *cif, void (*fn)()
|
||||
FFI_ASSERT(0);
|
||||
break;
|
||||
}
|
||||
+ if (small_struct)
|
||||
+ memcpy (rvalue, &temp, cif->rtype->size);
|
||||
}
|
||||
|
||||
/** private members **/
|
||||
@@ -228,9 +249,12 @@ ffi_prep_incoming_args_SYSV(char *stack,
|
||||
{
|
||||
size_t z;
|
||||
|
||||
+ size_t alignment = (*p_arg)->alignment;
|
||||
+ if (alignment < 4)
|
||||
+ alignment = 4;
|
||||
/* Align if necessary */
|
||||
- if ((sizeof(int) - 1) & (unsigned) argp) {
|
||||
- argp = (char *) ALIGN(argp, sizeof(int));
|
||||
+ if ((alignment - 1) & (unsigned) argp) {
|
||||
+ argp = (char *) ALIGN(argp, alignment);
|
||||
}
|
||||
|
||||
z = (*p_arg)->size;
|
||||
@@ -248,21 +272,16 @@ ffi_prep_incoming_args_SYSV(char *stack,
|
||||
|
||||
/* How to make a trampoline. */
|
||||
|
||||
-#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \
|
||||
-({ unsigned char *__tramp = (unsigned char*)(TRAMP); \
|
||||
- unsigned int __fun = (unsigned int)(FUN); \
|
||||
- unsigned int __ctx = (unsigned int)(CTX); \
|
||||
+#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \
|
||||
+({ unsigned char *__tramp = (unsigned char*)(TRAMP); \
|
||||
+ unsigned int __fun = (unsigned int)(FUN); \
|
||||
+ unsigned int __ctx = (unsigned int)(CTX); \
|
||||
*(unsigned int*) &__tramp[0] = 0xe92d000f; /* stmfd sp!, {r0-r3} */ \
|
||||
- *(unsigned int*) &__tramp[4] = 0xe59f0000; /* ldr r0, [pc] */ \
|
||||
- *(unsigned int*) &__tramp[8] = 0xe59ff000; /* ldr pc, [pc] */ \
|
||||
- *(unsigned int*) &__tramp[12] = __ctx; \
|
||||
- *(unsigned int*) &__tramp[16] = __fun; \
|
||||
- register unsigned long _beg __asm ("a1") = (unsigned long) (&__tramp[0]); \
|
||||
- register unsigned long _end __asm ("a2") = (unsigned long) (&__tramp[19]); \
|
||||
- register unsigned long _flg __asm ("a3") = 0; \
|
||||
- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
|
||||
- : "=r" (_beg) \
|
||||
- : "0" (_beg), "r" (_end), "r" (_flg)); \
|
||||
+ *(unsigned int*) &__tramp[4] = 0xe59f0000; /* ldr r0, [pc] */ \
|
||||
+ *(unsigned int*) &__tramp[8] = 0xe59ff000; /* ldr pc, [pc] */ \
|
||||
+ *(unsigned int*) &__tramp[12] = __ctx; \
|
||||
+ *(unsigned int*) &__tramp[16] = __fun; \
|
||||
+ __clear_cache((&__tramp[0]), (&__tramp[19])); \
|
||||
})
|
||||
|
||||
|
||||
--- libffi/src/arm/sysv.S (revision 128092)
|
||||
+++ libffi/src/arm/sysv.S (revision 128093)
|
||||
@@ -82,6 +82,14 @@
|
||||
# define call_reg(x) mov lr, pc ; mov pc, x
|
||||
#endif
|
||||
|
||||
+/* Conditionally compile unwinder directives. */
|
||||
+#ifdef __ARM_EABI__
|
||||
+#define UNWIND
|
||||
+#else
|
||||
+#define UNWIND @
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
#if defined(__thumb__) && !defined(__THUMB_INTERWORK__)
|
||||
.macro ARM_FUNC_START name
|
||||
.text
|
||||
@@ -92,6 +100,7 @@
|
||||
bx pc
|
||||
nop
|
||||
.arm
|
||||
+ UNWIND .fnstart
|
||||
/* A hook to tell gdb that we've switched to ARM mode. Also used to call
|
||||
directly from other local arm routines. */
|
||||
_L__\name:
|
||||
@@ -102,6 +111,7 @@ _L__\name:
|
||||
.align 0
|
||||
.arm
|
||||
ENTRY(\name)
|
||||
+ UNWIND .fnstart
|
||||
.endm
|
||||
#endif
|
||||
|
||||
@@ -134,8 +144,11 @@ _L__\name:
|
||||
ARM_FUNC_START ffi_call_SYSV
|
||||
@ Save registers
|
||||
stmfd sp!, {r0-r3, fp, lr}
|
||||
+ UNWIND .save {r0-r3, fp, lr}
|
||||
mov fp, sp
|
||||
|
||||
+ UNWIND .setfp fp, sp
|
||||
+
|
||||
@ Make room for all of the new args.
|
||||
sub sp, fp, r2
|
||||
|
||||
@@ -205,6 +218,7 @@ LSYM(Lepilogue):
|
||||
RETLDM "r0-r3,fp"
|
||||
|
||||
.ffi_call_SYSV_end:
|
||||
+ UNWIND .fnend
|
||||
.size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV)
|
||||
|
||||
/*
|
||||
@@ -216,21 +230,40 @@ LSYM(Lepilogue):
|
||||
*/
|
||||
|
||||
ARM_FUNC_START ffi_closure_SYSV
|
||||
+ UNWIND .pad #16
|
||||
add ip, sp, #16
|
||||
stmfd sp!, {ip, lr}
|
||||
+ UNWIND .save {r0, lr}
|
||||
add r2, sp, #8
|
||||
+ .pad #16
|
||||
sub sp, sp, #16
|
||||
str sp, [sp, #8]
|
||||
add r1, sp, #8
|
||||
bl ffi_closure_SYSV_inner
|
||||
cmp r0, #FFI_TYPE_INT
|
||||
beq .Lretint
|
||||
+
|
||||
cmp r0, #FFI_TYPE_FLOAT
|
||||
+#ifdef __SOFTFP__
|
||||
+ beq .Lretint
|
||||
+#else
|
||||
beq .Lretfloat
|
||||
+#endif
|
||||
+
|
||||
cmp r0, #FFI_TYPE_DOUBLE
|
||||
+#ifdef __SOFTFP__
|
||||
+ beq .Lretlonglong
|
||||
+#else
|
||||
beq .Lretdouble
|
||||
+#endif
|
||||
+
|
||||
cmp r0, #FFI_TYPE_LONGDOUBLE
|
||||
+#ifdef __SOFTFP__
|
||||
+ beq .Lretlonglong
|
||||
+#else
|
||||
beq .Lretlongdouble
|
||||
+#endif
|
||||
+
|
||||
cmp r0, #FFI_TYPE_SINT64
|
||||
beq .Lretlonglong
|
||||
.Lclosure_epilogue:
|
||||
@@ -243,6 +276,8 @@ ARM_FUNC_START ffi_closure_SYSV
|
||||
ldr r0, [sp]
|
||||
ldr r1, [sp, #4]
|
||||
b .Lclosure_epilogue
|
||||
+
|
||||
+#ifndef __SOFTFP__
|
||||
.Lretfloat:
|
||||
ldfs f0, [sp]
|
||||
b .Lclosure_epilogue
|
||||
@@ -252,6 +287,9 @@ ARM_FUNC_START ffi_closure_SYSV
|
||||
.Lretlongdouble:
|
||||
ldfd f0, [sp]
|
||||
b .Lclosure_epilogue
|
||||
+#endif
|
||||
+
|
||||
.ffi_closure_SYSV_end:
|
||||
+ UNWIND .fnend
|
||||
.size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
|
||||
|
|
@ -0,0 +1,932 @@
|
|||
2007-09-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
PR java/27908
|
||||
* testsuite/libjava.lang/PR27908.java
|
||||
({run1,run2,run3}.isRunning): New Method.
|
||||
(main): Fix race condition.
|
||||
|
||||
2007-08-29 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* gnu/classpath/natVMStackWalker.cc (VMStackWalker::getCallingClass):
|
||||
Make sure we're not sibcalled.
|
||||
(GET_CALLING_CLASS): Define for ARM EABI.
|
||||
|
||||
2007-08-22 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* configure.host (BACKTRACESPEC): Add arm*-linux*.
|
||||
|
||||
2007-08-22 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* configure.ac (LIBSTDCXXSPEC): New.
|
||||
* configure.host: Add arm*-linux* to pthread test.
|
||||
* configure.ac (LIBGCJTESTSPEC): Add path to libstdc++ for ARM
|
||||
EABI.
|
||||
* testsuite/libjava.jni/jni.exp (gcj_jni_compile_c_to_so): Use
|
||||
-fexceptions for ARM EABI.
|
||||
* testsuite/lib/libjava.exp (libjava_arguments): Add libgcj-test.spec.
|
||||
(libjava_invoke): Log the invocation.
|
||||
|
||||
2007-08-15 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* configure.ac (extra_ldflags): Define.
|
||||
* Makefile.am: Use extra_ldflags for all executables.
|
||||
|
||||
2007-08-14 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* sysdep/arm/backtrace.h: Remove stubs for _Unwind_GetIPInfo,
|
||||
_Unwind_GetRegionStart, and _Unwind_Backtrace.
|
||||
|
||||
2007-07-27 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* gnu/classpath/natVMStackWalker.cc (GET_CALLING_CLASS): Stub for
|
||||
ARM EABI.
|
||||
* exception.cc (get_exception_header_from_ue): New.
|
||||
(get_ttype_entry): ARM EABI version.
|
||||
(PERSONALITY_FUNCTION): Add ARM EABI code.
|
||||
* sysdep/arm/backtrace.h: New file.
|
||||
* stacktrace.cc (_URC_NORMAL_STOP): New.
|
||||
* configure.ac (extra_ldflags_libjava): Add libsupc++.la for ARM
|
||||
EABI.
|
||||
* configure.host (BACKTRACESPEC): Add arm/backtrace.h.
|
||||
|
||||
--- libjava/testsuite/Makefile.in.jj 2007-09-06 14:06:13.000000000 +0200
|
||||
+++ libjava/testsuite/Makefile.in 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -160,6 +160,7 @@ LIBLTDL = @LIBLTDL@
|
||||
LIBMAGIC = @LIBMAGIC@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
+LIBSTDCXXSPEC = @LIBSTDCXXSPEC@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
@@ -264,6 +265,7 @@ build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
dbexecdir = @dbexecdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
+extra_ldflags = @extra_ldflags@
|
||||
extra_ldflags_libjava = @extra_ldflags_libjava@
|
||||
gxx_include_dir = @gxx_include_dir@
|
||||
here = @here@
|
||||
--- libjava/testsuite/libjava.jni/jni.exp.jj 2007-09-06 14:06:13.000000000 +0200
|
||||
+++ libjava/testsuite/libjava.jni/jni.exp 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -29,6 +29,10 @@ proc gcj_jni_compile_c_to_so {file {opti
|
||||
set name [file rootname $filename]
|
||||
set soname lib${name}.${so_extension}
|
||||
|
||||
+ if { [istarget "*arm-*eabi*"] } {
|
||||
+ lappend options "additional_flags=-fexceptions"
|
||||
+ }
|
||||
+
|
||||
lappend options "additional_flags=${so_flag} -fPIC"
|
||||
# Find the generated header.
|
||||
lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir"
|
||||
--- libjava/testsuite/lib/libjava.exp.jj 2007-09-06 14:06:13.000000000 +0200
|
||||
+++ libjava/testsuite/lib/libjava.exp 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -379,6 +379,7 @@ proc libjava_arguments {{mode compile}}
|
||||
if {$mode == "link"} {
|
||||
global wrapper_file wrap_compile_flags
|
||||
lappend args "additional_flags=$wrap_compile_flags"
|
||||
+ lappend args "additional_flags=-specs=libgcj-test.spec"
|
||||
lappend args "libs=$wrapper_file"
|
||||
lappend args "libs=$libjava"
|
||||
lappend args debug
|
||||
--- libjava/configure.jj 2007-09-06 14:06:15.000000000 +0200
|
||||
+++ libjava/configure 2007-09-06 17:27:04.000000000 +0200
|
||||
@@ -310,7 +310,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 build build_cpu build_vendor build_os build_subdir host_subdir target_subdir libgcj_basedir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs JAVA_MAINTAINER_MODE_TRUE JAVA_MAINTAINER_MODE_FALSE CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS 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 DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB JAR ZIP UNZIP MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS LIBGCJ_LD_SYMBOLIC LIBGCJDEBUG TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE X_AWT_TRUE X_AWT_FALSE GCJ_FOR_ECJX GCJH host_exeext INCLTDL LIBLTDL DIRLTDL LIBTOOL CXXCPP CPPFLAGS GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs TESTSUBDIR_TRUE TESTSUBDIR_FALSE ECJ_BUILD_JAR ECJ_JAR BUILD_ECJ1_TRUE BUILD_ECJ1_FALSE INSTALL_ECJ_JAR_TRUE INSTALL_ECJ_JAR_FALSE JAVA_HOME_SET_TRUE JAVA_HOME_SET_FALSE JAVA_HOME INTERPRETER LIBFFI LIBFFIINCS PLATFORM CPP EGREP USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC LIBGCJTESTSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS extra_ldflags_libjava GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS THREADSPEC THREADSTARTFILESPEC THREADLDFLAGS THREADCXXFLAGS USING_POSIX_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE USE_LIBGCJ_BC_TRUE USE_LIBGCJ_BC_FALSE LIBGCJ_SPEC HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE LIBICONV LTLIBICONV LIBMAGIC PKG_CONFIG GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS CLASSPATH_SEPARATOR ac_ct_GCJ ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC BACKTRACESPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE ENABLE_SHARED_TRUE ENABLE_SHARED_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir dbexecdir GCJVERSION gxx_include_dir libstdcxx_incdir ALLOCA PERL SYSDEP_SOURCES ANONVERSCRIPT_TRUE ANONVERSCRIPT_FALSE LD_START_STATIC_SPEC LD_FINISH_STATIC_SPEC here 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 build build_cpu build_vendor build_os build_subdir host_subdir target_subdir libgcj_basedir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs JAVA_MAINTAINER_MODE_TRUE JAVA_MAINTAINER_MODE_FALSE CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS 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 DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB JAR ZIP UNZIP MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS LIBGCJ_LD_SYMBOLIC LIBGCJDEBUG TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE X_AWT_TRUE X_AWT_FALSE GCJ_FOR_ECJX GCJH host_exeext INCLTDL LIBLTDL DIRLTDL LIBTOOL CXXCPP CPPFLAGS GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs TESTSUBDIR_TRUE TESTSUBDIR_FALSE ECJ_BUILD_JAR ECJ_JAR BUILD_ECJ1_TRUE BUILD_ECJ1_FALSE INSTALL_ECJ_JAR_TRUE INSTALL_ECJ_JAR_FALSE JAVA_HOME_SET_TRUE JAVA_HOME_SET_FALSE JAVA_HOME INTERPRETER LIBFFI LIBFFIINCS PLATFORM CPP EGREP USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS extra_ldflags_libjava extra_ldflags LIBSTDCXXSPEC LIBGCJTESTSPEC GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS THREADSPEC THREADSTARTFILESPEC THREADLDFLAGS THREADCXXFLAGS USING_POSIX_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE USE_LIBGCJ_BC_TRUE USE_LIBGCJ_BC_FALSE LIBGCJ_SPEC HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE LIBICONV LTLIBICONV LIBMAGIC PKG_CONFIG GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS CLASSPATH_SEPARATOR ac_ct_GCJ ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC BACKTRACESPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE ENABLE_SHARED_TRUE ENABLE_SHARED_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir dbexecdir GCJVERSION gxx_include_dir libstdcxx_incdir ALLOCA PERL SYSDEP_SOURCES ANONVERSCRIPT_TRUE ANONVERSCRIPT_FALSE LD_START_STATIC_SPEC LD_FINISH_STATIC_SPEC here LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@@ -7640,9 +7640,6 @@ case "${host}" in
|
||||
esac
|
||||
|
||||
|
||||
-LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
|
||||
-
|
||||
-
|
||||
|
||||
# Check whether --with-system-zlib or --without-system-zlib was given.
|
||||
if test "${with_system_zlib+set}" = set; then
|
||||
@@ -9126,6 +9123,9 @@ fi
|
||||
# FIXME: this should be _libs on some hosts.
|
||||
libsubdir=.libs
|
||||
|
||||
+LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
|
||||
+
|
||||
+LIBSTDCXXSPEC=
|
||||
# extra LD Flags which are required for targets
|
||||
case "${host}" in
|
||||
*-*-darwin[0-7].*)
|
||||
@@ -9134,9 +9134,21 @@ case "${host}" in
|
||||
# on Darwin -single_module speeds up loading of the dynamic libraries.
|
||||
extra_ldflags_libjava=-Wl,-single_module
|
||||
;;
|
||||
+arm*linux*eabi)
|
||||
+ # Some of the ARM unwinder code is actually in libstdc++. We
|
||||
+ # could in principle replicate it in libgcj, but it's better to
|
||||
+ # have a dependency on libstdc++.
|
||||
+ extra_ldflags='-L$(here)/../libstdc++-v3/src -lstdc++'
|
||||
+ LIBSTDCXXSPEC=-lstdc++
|
||||
+ LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -L`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -rpath `${PWDCMD-pwd}`/.libs:`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -lstdc++"
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
# Allow the GC to be disabled. Can be useful when debugging.
|
||||
echo "$as_me:$LINENO: checking for garbage collector to use" >&5
|
||||
echo $ECHO_N "checking for garbage collector to use... $ECHO_C" >&6
|
||||
@@ -18024,7 +18036,6 @@ s,@USING_POSIX_PLATFORM_FALSE@,$USING_PO
|
||||
s,@USING_DARWIN_CRT_TRUE@,$USING_DARWIN_CRT_TRUE,;t t
|
||||
s,@USING_DARWIN_CRT_FALSE@,$USING_DARWIN_CRT_FALSE,;t t
|
||||
s,@SYSTEMSPEC@,$SYSTEMSPEC,;t t
|
||||
-s,@LIBGCJTESTSPEC@,$LIBGCJTESTSPEC,;t t
|
||||
s,@ZLIBSPEC@,$ZLIBSPEC,;t t
|
||||
s,@ZLIBTESTSPEC@,$ZLIBTESTSPEC,;t t
|
||||
s,@X_CFLAGS@,$X_CFLAGS,;t t
|
||||
@@ -18032,6 +18043,9 @@ s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
|
||||
s,@X_LIBS@,$X_LIBS,;t t
|
||||
s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
|
||||
s,@extra_ldflags_libjava@,$extra_ldflags_libjava,;t t
|
||||
+s,@extra_ldflags@,$extra_ldflags,;t t
|
||||
+s,@LIBSTDCXXSPEC@,$LIBSTDCXXSPEC,;t t
|
||||
+s,@LIBGCJTESTSPEC@,$LIBGCJTESTSPEC,;t t
|
||||
s,@GCLIBS@,$GCLIBS,;t t
|
||||
s,@GCINCS@,$GCINCS,;t t
|
||||
s,@GCDEPS@,$GCDEPS,;t t
|
||||
--- libjava/Makefile.in.jj 2007-09-06 14:06:15.000000000 +0200
|
||||
+++ libjava/Makefile.in 2007-09-06 17:28:51.000000000 +0200
|
||||
@@ -627,6 +627,7 @@ LIBLTDL = @LIBLTDL@
|
||||
LIBMAGIC = @LIBMAGIC@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
+LIBSTDCXXSPEC = @LIBSTDCXXSPEC@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
@@ -731,6 +732,7 @@ build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
dbexecdir = @dbexecdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
+extra_ldflags = @extra_ldflags@
|
||||
extra_ldflags_libjava = @extra_ldflags_libjava@ $(am__append_5)
|
||||
gxx_include_dir = @gxx_include_dir@
|
||||
here = @here@
|
||||
@@ -812,7 +814,7 @@ GCJLINK = $(LIBTOOL) --tag=GCJ --mode=li
|
||||
|
||||
GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
|
||||
LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) \
|
||||
- $(LDFLAGS) $(extra_ldflags_libjava) -o $@
|
||||
+ $(LDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -o $@
|
||||
|
||||
WARNINGS = -Wextra -Wall
|
||||
AM_CXXFLAGS = \
|
||||
@@ -872,7 +874,7 @@ xlib_nat_files = $(xlib_nat_source_files
|
||||
|
||||
# Include THREADLIBS here to ensure that the correct version of
|
||||
# certain linuxthread functions get linked:
|
||||
-libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(THREADLIBS) \
|
||||
+libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \
|
||||
$(LIBLTDL) $(SYS_ZLIBS) \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
|
||||
@@ -7784,7 +7786,7 @@ NM = nm
|
||||
|
||||
jv_convert_SOURCES =
|
||||
jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
jv_convert_LINK = $(GCJLINK)
|
||||
jv_convert_LDADD = -L$(here)/.libs libgcj.la
|
||||
@@ -7800,7 +7802,7 @@ gcj_dbtool_LDADD = gnu/gcj/tools/gcj_dbt
|
||||
gcj_dbtool_DEPENDENCIES = gnu/gcj/tools/gcj_dbtool.lo libgcj.la libgcj.spec
|
||||
gij_SOURCES =
|
||||
gij_LDFLAGS = -rpath $(libdir)/gcj-$(gcc_version) -rpath $(toolexeclibdir) \
|
||||
- -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gij_LINK = $(GCJLINK)
|
||||
gij_LDADD = -L$(here)/.libs libgij.la
|
||||
@@ -7820,91 +7822,91 @@ ECJX_BASE_FLAGS = -findirect-dispatch \
|
||||
@NATIVE_TRUE@ecjx_DEPENDENCIES = libgcj.la libgcj.spec
|
||||
gappletviewer_SOURCES =
|
||||
gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gappletviewer_LINK = $(GCJLINK)
|
||||
gappletviewer_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gappletviewer_DEPENDENCIES = libgcj-tools.la
|
||||
gjarsigner_SOURCES =
|
||||
gjarsigner_LDFLAGS = --main=gnu.classpath.tools.jarsigner.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gjarsigner_LINK = $(GCJLINK)
|
||||
gjarsigner_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gjarsigner_DEPENDENCIES = libgcj-tools.la
|
||||
gkeytool_SOURCES =
|
||||
gkeytool_LDFLAGS = --main=gnu.classpath.tools.keytool.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gkeytool_LINK = $(GCJLINK)
|
||||
gkeytool_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gkeytool_DEPENDENCIES = libgcj-tools.la
|
||||
gjar_SOURCES =
|
||||
gjar_LDFLAGS = --main=gnu.classpath.tools.jar.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gjar_LINK = $(GCJLINK)
|
||||
gjar_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gjar_DEPENDENCIES = libgcj-tools.la
|
||||
gjavah_SOURCES =
|
||||
gjavah_LDFLAGS = --main=gnu.classpath.tools.javah.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gjavah_LINK = $(GCJLINK)
|
||||
gjavah_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gjavah_DEPENDENCIES = libgcj-tools.la
|
||||
gcjh_SOURCES =
|
||||
gcjh_LDFLAGS = --main=gnu.classpath.tools.javah.GcjhMain \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gcjh_LINK = $(GCJLINK)
|
||||
gcjh_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gcjh_DEPENDENCIES = libgcj-tools.la
|
||||
gnative2ascii_SOURCES =
|
||||
gnative2ascii_LDFLAGS = --main=gnu.classpath.tools.native2ascii.Native2ASCII \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gnative2ascii_LINK = $(GCJLINK)
|
||||
gnative2ascii_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gnative2ascii_DEPENDENCIES = libgcj-tools.la
|
||||
gorbd_SOURCES =
|
||||
gorbd_LDFLAGS = --main=gnu.classpath.tools.orbd.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gorbd_LINK = $(GCJLINK)
|
||||
gorbd_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gorbd_DEPENDENCIES = libgcj-tools.la
|
||||
grmid_SOURCES =
|
||||
grmid_LDFLAGS = --main=gnu.classpath.tools.rmid.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
grmid_LINK = $(GCJLINK)
|
||||
grmid_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
grmid_DEPENDENCIES = libgcj-tools.la
|
||||
gserialver_SOURCES =
|
||||
gserialver_LDFLAGS = --main=gnu.classpath.tools.serialver.SerialVer \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gserialver_LINK = $(GCJLINK)
|
||||
gserialver_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gserialver_DEPENDENCIES = libgcj-tools.la
|
||||
gtnameserv_SOURCES =
|
||||
gtnameserv_LDFLAGS = --main=gnu.classpath.tools.tnameserv.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gtnameserv_LINK = $(GCJLINK)
|
||||
gtnameserv_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gtnameserv_DEPENDENCIES = libgcj-tools.la
|
||||
grmic_SOURCES =
|
||||
grmic_LDFLAGS = --main=gnu.classpath.tools.rmic.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
grmic_LINK = $(GCJLINK)
|
||||
grmic_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
grmic_DEPENDENCIES = libgcj-tools.la
|
||||
grmiregistry_SOURCES =
|
||||
grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
grmiregistry_LINK = $(GCJLINK)
|
||||
grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
--- libjava/gcj/Makefile.in.jj 2007-09-06 14:06:15.000000000 +0200
|
||||
+++ libjava/gcj/Makefile.in 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -172,6 +172,7 @@ LIBLTDL = @LIBLTDL@
|
||||
LIBMAGIC = @LIBMAGIC@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
+LIBSTDCXXSPEC = @LIBSTDCXXSPEC@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
@@ -276,6 +277,7 @@ build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
dbexecdir = @dbexecdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
+extra_ldflags = @extra_ldflags@
|
||||
extra_ldflags_libjava = @extra_ldflags_libjava@
|
||||
gxx_include_dir = @gxx_include_dir@
|
||||
here = @here@
|
||||
--- libjava/include/Makefile.in.jj 2007-09-06 14:06:15.000000000 +0200
|
||||
+++ libjava/include/Makefile.in 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -171,6 +171,7 @@ LIBLTDL = @LIBLTDL@
|
||||
LIBMAGIC = @LIBMAGIC@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
+LIBSTDCXXSPEC = @LIBSTDCXXSPEC@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
@@ -275,6 +276,7 @@ build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
dbexecdir = @dbexecdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
+extra_ldflags = @extra_ldflags@
|
||||
extra_ldflags_libjava = @extra_ldflags_libjava@
|
||||
gxx_include_dir = @gxx_include_dir@
|
||||
here = @here@
|
||||
--- libjava/configure.ac.jj 2007-09-06 14:06:15.000000000 +0200
|
||||
+++ libjava/configure.ac 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -777,9 +777,6 @@ case "${host}" in
|
||||
esac
|
||||
AC_SUBST(SYSTEMSPEC)
|
||||
|
||||
-LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
|
||||
-AC_SUBST(LIBGCJTESTSPEC)
|
||||
-
|
||||
AC_ARG_WITH(system-zlib,
|
||||
AS_HELP_STRING([--with-system-zlib],
|
||||
[use installed libz]))
|
||||
@@ -793,6 +790,9 @@ AC_PATH_XTRA
|
||||
# FIXME: this should be _libs on some hosts.
|
||||
libsubdir=.libs
|
||||
|
||||
+LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
|
||||
+
|
||||
+LIBSTDCXXSPEC=
|
||||
# extra LD Flags which are required for targets
|
||||
case "${host}" in
|
||||
*-*-darwin[[0-7]].*)
|
||||
@@ -801,8 +801,20 @@ case "${host}" in
|
||||
# on Darwin -single_module speeds up loading of the dynamic libraries.
|
||||
extra_ldflags_libjava=-Wl,-single_module
|
||||
;;
|
||||
+arm*linux*eabi)
|
||||
+ # Some of the ARM unwinder code is actually in libstdc++. We
|
||||
+ # could in principle replicate it in libgcj, but it's better to
|
||||
+ # have a dependency on libstdc++.
|
||||
+ extra_ldflags='-L$(here)/../libstdc++-v3/src -lstdc++'
|
||||
+ LIBSTDCXXSPEC=-lstdc++
|
||||
+ LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -L`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -rpath `${PWDCMD-pwd}`/.libs:`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -lstdc++"
|
||||
+ ;;
|
||||
esac
|
||||
AC_SUBST(extra_ldflags_libjava)
|
||||
+AC_SUBST(extra_ldflags)
|
||||
+AC_SUBST(LIBSTDCXXSPEC)
|
||||
+
|
||||
+AC_SUBST(LIBGCJTESTSPEC)
|
||||
|
||||
# Allow the GC to be disabled. Can be useful when debugging.
|
||||
AC_MSG_CHECKING([for garbage collector to use])
|
||||
--- libjava/libgcj.spec.in.jj 2007-09-06 14:06:15.000000000 +0200
|
||||
+++ libjava/libgcj.spec.in 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -7,6 +7,6 @@
|
||||
*startfile: @THREADSTARTFILESPEC@ %(startfileorig)
|
||||
|
||||
%rename lib liborig
|
||||
-*lib: @LD_START_STATIC_SPEC@ @LIBGCJ_SPEC@ @LD_FINISH_STATIC_SPEC@ -lm @LIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) %(liborig)
|
||||
+*lib: @LD_START_STATIC_SPEC@ @LIBGCJ_SPEC@ @LD_FINISH_STATIC_SPEC@ -lm @LIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) @LIBSTDCXXSPEC@ %(liborig)
|
||||
|
||||
*jc1: @HASH_SYNC_SPEC@ @DIVIDESPEC@ @CHECKREFSPEC@ @JC1GCSPEC@ @EXCEPTIONSPEC@ @BACKTRACESPEC@ @IEEESPEC@ -fkeep-inline-functions
|
||||
--- libjava/stacktrace.cc.jj 2007-09-06 14:06:16.000000000 +0200
|
||||
+++ libjava/stacktrace.cc 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -39,6 +39,10 @@ using namespace java::lang::reflect;
|
||||
using namespace java::util;
|
||||
using namespace gnu::gcj::runtime;
|
||||
|
||||
+#ifdef __ARM_EABI_UNWINDER__
|
||||
+#define _URC_NORMAL_STOP _URC_FAILURE
|
||||
+#endif
|
||||
+
|
||||
// Maps ncode values to their containing native class.
|
||||
// NOTE: Currently this Map contradicts class GC for native classes. This map
|
||||
// (and the "new class stack") will need to use WeakReferences in order to
|
||||
--- libjava/configure.host.jj 2007-09-06 17:11:05.000000000 +0200
|
||||
+++ libjava/configure.host 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -85,6 +85,7 @@ case "${host}" in
|
||||
arm*-linux*)
|
||||
libgcj_interpreter=yes
|
||||
sysdeps_dir=arm
|
||||
+ fallback_backtrace_h=sysdep/arm/backtrace.h
|
||||
;;
|
||||
mips-tx39-*|mipstx39-unknown-*)
|
||||
libgcj_flags="${libgcj_flags} -G 0"
|
||||
@@ -258,6 +259,12 @@ EOF
|
||||
sysdeps_dir=x86-64
|
||||
DIVIDESPEC=-f%{m32:no-}%{!m32:%{!m64:no-}}%{m64:}use-divide-subroutine
|
||||
;;
|
||||
+ arm*-linux* )
|
||||
+ slow_pthread_self=no
|
||||
+ can_unwind_signal=no
|
||||
+ CHECKREFSPEC=-fcheck-references
|
||||
+ DIVIDESPEC=-fuse-divide-subroutine
|
||||
+ ;;
|
||||
mips*-*-linux* )
|
||||
sysdeps_dir=mips
|
||||
can_unwind_signal=yes
|
||||
--- libjava/Makefile.am.jj 2007-09-06 14:06:16.000000000 +0200
|
||||
+++ libjava/Makefile.am 2007-09-06 17:28:27.000000000 +0200
|
||||
@@ -100,6 +100,7 @@ endif
|
||||
GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
|
||||
|
||||
extra_ldflags_libjava = @extra_ldflags_libjava@
|
||||
+extra_ldflags = @extra_ldflags@
|
||||
|
||||
if ANONVERSCRIPT
|
||||
extra_ldflags_libjava += -Wl,--version-script=$(srcdir)/libgcj.ver
|
||||
@@ -110,7 +111,7 @@ GCJLINK = $(LIBTOOL) --tag=GCJ --mode=li
|
||||
GCJ_FOR_ECJX = @GCJ_FOR_ECJX@
|
||||
GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
|
||||
LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) \
|
||||
- $(LDFLAGS) $(extra_ldflags_libjava) -o $@
|
||||
+ $(LDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -o $@
|
||||
|
||||
GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@
|
||||
|
||||
@@ -232,7 +233,7 @@ xlib_nat_files = $(xlib_nat_source_files
|
||||
# Include THREADLIBS here to ensure that the correct version of
|
||||
# certain linuxthread functions get linked:
|
||||
## The mysterious backslash in the grep pattern is consumed by make.
|
||||
-libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(THREADLIBS) \
|
||||
+libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \
|
||||
$(LIBLTDL) $(SYS_ZLIBS) \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
libgcj_la_LIBADD = \
|
||||
@@ -614,7 +615,7 @@ jv_convert_SOURCES =
|
||||
## need this because we are explicitly using libtool to link using the
|
||||
## `.la' file.
|
||||
jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
jv_convert_LINK = $(GCJLINK)
|
||||
## We don't explicitly link in the libraries we need; libgcj.la brings
|
||||
## in all dependencies. We need the -L so that gcj can find libgcj
|
||||
@@ -635,7 +636,7 @@ gnu/gcj/tools/gcj_dbtool/natMain.cc
|
||||
## need this because we are explicitly using libtool to link using the
|
||||
## `.la' file.
|
||||
gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gcj_dbtool_LINK = $(GCJLINK)
|
||||
## We don't explicitly link in the libraries we need; libgcj.la brings
|
||||
## in all dependencies. We need the -L so that gcj can find libgcj
|
||||
@@ -654,7 +655,7 @@ gij_SOURCES =
|
||||
## need this because we are explicitly using libtool to link using the
|
||||
## `.la' file.
|
||||
gij_LDFLAGS = -rpath $(libdir)/gcj-$(gcc_version) -rpath $(toolexeclibdir) \
|
||||
- -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gij_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gij_LDADD = -L$(here)/.libs libgij.la
|
||||
@@ -698,7 +699,7 @@ endif !NATIVE
|
||||
## This is a dummy definition.
|
||||
gappletviewer_SOURCES =
|
||||
gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gappletviewer_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gappletviewer_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -707,7 +708,7 @@ gappletviewer_DEPENDENCIES = libgcj-tool
|
||||
## This is a dummy definition.
|
||||
gjarsigner_SOURCES =
|
||||
gjarsigner_LDFLAGS = --main=gnu.classpath.tools.jarsigner.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gjarsigner_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gjarsigner_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -716,7 +717,7 @@ gjarsigner_DEPENDENCIES = libgcj-tools.l
|
||||
## This is a dummy definition.
|
||||
gkeytool_SOURCES =
|
||||
gkeytool_LDFLAGS = --main=gnu.classpath.tools.keytool.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gkeytool_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gkeytool_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -725,7 +726,7 @@ gkeytool_DEPENDENCIES = libgcj-tools.la
|
||||
## This is a dummy definition.
|
||||
gjar_SOURCES =
|
||||
gjar_LDFLAGS = --main=gnu.classpath.tools.jar.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gjar_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gjar_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -734,7 +735,7 @@ gjar_DEPENDENCIES = libgcj-tools.la
|
||||
## This is a dummy definition.
|
||||
gjavah_SOURCES =
|
||||
gjavah_LDFLAGS = --main=gnu.classpath.tools.javah.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gjavah_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gjavah_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -743,7 +744,7 @@ gjavah_DEPENDENCIES = libgcj-tools.la
|
||||
## This is a dummy definition.
|
||||
gcjh_SOURCES =
|
||||
gcjh_LDFLAGS = --main=gnu.classpath.tools.javah.GcjhMain \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gcjh_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gcjh_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -752,7 +753,7 @@ gcjh_DEPENDENCIES = libgcj-tools.la
|
||||
## This is a dummy definition.
|
||||
gnative2ascii_SOURCES =
|
||||
gnative2ascii_LDFLAGS = --main=gnu.classpath.tools.native2ascii.Native2ASCII \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gnative2ascii_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gnative2ascii_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -761,7 +762,7 @@ gnative2ascii_DEPENDENCIES = libgcj-tool
|
||||
## This is a dummy definition.
|
||||
gorbd_SOURCES =
|
||||
gorbd_LDFLAGS = --main=gnu.classpath.tools.orbd.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gorbd_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gorbd_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -770,7 +771,7 @@ gorbd_DEPENDENCIES = libgcj-tools.la
|
||||
## This is a dummy definition.
|
||||
grmid_SOURCES =
|
||||
grmid_LDFLAGS = --main=gnu.classpath.tools.rmid.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
grmid_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
grmid_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -779,7 +780,7 @@ grmid_DEPENDENCIES = libgcj-tools.la
|
||||
## This is a dummy definition.
|
||||
gserialver_SOURCES =
|
||||
gserialver_LDFLAGS = --main=gnu.classpath.tools.serialver.SerialVer \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gserialver_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gserialver_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -788,7 +789,7 @@ gserialver_DEPENDENCIES = libgcj-tools.l
|
||||
## This is a dummy definition.
|
||||
gtnameserv_SOURCES =
|
||||
gtnameserv_LDFLAGS = --main=gnu.classpath.tools.tnameserv.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gtnameserv_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gtnameserv_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -797,7 +798,7 @@ gtnameserv_DEPENDENCIES = libgcj-tools.l
|
||||
## This is a dummy definition.
|
||||
grmic_SOURCES =
|
||||
grmic_LDFLAGS = --main=gnu.classpath.tools.rmic.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
grmic_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
grmic_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -806,7 +807,7 @@ grmic_DEPENDENCIES = libgcj-tools.la
|
||||
## This is a dummy definition.
|
||||
grmiregistry_SOURCES =
|
||||
grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
grmiregistry_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
--- libjava/exception.cc.jj 2007-09-06 14:06:15.000000000 +0200
|
||||
+++ libjava/exception.cc 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -58,6 +58,21 @@ struct java_exception_header
|
||||
_Unwind_Exception unwindHeader;
|
||||
};
|
||||
|
||||
+#ifdef __ARM_EABI_UNWINDER__
|
||||
+// This is the exception class we report -- "GNUCJAVA".
|
||||
+
|
||||
+const _Unwind_Exception_Class __gcj_exception_class
|
||||
+ = {'G', 'N', 'U', 'C', 'J', 'A', 'V', 'A'};
|
||||
+
|
||||
+static inline java_exception_header *
|
||||
+get_exception_header_from_ue (_Unwind_Exception *exc)
|
||||
+{
|
||||
+ return reinterpret_cast<java_exception_header *>(exc + 1) - 1;
|
||||
+}
|
||||
+
|
||||
+extern "C" void __cxa_begin_cleanup (_Unwind_Exception*);
|
||||
+
|
||||
+#else // !__ARM_EABI_UNWINDER__
|
||||
// This is the exception class we report -- "GNUCJAVA".
|
||||
const _Unwind_Exception_Class __gcj_exception_class
|
||||
= ((((((((_Unwind_Exception_Class) 'G'
|
||||
@@ -75,6 +90,7 @@ get_exception_header_from_ue (_Unwind_Ex
|
||||
{
|
||||
return reinterpret_cast<java_exception_header *>(exc + 1) - 1;
|
||||
}
|
||||
+#endif // !__ARM_EABI_UNWINDER__
|
||||
|
||||
/* Perform a throw, Java style. Throw will unwind through this call,
|
||||
so there better not be any handlers or exception thrown here. */
|
||||
@@ -89,7 +105,8 @@ _Jv_Throw (jthrowable value)
|
||||
value = new java::lang::NullPointerException ();
|
||||
xh->value = value;
|
||||
|
||||
- xh->unwindHeader.exception_class = __gcj_exception_class;
|
||||
+ memcpy (&xh->unwindHeader.exception_class, &__gcj_exception_class,
|
||||
+ sizeof xh->unwindHeader.exception_class);
|
||||
xh->unwindHeader.exception_cleanup = NULL;
|
||||
|
||||
/* We're happy with setjmp/longjmp exceptions or region-based
|
||||
@@ -159,6 +176,21 @@ parse_lsda_header (_Unwind_Context *cont
|
||||
return p;
|
||||
}
|
||||
|
||||
+#ifdef __ARM_EABI_UNWINDER__
|
||||
+
|
||||
+static void **
|
||||
+get_ttype_entry(_Unwind_Context *, lsda_header_info* info, _Unwind_Word i)
|
||||
+{
|
||||
+ _Unwind_Ptr ptr;
|
||||
+
|
||||
+ ptr = (_Unwind_Ptr) (info->TType - (i * 4));
|
||||
+ ptr = _Unwind_decode_target2(ptr);
|
||||
+
|
||||
+ return reinterpret_cast<void **>(ptr);
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+
|
||||
static void **
|
||||
get_ttype_entry (_Unwind_Context *context, lsda_header_info *info, long i)
|
||||
{
|
||||
@@ -170,6 +202,7 @@ get_ttype_entry (_Unwind_Context *contex
|
||||
return reinterpret_cast<void **>(ptr);
|
||||
}
|
||||
|
||||
+#endif
|
||||
|
||||
// Using a different personality function name causes link failures
|
||||
// when trying to mix code using different exception handling models.
|
||||
@@ -180,12 +213,33 @@ get_ttype_entry (_Unwind_Context *contex
|
||||
#define PERSONALITY_FUNCTION __gcj_personality_v0
|
||||
#endif
|
||||
|
||||
+#ifdef __ARM_EABI_UNWINDER__
|
||||
+
|
||||
+#define CONTINUE_UNWINDING \
|
||||
+ do \
|
||||
+ { \
|
||||
+ if (__gnu_unwind_frame(ue_header, context) != _URC_OK) \
|
||||
+ return _URC_FAILURE; \
|
||||
+ return _URC_CONTINUE_UNWIND; \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
+extern "C" _Unwind_Reason_Code
|
||||
+PERSONALITY_FUNCTION (_Unwind_State state,
|
||||
+ struct _Unwind_Exception* ue_header,
|
||||
+ struct _Unwind_Context* context)
|
||||
+#else
|
||||
+
|
||||
+#define CONTINUE_UNWINDING return _URC_CONTINUE_UNWIND
|
||||
+
|
||||
extern "C" _Unwind_Reason_Code
|
||||
PERSONALITY_FUNCTION (int version,
|
||||
_Unwind_Action actions,
|
||||
_Unwind_Exception_Class exception_class,
|
||||
struct _Unwind_Exception *ue_header,
|
||||
struct _Unwind_Context *context)
|
||||
+
|
||||
+#endif
|
||||
{
|
||||
java_exception_header *xh = get_exception_header_from_ue (ue_header);
|
||||
|
||||
@@ -197,16 +251,56 @@ PERSONALITY_FUNCTION (int version,
|
||||
int handler_switch_value;
|
||||
bool saw_cleanup;
|
||||
bool saw_handler;
|
||||
+ bool foreign_exception;
|
||||
int ip_before_insn = 0;
|
||||
|
||||
+#ifdef __ARM_EABI_UNWINDER__
|
||||
+ _Unwind_Action actions;
|
||||
+
|
||||
+ switch (state & _US_ACTION_MASK)
|
||||
+ {
|
||||
+ case _US_VIRTUAL_UNWIND_FRAME:
|
||||
+ actions = _UA_SEARCH_PHASE;
|
||||
+ break;
|
||||
+
|
||||
+ case _US_UNWIND_FRAME_STARTING:
|
||||
+ actions = _UA_CLEANUP_PHASE;
|
||||
+ if (!(state & _US_FORCE_UNWIND)
|
||||
+ && ue_header->barrier_cache.sp == _Unwind_GetGR(context, 13))
|
||||
+ actions |= _UA_HANDLER_FRAME;
|
||||
+ break;
|
||||
+
|
||||
+ case _US_UNWIND_FRAME_RESUME:
|
||||
+ CONTINUE_UNWINDING;
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ std::abort();
|
||||
+ }
|
||||
+ actions |= state & _US_FORCE_UNWIND;
|
||||
+
|
||||
+ // We don't know which runtime we're working with, so can't check this.
|
||||
+ // However the ABI routines hide this from us, and we don't actually need
|
||||
+ // to know.
|
||||
+ foreign_exception = false;
|
||||
+
|
||||
+ // The dwarf unwinder assumes the context structure holds things like the
|
||||
+ // function and LSDA pointers. The ARM implementation caches these in
|
||||
+ // the exception header (UCB). To avoid rewriting everything we make the
|
||||
+ // virtual IP register point at the UCB.
|
||||
+ ip = (_Unwind_Ptr) ue_header;
|
||||
+ _Unwind_SetGR(context, 12, ip);
|
||||
|
||||
+#else
|
||||
// Interface version check.
|
||||
if (version != 1)
|
||||
return _URC_FATAL_PHASE1_ERROR;
|
||||
+ foreign_exception = exception_class != __gcj_exception_class;
|
||||
+#endif
|
||||
|
||||
// Shortcut for phase 2 found handler for domestic exception.
|
||||
if (actions == (_UA_CLEANUP_PHASE | _UA_HANDLER_FRAME)
|
||||
- && exception_class == __gcj_exception_class)
|
||||
+ && !foreign_exception)
|
||||
{
|
||||
handler_switch_value = xh->handlerSwitchValue;
|
||||
landing_pad = xh->landingPad;
|
||||
@@ -227,17 +321,17 @@ PERSONALITY_FUNCTION (int version,
|
||||
|
||||
// If no LSDA, then there are no handlers or cleanups.
|
||||
if (! language_specific_data)
|
||||
- return _URC_CONTINUE_UNWIND;
|
||||
+ CONTINUE_UNWINDING;
|
||||
|
||||
// Parse the LSDA header.
|
||||
p = parse_lsda_header (context, language_specific_data, &info);
|
||||
#ifdef HAVE_GETIPINFO
|
||||
ip = _Unwind_GetIPInfo (context, &ip_before_insn);
|
||||
- if (! ip_before_insn)
|
||||
- --ip;
|
||||
#else
|
||||
ip = _Unwind_GetIP (context) - 1;
|
||||
#endif
|
||||
+ if (! ip_before_insn)
|
||||
+ --ip;
|
||||
landing_pad = 0;
|
||||
action_record = 0;
|
||||
handler_switch_value = 0;
|
||||
@@ -296,7 +390,7 @@ PERSONALITY_FUNCTION (int version,
|
||||
// If ip is not present in the table, C++ would call terminate.
|
||||
// ??? It is perhaps better to tweek the LSDA so that no-action
|
||||
// is mapped to no-entry for Java.
|
||||
- return _URC_CONTINUE_UNWIND;
|
||||
+ CONTINUE_UNWINDING;
|
||||
|
||||
found_something:
|
||||
saw_cleanup = false;
|
||||
@@ -334,7 +428,7 @@ PERSONALITY_FUNCTION (int version,
|
||||
// During forced unwinding, we only run cleanups. With a
|
||||
// foreign exception class, we have no class info to match.
|
||||
else if ((actions & _UA_FORCE_UNWIND)
|
||||
- || exception_class != __gcj_exception_class)
|
||||
+ || foreign_exception)
|
||||
;
|
||||
|
||||
else if (ar_filter > 0)
|
||||
@@ -374,15 +468,15 @@ PERSONALITY_FUNCTION (int version,
|
||||
}
|
||||
|
||||
if (! saw_handler && ! saw_cleanup)
|
||||
- return _URC_CONTINUE_UNWIND;
|
||||
+ CONTINUE_UNWINDING;
|
||||
|
||||
if (actions & _UA_SEARCH_PHASE)
|
||||
{
|
||||
if (! saw_handler)
|
||||
- return _URC_CONTINUE_UNWIND;
|
||||
+ CONTINUE_UNWINDING;
|
||||
|
||||
// For domestic exceptions, we cache data from phase 1 for phase 2.
|
||||
- if (exception_class == __gcj_exception_class)
|
||||
+ if (! foreign_exception)
|
||||
{
|
||||
xh->handlerSwitchValue = handler_switch_value;
|
||||
xh->landingPad = landing_pad;
|
||||
@@ -396,5 +490,9 @@ PERSONALITY_FUNCTION (int version,
|
||||
_Unwind_SetGR (context, __builtin_eh_return_data_regno (1),
|
||||
handler_switch_value);
|
||||
_Unwind_SetIP (context, landing_pad);
|
||||
+#ifdef __ARM_EABI_UNWINDER__
|
||||
+ if (saw_cleanup)
|
||||
+ __cxa_begin_cleanup(ue_header);
|
||||
+#endif
|
||||
return _URC_INSTALL_CONTEXT;
|
||||
}
|
||||
--- libjava/gnu/classpath/natVMStackWalker.cc.jj 2007-09-06 14:06:15.000000000 +0200
|
||||
+++ libjava/gnu/classpath/natVMStackWalker.cc 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -19,6 +19,7 @@ details. */
|
||||
#include <java/lang/ClassLoader.h>
|
||||
#include <java/lang/Class.h>
|
||||
|
||||
+#ifndef __ARM_EABI_UNWINDER__
|
||||
// Return the class of the method that contains PC.
|
||||
// This is a macro not a function, since defining it as one would
|
||||
// introduce an extra frame on the stack. */
|
||||
@@ -44,6 +45,11 @@ details. */
|
||||
\
|
||||
klass; \
|
||||
})
|
||||
+#else // __ARM_EABI_UNWINDER__
|
||||
+// ARM EABI doesn't support _Unwind_FindEnclosingFunction.
|
||||
+#define GET_CALLING_CLASS(PC) \
|
||||
+ (_Jv_StackTrace::GetStackWalkerCallingClass ())
|
||||
+#endif
|
||||
|
||||
JArray<jclass> *
|
||||
gnu::classpath::VMStackWalker::getClassContext(void)
|
||||
@@ -59,14 +65,18 @@ jclass
|
||||
gnu::classpath::VMStackWalker::getCallingClass(void)
|
||||
{
|
||||
_Jv_InitClass (&::gnu::classpath::VMStackWalker::class$);
|
||||
- return _Jv_StackTrace::GetStackWalkerCallingClass ();
|
||||
+ jclass result = _Jv_StackTrace::GetStackWalkerCallingClass ();
|
||||
+ __asm__ __volatile__ ("" : : "g" (result));
|
||||
+ return result;
|
||||
}
|
||||
|
||||
jclass
|
||||
gnu::classpath::VMStackWalker::getCallingClass(::gnu::gcj::RawData *pc)
|
||||
{
|
||||
_Jv_InitClass (&::gnu::classpath::VMStackWalker::class$);
|
||||
- return GET_CALLING_CLASS(pc);
|
||||
+ jclass result = GET_CALLING_CLASS(pc);
|
||||
+ __asm__ __volatile__ ("" : : "g" (result));
|
||||
+ return result;
|
||||
}
|
||||
|
||||
::java::lang::ClassLoader *
|
||||
--- libjava/sysdep/arm/backtrace.h.jj 2007-09-06 17:20:42.000000000 +0200
|
||||
+++ libjava/sysdep/arm/backtrace.h 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -0,0 +1,35 @@
|
||||
+// backtrace.h - Fallback backtrace implementation. ARM implementation.
|
||||
+
|
||||
+/* Copyright (C) 2005, 2006 Free Software Foundation
|
||||
+
|
||||
+ This file is part of libgcj.
|
||||
+
|
||||
+This software is copyrighted work licensed under the terms of the
|
||||
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
||||
+details. */
|
||||
+
|
||||
+#ifndef __SYSDEP_BACKTRACE_H__
|
||||
+#define __SYSDEP_BACKTRACE_H__
|
||||
+
|
||||
+#include <java-stack.h>
|
||||
+
|
||||
+extern "C"
|
||||
+{
|
||||
+/* Unwind through the call stack calling TRACE_FN with STATE for every stack
|
||||
+ frame. Returns the reason why the unwinding was stopped. */
|
||||
+#ifdef __ARM_EABI_UNWINDER__
|
||||
+
|
||||
+#define _Unwind_FindEnclosingFunction(PC) \
|
||||
+ (PC)
|
||||
+
|
||||
+_Unwind_Reason_Code
|
||||
+fallback_backtrace (_Unwind_Reason_Code (*)(struct _Unwind_Context*, void*), _Jv_UnwindState *)
|
||||
+#else
|
||||
+_Unwind_Reason_Code
|
||||
+fallback_backtrace (_Unwind_Trace_Fn, _Jv_UnwindState *)
|
||||
+#endif
|
||||
+{
|
||||
+ return _URC_NO_REASON;
|
||||
+}
|
||||
+}
|
||||
+#endif
|
|
@ -0,0 +1,32 @@
|
|||
2007-09-07 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* configure.in (noconfigdirs): Remove target-libffi and
|
||||
target-libjava.
|
||||
* configure: Regenerate.
|
||||
|
||||
--- configure.in (revision 128249)
|
||||
+++ configure.in (revision 128250)
|
||||
@@ -501,8 +501,8 @@ case "${target}" in
|
||||
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
|
||||
;;
|
||||
arm*-*-linux-gnueabi)
|
||||
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
|
||||
- noconfigdirs="$noconfigdirs target-libjava target-libobjc"
|
||||
+ noconfigdirs="$noconfigdirs target-qthreads"
|
||||
+ noconfigdirs="$noconfigdirs target-libobjc"
|
||||
;;
|
||||
arm*-*-symbianelf*)
|
||||
noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
|
||||
--- configure (revision 128249)
|
||||
+++ configure (revision 128250)
|
||||
@@ -1293,8 +1293,8 @@ case "${target}" in
|
||||
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
|
||||
;;
|
||||
arm*-*-linux-gnueabi)
|
||||
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
|
||||
- noconfigdirs="$noconfigdirs target-libjava target-libobjc"
|
||||
+ noconfigdirs="$noconfigdirs target-qthreads"
|
||||
+ noconfigdirs="$noconfigdirs target-libobjc"
|
||||
;;
|
||||
arm*-*-symbianelf*)
|
||||
noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
|
|
@ -0,0 +1,65 @@
|
|||
2007-07-13 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* testsuite/libjava.jvmti/jvmti-interp.exp: Likewise.
|
||||
* testsuite/libjava.jni/jni.exp: Use -fdollars-in-identifiers.
|
||||
* testsuite/libjava.jni/cni.exp: Use -fdollars-in-identifiers.
|
||||
* testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o): Likewise.
|
||||
|
||||
--- libjava/testsuite/libjava.cni/cni.exp (revision 126621)
|
||||
+++ libjava/testsuite/libjava.cni/cni.exp (revision 126622)
|
||||
@@ -10,7 +10,7 @@
|
||||
set oname ${name}.o
|
||||
|
||||
# Find the generated header.
|
||||
- lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir"
|
||||
+ lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir -fdollars-in-identifiers"
|
||||
# Find libgcj headers.
|
||||
lappend options "additional_flags=-I$srcdir/.."
|
||||
|
||||
--- libjava/testsuite/libjava.jvmti/jvmti-interp.exp (revision 126621)
|
||||
+++ libjava/testsuite/libjava.jvmti/jvmti-interp.exp (revision 126622)
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
# Find jni.h and jni_md.h.
|
||||
lappend options "additional_flags=-I$srcdir/../include \
|
||||
- -I$srcdir/../classpath/include"
|
||||
+ -I$srcdir/../classpath/include -fdollars-in-identifiers"
|
||||
|
||||
# Append C++ options
|
||||
lappend options "additional_flags=$options_cxx"
|
||||
--- libjava/testsuite/libjava.jvmti/jvmti.exp (revision 126621)
|
||||
+++ libjava/testsuite/libjava.jvmti/jvmti.exp (revision 126622)
|
||||
@@ -11,11 +11,11 @@
|
||||
set oname ${name}.o
|
||||
|
||||
# Find the generated header.
|
||||
- lappend options "additional_flags=-g -I. -I.."
|
||||
+ lappend options "additional_flags=-g -I. -I.. -fdollars-in-identifiers"
|
||||
# Find libgcj headers.
|
||||
lappend options "additional_flags=-I$srcdir/.."
|
||||
# Find jvmti.h, jvmti_md.h, jvmti-int.h, jvm.h requirements
|
||||
- lappend options "additional_flags=-I$srcdir/../include -I$srcdir/../classpath/include -I$objdir/../include -I$objdir/../../boehm-gc/include"
|
||||
+ lappend options "additional_flags=-I$srcdir/../include -I$srcdir/../classpath/include -I$objdir/../include -I$objdir/../../boehm-gc/include "
|
||||
|
||||
set x [libjava_prune_warnings \
|
||||
[target_compile $file $oname object $options]]
|
||||
--- libjava/testsuite/libjava.jni/jni.exp (revision 126621)
|
||||
+++ libjava/testsuite/libjava.jni/jni.exp (revision 126622)
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
lappend options "additional_flags=${so_flag} -fPIC"
|
||||
# Find the generated header.
|
||||
- lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir"
|
||||
+ lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir -fdollars-in-identifiers"
|
||||
|
||||
# Ensure that the generated header has correct prototypes.
|
||||
set cfile [file rootname $file].c
|
||||
@@ -219,7 +219,7 @@
|
||||
lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir"
|
||||
|
||||
# Find jni.h and jni_md.h.
|
||||
- lappend options "additional_flags=-I$srcdir/../include -I$srcdir/../classpath/include"
|
||||
+ lappend options "additional_flags=-I$srcdir/../include -I$srcdir/../classpath/include -fdollars-in-identifiers"
|
||||
|
||||
# Append C++ options
|
||||
lappend options "additional_flags=$options_cxx"
|
|
@ -0,0 +1,36 @@
|
|||
2007-03-16 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* class.c (push_class): Don't bogusly guess the source filename.
|
||||
* jcf-parse.c (give_name_to_class): Don't set input_location from
|
||||
DECL_ARTIFICIAL decls.
|
||||
|
||||
--- gcc/java/class.c (revision 122746)
|
||||
+++ gcc/java/class.c (working copy)
|
||||
@@ -426,8 +426,7 @@
|
||||
tree decl, signature;
|
||||
location_t saved_loc = input_location;
|
||||
#ifndef USE_MAPPED_LOCATION
|
||||
- tree source_name = identifier_subst (class_name, "", '.', '/', ".java");
|
||||
- input_filename = IDENTIFIER_POINTER (source_name);
|
||||
+ input_filename = "<unknown>";
|
||||
input_line = 0;
|
||||
#endif
|
||||
CLASS_P (class_type) = 1;
|
||||
--- gcc/java/jcf-parse.c (revision 122746)
|
||||
+++ gcc/java/jcf-parse.c (working copy)
|
||||
@@ -1221,9 +1221,12 @@ give_name_to_class (JCF *jcf, int i)
|
||||
main_input_filename = sfname;
|
||||
}
|
||||
#else
|
||||
- input_location = DECL_SOURCE_LOCATION (TYPE_NAME (this_class));
|
||||
- if (main_input_filename == NULL && jcf == main_jcf)
|
||||
- main_input_filename = input_filename;
|
||||
+ if (! DECL_ARTIFICIAL (TYPE_NAME (this_class)))
|
||||
+ {
|
||||
+ input_location = DECL_SOURCE_LOCATION (TYPE_NAME (this_class));
|
||||
+ if (main_input_filename == NULL && jcf == main_jcf)
|
||||
+ main_input_filename = input_filename;
|
||||
+ }
|
||||
#endif
|
||||
|
||||
jcf->cpool.data[i].t = this_class;
|
|
@ -0,0 +1,48 @@
|
|||
2006-07-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* configure.ac (toolexeclibdir, dbexecdir): Canonicalize /lib/../lib
|
||||
to /lib.
|
||||
* configure: Rebuilt.
|
||||
|
||||
--- libjava/configure.ac.jj 2006-07-20 14:01:02.000000000 +0200
|
||||
+++ libjava/configure.ac 2006-07-20 16:36:31.000000000 +0200
|
||||
@@ -1262,6 +1262,7 @@ case ${version_specific_libs} in
|
||||
multi_os_directory=`$CC -print-multi-os-directory`
|
||||
case $multi_os_directory in
|
||||
.) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /.
|
||||
+ ../lib*) toolexeclibdir='$(subst /lib/../lib,/lib,'$toolexecmainlibdir/$multi_os_directory')' ;;
|
||||
*) toolexeclibdir=$toolexecmainlibdir/$multi_os_directory ;;
|
||||
esac
|
||||
;;
|
||||
@@ -1278,6 +1279,10 @@ case $multi_os_directory in
|
||||
dbexecdir='$(libdir)/gcj-$(gcc_version)' # Avoid /.
|
||||
ac_configure_args="$ac_configure_args --with-native-libdir=\$\(libdir\)/gcj-`cat $srcdir/../gcc/BASE-VER`"
|
||||
;;
|
||||
+ ../lib*)
|
||||
+ dbexecdir='$(subst /lib/../lib,/lib,$(libdir)/'$multi_os_directory'/gcj-$(gcc_version))'
|
||||
+ ac_configure_args="$ac_configure_args --with-native-libdir=\$\(libdir\)/$multi_os_directory/gcj-`cat $srcdir/../gcc/BASE-VER`"
|
||||
+ ;;
|
||||
*)
|
||||
dbexecdir='$(libdir)/'$multi_os_directory'/gcj-$(gcc_version)'
|
||||
ac_configure_args="$ac_configure_args --with-native-libdir=\$\(libdir\)/$multi_os_directory/gcj-`cat $srcdir/../gcc/BASE-VER`"
|
||||
--- libjava/configure.jj 2006-07-20 14:01:02.000000000 +0200
|
||||
+++ libjava/configure 2006-07-20 16:45:24.000000000 +0200
|
||||
@@ -14863,6 +14864,7 @@ case ${version_specific_libs} in
|
||||
multi_os_directory=`$CC -print-multi-os-directory`
|
||||
case $multi_os_directory in
|
||||
.) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /.
|
||||
+ ../lib*) toolexeclibdir='$(subst /lib/../lib,/lib,'$toolexecmainlibdir/$multi_os_directory')' ;;
|
||||
*) toolexeclibdir=$toolexecmainlibdir/$multi_os_directory ;;
|
||||
esac
|
||||
;;
|
||||
@@ -14879,6 +14881,10 @@ case $multi_os_directory in
|
||||
dbexecdir='$(libdir)/gcj-$(gcc_version)' # Avoid /.
|
||||
ac_configure_args="$ac_configure_args --with-native-libdir=\$\(libdir\)/gcj-`cat $srcdir/../gcc/BASE-VER`"
|
||||
;;
|
||||
+ ../lib*)
|
||||
+ dbexecdir='$(subst /lib/../lib,/lib,$(libdir)/'$multi_os_directory'/gcj-$(gcc_version))'
|
||||
+ ac_configure_args="$ac_configure_args --with-native-libdir=\$\(libdir\)/$multi_os_directory/gcj-`cat $srcdir/../gcc/BASE-VER`"
|
||||
+ ;;
|
||||
*)
|
||||
dbexecdir='$(libdir)/'$multi_os_directory'/gcj-$(gcc_version)'
|
||||
ac_configure_args="$ac_configure_args --with-native-libdir=\$\(libdir\)/$multi_os_directory/gcj-`cat $srcdir/../gcc/BASE-VER`"
|
|
@ -0,0 +1,25 @@
|
|||
--- libjava/configure.ac.jj 2004-08-16 21:13:29.000000000 +0200
|
||||
+++ libjava/configure.ac 2004-08-21 11:44:59.020755542 +0200
|
||||
@@ -367,6 +367,10 @@ use_gtk_awt=""
|
||||
TOOLKIT=
|
||||
AC_SUBST(TOOLKIT)
|
||||
|
||||
+if test -n "${with_multisubdir}"; then
|
||||
+ peerlibs=no
|
||||
+fi
|
||||
+
|
||||
for peer in $peerlibs ; do
|
||||
case $peer in
|
||||
xlib)
|
||||
--- libjava/configure.jj 2004-08-16 21:22:14.000000000 +0200
|
||||
+++ libjava/configure 2004-08-21 11:45:16.260738060 +0200
|
||||
@@ -4118,6 +4118,9 @@ use_gtk_awt=""
|
||||
# The default toolkit to use is the first one specified.
|
||||
TOOLKIT=
|
||||
|
||||
+if test -n "${with_multisubdir}"; then
|
||||
+ peerlibs=no
|
||||
+fi
|
||||
|
||||
for peer in $peerlibs ; do
|
||||
case $peer in
|
|
@ -0,0 +1,15 @@
|
|||
2005-05-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* configure.host (slow_pthread_self): Set to empty unconditionally
|
||||
on Linux targets.
|
||||
|
||||
--- libjava/configure.host (.../gcc-4_0-branch) (revision 107266)
|
||||
+++ libjava/configure.host (.../redhat/gcc-4_0-branch) (revision 107414)
|
||||
@@ -174,6 +174,7 @@
|
||||
sh-linux* | sh[34]*-linux*)
|
||||
can_unwind_signal=yes
|
||||
libgcj_ld_symbolic='-Wl,-Bsymbolic'
|
||||
+ slow_pthread_self=
|
||||
if test x$slow_pthread_self = xyes \
|
||||
&& test x$cross_compiling != xyes; then
|
||||
cat > conftest.c <<EOF
|
|
@ -0,0 +1,242 @@
|
|||
2007-09-24 Keith Seitz <keiths@redhat.com>
|
||||
|
||||
* include/jvm.h (struct natThread): Add new field 'frame'.
|
||||
* include/java-interp.h (_Jv_Frame): Use _Jv_ThreadStackPeek,
|
||||
_Jv_ThreadStackPop, and _Jv_ThreadStackPush instead of
|
||||
java.lang.Thread.frame.
|
||||
(~_Jv_Frame): Use _Jv_ThreadStackPop.
|
||||
* java/lang/natThread.cc (_Jv_ThreadStackPeek): New function.
|
||||
(_Jv_ThreadStackPush): New function.
|
||||
(_Jv_ThreadStackPop): New function.
|
||||
* java/lang/Thread.java (frame): Remove field to restore
|
||||
C++ ABI compatibility.
|
||||
* gnu/classpath/jdwp/natVMVirtualMachine.cc (getFrames): Use
|
||||
_Jv_ThreadStackPeek.
|
||||
(getFrame): Likewise.
|
||||
* gnu/classpath/jdwp/natVMFrame.cc (getFrameDepth): Likewise.
|
||||
* jvmti.cc (getLocalFrame): Likewise.
|
||||
(_Jv_JVMTI_GetFrameCount): Likewise.
|
||||
(_Jv_JVMTI_GetThreadState): Likewise.
|
||||
(_Jv_JVMTI_GetStackTrace): Likewise.
|
||||
* interpret.cc (_Jv_ReportJVMTIExceptionThrow): Likewise.
|
||||
* headers.txt (java/lang/Thread.h): Prepend declarations
|
||||
for _Jv_ThreadStackPeek, _Jv_ThreadStackPush, and _Jv_ThreadStackPop.
|
||||
Add as friend functions.
|
||||
* jni.cc (_Jv_JNIMethod::call): Push a frame onto the stack when
|
||||
calling a JNI method.
|
||||
|
||||
--- libjava/interpret.cc (revision 128603)
|
||||
+++ libjava/interpret.cc (working copy)
|
||||
@@ -1709,7 +1709,7 @@
|
||||
_Jv_ReportJVMTIExceptionThrow (jthrowable ex)
|
||||
{
|
||||
jthread thread = ::java::lang::Thread::currentThread ();
|
||||
- _Jv_Frame *frame = reinterpret_cast<_Jv_Frame *> (thread->frame);
|
||||
+ _Jv_Frame *frame = _Jv_ThreadStackPeek (thread);
|
||||
jmethodID throw_meth = frame->self->get_method ();
|
||||
jlocation throw_loc = -1;
|
||||
if (frame->frame_type == frame_interpreter)
|
||||
--- libjava/include/java-interp.h (revision 128603)
|
||||
+++ libjava/include/java-interp.h (working copy)
|
||||
@@ -391,14 +391,14 @@
|
||||
{
|
||||
self = s;
|
||||
frame_type = type;
|
||||
- next = (_Jv_Frame *) thr->frame;
|
||||
- thr->frame = (gnu::gcj::RawData *) this;
|
||||
+ next = _Jv_ThreadStackPeek (thr);
|
||||
+ _Jv_ThreadStackPush (thr, this);
|
||||
thread = thr;
|
||||
}
|
||||
|
||||
~_Jv_Frame ()
|
||||
{
|
||||
- thread->frame = (gnu::gcj::RawData *) next;
|
||||
+ _Jv_ThreadStackPop (thread);
|
||||
}
|
||||
|
||||
int depth ()
|
||||
--- libjava/include/jvm.h (revision 128603)
|
||||
+++ libjava/include/jvm.h (working copy)
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
#include <sysdep/locks.h>
|
||||
|
||||
+class _Jv_Frame;
|
||||
+
|
||||
/* Macro for possible unused arguments. */
|
||||
#define MAYBE_UNUSED __attribute__((__unused__))
|
||||
|
||||
@@ -767,6 +769,12 @@
|
||||
|
||||
// Each thread has its own JNI object.
|
||||
_Jv_JNIEnv *jni_env;
|
||||
+
|
||||
+ // Describes the topmost frame in the thread's composite
|
||||
+ // (interp + JNI) stack. Added here to maintain C++ ABI
|
||||
+ // compatibility with previous versions. Newer versions
|
||||
+ // of gcj put this in java/lang/Thread.java.
|
||||
+ _Jv_Frame *frame;
|
||||
};
|
||||
|
||||
#endif /* __JAVA_JVM_H__ */
|
||||
--- libjava/jni.cc (revision 128603)
|
||||
+++ libjava/jni.cc (working copy)
|
||||
@@ -2343,6 +2343,10 @@
|
||||
// Copy over passed-in arguments.
|
||||
memcpy (&real_args[offset], args, _this->args_raw_size);
|
||||
|
||||
+ // Add a frame to the composite (interpreted + JNI) call stack
|
||||
+ java::lang::Thread *thread = java::lang::Thread::currentThread ();
|
||||
+ _Jv_NativeFrame nat_frame (_this, thread);
|
||||
+
|
||||
// The actual call to the JNI function.
|
||||
#if FFI_NATIVE_RAW_API
|
||||
ffi_raw_call (&_this->jni_cif, (void (*)()) _this->function,
|
||||
--- libjava/jvmti.cc (revision 128603)
|
||||
+++ libjava/jvmti.cc (working copy)
|
||||
@@ -228,7 +228,7 @@
|
||||
THREAD_CHECK_VALID (thread);
|
||||
THREAD_CHECK_IS_ALIVE (thread);
|
||||
|
||||
- _Jv_Frame *frame = reinterpret_cast<_Jv_Frame *> (thread->frame);
|
||||
+ _Jv_Frame *frame = _Jv_ThreadStackPeek (thread);
|
||||
|
||||
for (int i = 0; i < depth; i++)
|
||||
{
|
||||
@@ -516,7 +516,7 @@
|
||||
THREAD_CHECK_VALID (thread);
|
||||
THREAD_CHECK_IS_ALIVE (thread);
|
||||
|
||||
- _Jv_Frame *frame = reinterpret_cast<_Jv_Frame *> (thread->frame);
|
||||
+ _Jv_Frame *frame = _Jv_ThreadStackPeek (thread);
|
||||
(*frame_count) = frame->depth ();
|
||||
return JVMTI_ERROR_NONE;
|
||||
}
|
||||
@@ -543,7 +543,7 @@
|
||||
if (thread->isInterrupted ())
|
||||
state |= JVMTI_THREAD_STATE_INTERRUPTED;
|
||||
|
||||
- _Jv_Frame *frame = reinterpret_cast<_Jv_Frame *> (thread->frame);
|
||||
+ _Jv_Frame *frame = _Jv_ThreadStackPeek (thread);
|
||||
if (frame != NULL && frame->frame_type == frame_native)
|
||||
state |= JVMTI_THREAD_STATE_IN_NATIVE;
|
||||
|
||||
@@ -1273,7 +1273,7 @@
|
||||
ILLEGAL_ARGUMENT (start_depth >= (*frame_count));
|
||||
ILLEGAL_ARGUMENT (start_depth < (-(*frame_count)));
|
||||
|
||||
- _Jv_Frame *frame = reinterpret_cast<_Jv_Frame *> (thread->frame);
|
||||
+ _Jv_Frame *frame = _Jv_ThreadStackPeek (thread);
|
||||
|
||||
// If start_depth is negative use this to determine at what depth to start
|
||||
// the trace by adding it to the length of the call stack. This allows the
|
||||
--- libjava/headers.txt (revision 128603)
|
||||
+++ libjava/headers.txt (working copy)
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
class java/lang/Thread
|
||||
prepend class _Jv_JNIEnv;
|
||||
+prepend class _Jv_Frame;
|
||||
prepend #define _JV_NOT_OWNER 1
|
||||
prepend #define _JV_INTERRUPTED 2
|
||||
prepend _Jv_JNIEnv * _Jv_GetCurrentJNIEnv ();
|
||||
@@ -17,6 +18,9 @@
|
||||
prepend jint _Jv_DetachCurrentThread ();
|
||||
prepend struct _Jv_Thread_t;
|
||||
prepend _Jv_Thread_t* _Jv_ThreadGetData (java::lang::Thread* thread);
|
||||
+prepend _Jv_Frame *_Jv_ThreadStackPeek (java::lang::Thread *thread);
|
||||
+prepend void _Jv_ThreadStackPush (java::lang::Thread *thread, _Jv_Frame *frame);
|
||||
+prepend void _Jv_ThreadStackPop (java::lang::Thread *thread);
|
||||
friend _Jv_JNIEnv * ::_Jv_GetCurrentJNIEnv ();
|
||||
friend void ::_Jv_SetCurrentJNIEnv (_Jv_JNIEnv *env);
|
||||
friend void ::_Jv_ThreadRun (java::lang::Thread* thread);
|
||||
@@ -24,6 +28,9 @@
|
||||
friend java::lang::Thread* ::_Jv_AttachCurrentThread (jstring name, java::lang::ThreadGroup* group);
|
||||
friend java::lang::Thread* ::_Jv_AttachCurrentThreadAsDaemon (jstring name, java::lang::ThreadGroup* group);
|
||||
friend jint (::_Jv_DetachCurrentThread) ();
|
||||
+friend _Jv_Frame *::_Jv_ThreadStackPeek (java::lang::Thread *thread);
|
||||
+friend void ::_Jv_ThreadStackPush (java::lang::Thread *thread, _Jv_Frame *frame);
|
||||
+friend void ::_Jv_ThreadStackPop (java::lang::Thread *thread);
|
||||
|
||||
class java/lang/String
|
||||
prepend jchar* _Jv_GetStringChars (jstring str);
|
||||
--- libjava/gnu/classpath/jdwp/natVMFrame.cc (revision 128603)
|
||||
+++ libjava/gnu/classpath/jdwp/natVMFrame.cc (working copy)
|
||||
@@ -181,7 +181,7 @@
|
||||
getFrameDepth (_Jv_Frame *frame)
|
||||
{
|
||||
jint depth = 0;
|
||||
- _Jv_Frame *top_frame = (_Jv_Frame *) frame->thread->frame;
|
||||
+ _Jv_Frame *top_frame = _Jv_ThreadStackPeek (frame->thread);
|
||||
jint num_frames = VMVirtualMachine::getFrameCount (frame->thread);
|
||||
|
||||
while (frame != top_frame)
|
||||
--- libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc (revision 128603)
|
||||
+++ libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc (working copy)
|
||||
@@ -553,7 +553,7 @@
|
||||
|
||||
frame_list = new ::java::util::ArrayList (num_frames);
|
||||
|
||||
- _Jv_Frame *vm_frame = reinterpret_cast<_Jv_Frame *> (thread->frame);
|
||||
+ _Jv_Frame *vm_frame = _Jv_ThreadStackPeek (thread);
|
||||
|
||||
// Take start frames off the top of the stack
|
||||
while (vm_frame != NULL && start > 0)
|
||||
@@ -584,7 +584,7 @@
|
||||
{
|
||||
using namespace gnu::classpath::jdwp::exception;
|
||||
|
||||
- _Jv_Frame *vm_frame = (_Jv_Frame *) thread->frame;
|
||||
+ _Jv_Frame *vm_frame = _Jv_ThreadStackPeek (thread);
|
||||
jint depth = 0;
|
||||
_Jv_Frame *frame = reinterpret_cast<_Jv_Frame *> (frameID);
|
||||
|
||||
--- libjava/java/lang/Thread.java (revision 128603)
|
||||
+++ libjava/java/lang/Thread.java (working copy)
|
||||
@@ -186,9 +186,6 @@
|
||||
// This describes the top-most interpreter frame for this thread.
|
||||
RawData interp_frame;
|
||||
|
||||
- // This describes the top most frame in the composite (interp + JNI) stack
|
||||
- RawData frame;
|
||||
-
|
||||
// Current state.
|
||||
volatile int state;
|
||||
|
||||
--- libjava/java/lang/natThread.cc (revision 128603)
|
||||
+++ libjava/java/lang/natThread.cc (working copy)
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <gcj/cni.h>
|
||||
#include <jvm.h>
|
||||
#include <java-threads.h>
|
||||
+#include <java-interp.h>
|
||||
|
||||
#include <gnu/gcj/RawDataManaged.h>
|
||||
#include <java/lang/Thread.h>
|
||||
@@ -525,3 +526,25 @@
|
||||
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+_Jv_Frame *
|
||||
+_Jv_ThreadStackPeek (java::lang::Thread *thread)
|
||||
+{
|
||||
+ struct natThread *nt = (natThread *) thread->data;
|
||||
+ return nt->frame;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+_Jv_ThreadStackPush (java::lang::Thread *thread, _Jv_Frame *frame)
|
||||
+{
|
||||
+ struct natThread *nt = (natThread *) thread->data;
|
||||
+ nt->frame = frame;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+_Jv_ThreadStackPop (java::lang::Thread *thread)
|
||||
+{
|
||||
+ struct natThread *nt = (natThread *) thread->data;
|
||||
+ _Jv_Frame *next = nt->frame->next;
|
||||
+ nt->frame = next;
|
||||
+}
|
|
@ -0,0 +1,145 @@
|
|||
2007-03-29 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* jvgenmain.c (main): Change main to use class$, not class$$.
|
||||
(do_mangle_classname): Likewise.
|
||||
* class.c (hide): New function.
|
||||
(add_field): Hide everything that shouldn't be visible outside a
|
||||
DSO.
|
||||
(build_static_class_ref): Likewise.
|
||||
(build_classdollar_field): Likewise.
|
||||
(make_class_data): Likewise.
|
||||
(layout_class_method): Likewise.
|
||||
* expr.c (special_method_p): New function.
|
||||
|
||||
--- gcc/java/class.c (revision 122746)
|
||||
+++ gcc/java/class.c (working copy)
|
||||
@@ -689,6 +688,13 @@
|
||||
return fntype;
|
||||
}
|
||||
|
||||
+static void
|
||||
+hide (tree decl)
|
||||
+{
|
||||
+ DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN;
|
||||
+ DECL_VISIBILITY_SPECIFIED (decl) = 1;
|
||||
+}
|
||||
+
|
||||
tree
|
||||
add_method_1 (tree this_class, int access_flags, tree name, tree function_type)
|
||||
{
|
||||
@@ -799,6 +805,10 @@
|
||||
/* Always make field externally visible. This is required so
|
||||
that native methods can always access the field. */
|
||||
TREE_PUBLIC (field) = 1;
|
||||
+ /* Hide everything that shouldn't be visible outside a DSO. */
|
||||
+ if (flag_indirect_classes
|
||||
+ || (FIELD_PRIVATE (field)))
|
||||
+ hide (field);
|
||||
/* Considered external unless we are compiling it into this
|
||||
object file. */
|
||||
DECL_EXTERNAL (field) = (is_compiled_class (class) != 2);
|
||||
@@ -956,7 +966,11 @@
|
||||
decl = build_decl (VAR_DECL, decl_name, class_type_node);
|
||||
TREE_STATIC (decl) = 1;
|
||||
if (! flag_indirect_classes)
|
||||
- TREE_PUBLIC (decl) = 1;
|
||||
+ {
|
||||
+ TREE_PUBLIC (decl) = 1;
|
||||
+ if (CLASS_PRIVATE (TYPE_NAME (type)))
|
||||
+ hide (decl);
|
||||
+ }
|
||||
DECL_IGNORED_P (decl) = 1;
|
||||
DECL_ARTIFICIAL (decl) = 1;
|
||||
if (is_compiled_class (type) == 1)
|
||||
@@ -995,6 +1009,7 @@
|
||||
TREE_CONSTANT (decl) = 1;
|
||||
TREE_READONLY (decl) = 1;
|
||||
TREE_PUBLIC (decl) = 1;
|
||||
+ hide (decl);
|
||||
DECL_IGNORED_P (decl) = 1;
|
||||
DECL_ARTIFICIAL (decl) = 1;
|
||||
MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl);
|
||||
@@ -1640,6 +1655,10 @@
|
||||
|
||||
TREE_PUBLIC (dtable_decl) = 1;
|
||||
DECL_INITIAL (dtable_decl) = dtable;
|
||||
+ /* The only dispatch table exported from a DSO is the dispatch
|
||||
+ table for java.lang.Class. */
|
||||
+ if (DECL_NAME (type_decl) != id_class)
|
||||
+ hide (dtable_decl);
|
||||
if (! flag_indirect_classes)
|
||||
rest_of_decl_compilation (dtable_decl, 1, 0);
|
||||
/* Maybe we're compiling Class as the first class. If so, set
|
||||
@@ -2509,6 +2528,12 @@
|
||||
|
||||
TREE_PUBLIC (method_decl) = 1;
|
||||
|
||||
+ if (flag_indirect_classes
|
||||
+ || (METHOD_PRIVATE (method_decl) && METHOD_STATIC (method_decl)
|
||||
+ && ! METHOD_NATIVE (method_decl)
|
||||
+ && ! special_method_p (method_decl)))
|
||||
+ hide (method_decl);
|
||||
+
|
||||
/* Considered external unless it is being compiled into this object
|
||||
file, or it was already flagged as external. */
|
||||
if (!DECL_EXTERNAL (method_decl))
|
||||
--- gcc/java/jvgenmain.c (revision 122746)
|
||||
+++ gcc/java/jvgenmain.c (working copy)
|
||||
@@ -143,8 +143,8 @@
|
||||
fprintf (stream, " JvRunMainName (\"%s\", argc, argv);\n", classname);
|
||||
else
|
||||
{
|
||||
- fprintf (stream, " extern void *%s;\n", mangled_classname);
|
||||
- fprintf (stream, " JvRunMain (%s, argc, argv);\n", mangled_classname);
|
||||
+ fprintf (stream, " extern char %s;\n", mangled_classname);
|
||||
+ fprintf (stream, " JvRunMain (&%s, argc, argv);\n", mangled_classname);
|
||||
}
|
||||
fprintf (stream, "}\n");
|
||||
if (stream != stdout && fclose (stream) != 0)
|
||||
@@ -176,7 +176,7 @@
|
||||
count++;
|
||||
}
|
||||
append_gpp_mangled_name (&ptr [-count], count);
|
||||
- obstack_grow (mangle_obstack, "7class$$E", strlen ("7class$$E"));
|
||||
+ obstack_grow (mangle_obstack, "6class$E", strlen ("6class$E"));
|
||||
obstack_1grow (mangle_obstack, '\0');
|
||||
return obstack_finish (mangle_obstack);
|
||||
}
|
||||
--- gcc/java/expr.c (revision 122746)
|
||||
+++ gcc/java/expr.c (working copy)
|
||||
@@ -2121,6 +2121,25 @@
|
||||
|
||||
{NULL, NULL, NULL, NULL, 0, NULL}};
|
||||
|
||||
+/* True if this method is special, i.e. it's a private method that
|
||||
+ should be exported fro a DSO. */
|
||||
+
|
||||
+bool
|
||||
+special_method_p (tree candidate_method)
|
||||
+{
|
||||
+ tree context = DECL_NAME (TYPE_NAME (DECL_CONTEXT (candidate_method)));
|
||||
+ tree method = DECL_NAME (candidate_method);
|
||||
+ rewrite_rule *p;
|
||||
+
|
||||
+ for (p = rules; p->classname; p++)
|
||||
+ {
|
||||
+ if (get_identifier (p->classname) == context
|
||||
+ && get_identifier (p->method) == method)
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
/* Scan the rules list for replacements for *METHOD_P and replace the
|
||||
args accordingly. If the rewrite results in an access to a private
|
||||
method, update SPECIAL.*/
|
||||
--- gcc/java/java-tree.h (revision 122746)
|
||||
+++ gcc/java/java-tree.h (working copy)
|
||||
@@ -1171,6 +1171,7 @@
|
||||
extern void initialize_builtins (void);
|
||||
|
||||
extern tree lookup_name (tree);
|
||||
+extern bool special_method_p (tree);
|
||||
extern void maybe_rewrite_invocation (tree *, tree *, tree *, tree *);
|
||||
extern tree build_known_method_ref (tree, tree, tree, tree, tree, tree);
|
||||
extern tree build_class_init (tree, tree);
|
|
@ -0,0 +1,133 @@
|
|||
2007-12-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* 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.
|
||||
|
||||
--- gcc/omp-low.c (revision 130589)
|
||||
+++ gcc/omp-low.c (revision 130590)
|
||||
@@ -1518,12 +1518,10 @@ lookup_decl_in_outer_ctx (tree decl, omp
|
||||
tree t;
|
||||
omp_context *up;
|
||||
|
||||
- gcc_assert (ctx->is_nested);
|
||||
-
|
||||
for (up = ctx->outer, t = NULL; up && t == NULL; up = up->outer)
|
||||
t = maybe_lookup_decl (decl, up);
|
||||
|
||||
- gcc_assert (t || is_global_var (decl));
|
||||
+ gcc_assert (!ctx->is_nested || t || is_global_var (decl));
|
||||
|
||||
return t ? t : decl;
|
||||
}
|
||||
@@ -1538,9 +1536,8 @@ maybe_lookup_decl_in_outer_ctx (tree dec
|
||||
tree t = NULL;
|
||||
omp_context *up;
|
||||
|
||||
- if (ctx->is_nested)
|
||||
- for (up = ctx->outer, t = NULL; up && t == NULL; up = up->outer)
|
||||
- t = maybe_lookup_decl (decl, up);
|
||||
+ for (up = ctx->outer, t = NULL; up && t == NULL; up = up->outer)
|
||||
+ t = maybe_lookup_decl (decl, up);
|
||||
|
||||
return t ? t : decl;
|
||||
}
|
||||
@@ -2012,7 +2009,7 @@ lower_copyprivate_clauses (tree clauses,
|
||||
by_ref = use_pointer_for_field (var, false);
|
||||
|
||||
ref = build_sender_ref (var, ctx);
|
||||
- x = (ctx->is_nested) ? lookup_decl_in_outer_ctx (var, ctx) : var;
|
||||
+ x = lookup_decl_in_outer_ctx (var, ctx);
|
||||
x = by_ref ? build_fold_addr_expr (x) : x;
|
||||
x = build_gimple_modify_stmt (ref, x);
|
||||
gimplify_and_add (x, slist);
|
||||
@@ -2053,9 +2050,8 @@ lower_send_clauses (tree clauses, tree *
|
||||
continue;
|
||||
}
|
||||
|
||||
- var = val = OMP_CLAUSE_DECL (c);
|
||||
- if (ctx->is_nested)
|
||||
- var = lookup_decl_in_outer_ctx (val, ctx);
|
||||
+ val = OMP_CLAUSE_DECL (c);
|
||||
+ var = lookup_decl_in_outer_ctx (val, ctx);
|
||||
|
||||
if (OMP_CLAUSE_CODE (c) != OMP_CLAUSE_COPYIN
|
||||
&& is_global_var (var))
|
||||
@@ -2127,13 +2123,10 @@ lower_send_shared_vars (tree *ilist, tre
|
||||
if (!nvar || !DECL_HAS_VALUE_EXPR_P (nvar))
|
||||
continue;
|
||||
|
||||
- var = ovar;
|
||||
-
|
||||
/* If CTX is a nested parallel directive. Find the immediately
|
||||
enclosing parallel or workshare construct that contains a
|
||||
mapping for OVAR. */
|
||||
- if (ctx->is_nested)
|
||||
- var = lookup_decl_in_outer_ctx (ovar, ctx);
|
||||
+ var = lookup_decl_in_outer_ctx (ovar, ctx);
|
||||
|
||||
if (use_pointer_for_field (ovar, true))
|
||||
{
|
||||
--- libgomp/testsuite/libgomp.c/private-1.c (revision 0)
|
||||
+++ libgomp/testsuite/libgomp.c/private-1.c (revision 130590)
|
||||
@@ -0,0 +1,54 @@
|
||||
+extern void abort (void);
|
||||
+
|
||||
+int a = 18;
|
||||
+
|
||||
+void
|
||||
+f1 (int i, int j, int k)
|
||||
+{
|
||||
+ int l = 6, m = 7, n = 8;
|
||||
+#pragma omp parallel private(j, m) shared(k, n) firstprivate(i, l) \
|
||||
+ num_threads(1)
|
||||
+ {
|
||||
+ j = 6;
|
||||
+ m = 5;
|
||||
+ if (++a != 19 || ++i != 9 || j != 6 || ++l != 7 || m != 5 || ++n != 9)
|
||||
+ #pragma omp atomic
|
||||
+ k++;
|
||||
+ }
|
||||
+ if (a != 19 || i != 8 || j != 26 || k != 0 || l != 6 || m != 7 || n != 9)
|
||||
+ abort ();
|
||||
+}
|
||||
+
|
||||
+int v1 = 1, v2 = 2, v5 = 5;
|
||||
+int err;
|
||||
+
|
||||
+void
|
||||
+f2 (void)
|
||||
+{
|
||||
+ int v3 = 3;
|
||||
+#pragma omp sections private (v1) firstprivate (v2)
|
||||
+ {
|
||||
+ #pragma omp section
|
||||
+ {
|
||||
+ int v4 = 4;
|
||||
+ v1 = 7;
|
||||
+ #pragma omp parallel num_threads(1) firstprivate(v1, v2, v3, v4)
|
||||
+ {
|
||||
+ if (++v1 != 8 || ++v2 != 3 || ++v3 != 4 || ++v4 != 5 || ++v5 != 6)
|
||||
+ err = 1;
|
||||
+ }
|
||||
+ if (v1 != 7 || v2 != 2 || v3 != 3 || v4 != 4 || v5 != 6)
|
||||
+ abort ();
|
||||
+ if (err)
|
||||
+ abort ();
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ f1 (8, 26, 0);
|
||||
+ f2 ();
|
||||
+ return 0;
|
||||
+}
|
|
@ -0,0 +1,86 @@
|
|||
2005-11-28 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/rs6000/rs6000.c (rs6000_return_addr): If COUNT == 0,
|
||||
read word RETURN_ADDRESS_OFFSET bytes above arg_pointer_rtx
|
||||
instead of doing an extran indirection from frame_pointer_rtx.
|
||||
|
||||
* gcc.dg/20051128-1.c: New test.
|
||||
|
||||
--- gcc/config/rs6000/rs6000.c.jj 2005-11-26 14:38:01.000000000 +0100
|
||||
+++ gcc/config/rs6000/rs6000.c 2005-11-28 20:32:18.000000000 +0100
|
||||
@@ -13166,17 +13166,22 @@ rs6000_return_addr (int count, rtx frame
|
||||
don't try to be too clever here. */
|
||||
if (count != 0 || (DEFAULT_ABI != ABI_AIX && flag_pic))
|
||||
{
|
||||
+ rtx x;
|
||||
cfun->machine->ra_needs_full_frame = 1;
|
||||
|
||||
- return
|
||||
- gen_rtx_MEM
|
||||
- (Pmode,
|
||||
- memory_address
|
||||
- (Pmode,
|
||||
- plus_constant (copy_to_reg
|
||||
- (gen_rtx_MEM (Pmode,
|
||||
- memory_address (Pmode, frame))),
|
||||
- RETURN_ADDRESS_OFFSET)));
|
||||
+ if (count == 0)
|
||||
+ {
|
||||
+ gcc_assert (frame == frame_pointer_rtx);
|
||||
+ x = arg_pointer_rtx;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ x = memory_address (Pmode, frame);
|
||||
+ x = copy_to_reg (gen_rtx_MEM (Pmode, x));
|
||||
+ }
|
||||
+
|
||||
+ x = plus_constant (x, RETURN_ADDRESS_OFFSET);
|
||||
+ return gen_rtx_MEM (Pmode, memory_address (Pmode, x));
|
||||
}
|
||||
|
||||
cfun->machine->ra_need_lr = 1;
|
||||
--- gcc/testsuite/gcc.dg/20051128-1.c.jj 2005-10-10 11:21:41.096999000 +0200
|
||||
+++ gcc/testsuite/gcc.dg/20051128-1.c 2005-11-28 12:30:57.000000000 +0100
|
||||
@@ -0,0 +1,41 @@
|
||||
+/* { dg-do run } */
|
||||
+/* { dg-options "-O2 -fpic" } */
|
||||
+
|
||||
+extern void exit (int);
|
||||
+extern void abort (void);
|
||||
+
|
||||
+int b;
|
||||
+
|
||||
+struct A
|
||||
+{
|
||||
+ void *pad[147];
|
||||
+ void *ra, *h;
|
||||
+ long o;
|
||||
+};
|
||||
+
|
||||
+void
|
||||
+__attribute__((noinline))
|
||||
+foo (struct A *a, void *x)
|
||||
+{
|
||||
+ __builtin_memset (a, 0, sizeof (a));
|
||||
+ if (!b)
|
||||
+ exit (0);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+__attribute__((noinline))
|
||||
+bar (void)
|
||||
+{
|
||||
+ struct A a;
|
||||
+
|
||||
+ __builtin_unwind_init ();
|
||||
+ foo (&a, __builtin_return_address (0));
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ bar ();
|
||||
+ abort ();
|
||||
+ return 0;
|
||||
+}
|
|
@ -0,0 +1,86 @@
|
|||
2007-08-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/rs6000/rs6000.c (rs6000_elf_end_indicate_exec_stack): New.
|
||||
* config/rs6000/linux64.h (TARGET_ASM_FILE_END): Use
|
||||
rs6000_elf_end_indicate_exec_stack.
|
||||
* config/ia64/ia64.c (ia64_linux_file_end): new.
|
||||
* config/ia64/linux.h (TARGET_ASM_FILE_END): Use ia64_linux_file_end.
|
||||
|
||||
--- gcc/config/rs6000/rs6000.c.jj 2007-06-27 12:10:19.000000000 +0200
|
||||
+++ gcc/config/rs6000/rs6000.c 2007-08-27 19:27:24.000000000 +0200
|
||||
@@ -638,6 +638,7 @@ static void rs6000_file_start (void);
|
||||
static unsigned int rs6000_elf_section_type_flags (tree, const char *, int);
|
||||
static void rs6000_elf_asm_out_constructor (rtx, int);
|
||||
static void rs6000_elf_asm_out_destructor (rtx, int);
|
||||
+static void rs6000_elf_end_indicate_exec_stack (void) ATTRIBUTE_UNUSED;
|
||||
static void rs6000_elf_select_section (tree, int, unsigned HOST_WIDE_INT);
|
||||
static void rs6000_elf_unique_section (tree, int);
|
||||
static void rs6000_elf_select_rtx_section (enum machine_mode, rtx,
|
||||
@@ -18896,6 +18897,20 @@ rs6000_elf_declare_function_name (FILE *
|
||||
}
|
||||
ASM_OUTPUT_LABEL (file, name);
|
||||
}
|
||||
+
|
||||
+static void
|
||||
+rs6000_elf_end_indicate_exec_stack (void)
|
||||
+{
|
||||
+ if (TARGET_32BIT)
|
||||
+ file_end_indicate_exec_stack ();
|
||||
+ else
|
||||
+ {
|
||||
+ int saved_trampolines_created = trampolines_created;
|
||||
+ trampolines_created = 0;
|
||||
+ file_end_indicate_exec_stack ();
|
||||
+ trampolines_created = saved_trampolines_created;
|
||||
+ }
|
||||
+}
|
||||
#endif
|
||||
|
||||
#if TARGET_XCOFF
|
||||
--- gcc/config/rs6000/linux64.h.jj 2006-11-08 17:53:15.000000000 +0100
|
||||
+++ gcc/config/rs6000/linux64.h 2007-08-27 19:25:09.000000000 +0200
|
||||
@@ -549,7 +549,7 @@ while (0)
|
||||
#undef DRAFT_V4_STRUCT_RET
|
||||
#define DRAFT_V4_STRUCT_RET (!TARGET_64BIT)
|
||||
|
||||
-#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||
+#define TARGET_ASM_FILE_END rs6000_elf_end_indicate_exec_stack
|
||||
|
||||
#define TARGET_POSIX_IO
|
||||
|
||||
--- gcc/config/ia64/linux.h.jj 2006-07-14 18:00:58.000000000 +0200
|
||||
+++ gcc/config/ia64/linux.h 2007-08-27 19:21:12.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
|
||||
|
||||
-#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||
+#define TARGET_ASM_FILE_END ia64_linux_file_end
|
||||
|
||||
/* This is for -profile to use -lc_p instead of -lc. */
|
||||
#undef CC1_SPEC
|
||||
--- gcc/config/ia64/ia64.c.jj 2007-01-05 23:54:11.000000000 +0100
|
||||
+++ gcc/config/ia64/ia64.c 2007-08-27 19:21:43.000000000 +0200
|
||||
@@ -246,6 +246,8 @@ static void ia64_hpux_add_extern_decl (t
|
||||
ATTRIBUTE_UNUSED;
|
||||
static void ia64_hpux_file_end (void)
|
||||
ATTRIBUTE_UNUSED;
|
||||
+static void ia64_linux_file_end (void)
|
||||
+ ATTRIBUTE_UNUSED;
|
||||
static void ia64_init_libfuncs (void)
|
||||
ATTRIBUTE_UNUSED;
|
||||
static void ia64_hpux_init_libfuncs (void)
|
||||
@@ -9096,4 +9098,13 @@ ia64_invalid_binary_op (int op ATTRIBUTE
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+static void
|
||||
+ia64_linux_file_end (void)
|
||||
+{
|
||||
+ int saved_trampolines_created = trampolines_created;
|
||||
+ trampolines_created = 0;
|
||||
+ file_end_indicate_exec_stack ();
|
||||
+ trampolines_created = saved_trampolines_created;
|
||||
+}
|
||||
+
|
||||
#include "gt-ia64.h"
|
|
@ -0,0 +1,22 @@
|
|||
--- gcc/config/rs6000/t-linux64 2003-06-03 05:11:45.000000000 -0400
|
||||
+++ gcc/config/rs6000/t-linux64 2003-06-11 17:07:16.000000000 -0400
|
||||
@@ -4,13 +4,13 @@ LIB2FUNCS_EXTRA = tramp.S $(srcdir)/conf
|
||||
# Modify the shared lib version file
|
||||
SHLIB_MKMAP_OPTS = -v dotsyms=1
|
||||
|
||||
-MULTILIB_OPTIONS = m64/m32 msoft-float
|
||||
-MULTILIB_DIRNAMES = 64 32 nof
|
||||
+MULTILIB_OPTIONS = m64/m32
|
||||
+MULTILIB_DIRNAMES = 64 32
|
||||
MULTILIB_EXTRA_OPTS = fPIC mstrict-align
|
||||
-MULTILIB_EXCEPTIONS = m64/msoft-float
|
||||
-MULTILIB_EXCLUSIONS = m64/!m32/msoft-float
|
||||
-MULTILIB_OSDIRNAMES = ../lib64 ../lib nof
|
||||
-MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
|
||||
+MULTILIB_EXCEPTIONS =
|
||||
+MULTILIB_EXCLUSIONS =
|
||||
+MULTILIB_OSDIRNAMES = ../lib64 ../lib
|
||||
+MULTILIB_MATCHES =
|
||||
|
||||
TARGET_LIBGCC2_CFLAGS = -mno-minimal-toc -fPIC
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
2006-04-06 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/20297
|
||||
* gcc.dg/visibility-11.c: Moved to...
|
||||
* gcc.target/i386/visibility-1.c: ... here. Only run on
|
||||
32-bit linux and bsds.
|
||||
|
||||
--- gcc/testsuite/gcc.dg/visibility-11.c.jj 2006-03-24 17:07:15.000000000 +0100
|
||||
+++ gcc/testsuite/gcc.dg/visibility-11.c 2006-03-28 14:59:27.000000000 +0200
|
||||
@@ -1,24 +0,0 @@
|
||||
-/* PR middle-end/20297 */
|
||||
-/* The memcpy FUNCTION_DECL built in the middle-end for block moves got
|
||||
- hidden visibility from the first push, so the call didn't use the PLT. */
|
||||
-
|
||||
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
|
||||
-/* { dg-require-visibility "" } */
|
||||
-/* { dg-options "-Os -fpic" }
|
||||
-/* { dg-final { scan-assembler "memcpy@PLT" } } */
|
||||
-
|
||||
-#pragma GCC visibility push(hidden)
|
||||
-#pragma GCC visibility push(default)
|
||||
-extern void* memcpy (void *, const void *, __SIZE_TYPE__);
|
||||
-#pragma GCC visibility pop
|
||||
-
|
||||
-struct a { int a[1024]; };
|
||||
-
|
||||
-extern void *bar (struct a *, struct a *, int);
|
||||
-
|
||||
-void *
|
||||
-foo (struct a *a, struct a *b, int c)
|
||||
-{
|
||||
- struct a cc = *b;
|
||||
- return bar (a, &cc, 4 * c);
|
||||
-}
|
||||
--- gcc/testsuite/gcc.target/i386/visibility-1.c.jj 2006-03-28 14:30:17.000000000 +0200
|
||||
+++ gcc/testsuite/gcc.target/i386/visibility-1.c 2006-03-28 14:58:48.000000000 +0200
|
||||
@@ -0,0 +1,25 @@
|
||||
+/* PR middle-end/20297 */
|
||||
+/* The memcpy FUNCTION_DECL built in the middle-end for block moves got
|
||||
+ hidden visibility from the first push, so the call didn't use the PLT. */
|
||||
+
|
||||
+/* { dg-do compile { target { { *-*-linux* *-*-*bsd* *-*-solaris2* *-*-elf* *-*-gnu* *-*-sysv[45]* } && ilp32 } } } */
|
||||
+/* { dg-require-effective-target fpic } */
|
||||
+/* { dg-require-visibility "" } */
|
||||
+/* { dg-options "-Os -fpic" } */
|
||||
+/* { dg-final { scan-assembler "memcpy@PLT" } } */
|
||||
+
|
||||
+#pragma GCC visibility push(hidden)
|
||||
+#pragma GCC visibility push(default)
|
||||
+extern void* memcpy (void *, const void *, __SIZE_TYPE__);
|
||||
+#pragma GCC visibility pop
|
||||
+
|
||||
+struct a { int a[1024]; };
|
||||
+
|
||||
+extern void *bar (struct a *, struct a *, int);
|
||||
+
|
||||
+void *
|
||||
+foo (struct a *a, struct a *b, int c)
|
||||
+{
|
||||
+ struct a cc = *b;
|
||||
+ return bar (a, &cc, 4 * c);
|
||||
+}
|
|
@ -0,0 +1,59 @@
|
|||
2006-11-24 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/20880
|
||||
* parse.c (parse_interface): Error if procedure name is that of
|
||||
encompassing scope.
|
||||
|
||||
* gfortran.dg/interface_3a.f90: New test.
|
||||
|
||||
--- gcc/fortran/parse.c (revision 119172)
|
||||
+++ gcc/fortran/parse.c (revision 119173)
|
||||
@@ -1694,6 +1694,7 @@ parse_interface (void)
|
||||
gfc_interface_info save;
|
||||
gfc_state_data s1, s2;
|
||||
gfc_statement st;
|
||||
+ locus proc_locus;
|
||||
|
||||
accept_statement (ST_INTERFACE);
|
||||
|
||||
@@ -1781,6 +1782,7 @@ loop:
|
||||
accept_statement (st);
|
||||
prog_unit = gfc_new_block;
|
||||
prog_unit->formal_ns = gfc_current_ns;
|
||||
+ proc_locus = gfc_current_locus;
|
||||
|
||||
decl:
|
||||
/* Read data declaration statements. */
|
||||
@@ -1796,8 +1798,15 @@ decl:
|
||||
|
||||
current_interface = save;
|
||||
gfc_add_interface (prog_unit);
|
||||
-
|
||||
pop_state ();
|
||||
+
|
||||
+ if (current_interface.ns
|
||||
+ && current_interface.ns->proc_name
|
||||
+ && strcmp (current_interface.ns->proc_name->name,
|
||||
+ prog_unit->name) == 0)
|
||||
+ gfc_error ("INTERFACE procedure '%s' at %L has the same name as the "
|
||||
+ "enclosing procedure", prog_unit->name, &proc_locus);
|
||||
+
|
||||
goto loop;
|
||||
|
||||
done:
|
||||
--- gcc/testsuite/gfortran.dg/interface_3a.f90
|
||||
+++ gcc/testsuite/gfortran.dg/interface_3a.f90
|
||||
@@ -0,0 +1,13 @@
|
||||
+! { dg-do compile }
|
||||
+! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
|
||||
+!
|
||||
+! This was found whilst investigating => segfault
|
||||
+subroutine thy_sub (a)
|
||||
+ interface
|
||||
+ subroutine thy_sub (a) ! { dg-error "enclosing procedure" }
|
||||
+ real a
|
||||
+ end subroutine
|
||||
+ end interface
|
||||
+ real a
|
||||
+ print *, a
|
||||
+end subroutine
|
|
@ -0,0 +1,225 @@
|
|||
2007-11-15 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/23848
|
||||
* tree-ssa-ccp.c (optimize_stack_restore): New function.
|
||||
(execute_fold_all_builtins): Call optimize_stack_restore for
|
||||
BUILT_IN_STACK_RESTORE.
|
||||
|
||||
* gcc.dg/tree-ssa/pr23848-1.c: New test.
|
||||
* gcc.dg/tree-ssa/pr23848-2.c: New test.
|
||||
* gcc.dg/tree-ssa/pr23848-3.c: New test.
|
||||
* gcc.dg/tree-ssa/pr23848-4.c: New test.
|
||||
|
||||
--- gcc/tree-ssa-ccp.c (revision 130205)
|
||||
+++ gcc/tree-ssa-ccp.c (revision 130206)
|
||||
@@ -2394,6 +2394,75 @@ fold_stmt_inplace (tree stmt)
|
||||
return changed;
|
||||
}
|
||||
|
||||
+/* Try to optimize out __builtin_stack_restore. Optimize it out
|
||||
+ if there is another __builtin_stack_restore in the same basic
|
||||
+ block and no calls or ASM_EXPRs are in between, or if this block's
|
||||
+ only outgoing edge is to EXIT_BLOCK and there are no calls or
|
||||
+ ASM_EXPRs after this __builtin_stack_restore. */
|
||||
+
|
||||
+static tree
|
||||
+optimize_stack_restore (basic_block bb, tree call, block_stmt_iterator i)
|
||||
+{
|
||||
+ tree stack_save, stmt, callee;
|
||||
+
|
||||
+ if (TREE_CODE (call) != CALL_EXPR
|
||||
+ || TREE_OPERAND (call, 1) == NULL_TREE
|
||||
+ || TREE_CHAIN (TREE_OPERAND (call, 1)) != NULL_TREE
|
||||
+ || TREE_CODE (TREE_VALUE (TREE_OPERAND (call, 1))) != SSA_NAME
|
||||
+ || !POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (TREE_OPERAND (call, 1)))))
|
||||
+ return NULL_TREE;
|
||||
+
|
||||
+ for (bsi_next (&i); !bsi_end_p (i); bsi_next (&i))
|
||||
+ {
|
||||
+ tree call;
|
||||
+
|
||||
+ stmt = bsi_stmt (i);
|
||||
+ if (TREE_CODE (stmt) == ASM_EXPR)
|
||||
+ return NULL_TREE;
|
||||
+ call = get_call_expr_in (stmt);
|
||||
+ if (call == NULL)
|
||||
+ continue;
|
||||
+
|
||||
+ callee = get_callee_fndecl (call);
|
||||
+ if (!callee || DECL_BUILT_IN_CLASS (callee) != BUILT_IN_NORMAL)
|
||||
+ return NULL_TREE;
|
||||
+
|
||||
+ if (DECL_FUNCTION_CODE (callee) == BUILT_IN_STACK_RESTORE)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (bsi_end_p (i)
|
||||
+ && (! single_succ_p (bb)
|
||||
+ || single_succ_edge (bb)->dest != EXIT_BLOCK_PTR))
|
||||
+ return NULL_TREE;
|
||||
+
|
||||
+ stack_save = SSA_NAME_DEF_STMT (TREE_VALUE (TREE_OPERAND (call, 1)));
|
||||
+ if (TREE_CODE (stack_save) != MODIFY_EXPR
|
||||
+ || TREE_OPERAND (stack_save, 0)
|
||||
+ != TREE_VALUE (TREE_OPERAND (call, 1))
|
||||
+ || TREE_CODE (TREE_OPERAND (stack_save, 1)) != CALL_EXPR
|
||||
+ || tree_could_throw_p (stack_save)
|
||||
+ || !has_single_use (TREE_VALUE (TREE_OPERAND (call, 1))))
|
||||
+ return NULL_TREE;
|
||||
+
|
||||
+ callee = get_callee_fndecl (TREE_OPERAND (stack_save, 1));
|
||||
+ if (!callee
|
||||
+ || DECL_BUILT_IN_CLASS (callee) != BUILT_IN_NORMAL
|
||||
+ || DECL_FUNCTION_CODE (callee) != BUILT_IN_STACK_SAVE
|
||||
+ || TREE_OPERAND (TREE_OPERAND (stack_save, 1), 1) != NULL_TREE)
|
||||
+ return NULL_TREE;
|
||||
+
|
||||
+ stmt = stack_save;
|
||||
+ if (!set_rhs (&stmt,
|
||||
+ build_int_cst (TREE_TYPE (TREE_VALUE (TREE_OPERAND (call,
|
||||
+ 1))), 0)))
|
||||
+ return NULL_TREE;
|
||||
+ gcc_assert (stmt == stack_save);
|
||||
+ mark_new_vars_to_rename (stmt);
|
||||
+
|
||||
+ return integer_zero_node;
|
||||
+}
|
||||
+
|
||||
/* Convert EXPR into a GIMPLE value suitable for substitution on the
|
||||
RHS of an assignment. Insert the necessary statements before
|
||||
iterator *SI_P. */
|
||||
@@ -2469,6 +2538,12 @@ execute_fold_all_builtins (void)
|
||||
result = integer_zero_node;
|
||||
break;
|
||||
|
||||
+ case BUILT_IN_STACK_RESTORE:
|
||||
+ result = optimize_stack_restore (bb, *stmtp, i);
|
||||
+ if (result)
|
||||
+ break;
|
||||
+ /* FALLTHRU */
|
||||
+
|
||||
default:
|
||||
bsi_next (&i);
|
||||
continue;
|
||||
--- gcc/testsuite/gcc.dg/tree-ssa/pr23848-1.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/tree-ssa/pr23848-1.c (revision 130206)
|
||||
@@ -0,0 +1,32 @@
|
||||
+/* PR middle-end/23848 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2 -fdump-tree-optimized" } */
|
||||
+
|
||||
+void bar1 (char *, int);
|
||||
+void foo1 (int size)
|
||||
+{
|
||||
+ char temp[size];
|
||||
+ temp[size-1] = '\0';
|
||||
+ bar1 (temp, size);
|
||||
+}
|
||||
+
|
||||
+void bar2 (char *, char *, char *, char *, int);
|
||||
+void foo2 (int size)
|
||||
+{
|
||||
+ char temp[size];
|
||||
+ temp[size-1] = '\0';
|
||||
+ {
|
||||
+ char temp2[size];
|
||||
+ {
|
||||
+ char temp3[size];
|
||||
+ {
|
||||
+ char temp4[size];
|
||||
+ bar2 (temp, temp2, temp3, temp4, size);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-tree-dump-not "__builtin_stack_save" "optimized"} } */
|
||||
+/* { dg-final { scan-tree-dump-not "__builtin_stack_restore" "optimized"} } */
|
||||
+/* { dg-final { cleanup-tree-dump "optimized" } } */
|
||||
--- gcc/testsuite/gcc.dg/tree-ssa/pr23848-2.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/tree-ssa/pr23848-2.c (revision 130206)
|
||||
@@ -0,0 +1,25 @@
|
||||
+/* PR middle-end/23848 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2 -fdump-tree-optimized" } */
|
||||
+
|
||||
+void bar (char *, char *, char *, char *, int);
|
||||
+void foo (int size)
|
||||
+{
|
||||
+ char temp[size];
|
||||
+ temp[size-1] = '\0';
|
||||
+ {
|
||||
+ char temp2[size];
|
||||
+ {
|
||||
+ char temp3[size];
|
||||
+ {
|
||||
+ char temp4[size];
|
||||
+ bar (temp, temp2, temp3, temp4, size);
|
||||
+ }
|
||||
+ }
|
||||
+ bar (temp, temp2, (char *) 0, (char *) 0, size);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-tree-dump-times "__builtin_stack_save" 1 "optimized"} } */
|
||||
+/* { dg-final { scan-tree-dump-times "__builtin_stack_restore" 1 "optimized"} } */
|
||||
+/* { dg-final { cleanup-tree-dump "optimized" } } */
|
||||
--- gcc/testsuite/gcc.dg/tree-ssa/pr23848-3.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/tree-ssa/pr23848-3.c (revision 130206)
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* PR middle-end/23848 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2 -fdump-tree-optimized" } */
|
||||
+
|
||||
+void bar (int, char *, char *, char *, char *, int);
|
||||
+void foo (int size)
|
||||
+{
|
||||
+ int i;
|
||||
+ for (i = 0; i < size; i++)
|
||||
+ {
|
||||
+ char temp[size];
|
||||
+ temp[size-1] = '\0';
|
||||
+ {
|
||||
+ char temp2[size];
|
||||
+ {
|
||||
+ char temp3[size];
|
||||
+ {
|
||||
+ char temp4[size];
|
||||
+ bar (i, temp, temp2, temp3, temp4, size);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-tree-dump-times "__builtin_stack_save" 1 "optimized"} } */
|
||||
+/* { dg-final { scan-tree-dump-times "__builtin_stack_restore" 1 "optimized"} } */
|
||||
+/* { dg-final { cleanup-tree-dump "optimized" } } */
|
||||
--- gcc/testsuite/gcc.dg/tree-ssa/pr23848-4.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/tree-ssa/pr23848-4.c (revision 130206)
|
||||
@@ -0,0 +1,25 @@
|
||||
+/* PR middle-end/23848 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2 -fdump-tree-optimized" } */
|
||||
+
|
||||
+void bar (char *, char *, char *, char *, int);
|
||||
+void foo (int size)
|
||||
+{
|
||||
+ char temp[size];
|
||||
+ temp[size-1] = '\0';
|
||||
+ {
|
||||
+ char temp2[size];
|
||||
+ {
|
||||
+ char temp3[size];
|
||||
+ {
|
||||
+ char temp4[size];
|
||||
+ bar (temp, temp2, temp3, temp4, size);
|
||||
+ }
|
||||
+ }
|
||||
+ __asm __volatile ("" : : "r" (&temp[0]), "r" (&temp2[0]) : "memory");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-tree-dump-times "__builtin_stack_save" 1 "optimized"} } */
|
||||
+/* { dg-final { scan-tree-dump-times "__builtin_stack_restore" 1 "optimized"} } */
|
||||
+/* { dg-final { cleanup-tree-dump "optimized" } } */
|
|
@ -0,0 +1,71 @@
|
|||
2007-12-18 Andrew Haley <aph@redhat.com>
|
||||
|
||||
PR java/27643
|
||||
* jcf-parse.c (java_parse_file): Remove call to
|
||||
java_mark_class_local.
|
||||
(parse_class_file): Reinstate call to java_mark_class_local here.
|
||||
* decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
|
||||
already set, call java_mangle_decl() and make_decl_rtl() to
|
||||
rewrite its name as a hidden alias.
|
||||
|
||||
--- gcc/java/decl.c (revision 131035)
|
||||
+++ gcc/java/decl.c (revision 131036)
|
||||
@@ -1890,18 +1890,27 @@ java_mark_decl_local (tree decl)
|
||||
static void
|
||||
java_mark_cni_decl_local (tree decl)
|
||||
{
|
||||
- /* Setting DECL_LOCAL_CNI_METHOD_P changes the behavior of the mangler.
|
||||
- We expect that we should not yet have referenced this decl in a
|
||||
- context that requires it. Check this invariant even if we don't have
|
||||
- support for hidden aliases. */
|
||||
- gcc_assert (!DECL_ASSEMBLER_NAME_SET_P (decl));
|
||||
-
|
||||
#if !defined(HAVE_GAS_HIDDEN) || !defined(ASM_OUTPUT_DEF)
|
||||
return;
|
||||
#endif
|
||||
|
||||
DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN;
|
||||
DECL_LOCAL_CNI_METHOD_P (decl) = 1;
|
||||
+
|
||||
+ /* Setting DECL_LOCAL_CNI_METHOD_P changes the behavior of the
|
||||
+ mangler. We might have already referenced this native method and
|
||||
+ therefore created its name, but even if we have it won't hurt.
|
||||
+ We'll just go via its externally visible name, rather than its
|
||||
+ hidden alias. However, we must force things so that the correct
|
||||
+ mangling is done. */
|
||||
+
|
||||
+ if (DECL_ASSEMBLER_NAME_SET_P (decl))
|
||||
+ java_mangle_decl (decl);
|
||||
+ if (DECL_RTL_SET_P (decl))
|
||||
+ {
|
||||
+ SET_DECL_RTL (decl, 0);
|
||||
+ make_decl_rtl (decl);
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Use the preceding two functions and mark all members of the class. */
|
||||
--- gcc/java/jcf-parse.c (revision 131035)
|
||||
+++ gcc/java/jcf-parse.c (revision 131036)
|
||||
@@ -1596,6 +1596,8 @@ parse_class_file (void)
|
||||
file_start_location = input_location;
|
||||
(*debug_hooks->start_source_file) (input_line, input_filename);
|
||||
|
||||
+ java_mark_class_local (current_class);
|
||||
+
|
||||
gen_indirect_dispatch_tables (current_class);
|
||||
|
||||
for (method = TYPE_METHODS (current_class);
|
||||
@@ -1967,13 +1969,6 @@ java_parse_file (int set_yydebug ATTRIBU
|
||||
}
|
||||
}
|
||||
|
||||
- /* Do this before lowering any code. */
|
||||
- for (node = current_file_list; node; node = TREE_CHAIN (node))
|
||||
- {
|
||||
- if (CLASS_FILE_P (node))
|
||||
- java_mark_class_local (TREE_TYPE (node));
|
||||
- }
|
||||
-
|
||||
for (node = current_file_list; node; node = TREE_CHAIN (node))
|
||||
{
|
||||
input_location = DECL_SOURCE_LOCATION (node);
|
|
@ -0,0 +1,92 @@
|
|||
2006-07-06 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
PR c/27898
|
||||
* c-typeck.c (tagged_types_tu_compatible_p): Enable exact
|
||||
matches between anonymous union fields.
|
||||
|
||||
2006-08-18 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/27898
|
||||
* gcc.dg/pr27898.c: New test.
|
||||
|
||||
--- gcc/testsuite/gcc.dg/pr27898.c.jj 2006-08-18 09:19:33.000000000 +0200
|
||||
+++ gcc/testsuite/gcc.dg/pr27898.c 2006-08-18 09:19:27.000000000 +0200
|
||||
@@ -0,0 +1,8 @@
|
||||
+/* PR c/27898 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "--combine" } */
|
||||
+/* { dg-additional-sources "pr27898.c" } */
|
||||
+
|
||||
+union u { struct { int i; }; };
|
||||
+
|
||||
+extern int foo (union u *);
|
||||
--- gcc/c-typeck.c.jj 2006-08-17 09:55:11.000000000 +0200
|
||||
+++ gcc/c-typeck.c 2006-08-18 09:14:15.000000000 +0200
|
||||
@@ -1072,11 +1072,12 @@ tagged_types_tu_compatible_p (tree t1, t
|
||||
{
|
||||
int result;
|
||||
|
||||
-
|
||||
- if (DECL_NAME (s1) == NULL
|
||||
- || DECL_NAME (s1) != DECL_NAME (s2))
|
||||
+ if (DECL_NAME (s1) != DECL_NAME (s2))
|
||||
break;
|
||||
result = comptypes_internal (TREE_TYPE (s1), TREE_TYPE (s2));
|
||||
+
|
||||
+ if (result != 1 && !DECL_NAME (s1))
|
||||
+ break;
|
||||
if (result == 0)
|
||||
{
|
||||
tu->val = 0;
|
||||
@@ -1103,28 +1104,31 @@ tagged_types_tu_compatible_p (tree t1, t
|
||||
{
|
||||
bool ok = false;
|
||||
|
||||
- if (DECL_NAME (s1) != NULL)
|
||||
- for (s2 = TYPE_FIELDS (t2); s2; s2 = TREE_CHAIN (s2))
|
||||
- if (DECL_NAME (s1) == DECL_NAME (s2))
|
||||
- {
|
||||
- int result;
|
||||
- result = comptypes_internal (TREE_TYPE (s1), TREE_TYPE (s2));
|
||||
- if (result == 0)
|
||||
- {
|
||||
- tu->val = 0;
|
||||
- return 0;
|
||||
- }
|
||||
- if (result == 2)
|
||||
- needs_warning = true;
|
||||
-
|
||||
- if (TREE_CODE (s1) == FIELD_DECL
|
||||
- && simple_cst_equal (DECL_FIELD_BIT_OFFSET (s1),
|
||||
- DECL_FIELD_BIT_OFFSET (s2)) != 1)
|
||||
- break;
|
||||
+ for (s2 = TYPE_FIELDS (t2); s2; s2 = TREE_CHAIN (s2))
|
||||
+ if (DECL_NAME (s1) == DECL_NAME (s2))
|
||||
+ {
|
||||
+ int result;
|
||||
+
|
||||
+ result = comptypes_internal (TREE_TYPE (s1), TREE_TYPE (s2));
|
||||
|
||||
- ok = true;
|
||||
+ if (result != 1 && !DECL_NAME (s1))
|
||||
+ continue;
|
||||
+ if (result == 0)
|
||||
+ {
|
||||
+ tu->val = 0;
|
||||
+ return 0;
|
||||
+ }
|
||||
+ if (result == 2)
|
||||
+ needs_warning = true;
|
||||
+
|
||||
+ if (TREE_CODE (s1) == FIELD_DECL
|
||||
+ && simple_cst_equal (DECL_FIELD_BIT_OFFSET (s1),
|
||||
+ DECL_FIELD_BIT_OFFSET (s2)) != 1)
|
||||
break;
|
||||
- }
|
||||
+
|
||||
+ ok = true;
|
||||
+ break;
|
||||
+ }
|
||||
if (!ok)
|
||||
{
|
||||
tu->val = 0;
|
|
@ -0,0 +1,155 @@
|
|||
2007-06-26 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* defaults.h (TARGET_INDEX_OPERAND_FIRST): Define.
|
||||
* config/rs6000/rs6000.h (TARGET_INDEX_OPERAND_FIRST): Define.
|
||||
* optabs.c (emit_cmp_and_jump_insns): Don't call swap_operand
|
||||
twice.
|
||||
* rtlanal.c (commutative_operand_precedence): Only prefer
|
||||
REG_POINTER and MEM_POINTER operands over REG and MEM operands
|
||||
if TARGET_INDEX_OPERAND_FIRST.
|
||||
(swap_commutative_operands_p): Only sort on REGNO if
|
||||
TARGET_INDEX_OPERAND_FIRST.
|
||||
* tree-ssa-address.c (gen_addr_rtx): Only use simplify_gen_binary
|
||||
instead of gen_rtx_PLUS if TARGET_INDEX_OPERAND_FIRST.
|
||||
|
||||
2007-06-20 Peter Bergner <bergner@vnet.ibm.com>
|
||||
|
||||
PR middle-end/28690
|
||||
* optabs.c (emit_cmp_and_jump_insns): Allow EQ compares.
|
||||
* rtlanal.c (commutative_operand_precedence): Prefer both REG_POINTER
|
||||
and MEM_POINTER operands over REG and MEM operands.
|
||||
(swap_commutative_operands_p): In case of a tie, sort on REGNO.
|
||||
* tree-ssa-address.c (gen_addr_rtx): Use simplify_gen_binary
|
||||
instead of gen_rtx_PLUS.
|
||||
|
||||
--- gcc/defaults.h.jj 2007-02-20 22:39:12.000000000 +0100
|
||||
+++ gcc/defaults.h 2007-06-26 00:32:16.000000000 +0200
|
||||
@@ -785,6 +785,10 @@ Software Foundation, 51 Franklin Street,
|
||||
#define TARGET_C99_FUNCTIONS 0
|
||||
#endif
|
||||
|
||||
+#ifndef TARGET_INDEX_OPERAND_FIRST
|
||||
+#define TARGET_INDEX_OPERAND_FIRST 0
|
||||
+#endif
|
||||
+
|
||||
/* Indicate that CLZ and CTZ are undefined at zero. */
|
||||
#ifndef CLZ_DEFINED_VALUE_AT_ZERO
|
||||
#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
|
||||
--- gcc/config/rs6000/rs6000.h.jj 2007-02-20 22:39:00.000000000 +0100
|
||||
+++ gcc/config/rs6000/rs6000.h 2007-06-26 00:33:32.000000000 +0200
|
||||
@@ -57,6 +57,8 @@
|
||||
#define PPC405_ERRATUM77 0
|
||||
#endif
|
||||
|
||||
+#define TARGET_INDEX_OPERAND_FIRST (rs6000_cpu == PROCESSOR_POWER6)
|
||||
+
|
||||
/* Common ASM definitions used by ASM_SPEC among the various targets
|
||||
for handling -mcpu=xxx switches. */
|
||||
#define ASM_CPU_SPEC \
|
||||
--- gcc/optabs.c.jj 2007-02-20 22:39:12.000000000 +0100
|
||||
+++ gcc/optabs.c 2007-06-26 00:30:27.000000000 +0200
|
||||
@@ -3673,12 +3673,16 @@ emit_cmp_and_jump_insns (rtx x, rtx y, e
|
||||
/* Swap operands and condition to ensure canonical RTL. */
|
||||
if (swap_commutative_operands_p (x, y))
|
||||
{
|
||||
- /* If we're not emitting a branch, this means some caller
|
||||
- is out of sync. */
|
||||
- gcc_assert (label);
|
||||
+ enum rtx_code swapped_comparison = swap_condition (comparison);
|
||||
+
|
||||
+ /* If we're not emitting a branch, callers are required to pass
|
||||
+ operands in an order conforming to canonical RTL. We relax this
|
||||
+ for commutative comparsions so callers using EQ don't need to do
|
||||
+ swapping by hand. */
|
||||
+ gcc_assert (label || swapped_comparison == comparison);
|
||||
|
||||
op0 = y, op1 = x;
|
||||
- comparison = swap_condition (comparison);
|
||||
+ comparison = swapped_comparison;
|
||||
}
|
||||
|
||||
#ifdef HAVE_cc0
|
||||
--- gcc/rtlanal.c.jj 2007-02-20 22:39:12.000000000 +0100
|
||||
+++ gcc/rtlanal.c 2007-06-26 00:28:56.000000000 +0200
|
||||
@@ -2890,9 +2890,9 @@ commutative_operand_precedence (rtx op)
|
||||
|
||||
/* Constants always come the second operand. Prefer "nice" constants. */
|
||||
if (code == CONST_INT)
|
||||
- return -7;
|
||||
+ return -10;
|
||||
if (code == CONST_DOUBLE)
|
||||
- return -6;
|
||||
+ return -9;
|
||||
op = avoid_constant_pool_reference (op);
|
||||
code = GET_CODE (op);
|
||||
|
||||
@@ -2900,26 +2900,31 @@ commutative_operand_precedence (rtx op)
|
||||
{
|
||||
case RTX_CONST_OBJ:
|
||||
if (code == CONST_INT)
|
||||
- return -5;
|
||||
+ return -8;
|
||||
if (code == CONST_DOUBLE)
|
||||
- return -4;
|
||||
- return -3;
|
||||
+ return -7;
|
||||
+ return -6;
|
||||
|
||||
case RTX_EXTRA:
|
||||
/* SUBREGs of objects should come second. */
|
||||
if (code == SUBREG && OBJECT_P (SUBREG_REG (op)))
|
||||
- return -2;
|
||||
+ return -5;
|
||||
|
||||
if (!CONSTANT_P (op))
|
||||
return 0;
|
||||
else
|
||||
/* As for RTX_CONST_OBJ. */
|
||||
- return -3;
|
||||
+ return -6;
|
||||
|
||||
case RTX_OBJ:
|
||||
/* Complex expressions should be the first, so decrease priority
|
||||
of objects. */
|
||||
- return -1;
|
||||
+ if (!TARGET_INDEX_OPERAND_FIRST)
|
||||
+ return -1;
|
||||
+ if (REG_P (op))
|
||||
+ return (REG_POINTER (op)) ? -1 : -3;
|
||||
+ else
|
||||
+ return (MEM_P (op) && MEM_POINTER (op)) ? -2 : -4;
|
||||
|
||||
case RTX_COMM_ARITH:
|
||||
/* Prefer operands that are themselves commutative to be first.
|
||||
@@ -2949,8 +2954,16 @@ commutative_operand_precedence (rtx op)
|
||||
int
|
||||
swap_commutative_operands_p (rtx x, rtx y)
|
||||
{
|
||||
- return (commutative_operand_precedence (x)
|
||||
- < commutative_operand_precedence (y));
|
||||
+ int result = (commutative_operand_precedence (x)
|
||||
+ - commutative_operand_precedence (y));
|
||||
+ if (!TARGET_INDEX_OPERAND_FIRST || result)
|
||||
+ return result < 0;
|
||||
+
|
||||
+ /* Group together equal REGs to do more simplification. */
|
||||
+ if (REG_P (x) && REG_P (y))
|
||||
+ return REGNO (x) > REGNO (y);
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Return 1 if X is an autoincrement side effect and the register is
|
||||
--- gcc/tree-ssa-address.c.jj 2007-02-20 22:39:12.000000000 +0100
|
||||
+++ gcc/tree-ssa-address.c 2007-06-26 00:29:49.000000000 +0200
|
||||
@@ -124,7 +124,9 @@ gen_addr_rtx (rtx symbol, rtx base, rtx
|
||||
if (base)
|
||||
{
|
||||
if (*addr)
|
||||
- *addr = gen_rtx_PLUS (Pmode, *addr, base);
|
||||
+ *addr = (TARGET_INDEX_OPERAND_FIRST
|
||||
+ ? simplify_gen_binary (PLUS, Pmode, base, *addr)
|
||||
+ : gen_rtx_PLUS (Pmode, *addr, base));
|
||||
else
|
||||
*addr = base;
|
||||
}
|
|
@ -0,0 +1,230 @@
|
|||
2007-09-23 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/28755
|
||||
* expr.c (expand_constructor): New function.
|
||||
(expand_expr_real_1) <case CONSTRUCTOR>: Call it.
|
||||
(expand_expr_real_1) <case ARRAY_REF>: Call it if VALUE is
|
||||
CONSTRUCTOR.
|
||||
|
||||
* gcc.dg/pr28755.c: New test.
|
||||
|
||||
--- gcc/expr.c (revision 128684)
|
||||
+++ gcc/expr.c (revision 128685)
|
||||
@@ -6435,6 +6435,89 @@ expand_expr_addr_expr (tree exp, rtx tar
|
||||
return result;
|
||||
}
|
||||
|
||||
+/* Generate code for computing CONSTRUCTOR EXP.
|
||||
+ An rtx for the computed value is returned. If AVOID_TEMP_MEM
|
||||
+ is TRUE, instead of creating a temporary variable in memory
|
||||
+ NULL is returned and the caller needs to handle it differently. */
|
||||
+
|
||||
+static rtx
|
||||
+expand_constructor (tree exp, rtx target, enum expand_modifier modifier,
|
||||
+ bool avoid_temp_mem)
|
||||
+{
|
||||
+ tree type = TREE_TYPE (exp);
|
||||
+ enum machine_mode mode = TYPE_MODE (type);
|
||||
+
|
||||
+ /* Try to avoid creating a temporary at all. This is possible
|
||||
+ if all of the initializer is zero.
|
||||
+ FIXME: try to handle all [0..255] initializers we can handle
|
||||
+ with memset. */
|
||||
+ if (TREE_STATIC (exp)
|
||||
+ && !TREE_ADDRESSABLE (exp)
|
||||
+ && target != 0 && mode == BLKmode
|
||||
+ && all_zeros_p (exp))
|
||||
+ {
|
||||
+ clear_storage (target, expr_size (exp), BLOCK_OP_NORMAL);
|
||||
+ return target;
|
||||
+ }
|
||||
+
|
||||
+ /* All elts simple constants => refer to a constant in memory. But
|
||||
+ if this is a non-BLKmode mode, let it store a field at a time
|
||||
+ since that should make a CONST_INT or CONST_DOUBLE when we
|
||||
+ fold. Likewise, if we have a target we can use, it is best to
|
||||
+ store directly into the target unless the type is large enough
|
||||
+ that memcpy will be used. If we are making an initializer and
|
||||
+ all operands are constant, put it in memory as well.
|
||||
+
|
||||
+ FIXME: Avoid trying to fill vector constructors piece-meal.
|
||||
+ Output them with output_constant_def below unless we're sure
|
||||
+ they're zeros. This should go away when vector initializers
|
||||
+ are treated like VECTOR_CST instead of arrays. */
|
||||
+ if ((TREE_STATIC (exp)
|
||||
+ && ((mode == BLKmode
|
||||
+ && ! (target != 0 && safe_from_p (target, exp, 1)))
|
||||
+ || TREE_ADDRESSABLE (exp)
|
||||
+ || (host_integerp (TYPE_SIZE_UNIT (type), 1)
|
||||
+ && (! MOVE_BY_PIECES_P
|
||||
+ (tree_low_cst (TYPE_SIZE_UNIT (type), 1),
|
||||
+ TYPE_ALIGN (type)))
|
||||
+ && ! mostly_zeros_p (exp))))
|
||||
+ || ((modifier == EXPAND_INITIALIZER || modifier == EXPAND_CONST_ADDRESS)
|
||||
+ && TREE_CONSTANT (exp)))
|
||||
+ {
|
||||
+ rtx constructor;
|
||||
+
|
||||
+ if (avoid_temp_mem)
|
||||
+ return NULL_RTX;
|
||||
+
|
||||
+ constructor = output_constant_def (exp, 1);
|
||||
+
|
||||
+ if (modifier != EXPAND_CONST_ADDRESS
|
||||
+ && modifier != EXPAND_INITIALIZER
|
||||
+ && modifier != EXPAND_SUM)
|
||||
+ constructor = validize_mem (constructor);
|
||||
+
|
||||
+ return constructor;
|
||||
+ }
|
||||
+
|
||||
+ /* Handle calls that pass values in multiple non-contiguous
|
||||
+ locations. The Irix 6 ABI has examples of this. */
|
||||
+ if (target == 0 || ! safe_from_p (target, exp, 1)
|
||||
+ || GET_CODE (target) == PARALLEL || modifier == EXPAND_STACK_PARM)
|
||||
+ {
|
||||
+ if (avoid_temp_mem)
|
||||
+ return NULL_RTX;
|
||||
+
|
||||
+ target
|
||||
+ = assign_temp (build_qualified_type (type, (TYPE_QUALS (type)
|
||||
+ | (TREE_READONLY (exp)
|
||||
+ * TYPE_QUAL_CONST))),
|
||||
+ 0, TREE_ADDRESSABLE (exp), 1);
|
||||
+ }
|
||||
+
|
||||
+ store_constructor (exp, target, 0, int_expr_size (exp));
|
||||
+ return target;
|
||||
+}
|
||||
+
|
||||
|
||||
/* expand_expr: generate code for computing expression EXP.
|
||||
An rtx for the computed value is returned. The value is never null.
|
||||
@@ -6899,71 +6982,7 @@ expand_expr_real_1 (tree exp, rtx target
|
||||
return const0_rtx;
|
||||
}
|
||||
|
||||
- /* Try to avoid creating a temporary at all. This is possible
|
||||
- if all of the initializer is zero.
|
||||
- FIXME: try to handle all [0..255] initializers we can handle
|
||||
- with memset. */
|
||||
- else if (TREE_STATIC (exp)
|
||||
- && !TREE_ADDRESSABLE (exp)
|
||||
- && target != 0 && mode == BLKmode
|
||||
- && all_zeros_p (exp))
|
||||
- {
|
||||
- clear_storage (target, expr_size (exp), BLOCK_OP_NORMAL);
|
||||
- return target;
|
||||
- }
|
||||
-
|
||||
- /* All elts simple constants => refer to a constant in memory. But
|
||||
- if this is a non-BLKmode mode, let it store a field at a time
|
||||
- since that should make a CONST_INT or CONST_DOUBLE when we
|
||||
- fold. Likewise, if we have a target we can use, it is best to
|
||||
- store directly into the target unless the type is large enough
|
||||
- that memcpy will be used. If we are making an initializer and
|
||||
- all operands are constant, put it in memory as well.
|
||||
-
|
||||
- FIXME: Avoid trying to fill vector constructors piece-meal.
|
||||
- Output them with output_constant_def below unless we're sure
|
||||
- they're zeros. This should go away when vector initializers
|
||||
- are treated like VECTOR_CST instead of arrays.
|
||||
- */
|
||||
- else if ((TREE_STATIC (exp)
|
||||
- && ((mode == BLKmode
|
||||
- && ! (target != 0 && safe_from_p (target, exp, 1)))
|
||||
- || TREE_ADDRESSABLE (exp)
|
||||
- || (host_integerp (TYPE_SIZE_UNIT (type), 1)
|
||||
- && (! MOVE_BY_PIECES_P
|
||||
- (tree_low_cst (TYPE_SIZE_UNIT (type), 1),
|
||||
- TYPE_ALIGN (type)))
|
||||
- && ! mostly_zeros_p (exp))))
|
||||
- || ((modifier == EXPAND_INITIALIZER
|
||||
- || modifier == EXPAND_CONST_ADDRESS)
|
||||
- && TREE_CONSTANT (exp)))
|
||||
- {
|
||||
- rtx constructor = output_constant_def (exp, 1);
|
||||
-
|
||||
- if (modifier != EXPAND_CONST_ADDRESS
|
||||
- && modifier != EXPAND_INITIALIZER
|
||||
- && modifier != EXPAND_SUM)
|
||||
- constructor = validize_mem (constructor);
|
||||
-
|
||||
- return constructor;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- /* Handle calls that pass values in multiple non-contiguous
|
||||
- locations. The Irix 6 ABI has examples of this. */
|
||||
- if (target == 0 || ! safe_from_p (target, exp, 1)
|
||||
- || GET_CODE (target) == PARALLEL
|
||||
- || modifier == EXPAND_STACK_PARM)
|
||||
- target
|
||||
- = assign_temp (build_qualified_type (type,
|
||||
- (TYPE_QUALS (type)
|
||||
- | (TREE_READONLY (exp)
|
||||
- * TYPE_QUAL_CONST))),
|
||||
- 0, TREE_ADDRESSABLE (exp), 1);
|
||||
-
|
||||
- store_constructor (exp, target, 0, int_expr_size (exp));
|
||||
- return target;
|
||||
- }
|
||||
+ return expand_constructor (exp, target, modifier, false);
|
||||
|
||||
case MISALIGNED_INDIRECT_REF:
|
||||
case ALIGN_INDIRECT_REF:
|
||||
@@ -7105,10 +7124,25 @@ expand_expr_real_1 (tree exp, rtx target
|
||||
field, value)
|
||||
if (tree_int_cst_equal (field, index))
|
||||
{
|
||||
- if (!TREE_SIDE_EFFECTS (value))
|
||||
- return expand_expr (fold (value), target, tmode,
|
||||
- modifier);
|
||||
- break;
|
||||
+ if (TREE_SIDE_EFFECTS (value))
|
||||
+ break;
|
||||
+
|
||||
+ if (TREE_CODE (value) == CONSTRUCTOR)
|
||||
+ {
|
||||
+ /* If VALUE is a CONSTRUCTOR, this
|
||||
+ optimization is only useful if
|
||||
+ this doesn't store the CONSTRUCTOR
|
||||
+ into memory. If it does, it is more
|
||||
+ efficient to just load the data from
|
||||
+ the array directly. */
|
||||
+ rtx ret = expand_constructor (value, target,
|
||||
+ modifier, true);
|
||||
+ if (ret == NULL_RTX)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return expand_expr (fold (value), target, tmode,
|
||||
+ modifier);
|
||||
}
|
||||
}
|
||||
else if(TREE_CODE (init) == STRING_CST)
|
||||
--- gcc/testsuite/gcc.dg/pr28755.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/pr28755.c (revision 128685)
|
||||
@@ -0,0 +1,22 @@
|
||||
+/* PR middle-end/28755 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-Os" } */
|
||||
+/* { dg-final { scan-assembler-times "2112543726\|7deadbee" 2 } } */
|
||||
+
|
||||
+struct S
|
||||
+{
|
||||
+ void *s1;
|
||||
+ unsigned s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14;
|
||||
+};
|
||||
+
|
||||
+const struct S array[] = {
|
||||
+ { (void *) 0, 60, 640, 2112543726, 39682, 48, 16, 33, 10, 96, 2, 0, 0, 4 },
|
||||
+ { (void *) 0, 60, 2112543726, 192, 18251, 16, 33, 10, 96, 2, 0, 0, 4, 212 }
|
||||
+};
|
||||
+
|
||||
+void
|
||||
+foo (struct S *x)
|
||||
+{
|
||||
+ x[0] = array[0];
|
||||
+ x[5] = array[1];
|
||||
+}
|
|
@ -0,0 +1,50 @@
|
|||
2007-11-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/29225
|
||||
* call.c (build_new_op): Call resolve_args before calling
|
||||
build_over_call.
|
||||
|
||||
* g++.dg/template/crash72.C: New test.
|
||||
|
||||
--- gcc/cp/call.c (revision 130125)
|
||||
+++ gcc/cp/call.c (revision 130126)
|
||||
@@ -3918,7 +3918,10 @@ build_new_op (enum tree_code code, int f
|
||||
if (overloaded_p)
|
||||
*overloaded_p = true;
|
||||
|
||||
- result = build_over_call (cand, LOOKUP_NORMAL);
|
||||
+ if (resolve_args (arglist) == error_mark_node)
|
||||
+ result = error_mark_node;
|
||||
+ else
|
||||
+ result = build_over_call (cand, LOOKUP_NORMAL);
|
||||
}
|
||||
else
|
||||
{
|
||||
--- gcc/testsuite/g++.dg/template/crash72.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/crash72.C (revision 130126)
|
||||
@@ -0,0 +1,25 @@
|
||||
+// PR c++/29225
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+template <typename L, typename R> bool operator< (L x, R y);
|
||||
+struct T { int t (); };
|
||||
+class S {};
|
||||
+
|
||||
+struct U
|
||||
+{
|
||||
+ typedef int (T::* M) ();
|
||||
+ M m;
|
||||
+
|
||||
+ bool operator() (S &x)
|
||||
+ {
|
||||
+ T a;
|
||||
+ return (a.*m) < x; // { dg-error "invalid use of non-static member" }
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+void foo (S &x)
|
||||
+{
|
||||
+ U m;
|
||||
+ m.m = &T::t;
|
||||
+ m (x);
|
||||
+}
|
|
@ -0,0 +1,55 @@
|
|||
2007-01-15 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/29712
|
||||
* resolve.c (resolve_function): Only a reference to the final
|
||||
dimension of an assumed size array is an error in an inquiry
|
||||
function.
|
||||
|
||||
* gfortran.dg/bound_2.f90: Reinstate commented out line.
|
||||
* gfortran.dg/initialization_1.f90: Change warning.
|
||||
|
||||
--- gcc/fortran/resolve.c (revision 120789)
|
||||
+++ gcc/fortran/resolve.c (revision 120790)
|
||||
@@ -1498,10 +1498,16 @@ resolve_function (gfc_expr * expr)
|
||||
|
||||
for (arg = expr->value.function.actual; arg; arg = arg->next)
|
||||
{
|
||||
- if (inquiry && arg->next != NULL && arg->next->expr
|
||||
- && arg->next->expr->expr_type != EXPR_CONSTANT)
|
||||
- break;
|
||||
-
|
||||
+ if (inquiry && arg->next != NULL && arg->next->expr)
|
||||
+ {
|
||||
+ if (arg->next->expr->expr_type != EXPR_CONSTANT)
|
||||
+ break;
|
||||
+
|
||||
+ if ((int)mpz_get_si (arg->next->expr->value.integer)
|
||||
+ < arg->expr->rank)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
if (arg->expr != NULL
|
||||
&& arg->expr->rank > 0
|
||||
&& resolve_assumed_size_actual (arg->expr))
|
||||
--- gcc/testsuite/gfortran.dg/initialization_1.f90 (revision 120789)
|
||||
+++ gcc/testsuite/gfortran.dg/initialization_1.f90 (revision 120790)
|
||||
@@ -27,7 +27,7 @@ contains
|
||||
integer :: l1 = len (ch1) ! { dg-warning "assumed character length variable" }
|
||||
|
||||
! These are warnings because they are gfortran extensions.
|
||||
- integer :: m3 = size (x, 1) ! { dg-warning "upper bound in the last dimension" }
|
||||
+ integer :: m3 = size (x, 1) ! { dg-warning "Evaluation of nonstandard initialization" }
|
||||
integer :: m4(2) = shape (z) ! { dg-warning "Evaluation of nonstandard initialization" }
|
||||
|
||||
! This does not depend on non-constant properties.
|
||||
--- gcc/testsuite/gfortran.dg/bound_2.f90 (revision 120789)
|
||||
+++ gcc/testsuite/gfortran.dg/bound_2.f90 (revision 120790)
|
||||
@@ -194,7 +194,7 @@ contains
|
||||
subroutine foo (x,n)
|
||||
integer :: x(7,n,2,*), n
|
||||
|
||||
- !if (ubound(x,1) /= 7 .or. ubound(x,2) /= 4 .or. ubound(x,3) /= 2) call abort
|
||||
+ if (ubound(x,1) /= 7 .or. ubound(x,2) /= 4 .or. ubound(x,3) /= 2) call abort
|
||||
end subroutine foo
|
||||
|
||||
subroutine jackal (b, c)
|
|
@ -0,0 +1,64 @@
|
|||
2007-12-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/29978
|
||||
* config/i386/i386.c (ix86_expand_branch): Optimize LE/LEU/GT/GTU
|
||||
DImode comparisons against constant with all 1's in the lower word.
|
||||
|
||||
* gcc.target/i386/pr29978.c: New test.
|
||||
|
||||
--- gcc/config/i386/i386.c (revision 130937)
|
||||
+++ gcc/config/i386/i386.c (revision 130938)
|
||||
@@ -10496,16 +10496,28 @@ ix86_expand_branch (enum rtx_code code,
|
||||
|
||||
/* Otherwise, if we are doing less-than or greater-or-equal-than,
|
||||
op1 is a constant and the low word is zero, then we can just
|
||||
- examine the high word. */
|
||||
+ examine the high word. Similarly for low word -1 and
|
||||
+ less-or-equal-than or greater-than. */
|
||||
|
||||
- if (GET_CODE (hi[1]) == CONST_INT && lo[1] == const0_rtx)
|
||||
+ if (GET_CODE (hi[1]) == CONST_INT)
|
||||
switch (code)
|
||||
{
|
||||
case LT: case LTU: case GE: case GEU:
|
||||
- ix86_compare_op0 = hi[0];
|
||||
- ix86_compare_op1 = hi[1];
|
||||
- ix86_expand_branch (code, label);
|
||||
- return;
|
||||
+ if (lo[1] == const0_rtx)
|
||||
+ {
|
||||
+ ix86_compare_op0 = hi[0];
|
||||
+ ix86_compare_op1 = hi[1];
|
||||
+ ix86_expand_branch (code, label);
|
||||
+ return;
|
||||
+ }
|
||||
+ case LE: case LEU: case GT: case GTU:
|
||||
+ if (lo[1] == constm1_rtx)
|
||||
+ {
|
||||
+ ix86_compare_op0 = hi[0];
|
||||
+ ix86_compare_op1 = hi[1];
|
||||
+ ix86_expand_branch (code, label);
|
||||
+ return;
|
||||
+ }
|
||||
default:
|
||||
break;
|
||||
}
|
||||
--- gcc/testsuite/gcc.target/i386/pr29978.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.target/i386/pr29978.c (revision 130938)
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* PR target/29978 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-Os" } */
|
||||
+
|
||||
+void g ();
|
||||
+
|
||||
+void
|
||||
+f (long long v)
|
||||
+{
|
||||
+ if (v > 0xfffffffffLL)
|
||||
+ g ();
|
||||
+ g ();
|
||||
+}
|
||||
+
|
||||
+/* Verify there are no redundant jumps jl .L2; jle .L2 */
|
||||
+/* { dg-final { scan-assembler-not "jl\[^e\]*\\.L" { target ilp32 } } } */
|
|
@ -0,0 +1,180 @@
|
|||
2007-11-23 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/30293
|
||||
PR c++/30294
|
||||
* decl.c (cp_finish_decl): Disallow variable or field
|
||||
definitions if extern "Java" aggregates.
|
||||
(grokparms): Disallow parameters with extern "Java"
|
||||
aggregates.
|
||||
(check_function_type): Disallow function return values
|
||||
with extern "Java" aggregates.
|
||||
* init.c (build_new_1): Disallow placement new with
|
||||
extern "Java" aggregates.
|
||||
|
||||
* g++.dg/ext/java-2.C: New test.
|
||||
|
||||
--- gcc/cp/decl.c.jj 2007-11-19 17:46:41.000000000 +0100
|
||||
+++ gcc/cp/decl.c 2007-11-22 13:34:52.000000000 +0100
|
||||
@@ -5349,6 +5349,20 @@ cp_finish_decl (tree decl, tree init, bo
|
||||
is *not* defined. */
|
||||
&& (!DECL_EXTERNAL (decl) || init))
|
||||
{
|
||||
+ if (TYPE_FOR_JAVA (type) && IS_AGGR_TYPE (type))
|
||||
+ {
|
||||
+ tree jclass
|
||||
+ = IDENTIFIER_GLOBAL_VALUE (get_identifier ("jclass"));
|
||||
+ /* Allow libjava/prims.cc define primitive classes. */
|
||||
+ if (init != NULL_TREE
|
||||
+ || jclass == NULL_TREE
|
||||
+ || TREE_CODE (jclass) != TYPE_DECL
|
||||
+ || !POINTER_TYPE_P (TREE_TYPE (jclass))
|
||||
+ || !same_type_ignoring_top_level_qualifiers_p
|
||||
+ (type, TREE_TYPE (TREE_TYPE (jclass))))
|
||||
+ error ("Java object %qD not allocated with %<new%>", decl);
|
||||
+ init = NULL_TREE;
|
||||
+ }
|
||||
if (init)
|
||||
{
|
||||
DECL_NONTRIVIALLY_INITIALIZED_P (decl) = 1;
|
||||
@@ -5419,6 +5433,9 @@ cp_finish_decl (tree decl, tree init, bo
|
||||
else if (TREE_CODE (type) == ARRAY_TYPE)
|
||||
layout_type (type);
|
||||
}
|
||||
+ else if (TREE_CODE (decl) == FIELD_DECL
|
||||
+ && TYPE_FOR_JAVA (type) && IS_AGGR_TYPE (type))
|
||||
+ error ("non-static data member %qD has Java class type", decl);
|
||||
|
||||
/* Add this declaration to the statement-tree. This needs to happen
|
||||
after the call to check_initializer so that the DECL_EXPR for a
|
||||
@@ -8993,6 +9010,16 @@ grokparms (cp_parameter_declarator *firs
|
||||
TREE_TYPE (decl) = error_mark_node;
|
||||
}
|
||||
|
||||
+ if (type != error_mark_node
|
||||
+ && TYPE_FOR_JAVA (type)
|
||||
+ && IS_AGGR_TYPE (type))
|
||||
+ {
|
||||
+ error ("parameter %qD has Java class type", decl);
|
||||
+ type = error_mark_node;
|
||||
+ TREE_TYPE (decl) = error_mark_node;
|
||||
+ init = NULL_TREE;
|
||||
+ }
|
||||
+
|
||||
if (type != error_mark_node)
|
||||
{
|
||||
/* Top-level qualifiers on the parameters are
|
||||
@@ -10465,11 +10492,15 @@ check_function_type (tree decl, tree cur
|
||||
|
||||
if (dependent_type_p (return_type))
|
||||
return;
|
||||
- if (!COMPLETE_OR_VOID_TYPE_P (return_type))
|
||||
+ if (!COMPLETE_OR_VOID_TYPE_P (return_type)
|
||||
+ || (TYPE_FOR_JAVA (return_type) && IS_AGGR_TYPE (return_type)))
|
||||
{
|
||||
tree args = TYPE_ARG_TYPES (fntype);
|
||||
-
|
||||
- error ("return type %q#T is incomplete", return_type);
|
||||
+
|
||||
+ if (!COMPLETE_OR_VOID_TYPE_P (return_type))
|
||||
+ error ("return type %q#T is incomplete", return_type);
|
||||
+ else
|
||||
+ error ("return type has Java class type %q#T", return_type);
|
||||
|
||||
/* Make it return void instead. */
|
||||
if (TREE_CODE (fntype) == METHOD_TYPE)
|
||||
--- gcc/cp/init.c.jj 2007-09-20 21:26:48.000000000 +0200
|
||||
+++ gcc/cp/init.c 2007-11-22 10:49:47.000000000 +0100
|
||||
@@ -1786,6 +1786,11 @@ build_new_1 (tree placement, tree type,
|
||||
(alloc_fn,
|
||||
build_tree_list (NULL_TREE, class_addr)));
|
||||
}
|
||||
+ else if (TYPE_FOR_JAVA (elt_type))
|
||||
+ {
|
||||
+ error ("Java class %q#T object allocated using placement new", elt_type);
|
||||
+ return error_mark_node;
|
||||
+ }
|
||||
else
|
||||
{
|
||||
tree fnname;
|
||||
--- gcc/testsuite/g++.dg/ext/java-2.C.jj 2007-11-22 10:55:10.000000000 +0100
|
||||
+++ gcc/testsuite/g++.dg/ext/java-2.C 2007-11-22 10:54:59.000000000 +0100
|
||||
@@ -0,0 +1,79 @@
|
||||
+// PR c++/30293
|
||||
+// PR c++/30294
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "" }
|
||||
+
|
||||
+extern "Java" {
|
||||
+typedef __java_byte jbyte;
|
||||
+namespace java {
|
||||
+namespace lang {
|
||||
+ class Object {};
|
||||
+ class Class {};
|
||||
+}
|
||||
+}
|
||||
+typedef struct java::lang::Object* jobject;
|
||||
+typedef java::lang::Class *jclass;
|
||||
+}
|
||||
+extern "C" jobject _Jv_AllocObject (jclass);
|
||||
+
|
||||
+extern "Java" {
|
||||
+ struct A { static java::lang::Class class$; };
|
||||
+}
|
||||
+
|
||||
+struct B {
|
||||
+ A a; // { dg-error "has Java class type" }
|
||||
+};
|
||||
+
|
||||
+void* operator new (__SIZE_TYPE__, void*) throw();
|
||||
+char buf[1024];
|
||||
+
|
||||
+A a; // { dg-error "not allocated with" }
|
||||
+A b = A (); // { dg-error "not allocated with" }
|
||||
+A *c = new ((void *) buf) A (); // { dg-error "using placement new" }
|
||||
+A *d = new A ();
|
||||
+jbyte e = 6;
|
||||
+
|
||||
+const A fn1 () // { dg-error "return type has Java class type" }
|
||||
+{
|
||||
+ A a; // { dg-error "not allocated with" }
|
||||
+ return a;
|
||||
+}
|
||||
+
|
||||
+A fn2 () // { dg-error "return type has Java class type" }
|
||||
+{
|
||||
+ A a; // { dg-error "not allocated with" }
|
||||
+ return a;
|
||||
+}
|
||||
+
|
||||
+A *fn3 ()
|
||||
+{
|
||||
+ return new A ();
|
||||
+}
|
||||
+
|
||||
+A &fn4 ()
|
||||
+{
|
||||
+ return *c;
|
||||
+}
|
||||
+
|
||||
+jbyte fn5 ()
|
||||
+{
|
||||
+ return 7;
|
||||
+}
|
||||
+
|
||||
+void fn6 (A x) // { dg-error "has Java class type" }
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+void fn7 (const A x) // { dg-error "has Java class type" }
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+void fn8 (A *x)
|
||||
+{
|
||||
+ (void) x;
|
||||
+}
|
||||
+
|
||||
+void fn9 (jbyte x)
|
||||
+{
|
||||
+ (void) x;
|
||||
+}
|
|
@ -0,0 +1,103 @@
|
|||
2007-11-18 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/30988
|
||||
* semantics.c (finish_call_expr): Set
|
||||
current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
|
||||
or OVERLOAD with all noreturn functions.
|
||||
|
||||
* g++.dg/warn/noreturn-4.C: New test.
|
||||
* g++.dg/warn/noreturn-5.C: New test.
|
||||
* g++.dg/warn/noreturn-6.C: New test.
|
||||
* g++.dg/warn/noreturn-7.C: New test.
|
||||
|
||||
--- gcc/cp/semantics.c (revision 130279)
|
||||
+++ gcc/cp/semantics.c (revision 130280)
|
||||
@@ -1846,6 +1846,20 @@ finish_call_expr (tree fn, tree args, bo
|
||||
{
|
||||
result = build_nt_call_list (fn, args);
|
||||
KOENIG_LOOKUP_P (result) = koenig_p;
|
||||
+ if (cfun)
|
||||
+ {
|
||||
+ do
|
||||
+ {
|
||||
+ tree fndecl = OVL_CURRENT (fn);
|
||||
+ if (TREE_CODE (fndecl) != FUNCTION_DECL
|
||||
+ || !TREE_THIS_VOLATILE (fndecl))
|
||||
+ break;
|
||||
+ fn = OVL_NEXT (fn);
|
||||
+ }
|
||||
+ while (fn);
|
||||
+ if (!fn)
|
||||
+ current_function_returns_abnormally = 1;
|
||||
+ }
|
||||
return result;
|
||||
}
|
||||
if (!BASELINK_P (fn)
|
||||
--- gcc/testsuite/g++.dg/warn/noreturn-4.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/warn/noreturn-4.C (revision 130280)
|
||||
@@ -0,0 +1,13 @@
|
||||
+// PR c++/30988
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-O2 -Wall" }
|
||||
+
|
||||
+void f (const char *) __attribute__ ((noreturn));
|
||||
+
|
||||
+template <typename T> struct A
|
||||
+{
|
||||
+ int g ()
|
||||
+ {
|
||||
+ f (__FUNCTION__);
|
||||
+ }
|
||||
+};
|
||||
--- gcc/testsuite/g++.dg/warn/noreturn-5.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/warn/noreturn-5.C (revision 130280)
|
||||
@@ -0,0 +1,15 @@
|
||||
+// PR c++/30988
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-O2 -Wall" }
|
||||
+
|
||||
+void f (const char *) __attribute__ ((noreturn));
|
||||
+void f (int) __attribute__ ((noreturn));
|
||||
+void f (double) __attribute__ ((noreturn));
|
||||
+
|
||||
+template <typename T> struct A
|
||||
+{
|
||||
+ int g ()
|
||||
+ {
|
||||
+ f ((T) 0);
|
||||
+ }
|
||||
+};
|
||||
--- gcc/testsuite/g++.dg/warn/noreturn-6.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/warn/noreturn-6.C (revision 130280)
|
||||
@@ -0,0 +1,13 @@
|
||||
+// PR c++/30988
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-O2 -Wall" }
|
||||
+
|
||||
+void f (const char *);
|
||||
+
|
||||
+template <typename T> struct A
|
||||
+{
|
||||
+ int g ()
|
||||
+ {
|
||||
+ f (__FUNCTION__);
|
||||
+ } // { dg-warning "no return statement in function returning non-void" }
|
||||
+};
|
||||
--- gcc/testsuite/g++.dg/warn/noreturn-7.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/warn/noreturn-7.C (revision 130280)
|
||||
@@ -0,0 +1,15 @@
|
||||
+// PR c++/30988
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-O2 -Wall" }
|
||||
+
|
||||
+void f (const char *) __attribute__ ((noreturn));
|
||||
+void f (int);
|
||||
+void f (double) __attribute__ ((noreturn));
|
||||
+
|
||||
+template <typename T> struct A
|
||||
+{
|
||||
+ int g ()
|
||||
+ {
|
||||
+ f ((T) 0);
|
||||
+ } // { dg-warning "no return statement in function returning non-void" }
|
||||
+};
|
|
@ -0,0 +1,74 @@
|
|||
2007-04-05 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/31483
|
||||
* trans-expr.c (gfc_conv_function_call): Give a dummy
|
||||
procedure the correct type if it has alternate returns.
|
||||
|
||||
* gfortran.dg/altreturn_5.f90: New test.
|
||||
|
||||
--- gcc/fortran/trans-expr.c (revision 123517)
|
||||
+++ gcc/fortran/trans-expr.c (revision 123518)
|
||||
@@ -2154,17 +2154,23 @@ gfc_conv_function_call (gfc_se * se, gfc
|
||||
|
||||
/* Generate the actual call. */
|
||||
gfc_conv_function_val (se, sym);
|
||||
+
|
||||
/* If there are alternate return labels, function type should be
|
||||
integer. Can't modify the type in place though, since it can be shared
|
||||
- with other functions. */
|
||||
+ with other functions. For dummy arguments, the typing is done to
|
||||
+ this result, even if it has to be repeated for each call. */
|
||||
if (has_alternate_specifier
|
||||
&& TREE_TYPE (TREE_TYPE (TREE_TYPE (se->expr))) != integer_type_node)
|
||||
{
|
||||
- gcc_assert (! sym->attr.dummy);
|
||||
- TREE_TYPE (sym->backend_decl)
|
||||
- = build_function_type (integer_type_node,
|
||||
- TYPE_ARG_TYPES (TREE_TYPE (sym->backend_decl)));
|
||||
- se->expr = gfc_build_addr_expr (NULL, sym->backend_decl);
|
||||
+ if (!sym->attr.dummy)
|
||||
+ {
|
||||
+ TREE_TYPE (sym->backend_decl)
|
||||
+ = build_function_type (integer_type_node,
|
||||
+ TYPE_ARG_TYPES (TREE_TYPE (sym->backend_decl)));
|
||||
+ se->expr = gfc_build_addr_expr (NULL, sym->backend_decl);
|
||||
+ }
|
||||
+ else
|
||||
+ TREE_TYPE (TREE_TYPE (TREE_TYPE (se->expr))) = integer_type_node;
|
||||
}
|
||||
|
||||
fntype = TREE_TYPE (TREE_TYPE (se->expr));
|
||||
--- gcc/testsuite/gfortran.dg/altreturn_5.f90 (revision 0)
|
||||
+++ gcc/testsuite/gfortran.dg/altreturn_5.f90 (revision 123518)
|
||||
@@ -0,0 +1,31 @@
|
||||
+! { dg-do run }
|
||||
+! Tests the fix for PR31483, in which dummy argument procedures
|
||||
+! produced an ICE if they had an alternate return.
|
||||
+!
|
||||
+! Contributed by Mathias Fröhlich <M.Froehlich@science-computing.de>
|
||||
+
|
||||
+ SUBROUTINE R (i, *, *)
|
||||
+ INTEGER i
|
||||
+ RETURN i
|
||||
+ END
|
||||
+
|
||||
+ SUBROUTINE PHLOAD (READER, i, res)
|
||||
+ IMPLICIT NONE
|
||||
+ EXTERNAL READER
|
||||
+ integer i
|
||||
+ character(3) res
|
||||
+ CALL READER (i, *1, *2)
|
||||
+ 1 res = "one"
|
||||
+ return
|
||||
+ 2 res = "two"
|
||||
+ return
|
||||
+ END
|
||||
+
|
||||
+ EXTERNAL R
|
||||
+ character(3) res
|
||||
+ call PHLOAD (R, 1, res)
|
||||
+ if (res .ne. "one") call abort ()
|
||||
+ CALL PHLOAD (R, 2, res)
|
||||
+ if (res .ne. "two") call abort ()
|
||||
+ END
|
||||
+
|
|
@ -0,0 +1,132 @@
|
|||
2007-10-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/32121
|
||||
* parser.c (cp_parser_compound_statement): Handle label-declarations
|
||||
at the beginning of the compound statement.
|
||||
(cp_parser_block_declaration): Issue diagnostics about __label__
|
||||
not at the beginning of a block.
|
||||
|
||||
* g++.dg/ext/label4.C: Adjust error regexp.
|
||||
* g++.dg/ext/label7.C: New test.
|
||||
* g++.dg/ext/label8.C: New test.
|
||||
* g++.dg/ext/label9.C: New test.
|
||||
|
||||
--- gcc/cp/parser.c (revision 129252)
|
||||
+++ gcc/cp/parser.c (revision 129253)
|
||||
@@ -6821,6 +6821,15 @@ cp_parser_expression_statement (cp_parse
|
||||
compound-statement:
|
||||
{ statement-seq [opt] }
|
||||
|
||||
+ GNU extension:
|
||||
+
|
||||
+ compound-statement:
|
||||
+ { label-declaration-seq [opt] statement-seq [opt] }
|
||||
+
|
||||
+ label-declaration-seq:
|
||||
+ label-declaration
|
||||
+ label-declaration-seq label-declaration
|
||||
+
|
||||
Returns a tree representing the statement. */
|
||||
|
||||
static tree
|
||||
@@ -6834,6 +6843,9 @@ cp_parser_compound_statement (cp_parser
|
||||
return error_mark_node;
|
||||
/* Begin the compound-statement. */
|
||||
compound_stmt = begin_compound_stmt (in_try ? BCS_TRY_BLOCK : 0);
|
||||
+ /* If the next keyword is `__label__' we have a label declaration. */
|
||||
+ while (cp_lexer_next_token_is_keyword (parser->lexer, RID_LABEL))
|
||||
+ cp_parser_label_declaration (parser);
|
||||
/* Parse an (optional) statement-seq. */
|
||||
cp_parser_statement_seq_opt (parser, in_statement_expr);
|
||||
/* Finish the compound-statement. */
|
||||
@@ -7711,7 +7723,6 @@ cp_parser_declaration (cp_parser* parser
|
||||
|
||||
block-declaration:
|
||||
__extension__ block-declaration
|
||||
- label-declaration
|
||||
|
||||
C++0x Extension:
|
||||
|
||||
@@ -7772,12 +7783,16 @@ cp_parser_block_declaration (cp_parser *
|
||||
cp_parser_using_declaration (parser,
|
||||
/*access_declaration_p=*/false);
|
||||
}
|
||||
- /* If the next keyword is `__label__' we have a label declaration. */
|
||||
+ /* If the next keyword is `__label__' we have a misplaced label
|
||||
+ declaration. */
|
||||
else if (token1->keyword == RID_LABEL)
|
||||
{
|
||||
- if (statement_p)
|
||||
- cp_parser_commit_to_tentative_parse (parser);
|
||||
- cp_parser_label_declaration (parser);
|
||||
+ cp_lexer_consume_token (parser->lexer);
|
||||
+ error ("%<__label__%> not at the beginning of a block");
|
||||
+ cp_parser_skip_to_end_of_statement (parser);
|
||||
+ /* If the next token is now a `;', consume it. */
|
||||
+ if (cp_lexer_next_token_is (parser->lexer, CPP_SEMICOLON))
|
||||
+ cp_lexer_consume_token (parser->lexer);
|
||||
}
|
||||
/* If the next token is `static_assert' we have a static assertion. */
|
||||
else if (token1->keyword == RID_STATIC_ASSERT)
|
||||
|
||||
--- gcc/testsuite/g++.dg/ext/label9.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/ext/label9.C (revision 129253)
|
||||
@@ -0,0 +1,10 @@
|
||||
+// PR c++/32121
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+int f (void)
|
||||
+{
|
||||
+ while (1)
|
||||
+ __label__ a; // { dg-error "not at the beginning" }
|
||||
+ for (;;)
|
||||
+ __label__ b; // { dg-error "not at the beginning" }
|
||||
+}
|
||||
--- gcc/testsuite/g++.dg/ext/label4.C (revision 129252)
|
||||
+++ gcc/testsuite/g++.dg/ext/label4.C (revision 129253)
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// { dg-do compile }
|
||||
|
||||
-__label__ *l; // { dg-error "before" }
|
||||
+__label__ *l; // { dg-error "not at the beginning of" }
|
||||
--- gcc/testsuite/g++.dg/ext/label7.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/ext/label7.C (revision 129253)
|
||||
@@ -0,0 +1,12 @@
|
||||
+// PR c++/32121
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+int f (void)
|
||||
+{
|
||||
+ a:;
|
||||
+ __label__ a; // { dg-error "not at the beginning" }
|
||||
+ int b;
|
||||
+ __label__ c; // { dg-error "not at the beginning" }
|
||||
+ a:; // { dg-error "duplicate label" }
|
||||
+ c:;
|
||||
+}
|
||||
--- gcc/testsuite/g++.dg/ext/label8.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/ext/label8.C (revision 129253)
|
||||
@@ -0,0 +1,22 @@
|
||||
+// PR c++/32121
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+int f (void)
|
||||
+{
|
||||
+ __label__ a, b;
|
||||
+ __label__ c;
|
||||
+ a:;
|
||||
+ b:;
|
||||
+ c:;
|
||||
+ {
|
||||
+ __label__ d;
|
||||
+ d:;
|
||||
+ if (0)
|
||||
+ {
|
||||
+ __label__ e;
|
||||
+ __label__ f;
|
||||
+ f:;
|
||||
+ e:;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
|
@ -0,0 +1,58 @@
|
|||
2007-06-01 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/32139
|
||||
* c-typeck.c (common_pointer_type): Set TYPE_READONLY
|
||||
and TYPE_VOLATILE on the merged pointed to FUNCTION_TYPE
|
||||
only if both pointed_to_1 and pointed_to_2 are TYPE_READONLY
|
||||
resp. TYPE_VOLATILE.
|
||||
|
||||
* gcc.c-torture/compile/20070531-1.c: New test.
|
||||
|
||||
--- gcc/c-typeck.c.jj 2007-04-25 10:13:52.000000000 +0200
|
||||
+++ gcc/c-typeck.c 2007-06-01 10:51:53.000000000 +0200
|
||||
@@ -499,6 +499,7 @@ common_pointer_type (tree t1, tree t2)
|
||||
tree pointed_to_1, mv1;
|
||||
tree pointed_to_2, mv2;
|
||||
tree target;
|
||||
+ int type_quals;
|
||||
|
||||
/* Save time if the two types are the same. */
|
||||
|
||||
@@ -526,10 +527,19 @@ common_pointer_type (tree t1, tree t2)
|
||||
if (TREE_CODE (mv2) != ARRAY_TYPE)
|
||||
mv2 = TYPE_MAIN_VARIANT (pointed_to_2);
|
||||
target = composite_type (mv1, mv2);
|
||||
- t1 = build_pointer_type (c_build_qualified_type
|
||||
- (target,
|
||||
- TYPE_QUALS (pointed_to_1) |
|
||||
- TYPE_QUALS (pointed_to_2)));
|
||||
+ type_quals = TYPE_QUALS (pointed_to_1) | TYPE_QUALS (pointed_to_2);
|
||||
+ if (TREE_CODE (pointed_to_1) == FUNCTION_TYPE)
|
||||
+ {
|
||||
+ /* TYPE_READONLY and TYPE_VOLATILE on FUNCTION_TYPE should be
|
||||
+ logically ANDed, not ORed, as if one function is
|
||||
+ __attribute__((const)) and the other is not, the common type
|
||||
+ must be conservatively not __attribute__((const))
|
||||
+ and similarly for __attribute__((noreturn)). */
|
||||
+ type_quals &= ~(TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE);
|
||||
+ type_quals |= (TYPE_QUALS (pointed_to_1) & TYPE_QUALS (pointed_to_2))
|
||||
+ & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE);
|
||||
+ }
|
||||
+ t1 = build_pointer_type (c_build_qualified_type (target, type_quals));
|
||||
return build_type_attribute_variant (t1, attributes);
|
||||
}
|
||||
|
||||
--- gcc/testsuite/gcc.c-torture/compile/20070531-1.c.jj 2007-05-31 13:47:22.000000000 +0200
|
||||
+++ gcc/testsuite/gcc.c-torture/compile/20070531-1.c 2007-06-01 10:57:15.000000000 +0200
|
||||
@@ -0,0 +1,11 @@
|
||||
+/* PR tree-optimization/32139 */
|
||||
+int foo (void);
|
||||
+int bar (void) __attribute__ ((const));
|
||||
+
|
||||
+int
|
||||
+test (int x)
|
||||
+{
|
||||
+ int a = (x == 10000 ? foo : bar) ();
|
||||
+ int b = (x == 10000 ? foo : bar) ();
|
||||
+ return a + b;
|
||||
+}
|
|
@ -0,0 +1,91 @@
|
|||
2007-11-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/32241
|
||||
* pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
|
||||
is not scalar type, let finish_class_member_access_expr handle
|
||||
diagnostics. Pass BIT_NOT_EXPR argument to
|
||||
finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
|
||||
|
||||
* g++.dg/template/pseudodtor3.C: New test.
|
||||
|
||||
--- gcc/cp/pt.c (revision 130065)
|
||||
+++ gcc/cp/pt.c (revision 130066)
|
||||
@@ -11004,15 +11004,23 @@ tsubst_copy_and_build (tree t,
|
||||
|
||||
if (object_type && !CLASS_TYPE_P (object_type))
|
||||
{
|
||||
- if (TREE_CODE (member) == BIT_NOT_EXPR)
|
||||
- return finish_pseudo_destructor_expr (object,
|
||||
- NULL_TREE,
|
||||
- object_type);
|
||||
- else if (TREE_CODE (member) == SCOPE_REF
|
||||
- && (TREE_CODE (TREE_OPERAND (member, 1)) == BIT_NOT_EXPR))
|
||||
- return finish_pseudo_destructor_expr (object,
|
||||
- object,
|
||||
- object_type);
|
||||
+ if (SCALAR_TYPE_P (object_type))
|
||||
+ {
|
||||
+ tree s = NULL_TREE;
|
||||
+ tree dtor = member;
|
||||
+
|
||||
+ if (TREE_CODE (dtor) == SCOPE_REF)
|
||||
+ {
|
||||
+ s = TREE_OPERAND (dtor, 0);
|
||||
+ dtor = TREE_OPERAND (dtor, 1);
|
||||
+ }
|
||||
+ if (TREE_CODE (dtor) == BIT_NOT_EXPR)
|
||||
+ {
|
||||
+ dtor = TREE_OPERAND (dtor, 0);
|
||||
+ if (TYPE_P (dtor))
|
||||
+ return finish_pseudo_destructor_expr (object, s, dtor);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
else if (TREE_CODE (member) == SCOPE_REF
|
||||
&& TREE_CODE (TREE_OPERAND (member, 1)) == TEMPLATE_ID_EXPR)
|
||||
--- gcc/testsuite/g++.dg/template/pseudodtor3.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/pseudodtor3.C (revision 130066)
|
||||
@@ -0,0 +1,43 @@
|
||||
+// PR c++/32241
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+struct A
|
||||
+{
|
||||
+ typedef int T;
|
||||
+ T &foo ();
|
||||
+ A () { foo.~T (); } // { dg-error "does not have class type|expected" }
|
||||
+};
|
||||
+
|
||||
+template <typename T> struct B
|
||||
+{
|
||||
+ T &foo ();
|
||||
+ B () { foo.~T (); } // { dg-error "invalid use of member" }
|
||||
+};
|
||||
+
|
||||
+B<int> b;
|
||||
+
|
||||
+template <typename T, typename S> struct C
|
||||
+{
|
||||
+ T t;
|
||||
+ C () { t.~S (); } // { dg-error "is not of type" }
|
||||
+};
|
||||
+
|
||||
+C<int, long int> c;
|
||||
+
|
||||
+template <typename T> struct D
|
||||
+{
|
||||
+ T t;
|
||||
+ typedef long int U;
|
||||
+ D () { t.~U (); } // { dg-error "is not of type" }
|
||||
+};
|
||||
+
|
||||
+D<int> d;
|
||||
+
|
||||
+template <typename T> struct E
|
||||
+{
|
||||
+ T &foo ();
|
||||
+ typedef long int U;
|
||||
+ E () { foo.~U (); } // { dg-error "is not of type" }
|
||||
+};
|
||||
+
|
||||
+E<int> e;
|
|
@ -0,0 +1,108 @@
|
|||
2007-11-01 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/32384
|
||||
* parser.c (cp_parser_postfix_dot_deref_expression): If
|
||||
POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
|
||||
first and if that succeeds and type is SCALAR_TYPE_P, create
|
||||
PSEUDO_DTOR_EXPR.
|
||||
|
||||
* g++.dg/template/pseudodtor1.C: New test.
|
||||
* g++.dg/template/pseudodtor2.C: New test.
|
||||
|
||||
--- gcc/cp/parser.c (revision 129835)
|
||||
+++ gcc/cp/parser.c (revision 129836)
|
||||
@@ -4850,8 +4850,10 @@ cp_parser_postfix_dot_deref_expression (
|
||||
pseudo_destructor_p = false;
|
||||
|
||||
/* If the SCOPE is a scalar type, then, if this is a valid program,
|
||||
- we must be looking at a pseudo-destructor-name. */
|
||||
- if (scope && SCALAR_TYPE_P (scope))
|
||||
+ we must be looking at a pseudo-destructor-name. If POSTFIX_EXPRESSION
|
||||
+ is type dependent, it can be pseudo-destructor-name or something else.
|
||||
+ Try to parse it as pseudo-destructor-name first. */
|
||||
+ if ((scope && SCALAR_TYPE_P (scope)) || dependent_p)
|
||||
{
|
||||
tree s;
|
||||
tree type;
|
||||
@@ -4860,7 +4862,12 @@ cp_parser_postfix_dot_deref_expression (
|
||||
/* Parse the pseudo-destructor-name. */
|
||||
s = NULL_TREE;
|
||||
cp_parser_pseudo_destructor_name (parser, &s, &type);
|
||||
- if (cp_parser_parse_definitely (parser))
|
||||
+ if (dependent_p
|
||||
+ && (cp_parser_error_occurred (parser)
|
||||
+ || TREE_CODE (type) != TYPE_DECL
|
||||
+ || !SCALAR_TYPE_P (TREE_TYPE (type))))
|
||||
+ cp_parser_abort_tentative_parse (parser);
|
||||
+ else if (cp_parser_parse_definitely (parser))
|
||||
{
|
||||
pseudo_destructor_p = true;
|
||||
postfix_expression
|
||||
--- gcc/testsuite/g++.dg/template/pseudodtor1.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/pseudodtor1.C (revision 129836)
|
||||
@@ -0,0 +1,44 @@
|
||||
+// PR c++/32384
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+struct A
|
||||
+{
|
||||
+ typedef int T;
|
||||
+ T foo ();
|
||||
+
|
||||
+ A () { foo ().~T (); }
|
||||
+};
|
||||
+
|
||||
+template<typename> struct B
|
||||
+{
|
||||
+ typedef int T;
|
||||
+ T foo ();
|
||||
+
|
||||
+ B () { foo ().~T (); }
|
||||
+};
|
||||
+
|
||||
+template<typename T> struct C
|
||||
+{
|
||||
+ T t;
|
||||
+ C () { t.~T (); }
|
||||
+};
|
||||
+
|
||||
+template<typename S> struct D
|
||||
+{
|
||||
+ typedef int T;
|
||||
+ S foo ();
|
||||
+
|
||||
+ D () { foo ().~T(); }
|
||||
+};
|
||||
+
|
||||
+struct Z
|
||||
+{
|
||||
+ Z () {}
|
||||
+ ~Z () {}
|
||||
+};
|
||||
+
|
||||
+A a;
|
||||
+B<int> b;
|
||||
+C<int> c1;
|
||||
+C<Z> c2;
|
||||
+D<int> d;
|
||||
--- gcc/testsuite/g++.dg/template/pseudodtor2.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/pseudodtor2.C (revision 129836)
|
||||
@@ -0,0 +1,18 @@
|
||||
+// PR c++/32384
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+template<typename S> struct D
|
||||
+{
|
||||
+ typedef int T;
|
||||
+ S foo ();
|
||||
+
|
||||
+ D () { foo ().~T(); } // { dg-error "is not of type" }
|
||||
+};
|
||||
+
|
||||
+struct Z
|
||||
+{
|
||||
+ Z () {}
|
||||
+ ~Z () {}
|
||||
+};
|
||||
+
|
||||
+D<Z> d;
|
|
@ -0,0 +1,46 @@
|
|||
2007-09-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/32694
|
||||
2006-11-08 Roger Sayle <roger@eyesopen.com>
|
||||
* tree-ssa-propagate.c (set_rhs): Verify tcc_comparison the same way
|
||||
as tcc_binary.
|
||||
|
||||
* gcc.c-torture/compile/20070925-1.c: New test.
|
||||
|
||||
--- gcc/tree-ssa-propagate.c.jj 2007-09-23 19:43:36.000000000 +0200
|
||||
+++ gcc/tree-ssa-propagate.c 2007-09-25 09:30:50.000000000 +0200
|
||||
@@ -570,7 +570,8 @@ set_rhs (tree *stmt_p, tree expr)
|
||||
ssa_op_iter iter;
|
||||
|
||||
/* Verify the constant folded result is valid gimple. */
|
||||
- if (TREE_CODE_CLASS (code) == tcc_binary)
|
||||
+ if (TREE_CODE_CLASS (code) == tcc_binary
|
||||
+ || TREE_CODE_CLASS (code) == tcc_comparison)
|
||||
{
|
||||
if (!is_gimple_val (TREE_OPERAND (expr, 0))
|
||||
|| !is_gimple_val (TREE_OPERAND (expr, 1)))
|
||||
--- gcc/testsuite/gcc.c-torture/compile/20070925-1.c.jj 2007-09-25 09:28:37.000000000 +0200
|
||||
+++ gcc/testsuite/gcc.c-torture/compile/20070925-1.c 2007-09-25 09:29:41.000000000 +0200
|
||||
@@ -0,0 +1,22 @@
|
||||
+/* PR tree-optimization/32694 */
|
||||
+
|
||||
+typedef signed long long int WordS64;
|
||||
+typedef unsigned long long int Word64;
|
||||
+
|
||||
+int
|
||||
+foo (Word64 * p)
|
||||
+{
|
||||
+ while (1)
|
||||
+ {
|
||||
+ WordS64 c = 0x1llu;
|
||||
+ WordS64 x = *p;
|
||||
+ if (c >= 0)
|
||||
+ {
|
||||
+ if (x > (WordS64) 0x7FFFFFFFFFFFFFFFll - c)
|
||||
+ return 6;
|
||||
+ }
|
||||
+ else if (x < (WordS64) 0x8000000000000000ll - c)
|
||||
+ return 7;
|
||||
+ p++;
|
||||
+ }
|
||||
+}
|
|
@ -0,0 +1,230 @@
|
|||
2007-10-15 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/33136
|
||||
* opts.c (decode_options): Don't enable flag_ipa_type_escape.
|
||||
|
||||
* gcc.c-torture/execute/20070824-1.c: New test.
|
||||
* gcc.dg/pr33136-1.c: New test.
|
||||
* gcc.dg/pr33136-2.c: New test.
|
||||
* gcc.dg/pr33136-3.c: New test.
|
||||
|
||||
--- gcc/opts.c (revision 129365)
|
||||
+++ gcc/opts.c (revision 129366)
|
||||
@@ -473,7 +473,6 @@ decode_options (unsigned int argc, const
|
||||
flag_cse_skip_blocks = 1;
|
||||
flag_gcse = 1;
|
||||
flag_expensive_optimizations = 1;
|
||||
- flag_ipa_type_escape = 1;
|
||||
flag_strength_reduce = 1;
|
||||
flag_rerun_cse_after_loop = 1;
|
||||
flag_rerun_loop_opt = 1;
|
||||
--- gcc/testsuite/gcc.c-torture/execute/20070824-1.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.c-torture/execute/20070824-1.c (revision 129366)
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* PR tree-optimization/33136 */
|
||||
+
|
||||
+extern void abort (void);
|
||||
+
|
||||
+struct S
|
||||
+{
|
||||
+ struct S *a;
|
||||
+ int b;
|
||||
+};
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ struct S *s = (struct S *) 0, **p, *n;
|
||||
+ for (p = &s; *p; p = &(*p)->a);
|
||||
+ n = (struct S *) __builtin_alloca (sizeof (*n));
|
||||
+ n->a = *p;
|
||||
+ n->b = 1;
|
||||
+ *p = n;
|
||||
+
|
||||
+ if (!s)
|
||||
+ abort ();
|
||||
+ return 0;
|
||||
+}
|
||||
--- gcc/testsuite/gcc.dg/pr33136-1.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/pr33136-1.c (revision 129366)
|
||||
@@ -0,0 +1,54 @@
|
||||
+/* PR tree-optimization/33136 */
|
||||
+/* { dg-do run } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+extern void abort (void);
|
||||
+
|
||||
+struct S
|
||||
+{
|
||||
+ struct S *a;
|
||||
+ int b;
|
||||
+ float f;
|
||||
+};
|
||||
+
|
||||
+static struct S s;
|
||||
+
|
||||
+static int *
|
||||
+__attribute__((noinline, const))
|
||||
+foo (void)
|
||||
+{
|
||||
+ return &s.b;
|
||||
+}
|
||||
+
|
||||
+float
|
||||
+__attribute__((noinline))
|
||||
+bar (float *f)
|
||||
+{
|
||||
+ s.f = 1.0;
|
||||
+ *f = 4.0;
|
||||
+ return s.f;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+__attribute__((noinline))
|
||||
+baz (int *x)
|
||||
+{
|
||||
+ s.b = 1;
|
||||
+ *x = 4;
|
||||
+ return s.b;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+t (void)
|
||||
+{
|
||||
+ float f = 8.0;
|
||||
+ return bar (&f) + baz (foo ());
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ if (t () != 5)
|
||||
+ abort ();
|
||||
+ return 0;
|
||||
+}
|
||||
--- gcc/testsuite/gcc.dg/pr33136-3.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/pr33136-3.c (revision 129366)
|
||||
@@ -0,0 +1,60 @@
|
||||
+/* PR tree-optimization/33136 */
|
||||
+/* { dg-do run } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+extern void abort (void);
|
||||
+
|
||||
+struct S
|
||||
+{
|
||||
+ void *a;
|
||||
+ int b[3];
|
||||
+ double *c;
|
||||
+};
|
||||
+static double d, e;
|
||||
+
|
||||
+static struct S s;
|
||||
+
|
||||
+static int *
|
||||
+__attribute__((noinline, const))
|
||||
+foo (void)
|
||||
+{
|
||||
+ return (int *) &s.b;
|
||||
+}
|
||||
+
|
||||
+double *
|
||||
+__attribute__((noinline))
|
||||
+bar (double **f)
|
||||
+{
|
||||
+ s.c = &d;
|
||||
+ *f = &e;
|
||||
+ /* As nothing ever takes the address of any double * field in struct S,
|
||||
+ the write to *f can't alias with the s.c field. */
|
||||
+ return s.c;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+__attribute__((noinline))
|
||||
+baz (int *x)
|
||||
+{
|
||||
+ s.b[0] = 1;
|
||||
+ *x = 4;
|
||||
+ /* Function foo takes address of an int array field in struct S,
|
||||
+ so *x can alias with the s.b field (and it does in this testcase). */
|
||||
+ return s.b[0];
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+__attribute__((noinline))
|
||||
+t (void)
|
||||
+{
|
||||
+ double *f = (double *) 0;
|
||||
+ return 10 * (bar (&f) != &d) + baz (foo ());
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ if (t () != 4)
|
||||
+ abort ();
|
||||
+ return 0;
|
||||
+}
|
||||
--- gcc/testsuite/gcc.dg/pr33136-2.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/pr33136-2.c (revision 129366)
|
||||
@@ -0,0 +1,60 @@
|
||||
+/* PR tree-optimization/33136 */
|
||||
+/* { dg-do run } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+extern void abort (void);
|
||||
+
|
||||
+struct S
|
||||
+{
|
||||
+ void *a;
|
||||
+ int b;
|
||||
+ int *c;
|
||||
+};
|
||||
+static int d, e;
|
||||
+
|
||||
+static struct S s;
|
||||
+
|
||||
+static int *
|
||||
+__attribute__((noinline, const))
|
||||
+foo (void)
|
||||
+{
|
||||
+ return &s.b;
|
||||
+}
|
||||
+
|
||||
+int *
|
||||
+__attribute__((noinline))
|
||||
+bar (int **f)
|
||||
+{
|
||||
+ s.c = &d;
|
||||
+ *f = &e;
|
||||
+ /* As nothing ever takes the address of any int * field in struct S,
|
||||
+ the write to *f can't alias with the s.c field. */
|
||||
+ return s.c;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+__attribute__((noinline))
|
||||
+baz (int *x)
|
||||
+{
|
||||
+ s.b = 1;
|
||||
+ *x = 4;
|
||||
+ /* Function foo takes address of an int field in struct S,
|
||||
+ so *x can alias with the s.b field (and it does in this testcase). */
|
||||
+ return s.b;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+__attribute__((noinline))
|
||||
+t (void)
|
||||
+{
|
||||
+ int *f = (int *) 0;
|
||||
+ return 10 * (bar (&f) != &d) + baz (foo ());
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ if (t () != 4)
|
||||
+ abort ();
|
||||
+ return 0;
|
||||
+}
|
|
@ -0,0 +1,194 @@
|
|||
2007-09-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/33238
|
||||
PR c/27301
|
||||
* gimplify.c (gimplify_vla_decl): New function.
|
||||
(gimplify_decl_expr): Move VLA decl handling to gimplify_vla_decl.
|
||||
Call it.
|
||||
(gimplify_target_expr): Handle variable length TARGET_EXPRs.
|
||||
|
||||
* gcc.c-torture/execute/20070919-1.c: New test.
|
||||
* gcc.dg/pr33238.c: New test.
|
||||
* gcc.dg/pr27301.c: New test.
|
||||
|
||||
--- gcc/gimplify.c (revision 128628)
|
||||
+++ gcc/gimplify.c (revision 128629)
|
||||
@@ -1144,6 +1144,42 @@ gimplify_return_expr (tree stmt, tree *p
|
||||
return GS_ALL_DONE;
|
||||
}
|
||||
|
||||
+static void
|
||||
+gimplify_vla_decl (tree decl, tree *stmt_p)
|
||||
+{
|
||||
+ /* This is a variable-sized decl. Simplify its size and mark it
|
||||
+ for deferred expansion. Note that mudflap depends on the format
|
||||
+ of the emitted code: see mx_register_decls(). */
|
||||
+ tree t, args, addr, ptr_type;
|
||||
+
|
||||
+ gimplify_one_sizepos (&DECL_SIZE (decl), stmt_p);
|
||||
+ gimplify_one_sizepos (&DECL_SIZE_UNIT (decl), stmt_p);
|
||||
+
|
||||
+ /* All occurrences of this decl in final gimplified code will be
|
||||
+ replaced by indirection. Setting DECL_VALUE_EXPR does two
|
||||
+ things: First, it lets the rest of the gimplifier know what
|
||||
+ replacement to use. Second, it lets the debug info know
|
||||
+ where to find the value. */
|
||||
+ ptr_type = build_pointer_type (TREE_TYPE (decl));
|
||||
+ addr = create_tmp_var (ptr_type, get_name (decl));
|
||||
+ DECL_IGNORED_P (addr) = 0;
|
||||
+ t = build_fold_indirect_ref (addr);
|
||||
+ SET_DECL_VALUE_EXPR (decl, t);
|
||||
+ DECL_HAS_VALUE_EXPR_P (decl) = 1;
|
||||
+
|
||||
+ args = tree_cons (NULL, DECL_SIZE_UNIT (decl), NULL);
|
||||
+ t = built_in_decls[BUILT_IN_ALLOCA];
|
||||
+ t = build_function_call_expr (t, args);
|
||||
+ t = fold_convert (ptr_type, t);
|
||||
+ t = build2 (MODIFY_EXPR, void_type_node, addr, t);
|
||||
+
|
||||
+ gimplify_and_add (t, stmt_p);
|
||||
+
|
||||
+ /* Indicate that we need to restore the stack level when the
|
||||
+ enclosing BIND_EXPR is exited. */
|
||||
+ gimplify_ctxp->save_stack = true;
|
||||
+}
|
||||
+
|
||||
/* Gimplifies a DECL_EXPR node *STMT_P by making any necessary allocation
|
||||
and initialization explicit. */
|
||||
|
||||
@@ -1168,39 +1204,7 @@ gimplify_decl_expr (tree *stmt_p)
|
||||
tree init = DECL_INITIAL (decl);
|
||||
|
||||
if (TREE_CODE (DECL_SIZE (decl)) != INTEGER_CST)
|
||||
- {
|
||||
- /* This is a variable-sized decl. Simplify its size and mark it
|
||||
- for deferred expansion. Note that mudflap depends on the format
|
||||
- of the emitted code: see mx_register_decls(). */
|
||||
- tree t, args, addr, ptr_type;
|
||||
-
|
||||
- gimplify_one_sizepos (&DECL_SIZE (decl), stmt_p);
|
||||
- gimplify_one_sizepos (&DECL_SIZE_UNIT (decl), stmt_p);
|
||||
-
|
||||
- /* All occurrences of this decl in final gimplified code will be
|
||||
- replaced by indirection. Setting DECL_VALUE_EXPR does two
|
||||
- things: First, it lets the rest of the gimplifier know what
|
||||
- replacement to use. Second, it lets the debug info know
|
||||
- where to find the value. */
|
||||
- ptr_type = build_pointer_type (TREE_TYPE (decl));
|
||||
- addr = create_tmp_var (ptr_type, get_name (decl));
|
||||
- DECL_IGNORED_P (addr) = 0;
|
||||
- t = build_fold_indirect_ref (addr);
|
||||
- SET_DECL_VALUE_EXPR (decl, t);
|
||||
- DECL_HAS_VALUE_EXPR_P (decl) = 1;
|
||||
-
|
||||
- args = tree_cons (NULL, DECL_SIZE_UNIT (decl), NULL);
|
||||
- t = built_in_decls[BUILT_IN_ALLOCA];
|
||||
- t = build_function_call_expr (t, args);
|
||||
- t = fold_convert (ptr_type, t);
|
||||
- t = build2 (MODIFY_EXPR, void_type_node, addr, t);
|
||||
-
|
||||
- gimplify_and_add (t, stmt_p);
|
||||
-
|
||||
- /* Indicate that we need to restore the stack level when the
|
||||
- enclosing BIND_EXPR is exited. */
|
||||
- gimplify_ctxp->save_stack = true;
|
||||
- }
|
||||
+ gimplify_vla_decl (decl, stmt_p);
|
||||
|
||||
if (init && init != error_mark_node)
|
||||
{
|
||||
@@ -4146,8 +4150,15 @@ gimplify_target_expr (tree *expr_p, tree
|
||||
if (init)
|
||||
{
|
||||
/* TARGET_EXPR temps aren't part of the enclosing block, so add it
|
||||
- to the temps list. */
|
||||
- gimple_add_tmp_var (temp);
|
||||
+ to the temps list. Handle also variable length TARGET_EXPRs. */
|
||||
+ if (TREE_CODE (DECL_SIZE (temp)) != INTEGER_CST)
|
||||
+ {
|
||||
+ if (!TYPE_SIZES_GIMPLIFIED (TREE_TYPE (temp)))
|
||||
+ gimplify_type_sizes (TREE_TYPE (temp), pre_p);
|
||||
+ gimplify_vla_decl (temp, pre_p);
|
||||
+ }
|
||||
+ else
|
||||
+ gimple_add_tmp_var (temp);
|
||||
|
||||
/* If TARGET_EXPR_INITIAL is void, then the mere evaluation of the
|
||||
expression is supposed to initialize the slot. */
|
||||
--- gcc/testsuite/gcc.c-torture/execute/20070919-1.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.c-torture/execute/20070919-1.c (revision 128629)
|
||||
@@ -0,0 +1,41 @@
|
||||
+/* PR c/33238 */
|
||||
+
|
||||
+typedef __SIZE_TYPE__ size_t;
|
||||
+int memcmp (const void *, const void *, size_t);
|
||||
+void abort (void);
|
||||
+
|
||||
+void
|
||||
+__attribute__((noinline))
|
||||
+bar (void *x, void *y)
|
||||
+{
|
||||
+ struct S { char w[8]; } *p = x, *q = y;
|
||||
+ if (memcmp (p->w, "zyxwvut", 8) != 0)
|
||||
+ abort ();
|
||||
+ if (memcmp (q[0].w, "abcdefg", 8) != 0)
|
||||
+ abort ();
|
||||
+ if (memcmp (q[1].w, "ABCDEFG", 8) != 0)
|
||||
+ abort ();
|
||||
+ if (memcmp (q[2].w, "zyxwvut", 8) != 0)
|
||||
+ abort ();
|
||||
+ if (memcmp (q[3].w, "zyxwvut", 8) != 0)
|
||||
+ abort ();
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+__attribute__((noinline))
|
||||
+foo (void *x, int y)
|
||||
+{
|
||||
+ struct S { char w[y]; } *p = x, a;
|
||||
+ int i;
|
||||
+ a = ({ struct S b; b = p[2]; p[3] = b; });
|
||||
+ bar (&a, x);
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ struct S { char w[8]; } p[4]
|
||||
+ = { "abcdefg", "ABCDEFG", "zyxwvut", "ZYXWVUT" };
|
||||
+ foo (p, 8);
|
||||
+ return 0;
|
||||
+}
|
||||
--- gcc/testsuite/gcc.dg/pr33238.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/pr33238.c (revision 128629)
|
||||
@@ -0,0 +1,12 @@
|
||||
+/* PR c/33238 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-std=gnu89" } */
|
||||
+
|
||||
+void
|
||||
+reverse (void *x, int y, int z)
|
||||
+{
|
||||
+ struct { char w[z]; } *p = x, a;
|
||||
+ int i, j;
|
||||
+ for (i = y - 1, j = 0; j < y / 2; i--, j++)
|
||||
+ ({ a = p[i]; p[i] = p[j]; p[j] = a; });
|
||||
+}
|
||||
--- gcc/testsuite/gcc.dg/pr27301.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/pr27301.c (revision 128629)
|
||||
@@ -0,0 +1,15 @@
|
||||
+/* PR c/27301 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2 -std=gnu89" } */
|
||||
+
|
||||
+void
|
||||
+foo (void *ptr, long n)
|
||||
+{
|
||||
+ __asm__ __volatile__ ("" :: "m" (({ struct { char x[n]; } *p = ptr; *p; })));
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+bar (void *ptr, long n)
|
||||
+{
|
||||
+ __asm__ __volatile__ ("" :: "m" (*({ struct { char x[n]; } *p = ptr; p; })));
|
||||
+}
|
|
@ -0,0 +1,77 @@
|
|||
2007-11-07 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33501
|
||||
* call.c (build_over_call): Don't check TREE_ADDRESSABLE
|
||||
on incomplete type.
|
||||
|
||||
* g++.dg/warn/incomplete2.C: New test.
|
||||
* g++.dg/template/incomplete4.C: New test.
|
||||
* g++.dg/template/incomplete5.C: New test.
|
||||
|
||||
--- gcc/cp/call.c (revision 129967)
|
||||
+++ gcc/cp/call.c (revision 129968)
|
||||
@@ -4993,7 +4993,8 @@ build_over_call (struct z_candidate *can
|
||||
|
||||
/* Don't make a copy here if build_call is going to. */
|
||||
if (conv->kind == ck_rvalue
|
||||
- && !TREE_ADDRESSABLE (complete_type (type)))
|
||||
+ && COMPLETE_TYPE_P (complete_type (type))
|
||||
+ && !TREE_ADDRESSABLE (type))
|
||||
conv = conv->u.next;
|
||||
|
||||
val = convert_like_with_context
|
||||
--- gcc/testsuite/g++.dg/warn/incomplete2.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/warn/incomplete2.C (revision 129968)
|
||||
@@ -0,0 +1,13 @@
|
||||
+// PR c++/33501
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+class A; // { dg-error "forward declaration" }
|
||||
+
|
||||
+int f (A);
|
||||
+const A &make ();
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ return f (make ()); // { dg-error "invalid use of undefined type|initializing argument" }
|
||||
+}
|
||||
--- gcc/testsuite/g++.dg/template/incomplete5.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/incomplete5.C (revision 129968)
|
||||
@@ -0,0 +1,17 @@
|
||||
+// PR c++/33501
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+class A; // { dg-error "forward declaration" }
|
||||
+
|
||||
+template <typename T> struct X
|
||||
+{
|
||||
+ static int f (T);
|
||||
+ static const T &make ();
|
||||
+ static const bool value = sizeof (f (make ())) == sizeof (int); // { dg-error "invalid use of undefined type|initializing argument" }
|
||||
+};
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ return X <A>::value;
|
||||
+}
|
||||
--- gcc/testsuite/g++.dg/template/incomplete4.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/incomplete4.C (revision 129968)
|
||||
@@ -0,0 +1,16 @@
|
||||
+// PR c++/33501
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+class A; // { dg-error "forward declaration" }
|
||||
+
|
||||
+template <typename T> struct X
|
||||
+{
|
||||
+ static int f (T);
|
||||
+ static const T &make ();
|
||||
+};
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ return X<A>::f (X<A>::make ()); // { dg-error "invalid use of undefined type|initializing argument" }
|
||||
+}
|
|
@ -0,0 +1,168 @@
|
|||
2007-09-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33506
|
||||
* langhooks.h (struct lang_hooks_for_types): Add type_hash_eq
|
||||
field.
|
||||
* langhooks.c (lhd_type_hash_eq): New function.
|
||||
* langhooks-def.h (lhd_type_hash_eq): New prototype.
|
||||
(LANG_HOOKS_TYPE_HASH_EQ): Define.
|
||||
(LANG_HOOKS_FOR_TYPES_INITIALIZER): Add LANG_HOOKS_TYPE_HASH_EQ.
|
||||
* tree.c (type_hash_eq): For FUNCTION_TYPE use
|
||||
lang_hooks.type.type_hash_eq in addition to generic tests.
|
||||
|
||||
* cp-tree.h (cxx_type_hash_eq): New prototype.
|
||||
* cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
|
||||
* tree.c (cxx_type_hash_eq): New function.
|
||||
|
||||
* g++.dg/ext/attrib29.C: New test.
|
||||
|
||||
--- gcc/langhooks.h.jj 2007-02-20 16:39:12.000000000 -0500
|
||||
+++ gcc/langhooks.h 2007-09-22 03:46:10.000000000 -0400
|
||||
@@ -148,6 +148,10 @@ struct lang_hooks_for_types
|
||||
firstprivate variables. */
|
||||
void (*omp_firstprivatize_type_sizes) (struct gimplify_omp_ctx *, tree);
|
||||
|
||||
+ /* Return TRUE if TYPE1 and TYPE2 are identical for type hashing purposes.
|
||||
+ Called only after doing all language independent checks. */
|
||||
+ bool (*type_hash_eq) (tree, tree);
|
||||
+
|
||||
/* Nonzero if types that are identical are to be hashed so that only
|
||||
one copy is kept. If a language requires unique types for each
|
||||
user-specified type, such as Ada, this should be set to TRUE. */
|
||||
--- gcc/langhooks.c.jj 2007-02-20 16:39:12.000000000 -0500
|
||||
+++ gcc/langhooks.c 2007-09-22 03:46:10.000000000 -0400
|
||||
@@ -411,6 +411,16 @@ lhd_tree_dump_type_quals (tree t)
|
||||
/* lang_hooks.expr_size: Determine the size of the value of an expression T
|
||||
in a language-specific way. Returns a tree for the size in bytes. */
|
||||
|
||||
+/* Return TRUE if TYPE1 and TYPE2 are identical for type hashing purposes.
|
||||
+ Called only after doing all language independent checks. */
|
||||
+
|
||||
+bool
|
||||
+lhd_type_hash_eq (tree typea ATTRIBUTE_UNUSED,
|
||||
+ tree typeb ATTRIBUTE_UNUSED)
|
||||
+{
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
tree
|
||||
lhd_expr_size (tree exp)
|
||||
{
|
||||
--- gcc/langhooks-def.h.jj 2007-02-20 16:39:13.000000000 -0500
|
||||
+++ gcc/langhooks-def.h 2007-09-22 03:46:56.000000000 -0400
|
||||
@@ -70,6 +70,7 @@ extern tree lhd_expr_size (tree);
|
||||
extern size_t lhd_tree_size (enum tree_code);
|
||||
extern HOST_WIDE_INT lhd_to_target_charset (HOST_WIDE_INT);
|
||||
extern tree lhd_expr_to_decl (tree, bool *, bool *, bool *);
|
||||
+extern bool lhd_type_hash_eq (tree, tree);
|
||||
|
||||
/* Declarations of default tree inlining hooks. */
|
||||
extern tree lhd_tree_inlining_walk_subtrees (tree *, int *, walk_tree_fn,
|
||||
@@ -220,6 +221,7 @@ extern tree lhd_make_node (enum tree_cod
|
||||
#define LANG_HOOKS_TYPE_MAX_SIZE lhd_return_null_tree
|
||||
#define LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES \
|
||||
lhd_omp_firstprivatize_type_sizes
|
||||
+#define LANG_HOOKS_TYPE_HASH_EQ lhd_type_hash_eq
|
||||
#define LANG_HOOKS_HASH_TYPES true
|
||||
|
||||
#define LANG_HOOKS_FOR_TYPES_INITIALIZER { \
|
||||
@@ -234,6 +236,7 @@ extern tree lhd_make_node (enum tree_cod
|
||||
LANG_HOOKS_INCOMPLETE_TYPE_ERROR, \
|
||||
LANG_HOOKS_TYPE_MAX_SIZE, \
|
||||
LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES, \
|
||||
+ LANG_HOOKS_TYPE_HASH_EQ, \
|
||||
LANG_HOOKS_HASH_TYPES \
|
||||
}
|
||||
|
||||
--- gcc/tree.c.jj 2007-04-03 07:18:26.000000000 -0400
|
||||
+++ gcc/tree.c 2007-09-22 03:46:10.000000000 -0400
|
||||
@@ -4168,17 +4168,21 @@ type_hash_eq (const void *va, const void
|
||||
TYPE_FIELDS (b->type))));
|
||||
|
||||
case FUNCTION_TYPE:
|
||||
- return (TYPE_ARG_TYPES (a->type) == TYPE_ARG_TYPES (b->type)
|
||||
- || (TYPE_ARG_TYPES (a->type)
|
||||
- && TREE_CODE (TYPE_ARG_TYPES (a->type)) == TREE_LIST
|
||||
- && TYPE_ARG_TYPES (b->type)
|
||||
- && TREE_CODE (TYPE_ARG_TYPES (b->type)) == TREE_LIST
|
||||
- && type_list_equal (TYPE_ARG_TYPES (a->type),
|
||||
- TYPE_ARG_TYPES (b->type))));
|
||||
+ if (TYPE_ARG_TYPES (a->type) == TYPE_ARG_TYPES (b->type)
|
||||
+ || (TYPE_ARG_TYPES (a->type)
|
||||
+ && TREE_CODE (TYPE_ARG_TYPES (a->type)) == TREE_LIST
|
||||
+ && TYPE_ARG_TYPES (b->type)
|
||||
+ && TREE_CODE (TYPE_ARG_TYPES (b->type)) == TREE_LIST
|
||||
+ && type_list_equal (TYPE_ARG_TYPES (a->type),
|
||||
+ TYPE_ARG_TYPES (b->type))))
|
||||
+ break;
|
||||
+ return 0;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+ return lang_hooks.types.type_hash_eq (a->type, b->type);
|
||||
}
|
||||
|
||||
/* Return the cached hash value. */
|
||||
--- gcc/cp/cp-tree.h.jj 2007-06-26 07:57:09.000000000 -0400
|
||||
+++ gcc/cp/cp-tree.h 2007-09-22 03:50:22.000000000 -0400
|
||||
@@ -4421,7 +4421,8 @@ extern tree cp_add_pending_fn_decls (vo
|
||||
extern int cp_auto_var_in_fn_p (tree,tree);
|
||||
extern tree fold_if_not_in_template (tree);
|
||||
extern tree rvalue (tree);
|
||||
-
|
||||
+extern bool cxx_type_hash_eq (tree, tree);
|
||||
+
|
||||
/* in typeck.c */
|
||||
extern int string_conv_p (tree, tree, int);
|
||||
extern tree cp_truthvalue_conversion (tree);
|
||||
--- gcc/cp/cp-objcp-common.h.jj 2007-02-20 16:37:34.000000000 -0500
|
||||
+++ gcc/cp/cp-objcp-common.h 2007-09-22 03:49:38.000000000 -0400
|
||||
@@ -85,6 +85,8 @@ extern tree objcp_tsubst_copy_and_build
|
||||
#define LANG_HOOKS_WRITE_GLOBALS lhd_do_nothing
|
||||
#undef LANG_HOOKS_COMDAT_GROUP
|
||||
#define LANG_HOOKS_COMDAT_GROUP cxx_comdat_group
|
||||
+#undef LANG_HOOKS_TYPE_HASH_EQ
|
||||
+#define LANG_HOOKS_TYPE_HASH_EQ cxx_type_hash_eq
|
||||
|
||||
#undef LANG_HOOKS_FUNCTION_INIT
|
||||
#define LANG_HOOKS_FUNCTION_INIT cxx_push_function_context
|
||||
--- gcc/cp/tree.c.jj 2007-03-12 03:28:01.000000000 -0400
|
||||
+++ gcc/cp/tree.c 2007-09-22 03:46:10.000000000 -0400
|
||||
@@ -1959,6 +1959,22 @@ cp_build_type_attribute_variant (tree ty
|
||||
return new_type;
|
||||
}
|
||||
|
||||
+/* Return TRUE if TYPE1 and TYPE2 are identical for type hashing purposes.
|
||||
+ Called only after doing all language independent checks. Only
|
||||
+ to check TYPE_RAISES_EXCEPTIONS for FUNCTION_TYPE, the rest is already
|
||||
+ compared in type_hash_eq. */
|
||||
+
|
||||
+bool
|
||||
+cxx_type_hash_eq (tree typea, tree typeb)
|
||||
+{
|
||||
+ if (TREE_CODE (typea) != FUNCTION_TYPE
|
||||
+ || TYPE_RAISES_EXCEPTIONS (typea) == TYPE_RAISES_EXCEPTIONS (typeb))
|
||||
+ return true;
|
||||
+
|
||||
+ return comp_except_specs (TYPE_RAISES_EXCEPTIONS (typea),
|
||||
+ TYPE_RAISES_EXCEPTIONS (typeb), 1);
|
||||
+}
|
||||
+
|
||||
/* Apply FUNC to all language-specific sub-trees of TP in a pre-order
|
||||
traversal. Called from walk_tree. */
|
||||
|
||||
--- gcc/testsuite/g++.dg/ext/attrib29.C.jj 2007-09-22 03:46:10.000000000 -0400
|
||||
+++ gcc/testsuite/g++.dg/ext/attrib29.C 2007-09-22 03:46:10.000000000 -0400
|
||||
@@ -0,0 +1,10 @@
|
||||
+// PR c++/33506
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+extern int f1 (char *) __attribute__ ((warn_unused_result));
|
||||
+extern int f2 (char *) throw () __attribute__ ((warn_unused_result));
|
||||
+extern int f2 (char *) throw ();
|
||||
+
|
||||
+extern int f3 (char *) __attribute__ ((nonnull (1)));
|
||||
+extern int f4 (char *) throw () __attribute__ ((nonnull (1)));
|
||||
+extern int f4 (char *) throw ();
|
|
@ -0,0 +1,63 @@
|
|||
2007-11-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33516
|
||||
* parser.c (cp_parser_nested_name_specifier_opt): Use
|
||||
TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
|
||||
typedef of currently open class.
|
||||
|
||||
* g++.dg/lookup/typedef1.C: New test.
|
||||
|
||||
--- gcc/cp/parser.c (revision 129861)
|
||||
+++ gcc/cp/parser.c (revision 129862)
|
||||
@@ -4085,7 +4085,15 @@ cp_parser_nested_name_specifier_opt (cp_
|
||||
&& !COMPLETE_TYPE_P (new_scope)
|
||||
/* Do not try to complete dependent types. */
|
||||
&& !dependent_type_p (new_scope))
|
||||
- new_scope = complete_type (new_scope);
|
||||
+ {
|
||||
+ new_scope = complete_type (new_scope);
|
||||
+ /* If it is a typedef to current class, use the current
|
||||
+ class instead, as the typedef won't have any names inside
|
||||
+ it yet. */
|
||||
+ if (!COMPLETE_TYPE_P (new_scope)
|
||||
+ && currently_open_class (new_scope))
|
||||
+ new_scope = TYPE_MAIN_VARIANT (new_scope);
|
||||
+ }
|
||||
/* Make sure we look in the right scope the next time through
|
||||
the loop. */
|
||||
parser->scope = new_scope;
|
||||
--- gcc/testsuite/g++.dg/lookup/typedef1.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/lookup/typedef1.C (revision 129862)
|
||||
@@ -0,0 +1,32 @@
|
||||
+// PR c++/33516
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+struct S1;
|
||||
+typedef S1 T1;
|
||||
+struct S1 {
|
||||
+ typedef int U;
|
||||
+ T1::U i;
|
||||
+};
|
||||
+struct S2;
|
||||
+typedef S2 T2;
|
||||
+struct S2 {
|
||||
+ typedef int U;
|
||||
+};
|
||||
+T2::U j;
|
||||
+struct S3;
|
||||
+typedef S3 T3;
|
||||
+struct S3 {
|
||||
+ typedef int U;
|
||||
+ S3::U i;
|
||||
+};
|
||||
+
|
||||
+void
|
||||
+foo ()
|
||||
+{
|
||||
+ S1 s1;
|
||||
+ S2 s2;
|
||||
+ S3 s3;
|
||||
+ s1.i = 6;
|
||||
+ j = 7;
|
||||
+ s3.i = 8;
|
||||
+}
|
|
@ -0,0 +1,62 @@
|
|||
2007-11-01 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/33537
|
||||
* dwarf2out.c (gen_formal_parameter_die, gen_variable_die,
|
||||
gen_decl_die): Use TREE_TYPE (TREE_TYPE (decl)) as type
|
||||
rather than TREE_TYPE (decl) if DECL_BY_REFERENCE (decl).
|
||||
|
||||
--- gcc/dwarf2out.c (revision 129819)
|
||||
+++ gcc/dwarf2out.c (revision 129820)
|
||||
@@ -11832,8 +11832,11 @@ gen_formal_parameter_die (tree node, dw_
|
||||
add_abstract_origin_attribute (parm_die, origin);
|
||||
else
|
||||
{
|
||||
+ tree type = TREE_TYPE (node);
|
||||
add_name_and_src_coords_attributes (parm_die, node);
|
||||
- add_type_attribute (parm_die, TREE_TYPE (node),
|
||||
+ if (DECL_BY_REFERENCE (node))
|
||||
+ type = TREE_TYPE (type);
|
||||
+ add_type_attribute (parm_die, type,
|
||||
TREE_READONLY (node),
|
||||
TREE_THIS_VOLATILE (node),
|
||||
context_die);
|
||||
@@ -12437,8 +12440,14 @@ gen_variable_die (tree decl, dw_die_ref
|
||||
}
|
||||
else
|
||||
{
|
||||
+ tree type = TREE_TYPE (decl);
|
||||
+ if ((TREE_CODE (decl) == PARM_DECL
|
||||
+ || TREE_CODE (decl) == RESULT_DECL)
|
||||
+ && DECL_BY_REFERENCE (decl))
|
||||
+ type = TREE_TYPE (type);
|
||||
+
|
||||
add_name_and_src_coords_attributes (var_die, decl);
|
||||
- add_type_attribute (var_die, TREE_TYPE (decl), TREE_READONLY (decl),
|
||||
+ add_type_attribute (var_die, type, TREE_READONLY (decl),
|
||||
TREE_THIS_VOLATILE (decl), context_die);
|
||||
|
||||
if (TREE_PUBLIC (decl))
|
||||
@@ -13694,7 +13703,10 @@ gen_decl_die (tree decl, dw_die_ref cont
|
||||
|
||||
/* Output any DIEs that are needed to specify the type of this data
|
||||
object. */
|
||||
- gen_type_die (TREE_TYPE (decl), context_die);
|
||||
+ if (TREE_CODE (decl) == RESULT_DECL && DECL_BY_REFERENCE (decl))
|
||||
+ gen_type_die (TREE_TYPE (TREE_TYPE (decl)), context_die);
|
||||
+ else
|
||||
+ gen_type_die (TREE_TYPE (decl), context_die);
|
||||
|
||||
/* And its containing type. */
|
||||
origin = decl_class_context (decl);
|
||||
@@ -13728,7 +13740,10 @@ gen_decl_die (tree decl, dw_die_ref cont
|
||||
break;
|
||||
|
||||
case PARM_DECL:
|
||||
- gen_type_die (TREE_TYPE (decl), context_die);
|
||||
+ if (DECL_BY_REFERENCE (decl))
|
||||
+ gen_type_die (TREE_TYPE (TREE_TYPE (decl)), context_die);
|
||||
+ else
|
||||
+ gen_type_die (TREE_TYPE (decl), context_die);
|
||||
gen_formal_parameter_die (decl, context_die);
|
||||
break;
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
2007-10-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33616
|
||||
* decl2.c (build_offset_ref_call_from_tree): Call
|
||||
build_non_dependent_expr on object prior to building ADDR_EXPR from it
|
||||
if FN is DOTSTAR_EXPR.
|
||||
|
||||
* g++.dg/template/ptrmem18.C: New test.
|
||||
|
||||
--- gcc/cp/decl2.c (revision 129783)
|
||||
+++ gcc/cp/decl2.c (revision 129784)
|
||||
@@ -3499,9 +3499,9 @@ build_offset_ref_call_from_tree (tree fn
|
||||
parameter. That must be done before the FN is transformed
|
||||
because we depend on the form of FN. */
|
||||
args = build_non_dependent_args (args);
|
||||
+ object = build_non_dependent_expr (object);
|
||||
if (TREE_CODE (fn) == DOTSTAR_EXPR)
|
||||
object = build_unary_op (ADDR_EXPR, object, 0);
|
||||
- object = build_non_dependent_expr (object);
|
||||
args = tree_cons (NULL_TREE, object, args);
|
||||
/* Now that the arguments are done, transform FN. */
|
||||
fn = build_non_dependent_expr (fn);
|
||||
--- gcc/testsuite/g++.dg/template/ptrmem18.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/ptrmem18.C (revision 129784)
|
||||
@@ -0,0 +1,49 @@
|
||||
+// PR c++/33616
|
||||
+// { dg-do run }
|
||||
+// { dg-options "-O2" }
|
||||
+
|
||||
+extern "C" void abort ();
|
||||
+
|
||||
+struct S {
|
||||
+ int c;
|
||||
+ S () : c (0) {}
|
||||
+ virtual void f1 () { c += 1; }
|
||||
+ virtual void f2 () { c += 16; }
|
||||
+};
|
||||
+
|
||||
+struct T {
|
||||
+ S s;
|
||||
+};
|
||||
+
|
||||
+typedef void (S::*Q) ();
|
||||
+
|
||||
+template <Q P>
|
||||
+void test1 (T *t)
|
||||
+{
|
||||
+ (t->s.*P)();
|
||||
+}
|
||||
+
|
||||
+template <Q P>
|
||||
+void test2 (T *t)
|
||||
+{
|
||||
+ S &s = t->s;
|
||||
+ (s.*P)();
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ T t;
|
||||
+ test1 <&S::f1> (&t);
|
||||
+ if (t.s.c != 1)
|
||||
+ abort ();
|
||||
+ test1 <&S::f2> (&t);
|
||||
+ if (t.s.c != 17)
|
||||
+ abort ();
|
||||
+ test2 <&S::f1> (&t);
|
||||
+ if (t.s.c != 18)
|
||||
+ abort ();
|
||||
+ test2 <&S::f2> (&t);
|
||||
+ if (t.s.c != 34)
|
||||
+ abort ();
|
||||
+}
|
|
@ -0,0 +1,77 @@
|
|||
2007-10-15 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/33619
|
||||
* tree-outof-ssa.c (check_replaceable): Return false for all
|
||||
calls other than __builtin_expect.
|
||||
|
||||
* gcc.dg/pr33619.c: New test.
|
||||
|
||||
--- gcc/tree-outof-ssa.c 2007-10-11 22:01:41.000000000 +0200
|
||||
+++ gcc/tree-outof-ssa.c 2007-10-16 14:28:42.000000000 +0200
|
||||
@@ -1570,12 +1570,14 @@ check_replaceable (temp_expr_table_p tab
|
||||
if (flag_float_store && FLOAT_TYPE_P (TREE_TYPE (TREE_OPERAND (stmt, 1))))
|
||||
return false;
|
||||
|
||||
- /* Calls to functions with side-effects cannot be replaced. */
|
||||
+ /* No calls to functions other than __builtin_expect are replaceable. */
|
||||
if ((call_expr = get_call_expr_in (stmt)) != NULL_TREE)
|
||||
{
|
||||
- int call_flags = call_expr_flags (call_expr);
|
||||
- if (TREE_SIDE_EFFECTS (call_expr)
|
||||
- && !(call_flags & (ECF_PURE | ECF_CONST | ECF_NORETURN)))
|
||||
+ tree fndecl = get_callee_fndecl (call_expr);
|
||||
+
|
||||
+ if (fndecl == NULL_TREE
|
||||
+ || DECL_BUILT_IN_CLASS (fndecl) != BUILT_IN_NORMAL
|
||||
+ || DECL_FUNCTION_CODE (fndecl) != BUILT_IN_EXPECT)
|
||||
return false;
|
||||
}
|
||||
|
||||
--- gcc/testsuite/gcc.dg/pr33619.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/pr33619.c (revision 129350)
|
||||
@@ -0,0 +1,45 @@
|
||||
+/* PR tree-optimization/33619 */
|
||||
+/* { dg-do run } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+#ifdef __powerpc__
|
||||
+# define REG1 __asm__ ("3")
|
||||
+# define REG2 __asm__ ("4")
|
||||
+#elif defined __x86_64__
|
||||
+# define REG1 __asm__ ("rdi")
|
||||
+# define REG2 __asm__ ("rsi")
|
||||
+#else
|
||||
+# define REG1
|
||||
+# define REG2
|
||||
+#endif
|
||||
+
|
||||
+static inline void
|
||||
+bar (unsigned long x, int y)
|
||||
+{
|
||||
+ register unsigned long p1 REG1 = x;
|
||||
+ register unsigned long p2 REG2 = y;
|
||||
+ __asm__ volatile ("" : "=r" (p1), "=r" (p2) : "0" (p1), "1" (p2) : "memory");
|
||||
+ if (p1 != 0xdeadUL || p2 != 0xbefUL)
|
||||
+ __builtin_abort ();
|
||||
+}
|
||||
+
|
||||
+__attribute__((const, noinline)) int
|
||||
+baz (int x)
|
||||
+{
|
||||
+ return x;
|
||||
+}
|
||||
+
|
||||
+__attribute__((noinline)) void
|
||||
+foo (unsigned long *x, int y)
|
||||
+{
|
||||
+ unsigned long a = *x;
|
||||
+ bar (a, baz (y));
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ unsigned long a = 0xdeadUL;
|
||||
+ foo (&a, 0xbefUL);
|
||||
+ return 0;
|
||||
+}
|
|
@ -0,0 +1,84 @@
|
|||
2007-10-03 Andrew Haley <aph@redhat.com>
|
||||
|
||||
PR java/33639
|
||||
* class.c (mangled_classname): Detect and replace illegal
|
||||
characters in assembly language symbols.
|
||||
(gen_indirect_dispatch_tables): Call mangled_classname() on
|
||||
the type.
|
||||
|
||||
--- gcc/java/class.c (revision 128980)
|
||||
+++ gcc/java/class.c (revision 128981)
|
||||
@@ -314,10 +314,63 @@ identifier_subst (const tree old_id,
|
||||
tree
|
||||
mangled_classname (const char *prefix, tree type)
|
||||
{
|
||||
+ tree result;
|
||||
tree ident = TYPE_NAME (type);
|
||||
if (TREE_CODE (ident) != IDENTIFIER_NODE)
|
||||
ident = DECL_NAME (ident);
|
||||
- return identifier_subst (ident, prefix, '.', '_', "");
|
||||
+ result = identifier_subst (ident, prefix, '.', '_', "");
|
||||
+
|
||||
+ /* Replace any characters that aren't in the set [0-9a-zA-Z_$] with
|
||||
+ "_0xXX". Class names containing such chracters are uncommon, but
|
||||
+ they do sometimes occur in class files. Without this check,
|
||||
+ these names cause assembly errors.
|
||||
+
|
||||
+ There is a possibility that a real class name could conflict with
|
||||
+ the identifier we generate, but it is unlikely and will
|
||||
+ immediately be detected as an assembler error. At some point we
|
||||
+ should do something more elaborate (perhaps using the full
|
||||
+ unicode mangling scheme) in order to prevent such a conflict. */
|
||||
+ {
|
||||
+ int i;
|
||||
+ const int len = IDENTIFIER_LENGTH (result);
|
||||
+ const char *p = IDENTIFIER_POINTER (result);
|
||||
+ int illegal_chars = 0;
|
||||
+
|
||||
+ /* Make two passes over the identifier. The first pass is merely
|
||||
+ to count illegal characters; we need to do this in order to
|
||||
+ allocate a buffer. */
|
||||
+ for (i = 0; i < len; i++)
|
||||
+ {
|
||||
+ char c = p[i];
|
||||
+ illegal_chars += (! ISALNUM (c) && c != '_' && c != '$');
|
||||
+ }
|
||||
+
|
||||
+ /* And the second pass, which is rarely executed, does the
|
||||
+ rewriting. */
|
||||
+ if (illegal_chars != 0)
|
||||
+ {
|
||||
+ char *buffer = alloca (illegal_chars * 4 + len + 1);
|
||||
+ int j;
|
||||
+
|
||||
+ for (i = 0, j = 0; i < len; i++)
|
||||
+ {
|
||||
+ char c = p[i];
|
||||
+ if (! ISALNUM (c) && c != '_' && c != '$')
|
||||
+ {
|
||||
+ buffer[j++] = '_';
|
||||
+ sprintf (&buffer[j], "0x%02x", c);
|
||||
+ j += 4;
|
||||
+ }
|
||||
+ else
|
||||
+ buffer[j++] = c;
|
||||
+ }
|
||||
+
|
||||
+ buffer[j] = 0;
|
||||
+ result = get_identifier (buffer);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return result;
|
||||
}
|
||||
|
||||
tree
|
||||
@@ -389,7 +442,7 @@ while (0)
|
||||
void
|
||||
gen_indirect_dispatch_tables (tree type)
|
||||
{
|
||||
- const char *typename = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
|
||||
+ const char *typename = IDENTIFIER_POINTER (mangled_classname ("", type));
|
||||
{
|
||||
tree field = NULL;
|
||||
char *buf = alloca (strlen (typename) + strlen ("_catch_classes_") + 1);
|
|
@ -0,0 +1,189 @@
|
|||
2007-10-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/33723
|
||||
* c-gimplify.c (c_gimplify_expr): Optimize INIT_EXPR or
|
||||
MODIFY_EXPR with non-addressable COMPOUND_LITERAL_EXPR as source.
|
||||
|
||||
2007-11-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR testsuite/33978
|
||||
* gcc.dg/tree-ssa/pr33723.c: Adjust scan pattern to make it less
|
||||
dependent on target settings like move_by_pieces etc.
|
||||
|
||||
2007-10-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/33723
|
||||
* gcc.dg/tree-ssa/pr33723.c (T): Decrease size of field s.
|
||||
|
||||
2007-10-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/33723
|
||||
* gcc.c-torture/execute/20071029-1.c: New test.
|
||||
* gcc.dg/tree-ssa/pr33723.c: New test.
|
||||
|
||||
--- gcc/c-gimplify.c (revision 129742)
|
||||
+++ gcc/c-gimplify.c (revision 129743)
|
||||
@@ -233,6 +233,29 @@ c_gimplify_expr (tree *expr_p, tree *pre
|
||||
case COMPOUND_LITERAL_EXPR:
|
||||
return gimplify_compound_literal_expr (expr_p, pre_p);
|
||||
|
||||
+ case INIT_EXPR:
|
||||
+ case MODIFY_EXPR:
|
||||
+ if (TREE_CODE (TREE_OPERAND (*expr_p, 1)) == COMPOUND_LITERAL_EXPR)
|
||||
+ {
|
||||
+ tree complit = TREE_OPERAND (*expr_p, 1);
|
||||
+ tree decl_s = COMPOUND_LITERAL_EXPR_DECL_STMT (complit);
|
||||
+ tree decl = DECL_EXPR_DECL (decl_s);
|
||||
+ tree init = DECL_INITIAL (decl);
|
||||
+
|
||||
+ /* struct T x = (struct T) { 0, 1, 2 } can be optimized
|
||||
+ into struct T x = { 0, 1, 2 } if the address of the
|
||||
+ compound literal has never been taken. */
|
||||
+ if (!TREE_ADDRESSABLE (complit)
|
||||
+ && !TREE_ADDRESSABLE (decl)
|
||||
+ && init)
|
||||
+ {
|
||||
+ *expr_p = copy_node (*expr_p);
|
||||
+ TREE_OPERAND (*expr_p, 1) = init;
|
||||
+ return GS_OK;
|
||||
+ }
|
||||
+ }
|
||||
+ return GS_UNHANDLED;
|
||||
+
|
||||
default:
|
||||
return GS_UNHANDLED;
|
||||
}
|
||||
--- gcc/testsuite/gcc.c-torture/execute/20071029-1.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.c-torture/execute/20071029-1.c (revision 129743)
|
||||
@@ -0,0 +1,56 @@
|
||||
+extern void exit (int);
|
||||
+extern void abort (void);
|
||||
+
|
||||
+typedef union
|
||||
+{
|
||||
+ struct
|
||||
+ {
|
||||
+ int f1, f2, f3, f4, f5, f6, f7, f8;
|
||||
+ long int f9, f10;
|
||||
+ int f11;
|
||||
+ } f;
|
||||
+ char s[56];
|
||||
+ long int a;
|
||||
+} T;
|
||||
+
|
||||
+__attribute__((noinline))
|
||||
+void
|
||||
+test (T *t)
|
||||
+{
|
||||
+ static int i = 11;
|
||||
+ if (t->f.f1 != i++)
|
||||
+ abort ();
|
||||
+ if (t->f.f2 || t->f.f3 || t->f.f4 || t->f.f5 || t->f.f6
|
||||
+ || t->f.f7 || t->f.f8 || t->f.f9 || t->f.f10 || t->f.f11)
|
||||
+ abort ();
|
||||
+ if (i == 20)
|
||||
+ exit (0);
|
||||
+}
|
||||
+
|
||||
+__attribute__((noinline))
|
||||
+void
|
||||
+foo (int i)
|
||||
+{
|
||||
+ T t;
|
||||
+again:
|
||||
+ t = (T) { { ++i, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
|
||||
+ test (&t);
|
||||
+ goto again;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ T *t1, *t2;
|
||||
+ int cnt = 0;
|
||||
+ t1 = (T *) 0;
|
||||
+loop:
|
||||
+ t2 = t1;
|
||||
+ t1 = & (T) { .f.f9 = cnt++ };
|
||||
+ if (cnt < 3)
|
||||
+ goto loop;
|
||||
+ if (t1 != t2 || t1->f.f9 != 2)
|
||||
+ abort ();
|
||||
+ foo (10);
|
||||
+ return 0;
|
||||
+}
|
||||
--- gcc/testsuite/gcc.dg/tree-ssa/pr33723.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/tree-ssa/pr33723.c (revision 129743)
|
||||
@@ -0,0 +1,72 @@
|
||||
+/* PR tree-optimization/33723 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2 -fdump-tree-gimple" } */
|
||||
+
|
||||
+typedef union
|
||||
+{
|
||||
+ struct
|
||||
+ {
|
||||
+ int f1, f2, f3, f4, f5, f6, f7, f8;
|
||||
+ long int f9, f10;
|
||||
+ int f11;
|
||||
+ } f;
|
||||
+ char s[4];
|
||||
+ long int a;
|
||||
+} T;
|
||||
+
|
||||
+void
|
||||
+foo1 (void)
|
||||
+{
|
||||
+ T t;
|
||||
+ t = (T) { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+bar1 (void)
|
||||
+{
|
||||
+ T t = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+baz1 (void)
|
||||
+{
|
||||
+ T t;
|
||||
+ t = (const T) { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+foo2 (void)
|
||||
+{
|
||||
+ T t;
|
||||
+ t = (T) { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+bar2 (void)
|
||||
+{
|
||||
+ T t = { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+baz2 (void)
|
||||
+{
|
||||
+ T t;
|
||||
+ t = (const T) { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+baz3 (void)
|
||||
+{
|
||||
+ T t;
|
||||
+ t = (const T) (T) { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-tree-dump-not "t = D" "gimple"} } */
|
||||
+/* { dg-final { cleanup-tree-dump "gimple" } } */
|
|
@ -0,0 +1,153 @@
|
|||
2007-10-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/33763
|
||||
* gcc.dg/pr33763.c: New test.
|
||||
* g++.dg/opt/inline12.C: New test.
|
||||
|
||||
2007-10-14 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
PR tree-optimization/33763
|
||||
* tree-inline.c (expand_call_inline): Silently ignore always_inline
|
||||
attribute for redefined extern inline functions.
|
||||
|
||||
--- gcc/tree-inline.c.jj 2007-09-25 12:23:05.000000000 +0200
|
||||
+++ gcc/tree-inline.c 2007-10-16 15:27:51.000000000 +0200
|
||||
@@ -2059,6 +2059,12 @@ expand_call_inline (basic_block bb, tree
|
||||
if (!cgraph_inline_p (cg_edge, &reason))
|
||||
{
|
||||
if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn))
|
||||
+ /* For extern inline functions that get redefined we always
|
||||
+ silently ignored alway_inline flag. Better behaviour would
|
||||
+ be to be able to keep both bodies and use extern inline body
|
||||
+ for inlining, but we can't do that because frontends overwrite
|
||||
+ the body. */
|
||||
+ && !cg_edge->callee->local.redefined_extern_inline
|
||||
/* Avoid warnings during early inline pass. */
|
||||
&& (!flag_unit_at_a_time || cgraph_global_info_ready))
|
||||
{
|
||||
--- gcc/testsuite/gcc.dg/pr33763.c.jj 2007-10-16 15:20:41.000000000 +0200
|
||||
+++ gcc/testsuite/gcc.dg/pr33763.c 2007-10-16 15:20:35.000000000 +0200
|
||||
@@ -0,0 +1,60 @@
|
||||
+/* PR tree-optimization/33763 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+typedef struct
|
||||
+{
|
||||
+ void *a;
|
||||
+ void *b;
|
||||
+} T;
|
||||
+extern void *foo (const char *, const char *);
|
||||
+extern void *bar (void *, const char *, T);
|
||||
+extern int baz (const char *, int);
|
||||
+
|
||||
+extern inline __attribute__ ((always_inline, gnu_inline)) int
|
||||
+baz (const char *x, int y)
|
||||
+{
|
||||
+ return 2;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+baz (const char *x, int y)
|
||||
+{
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+int xa, xb;
|
||||
+
|
||||
+static void *
|
||||
+inl (const char *x, const char *y)
|
||||
+{
|
||||
+ T t = { &xa, &xb };
|
||||
+ int *f = (int *) __builtin_malloc (sizeof (int));
|
||||
+ const char *z;
|
||||
+ int o = 0;
|
||||
+ void *r = 0;
|
||||
+
|
||||
+ for (z = y; *z; z++)
|
||||
+ {
|
||||
+ if (*z == 'r')
|
||||
+ o |= 1;
|
||||
+ if (*z == 'w')
|
||||
+ o |= 2;
|
||||
+ }
|
||||
+ if (o == 1)
|
||||
+ *f = baz (x, 0);
|
||||
+ if (o == 2)
|
||||
+ *f = baz (x, 1);
|
||||
+ if (o == 3)
|
||||
+ *f = baz (x, 2);
|
||||
+
|
||||
+ if (o && *f > 0)
|
||||
+ r = bar (f, "w", t);
|
||||
+ return r;
|
||||
+}
|
||||
+
|
||||
+void *
|
||||
+foo (const char *x, const char *y)
|
||||
+{
|
||||
+ return inl (x, y);
|
||||
+}
|
||||
--- gcc/testsuite/g++.dg/opt/inline12.C.jj 2007-10-16 15:26:01.000000000 +0200
|
||||
+++ gcc/testsuite/g++.dg/opt/inline12.C 2007-10-16 15:26:20.000000000 +0200
|
||||
@@ -0,0 +1,60 @@
|
||||
+// PR tree-optimization/33763
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-O2" }
|
||||
+
|
||||
+typedef struct
|
||||
+{
|
||||
+ void *a;
|
||||
+ void *b;
|
||||
+} T;
|
||||
+extern void *foo (const char *, const char *);
|
||||
+extern void *bar (void *, const char *, T);
|
||||
+extern int baz (const char *, int);
|
||||
+
|
||||
+extern inline __attribute__ ((always_inline, gnu_inline)) int
|
||||
+baz (const char *x, int y)
|
||||
+{
|
||||
+ return 2;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+baz (const char *x, int y)
|
||||
+{
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+int xa, xb;
|
||||
+
|
||||
+static void *
|
||||
+inl (const char *x, const char *y)
|
||||
+{
|
||||
+ T t = { &xa, &xb };
|
||||
+ int *f = (int *) __builtin_malloc (sizeof (int));
|
||||
+ const char *z;
|
||||
+ int o = 0;
|
||||
+ void *r = 0;
|
||||
+
|
||||
+ for (z = y; *z; z++)
|
||||
+ {
|
||||
+ if (*z == 'r')
|
||||
+ o |= 1;
|
||||
+ if (*z == 'w')
|
||||
+ o |= 2;
|
||||
+ }
|
||||
+ if (o == 1)
|
||||
+ *f = baz (x, 0);
|
||||
+ if (o == 2)
|
||||
+ *f = baz (x, 1);
|
||||
+ if (o == 3)
|
||||
+ *f = baz (x, 2);
|
||||
+
|
||||
+ if (o && *f > 0)
|
||||
+ r = bar (f, "w", t);
|
||||
+ return r;
|
||||
+}
|
||||
+
|
||||
+void *
|
||||
+foo (const char *x, const char *y)
|
||||
+{
|
||||
+ return inl (x, y);
|
||||
+}
|
|
@ -0,0 +1,51 @@
|
|||
2007-11-05 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33836
|
||||
* parser.c (cp_parser_unary_expression): For &&label call
|
||||
cp_parser_non_integral_constant_expression and return error_mark_node
|
||||
if it returned true.
|
||||
|
||||
* g++.dg/ext/label10.C: New test.
|
||||
|
||||
--- gcc/cp/parser.c (revision 129895)
|
||||
+++ gcc/cp/parser.c (revision 129896)
|
||||
@@ -5329,13 +5329,18 @@ cp_parser_unary_expression (cp_parser *p
|
||||
&& token->type == CPP_AND_AND)
|
||||
{
|
||||
tree identifier;
|
||||
+ tree expression;
|
||||
|
||||
/* Consume the '&&' token. */
|
||||
cp_lexer_consume_token (parser->lexer);
|
||||
/* Look for the identifier. */
|
||||
identifier = cp_parser_identifier (parser);
|
||||
/* Create an expression representing the address. */
|
||||
- return finish_label_address_expr (identifier);
|
||||
+ expression = finish_label_address_expr (identifier);
|
||||
+ if (cp_parser_non_integral_constant_expression (parser,
|
||||
+ "the address of a label"))
|
||||
+ expression = error_mark_node;
|
||||
+ return expression;
|
||||
}
|
||||
}
|
||||
if (unary_operator != ERROR_MARK)
|
||||
--- gcc/testsuite/g++.dg/ext/label10.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/ext/label10.C (revision 129896)
|
||||
@@ -0,0 +1,17 @@
|
||||
+// PR c++/33836
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-std=gnu++98" }
|
||||
+
|
||||
+template<int N> struct A
|
||||
+{
|
||||
+ enum { M = && N }; // { dg-error "referenced outside|cannot appear in" }
|
||||
+};
|
||||
+
|
||||
+A<0> a;
|
||||
+
|
||||
+void foo ()
|
||||
+{
|
||||
+ __label__ P;
|
||||
+ enum { O = && P }; // { dg-error "cannot appear in" }
|
||||
+ P:;
|
||||
+}
|
|
@ -0,0 +1,130 @@
|
|||
2007-10-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33842
|
||||
* cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
|
||||
* cxx-pretty-print.c (pp_cxx_primary_expression): Handle
|
||||
OFFSETOF_EXPR.
|
||||
(pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
|
||||
functions.
|
||||
* error.c (dump_expr): Handle OFFSETOF_EXPR.
|
||||
|
||||
* g++.dg/template/error34.C: New test.
|
||||
|
||||
--- gcc/cp/error.c (revision 129676)
|
||||
+++ gcc/cp/error.c (revision 129677)
|
||||
@@ -1887,6 +1887,10 @@ dump_expr (tree t, int flags)
|
||||
dump_expr (TREE_OPERAND (t, 0), flags);
|
||||
break;
|
||||
|
||||
+ case OFFSETOF_EXPR:
|
||||
+ pp_cxx_offsetof_expression (cxx_pp, t);
|
||||
+ break;
|
||||
+
|
||||
/* This list is incomplete, but should suffice for now.
|
||||
It is very important that `sorry' does not call
|
||||
`report_error_function'. That could cause an infinite loop. */
|
||||
--- gcc/cp/cxx-pretty-print.c (revision 129676)
|
||||
+++ gcc/cp/cxx-pretty-print.c (revision 129677)
|
||||
@@ -356,6 +356,10 @@ pp_cxx_primary_expression (cxx_pretty_pr
|
||||
pp_cxx_right_paren (pp);
|
||||
break;
|
||||
|
||||
+ case OFFSETOF_EXPR:
|
||||
+ pp_cxx_offsetof_expression (pp, t);
|
||||
+ break;
|
||||
+
|
||||
default:
|
||||
pp_c_primary_expression (pp_c_base (pp), t);
|
||||
break;
|
||||
@@ -1944,6 +1948,49 @@ typedef c_pretty_print_fn pp_fun;
|
||||
|
||||
/* Initialization of a C++ pretty-printer object. */
|
||||
|
||||
+static bool
|
||||
+pp_cxx_offsetof_expression_1 (cxx_pretty_printer *pp, tree t)
|
||||
+{
|
||||
+ switch (TREE_CODE (t))
|
||||
+ {
|
||||
+ case ARROW_EXPR:
|
||||
+ if (TREE_CODE (TREE_OPERAND (t, 0)) == STATIC_CAST_EXPR
|
||||
+ && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (t, 0))))
|
||||
+ {
|
||||
+ pp_cxx_type_id (pp, TREE_TYPE (TREE_TYPE (TREE_OPERAND (t, 0))));
|
||||
+ pp_cxx_separate_with (pp, ',');
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+ case COMPONENT_REF:
|
||||
+ if (!pp_cxx_offsetof_expression_1 (pp, TREE_OPERAND (t, 0)))
|
||||
+ return false;
|
||||
+ if (TREE_CODE (TREE_OPERAND (t, 0)) != ARROW_EXPR)
|
||||
+ pp_cxx_dot (pp);
|
||||
+ pp_cxx_expression (pp, TREE_OPERAND (t, 1));
|
||||
+ return true;
|
||||
+ case ARRAY_REF:
|
||||
+ if (!pp_cxx_offsetof_expression_1 (pp, TREE_OPERAND (t, 0)))
|
||||
+ return false;
|
||||
+ pp_left_bracket (pp);
|
||||
+ pp_cxx_expression (pp, TREE_OPERAND (t, 1));
|
||||
+ pp_right_bracket (pp);
|
||||
+ return true;
|
||||
+ default:
|
||||
+ return false;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+pp_cxx_offsetof_expression (cxx_pretty_printer *pp, tree t)
|
||||
+{
|
||||
+ pp_cxx_identifier (pp, "offsetof");
|
||||
+ pp_cxx_left_paren (pp);
|
||||
+ if (!pp_cxx_offsetof_expression_1 (pp, TREE_OPERAND (t, 0)))
|
||||
+ pp_cxx_expression (pp, TREE_OPERAND (t, 0));
|
||||
+ pp_cxx_right_paren (pp);
|
||||
+}
|
||||
+
|
||||
void
|
||||
pp_cxx_pretty_printer_init (cxx_pretty_printer *pp)
|
||||
{
|
||||
--- gcc/cp/cxx-pretty-print.h (revision 129676)
|
||||
+++ gcc/cp/cxx-pretty-print.h (revision 129677)
|
||||
@@ -70,6 +70,6 @@ void pp_cxx_separate_with (cxx_pretty_pr
|
||||
|
||||
void pp_cxx_declaration (cxx_pretty_printer *, tree);
|
||||
void pp_cxx_canonical_template_parameter (cxx_pretty_printer *, tree);
|
||||
-
|
||||
+void pp_cxx_offsetof_expression (cxx_pretty_printer *, tree);
|
||||
|
||||
#endif /* GCC_CXX_PRETTY_PRINT_H */
|
||||
--- gcc/testsuite/g++.dg/template/error34.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/error34.C (revision 129677)
|
||||
@@ -0,0 +1,29 @@
|
||||
+// PR c++/33842
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+template<typename T> struct A
|
||||
+{
|
||||
+ A<__builtin_offsetof(T, x)>(); // { dg-error "type/value mismatch|offsetof\\(T, x\\)" }
|
||||
+};
|
||||
+
|
||||
+template<typename T> struct B
|
||||
+{
|
||||
+ B<__builtin_offsetof(T, x.y)>(); // { dg-error "type/value mismatch|offsetof\\(T, x.y\\)" }
|
||||
+};
|
||||
+
|
||||
+template<typename T> struct C
|
||||
+{
|
||||
+ C<__builtin_offsetof(T, x[6])>(); // { dg-error "type/value mismatch|offsetof\\(T, x\\\[6\\\]\\)" }
|
||||
+};
|
||||
+
|
||||
+template<typename T> struct D
|
||||
+{
|
||||
+ D<__builtin_offsetof(T, x.y[6].z)>(); // { dg-error "type/value mismatch|offsetof\\(T, x.y\\\[6\\\].z\\)" }
|
||||
+};
|
||||
+
|
||||
+struct E { int x; };
|
||||
+
|
||||
+template<typename T> struct F
|
||||
+{
|
||||
+ F<__builtin_offsetof(E, x)>(); // { dg-error "type/value mismatch|offsetof\\(E, x\\)" }
|
||||
+};
|
|
@ -0,0 +1,56 @@
|
|||
2007-10-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33844
|
||||
* cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
|
||||
->* rather than .*.
|
||||
* error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
|
||||
|
||||
* g++.dg/other/ptrmem8.C: New test.
|
||||
|
||||
--- gcc/cp/error.c (revision 129681)
|
||||
+++ gcc/cp/error.c (revision 129682)
|
||||
@@ -1891,6 +1891,11 @@ dump_expr (tree t, int flags)
|
||||
pp_cxx_offsetof_expression (cxx_pp, t);
|
||||
break;
|
||||
|
||||
+ case MEMBER_REF:
|
||||
+ case DOTSTAR_EXPR:
|
||||
+ pp_multiplicative_expression (cxx_pp, t);
|
||||
+ break;
|
||||
+
|
||||
/* This list is incomplete, but should suffice for now.
|
||||
It is very important that `sorry' does not call
|
||||
`report_error_function'. That could cause an infinite loop. */
|
||||
--- gcc/cp/cxx-pretty-print.c (revision 129681)
|
||||
+++ gcc/cp/cxx-pretty-print.c (revision 129682)
|
||||
@@ -814,7 +814,10 @@ pp_cxx_pm_expression (cxx_pretty_printer
|
||||
case MEMBER_REF:
|
||||
case DOTSTAR_EXPR:
|
||||
pp_cxx_pm_expression (pp, TREE_OPERAND (t, 0));
|
||||
- pp_cxx_dot (pp);
|
||||
+ if (TREE_CODE (t) == MEMBER_REF)
|
||||
+ pp_cxx_arrow (pp);
|
||||
+ else
|
||||
+ pp_cxx_dot (pp);
|
||||
pp_star(pp);
|
||||
pp_cxx_cast_expression (pp, TREE_OPERAND (t, 1));
|
||||
break;
|
||||
--- gcc/testsuite/g++.dg/other/ptrmem8.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/other/ptrmem8.C (revision 129682)
|
||||
@@ -0,0 +1,16 @@
|
||||
+// PR c++/33844
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+struct A {};
|
||||
+
|
||||
+template<int> void foo(void (A::* f)())
|
||||
+{
|
||||
+ A a;
|
||||
+ &(a.*f); // { dg-error "invalid use of\[^\n\]*\\.\\*\[^\n\]*to form|qualified-id is required" }
|
||||
+}
|
||||
+
|
||||
+template<int> void bar(void (A::* f)())
|
||||
+{
|
||||
+ A *p;
|
||||
+ &(p->*f); // { dg-error "invalid use of\[^\n\]*->\\*\[^\n\]*to form|qualified-id is required" }
|
||||
+}
|
|
@ -0,0 +1,82 @@
|
|||
2007-12-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33890
|
||||
* semantics.c (finish_omp_for): Don't call
|
||||
fold_build_cleanup_point_expr if processing_template_decl.
|
||||
|
||||
* g++.dg/gomp/pr33890.C: New test.
|
||||
|
||||
--- gcc/cp/semantics.c.jj 2007-12-05 21:42:07.000000000 +0100
|
||||
+++ gcc/cp/semantics.c 2007-12-27 23:45:39.000000000 +0100
|
||||
@@ -3893,15 +3893,17 @@ finish_omp_for (location_t locus, tree d
|
||||
pre_body = NULL;
|
||||
}
|
||||
|
||||
- init = fold_build_cleanup_point_expr (TREE_TYPE (init), init);
|
||||
+ if (!processing_template_decl)
|
||||
+ init = fold_build_cleanup_point_expr (TREE_TYPE (init), init);
|
||||
init = build_modify_expr (decl, NOP_EXPR, init);
|
||||
if (cond && TREE_SIDE_EFFECTS (cond) && COMPARISON_CLASS_P (cond))
|
||||
{
|
||||
int n = TREE_SIDE_EFFECTS (TREE_OPERAND (cond, 1)) != 0;
|
||||
tree t = TREE_OPERAND (cond, n);
|
||||
|
||||
- TREE_OPERAND (cond, n)
|
||||
- = fold_build_cleanup_point_expr (TREE_TYPE (t), t);
|
||||
+ if (!processing_template_decl)
|
||||
+ TREE_OPERAND (cond, n)
|
||||
+ = fold_build_cleanup_point_expr (TREE_TYPE (t), t);
|
||||
}
|
||||
omp_for = c_finish_omp_for (locus, decl, init, cond, incr, body, pre_body);
|
||||
if (omp_for != NULL
|
||||
@@ -3912,9 +3914,10 @@ finish_omp_for (location_t locus, tree d
|
||||
tree t = TREE_OPERAND (OMP_FOR_INCR (omp_for), 1);
|
||||
int n = TREE_SIDE_EFFECTS (TREE_OPERAND (t, 1)) != 0;
|
||||
|
||||
- TREE_OPERAND (t, n)
|
||||
- = fold_build_cleanup_point_expr (TREE_TYPE (TREE_OPERAND (t, n)),
|
||||
- TREE_OPERAND (t, n));
|
||||
+ if (!processing_template_decl)
|
||||
+ TREE_OPERAND (t, n)
|
||||
+ = fold_build_cleanup_point_expr (TREE_TYPE (TREE_OPERAND (t, n)),
|
||||
+ TREE_OPERAND (t, n));
|
||||
}
|
||||
return omp_for;
|
||||
}
|
||||
--- gcc/testsuite/g++.dg/gomp/pr33890.C.jj 2007-12-27 23:45:39.000000000 +0100
|
||||
+++ gcc/testsuite/g++.dg/gomp/pr33890.C 2007-12-27 23:45:39.000000000 +0100
|
||||
@@ -0,0 +1,34 @@
|
||||
+// PR c++/33890
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-fopenmp" }
|
||||
+
|
||||
+struct A
|
||||
+{
|
||||
+ int x;
|
||||
+ A () : x (0) {}
|
||||
+ int & getX ();
|
||||
+};
|
||||
+
|
||||
+template <int> void
|
||||
+foo ()
|
||||
+{
|
||||
+ A a;
|
||||
+
|
||||
+#pragma omp for
|
||||
+ for (int i = a.getX (); i < 10; ++i)
|
||||
+ ;
|
||||
+#pragma omp for
|
||||
+ for (int i = 0; i < a.getX (); ++i)
|
||||
+ ;
|
||||
+ a.x = 1;
|
||||
+#pragma omp for
|
||||
+ for (int i = 0; i < 10; i += a.getX ())
|
||||
+ ;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+bar ()
|
||||
+{
|
||||
+ foo <0> ();
|
||||
+ foo <1> ();
|
||||
+}
|
|
@ -0,0 +1,39 @@
|
|||
2007-11-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33962
|
||||
* pt.c (more_specialized_fn): Don't segfault if one or
|
||||
both argument list end with ellipsis.
|
||||
|
||||
* g++.dg/overload/template3.C: New test.
|
||||
|
||||
--- gcc/cp/pt.c (revision 130307)
|
||||
+++ gcc/cp/pt.c (revision 130308)
|
||||
@@ -13523,6 +13523,10 @@ more_specialized_fn (tree pat1, tree pat
|
||||
|
||||
args1 = TREE_CHAIN (args1);
|
||||
args2 = TREE_CHAIN (args2);
|
||||
+
|
||||
+ /* Stop when an ellipsis is seen. */
|
||||
+ if (args1 == NULL_TREE || args2 == NULL_TREE)
|
||||
+ break;
|
||||
}
|
||||
|
||||
processing_template_decl--;
|
||||
--- gcc/testsuite/g++.dg/overload/template3.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/overload/template3.C (revision 130308)
|
||||
@@ -0,0 +1,15 @@
|
||||
+// PR c++/33962
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+template <class T> struct A;
|
||||
+
|
||||
+template <class U> void foo (const U &x, ...);
|
||||
+template <class T> void foo (const A<T> &x, ...);
|
||||
+
|
||||
+void bar (const A<int> &x, const char *y)
|
||||
+{
|
||||
+ foo (x, y);
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-assembler "_Z3fooIiEvRK1AIT_Ez" } } */
|
||||
+/* { dg-final { scan-assembler-not "_Z3fooI1AIiEEvRKT_z" } } */
|
|
@ -0,0 +1,62 @@
|
|||
2007-11-12 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/34070
|
||||
* fold-const.c (fold_binary): If testing for non-negative
|
||||
operands with tree_expr_nonnegative_warnv_p make sure to
|
||||
use op0 which has all (sign) conversions retained.
|
||||
|
||||
* gcc.c-torture/execute/pr34070-1.c: New testcase.
|
||||
* gcc.c-torture/execute/pr34070-2.c: Likewise.
|
||||
|
||||
--- gcc/fold-const.c (revision 130097)
|
||||
+++ gcc/fold-const.c (revision 130098)
|
||||
@@ -8509,7 +8509,7 @@ fold_binary (enum tree_code code, tree t
|
||||
/* Simplify A / (B << N) where A and B are positive and B is
|
||||
a power of 2, to A >> (N + log2(B)). */
|
||||
if (TREE_CODE (arg1) == LSHIFT_EXPR
|
||||
- && (TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (arg0)))
|
||||
+ && (TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (op0)))
|
||||
{
|
||||
tree sval = TREE_OPERAND (arg1, 0);
|
||||
if (integer_pow2p (sval) && tree_int_cst_sgn (sval) > 0)
|
||||
@@ -8584,7 +8584,7 @@ fold_binary (enum tree_code code, tree t
|
||||
/* Optimize TRUNC_MOD_EXPR by a power of two into a BIT_AND_EXPR,
|
||||
i.e. "X % C" into "X & (C - 1)", if X and C are positive. */
|
||||
if ((code == TRUNC_MOD_EXPR || code == FLOOR_MOD_EXPR)
|
||||
- && (TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (arg0)))
|
||||
+ && (TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (op0)))
|
||||
{
|
||||
tree c = arg1;
|
||||
/* Also optimize A % (C << N) where C is a power of 2,
|
||||
--- gcc/testsuite/gcc.c-torture/execute/pr34070-1.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.c-torture/execute/pr34070-1.c (revision 130098)
|
||||
@@ -0,0 +1,13 @@
|
||||
+extern void abort (void);
|
||||
+
|
||||
+int f(unsigned int x)
|
||||
+{
|
||||
+ return ((int)x) % 4;
|
||||
+}
|
||||
+
|
||||
+int main()
|
||||
+{
|
||||
+ if (f(-1) != -1)
|
||||
+ abort ();
|
||||
+ return 0;
|
||||
+}
|
||||
--- gcc/testsuite/gcc.c-torture/execute/pr34070-2.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.c-torture/execute/pr34070-2.c (revision 130098)
|
||||
@@ -0,0 +1,13 @@
|
||||
+extern void abort (void);
|
||||
+
|
||||
+int f(unsigned int x, int n)
|
||||
+{
|
||||
+ return ((int)x) / (1 << n);
|
||||
+}
|
||||
+
|
||||
+int main()
|
||||
+{
|
||||
+ if (f(-1, 1) != 0)
|
||||
+ abort ();
|
||||
+ return 0;
|
||||
+}
|
|
@ -0,0 +1,39 @@
|
|||
2007-11-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/34089
|
||||
* parser.c (cp_parser_class_head): Reject function template ids.
|
||||
|
||||
* g++.dg/template/crash74.C: New test.
|
||||
|
||||
--- gcc/cp/parser.c (revision 130315)
|
||||
+++ gcc/cp/parser.c (revision 130316)
|
||||
@@ -14536,8 +14536,18 @@ cp_parser_class_head (cp_parser* parser,
|
||||
/* Look up the type. */
|
||||
if (template_id_p)
|
||||
{
|
||||
- type = TREE_TYPE (id);
|
||||
- type = maybe_process_partial_specialization (type);
|
||||
+ if (TREE_CODE (id) == TEMPLATE_ID_EXPR
|
||||
+ && (DECL_FUNCTION_TEMPLATE_P (TREE_OPERAND (id, 0))
|
||||
+ || TREE_CODE (TREE_OPERAND (id, 0)) == OVERLOAD))
|
||||
+ {
|
||||
+ error ("function template %qD redeclared as a class template", id);
|
||||
+ type = error_mark_node;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ type = TREE_TYPE (id);
|
||||
+ type = maybe_process_partial_specialization (type);
|
||||
+ }
|
||||
if (nested_name_specifier)
|
||||
pushed_scope = push_scope (nested_name_specifier);
|
||||
}
|
||||
--- gcc/testsuite/g++.dg/template/crash74.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/crash74.C (revision 130316)
|
||||
@@ -0,0 +1,6 @@
|
||||
+// PR c++/34089
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "" }
|
||||
+
|
||||
+template<typename F> void foo () { }
|
||||
+template<typename F> struct foo<F> { }; // { dg-error "redeclared as" }
|
|
@ -0,0 +1,35 @@
|
|||
2007-11-17 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/34130
|
||||
* fold-const.c (extract_muldiv_1): Do not move negative
|
||||
constants inside ABS_EXPR.
|
||||
|
||||
* gcc.c-torture/execute/pr34130.c: New testcase.
|
||||
|
||||
--- gcc/fold-const.c (revision 130257)
|
||||
+++ gcc/fold-const.c (revision 130258)
|
||||
@@ -6095,6 +6095,9 @@ extract_muldiv_1 (tree t, tree c, enum t
|
||||
}
|
||||
break;
|
||||
}
|
||||
+ /* If the constant is negative, we cannot simplify this. */
|
||||
+ if (tree_int_cst_sgn (c) == -1)
|
||||
+ break;
|
||||
/* FALLTHROUGH */
|
||||
case NEGATE_EXPR:
|
||||
if ((t1 = extract_muldiv (op0, c, code, wide_type, strict_overflow_p))
|
||||
--- gcc/testsuite/gcc.c-torture/execute/pr34130.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.c-torture/execute/pr34130.c (revision 130258)
|
||||
@@ -0,0 +1,12 @@
|
||||
+extern void abort (void);
|
||||
+int foo (int i)
|
||||
+{
|
||||
+ return -2 * __builtin_abs(i - 2);
|
||||
+}
|
||||
+int main()
|
||||
+{
|
||||
+ if (foo(1) != -2
|
||||
+ || foo(3) != -2)
|
||||
+ abort ();
|
||||
+ return 0;
|
||||
+}
|
|
@ -0,0 +1,133 @@
|
|||
2007-11-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/34146
|
||||
* c-gimplify.c (optimize_compound_literals_in_ctor): New function.
|
||||
(c_gimplify_expr): Use it.
|
||||
|
||||
* gcc.dg/tree-ssa/pr34146.c: New test.
|
||||
|
||||
--- gcc/c-gimplify.c (revision 130310)
|
||||
+++ gcc/c-gimplify.c (revision 130311)
|
||||
@@ -208,6 +208,47 @@ gimplify_compound_literal_expr (tree *ex
|
||||
return GS_OK;
|
||||
}
|
||||
|
||||
+/* Optimize embedded COMPOUND_LITERAL_EXPRs within a CONSTRUCTOR,
|
||||
+ return a new CONSTRUCTOR if something changed. */
|
||||
+
|
||||
+static tree
|
||||
+optimize_compound_literals_in_ctor (tree orig_ctor)
|
||||
+{
|
||||
+ tree ctor = orig_ctor;
|
||||
+ VEC(constructor_elt,gc) *elts = CONSTRUCTOR_ELTS (ctor);
|
||||
+ unsigned int idx, num = VEC_length (constructor_elt, elts);
|
||||
+
|
||||
+ for (idx = 0; idx < num; idx++)
|
||||
+ {
|
||||
+ tree value = VEC_index (constructor_elt, elts, idx)->value;
|
||||
+ tree newval = value;
|
||||
+ if (TREE_CODE (value) == CONSTRUCTOR)
|
||||
+ newval = optimize_compound_literals_in_ctor (value);
|
||||
+ else if (TREE_CODE (value) == COMPOUND_LITERAL_EXPR)
|
||||
+ {
|
||||
+ tree decl_s = COMPOUND_LITERAL_EXPR_DECL_STMT (value);
|
||||
+ tree decl = DECL_EXPR_DECL (decl_s);
|
||||
+ tree init = DECL_INITIAL (decl);
|
||||
+
|
||||
+ if (!TREE_ADDRESSABLE (value)
|
||||
+ && !TREE_ADDRESSABLE (decl)
|
||||
+ && init)
|
||||
+ newval = init;
|
||||
+ }
|
||||
+ if (newval == value)
|
||||
+ continue;
|
||||
+
|
||||
+ if (ctor == orig_ctor)
|
||||
+ {
|
||||
+ ctor = copy_node (orig_ctor);
|
||||
+ CONSTRUCTOR_ELTS (ctor) = VEC_copy (constructor_elt, gc, elts);
|
||||
+ elts = CONSTRUCTOR_ELTS (ctor);
|
||||
+ }
|
||||
+ VEC_index (constructor_elt, elts, idx)->value = newval;
|
||||
+ }
|
||||
+ return ctor;
|
||||
+}
|
||||
+
|
||||
/* Do C-specific gimplification. Args are as for gimplify_expr. */
|
||||
|
||||
int
|
||||
@@ -254,6 +295,18 @@ c_gimplify_expr (tree *expr_p, tree *pre
|
||||
return GS_OK;
|
||||
}
|
||||
}
|
||||
+ else if (TREE_CODE (TREE_OPERAND (*expr_p, 1)) == CONSTRUCTOR)
|
||||
+ {
|
||||
+ tree ctor
|
||||
+ = optimize_compound_literals_in_ctor (TREE_OPERAND (*expr_p, 1));
|
||||
+
|
||||
+ if (ctor != TREE_OPERAND (*expr_p, 1))
|
||||
+ {
|
||||
+ *expr_p = copy_node (*expr_p);
|
||||
+ TREE_OPERAND (*expr_p, 1) = ctor;
|
||||
+ return GS_OK;
|
||||
+ }
|
||||
+ }
|
||||
return GS_UNHANDLED;
|
||||
|
||||
default:
|
||||
--- gcc/testsuite/gcc.dg/tree-ssa/pr34146.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/tree-ssa/pr34146.c (revision 130311)
|
||||
@@ -0,0 +1,53 @@
|
||||
+/* PR c/34146 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2 -fdump-tree-gimple" } */
|
||||
+
|
||||
+struct A
|
||||
+{
|
||||
+ int f1, f2, f3;
|
||||
+};
|
||||
+
|
||||
+struct B
|
||||
+{
|
||||
+ struct A g1, g2;
|
||||
+};
|
||||
+
|
||||
+struct C
|
||||
+{
|
||||
+ struct B h1, h2;
|
||||
+};
|
||||
+
|
||||
+typedef union
|
||||
+{
|
||||
+ struct C c;
|
||||
+ char s[4];
|
||||
+ long int a;
|
||||
+} T;
|
||||
+
|
||||
+void
|
||||
+foo (void)
|
||||
+{
|
||||
+ T t = { { { { 0, 0, 0 }, { 0, 0, 0 } }, { { 0, 0, 0 }, { 0, 0, 0 } } } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+bar (void)
|
||||
+{
|
||||
+ T t = { { { { 0, 0, 0 }, (struct A) { 0, 0, 0 } },
|
||||
+ (struct B) { (struct A) { 0, 0, 0 }, { 0, 0, 0 } } } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+baz (void)
|
||||
+{
|
||||
+ T t = { { { { 0, 0, 0 }, (struct A) { 1, 1, 1 } },
|
||||
+ (struct B) { (struct A) { 0, 0, 0 }, { 1, 1, 1 } } } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-tree-dump-not "t = D" "gimple"} } */
|
||||
+/* { dg-final { scan-tree-dump-not "t\.c\.h\[12\] = D" "gimple"} } */
|
||||
+/* { dg-final { scan-tree-dump-not "\.g\[12\] = D" "gimple"} } */
|
||||
+/* { dg-final { cleanup-tree-dump "gimple" } } */
|
|
@ -0,0 +1,128 @@
|
|||
2007-12-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/34178
|
||||
PR c++/34340
|
||||
* repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
|
||||
in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
|
||||
Return 2 also if DECL_EXPLICIT_INSTANTIATION.
|
||||
* decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
|
||||
flag_use_repository and repo_emit_p returned 2.
|
||||
|
||||
* g++.dg/template/repo6.C: New test.
|
||||
* g++.dg/template/repo7.C: New test.
|
||||
* g++.dg/template/repo8.C: New test.
|
||||
|
||||
--- gcc/cp/decl2.c (revision 130726)
|
||||
+++ gcc/cp/decl2.c (revision 130727)
|
||||
@@ -2230,7 +2230,8 @@ import_export_decl (tree decl)
|
||||
{
|
||||
/* DECL is an implicit instantiation of a function or static
|
||||
data member. */
|
||||
- if (flag_implicit_templates
|
||||
+ if ((flag_implicit_templates
|
||||
+ && !flag_use_repository)
|
||||
|| (flag_implicit_inline_templates
|
||||
&& TREE_CODE (decl) == FUNCTION_DECL
|
||||
&& DECL_DECLARED_INLINE_P (decl)))
|
||||
--- gcc/cp/repo.c (revision 130726)
|
||||
+++ gcc/cp/repo.c (revision 130727)
|
||||
@@ -304,16 +304,19 @@ repo_emit_p (tree decl)
|
||||
&& (!TYPE_LANG_SPECIFIC (type)
|
||||
|| !CLASSTYPE_TEMPLATE_INSTANTIATION (type)))
|
||||
return 2;
|
||||
- /* Static data members initialized by constant expressions must
|
||||
+ /* Const static data members initialized by constant expressions must
|
||||
be processed where needed so that their definitions are
|
||||
available. */
|
||||
- if (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl)
|
||||
+ if (DECL_INTEGRAL_CONSTANT_VAR_P (decl)
|
||||
&& DECL_CLASS_SCOPE_P (decl))
|
||||
return 2;
|
||||
}
|
||||
else if (!DECL_TEMPLATE_INSTANTIATION (decl))
|
||||
return 2;
|
||||
|
||||
+ if (DECL_EXPLICIT_INSTANTIATION (decl))
|
||||
+ return 2;
|
||||
+
|
||||
/* For constructors and destructors, the repository contains
|
||||
information about the clones -- not the original function --
|
||||
because only the clones are emitted in the object file. */
|
||||
--- gcc/testsuite/g++.dg/template/repo7.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/repo7.C (revision 130727)
|
||||
@@ -0,0 +1,23 @@
|
||||
+// PR c++/34340
|
||||
+// { dg-options "-frepo" }
|
||||
+// { dg-final { cleanup-repo-files } }
|
||||
+
|
||||
+struct A
|
||||
+{
|
||||
+ int a;
|
||||
+};
|
||||
+
|
||||
+template <typename T> struct D
|
||||
+{
|
||||
+ static const A b;
|
||||
+};
|
||||
+
|
||||
+template<typename T> const A D<T>::b = { 2 };
|
||||
+template class D<A>;
|
||||
+
|
||||
+const A *x = &D<A>::b;
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+}
|
||||
--- gcc/testsuite/g++.dg/template/repo8.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/repo8.C (revision 130727)
|
||||
@@ -0,0 +1,22 @@
|
||||
+// PR c++/34340
|
||||
+// { dg-options "-frepo" }
|
||||
+// { dg-final { cleanup-repo-files } }
|
||||
+
|
||||
+struct A
|
||||
+{
|
||||
+ int a;
|
||||
+};
|
||||
+
|
||||
+template <typename T> struct D
|
||||
+{
|
||||
+ static const A b;
|
||||
+};
|
||||
+
|
||||
+template<typename T> const A D<T>::b = { 2 };
|
||||
+
|
||||
+const A *x = &D<A>::b;
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+}
|
||||
--- gcc/testsuite/g++.dg/template/repo6.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/repo6.C (revision 130727)
|
||||
@@ -0,0 +1,24 @@
|
||||
+// PR c++/34178
|
||||
+// { dg-options "-frepo" }
|
||||
+// { dg-final { cleanup-repo-files } }
|
||||
+
|
||||
+template<typename T>
|
||||
+class A
|
||||
+{
|
||||
+private:
|
||||
+ static const int x;
|
||||
+ static int y;
|
||||
+
|
||||
+public:
|
||||
+ int getX () { return x + y; }
|
||||
+};
|
||||
+
|
||||
+template<typename T> const int A<T>::x = 0;
|
||||
+template<typename T> int A<T>::y = 0;
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ A<int> a;
|
||||
+ return a.getX();
|
||||
+}
|
|
@ -0,0 +1,68 @@
|
|||
2007-11-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/34213
|
||||
* tree.c (decl_linkage): Static data members and static member
|
||||
functions in anonymous ns classes are lk_external.
|
||||
|
||||
* g++.dg/ext/visibility/anon8.C: New test.
|
||||
|
||||
--- gcc/cp/tree.c (revision 130462)
|
||||
+++ gcc/cp/tree.c (revision 130463)
|
||||
@@ -2526,10 +2526,18 @@ decl_linkage (tree decl)
|
||||
/* Members of the anonymous namespace also have TREE_PUBLIC unset, but
|
||||
are considered to have external linkage for language purposes. DECLs
|
||||
really meant to have internal linkage have DECL_THIS_STATIC set. */
|
||||
- if (TREE_CODE (decl) == TYPE_DECL
|
||||
- || ((TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == FUNCTION_DECL)
|
||||
- && !DECL_THIS_STATIC (decl)))
|
||||
+ if (TREE_CODE (decl) == TYPE_DECL)
|
||||
return lk_external;
|
||||
+ if (TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == FUNCTION_DECL)
|
||||
+ {
|
||||
+ if (!DECL_THIS_STATIC (decl))
|
||||
+ return lk_external;
|
||||
+
|
||||
+ /* Static data members and static member functions from classes
|
||||
+ in anonymous namespace also don't have TREE_PUBLIC set. */
|
||||
+ if (DECL_CLASS_CONTEXT (decl))
|
||||
+ return lk_external;
|
||||
+ }
|
||||
|
||||
/* Everything else has internal linkage. */
|
||||
return lk_internal;
|
||||
--- gcc/testsuite/g++.dg/ext/visibility/anon8.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/ext/visibility/anon8.C (revision 130463)
|
||||
@@ -0,0 +1,33 @@
|
||||
+// PR c++/34213
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+template <void (*fn) ()>
|
||||
+void call ()
|
||||
+{
|
||||
+ fn ();
|
||||
+}
|
||||
+
|
||||
+namespace
|
||||
+{
|
||||
+ struct B1
|
||||
+ {
|
||||
+ static void fn1 () {}
|
||||
+ static void fn4 ();
|
||||
+ };
|
||||
+ void fn3 () {}
|
||||
+ void B1::fn4 () {}
|
||||
+ static void fn5 () {}
|
||||
+}
|
||||
+
|
||||
+int main ()
|
||||
+{
|
||||
+ struct B2
|
||||
+ {
|
||||
+ static void fn2 () {}
|
||||
+ };
|
||||
+ call<&B1::fn1> ();
|
||||
+ call<&B2::fn2> (); // { dg-error "not external linkage|no matching" }
|
||||
+ call<&fn3> ();
|
||||
+ call<&B1::fn4> ();
|
||||
+ call<&fn5> (); // { dg-error "not external linkage|no matching" }
|
||||
+}
|
|
@ -0,0 +1,35 @@
|
|||
2007-11-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/34275
|
||||
* error.c (dump_expr): Handle OBJ_TYPE_REF.
|
||||
|
||||
* g++.dg/other/error20.C: New test.
|
||||
|
||||
--- gcc/cp/error.c (revision 130532)
|
||||
+++ gcc/cp/error.c (revision 130533)
|
||||
@@ -2056,6 +2056,10 @@ dump_expr (tree t, int flags)
|
||||
pp_expression (cxx_pp, t);
|
||||
break;
|
||||
|
||||
+ case OBJ_TYPE_REF:
|
||||
+ dump_expr (resolve_virtual_fun_from_obj_type_ref (t), flags);
|
||||
+ break;
|
||||
+
|
||||
/* This list is incomplete, but should suffice for now.
|
||||
It is very important that `sorry' does not call
|
||||
`report_error_function'. That could cause an infinite loop. */
|
||||
--- gcc/testsuite/g++.dg/other/error20.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/other/error20.C (revision 130533)
|
||||
@@ -0,0 +1,12 @@
|
||||
+// PR c++/34275
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+struct A
|
||||
+{ // { dg-error "candidates" }
|
||||
+ virtual A foo ();
|
||||
+};
|
||||
+
|
||||
+void bar (A& a)
|
||||
+{
|
||||
+ a.foo () = 0; // { dg-error "A::foo\\(\\) = 0" }
|
||||
+}
|
|
@ -0,0 +1,54 @@
|
|||
2007-12-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/34364
|
||||
* rtti.c (build_dynamic_cast): Call convert_from_reference even for
|
||||
dynamic_cast in a template.
|
||||
|
||||
* g++.dg/rtti/dyncast2.C: New test.
|
||||
|
||||
--- gcc/cp/rtti.c (revision 130769)
|
||||
+++ gcc/cp/rtti.c (revision 130770)
|
||||
@@ -728,8 +728,7 @@ build_dynamic_cast (tree type, tree expr
|
||||
{
|
||||
expr = build_min (DYNAMIC_CAST_EXPR, type, expr);
|
||||
TREE_SIDE_EFFECTS (expr) = 1;
|
||||
-
|
||||
- return expr;
|
||||
+ return convert_from_reference (expr);
|
||||
}
|
||||
|
||||
return convert_from_reference (build_dynamic_cast_1 (type, expr));
|
||||
--- gcc/testsuite/g++.dg/rtti/dyncast2.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/rtti/dyncast2.C (revision 130770)
|
||||
@@ -0,0 +1,31 @@
|
||||
+// PR c++/34364
|
||||
+// { dg-do run }
|
||||
+
|
||||
+struct A
|
||||
+{
|
||||
+ virtual ~A () {}
|
||||
+};
|
||||
+
|
||||
+struct B : public A
|
||||
+{
|
||||
+ template <typename T> struct C
|
||||
+ {
|
||||
+ static void f (A &a)
|
||||
+ {
|
||||
+ dynamic_cast <B &>(a).g ();
|
||||
+ }
|
||||
+ };
|
||||
+
|
||||
+ B () : c (6) {}
|
||||
+ void g () { c++; }
|
||||
+ int c;
|
||||
+};
|
||||
+
|
||||
+B b;
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ B::C<int>::f (b);
|
||||
+ return b.c != 7;
|
||||
+}
|
|
@ -0,0 +1,29 @@
|
|||
2007-12-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/34394
|
||||
* error.c (dump_expr): Handle ABS_EXPR.
|
||||
|
||||
* g++.dg/other/error22.C: New test.
|
||||
|
||||
--- gcc/cp/error.c (revision 130743)
|
||||
+++ gcc/cp/error.c (revision 130744)
|
||||
@@ -1757,6 +1757,7 @@ dump_expr (tree t, int flags)
|
||||
break;
|
||||
|
||||
case SCOPE_REF:
|
||||
+ case ABS_EXPR:
|
||||
pp_expression (cxx_pp, t);
|
||||
break;
|
||||
|
||||
--- gcc/testsuite/g++.dg/other/error22.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/other/error22.C (revision 130744)
|
||||
@@ -0,0 +1,9 @@
|
||||
+// PR c++/34394
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+extern double fabs (double);
|
||||
+
|
||||
+void foo (double x)
|
||||
+{
|
||||
+ fabs (x) (); // { dg-error "__builtin_abs" }
|
||||
+}
|
|
@ -0,0 +1,112 @@
|
|||
2007-12-17 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/34506
|
||||
* c-parser.c (c_parser_omp_all_clauses): Accept optional comma
|
||||
in between clauses.
|
||||
|
||||
* parser.c (cp_parser_omp_all_clauses): Accept optional comma
|
||||
in between clauses.
|
||||
|
||||
* gcc.dg/gomp/clause-2.c: New test.
|
||||
* g++.dg/gomp/clause-4.C: New test.
|
||||
|
||||
--- gcc/c-parser.c (revision 131007)
|
||||
+++ gcc/c-parser.c (revision 131008)
|
||||
@@ -7065,13 +7065,20 @@ c_parser_omp_all_clauses (c_parser *pars
|
||||
const char *where)
|
||||
{
|
||||
tree clauses = NULL;
|
||||
+ bool first = true;
|
||||
|
||||
while (c_parser_next_token_is_not (parser, CPP_PRAGMA_EOL))
|
||||
{
|
||||
- const pragma_omp_clause c_kind = c_parser_omp_clause_name (parser);
|
||||
+ pragma_omp_clause c_kind;
|
||||
const char *c_name;
|
||||
tree prev = clauses;
|
||||
|
||||
+ if (!first && c_parser_next_token_is (parser, CPP_COMMA))
|
||||
+ c_parser_consume_token (parser);
|
||||
+
|
||||
+ first = false;
|
||||
+ c_kind = c_parser_omp_clause_name (parser);
|
||||
+
|
||||
switch (c_kind)
|
||||
{
|
||||
case PRAGMA_OMP_CLAUSE_COPYIN:
|
||||
--- gcc/cp/parser.c (revision 131007)
|
||||
+++ gcc/cp/parser.c (revision 131008)
|
||||
@@ -19671,13 +19671,20 @@ cp_parser_omp_all_clauses (cp_parser *pa
|
||||
const char *where, cp_token *pragma_tok)
|
||||
{
|
||||
tree clauses = NULL;
|
||||
+ bool first = true;
|
||||
|
||||
while (cp_lexer_next_token_is_not (parser->lexer, CPP_PRAGMA_EOL))
|
||||
{
|
||||
- pragma_omp_clause c_kind = cp_parser_omp_clause_name (parser);
|
||||
+ pragma_omp_clause c_kind;
|
||||
const char *c_name;
|
||||
tree prev = clauses;
|
||||
|
||||
+ if (!first && cp_lexer_next_token_is (parser->lexer, CPP_COMMA))
|
||||
+ cp_lexer_consume_token (parser->lexer);
|
||||
+
|
||||
+ c_kind = cp_parser_omp_clause_name (parser);
|
||||
+ first = false;
|
||||
+
|
||||
switch (c_kind)
|
||||
{
|
||||
case PRAGMA_OMP_CLAUSE_COPYIN:
|
||||
--- gcc/testsuite/gcc.dg/gomp/clause-2.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/gomp/clause-2.c (revision 131008)
|
||||
@@ -0,0 +1,23 @@
|
||||
+/* PR c/34506 */
|
||||
+/* { dg-do compile } */
|
||||
+
|
||||
+#define p parallel
|
||||
+
|
||||
+void
|
||||
+foo (int x)
|
||||
+{
|
||||
+#pragma omp p num_threads (4) if (1) private (x)
|
||||
+ ;
|
||||
+#pragma omp p num_threads(4)if(1)private(x)
|
||||
+ ;
|
||||
+#pragma omp p num_threads (4), if (1) , private (x)
|
||||
+ ;
|
||||
+#pragma omp p num_threads(4),if(1),private(x)
|
||||
+ ;
|
||||
+#pragma omp p, num_threads (4), if (1), private (x) /* { dg-error "clause before" } */
|
||||
+ ;
|
||||
+#pragma omp p num_threads (4), if (1), private (x), /* { dg-error "clause before" } */
|
||||
+ ;
|
||||
+#pragma omp p num_threads (4), , if (1), private (x) /* { dg-error "clause before" } */
|
||||
+ ;
|
||||
+}
|
||||
--- gcc/testsuite/g++.dg/gomp/clause-4.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/gomp/clause-4.C (revision 131008)
|
||||
@@ -0,0 +1,23 @@
|
||||
+// PR c/34506
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+#define p parallel
|
||||
+
|
||||
+void
|
||||
+foo (int x)
|
||||
+{
|
||||
+#pragma omp p num_threads (4) if (1) private (x)
|
||||
+ ;
|
||||
+#pragma omp p num_threads(4)if(1)private(x)
|
||||
+ ;
|
||||
+#pragma omp p num_threads (4), if (1) , private (x)
|
||||
+ ;
|
||||
+#pragma omp p num_threads(4),if(1),private(x)
|
||||
+ ;
|
||||
+#pragma omp p, num_threads (4), if (1), private (x) // { dg-error "clause before" }
|
||||
+ ;
|
||||
+#pragma omp p num_threads (4), if (1), private (x), // { dg-error "clause before" }
|
||||
+ ;
|
||||
+#pragma omp p num_threads (4), , if (1), private (x) // { dg-error "clause before" }
|
||||
+ ;
|
||||
+}
|
|
@ -0,0 +1,92 @@
|
|||
2007-12-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
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.
|
||||
|
||||
--- gcc/cp/parser.c (revision 131058)
|
||||
+++ gcc/cp/parser.c (revision 131059)
|
||||
@@ -20271,7 +20271,7 @@ cp_parser_omp_parallel (cp_parser *parse
|
||||
switch (p_kind)
|
||||
{
|
||||
case PRAGMA_OMP_PARALLEL:
|
||||
- cp_parser_already_scoped_statement (parser);
|
||||
+ cp_parser_statement (parser, NULL_TREE, false);
|
||||
par_clause = clauses;
|
||||
break;
|
||||
|
||||
--- libgomp/testsuite/libgomp.c++/pr34513.C (revision 0)
|
||||
+++ libgomp/testsuite/libgomp.c++/pr34513.C (revision 131059)
|
||||
@@ -0,0 +1,32 @@
|
||||
+// PR c++/34513
|
||||
+// { dg-do run }
|
||||
+
|
||||
+#include <omp.h>
|
||||
+
|
||||
+extern "C" void abort ();
|
||||
+
|
||||
+static int errors = 0;
|
||||
+static int thrs = 4;
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ omp_set_dynamic (0);
|
||||
+
|
||||
+ #pragma omp parallel num_threads (thrs)
|
||||
+ {
|
||||
+ static int shrd = 0;
|
||||
+
|
||||
+ #pragma omp atomic
|
||||
+ shrd += 1;
|
||||
+
|
||||
+ #pragma omp barrier
|
||||
+
|
||||
+ if (shrd != thrs)
|
||||
+ #pragma omp atomic
|
||||
+ errors += 1;
|
||||
+ }
|
||||
+
|
||||
+ if (errors)
|
||||
+ abort ();
|
||||
+}
|
||||
--- libgomp/testsuite/libgomp.c/pr34513.c (revision 0)
|
||||
+++ libgomp/testsuite/libgomp.c/pr34513.c (revision 131059)
|
||||
@@ -0,0 +1,33 @@
|
||||
+/* PR c++/34513 */
|
||||
+/* { dg-do run } */
|
||||
+
|
||||
+#include <omp.h>
|
||||
+
|
||||
+extern void abort ();
|
||||
+
|
||||
+static int errors = 0;
|
||||
+static int thrs = 4;
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ omp_set_dynamic (0);
|
||||
+
|
||||
+ #pragma omp parallel num_threads (thrs)
|
||||
+ {
|
||||
+ static int shrd = 0;
|
||||
+
|
||||
+ #pragma omp atomic
|
||||
+ shrd += 1;
|
||||
+
|
||||
+ #pragma omp barrier
|
||||
+
|
||||
+ if (shrd != thrs)
|
||||
+ #pragma omp atomic
|
||||
+ errors += 1;
|
||||
+ }
|
||||
+
|
||||
+ if (errors)
|
||||
+ abort ();
|
||||
+ return 0;
|
||||
+}
|
|
@ -0,0 +1,251 @@
|
|||
2007-12-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/34535
|
||||
* cp-lang.c (cp_classify_record): Check TYPE_LANG_SPECIFIC
|
||||
is non-NULL before testing CLASSTYPE_DECLARED_CLASS.
|
||||
|
||||
2007-12-15 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
PR debug/7081
|
||||
* dwarf2out.c (dwarf_tag_name): Synchronize with dwarf2.h.
|
||||
(is_type_die): Cover interface types.
|
||||
(class_or_namespace_scope_p): Cover interface and class types.
|
||||
(record_type_tag): New.
|
||||
(gen_inlined_structure_type_die): Use it.
|
||||
(gen_struct_or_union_type_die): Likewise.
|
||||
(prune_unused_types_walk): Cover interface types.
|
||||
* langhooks.h (classify_record): New enum.
|
||||
(classify_record): New member in struct langhooks_for_types.
|
||||
* langhooks-def.h (LANG_HOOKS_CLASSIFY_RECORD): New.
|
||||
(LANGHOOKS_FOR_TYPES_INITIALIZER): Adjust.
|
||||
cp/
|
||||
* cp-lang.c (cp_classify_record): New.
|
||||
(LANG_HOOKS_CLASSIFY_RECORD): Override.
|
||||
java/
|
||||
* lang.c (java_classify_record): New.
|
||||
(LANG_HOOKS_CLASSIFY_RECORD): Override.
|
||||
|
||||
--- gcc/java/lang.c (revision 130959)
|
||||
+++ gcc/java/lang.c (revision 130960)
|
||||
@@ -67,6 +67,8 @@ static bool java_decl_ok_for_sibcall (tr
|
||||
static tree java_get_callee_fndecl (tree);
|
||||
static void java_clear_binding_stack (void);
|
||||
|
||||
+static enum classify_record java_classify_record (tree type);
|
||||
+
|
||||
#ifndef TARGET_OBJECT_SUFFIX
|
||||
# define TARGET_OBJECT_SUFFIX ".o"
|
||||
#endif
|
||||
@@ -183,6 +185,8 @@ struct language_function GTY(())
|
||||
#define LANG_HOOKS_TYPE_FOR_MODE java_type_for_mode
|
||||
#undef LANG_HOOKS_TYPE_FOR_SIZE
|
||||
#define LANG_HOOKS_TYPE_FOR_SIZE java_type_for_size
|
||||
+#undef LANG_HOOKS_CLASSIFY_RECORD
|
||||
+#define LANG_HOOKS_CLASSIFY_RECORD java_classify_record
|
||||
#undef LANG_HOOKS_SIGNED_TYPE
|
||||
#define LANG_HOOKS_SIGNED_TYPE java_signed_type
|
||||
#undef LANG_HOOKS_UNSIGNED_TYPE
|
||||
@@ -1027,4 +1031,16 @@ java_clear_binding_stack (void)
|
||||
poplevel (0, 0, 0);
|
||||
}
|
||||
|
||||
+static enum classify_record
|
||||
+java_classify_record (tree type)
|
||||
+{
|
||||
+ if (! CLASS_P (type))
|
||||
+ return RECORD_IS_STRUCT;
|
||||
+
|
||||
+ if (0 && CLASS_INTERFACE (TYPE_NAME (type)))
|
||||
+ return RECORD_IS_INTERFACE;
|
||||
+
|
||||
+ return RECORD_IS_CLASS;
|
||||
+}
|
||||
+
|
||||
#include "gt-java-lang.h"
|
||||
--- gcc/cp/cp-lang.c (revision 130959)
|
||||
+++ gcc/cp/cp-lang.c (revision 130960)
|
||||
@@ -36,6 +36,7 @@ Boston, MA 02110-1301, USA. */
|
||||
|
||||
enum c_language_kind c_language = clk_cxx;
|
||||
static void cp_init_ts (void);
|
||||
+static enum classify_record cp_classify_record (tree type);
|
||||
|
||||
/* Lang hooks common to C++ and ObjC++ are declared in cp/cp-objcp-common.h;
|
||||
consequently, there should be very few hooks below. */
|
||||
@@ -44,6 +45,8 @@ static void cp_init_ts (void);
|
||||
#define LANG_HOOKS_NAME "GNU C++"
|
||||
#undef LANG_HOOKS_INIT
|
||||
#define LANG_HOOKS_INIT cxx_init
|
||||
+#undef LANG_HOOKS_CLASSIFY_RECORD
|
||||
+#define LANG_HOOKS_CLASSIFY_RECORD cp_classify_record
|
||||
#undef LANG_HOOKS_DECL_PRINTABLE_NAME
|
||||
#define LANG_HOOKS_DECL_PRINTABLE_NAME cxx_printable_name
|
||||
#undef LANG_HOOKS_FOLD_OBJ_TYPE_REF
|
||||
@@ -138,6 +141,15 @@ cp_init_ts (void)
|
||||
|
||||
}
|
||||
|
||||
+static enum classify_record
|
||||
+cp_classify_record (tree type)
|
||||
+{
|
||||
+ if (TYPE_LANG_SPECIFIC (type) && CLASSTYPE_DECLARED_CLASS (type))
|
||||
+ return RECORD_IS_CLASS;
|
||||
+
|
||||
+ return RECORD_IS_STRUCT;
|
||||
+}
|
||||
+
|
||||
void
|
||||
finish_file (void)
|
||||
{
|
||||
--- gcc/dwarf2out.c (revision 130959)
|
||||
+++ gcc/dwarf2out.c (revision 130960)
|
||||
@@ -4445,8 +4445,6 @@ dwarf_tag_name (unsigned int tag)
|
||||
return "DW_TAG_namelist";
|
||||
case DW_TAG_namelist_item:
|
||||
return "DW_TAG_namelist_item";
|
||||
- case DW_TAG_namespace:
|
||||
- return "DW_TAG_namespace";
|
||||
case DW_TAG_packed_type:
|
||||
return "DW_TAG_packed_type";
|
||||
case DW_TAG_subprogram:
|
||||
@@ -4465,8 +4463,26 @@ dwarf_tag_name (unsigned int tag)
|
||||
return "DW_TAG_variable";
|
||||
case DW_TAG_volatile_type:
|
||||
return "DW_TAG_volatile_type";
|
||||
+ case DW_TAG_dwarf_procedure:
|
||||
+ return "DW_TAG_dwarf_procedure";
|
||||
+ case DW_TAG_restrict_type:
|
||||
+ return "DW_TAG_restrict_type";
|
||||
+ case DW_TAG_interface_type:
|
||||
+ return "DW_TAG_interface_type";
|
||||
+ case DW_TAG_namespace:
|
||||
+ return "DW_TAG_namespace";
|
||||
case DW_TAG_imported_module:
|
||||
return "DW_TAG_imported_module";
|
||||
+ case DW_TAG_unspecified_type:
|
||||
+ return "DW_TAG_unspecified_type";
|
||||
+ case DW_TAG_partial_unit:
|
||||
+ return "DW_TAG_partial_unit";
|
||||
+ case DW_TAG_imported_unit:
|
||||
+ return "DW_TAG_imported_unit";
|
||||
+ case DW_TAG_condition:
|
||||
+ return "DW_TAG_condition";
|
||||
+ case DW_TAG_shared_type:
|
||||
+ return "DW_TAG_shared_type";
|
||||
case DW_TAG_MIPS_loop:
|
||||
return "DW_TAG_MIPS_loop";
|
||||
case DW_TAG_format_label:
|
||||
@@ -6181,6 +6197,7 @@ is_type_die (dw_die_ref die)
|
||||
{
|
||||
case DW_TAG_array_type:
|
||||
case DW_TAG_class_type:
|
||||
+ case DW_TAG_interface_type:
|
||||
case DW_TAG_enumeration_type:
|
||||
case DW_TAG_pointer_type:
|
||||
case DW_TAG_reference_type:
|
||||
@@ -10986,6 +11003,8 @@ class_or_namespace_scope_p (dw_die_ref c
|
||||
{
|
||||
return (context_die
|
||||
&& (context_die->die_tag == DW_TAG_structure_type
|
||||
+ || context_die->die_tag == DW_TAG_class_type
|
||||
+ || context_die->die_tag == DW_TAG_interface_type
|
||||
|| context_die->die_tag == DW_TAG_union_type
|
||||
|| context_die->die_tag == DW_TAG_namespace));
|
||||
}
|
||||
@@ -11381,12 +11400,36 @@ gen_inlined_enumeration_type_die (tree t
|
||||
add_abstract_origin_attribute (type_die, type);
|
||||
}
|
||||
|
||||
+/* Determine what tag to use for a record type. */
|
||||
+
|
||||
+static enum dwarf_tag
|
||||
+record_type_tag (tree type)
|
||||
+{
|
||||
+ if (! lang_hooks.types.classify_record)
|
||||
+ return DW_TAG_structure_type;
|
||||
+
|
||||
+ switch (lang_hooks.types.classify_record (type))
|
||||
+ {
|
||||
+ case RECORD_IS_STRUCT:
|
||||
+ return DW_TAG_structure_type;
|
||||
+
|
||||
+ case RECORD_IS_CLASS:
|
||||
+ return DW_TAG_class_type;
|
||||
+
|
||||
+ case RECORD_IS_INTERFACE:
|
||||
+ return DW_TAG_interface_type;
|
||||
+
|
||||
+ default:
|
||||
+ gcc_unreachable ();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* Generate a DIE to represent an inlined instance of a structure type. */
|
||||
|
||||
static void
|
||||
gen_inlined_structure_type_die (tree type, dw_die_ref context_die)
|
||||
{
|
||||
- dw_die_ref type_die = new_die (DW_TAG_structure_type, context_die, type);
|
||||
+ dw_die_ref type_die = new_die (record_type_tag (type), context_die, type);
|
||||
|
||||
/* We do not check for TREE_ASM_WRITTEN (type) being set, as the type may
|
||||
be incomplete and such types are not marked. */
|
||||
@@ -12530,7 +12573,7 @@ gen_struct_or_union_type_die (tree type,
|
||||
dw_die_ref old_die = type_die;
|
||||
|
||||
type_die = new_die (TREE_CODE (type) == RECORD_TYPE
|
||||
- ? DW_TAG_structure_type : DW_TAG_union_type,
|
||||
+ ? record_type_tag (type) : DW_TAG_union_type,
|
||||
scope_die, type);
|
||||
equate_type_number_to_die (type, type_die);
|
||||
if (old_die)
|
||||
@@ -14183,6 +14226,7 @@ prune_unused_types_walk (dw_die_ref die)
|
||||
case DW_TAG_structure_type:
|
||||
case DW_TAG_union_type:
|
||||
case DW_TAG_class_type:
|
||||
+ case DW_TAG_interface_type:
|
||||
case DW_TAG_friend:
|
||||
case DW_TAG_variant_part:
|
||||
case DW_TAG_enumeration_type:
|
||||
--- gcc/langhooks.h (revision 130959)
|
||||
+++ gcc/langhooks.h (revision 130960)
|
||||
@@ -33,6 +33,9 @@ struct array_descr_info;
|
||||
/* A print hook for print_tree (). */
|
||||
typedef void (*lang_print_tree_hook) (FILE *, tree, int indent);
|
||||
|
||||
+enum classify_record
|
||||
+ { RECORD_IS_STRUCT, RECORD_IS_CLASS, RECORD_IS_INTERFACE };
|
||||
+
|
||||
/* The following hooks are documented in langhooks.c. Must not be
|
||||
NULL. */
|
||||
|
||||
@@ -91,6 +94,11 @@ struct lang_hooks_for_types
|
||||
language-specific processing is required. */
|
||||
tree (*make_type) (enum tree_code);
|
||||
|
||||
+ /* Return what kind of RECORD_TYPE this is, mainly for purposes of
|
||||
+ debug information. If not defined, record types are assumed to
|
||||
+ be structures. */
|
||||
+ enum classify_record (*classify_record) (tree);
|
||||
+
|
||||
/* Given MODE and UNSIGNEDP, return a suitable type-tree with that
|
||||
mode. */
|
||||
tree (*type_for_mode) (enum machine_mode, int);
|
||||
--- gcc/langhooks-def.h (revision 130959)
|
||||
+++ gcc/langhooks-def.h (revision 130960)
|
||||
@@ -172,6 +172,7 @@ extern tree lhd_make_node (enum tree_cod
|
||||
/* Types hooks. There are no reasonable defaults for most of them,
|
||||
so we create a compile-time error instead. */
|
||||
#define LANG_HOOKS_MAKE_TYPE lhd_make_node
|
||||
+#define LANG_HOOKS_CLASSIFY_RECORD NULL
|
||||
#define LANG_HOOKS_INCOMPLETE_TYPE_ERROR lhd_incomplete_type_error
|
||||
#define LANG_HOOKS_GENERIC_TYPE_P hook_bool_const_tree_false
|
||||
#define LANG_HOOKS_TYPE_PROMOTES_TO lhd_type_promotes_to
|
||||
@@ -185,6 +186,7 @@ extern tree lhd_make_node (enum tree_cod
|
||||
|
||||
#define LANG_HOOKS_FOR_TYPES_INITIALIZER { \
|
||||
LANG_HOOKS_MAKE_TYPE, \
|
||||
+ LANG_HOOKS_CLASSIFY_RECORD, \
|
||||
LANG_HOOKS_TYPE_FOR_MODE, \
|
||||
LANG_HOOKS_TYPE_FOR_SIZE, \
|
||||
LANG_HOOKS_GENERIC_TYPE_P, \
|
|
@ -0,0 +1,18 @@
|
|||
2006-03-09 Richard Henderson <rth@redhat.com>
|
||||
Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Use
|
||||
secure-plt-compatible load sequence to compute the GOT address
|
||||
for -fPIC -msecure-plt.
|
||||
|
||||
--- gcc/config/rs6000/rs6000.c.orig 2006-03-09 20:02:13.000000000 -0300
|
||||
+++ gcc/config/rs6000/rs6000.c 2006-03-09 22:00:43.000000000 -0300
|
||||
@@ -3081,7 +3081,7 @@ rs6000_legitimize_tls_address (rtx addr,
|
||||
{
|
||||
rtx gsym = rs6000_got_sym ();
|
||||
got = gen_reg_rtx (Pmode);
|
||||
- if (flag_pic == 0)
|
||||
+ if (flag_pic == 0 || (flag_pic && TARGET_SECURE_PLT))
|
||||
rs6000_emit_move (got, gsym, Pmode);
|
||||
else
|
||||
{
|
|
@ -0,0 +1,97 @@
|
|||
2007-04-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* fr.po: Use %s rather than %S.
|
||||
* sr.po: Likewise.
|
||||
* tr.po: Likewise.
|
||||
* sv.po: Likewise.
|
||||
* rw.po: Comment out translations with bogus format
|
||||
strings.
|
||||
|
||||
--- gcc/po/fr.po (revision 123636)
|
||||
+++ gcc/po/fr.po (working copy)
|
||||
@@ -31416,7 +31416,7 @@ msgstr "attribut « %s » ignoré"
|
||||
#~ msgstr "prise de l'adresse de la borne de l'expression d'un pointeur-vers-un membre"
|
||||
|
||||
#~ msgid "%s from type `%T' to type `%T' casts away constness"
|
||||
-#~ msgstr "%S à partir du « %T » vers le type « %T » provoque un transtypage sans constante"
|
||||
+#~ msgstr "%s à partir du « %T » vers le type « %T » provoque un transtypage sans constante"
|
||||
|
||||
#~ msgid "invalid reinterpret_cast from type `%T' to type `%T'"
|
||||
#~ msgstr "reinterpret_cast invalide à partir du type « %T » vers le type « %T »"
|
||||
--- gcc/po/sr.po (revision 123636)
|
||||
+++ gcc/po/sr.po (working copy)
|
||||
@@ -8516,7 +8516,7 @@ msgstr "Ð<>е могу Ñ<>е променÐ
|
||||
#: fortran/symbol.c:592
|
||||
#, no-c-format
|
||||
msgid "Duplicate %s attribute specified at %L"
|
||||
-msgstr "ДвоÑ<C2BE>труки атрибут %S наведен код %L"
|
||||
+msgstr "ДвоÑ<C2BE>труки атрибут %s наведен код %L"
|
||||
|
||||
#: fortran/symbol.c:733
|
||||
#, no-c-format
|
||||
--- gcc/po/tr.po (revision 123636)
|
||||
+++ gcc/po/tr.po (working copy)
|
||||
@@ -6951,7 +6951,7 @@ msgstr "INTERFACE gövdesinde umulmadık
|
||||
#: fortran/parse.c:1604
|
||||
#, no-c-format
|
||||
msgid "%s statement must appear in a MODULE"
|
||||
-msgstr "%S deyimi bir MODULE'de görünmemeli"
|
||||
+msgstr "%s deyimi bir MODULE'de görünmemeli"
|
||||
|
||||
#: fortran/parse.c:1611
|
||||
#, no-c-format
|
||||
--- gcc/po/rw.po (revision 123636)
|
||||
+++ gcc/po/rw.po (working copy)
|
||||
@@ -2168,8 +2168,8 @@ msgstr ""
|
||||
|
||||
#: tlink.c:480
|
||||
#, fuzzy, c-format
|
||||
-msgid "renaming .rpo file"
|
||||
-msgstr "Gufungura %s%S Ibisohoka IDOSIYE"
|
||||
+#~ msgid "renaming .rpo file"
|
||||
+#~ msgstr "Gufungura %s%S Ibisohoka IDOSIYE"
|
||||
|
||||
#: tlink.c:534
|
||||
#, c-format
|
||||
@@ -17500,8 +17500,8 @@ msgstr "-Umutekano"
|
||||
|
||||
#: c-opts.c:1040
|
||||
#, fuzzy, gcc-internal-format
|
||||
-msgid "opening output file %s: %m"
|
||||
-msgstr "Gufungura %s%S Ibisohoka IDOSIYE"
|
||||
+#~ msgid "opening output file %s: %m"
|
||||
+#~ msgstr "Gufungura %s%S Ibisohoka IDOSIYE"
|
||||
|
||||
#: c-opts.c:1045
|
||||
#, fuzzy, gcc-internal-format
|
||||
@@ -17515,8 +17515,8 @@ msgstr ""
|
||||
|
||||
#: c-opts.c:1177
|
||||
#, fuzzy, gcc-internal-format
|
||||
-msgid "opening dependency file %s: %m"
|
||||
-msgstr "Gufungura %s%S IDOSIYE"
|
||||
+#~ msgid "opening dependency file %s: %m"
|
||||
+#~ msgstr "Gufungura %s%S IDOSIYE"
|
||||
|
||||
#: c-opts.c:1187
|
||||
#, fuzzy, gcc-internal-format
|
||||
--- gcc/po/sv.po 2007-02-20 22:38:45.000000000 +0100
|
||||
+++ gcc/po/sv.po 2007-04-13 00:18:11.000000000 +0200
|
||||
@@ -3328,7 +3328,7 @@ msgstr "ogiltig operand till %%R"
|
||||
#: config/sh/sh.c:773
|
||||
#, c-format
|
||||
msgid "invalid operand to %%S"
|
||||
-msgstr "ogiltig operand till %%R"
|
||||
+msgstr "ogiltig operand till %%S"
|
||||
|
||||
#: config/sh/sh.c:7679
|
||||
msgid "created and used with different architectures / ABIs"
|
||||
@@ -8019,7 +8019,7 @@ msgstr "PROCEDURE-attribut i konflikt me
|
||||
#: fortran/resolve.c:4943
|
||||
#, no-c-format
|
||||
msgid "Parameter array '%s' at %L cannot be automatic or assumed shape"
|
||||
-msgstr "Parametervektor \"%S\" vid %L kan inte ha automatisk eller antagen form"
|
||||
+msgstr "Parametervektor \"%s\" vid %L kan inte ha automatisk eller antagen form"
|
||||
|
||||
#: fortran/resolve.c:4955
|
||||
#, no-c-format
|
|
@ -0,0 +1,16 @@
|
|||
2007-04-18 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java/lang/reflect/VMProxy.java (HAVE_NATIVE_GENERATE_PROXY_CLASS):
|
||||
Set to false.
|
||||
|
||||
--- libjava/java/lang/reflect/VMProxy.java (revision 123861)
|
||||
+++ libjava/java/lang/reflect/VMProxy.java (working copy)
|
||||
@@ -65,7 +65,7 @@
|
||||
* If this is true, HAVE_NATIVE_GET_PROXY_CLASS should be false.
|
||||
* @see java.lang.reflect.Proxy
|
||||
*/
|
||||
- static boolean HAVE_NATIVE_GENERATE_PROXY_CLASS = true;
|
||||
+ static boolean HAVE_NATIVE_GENERATE_PROXY_CLASS = false;
|
||||
|
||||
/**
|
||||
* Optional native method to replace (and speed up) the pure Java
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue