aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2009-09-11 15:33:07 +0000
committerDiego Novillo <dnovillo@google.com>2009-09-11 15:33:07 +0000
commit0733fdd5729fac243b6e0aafa6383e4bcfb5347e (patch)
treed339e647251051be86d296f9239f948d0362ab14
parent858e53dbe330f8ad8f05ee534c4797ec285b7014 (diff)
2009-09-11 Diego Novillo <dnovillo@google.com>
Mainline merge @151592. * configure.ac (ACX_PKGVERSION): Update revision merge string. * configure: Regenerate. 2009-09-11 Diego Novillo <dnovillo@google.com> * cgraph.c (cgraph_clone_input_node): Remove. Update all users to call cgraph_clone_node instead. (cgraph_is_clone_node): Remove unused function. * ipa.c (cgraph_remove_unreachable_nodes): Do not set disregard_inline_limits to false. (gate_ipa_fun_and_var_visibility): Remove. Update pass_ipa_function_and_variable_visibility. * lto-cgraph.c (lto_output_node): Output field count. Reorganize packing of node bitflags to follow the same order that they're declared. Add fields address_taken, abstract_and_needed, reachable, process, alias and finalized_by_frontend. (input_overwrite_node): Corresponding changes. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto@151637 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog23
-rw-r--r--MAINTAINERS2
-rw-r--r--boehm-gc/ChangeLog9
-rwxr-xr-xboehm-gc/configure12
-rw-r--r--boehm-gc/dyn_load.c12
-rw-r--r--config/ChangeLog20
-rw-r--r--config/stdint.m414
-rwxr-xr-xconfigure54
-rw-r--r--configure.ac44
-rw-r--r--contrib/ChangeLog7
-rwxr-xr-xcontrib/compare-debug6
-rw-r--r--fixincludes/ChangeLog26
-rw-r--r--fixincludes/README13
-rw-r--r--fixincludes/check.tpl2
-rw-r--r--fixincludes/fixincl.x62
-rw-r--r--fixincludes/inclhack.def69
-rw-r--r--fixincludes/mkheaders.in2
-rw-r--r--fixincludes/tests/base/Xm/Traversal.h2
-rw-r--r--gcc/ChangeLog706
-rw-r--r--gcc/ChangeLog.lto23
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/Makefile.in1
-rw-r--r--gcc/aclocal.m41
-rw-r--r--gcc/ada/ChangeLog19
-rw-r--r--gcc/ada/gcc-interface/Make-lang.in8
-rw-r--r--gcc/ada/gcc-interface/decl.c189
-rw-r--r--gcc/ada/gcc-interface/targtyps.c3
-rw-r--r--gcc/ada/make.adb23
-rw-r--r--gcc/c-pretty-print.c2
-rw-r--r--gcc/cfgexpand.c8
-rw-r--r--gcc/cgraph.c38
-rw-r--r--gcc/cgraph.h2
-rw-r--r--gcc/cgraphunit.c87
-rw-r--r--gcc/combine-stack-adj.c206
-rw-r--r--gcc/config.gcc8
-rw-r--r--gcc/config.in140
-rw-r--r--gcc/config/alpha/alpha.c5
-rw-r--r--gcc/config/arm/arm.h1
-rw-r--r--gcc/config/arm/arm.md23
-rw-r--r--gcc/config/arm/vfp.md2
-rw-r--r--gcc/config/bfin/bfin-protos.h42
-rw-r--r--gcc/config/bfin/bfin.c441
-rw-r--r--gcc/config/bfin/bfin.h66
-rw-r--r--gcc/config/bfin/bfin.md199
-rw-r--r--gcc/config/bfin/linux.h3
-rw-r--r--gcc/config/bfin/predicates.md36
-rw-r--r--gcc/config/bfin/sync.md178
-rw-r--r--gcc/config/bfin/t-bfin-elf11
-rw-r--r--gcc/config/bfin/t-bfin-linux11
-rw-r--r--gcc/config/bfin/t-bfin-uclinux11
-rw-r--r--gcc/config/bfin/uclinux.h3
-rw-r--r--gcc/config/i386/i386.c16
-rw-r--r--gcc/config/i386/mingw-w64.h2
-rw-r--r--gcc/config/ia64/unwind-ia64.c2
-rw-r--r--gcc/config/m32c/m32c.h12
-rw-r--r--gcc/config/mep/mep.c1
-rw-r--r--gcc/config/mips/mips.c14
-rw-r--r--gcc/config/moxie/constraints.md6
-rw-r--r--gcc/config/moxie/moxie.c31
-rw-r--r--gcc/config/moxie/moxie.h8
-rw-r--r--gcc/config/moxie/moxie.md21
-rw-r--r--gcc/config/rs6000/rs6000.md44
-rw-r--r--gcc/config/s390/2084.md6
-rw-r--r--gcc/config/s390/2097.md29
-rw-r--r--gcc/config/s390/s390.c11
-rw-r--r--gcc/config/s390/s390.md22
-rw-r--r--gcc/config/t-slibgcc-elf-ver8
-rw-r--r--gcc/config/t-slibgcc-libgcc32
-rw-r--r--gcc/config/xtensa/unwind-dw2-xtensa.c2
-rwxr-xr-xgcc/configure582
-rw-r--r--gcc/configure.ac11
-rw-r--r--gcc/cp/ChangeLog38
-rw-r--r--gcc/cp/Make-lang.in4
-rw-r--r--gcc/cp/class.c2
-rw-r--r--gcc/cp/cp-tree.h5
-rw-r--r--gcc/cp/decl.c60
-rw-r--r--gcc/cp/decl2.c23
-rw-r--r--gcc/cp/error.c6
-rw-r--r--gcc/cp/method.c2
-rw-r--r--gcc/cp/name-lookup.c16
-rw-r--r--gcc/cp/parser.c7
-rw-r--r--gcc/cselib.c12
-rw-r--r--gcc/doc/invoke.texi14
-rw-r--r--gcc/doc/rtl.texi11
-rw-r--r--gcc/dwarf2out.c13
-rw-r--r--gcc/expr.c6
-rw-r--r--gcc/fortran/ChangeLog18
-rw-r--r--gcc/fortran/primary.c6
-rw-r--r--gcc/fortran/resolve.c16
-rw-r--r--gcc/fortran/trans-expr.c2
-rw-r--r--gcc/function.c29
-rw-r--r--gcc/gcc.c40
-rw-r--r--gcc/genattrtab.c2
-rw-r--r--gcc/gimple.h37
-rw-r--r--gcc/ipa.c9
-rw-r--r--gcc/lto-cgraph.c33
-rw-r--r--gcc/params.def2
-rw-r--r--gcc/po/ChangeLog4
-rw-r--r--gcc/po/fi.po182
-rw-r--r--gcc/reginfo.c10
-rw-r--r--gcc/rtl.h22
-rw-r--r--gcc/sched-deps.c96
-rw-r--r--gcc/sched-int.h6
-rw-r--r--gcc/sched-rgn.c5
-rw-r--r--gcc/system.h8
-rw-r--r--gcc/testsuite/ChangeLog223
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist24.C9
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C4
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C15
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C4
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C16
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C4
-rw-r--r--gcc/testsuite/g++.dg/template/crash91.C8
-rw-r--r--gcc/testsuite/g++.dg/torture/pr41144.C23
-rw-r--r--gcc/testsuite/g++.dg/torture/pr41257-2.C16
-rw-r--r--gcc/testsuite/g++.dg/torture/pr41257.C20
-rw-r--r--gcc/testsuite/g++.dg/torture/pr41273.C18
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20090907-1.c84
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr41101.c19
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr41181.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr41282.c20
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr41239.c67
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr41317.c28
-rw-r--r--gcc/testsuite/gcc.dg/c90-const-expr-10.c14
-rw-r--r--gcc/testsuite/gcc.dg/c90-const-expr-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/c90-const-expr-6.c8
-rw-r--r--gcc/testsuite/gcc.dg/c90-const-expr-9.c4
-rw-r--r--gcc/testsuite/gcc.dg/c99-const-expr-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/guality/guality.exp26
-rw-r--r--gcc/testsuite/gcc.dg/guality/guality.h39
-rw-r--r--gcc/testsuite/gcc.dg/large-size-array-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/large-size-array-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr39779.c8
-rw-r--r--gcc/testsuite/gcc.dg/pr41232.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr41241.c34
-rw-r--r--gcc/testsuite/gcc.dg/profile-dir-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/profile-dir-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/profile-dir-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr39074.c4
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr41261.c8
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-12.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr33920.c7
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c1
-rw-r--r--gcc/testsuite/gcc.dg/vect/O1-pr33854.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr33833.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr33846.c4
-rw-r--r--gcc/testsuite/gcc.misc-tests/i386-prefetch.exp7
-rw-r--r--gcc/testsuite/gcc.target/arm/ctz.c12
-rw-r--r--gcc/testsuite/gcc.target/bfin/mcpu-bf542m.c41
-rw-r--r--gcc/testsuite/gcc.target/bfin/mcpu-bf544m.c41
-rw-r--r--gcc/testsuite/gcc.target/bfin/mcpu-bf547m.c41
-rw-r--r--gcc/testsuite/gcc.target/bfin/mcpu-bf548m.c41
-rw-r--r--gcc/testsuite/gcc.target/bfin/mcpu-bf549m.c41
-rw-r--r--gcc/testsuite/gcc.target/i386/387-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/387-5.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/cmov7.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/funcspec-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/funcspec-8.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-2.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/isa-6.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/lea.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/pentium4-not-mull.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-5.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssefn-1.c1
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f904
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_stat_2.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f904
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_59.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/pr41225.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/pr41229.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_12.f9012
-rw-r--r--gcc/testsuite/gnat.dg/array8.adb34
-rw-r--r--gcc/testsuite/lib/target-supports.exp1
-rw-r--r--gcc/toplev.c32
-rw-r--r--gcc/tree-cfg.c56
-rw-r--r--gcc/tree-flow.h5
-rw-r--r--gcc/tree-parloops.c4
-rw-r--r--gcc/tree-sra.c93
-rw-r--r--gcc/tree-ssa-alias.c6
-rw-r--r--gcc/tree-ssa-ccp.c112
-rw-r--r--gcc/tree-ssa-loop-ivopts.c67
-rw-r--r--gcc/tree-ssa-operands.c4
-rw-r--r--gcc/tree-ssa-phiopt.c2
-rw-r--r--gcc/tree-ssa-pre.c75
-rw-r--r--gcc/tree-ssa-reassoc.c4
-rw-r--r--gcc/tree-ssa-sccvn.c5
-rw-r--r--gcc/tree-ssa.c79
-rw-r--r--gcc/tree-vect-stmts.c3
-rw-r--r--gcc/tree.c200
-rw-r--r--gcc/tree.h10
-rw-r--r--gcc/unwind-dw2.c2
-rw-r--r--gcc/var-tracking.c50
-rw-r--r--gcc/varasm.c16
-rw-r--r--libcpp/po/ChangeLog4
-rw-r--r--libcpp/po/id.po10
-rw-r--r--libdecnumber/ChangeLog8
-rw-r--r--libgfortran/ChangeLog23
-rw-r--r--libgfortran/intrinsics/getlog.c3
-rw-r--r--libgfortran/io/list_read.c16
-rw-r--r--libiberty/ChangeLog17
-rw-r--r--libiberty/config.in10
-rwxr-xr-xlibiberty/configure84
-rw-r--r--libiberty/configure.ac5
-rw-r--r--libiberty/hashtab.c2
-rw-r--r--libjava/ChangeLog4
-rwxr-xr-xlibjava/configure12
-rw-r--r--libstdc++-v3/ChangeLog38
-rwxr-xr-xlibstdc++-v3/configure47
-rw-r--r--libstdc++-v3/configure.ac5
-rw-r--r--libstdc++-v3/include/bits/basic_string.tcc4
-rw-r--r--libstdc++-v3/include/bits/istream.tcc40
-rw-r--r--libstdc++-v3/include/bits/ostream.tcc8
-rw-r--r--libstdc++-v3/include/bits/ostream_insert.h2
-rw-r--r--libstdc++-v3/include/bits/stl_algobase.h10
-rw-r--r--libstdc++-v3/src/compatibility.cc4
-rw-r--r--libstdc++-v3/src/istream.cc18
-rw-r--r--libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc4
-rw-r--r--libtool.m412
220 files changed, 5174 insertions, 1667 deletions
diff --git a/ChangeLog b/ChangeLog
index 6c297800263..6b53c3de876 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2009-09-09 Joseph Myers <joseph@codesourcery.com>
+
+ * MAINTAINERS (Reviewers): Add self as driver reviewer.
+
+2009-09-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * configure.ac: Do not use $extrasub for replacing @if/@endif
+ parts in Makefile; instead, use additional arguments to
+ AC_CONFIG_COMMANDS to do the replacement manually, with several
+ sed invocations, to avoid HP-UX sed command limits.
+ * configure: Regenerate.
+
+2009-09-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * libtool.m4 (output_verbose_link_cmd): Require leading blank, and
+ blank before -L.
+
+2009-09-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.ac (with-build-config): Document. Handle without.
+ Handle missing argument.
+ * configure: Rebuilt.
+
2009-09-03 Alexandre Oliva <aoliva@redhat.com>
* configure.ac (--with-build-config): New. Set BUILD_CONFIG.
diff --git a/MAINTAINERS b/MAINTAINERS
index fcad7612e84..c1ac2488353 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -245,6 +245,7 @@ outside of the parts of the compiler they maintain.
dataflow Paolo Bonzini bonzini@gnu.org
dataflow Seongbae Park seongbae.park@gmail.com
dataflow Kenneth Zadeck zadeck@naturalbridge.com
+driver Joseph Myers jsm@polyomino.org.uk
Fortran Janne Blomqvist jb@gcc.gnu.org
Fortran Tobias Burnus burnus@net-b.de
Fortran Jerry DeLisle jvdelisle@gcc.gnu.org
@@ -337,6 +338,7 @@ Jon Grimm jgrimm2@us.ibm.com
Laurent Guerby laurent@guerby.net
Xuepeng Guo xuepeng.guo@intel.com
Wei Guozhi carrot@google.com
+Daniel Gutson dgutson@codesourcery.com
Mostafa Hagog hagog@gcc.gnu.org
Olivier Hainque hainque@act-europe.fr
Stuart Hastings stuart@apple.com
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog
index 11ee0e61b5b..f5d7e2e5fc1 100644
--- a/boehm-gc/ChangeLog
+++ b/boehm-gc/ChangeLog
@@ -1,3 +1,12 @@
+2009-09-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure: Rebuilt with modified libtool.m4.
+
+2009-09-03 Loren J. Rittle <ljrittle@acm.org>
+
+ * dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use.
+ Define for FreeBSD 7.0+.
+
2009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac (AC_PREREQ): Bump to 2.64.
diff --git a/boehm-gc/configure b/boehm-gc/configure
index 1c615a6a732..101f2b468ab 100755
--- a/boehm-gc/configure
+++ b/boehm-gc/configure
@@ -12407,7 +12407,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
else
GXX=no
@@ -12744,7 +12744,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
;;
*)
if test "$GXX" = yes; then
@@ -12809,7 +12809,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
;;
*)
if test "$GXX" = yes; then
@@ -13153,7 +13153,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
else
# FIXME: insert proper C++ library support
@@ -13237,7 +13237,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
else
# g++ 2.7 appears to require `-G' NOT `-shared' on this
# platform.
@@ -13248,7 +13248,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
fi
hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
diff --git a/boehm-gc/dyn_load.c b/boehm-gc/dyn_load.c
index f205be2823d..200abde7810 100644
--- a/boehm-gc/dyn_load.c
+++ b/boehm-gc/dyn_load.c
@@ -400,6 +400,16 @@ GC_bool GC_register_main_static_data()
/* It may still not be available in the library on the target system. */
/* Thus we also treat it as a weak symbol. */
#define HAVE_DL_ITERATE_PHDR
+#pragma weak dl_iterate_phdr
+#endif
+
+# if (defined(FREEBSD) && __FreeBSD__ >= 7)
+/* On the FreeBSD system, any target system at major version 7 shall */
+/* have dl_iterate_phdr; therefore, we need not make it weak as above. */
+#define HAVE_DL_ITERATE_PHDR
+#endif
+
+#if defined(HAVE_DL_ITERATE_PHDR)
static int GC_register_dynlib_callback(info, size, ptr)
struct dl_phdr_info * info;
@@ -441,8 +451,6 @@ static int GC_register_dynlib_callback(info, size, ptr)
/* Return TRUE if we succeed, FALSE if dl_iterate_phdr wasn't there. */
-#pragma weak dl_iterate_phdr
-
GC_bool GC_register_dynamic_libraries_dl_iterate_phdr()
{
if (dl_iterate_phdr) {
diff --git a/config/ChangeLog b/config/ChangeLog
index 031b50936c7..ceea52ed782 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,23 @@
+2009-09-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * stdint.m4 (GCC_HEADER_STDINT): Revert changes to this macro in
+ the previous two patches.
+
+2009-09-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * stdint.m4: Store temporary file in $tmp/_GCC_STDINT_H.
+
+2009-09-08 Paolo Bonzini <bonzini@gnu.org>
+
+ * stdint.m4: Rewrite by using autoconf 2.64 features.
+
+2009-09-03 Alexandre Oliva <aoliva@redhat.com>
+
+ * bootstrap-debug-big.mk (STAGE2_CFLAGS): Drop -gtoggle.
+ * bootstrap-debug-lean.mk: Update comments.
+ (STAGE2_CFLAGS): Likewise.
+ (do-compare): Don't override.
+
2009-09-01 Alexandre Oliva <aoliva@redhat.com>
* bootstrap-debug.mk: Add comments.
diff --git a/config/stdint.m4 b/config/stdint.m4
index 025ffad9ea2..b26b4fc266d 100644
--- a/config/stdint.m4
+++ b/config/stdint.m4
@@ -1,3 +1,17 @@
+AC_DEFUN([GCC_STDINT_TYPES],
+[AC_REQUIRE([AC_TYPE_INT8_T])
+AC_REQUIRE([AC_TYPE_INT16_T])
+AC_REQUIRE([AC_TYPE_INT32_T])
+AC_REQUIRE([AC_TYPE_INT64_T])
+AC_REQUIRE([AC_TYPE_INTMAX_T])
+AC_REQUIRE([AC_TYPE_INTPTR_T])
+AC_REQUIRE([AC_TYPE_UINT8_T])
+AC_REQUIRE([AC_TYPE_UINT16_T])
+AC_REQUIRE([AC_TYPE_UINT32_T])
+AC_REQUIRE([AC_TYPE_UINT64_T])
+AC_REQUIRE([AC_TYPE_UINTMAX_T])
+AC_REQUIRE([AC_TYPE_UINTPTR_T])])
+
dnl @synopsis GCC_HEADER_STDINT [( HEADER-TO-GENERATE [, HEADERS-TO-CHECK])]
dnl
dnl the "ISO C9X: 7.18 Integer types <stdint.h>" section requires the
diff --git a/configure b/configure
index ab9dd26095a..d766140b422 100755
--- a/configure
+++ b/configure
@@ -814,6 +814,7 @@ enable_objc_gc
with_build_sysroot
with_debug_prefix_map
enable_bootstrap
+with_build_config
enable_serial_configure
with_build_time_tools
enable_maintainer_mode
@@ -1550,6 +1551,8 @@ Optional Packages:
use sysroot as the system root during the build
--with-debug-prefix-map='A=B C=D ...'
map A to B, C to D ... in debug information
+--with-build-config='NAME NAME2...'
+ Use config/NAME.mk build configuration
--with-build-time-tools=PATH
use given path to find target tools during the build
@@ -7330,12 +7333,13 @@ INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
# configuration, so that the top-level Makefile reconfigures them,
# like we used to do when configure itself was recursive.
-# Loop over modules. $extrasub must be used with care, limiting as
-# much as possible the usage of range addresses. That's because autoconf
-# splits the sed script to overcome limits in the number of commands,
-# and relying on carefully-timed sed passes may turn out to be very hard
-# to maintain later. In this particular case, you just have to be careful
-# not to nest @if/@endif pairs, because configure will not warn you at all.
+# Loop over modules. We used to use the "$extrasub" feature from Autoconf
+# but now we're fixing up the Makefile ourselves with the additional
+# commands passed to AC_CONFIG_FILES. Use separate variables
+# extrasub-{build,host,target} not because there is any reason to split
+# the substitutions up that way, but only to remain below the limit of
+# 99 commands in a script, for HP-UX sed.
+# Do not nest @if/@endif pairs, because configure will not warn you at all.
# Check whether --enable-bootstrap was given.
if test "${enable_bootstrap+set}" = set; then :
@@ -7397,6 +7401,17 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default BUILD_CONFIG" >&5
$as_echo_n "checking for default BUILD_CONFIG... " >&6; }
+
+
+# Check whether --with-build-config was given.
+if test "${with_build_config+set}" = set; then :
+ withval=$with_build_config; case $with_build_config in
+ yes) with_build_config= ;;
+ no) with_build_config= BUILD_CONFIG= ;;
+ esac
+fi
+
+
if test "x${with_build_config}" != x; then
BUILD_CONFIG=$with_build_config
else
@@ -7420,18 +7435,20 @@ fi
$as_echo "$BUILD_CONFIG" >&6; }
+extrasub_build=
for module in ${build_configdirs} ; do
if test -z "${no_recursion}" \
&& test -f ${build_subdir}/${module}/Makefile; then
echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
rm -f ${build_subdir}/${module}/Makefile
fi
- extrasub="$extrasub
+ extrasub_build="$extrasub_build
/^@if build-$module\$/d
/^@endif build-$module\$/d
/^@if build-$module-$bootstrap_suffix\$/d
/^@endif build-$module-$bootstrap_suffix\$/d"
done
+extrasub_host=
for module in ${configdirs} ; do
if test -z "${no_recursion}"; then
for file in stage*-${module}/Makefile prev-${module}/Makefile ${module}/Makefile; do
@@ -7441,12 +7458,13 @@ for module in ${configdirs} ; do
fi
done
fi
- extrasub="$extrasub
+ extrasub_host="$extrasub_host
/^@if $module\$/d
/^@endif $module\$/d
/^@if $module-$bootstrap_suffix\$/d
/^@endif $module-$bootstrap_suffix\$/d"
done
+extrasub_target=
for module in ${target_configdirs} ; do
if test -z "${no_recursion}" \
&& test -f ${target_subdir}/${module}/Makefile; then
@@ -7460,14 +7478,15 @@ for module in ${target_configdirs} ; do
*) target_bootstrap_suffix=no-bootstrap ;;
esac
- extrasub="$extrasub
+ extrasub_target="$extrasub_target
/^@if target-$module\$/d
/^@endif target-$module\$/d
/^@if target-$module-$target_bootstrap_suffix\$/d
/^@endif target-$module-$target_bootstrap_suffix\$/d"
done
-extrasub="$extrasub
+# Do the final fixup along with target modules.
+extrasub_target="$extrasub_target
/^@if /,/^@endif /d"
# Create the serialization dependencies. This uses a temporary file.
@@ -14836,6 +14855,13 @@ _ASBOX
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+extrasub_build="$extrasub_build"
+ extrasub_host="$extrasub_host"
+ extrasub_target="$extrasub_target"
+
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -15291,6 +15317,14 @@ which seems to be undefined. Please make sure it is defined." >&2;}
esac
+
+ case $ac_file$ac_mode in
+ "Makefile":F) sed "$extrasub_build" Makefile |
+ sed "$extrasub_host" |
+ sed "$extrasub_target" > mf$$
+ mv -f mf$$ Makefile ;;
+
+ esac
done # for ac_tag
diff --git a/configure.ac b/configure.ac
index 33e3afc9751..255575d8ad3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2516,12 +2516,13 @@ INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
# configuration, so that the top-level Makefile reconfigures them,
# like we used to do when configure itself was recursive.
-# Loop over modules. $extrasub must be used with care, limiting as
-# much as possible the usage of range addresses. That's because autoconf
-# splits the sed script to overcome limits in the number of commands,
-# and relying on carefully-timed sed passes may turn out to be very hard
-# to maintain later. In this particular case, you just have to be careful
-# not to nest @if/@endif pairs, because configure will not warn you at all.
+# Loop over modules. We used to use the "$extrasub" feature from Autoconf
+# but now we're fixing up the Makefile ourselves with the additional
+# commands passed to AC_CONFIG_FILES. Use separate variables
+# extrasub-{build,host,target} not because there is any reason to split
+# the substitutions up that way, but only to remain below the limit of
+# 99 commands in a script, for HP-UX sed.
+# Do not nest @if/@endif pairs, because configure will not warn you at all.
AC_ARG_ENABLE([bootstrap],
[ --enable-bootstrap enable bootstrapping @<:@yes if native build@:>@],,
@@ -2577,6 +2578,15 @@ case $enable_bootstrap in
esac
AC_MSG_CHECKING(for default BUILD_CONFIG)
+
+AC_ARG_WITH([build-config],
+ [--with-build-config='NAME NAME2...'
+ Use config/NAME.mk build configuration],
+ [case $with_build_config in
+ yes) with_build_config= ;;
+ no) with_build_config= BUILD_CONFIG= ;;
+ esac])
+
if test "x${with_build_config}" != x; then
BUILD_CONFIG=$with_build_config
else
@@ -2599,18 +2609,20 @@ fi
AC_MSG_RESULT($BUILD_CONFIG)
AC_SUBST(BUILD_CONFIG)
+extrasub_build=
for module in ${build_configdirs} ; do
if test -z "${no_recursion}" \
&& test -f ${build_subdir}/${module}/Makefile; then
echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
rm -f ${build_subdir}/${module}/Makefile
fi
- extrasub="$extrasub
+ extrasub_build="$extrasub_build
/^@if build-$module\$/d
/^@endif build-$module\$/d
/^@if build-$module-$bootstrap_suffix\$/d
/^@endif build-$module-$bootstrap_suffix\$/d"
done
+extrasub_host=
for module in ${configdirs} ; do
if test -z "${no_recursion}"; then
for file in stage*-${module}/Makefile prev-${module}/Makefile ${module}/Makefile; do
@@ -2620,12 +2632,13 @@ for module in ${configdirs} ; do
fi
done
fi
- extrasub="$extrasub
+ extrasub_host="$extrasub_host
/^@if $module\$/d
/^@endif $module\$/d
/^@if $module-$bootstrap_suffix\$/d
/^@endif $module-$bootstrap_suffix\$/d"
done
+extrasub_target=
for module in ${target_configdirs} ; do
if test -z "${no_recursion}" \
&& test -f ${target_subdir}/${module}/Makefile; then
@@ -2639,14 +2652,15 @@ for module in ${target_configdirs} ; do
*) target_bootstrap_suffix=no-bootstrap ;;
esac
- extrasub="$extrasub
+ extrasub_target="$extrasub_target
/^@if target-$module\$/d
/^@endif target-$module\$/d
/^@if target-$module-$target_bootstrap_suffix\$/d
/^@endif target-$module-$target_bootstrap_suffix\$/d"
done
-extrasub="$extrasub
+# Do the final fixup along with target modules.
+extrasub_target="$extrasub_target
/^@if /,/^@endif /d"
# Create the serialization dependencies. This uses a temporary file.
@@ -3264,4 +3278,12 @@ case "$target" in
esac
AC_SUBST(compare_exclusions)
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile],
+ [sed "$extrasub_build" Makefile |
+ sed "$extrasub_host" |
+ sed "$extrasub_target" > mf$$
+ mv -f mf$$ Makefile],
+ [extrasub_build="$extrasub_build"
+ extrasub_host="$extrasub_host"
+ extrasub_target="$extrasub_target"])
+AC_OUTPUT
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index d15084e0bbf..3174cfff58e 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,9 +1,6 @@
-2009-09-03 Alexandre Oliva <aoliva@redhat.com>
+2009-09-04 Alexandre Oliva <aoliva@redhat.com>
- * bootstrap-debug-big.mk (STAGE2_CFLAGS): Drop -gtoggle.
- * bootstrap-debug-lean.mk: Update comments.
- (STAGE2_CFLAGS): Likewise.
- (do-compare): Don't override.
+ * compare-debug: Grep for blank before dash to avoid grep -e.
2009-09-01 Alexandre Oliva <aoliva@redhat.com>
diff --git a/contrib/compare-debug b/contrib/compare-debug
index c2e1335366c..6f2b4abfb5c 100755
--- a/contrib/compare-debug
+++ b/contrib/compare-debug
@@ -78,7 +78,7 @@ else
cmp2=
for t in objdump readelf eu-readelf; do
- if ($t --help) 2>&1 | grep -e '--\[*section-\]*headers' > /dev/null; then
+ if ($t --help) 2>&1 | grep ' --\[*section-\]*headers' > /dev/null; then
cmd=$t
$cmd --section-headers "$1.$suf1" | grep '\.eh_frame' > /dev/null
@@ -109,13 +109,13 @@ else
echo stripping off .eh_frame, then retrying >&2
- if (objcopy -v) 2>&1 | grep -e "--remove-section" > /dev/null; then
+ if (objcopy -v) 2>&1 | grep ' --remove-section' > /dev/null; then
objcopy --remove-section .eh_frame --remove-section .rel.eh_frame --remove-section .rela.eh_frame "$1.$suf1" "$1.$suf3"
mv "$1.$suf3" "$1.$suf1"
objcopy --remove-section .eh_frame --remove-section .rel.eh_frame --remove-section .rela.eh_frame "$2.$suf2" "$2.$suf4"
mv "$2.$suf4" "$2.$suf2"
- elif (strip --help) 2>&1 | grep -e --remove-section > /dev/null; then
+ elif (strip --help) 2>&1 | grep ' --remove-section' > /dev/null; then
cp "$1.$suf1" "$1.$suf3"
strip --remove-section .eh_frame --remove-section .rel.eh_frame --remove-section .rela.eh_frame "$1.$suf3"
mv "$1.$suf3" "$1.$suf1"
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 2bf7bf90555..43c1e7cacb3 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,29 @@
+2009-09-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ PR testsuite/29737
+ PR bootstrap/35938
+ PR testsuite/39655
+ * check.tpl: Fix typos.
+ * README: Likewise. Also, document that 'select' uses ERE.
+ * mkheaders.in: Update copyright years in --version output.
+ * inclhack.def (sco_math): Add missing final newline in sed
+ script 'a', 'c', or 'i' commands, for BSD sed.
+ (sco_math): In the text of 'a', 'c', or 'i' sed
+ commands, prepend leading white space with a backslash to avoid
+ the whitespace to be removed by BSD sed.
+ (sco_math): Match plain 'C++' instead of 'C\+\+' in sed regex.
+ (x11_new): Fix sed expression, for BSD sed.
+ (glibc_mutex_init): Fix newlines in sed 's' command replacement
+ part, for GNU sed 3.02 and Solaris sed.
+ (glibc_mutex_init): Replace unportable \+ sed regex operator
+ with \{1,\}.
+ (glibc_c99_inline_2, glibc_mutex_init): Avoid unportable sed
+ alternation \| regex operator.
+ (solaris_complex): Remove superfluous backslashes from
+ replacement string. Replace \+ operator with \{1,\}.
+ * tests/base/Xm/Traversal.h: This is fixed for BSD sed now.
+ * fixincl.x: Regenerate.
+
2009-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR libfortran/41169
diff --git a/fixincludes/README b/fixincludes/README
index e9e46546636..5536a34ec98 100644
--- a/fixincludes/README
+++ b/fixincludes/README
@@ -51,7 +51,7 @@ To make your fix, you will need to do several things:
the proper functioning of a different fix. Make sure your
fix is properly tested and it does what it is supposed to do.
-6. Now that you have the right things happening, syncronize the
+6. Now that you have the right things happening, synchronize the
$(srcdir)/tests/base directory with the $(builddir)/tests/res
directory. The output of "make check" will be some diffs that
should give you some hints about what to do.
@@ -82,22 +82,23 @@ MAKING CHANGES TO INCLHACK.DEF
and "c-test" because they are performed internally:
* select - Run a regex on the contents of the file being considered.
- All such regex-es must match.
+ All such regex-es must match. Matching is done with
+ extended regular expressions.
* bypass - Run a regex on the contents of the file being considered.
No such regex may match.
- * c-test - call a function in fixtests.c. See that file.
+ * c_test - call a function in fixtests.c. See that file.
* files - the "fnmatch" pattern of the file(s) to examine for
the issue. There may be several copies of this attribute.
If the header lives in a /usr/include subdirectory, be
sure to include that subdirectory in the name. e.g. net/if.h
- * mach - Match the output of config.conf against a series of fnmatch
+ * mach - Match the output of config.guess against a series of fnmatch
patterns. It must match at least one of the patterns, unless
"not-machine" has also been specified. In that case, the
- config.conf output must not match any of the patterns.
+ config.guess output must not match any of the patterns.
The next test is relatively slow because it must be handled in a
separate shell process. Some platforms do not support server shells,
@@ -113,7 +114,7 @@ MAKING CHANGES TO INCLHACK.DEF
1. Be positive for all header files that require the fix.
- It is desireable to:
+ It is desirable to:
2. Be negative as often as possible whenever the fix is not
required, avoiding the process overhead.
diff --git a/fixincludes/check.tpl b/fixincludes/check.tpl
index bb93bcc3eee..b239d8b5598 100644
--- a/fixincludes/check.tpl
+++ b/fixincludes/check.tpl
@@ -1,7 +1,7 @@
[= autogen5 template sh=check.sh =]
[=
#
-# This file contanes the shell template to run tests on the fixes
+# This file contains the shell template to run tests on the fixes
#
=]#!/bin/sh
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index d9c194f217b..21a6ef18b4e 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Wednesday September 2, 2009 at 04:57:56 PM MEST
+ * It has been AutoGen-ed Tuesday September 8, 2009 at 07:26:10 PM CEST
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Sep 2 16:57:56 MEST 2009
+/* DO NOT SVN-MERGE THIS FILE, EITHER Di 8. Sep 19:26:11 CEST 2009
*
* You must regenerate it. Use the ./genfixes script.
*
@@ -2644,11 +2644,23 @@ static tTestDesc aGlibc_C99_Inline_2Tests[] = {
* Fix Command Arguments for Glibc_C99_Inline_2
*/
static const char* apzGlibc_C99_Inline_2Patch[] = { sed_cmd_z,
- "-e", "s/extern int \\(stat\\|lstat\\|fstat\\|mknod\\)/#ifdef __GNUC_GNU_INLINE__\\\n\
+ "-e", "s/extern int \\(stat\\)/#ifdef __GNUC_GNU_INLINE__\\\n\
extern\\\n\
#endif\\\n\
__inline__ int \\1/",
- "-e", "s/extern int __REDIRECT\\(_NTH\\|\\) (\\(stat\\|lstat\\|fstat\\)/#ifdef __GNUC_GNU_INLINE__\\\n\
+ "-e", "s/extern int \\([lf]stat\\)/#ifdef __GNUC_GNU_INLINE__\\\n\
+extern\\\n\
+#endif\\\n\
+__inline__ int \\1/",
+ "-e", "s/extern int \\(mknod\\)/#ifdef __GNUC_GNU_INLINE__\\\n\
+extern\\\n\
+#endif\\\n\
+__inline__ int \\1/",
+ "-e", "s/extern int __REDIRECT\\(_NTH\\)\\{0,1\\} (\\(stat\\)/#ifdef __GNUC_GNU_INLINE__\\\n\
+extern\\\n\
+#endif\\\n\
+__inline__ int __REDIRECT\\1 (\\2/",
+ "-e", "s/extern int __REDIRECT\\(_NTH\\)\\{0,1\\} (\\([lf]stat\\)/#ifdef __GNUC_GNU_INLINE__\\\n\
extern\\\n\
#endif\\\n\
__inline__ int __REDIRECT\\1 (\\2/",
@@ -2774,15 +2786,25 @@ static tTestDesc aGlibc_Mutex_InitTests[] = {
* Fix Command Arguments for Glibc_Mutex_Init
*/
static const char* apzGlibc_Mutex_InitPatch[] = { sed_cmd_z,
- "-e", "/define[ \t]\\+PTHREAD_MUTEX_INITIALIZER[ \t]*\\\\/{\n\
+ "-e", "/define[ \t]\\{1,\\}PTHREAD_MUTEX_INITIALIZER[ \t]*\\\\/{\n\
N\n\
s/{ { 0, } }/{ { 0, 0, 0, 0, 0, 0 } }/\n\
}",
- "-e", "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0 }/",
- "-e", "s/{ \\(0, 0, 0, PTHREAD_MUTEX_\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0, 0 }/",
- "-e", "/define[ \t]\\+PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\/N;s/^[ \t]*#[ \t]*\\(define[ \t]\\+PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\\\)\\n[ \t]*{ { 0, } }/# if __WORDSIZE == 64\\n# \\1\\n { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }\\n# else\\n# \\1\\n { { 0, 0, 0, 0, 0, 0, 0, 0 } }\\n# endif/",
+ "-e", "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_\\(RECURSIVE\\)_NP\\) }/{ \\1, 0 }/",
+ "-e", "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_\\(ERRORCHECK\\)_NP\\) }/{ \\1, 0 }/",
+ "-e", "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_\\(ADAPTIVE\\)_NP\\) }/{ \\1, 0 }/",
+ "-e", "s/{ \\(0, 0, 0, PTHREAD_MUTEX_\\(RECURSIVE\\)_NP\\) }/{ \\1, 0, 0 }/",
+ "-e", "s/{ \\(0, 0, 0, PTHREAD_MUTEX_\\(ERRORCHECK\\)_NP\\) }/{ \\1, 0, 0 }/",
+ "-e", "s/{ \\(0, 0, 0, PTHREAD_MUTEX_\\(ADAPTIVE\\)_NP\\) }/{ \\1, 0, 0 }/",
+ "-e", "/define[ \t]\\{1,\\}PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\/N;s/^[ \t]*#[ \t]*\\(define[ \t]\\{1,\\}PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\\\)\\n[ \t]*{ { 0, } }/# if __WORDSIZE == 64\\\n\
+# \\1\\\n\
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }\\\n\
+# else\\\n\
+# \\1\\\n\
+ { { 0, 0, 0, 0, 0, 0, 0, 0 } }\\\n\
+# endif/",
"-e", "s/{ \\(0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP\\) }/{ \\1, 0 }/",
- "-e", "/define[ \t]\\+PTHREAD_COND_INITIALIZER/s/{ { 0, } }/{ { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }/",
+ "-e", "/define[ \t]\\{1,\\}PTHREAD_COND_INITIALIZER/s/{ { 0, } }/{ { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }/",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -6165,15 +6187,15 @@ static const char* apzSco_MathPatch[] = { sed_cmd_z,
"-e", "/.*__builtin_generic/a\\\n\
#else\\\n\
#define __fp_class(a) \\\\\\\n\
- __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),long double),\\\\\\\n\
- __fpclassifyl(a), \\\\\\\n\
- __builtin_choose_expr(__builtin_types_compatible_p(typeof(a), float), \\\\\\\n\
- __fpclassifyf(a),__fpclassify(a)))\\\n\
-#endif",
- "-e", "/extern \"C\\+\\+\"/N;/inline double abs/i\\\n\
+\\ __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),long double),\\\\\\\n\
+\\ __fpclassifyl(a), \\\\\\\n\
+\\ __builtin_choose_expr(__builtin_types_compatible_p(typeof(a), float), \\\\\\\n\
+\\ __fpclassifyf(a),__fpclassify(a)))\\\n\
+#endif\n",
+ "-e", "/extern \"C++\"/N;/inline double abs/i\\\n\
#ifndef __GNUC__\n",
- "-e", "/inline long double trunc/N;/inline long double trunc.*}.*extern \"C\\+\\+\"/a\\\n\
-#endif /* ! __GNUC__ */",
+ "-e", "/inline long double trunc/N;/inline long double trunc.*}.*extern \"C++\"/a\\\n\
+#endif /* ! __GNUC__ */\n",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -6209,10 +6231,10 @@ static tTestDesc aSolaris_ComplexTests[] = {
* Fix Command Arguments for Solaris_Complex
*/
static const char* apzSolaris_ComplexPatch[] = { sed_cmd_z,
- "-e", "s/#define[ \t]_Complex_I[ \t]_Complex_I/#define\t_Complex_I\t\\(__extension__ 1.0iF\\)/",
+ "-e", "s/#define[ \t]_Complex_I[ \t]_Complex_I/#define\t_Complex_I\t(__extension__ 1.0iF)/",
"-e", "/#define[ \t]_Imaginary_I[ \t]_Imaginary_I/d",
"-e", "/#define[ \t]imaginary[ \t]_Imaginary/d",
- "-e", "s/#define[ \t]I[ \t]\\+_Imaginary_I/#define\tI\t\t_Complex_I/",
+ "-e", "s/#define[ \t]I[ \t]\\{1,\\}_Imaginary_I/#define\tI\t\t_Complex_I/",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -8331,7 +8353,7 @@ static tTestDesc aX11_NewTests[] = {
static const char* apzX11_NewPatch[] = { sed_cmd_z,
"-e", "/Widget\told, new;/i\\\n\
#ifdef __cplusplus\\\n\
-\tWidget\told, c_new;\\\n\
+\\\tWidget\told, c_new;\\\n\
#else\n",
"-e", "/Widget\told, new;/a\\\n\
#endif\n",
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index f7ad8773e2a..0d2602df6f9 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -1451,10 +1451,19 @@ fix = {
hackname = glibc_c99_inline_2;
files = sys/stat.h, '*/sys/stat.h';
select = "extern __inline__ int";
- sed = "s/extern int \\(stat\\|lstat\\|fstat\\|mknod\\)/"
+ sed = "s/extern int \\(stat\\)/"
"#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
"__inline__ int \\1/";
- sed = "s/extern int __REDIRECT\\(_NTH\\|\\) (\\(stat\\|lstat\\|fstat\\)/"
+ sed = "s/extern int \\([lf]stat\\)/"
+ "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
+ "__inline__ int \\1/";
+ sed = "s/extern int \\(mknod\\)/"
+ "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
+ "__inline__ int \\1/";
+ sed = "s/extern int __REDIRECT\\(_NTH\\)\\{0,1\\} (\\(stat\\)/"
+ "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
+ "__inline__ int __REDIRECT\\1 (\\2/";
+ sed = "s/extern int __REDIRECT\\(_NTH\\)\\{0,1\\} (\\([lf]stat\\)/"
"#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
"__inline__ int __REDIRECT\\1 (\\2/";
sed = "s/^extern __inline__ int/"
@@ -1509,25 +1518,33 @@ fix = {
hackname = glibc_mutex_init;
files = pthread.h;
select = '\{ *\{ *0, *\} *\}';
- sed = "/define[ \t]\\+PTHREAD_MUTEX_INITIALIZER[ \t]*\\\\/{\n"
+ sed = "/define[ \t]\\{1,\\}PTHREAD_MUTEX_INITIALIZER[ \t]*\\\\/{\n"
"N\ns/{ { 0, } }/{ { 0, 0, 0, 0, 0, 0 } }/\n}";
sed = "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_"
- "\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0 }/";
+ "\\(RECURSIVE\\)_NP\\) }/{ \\1, 0 }/";
+ sed = "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_"
+ "\\(ERRORCHECK\\)_NP\\) }/{ \\1, 0 }/";
+ sed = "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_"
+ "\\(ADAPTIVE\\)_NP\\) }/{ \\1, 0 }/";
+ sed = "s/{ \\(0, 0, 0, PTHREAD_MUTEX_"
+ "\\(RECURSIVE\\)_NP\\) }/{ \\1, 0, 0 }/";
+ sed = "s/{ \\(0, 0, 0, PTHREAD_MUTEX_"
+ "\\(ERRORCHECK\\)_NP\\) }/{ \\1, 0, 0 }/";
sed = "s/{ \\(0, 0, 0, PTHREAD_MUTEX_"
- "\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0, 0 }/";
- sed = "/define[ \t]\\+PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\/"
+ "\\(ADAPTIVE\\)_NP\\) }/{ \\1, 0, 0 }/";
+ sed = "/define[ \t]\\{1,\\}PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\/"
"N;s/^[ \t]*#[ \t]*"
- "\\(define[ \t]\\+PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\\\)\\n"
- "[ \t]*{ { 0, } }/# if __WORDSIZE == 64\\n"
- "# \\1\\n"
- " { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }\\n"
- "# else\\n"
- "# \\1\\n"
- " { { 0, 0, 0, 0, 0, 0, 0, 0 } }\\n"
+ "\\(define[ \t]\\{1,\\}PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\\\)\\n"
+ "[ \t]*{ { 0, } }/# if __WORDSIZE == 64\\\n"
+ "# \\1\\\n"
+ " { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }\\\n"
+ "# else\\\n"
+ "# \\1\\\n"
+ " { { 0, 0, 0, 0, 0, 0, 0, 0 } }\\\n"
"# endif/";
sed = "s/{ \\(0, 0, 0, 0, 0, 0, "
"PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP\\) }/{ \\1, 0 }/";
- sed = "/define[ \t]\\+PTHREAD_COND_INITIALIZER/"
+ sed = "/define[ \t]\\{1,\\}PTHREAD_COND_INITIALIZER/"
"s/{ { 0, } }/{ { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }/";
test_text = <<- _EOText_
@@ -3222,18 +3239,18 @@ fix = {
"/.*__builtin_generic/a\\\n"
"#else\\\n"
"#define __fp_class(a) \\\\\\\n"
-" __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),long double),\\\\\\\n"
-" __fpclassifyl(a), \\\\\\\n"
-" __builtin_choose_expr(__builtin_types_compatible_p(typeof(a), float), \\\\\\\n"
-" __fpclassifyf(a),__fpclassify(a)))\\\n"
-"#endif";
+"\\ __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),long double),\\\\\\\n"
+"\\ __fpclassifyl(a), \\\\\\\n"
+"\\ __builtin_choose_expr(__builtin_types_compatible_p(typeof(a), float), \\\\\\\n"
+"\\ __fpclassifyf(a),__fpclassify(a)))\\\n"
+"#endif\n";
- sed = "/extern \"C\\+\\+\"/N;"
+ sed = "/extern \"C++\"/N;"
"/inline double abs/i\\\n"
"#ifndef __GNUC__\n";
sed = "/inline long double trunc/N;"
- "/inline long double trunc.*}.*extern \"C\\+\\+\"/a\\\n"
- "#endif /* ! __GNUC__ */";
+ "/inline long double trunc.*}.*extern \"C++\"/a\\\n"
+ "#endif /* ! __GNUC__ */\n";
test_text =
"#define __fp_class(a) \\\\\n"
@@ -3253,10 +3270,10 @@ fix = {
files = complex.h;
select = "#define[ \t]_Complex_I[ \t]_Complex_I";
sed = "s/#define[ \t]_Complex_I[ \t]_Complex_I/"
- "#define\t_Complex_I\t\\(__extension__ 1.0iF\\)/";
+ "#define\t_Complex_I\t(__extension__ 1.0iF)/";
sed = "/#define[ \t]_Imaginary_I[ \t]_Imaginary_I/d";
sed = "/#define[ \t]imaginary[ \t]_Imaginary/d";
- sed = "s/#define[ \t]I[ \t]\\+_Imaginary_I/#define\tI\t\t_Complex_I/";
+ sed = "s/#define[ \t]I[ \t]\\{1,\\}_Imaginary_I/#define\tI\t\t_Complex_I/";
test_text = "#define _Complex_I _Complex_I\n"
"#define complex _Complex\n"
"#define _Imaginary_I _Imaginary_I\n"
@@ -4438,7 +4455,7 @@ fix = {
sed = "/Widget\told, new;/i\\\n"
"#ifdef __cplusplus\\\n"
- "\tWidget\told, c_new;\\\n"
+ "\\\tWidget\told, c_new;\\\n"
"#else\n";
sed = "/Widget\told, new;/a\\\n"
@@ -4447,7 +4464,7 @@ fix = {
sed = "s/Widget new,/Widget c_new,/g";
test_text =
"struct wedge {\n"
- " Widget\told, new; /* fixinc check FAILS ON BSD */\n"
+ " Widget\told, new;\n"
"};\nextern Wedged( Widget new, Widget old );";
};
diff --git a/fixincludes/mkheaders.in b/fixincludes/mkheaders.in
index 33a7a524835..9109b057c53 100644
--- a/fixincludes/mkheaders.in
+++ b/fixincludes/mkheaders.in
@@ -41,7 +41,7 @@ fi
if [ x$1 = x--version ] ; then
echo "mkheaders (GCC) version $version"
- echo "Copyright 2002, 2007 Free Software Foundation, Inc."
+ echo "Copyright 2002, 2007, 2009 Free Software Foundation, Inc."
echo "This program is free software; you may redistribute it under the"
echo "terms of the GNU General Public License. This program has"
echo "absolutely no warranty."
diff --git a/fixincludes/tests/base/Xm/Traversal.h b/fixincludes/tests/base/Xm/Traversal.h
index 61e6df1164e..2b3cba73fa1 100644
--- a/fixincludes/tests/base/Xm/Traversal.h
+++ b/fixincludes/tests/base/Xm/Traversal.h
@@ -14,7 +14,7 @@ struct wedge {
#ifdef __cplusplus
Widget old, c_new;
#else
- Widget old, new; /* fixinc check FAILS ON BSD */
+ Widget old, new;
#endif
};
extern Wedged( Widget c_new, Widget old );
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 26e65c5c565..c85c486e6cb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,39 +1,602 @@
+2009-09-10 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41257
+ * cgraphunit.c (cgraph_emit_thunks): Emit thunks only for
+ reachable nodes.
+ (cgraph_finalize_compilation_unit): Compute reachability
+ before emitting thunks. Properly process aliases before
+ possibly removing unreachable nodes.
+
+2009-09-10 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41254
+ * tree.c (struct free_lang_data_d): Add worklist member.
+ (find_decls_types_r): Push onto the worklist instead of recursing.
+ Handle TREE_BINFOs properly.
+ (find_decls_types): New function wrapped around find_decls_types_r
+ to process the worklist.
+ (find_decls_types_in_eh_region): Use it.
+ (find_decls_types_in_node): Likewise.
+ (find_decls_types_in_var): Likewise.
+ (free_lang_data_in_cgraph): Likewise. Free the worklist.
+ * tree.h (RECORD_OR_UNION_TYPE_P): New.
+ (AGGREGATE_TYPE_P): Adjust.
+
+2009-09-09 Jason Merrill <jason@redhat.com>
+
+ * configure.ac: Check glibc version even if we have an in-tree
+ assembler.
+
+2009-09-09 Anthony Green <green@moxielogic.com>
+
+ * config/moxie/moxie.md (*movsi, *movhi, *movqi): Use xor to load
+ the constant 0 when appropriate.
+ * config/moxie/constraints.md: Add constraint O.
+
+ * config/moxie/moxie.c (moxie_setup_incoming_varargs): Adjust
+ to pass up to 6 32-bit argument values in registers.
+ (moxie_function_arg): Ditto.
+ (moxie_arg_partial_bytes): Ditto.
+ * config/moxie/moxie.h (FUNCTION_ARG_ADVANCE): Ditto.
+ (REG_PARM_STACK_SPACE): Ditto.
+ (FUNCTION_ARG_REGNO_P): Ditto.
+
+ * config/moxie/moxie.c (moxie_expand_prologue): Use dec
+ instruction to allocate stack space.
+
+2009-09-09 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * config/rs6000/rs6000.md (bswapdi2_64bit): Fix
+ unnecessarily stringent constraints. Fix address
+ calculation in the splitters.
+
+2009-09-09 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/39779
+ * expr.c (convert_modes): Return when mode == oldmode after
+ CONST_INTs are processed.
+
+2009-09-09 Kai Tietz <kai.tietz@onevision.com>
+
+ PR/41315
+ * config/i386.c (ix86_can_use_return_insn_p): Check for padding0, too.
+ (ix86_expand_prologue): Take frame.padding0 into logic of
+ to_allocate checks.
+ (ix86_expand_epilogue): Likewise.
+
+2009-09-09 Jakub Jelinek <jakub@redhat.com>
+
+ * config/t-slibgcc-elf-ver (SHLIB_MAKE_SOLINK, SHLIB_INSTALL_SOLINK):
+ New variables.
+ (SHLIB_LINK, SHLIB_INSTALL): Use them.
+ * config/t-slibgcc-libgcc: New file.
+ * config.gcc (powerpc*-*-linux*, powerpc*-*-gnu*): Use it.
+
+2009-09-09 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/41089
+ * tree-sra.c (find_var_candidates): Do not consider va_lists in
+ early SRA.
+
+2009-09-09 Richard Henderson <rth@redhat.com>
+
+ * gimple.h (CASE_GIMPLE_OMP): New.
+ (is_gimple_omp): Use it.
+ * tree-cfg.c (is_ctrl_altering_stmt): Likewise.
+ (verify_gimple_debug): Likewise.
+
+2009-09-09 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/41101
+ * tree-ssa-pre.c (maximal_set): Remove.
+ (compute_antic_aux): Treat the maximal set as implicitly all ones.
+ Defer all blocks we didn't visit at least one successor.
+ (add_to_exp_gen): Do not add to the maximal set.
+ (make_values_for_phi): Likewise.
+ (compute_avail): Likewise.
+ (init_pre): Do not allocate the maximal set.
+ (execute_pre): Do not dump it.
+
+2009-09-09 Martin Jambor <mjambor@suse.cz>
+
+ * tree-cfg.c (verify_gimple_phi): Check that gimple_phi_result is
+ an SSA_NAME rather than a is_gimple_variable.
+
+2009-09-09 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41317
+ * tree-ssa-ccp.c (maybe_fold_offset_to_component_ref): Remove
+ code dealing with plain pointer bases.
+ (maybe_fold_offset_to_reference): Likewise.
+ (maybe_fold_stmt_addition): Adjust.
+
+2009-09-09 Richard Guenther <rguenther@suse.de>
+
+ * tree.c (free_lang_data_in_type): Do not free the type variant
+ chains.
+ (free_lang_data): Merge char_type_node with its properly signed
+ variant.
+ (pass_ipa_free): Collect after freeing language specific data.
+
+2009-09-09 Michael Matz <matz@suse.de>
+
+ PR middle-end/41268
+ * cfgexpand.c (expand_gimple_stmt_1): Use an int for storing
+ SUBREG_PROMOTED_UNSIGNED_P, instead of a bool.
+ * rtl.h (struct rtx, SUBREG_PROMOTED_UNSIGNED_P): Update comments
+ to reflect reality.
+
+2009-09-08 DJ Delorie <dj@redhat.com>
+
+ * config/mep/mep.c (conversions[]): Add "ml" pattern.
+
+2009-09-04 Jason Merrill <jason@redhat.com>
+
+ * tree.c (tree_find_value): Remove.
+ * tree.h: Remove prototype.
+ * varasm.c (assemble_external): Use value_member instead.
+
+2009-09-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * toplev.c (process_options): Choose default debugging type when
+ gtoggle enables debug info and type is unset.
+
+2009-09-08 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/41276
+ PR debug/41307
+ * cselib.c (cselib_expand_value_rtx_1): Don't return copy of
+ invalid subreg.
+
+2009-09-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure: Rebuilt with modified libtool.m4.
+
+2009-09-08 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/41229
+ PR debug/41291
+ PR debug/41300
+ * tree-ssa.c (execute_update_addresses_taken): Update debug insns.
+
+2009-09-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * tree-ssa-loop-ivopts.c (get_phi_with_result): Remove.
+ (remove_statement): Likewise.
+ (rewrite_use_nonlinear_expr): Adjust.
+ (remove_unused_ivs): Collect SSA NAMEs to remove and call...
+ * tree-ssa.c (release_defs_bitset): ... this. New.
+ * tree-flow.h (release_defs_bitset): Declare.
+
+2009-09-08 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/41232
+ * tree-ssa-phiopt.c (minmax_replacement): Skip debug stmts
+ in the middle block.
+
+2009-09-08 Kai Tietz <kai.tietz@onevision.com>
+
+ * tree-ssa-reassoc.c (find_operand_rank): Cast pointer
+ via intptr_t to long type.
+ (insert_operand_rank): Cast long type via intptr_t to
+ pointer type.
+ * genattrtab.c (RTL_HASH): Use intptr_t to cast from
+ pointer to scalar.
+ * c-pretty-print.c (pp_c_tree_decl_identifier): Cast
+ from pointer to unsigned via uintptr_t.
+
+ * configure.ac (GCC_STDINT_TYPES): Initialize intptr_t,
+ uintptr_t, HAVE_INTTYPES_H, HAVE_STDINT_H, HAVE_UINTPTR_T,
+ and HAVE_INTPTR_T.
+ * configure: Regenerated.
+ * config.in: Regenerated
+ * system.h (stdint.h): Add include.
+ (inttypes.h): Likewise.
+ * Makefile.in (aclocal): Add config/stdint.m4.
+ * aclocal.m4: Regenerated.
+
+2009-09-08 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * config/bfin/bfin.c (np_check_regno, np_after_branch): New static
+ variables.
+ (note_np_check_stores): New function.
+ (harmless_null_pointer_p): New function.
+ (trapping_loads_p): New args NP_REG and AFTER_NP_BRANCH. Callers
+ changed. Take into account whether we're in the shadow of a condjump
+ that tested NP_REG for NULL.
+ Lose all code that tested for SEQUENCEs.
+ (workaround_speculation): Avoid inserting NOPs for loads that are
+ either always executed or a NULL pointer.
+
+2009-09-08 Jan Hubicka <jh@suse.cz>
+
+ * doc/invoke.texi (early-inlining-insns): Reduce from 12 to 8.
+ * params.def (early-inlining-insns): Likewise.
+
+2009-09-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/41239
+ * sched-int.h (struct deps): Add last_function_call_may_noreturn field.
+ * sched-rgn.c (deps_join): Join also last_function_call_may_noreturn
+ lists.
+ * sched-deps.c (sched_analyze_insn): Prevent moving trapping insns
+ across calls, as the calls might not always return normally.
+ (call_may_noreturn_p): New function.
+ (deps_analyze_insn): Update last_function_call_may_noreturn list.
+ (init_deps): Initialize it.
+ (remove_from_deps): Also remove calls from
+ last_function_call_may_noreturn list.
+
+2009-09-07 Richard Henderson <rth@redhat.com>
+
+ * tree-ssa-sccvn.c (vn_reference_lookup_3): Don't assume there are
+ more VR->OPERANDS than LHS operands. Free LHS before returning.
+
+2009-09-07 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * config/bfin/bfin.md (UNSPEC_VOLATILE_STALL): New constant.
+ (attr "addrtype"): New member "spreg".
+ Use it if mem_spfp_address_operand is true for the address.
+ (attr "type"): New entry "stall".
+ (cpu_unit "load"): New.
+ (insn_reservations "load32", "loadp", "loadi"): Add reservation of
+ "load".
+ (insn_reservation "loadsp"): New.
+ (insn_reservation "load_stall1"): New.
+ (insn_reservation "load_stall3"): New.
+ (stall): New insn.
+ * config/bfin/predicates.md (const1_operand, const3_operand): New.
+ (mem_p_address_operand): Exclude stack and frame pointer based
+ addresses.
+ (mem_spfp_address_operand): New; match them here.
+ * config/bfin/bfin.c (add_sched_insns_for_speculation): New function.
+ (bfin_reorg): Call it if scheduling insns.
+ (bfin_gen_bundles): Remove dummy insns created by
+ add_sched_insns_for_speculation.
+
+ From Jie Zhang <jie.zhang@analog.com>:
+ * config/bfin/bfin-protos.h (enum bfin_cpu_type, bfin_cpu_type,
+ bfin_si_revision, bfin_workarounds): Move these ...
+ * config/bfin/bfin.h: ... here.
+
+ From Mike Frysinger <michael.frysinger@analog.com>
+ * config/bfin/bfin-protos.h (bfin_cpu_type): Add BFIN_CPU_BF542M,
+ BFIN_CPU_BF544M, BFIN_CPU_BF547M, BFIN_CPU_BF548M, and BFIN_CPU_BF549M.
+ * config/bfin/bfin.c (bfin_cpus[]): Add 0.3 for bf542m, bf544m,
+ bf547m, bf548m, and bf549m.
+ * config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Define __ADSPBF542M__
+ for BFIN_CPU_BF542M, __ADSPBF544M__ for BFIN_CPU_BF544M,
+ __ADSPBF547M__ for BFIN_CPU_BF547M, __ADSPBF548M__ for
+ BFIN_CPU_BF548M, and __ADSPBF549M__ for BFIN_CPU_BF549M.
+ * config/bfin/t-bfin-elf (MULTILIB_MATCHES): Select bf532-none for
+ bf542m-none, bf544m-none, bf547m-none, bf548m-none, and bf549m-none.
+ * config/bfin/t-bfin-linux (MULTILIB_MATCHES): Likewise.
+ * config/bfin/t-bfin-uclinux (MULTILIB_MATCHES): Likewise.
+ * doc/invoke.texi (Blackfin Options): Document that -mcpu now accepts
+ bf542m, bf544m, bf547m, bf548m, and bf549m.
+
+ From Jie Zhang <jie.zhang@analog.com>:
+ * config/bfin/predicates.md (p_register_operand): New predicate.
+ (dp_register_operand): New predicate.
+ * config/bfin/bfin-protos.h (WA_05000074): Define.
+ (ENABLE_WA_05000074): Define.
+ * config/bfin/bfin.c (bfin_cpus[]): Add WA_05000074 for all cpus.
+ (bfin_gen_bundles): Put dsp32shiftimm instruction in slot[0].
+ * config/bfin/bfin.md (define_attr type): Add dsp32shiftimm.
+ (define_attr addrtype): Allow load/store register to be P register.
+ (define_attr storereg): New.
+ (define_cpu_unit anomaly_05000074): New.
+ (define_insn_reservation dsp32shiftimm): New.
+ (define_insn_reservation dsp32shiftimm_anomaly_05000074): New.
+ (define_insn_reservation loadp): Cannot use slot2.
+ (define_insn_reservation loadsp): Cannot use slot2.
+ (define_insn_reservation storep): Cannot use slot2. Does not
+ apply when working around 05000074.
+ (define_insn_reservation storep_anomaly_05000074): New.
+ (define_insn_reservation storei): Does not apply when working
+ around 05000074.
+ (define_insn_reservation storei_anomaly_05000074): New.
+ (define_attr length): Add dsp32shiftimm case.
+ (define_insn movsi_insn32, movsi_insv, ashlsi3_insn, ashrsi3,
+ ror_one, rol_one, lshrsi3, lshrpdi3, ashrpdi3, movhiv2hi_low,
+ movhiv2hi_high, composev2hi, packv2hi, movv2hi_hi,
+ ssashiftv2hi3, ssashifthi3, ssashiftsi3, lshiftv2hi3, lshifthi3):
+ Set type as dsp32shiftimm for dsp32shiftimm alternatives.
+
+2009-09-07 Martin Jambor <mjambor@suse.cz>
+
+ PR middle-end/41282
+ * tree-sra.c (create_artificial_child_access): Return NULL if
+ build_ref_for_offset fails.
+ (propagate_subacesses_accross_link): Allow build_ref_for_offset
+ and create_artificial_child_access to fail.
+
+2009-09-06 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
+
+ PR c++/41214
+ * unwind-dw2.c (uw_init_context_1): Mark noinline.
+ * config/ia64/unwind-ia64.c (uw_init_context_1): Likewise.
+ * config/xtensa/unwind-dw2-xtensa.c (uw_init_context_1): Likewise.
+
+2009-09-07 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * config/bfin/bfin.c (bfin_optimize_loop): When creating a new basic
+ block, ensure it has an exit edge. Emit a barrier after a jump.
+
+2009-09-07 Nick Clifton <nickc@redhat.com>
+
+ * gcc.c (this_is_linker_script): New variable. Like
+ this_is_library_file but for the %T constructor.
+ (end_going_arg): If this_is_linker_script is set then locate the
+ script and insert a --script switch before it
+ (do_spec_2): Initialise this_is_linker_script.
+ (do_spec_1): Likewise. Handle %T construct.
+ (eval_spec_function): Preserve this_is_linker_script.
+ * doc/invoke.texi: Document %T construct in spec files.
+ * config/m32c/m32c.h (LIB_SPEC): Use it.
+
+2009-09-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * rtl.h (PREFETCH_SCHEDULE_BARRIER_P): New macro.
+ * sched-deps.c (sched_analyze_2): Make prefetches a hard barrier
+ when volatile flag is set.
+ * doc/rtl.texi (PREFETCH_SCHEDULE_BARRIER_P): Add documentation pieces.
+
+2009-09-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR bootstrap/41241
+ * combine-stack-adj.c (try_apply_stack_adjustment): Handle stores.
+ (combine_stack_adjustments_for_block): Allow insns between stack
+ adjustments and stores with corresponding pre-(dec|inc)rement or
+ pre-modify operation.
+
+2009-09-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/41241
+ * combine-stack-adj.c (struct csa_memlist): Rename to...
+ (struct csa_reflist): ... this. Rename mem field to ref.
+ (free_csa_memlist): Rename to...
+ (free_csa_reflist): ... this.
+ (record_one_stack_memref): Rename to...
+ (record_one_stack_ref): ... this. Handle also REG_P.
+ (try_apply_stack_adjustment): Handle also REG_P.
+ (struct record_stack_memrefs_data): Rename to...
+ (struct record_stack_refs_data): ... this. Rename memlist field to
+ reflist.
+ (record_stack_memrefs): Rename to...
+ (record_stack_refs): ... this. For DEBUG_INSNs keep traversing
+ subexpressions instead of failing when a MEM contains SP references.
+ For SP itself in DEBUG_INSNs queue it also onto reflist chain.
+ (combine_stack_adjustments_for_block): Adjust for mem to ref renaming.
+
+2009-09-06 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41144
+ * tree.c (build_array_type): Do not record types marked
+ with structural equality in the canonical type hashtable.
+
+2009-09-06 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41261
+ * tree-ssa-alias.c (refs_may_alias_p_1): Bail out for function decls.
+
+2009-09-05 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41181
+ * tree-ssa-ccp.c (maybe_fold_stmt_addition): Use the correct type.
+
+2009-09-05 Richard Guenther <rguenther@suse.de>
+
+ PR debug/41273
+ * tree-ssa-operands.c (get_tmr_operands): Pass through opf_no_vops.
+
+2009-09-05 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41271
+ * tree-ssa.c (useless_type_conversion_p): Drop qualifiers
+ before comparing function argument types.
+
+2009-09-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR target/41024
+ * config/i386/mingw-w64.h (ASM_SPEC): Pass -v instead of -V to
+ the assembler.
+
+2009-09-04 Uros Bizjak <ubizjak@gmail.com>
+
+ Revert:
+ 2009-08-18 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Allocate insn
+ locators before emit_insn is called.
+
+2009-09-04 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR bootstrap/41241
+ * ira.c (update_equiv_reg): Revert my previous patch for the PR.
+ * reginfo.c (resize_reg_info): Call allocate_reg_info if necessary.
+ (reginfo_init): Don't call allocate_reg_info.
+
+2009-09-04 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/41262
+ * config/alpha/alpha.c (alpha_does_function_need_gp): Use
+ NONDEBUG_INSN_P instead of INSN_P.
+
+2009-09-04 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/41225
+ * tree-vect-stmts.c (vect_stmt_relevant_p): Skip debug uses.
+
+2009-09-04 Alexandre Oliva <aoliva@redhat.com>
+
+ PR target/41252
+ * config/arm/vfp.md (*cmpdf_split_vfp): Fix src mode in the second
+ pattern of the split.
+
+2009-09-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * toplev.c (process_options): Move setter of flag_var_tracking
+ before other tests that depend on it. Move down setter of
+ flag_rename_registers. Don't enable var-tracking-assignments
+ by default if selective scheduling is enabled. Warn if both
+ are enabled.
+
+2009-09-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * var-tracking.c (dv_is_decl_p): Adjust NULL behavior to match
+ comment. Use switch statement to catch overlaps between rtx
+ and tree codes. Accept FUNCTION_DECLs in addition to those in...
+ (IS_DECL_CODE): ... here. Remove.
+ (check_value_is_not_decl): Remove.
+ (dv_from_decl, dv_from_value): Check after conversion.
+
+2009-09-04 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41257
+ * (cgraph_finalize_compilation_unit): Move finalizing aliases
+ after emitting tunks. Move emitting thunks and ctors from ...
+ (cgraph_optimize): ... here. Remove redundant
+ cgraph_analyze_functions.
+ * varasm.c (find_decl_and_mark_needed): Remove no longer
+ necessary check.
+ (finish_aliases_1): Adjust check for thunk aliases.
+
+2009-09-04 Daniel Gutson <dgutson@codesourcery.com>
+
+ * config/arm/arm.md (ctzsi2): Added braces
+ to avoid warning that broke booststrap.
+
+2009-09-04 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/41112
+ * tree-sra.c (build_ref_for_offset_1): Signal that we cannot
+ handle variable-bounded arrays.
+ (expr_with_var_bounded_array_refs_p): New function.
+ (analyze_access_subtree): Call expr_with_var_bounded_array_refs_p.
+
+2009-09-04 Wolfgang Gellerich <gellerich@de.ibm.com>
+
+ * config/s390/2097.md: Removed two incorrect bypasses.
+ (z10_fsimpdf): Fixed latency.
+ (z10_fhex): New insn_reservation.
+ (z10_floaddf): Fixed latency.
+ (z10_floadsf): Fixed latency.
+ (z10_ftrunctf): Fixed latency.
+ (z10_ftruncdf): Fixed latency.
+ * config/s390/s390.c (z10_cost): Fixed values.
+ (s390_adjust_priority): Added z10 path.
+ * config/s390/s390.md (type): Added fhex.
+ (*mov<mode>_64dfp): Updated type attribute.
+ (*mov<mode>_64): Updated type attribute.
+ (*mov<mode>_31): Updated type attribute.
+ (*mov<mode>"): Likewise.
+ * config/s390/2084.md (x_fsimpdf): Updated condition.
+
+2009-09-04 Andreas Krebbel <krebbel1@de.ibm.com>
+
+ * config/s390/s390.md ("*fmadd<mode>", "*fmsub<mode>"): Enable mem
+ RTXs in the predicate for operand 1.
+
+2009-09-03 Daniel Gutson <dgutson@codesourcery.com>
+
+ * config/arm/arm.md (UNSPEC_RBIT): New constant.
+ (rbitsi2): New insn.
+ (ctzsi2): New expand.
+ * config/arm/arm.h (CTZ_DEFINED_VALUE_AT_ZERO): New macro.
+
+2009-09-03 Martin Jambor <mjambor@suse.cz>
+
+ * tree-sra.c (duplicate_expr_for_different_base): Removed.
+ (create_artificial_child_access): Use build_ref_for_offset instead
+ of duplicate_expr_for_different_base.
+ (propagate_subacesses_accross_link): Likewise.
+
+2009-09-03 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * config/mips/mips.c (USEFUL_INSN_P): Use NONDEBUG_INSN_P instead
+ of INSN_P.
+ (mips16e_collect_argument_saves): Skip debug instructions.
+ (mips_74k_agen_init): Use CALL_P || JUMP_P instead of !NONJUMP_INSN_P.
+ (mips16_lay_out_constants): Use USEFUL_INSN_P instead of INSN_P.
+ (r10k_insert_cache_barriers): Likewise.
+ (mips_reorg_process_insns): Likewise.
+
+2009-09-03 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR bootstrap/41241
+ * ira.c (update_equiv_reg): Remove check on class likely spill.
+
+2009-09-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/41236
+ * dwarf2out.c (loc_descriptor): Don't use SUBREG_REG macro on
+ SIGN_EXTEND or ZERO_EXTEND. Don't assume there is a REG inside of
+ it or SUBREG.
+
+ PR debug/41238
+ * function.c (assign_parm_find_stack_rtl): Don't set mem attributes on
+ the stack slot if it is passed by invisible reference.
+ * var-tracking.c (vt_add_function_parameters): Handle arguments passed
+ by invisible reference.
+
+2009-09-03 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * config/bfin/linux.h (TARGET_SUPPORTS_SYNC_CALLS): Define to 1.
+ * config/bfin/uclinux.h (TARGET_SUPPORTS_SYNC_CALLS): Define to 1.
+ * config/bfin/bfin.h (TARGET_SUPPORTS_SYNC_CALLS): Provide default of
+ 0.
+ * config/bfin/sync.md: New file.
+ * config/bfin/bfin.md: Include it.
+ (UNSPEC_ATOMIC): New.
+ (UNSPEC_ONES): Provide a unique number.
+
+ From Jie Zhang <jie.zhang@analog.com>:
+ * config/bfin/bfin.c (ret_regs): New.
+ (must_save_fp_p): Don't return true because of frame_pointer_needed.
+ (must_save_rets_p): New.
+ (n_regs_saved_by_prologue): Use must_save_rets_p instead of
+ current_function_is_leaf.
+ (do_link): Likewise.
+ (do_unlink): Likewise.
+ (expand_interrupt_handler_prologue): Use ret_regs array.
+ (expand_interrupt_handler_epilogue): Use ret_regs array and
+ pass return register to gen_return_internal.
+ (bfin_expand_epilogue): Pass return register to
+ gen_return_internal.
+ (bfin_expand_call): Explicitly clobber RETS.
+ * config/bfin/bfin.h (FUNCTION_RETURN_REGISTERS): Define.
+ * config/bfin/bfin.md (call_symbol_fdpic, call_value_symbol_fdpic,
+ call_insn_fdpic, call_value_insn_fdpic, call_symbol,
+ call_value_symbol, call_insn, call_value_insn): Explicitly clobber
+ RETS.
+ (return_internal): Take a reg rtx rather than the register number.
+
+2009-09-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * tree-parloops.c (parallelize_loops): Cast to HOST_WIDE_INT
+ when comparing against estimated_loop_iterations_int return.
+
+2009-09-03 Richard Guenther <rguenther@suse.de>
+
+ * dwarf2out.c (dwarf2out_do_cfi_asm): Remove check of
+ eh_personality_libfunc.
+
2009-09-03 Razya Ladelsky <razya@il.ibm.com>
* tree-parloops.c (separate_decls_in_region): Add space.
-
+
2009-09-03 Razya Ladelsky <razya@il.ibm.com>
- * tree-parloops.c (separate_decls_in_region): Change the condition
+ * tree-parloops.c (separate_decls_in_region): Change the condition
checking if there are reductions in the loop.
2009-09-03 Razya Ladelsky <razya@il.ibm.com>
PR tree-optimization/38275
-
- * tree-parloops.c (parallelize_loops): Replace profitability condition
+ * tree-parloops.c (parallelize_loops): Replace profitability condition
for expected number of iterations.
-2009-09-03 Alon Dayan <alond@il.ibm.com>
-
- PR tree-optimization/38275
-
- * testsuite/gcc.dg/autopar/reduc-1char.c: Increase number
- of iterations. Adjust the logic accordingly.
- * testsuite/gcc.dg/autopar/reduc-2char.c: Ditto.
- * testsuite/gcc.dg/autopar/reduc-1.c: Ditto.
- * testsuite/gcc.dg/autopar/reduc-2.c: Ditto.
- * testsuite/gcc.dg/autopar/reduc-3.c: Ditto.
- * testsuite/gcc.dg/autopar/reduc-6.c: Ditto.
- * testsuite/gcc.dg/autopar/reduc-7.c: Ditto.
- * testsuite/gcc.dg/autopar/reduc-8.c: Ditto.
- * testsuite/gcc.dg/autopar/reduc-9.c: Ditto.
- * testsuite/gcc.dg/autopar/pr39500-1.c: Ditto.
- * testsuite/gcc.dg/autopar/reduc-1short.c: Ditto.
- * testsuite/gcc.dg/autopar/reduc-2short.c: Ditto.
- * testsuite/gcc.dg/autopar/parallelization-1.c: Ditto.
-
-
2009-09-03 Alexandre Oliva <aoliva@redhat.com>
* doc/invoke.texi (BUILD_CONFIG): Document --with-build-config.
@@ -161,8 +724,7 @@
expand_expr_real_2): Declare.
* expr.c (emit_storent_insn, expand_expr_real_1,
expand_expr_real_2): Export.
- (store_expr): Setting and evaluating dont_return_target is
- useless.
+ (store_expr): Setting and evaluating dont_return_target is useless.
(expand_expr_real_1, <case GOTO_EXPR, RETURN_EXPR, SWITCH_EXPR,
LABEL_EXPR and ASM_EXPR>): Move to gcc_unreachable.
* except.c (expand_resx_expr): Rename to ...
@@ -198,11 +760,11 @@
* doc/invoke.texi (-fsched-pressure): Document it.
(-fsched-reg-pressure-heuristic): Remove it.
-
+
* reload.c (ira.h): Include.
(find_reloads): Add choosing reload on number of small spilled
classes.
-
+
* haifa-sched.c (ira.h): Include.
(sched_pressure_p, sched_regno_cover_class, curr_reg_pressure,
saved_reg_pressure, curr_reg_live, saved_reg_live,
@@ -219,8 +781,7 @@
(update_register_pressure, setup_insn_max_reg_pressure,
update_reg_and_insn_max_reg_pressure,
sched_setup_bb_reg_pressure_info): New functions.
- (schedule_insn): Add code for printing and updating reg pressure
- info.
+ (schedule_insn): Add code for printing and updating reg pressure info.
(find_set_reg_weight, find_insn_reg_weight): Remove.
(ok_for_early_queue_removal): Do nothing if pressure_only_p.
(debug_ready_list): Print reg pressure info.
@@ -231,7 +792,7 @@
(fix_tick_ready): Make insn always ready if pressure_p.
(init_h_i_d): Don't call find_insn_reg_weight.
(haifa_finish_h_i_d): Free insn reg pressure info.
-
+
* ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs,
ira_memory_move_cost, ira_class_hard_regs,
ira_class_hard_regs_num, ira_no_alloc_regs,
@@ -267,7 +828,7 @@
implicit sets when clearing reg_last_in_use.
(init_deps_global): Clear implicit_reg_pending_clobbers and
implicit_reg_pending_uses.
-
+
* ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs,
ira_memory_move_cost, ira_class_hard_regs,
ira_class_hard_regs_num, ira_no_alloc_regs,
@@ -275,7 +836,7 @@
ira_reg_class_cover, ira_class_translate): Move from ira-int.h.
(ira_setup_eliminable_regset, ira_set_pseudo_classes,
ira_implicitly_set_insn_hard_regs): New prototypes.
-
+
* ira-costs.c (pseudo_classes_defined_p, allocno_p,
cost_elements_num): New variables.
(allocno_costs, total_costs): Rename to costs and
@@ -286,8 +847,7 @@
(common_classes): Rename to regno_cover_class.
(COST_INDEX): New.
(record_reg_classes): Set allocno attributes only if allocno_p.
- (record_address_regs): Ditto. Use COST_INDEX instead of
- ALLOCNO_NUM.
+ (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM.
(scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM
and COSTS_OF_ALLOCNO.
(print_costs): Rename to print_allocno_costs.
@@ -311,10 +871,9 @@
(resize_reg_info): Change return type.
(reg_cover_class): New.
(setup_reg_classes): Add new parameter.
-
+
* sched-int.h (struct deps_reg): New member implicit_sets.
- (sched_pressure_p, sched_regno_cover_class): New external
- definitions.
+ (sched_pressure_p, sched_regno_cover_class): New external definitions.
(INCREASE_BITS): New macro.
(struct reg_pressure_data, struct reg_use_data): New.
(struct _haifa_insn_data): Remove reg_weight. Add members
@@ -326,12 +885,11 @@
(struct reg_pressure_data, struct reg_use_data): New.
(INSN_REG_WEIGHT): Remove.
(INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST,
- INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New
- macros.
+ INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros.
(sched_init_region_reg_pressure_info,
sched_setup_bb_reg_pressure_info): New prototypes.
-
- * reginfo.c (struct reg_pref): New member coverclass.
+
+ * reginfo.c (struct reg_pref): New member coverclass.
(reg_cover_class): New function.
(reginfo_init, pass_reginfo_init): Move after free_reg_info.
(reg_info_size): New variable.
@@ -339,16 +897,16 @@
(resize_reg_info): Use reg_info_size. Return flag of resizing.
(setup_reg_classes): Add a new parameter. Setup cover class too.
- * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the
- dependencies.
+ * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to
+ the dependencies.
* sched-rgn.c (deps_join): Set up implicit_sets.
(schedule_region): Set up region and basic blocks pressure
relative info.
-
+
* passes.c (init_optimization_passes): Move
pass_subregs_of_mode_init before pass_sched.
-
+
2009-09-02 Martin Jambor <mjambor@suse.cz>
* tree-sra.c (struct access): New field grp_hint.
@@ -382,7 +940,7 @@
Revert:
2009-07-31 Christian Bruel <christian.bruel@st.com>
* gcc/config.gcc (sh*-*-elf): test with_libgloss.
-
+
2009-09-01 Alexandre Oliva <aoliva@redhat.com>
* doc/invoke.texi (-fvar-tracking-assignments): New.
@@ -395,8 +953,7 @@
* regrename.c (regrename_optimize): Drop last. Don't count debug
insns as uses. Don't reject change because of debug insn.
(do_replace): Reject DEBUG_INSN as chain starter. Take base_regno
- from the chain starter, and check for inexact matches in
- DEBUG_INSNS.
+ from the chain starter, and check for inexact matches in DEBUG_INSNS.
(scan_rtx_reg): Accept inexact matches in DEBUG_INSNs.
(build_def_use): Simplify and fix the marking of DEBUG_INSNs.
* sched-ebb.c (schedule_ebbs): Skip boundary debug insns.
@@ -435,7 +992,7 @@
* rtlanal.c (reg_used_between_p): Skip debug insns.
(side_effects_p): Likewise.
(canonicalize_condition): Likewise.
- * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug
+ * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug
insns never depend on debug insns.
(create_ddg_dep_no_link): Likewise.
(add_cross_iteration_register_deps): Use ANTI_DEP for debug insns.
@@ -474,7 +1031,7 @@
(contributes_to_priority): Skip debug insns.
(dep_list_size): New.
(priority): Use it.
- (rank_for_schedule): Likewise. Schedule debug insns as soon as
+ (rank_for_schedule): Likewise. Schedule debug insns as soon as
they're ready. Disregard previous debug insns to make decisions.
(queue_insn): Never queue debug insns.
(ready_add, ready_remove_first, ready_remove): Count debug insns.
@@ -543,8 +1100,7 @@
(fur_orig_expr_not_found): Skip debug insns.
* rtl.def (VALUE): Move up.
(DEBUG_INSN): New.
- * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug
- stmts.
+ * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug stmts.
(nearest_common_dominator_of_uses): Take debug_stmts argument.
Set it if debug stmts are found.
(statement_sink_location): Skip debug stmts. Propagate
@@ -580,7 +1136,7 @@
val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair.
(output_die): Likewise. Use HOST_BITS_PER_WIDE_INT size of each
component instead of HOST_BITS_PER_LONG.
- (output_loc_operands): Likewise. For const8* assert
+ (output_loc_operands): Likewise. For const8* assert
HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64.
(output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT
rather than HOST_BITS_PER_LONG is >= 64.
@@ -614,8 +1170,7 @@
in its expression.
* cfgbuild.c (inside_basic_block_p): Handle debug insns.
(control_flow_insn_p): Likewise.
- * tree-parloops.c (eliminate_local_variables_stmt): Handle debug
- stmt.
+ * tree-parloops.c (eliminate_local_variables_stmt): Handle debug stmt.
(separate_decls_in_region_debug_bind): New.
(separate_decls_in_region): Process debug bind stmts afterwards.
* recog.c (verify_changes): Handle debug insns.
@@ -648,8 +1203,7 @@
* function.c (instantiate_virtual_regs): Handle debug insns.
* function.h (struct emit_status): Add x_cur_debug_insn_uid.
* print-rtl.h: Include cselib.h.
- (print_rtx): Print VALUEs. Split out and recurse for
- VAR_LOCATIONs.
+ (print_rtx): Print VALUEs. Split out and recurse for VAR_LOCATIONs.
* df.h (df_inns_rescan_debug_internal): Declare.
* gcse.c (alloc_hash_table): Estimate n_insns.
(cprop_insn): Don't regard debug insns as changes.
@@ -750,8 +1304,7 @@
(cselib_subst_to_values): Adjust.
(cselib_log_lookup): New.
(cselib_lookup): Call it.
- (cselib_invalidate_regno): Don't count preserved values as
- useless.
+ (cselib_invalidate_regno): Don't count preserved values as useless.
(cselib_invalidate_mem): Likewise.
(cselib_record_set): Likewise.
(struct set): Renamed to cselib_set, moved to cselib.h.
@@ -870,8 +1423,7 @@
(copy_body): Copy debug stmts at the end.
(insert_init_debug_bind): New.
(insert_init_stmt): Take id. Skip and emit debug stmts.
- (setup_one_parameter): Remap variable earlier, register debug
- mapping.
+ (setup_one_parameter): Remap variable earlier, register debug mapping.
(estimate_num_insns): Skip debug stmts.
(expand_call_inline): Preserve debug_map.
(optimize_inline_calls): Check for no debug_stmts left-overs.
@@ -980,8 +1532,7 @@
(dataflow_set_clear_at_call): New.
(onepart_variable_different_p): New.
(variable_different_p): Use it.
- (dataflow_set_different_1): Adjust. Make detailed dump
- more verbose.
+ (dataflow_set_different_1): Adjust. Make detailed dump more verbose.
(track_expr_p): Add need_rtl parameter. Don't generate rtl
if not needed.
(track_loc_p): Pass it true.
@@ -1029,8 +1580,8 @@
(emit_notes_for_differences_1): Adjust. Handle values.
(emit_notes_for_differences_2): Likewise.
(emit_notes_for_differences): Adjust.
- (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN
- notes. Adjust. Handle new micro-ops.
+ (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN notes.
+ Adjust. Handle new micro-ops.
(vt_add_function_parameters): Adjust. Create and bind values.
(vt_initialize): Adjust. Initialize scratch_regs and
valvar_pool, flooded and perm.. Initialize and use cselib. Log
@@ -1069,7 +1620,7 @@
and var needs to be modified.
(dataflow_set_union): Set traversed_vars during canonicalization.
(VALUE_CHANGED, DECL_CHANGED): Define.
- (set_dv_changed, dv_changed_p): New static inlines.
+ (set_dv_changed, dv_changed_p): New static inlines.
(track_expr_p): Clear DECL_CHANGED.
(dump_dataflow_sets): Set it.
(variable_was_changed): Call set_dv_changed.
@@ -1080,8 +1631,7 @@
empty. Traverse changed_variables with check_changed_vars_1,
call check_changed_vars_2 on each changed_variables_stack entry.
(emit_notes_in_bb): Add SET argument. Just clear it at the
- beginning, use it instead of local &set, don't destroy it at the
- end.
+ beginning, use it instead of local &set, don't destroy it at the end.
(vt_emit_notes): Call dataflow_set_clear early on all
VTI(bb)->out sets, never use them, instead use emit_notes_in_bb
computed set, dataflow_set_clear also VTI(bb)->in when we are
@@ -1108,12 +1658,10 @@
(print-rtl.o): Depend on cselib.h.
(cselib.o): Depend on TREE_PASS_H.
(var-tracking.o): Depend on cselib.h and TARGET_H.
- * sched-rgn.c (rgn_estimate_number_of_insns): Discount
- debug insns.
+ * sched-rgn.c (rgn_estimate_number_of_insns): Discount debug insns.
(init_ready_list): Skip boundary debug insns.
(add_branch_dependences): Skip debug insns.
- (free_block_dependencies): Check for blocks with only debug
- insns.
+ (free_block_dependencies): Check for blocks with only debug insns.
(compute_priorities): Likewise.
* gimple.c (gss_for_code): Handle GIMPLE_DEBUG.
(gimple_build_with_ops_stat): Take subcode as unsigned. Adjust
@@ -1153,13 +1701,11 @@
(verify_stmt): Likewise.
(debug_loop_num): Skip debug stmts.
(remove_edge_and_dominated_blocks): Remove dominators last.
- * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into
- debug stmts.
+ * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into debug stmts.
(linearize_expr): Likewise.
* config/i386/i386.c (ix86_delegitimize_address): Call
default implementation.
- * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug
- insns.
+ * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug insns.
(group_barrier_needed): Skip debug insns.
(emit_insn_group_barriers): Likewise.
(emit_all_insn_group_barriers): Likewise.
@@ -1187,8 +1733,7 @@
* dce.c (deletable_insn_p): Handle VAR_LOCATION.
(mark_reg_dependencies): Skip debug insns.
* params.def (PARAM_MIN_NONDEBUG_INSN_UID): New.
- * tree-ssanames.c (release_ssa_name): Propagate def into
- debug stmts.
+ * tree-ssanames.c (release_ssa_name): Propagate def into debug stmts.
* tree-ssa-threadedge.c
(record_temporary_equivalences_from_stmts): Skip debug stmts.
* regcprop.c (replace_oldest_value_addr): Skip debug insns.
@@ -1206,7 +1751,7 @@
2009-09-01 Richard Henderson <rth@redhat.com>
- * tree-ssa-ccp.c (ccp_initialize): Make sure to simulate
+ * tree-ssa-ccp.c (ccp_initialize): Make sure to simulate
stmt_ends_pp_p statements at least once.
* tree-vrp.c (vrp_initialize): Likewise.
(vrp_visit_stmt): Be prepared for non-interesting stmts.
@@ -1313,7 +1858,6 @@
(mep_return_in_memory): Zero-sized objects are passed in memory.
(mep_reorg_noframe): Make sure we have accurate REG_DEAD notes.
-
2009-08-31 Richard Guenther <rguenther@suse.de>
* builtins.c (fold_builtin_memory_op): Use the alias oracle
diff --git a/gcc/ChangeLog.lto b/gcc/ChangeLog.lto
index e20cda18169..adbbf863daa 100644
--- a/gcc/ChangeLog.lto
+++ b/gcc/ChangeLog.lto
@@ -1,3 +1,26 @@
+2009-09-11 Diego Novillo <dnovillo@google.com>
+
+ Mainline merge @151592.
+
+ * configure.ac (ACX_PKGVERSION): Update revision merge string.
+ * configure: Regenerate.
+
+2009-09-11 Diego Novillo <dnovillo@google.com>
+
+ * cgraph.c (cgraph_clone_input_node): Remove. Update all users to
+ call cgraph_clone_node instead.
+ (cgraph_is_clone_node): Remove unused function.
+ * ipa.c (cgraph_remove_unreachable_nodes): Do not set
+ disregard_inline_limits to false.
+ (gate_ipa_fun_and_var_visibility): Remove. Update
+ pass_ipa_function_and_variable_visibility.
+ * lto-cgraph.c (lto_output_node): Output field count.
+ Reorganize packing of node bitflags to follow the same
+ order that they're declared.
+ Add fields address_taken, abstract_and_needed, reachable,
+ process, alias and finalized_by_frontend.
+ (input_overwrite_node): Corresponding changes.
+
2009-09-08 Richard Guenther <rguenther@suse.de>
* tree.c (free_lang_data_in_type): Restore not freeing the main variant
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index ff037f0ee12..16c9f7624db 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20090903
+20090910
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index b1481f101c7..1a763dc9d7c 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1643,6 +1643,7 @@ aclocal_deps = \
$(srcdir)/../config/lib-prefix.m4 \
$(srcdir)/../config/override.m4 \
$(srcdir)/../config/progtest.m4 \
+ $(srcdir)/../config/stdint.m4 \
$(srcdir)/../config/unwind_ipinfo.m4 \
$(srcdir)/../config/warnings.m4 \
$(srcdir)/acinclude.m4
diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4
index b351de25465..81108ded7e4 100644
--- a/gcc/aclocal.m4
+++ b/gcc/aclocal.m4
@@ -114,6 +114,7 @@ m4_include([../config/lib-link.m4])
m4_include([../config/lib-prefix.m4])
m4_include([../config/override.m4])
m4_include([../config/progtest.m4])
+m4_include([../config/stdint.m4])
m4_include([../config/unwind_ipinfo.m4])
m4_include([../config/warnings.m4])
m4_include([acinclude.m4])
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 9b92ce5f4df..9ebc3d22edf 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,22 @@
+2009-09-08 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Tidy
+ flow of control.
+ Avoid useless work when processing the Treat_As_Volatile flag.
+
+2009-09-08 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/targtyps.c: Reorder include directives.
+
+2009-09-07 Laurent GUERBY <laurent@guerby.net>
+
+ * gcc-interface/targtyps.c: Add missing include for tm_p.h.
+ * gcc-interface/Make-lang.in: Update dependencies.
+
+2009-09-07 Laurent GUERBY <laurent@guerby.net>
+
+ * make.adb: Add missing documentation for multilib handling.
+
2009-09-03 Diego Novillo <dnovillo@google.com>
* gcc-interface/misc.c (lang_hooks): Remove const qualifier.
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index eec47d4c009..86707e0313b 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -1074,10 +1074,10 @@ ada/misc.o : ada/gcc-interface/misc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(COMPILER) -c $(ALL_COMPILERFLAGS) -I.. $(ALL_CPPFLAGS) $< -o $@
ada/targtyps.o : ada/gcc-interface/targtyps.c $(CONFIG_H) $(SYSTEM_H) \
- coretypes.h $(TM_H) $(TREE_H) ada/gcc-interface/ada.h ada/types.h \
- ada/atree.h ada/elists.h ada/namet.h ada/nlists.h ada/snames.h \
- ada/stringt.h ada/uintp.h ada/urealp.h ada/fe.h ada/sinfo.h ada/einfo.h \
- $(ADA_TREE_H) ada/gcc-interface/gigi.h
+ coretypes.h $(TM_H) $(TM_P_H) $(TREE_H) ada/gcc-interface/ada.h \
+ ada/types.h ada/atree.h ada/elists.h ada/namet.h ada/nlists.h \
+ ada/snames.h ada/stringt.h ada/uintp.h ada/urealp.h ada/fe.h ada/sinfo.h \
+ ada/einfo.h $(ADA_TREE_H) ada/gcc-interface/gigi.h
$(COMPILER) -c $(ALL_COMPILERFLAGS) -I.. $(ALL_CPPFLAGS) $< -o $@
ada/trans.o : ada/gcc-interface/trans.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 9d385302c6b..255821e49c8 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -2093,7 +2093,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
/* This is the actual data type for array variables. Multidimensional
arrays are implemented as arrays of arrays. Note that arrays which
- have sparse enumeration subtypes as index components create sparse
+ have sparse enumeration subtypes as index components create sparse
arrays, which is obviously space inefficient but so much easier to
code for now.
@@ -2105,7 +2105,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
gnu_type = gnat_to_gnu_type (Etype (gnat_entity));
if (!Is_Constrained (gnat_entity))
- break;
+ ;
else
{
Entity_Id gnat_index, gnat_base_index;
@@ -2538,105 +2538,104 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
/* Set our alias set to that of our base type. This gives all
array subtypes the same alias set. */
relate_alias_sets (gnu_type, gnu_base_type, ALIAS_SET_COPY);
- }
-
- /* If this is a packed type, make this type the same as the packed
- array type, but do some adjusting in the type first. */
- if (Present (Packed_Array_Type (gnat_entity)))
- {
- Entity_Id gnat_index;
- tree gnu_inner_type;
- /* First finish the type we had been making so that we output
- debugging information for it. */
- gnu_type
- = build_qualified_type (gnu_type,
- (TYPE_QUALS (gnu_type)
- | (TYPE_QUAL_VOLATILE
- * Treat_As_Volatile (gnat_entity))));
-
- /* Make it artificial only if the base type was artificial as well.
- That's sort of "morally" true and will make it possible for the
- debugger to look it up by name in DWARF, which is necessary in
- order to decode the packed array type. */
- gnu_decl
- = create_type_decl (gnu_entity_name, gnu_type, attr_list,
- !Comes_From_Source (gnat_entity)
- && !Comes_From_Source (Etype (gnat_entity)),
- debug_info_p, gnat_entity);
-
- /* Save it as our equivalent in case the call below elaborates
- this type again. */
- save_gnu_tree (gnat_entity, gnu_decl, false);
-
- gnu_decl = gnat_to_gnu_entity (Packed_Array_Type (gnat_entity),
- NULL_TREE, 0);
- this_made_decl = true;
- gnu_type = TREE_TYPE (gnu_decl);
- save_gnu_tree (gnat_entity, NULL_TREE, false);
-
- gnu_inner_type = gnu_type;
- while (TREE_CODE (gnu_inner_type) == RECORD_TYPE
- && (TYPE_JUSTIFIED_MODULAR_P (gnu_inner_type)
- || TYPE_IS_PADDING_P (gnu_inner_type)))
- gnu_inner_type = TREE_TYPE (TYPE_FIELDS (gnu_inner_type));
-
- /* We need to attach the index type to the type we just made so
- that the actual bounds can later be put into a template. */
- if ((TREE_CODE (gnu_inner_type) == ARRAY_TYPE
- && !TYPE_ACTUAL_BOUNDS (gnu_inner_type))
- || (TREE_CODE (gnu_inner_type) == INTEGER_TYPE
- && !TYPE_HAS_ACTUAL_BOUNDS_P (gnu_inner_type)))
+ /* If this is a packed type, make this type the same as the packed
+ array type, but do some adjusting in the type first. */
+ if (Present (Packed_Array_Type (gnat_entity)))
{
- if (TREE_CODE (gnu_inner_type) == INTEGER_TYPE)
+ Entity_Id gnat_index;
+ tree gnu_inner;
+
+ /* First finish the type we had been making so that we output
+ debugging information for it. */
+ if (Treat_As_Volatile (gnat_entity))
+ gnu_type
+ = build_qualified_type (gnu_type,
+ TYPE_QUALS (gnu_type)
+ | TYPE_QUAL_VOLATILE);
+
+ /* Make it artificial only if the base type was artificial too.
+ That's sort of "morally" true and will make it possible for
+ the debugger to look it up by name in DWARF, which is needed
+ in order to decode the packed array type. */
+ gnu_decl
+ = create_type_decl (gnu_entity_name, gnu_type, attr_list,
+ !Comes_From_Source (Etype (gnat_entity))
+ && !Comes_From_Source (gnat_entity),
+ debug_info_p, gnat_entity);
+
+ /* Save it as our equivalent in case the call below elaborates
+ this type again. */
+ save_gnu_tree (gnat_entity, gnu_decl, false);
+
+ gnu_decl = gnat_to_gnu_entity (Packed_Array_Type (gnat_entity),
+ NULL_TREE, 0);
+ this_made_decl = true;
+ gnu_type = TREE_TYPE (gnu_decl);
+ save_gnu_tree (gnat_entity, NULL_TREE, false);
+
+ gnu_inner = gnu_type;
+ while (TREE_CODE (gnu_inner) == RECORD_TYPE
+ && (TYPE_JUSTIFIED_MODULAR_P (gnu_inner)
+ || TYPE_IS_PADDING_P (gnu_inner)))
+ gnu_inner = TREE_TYPE (TYPE_FIELDS (gnu_inner));
+
+ /* We need to attach the index type to the type we just made so
+ that the actual bounds can later be put into a template. */
+ if ((TREE_CODE (gnu_inner) == ARRAY_TYPE
+ && !TYPE_ACTUAL_BOUNDS (gnu_inner))
+ || (TREE_CODE (gnu_inner) == INTEGER_TYPE
+ && !TYPE_HAS_ACTUAL_BOUNDS_P (gnu_inner)))
{
- /* The TYPE_ACTUAL_BOUNDS field is overloaded with the
- TYPE_MODULUS for modular types so we make an extra
- subtype if necessary. */
- if (TYPE_MODULAR_P (gnu_inner_type))
+ if (TREE_CODE (gnu_inner) == INTEGER_TYPE)
{
- tree gnu_subtype
- = make_unsigned_type (TYPE_PRECISION (gnu_inner_type));
- TREE_TYPE (gnu_subtype) = gnu_inner_type;
- TYPE_EXTRA_SUBTYPE_P (gnu_subtype) = 1;
- SET_TYPE_RM_MIN_VALUE (gnu_subtype,
- TYPE_MIN_VALUE (gnu_inner_type));
- SET_TYPE_RM_MAX_VALUE (gnu_subtype,
- TYPE_MAX_VALUE (gnu_inner_type));
- gnu_inner_type = gnu_subtype;
- }
-
- TYPE_HAS_ACTUAL_BOUNDS_P (gnu_inner_type) = 1;
+ /* The TYPE_ACTUAL_BOUNDS field is overloaded with the
+ TYPE_MODULUS for modular types so we make an extra
+ subtype if necessary. */
+ if (TYPE_MODULAR_P (gnu_inner))
+ {
+ tree gnu_subtype
+ = make_unsigned_type (TYPE_PRECISION (gnu_inner));
+ TREE_TYPE (gnu_subtype) = gnu_inner;
+ TYPE_EXTRA_SUBTYPE_P (gnu_subtype) = 1;
+ SET_TYPE_RM_MIN_VALUE (gnu_subtype,
+ TYPE_MIN_VALUE (gnu_inner));
+ SET_TYPE_RM_MAX_VALUE (gnu_subtype,
+ TYPE_MAX_VALUE (gnu_inner));
+ gnu_inner = gnu_subtype;
+ }
+
+ TYPE_HAS_ACTUAL_BOUNDS_P (gnu_inner) = 1;
#ifdef ENABLE_CHECKING
- /* Check for other cases of overloading. */
- gcc_assert (!TYPE_ACTUAL_BOUNDS (gnu_inner_type));
+ /* Check for other cases of overloading. */
+ gcc_assert (!TYPE_ACTUAL_BOUNDS (gnu_inner));
#endif
- }
+ }
- for (gnat_index = First_Index (gnat_entity);
- Present (gnat_index); gnat_index = Next_Index (gnat_index))
- SET_TYPE_ACTUAL_BOUNDS
- (gnu_inner_type,
- tree_cons (NULL_TREE,
- get_unpadded_type (Etype (gnat_index)),
- TYPE_ACTUAL_BOUNDS (gnu_inner_type)));
-
- if (Convention (gnat_entity) != Convention_Fortran)
- SET_TYPE_ACTUAL_BOUNDS
- (gnu_inner_type,
- nreverse (TYPE_ACTUAL_BOUNDS (gnu_inner_type)));
-
- if (TREE_CODE (gnu_type) == RECORD_TYPE
- && TYPE_JUSTIFIED_MODULAR_P (gnu_type))
- TREE_TYPE (TYPE_FIELDS (gnu_type)) = gnu_inner_type;
+ for (gnat_index = First_Index (gnat_entity);
+ Present (gnat_index);
+ gnat_index = Next_Index (gnat_index))
+ SET_TYPE_ACTUAL_BOUNDS
+ (gnu_inner,
+ tree_cons (NULL_TREE,
+ get_unpadded_type (Etype (gnat_index)),
+ TYPE_ACTUAL_BOUNDS (gnu_inner)));
+
+ if (Convention (gnat_entity) != Convention_Fortran)
+ SET_TYPE_ACTUAL_BOUNDS
+ (gnu_inner, nreverse (TYPE_ACTUAL_BOUNDS (gnu_inner)));
+
+ if (TREE_CODE (gnu_type) == RECORD_TYPE
+ && TYPE_JUSTIFIED_MODULAR_P (gnu_type))
+ TREE_TYPE (TYPE_FIELDS (gnu_type)) = gnu_inner;
+ }
}
- }
-
- /* Abort if packed array with no packed array type field set. */
- else
- gcc_assert (!Is_Packed (gnat_entity));
+ else
+ /* Abort if packed array with no Packed_Array_Type field set. */
+ gcc_assert (!Is_Packed (gnat_entity));
+ }
break;
case E_String_Literal_Subtype:
@@ -4634,10 +4633,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
}
}
- gnu_type = build_qualified_type (gnu_type,
- (TYPE_QUALS (gnu_type)
- | (TYPE_QUAL_VOLATILE
- * Treat_As_Volatile (gnat_entity))));
+ if (Treat_As_Volatile (gnat_entity))
+ gnu_type
+ = build_qualified_type (gnu_type,
+ TYPE_QUALS (gnu_type) | TYPE_QUAL_VOLATILE);
if (Is_Atomic (gnat_entity))
check_ok_for_atomic (gnu_type, gnat_entity, false);
diff --git a/gcc/ada/gcc-interface/targtyps.c b/gcc/ada/gcc-interface/targtyps.c
index 3b8aa5cc9f5..716550e397f 100644
--- a/gcc/ada/gcc-interface/targtyps.c
+++ b/gcc/ada/gcc-interface/targtyps.c
@@ -28,8 +28,9 @@
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
#include "tree.h"
+#include "tm.h"
+#include "tm_p.h"
#include "ada.h"
#include "types.h"
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
index 20fc989a015..b19aa22da71 100644
--- a/gcc/ada/make.adb
+++ b/gcc/ada/make.adb
@@ -7296,8 +7296,14 @@ package body Make is
begin
pragma Assert (N_M_Switch > 0 and RTS_Specified = null);
- -- This loop needs commenting ??? In fact this entire body is
- -- under-commented ??? And the spec is not much help :-(
+ -- In case we detected a multilib switch and the user has not
+ -- manually specified a specific RTS we emulate the following command:
+ -- gnatmake $FLAGS --RTS=$(gcc -print-multi-directory $FLAGS)
+
+ -- First select the flags which might have an impact on multilib
+ -- processing. Note that this is an heuristic selection and it
+ -- will need to be maintained over time. The condition has to
+ -- be kept synchronized with N_M_Switch counting in Scan_Make_Arg.
for Next_Arg in 1 .. Argument_Count loop
declare
@@ -7322,6 +7328,10 @@ package body Make is
Args (Args'Last) := new String'("-print-multi-directory");
+ -- Call the GCC driver with the collected flags and save its
+ -- output. Alternate design would be to link in gnatmake the
+ -- relevant part of the GCC driver.
+
if Saved_Gcc /= null then
Multilib_Gcc := Saved_Gcc;
else
@@ -7344,6 +7354,8 @@ package body Make is
return;
end if;
+ -- Parse the GCC driver output which is a single line, removing CR/LF
+
Output_FD := Open_Read (Output_Name.all, Binary);
if Output_FD = Invalid_FD then
@@ -7362,10 +7374,14 @@ package body Make is
end if;
end loop;
+ -- In case the standard RTS is selected do nothing
+
if N_Read = 0 or else Line (1 .. N_Read) = "." then
return;
end if;
+ -- Otherwise add -margs --RTS=output
+
Scan_Make_Arg ("-margs", And_Save => True);
Scan_Make_Arg ("--RTS=" & Line (1 .. N_Read), And_Save => True);
end Process_Multilib;
@@ -7845,6 +7861,9 @@ package body Make is
Add_Switch (Argv, Compiler, And_Save => And_Save);
Add_Switch (Argv, Linker, And_Save => And_Save);
+ -- The following condition has to be kept synchronized with
+ -- the Process_Multilib one.
+
if Argv (2) = 'm'
and then Argv /= "-mieee"
then
diff --git a/gcc/c-pretty-print.c b/gcc/c-pretty-print.c
index f9694bfc080..c4e6e96c296 100644
--- a/gcc/c-pretty-print.c
+++ b/gcc/c-pretty-print.c
@@ -2235,7 +2235,7 @@ pp_c_tree_decl_identifier (c_pretty_printer *pp, tree t)
else
{
static char xname[8];
- sprintf (xname, "<U%4x>", ((unsigned)((unsigned long)(t) & 0xffff)));
+ sprintf (xname, "<U%4x>", ((unsigned)((uintptr_t)(t) & 0xffff)));
name = xname;
}
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index e840da88bcf..d1c2be29b32 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -1920,19 +1920,19 @@ expand_gimple_stmt_1 (gimple stmt)
;
else if (promoted)
{
- bool unsigndp = SUBREG_PROMOTED_UNSIGNED_P (target);
+ int unsignedp = SUBREG_PROMOTED_UNSIGNED_P (target);
/* If TEMP is a VOIDmode constant, use convert_modes to make
sure that we properly convert it. */
if (CONSTANT_P (temp) && GET_MODE (temp) == VOIDmode)
{
temp = convert_modes (GET_MODE (target),
TYPE_MODE (ops.type),
- temp, unsigndp);
+ temp, unsignedp);
temp = convert_modes (GET_MODE (SUBREG_REG (target)),
- GET_MODE (target), temp, unsigndp);
+ GET_MODE (target), temp, unsignedp);
}
- convert_move (SUBREG_REG (target), temp, unsigndp);
+ convert_move (SUBREG_REG (target), temp, unsignedp);
}
else if (nontemporal && emit_storent_insn (target, temp))
;
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 11a9ed22bc5..3d49b8d4b60 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1713,44 +1713,6 @@ cgraph_clone_node (struct cgraph_node *n, gcov_type count, int freq,
return new_node;
}
-/* Create node representing clone of N during when reading the call-graph
- from an LTO stream. This is simpler than cgraph_clone_node. Additional
- information in the cloned node will be filled in later. */
-
-struct cgraph_node *
-cgraph_clone_input_node (struct cgraph_node *n)
-{
- struct cgraph_node *new_node = cgraph_create_node ();
-
- new_node->decl = n->decl;
- new_node->origin = n->origin;
- if (new_node->origin)
- {
- new_node->next_nested = new_node->origin->nested;
- new_node->origin->nested = new_node;
- }
- new_node->analyzed = n->analyzed;
- new_node->local = n->local;
- new_node->global = n->global;
- new_node->rtl = n->rtl;
-
- new_node->next_sibling_clone = n->clones;
- if (n->clones)
- n->clones->prev_sibling_clone = new_node;
- n->clones = new_node;
- new_node->clone_of = n;
-
- return new_node;
-}
-
-/* Return true if N is a cloned node. */
-
-bool
-cgraph_is_clone_node (struct cgraph_node *n)
-{
- return n->clone_of != NULL;
-}
-
/* Create a new name for omp child function. Returns an identifier. */
static GTY(()) unsigned int clone_fn_id_num;
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 3349a57ec0b..10617ec8a2a 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -422,7 +422,6 @@ struct cgraph_edge * cgraph_clone_edge (struct cgraph_edge *,
unsigned, gcov_type, int, int, bool);
struct cgraph_node * cgraph_clone_node (struct cgraph_node *, gcov_type, int,
int, bool);
-struct cgraph_node * cgraph_clone_input_node (struct cgraph_node *);
void cgraph_redirect_edge_callee (struct cgraph_edge *, struct cgraph_node *);
@@ -432,7 +431,6 @@ bool cgraph_function_possibly_inlined_p (tree);
void cgraph_unnest_node (struct cgraph_node *);
enum availability cgraph_function_body_availability (struct cgraph_node *);
-bool cgraph_is_clone_node (struct cgraph_node *);
void cgraph_add_new_function (tree, bool);
const char* cgraph_inline_failed_string (cgraph_inline_failed_t);
struct cgraph_node * cgraph_create_virtual_clone (struct cgraph_node *old_node,
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index b92bac4f8c5..408ecfa4051 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1018,15 +1018,49 @@ cgraph_analyze_functions (void)
ggc_collect ();
}
+
+/* Emit thunks for every node in the cgraph.
+ FIXME: We really ought to emit thunks only for functions that are needed. */
+
+static void
+cgraph_emit_thunks (void)
+{
+ struct cgraph_node *n;
+
+ for (n = cgraph_nodes; n; n = n->next)
+ {
+ /* Only emit thunks on functions defined in this TU.
+ Note that this may emit more thunks than strictly necessary.
+ During optimization some nodes may disappear. It would be
+ nice to only emit thunks only for the functions that will be
+ emitted, but we cannot know that until the inliner and other
+ IPA passes have run (see the sequencing of the call to
+ cgraph_mark_functions_to_output in cgraph_optimize). */
+ if (n->reachable
+ && !DECL_EXTERNAL (n->decl))
+ lang_hooks.callgraph.emit_associated_thunks (n->decl);
+ }
+}
+
+
/* Analyze the whole compilation unit once it is parsed completely. */
void
cgraph_finalize_compilation_unit (void)
{
+ timevar_push (TV_CGRAPH);
+
/* Do not skip analyzing the functions if there were errors, we
miss diagnostics for following functions otherwise. */
+ /* Emit size functions we didn't inline. */
finalize_size_functions ();
+
+ /* Call functions declared with the "constructor" or "destructor"
+ attribute. */
+ cgraph_build_cdtor_fns ();
+
+ /* Mark alias targets necessary and emit diagnostics. */
finish_aliases_1 ();
if (!quiet_flag)
@@ -1035,11 +1069,24 @@ cgraph_finalize_compilation_unit (void)
fflush (stderr);
}
- timevar_push (TV_CGRAPH);
+ /* Gimplify and lower all functions, compute reachability and
+ remove unreachable nodes. */
cgraph_analyze_functions ();
- timevar_pop (TV_CGRAPH);
+ /* Emit thunks for reachable nodes, if needed. */
+ if (lang_hooks.callgraph.emit_associated_thunks)
+ cgraph_emit_thunks ();
+
+ /* Mark alias targets necessary and emit diagnostics. */
+ finish_aliases_1 ();
+
+ /* Gimplify and lower thunks. */
+ cgraph_analyze_functions ();
+
+ /* Finally drive the pass manager. */
cgraph_optimize ();
+
+ timevar_pop (TV_CGRAPH);
}
@@ -1342,29 +1389,6 @@ ipa_passes (void)
}
-/* Emit thunks for every node in the cgraph.
- FIXME: We really ought to emit thunks only for functions that are needed. */
-
-static void
-cgraph_emit_thunks (void)
-{
- struct cgraph_node *n;
-
- for (n = cgraph_nodes; n; n = n->next)
- {
- /* Only emit thunks on functions defined in this TU.
- Note that this may emit more thunks than strictly necessary.
- During optimization some nodes may disappear. It would be
- nice to only emit thunks only for the functions that will be
- emitted, but we cannot know that until the inliner and other
- IPA passes have run (see the sequencing of the call to
- cgraph_mark_functions_to_output in cgraph_optimize). */
- if (!DECL_EXTERNAL (n->decl))
- lang_hooks.callgraph.emit_associated_thunks (n->decl);
- }
-}
-
-
/* Perform simple optimizations based on callgraph. */
void
@@ -1377,22 +1401,9 @@ cgraph_optimize (void)
verify_cgraph ();
#endif
- /* Emit thunks, if needed. */
- if (lang_hooks.callgraph.emit_associated_thunks)
- {
- cgraph_emit_thunks ();
- if (errorcount || sorrycount)
- return;
- }
-
- /* Call functions declared with the "constructor" or "destructor"
- attribute. */
- cgraph_build_cdtor_fns ();
-
/* Frontend may output common variables after the unit has been finalized.
It is safe to deal with them here as they are always zero initialized. */
varpool_analyze_pending_decls ();
- cgraph_analyze_functions ();
timevar_push (TV_CGRAPHOPT);
if (pre_ipa_mem_report)
diff --git a/gcc/combine-stack-adj.c b/gcc/combine-stack-adj.c
index 1f1759e1049..8849697bfce 100644
--- a/gcc/combine-stack-adj.c
+++ b/gcc/combine-stack-adj.c
@@ -71,25 +71,26 @@ along with GCC; see the file COPYING3. If not see
#define STACK_GROWS_DOWNWARD 0
#endif
-/* This structure records stack memory references between stack adjusting
- instructions. */
+/* This structure records two kinds of stack references between stack
+ adjusting instructions: stack references in memory addresses for
+ regular insns and all stack references for debug insns. */
-struct csa_memlist
+struct csa_reflist
{
HOST_WIDE_INT sp_offset;
- rtx insn, *mem;
- struct csa_memlist *next;
+ rtx insn, *ref;
+ struct csa_reflist *next;
};
static int stack_memref_p (rtx);
static rtx single_set_for_csa (rtx);
-static void free_csa_memlist (struct csa_memlist *);
-static struct csa_memlist *record_one_stack_memref (rtx, rtx *,
- struct csa_memlist *);
-static int try_apply_stack_adjustment (rtx, struct csa_memlist *,
+static void free_csa_reflist (struct csa_reflist *);
+static struct csa_reflist *record_one_stack_ref (rtx, rtx *,
+ struct csa_reflist *);
+static int try_apply_stack_adjustment (rtx, struct csa_reflist *,
HOST_WIDE_INT, HOST_WIDE_INT);
static void combine_stack_adjustments_for_block (basic_block);
-static int record_stack_memrefs (rtx *, void *);
+static int record_stack_refs (rtx *, void *);
/* Main entry point for stack adjustment combination. */
@@ -157,65 +158,80 @@ single_set_for_csa (rtx insn)
return XVECEXP (tmp, 0, 0);
}
-/* Free the list of csa_memlist nodes. */
+/* Free the list of csa_reflist nodes. */
static void
-free_csa_memlist (struct csa_memlist *memlist)
+free_csa_reflist (struct csa_reflist *reflist)
{
- struct csa_memlist *next;
- for (; memlist ; memlist = next)
+ struct csa_reflist *next;
+ for (; reflist ; reflist = next)
{
- next = memlist->next;
- free (memlist);
+ next = reflist->next;
+ free (reflist);
}
}
-/* Create a new csa_memlist node from the given memory reference.
- It is already known that the memory is stack_memref_p. */
+/* Create a new csa_reflist node from the given stack reference.
+ It is already known that the reference is either a MEM satisfying the
+ predicate stack_memref_p or a REG representing the stack pointer. */
-static struct csa_memlist *
-record_one_stack_memref (rtx insn, rtx *mem, struct csa_memlist *next_memlist)
+static struct csa_reflist *
+record_one_stack_ref (rtx insn, rtx *ref, struct csa_reflist *next_reflist)
{
- struct csa_memlist *ml;
+ struct csa_reflist *ml;
- ml = XNEW (struct csa_memlist);
+ ml = XNEW (struct csa_reflist);
- if (XEXP (*mem, 0) == stack_pointer_rtx)
+ if (REG_P (*ref) || XEXP (*ref, 0) == stack_pointer_rtx)
ml->sp_offset = 0;
else
- ml->sp_offset = INTVAL (XEXP (XEXP (*mem, 0), 1));
+ ml->sp_offset = INTVAL (XEXP (XEXP (*ref, 0), 1));
ml->insn = insn;
- ml->mem = mem;
- ml->next = next_memlist;
+ ml->ref = ref;
+ ml->next = next_reflist;
return ml;
}
/* Attempt to apply ADJUST to the stack adjusting insn INSN, as well
- as each of the memories in MEMLIST. Return true on success. */
+ as each of the memories and stack references in REFLIST. Return true
+ on success. */
static int
-try_apply_stack_adjustment (rtx insn, struct csa_memlist *memlist, HOST_WIDE_INT new_adjust,
- HOST_WIDE_INT delta)
+try_apply_stack_adjustment (rtx insn, struct csa_reflist *reflist,
+ HOST_WIDE_INT new_adjust, HOST_WIDE_INT delta)
{
- struct csa_memlist *ml;
+ struct csa_reflist *ml;
rtx set;
set = single_set_for_csa (insn);
- validate_change (insn, &XEXP (SET_SRC (set), 1), GEN_INT (new_adjust), 1);
+ if (MEM_P (SET_DEST (set)))
+ validate_change (insn, &SET_DEST (set),
+ replace_equiv_address (SET_DEST (set), stack_pointer_rtx),
+ 1);
+ else
+ validate_change (insn, &XEXP (SET_SRC (set), 1), GEN_INT (new_adjust), 1);
+
+ for (ml = reflist; ml ; ml = ml->next)
+ {
+ rtx new_addr = plus_constant (stack_pointer_rtx, ml->sp_offset - delta);
+ rtx new_val;
- for (ml = memlist; ml ; ml = ml->next)
- validate_change
- (ml->insn, ml->mem,
- replace_equiv_address_nv (*ml->mem,
- plus_constant (stack_pointer_rtx,
- ml->sp_offset - delta)), 1);
+ if (MEM_P (*ml->ref))
+ new_val = replace_equiv_address_nv (*ml->ref, new_addr);
+ else if (GET_MODE (*ml->ref) == GET_MODE (stack_pointer_rtx))
+ new_val = new_addr;
+ else
+ new_val = lowpart_subreg (GET_MODE (*ml->ref), new_addr,
+ GET_MODE (new_addr));
+ validate_change (ml->insn, ml->ref, new_val, 1);
+ }
if (apply_change_group ())
{
- /* Succeeded. Update our knowledge of the memory references. */
- for (ml = memlist; ml ; ml = ml->next)
+ /* Succeeded. Update our knowledge of the stack references. */
+ for (ml = reflist; ml ; ml = ml->next)
ml->sp_offset -= delta;
return 1;
@@ -224,20 +240,20 @@ try_apply_stack_adjustment (rtx insn, struct csa_memlist *memlist, HOST_WIDE_INT
return 0;
}
-/* Called via for_each_rtx and used to record all stack memory references in
- the insn and discard all other stack pointer references. */
-struct record_stack_memrefs_data
+/* Called via for_each_rtx and used to record all stack memory and other
+ references in the insn and discard all other stack pointer references. */
+struct record_stack_refs_data
{
rtx insn;
- struct csa_memlist *memlist;
+ struct csa_reflist *reflist;
};
static int
-record_stack_memrefs (rtx *xp, void *data)
+record_stack_refs (rtx *xp, void *data)
{
rtx x = *xp;
- struct record_stack_memrefs_data *d =
- (struct record_stack_memrefs_data *) data;
+ struct record_stack_refs_data *d =
+ (struct record_stack_refs_data *) data;
if (!x)
return 0;
switch (GET_CODE (x))
@@ -249,10 +265,11 @@ record_stack_memrefs (rtx *xp, void *data)
stack pointer, so this check is necessary. */
if (stack_memref_p (x))
{
- d->memlist = record_one_stack_memref (d->insn, xp, d->memlist);
+ d->reflist = record_one_stack_ref (d->insn, xp, d->reflist);
return -1;
}
- return 1;
+ /* Try harder for DEBUG_INSNs, handle e.g. (mem (mem (sp + 16) + 4). */
+ return !DEBUG_INSN_P (d->insn);
case REG:
/* ??? We want be able to handle non-memory stack pointer
references later. For now just discard all insns referring to
@@ -262,9 +279,17 @@ record_stack_memrefs (rtx *xp, void *data)
We can't just compare with STACK_POINTER_RTX because the
reference to the stack pointer might be in some other mode.
In particular, an explicit clobber in an asm statement will
- result in a QImode clobber. */
+ result in a QImode clobber.
+
+ In DEBUG_INSNs, we want to replace all occurrences, otherwise
+ they will cause -fcompare-debug failures. */
if (REGNO (x) == STACK_POINTER_REGNUM)
- return 1;
+ {
+ if (!DEBUG_INSN_P (d->insn))
+ return 1;
+ d->reflist = record_one_stack_ref (d->insn, xp, d->reflist);
+ return -1;
+ }
break;
default:
break;
@@ -343,9 +368,9 @@ combine_stack_adjustments_for_block (basic_block bb)
{
HOST_WIDE_INT last_sp_adjust = 0;
rtx last_sp_set = NULL_RTX;
- struct csa_memlist *memlist = NULL;
+ struct csa_reflist *reflist = NULL;
rtx insn, next, set;
- struct record_stack_memrefs_data data;
+ struct record_stack_refs_data data;
bool end_of_block = false;
for (insn = BB_HEAD (bb); !end_of_block ; insn = next)
@@ -379,7 +404,7 @@ combine_stack_adjustments_for_block (basic_block bb)
continue;
}
- /* If not all recorded memrefs can be adjusted, or the
+ /* If not all recorded refs can be adjusted, or the
adjustment is now too large for a constant addition,
we cannot merge the two stack adjustments.
@@ -403,7 +428,7 @@ combine_stack_adjustments_for_block (basic_block bb)
/* Combine an allocation into the first instruction. */
if (STACK_GROWS_DOWNWARD ? this_adjust <= 0 : this_adjust >= 0)
{
- if (try_apply_stack_adjustment (last_sp_set, memlist,
+ if (try_apply_stack_adjustment (last_sp_set, reflist,
last_sp_adjust + this_adjust,
this_adjust))
{
@@ -422,7 +447,7 @@ combine_stack_adjustments_for_block (basic_block bb)
else if (STACK_GROWS_DOWNWARD
? last_sp_adjust >= 0 : last_sp_adjust <= 0)
{
- if (try_apply_stack_adjustment (insn, memlist,
+ if (try_apply_stack_adjustment (insn, reflist,
last_sp_adjust + this_adjust,
-last_sp_adjust))
{
@@ -430,8 +455,8 @@ combine_stack_adjustments_for_block (basic_block bb)
delete_insn (last_sp_set);
last_sp_set = insn;
last_sp_adjust += this_adjust;
- free_csa_memlist (memlist);
- memlist = NULL;
+ free_csa_reflist (reflist);
+ reflist = NULL;
continue;
}
}
@@ -441,39 +466,44 @@ combine_stack_adjustments_for_block (basic_block bb)
delete the old deallocation insn. */
if (last_sp_set && last_sp_adjust == 0)
delete_insn (last_sp_set);
- free_csa_memlist (memlist);
- memlist = NULL;
+ free_csa_reflist (reflist);
+ reflist = NULL;
last_sp_set = insn;
last_sp_adjust = this_adjust;
continue;
}
- /* Find a predecrement of exactly the previous adjustment and
- turn it into a direct store. Obviously we can't do this if
- there were any intervening uses of the stack pointer. */
- if (memlist == NULL
- && MEM_P (dest)
- && ((GET_CODE (XEXP (dest, 0)) == PRE_DEC
- && (last_sp_adjust
- == (HOST_WIDE_INT) GET_MODE_SIZE (GET_MODE (dest))))
- || (GET_CODE (XEXP (dest, 0)) == PRE_MODIFY
+ /* Find a store with pre-(dec|inc)rement or pre-modify of exactly
+ the previous adjustment and turn it into a simple store. This
+ is equivalent to anticipating the stack adjustment so this must
+ be an allocation. */
+ if (MEM_P (dest)
+ && ((STACK_GROWS_DOWNWARD
+ ? (GET_CODE (XEXP (dest, 0)) == PRE_DEC
+ && last_sp_adjust
+ == (HOST_WIDE_INT) GET_MODE_SIZE (GET_MODE (dest)))
+ : (GET_CODE (XEXP (dest, 0)) == PRE_INC
+ && last_sp_adjust
+ == -(HOST_WIDE_INT) GET_MODE_SIZE (GET_MODE (dest))))
+ || ((STACK_GROWS_DOWNWARD
+ ? last_sp_adjust >= 0 : last_sp_adjust <= 0)
+ && GET_CODE (XEXP (dest, 0)) == PRE_MODIFY
&& GET_CODE (XEXP (XEXP (dest, 0), 1)) == PLUS
- && XEXP (XEXP (XEXP (dest, 0), 1), 0) == stack_pointer_rtx
- && (GET_CODE (XEXP (XEXP (XEXP (dest, 0), 1), 1))
- == CONST_INT)
- && (INTVAL (XEXP (XEXP (XEXP (dest, 0), 1), 1))
- == -last_sp_adjust)))
+ && XEXP (XEXP (XEXP (dest, 0), 1), 0)
+ == stack_pointer_rtx
+ && GET_CODE (XEXP (XEXP (XEXP (dest, 0), 1), 1))
+ == CONST_INT
+ && INTVAL (XEXP (XEXP (XEXP (dest, 0), 1), 1))
+ == -last_sp_adjust))
&& XEXP (XEXP (dest, 0), 0) == stack_pointer_rtx
- && ! reg_mentioned_p (stack_pointer_rtx, src)
+ && !reg_mentioned_p (stack_pointer_rtx, src)
&& memory_address_p (GET_MODE (dest), stack_pointer_rtx)
- && validate_change (insn, &SET_DEST (set),
- replace_equiv_address (dest,
- stack_pointer_rtx),
- 0))
+ && try_apply_stack_adjustment (insn, reflist, 0,
+ -last_sp_adjust))
{
delete_insn (last_sp_set);
- free_csa_memlist (memlist);
- memlist = NULL;
+ free_csa_reflist (reflist);
+ reflist = NULL;
last_sp_set = NULL_RTX;
last_sp_adjust = 0;
continue;
@@ -481,14 +511,14 @@ combine_stack_adjustments_for_block (basic_block bb)
}
data.insn = insn;
- data.memlist = memlist;
+ data.reflist = reflist;
if (!CALL_P (insn) && last_sp_set
- && !for_each_rtx (&PATTERN (insn), record_stack_memrefs, &data))
+ && !for_each_rtx (&PATTERN (insn), record_stack_refs, &data))
{
- memlist = data.memlist;
+ reflist = data.reflist;
continue;
}
- memlist = data.memlist;
+ reflist = data.reflist;
/* Otherwise, we were not able to process the instruction.
Do not continue collecting data across such a one. */
@@ -498,8 +528,8 @@ combine_stack_adjustments_for_block (basic_block bb)
{
if (last_sp_set && last_sp_adjust == 0)
delete_insn (last_sp_set);
- free_csa_memlist (memlist);
- memlist = NULL;
+ free_csa_reflist (reflist);
+ reflist = NULL;
last_sp_set = NULL_RTX;
last_sp_adjust = 0;
}
@@ -508,8 +538,8 @@ combine_stack_adjustments_for_block (basic_block bb)
if (last_sp_set && last_sp_adjust == 0)
delete_insn (last_sp_set);
- if (memlist)
- free_csa_memlist (memlist);
+ if (reflist)
+ free_csa_reflist (reflist);
}
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 52a979af60a..6a680a0b094 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1927,7 +1927,7 @@ powerpc-*-linux* | powerpc64-*-linux*)
tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
;;
esac
- tmake_file="${tmake_file} rs6000/t-fprules-softfp soft-fp/t-softfp"
+ tmake_file="${tmake_file} t-slibgcc-libgcc rs6000/t-fprules-softfp soft-fp/t-softfp"
case ${target} in
powerpc*-*-linux*altivec*)
tm_file="${tm_file} rs6000/linuxaltivec.h" ;;
@@ -1943,19 +1943,19 @@ powerpc-*-linux* | powerpc64-*-linux*)
powerpc64-*-gnu*)
tm_file="${tm_file} elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/default64.h rs6000/linux64.h rs6000/gnu.h glibc-stdint.h"
extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
- tmake_file="t-slibgcc-elf-ver t-gnu"
+ tmake_file="t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu"
;;
powerpc-*-gnu-gnualtivec*)
tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h rs6000/gnu.h glibc-stdint.h"
extra_options="${extra_options} rs6000/sysv4.opt"
- tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-gnu rs6000/t-ppccomm"
+ tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu rs6000/t-ppccomm"
if test x$enable_threads = xyes; then
thread_file='posix'
fi
;;
powerpc-*-gnu*)
tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux.h rs6000/gnu.h glibc-stdint.h"
- tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-gnu rs6000/t-ppccomm"
+ tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu rs6000/t-ppccomm"
extra_options="${extra_options} rs6000/sysv4.opt"
if test x$enable_threads = xyes; then
thread_file='posix'
diff --git a/gcc/config.in b/gcc/config.in
index d7c8ac77da5..a1680790009 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -1032,6 +1032,18 @@
#endif
+/* Define to 1 if the system has the type `intmax_t'. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_INTMAX_T
+#endif
+
+
+/* Define to 1 if the system has the type `intptr_t'. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_INTPTR_T
+#endif
+
+
/* Define if you have a working <inttypes.h> header file. */
#ifndef USED_FOR_TARGET
#undef HAVE_INTTYPES_H
@@ -1145,6 +1157,12 @@
#endif
+/* Define to 1 if the system has the type `long long int'. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_LONG_LONG_INT
+#endif
+
+
/* Define to 1 if you have the <malloc.h> header file. */
#ifndef USED_FOR_TARGET
#undef HAVE_MALLOC_H
@@ -1343,12 +1361,30 @@
#endif
+/* Define to 1 if the system has the type `uintmax_t'. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_UINTMAX_T
+#endif
+
+
+/* Define to 1 if the system has the type `uintptr_t'. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_UINTPTR_T
+#endif
+
+
/* Define to 1 if you have the <unistd.h> header file. */
#ifndef USED_FOR_TARGET
#undef HAVE_UNISTD_H
#endif
+/* Define to 1 if the system has the type `unsigned long long int'. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_UNSIGNED_LONG_LONG_INT
+#endif
+
+
/* Define if valgrind's valgrind/memcheck.h header is installed. */
#ifndef USED_FOR_TARGET
#undef HAVE_VALGRIND_MEMCHECK_H
@@ -1636,6 +1672,30 @@
#endif
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+#ifndef USED_FOR_TARGET
+#undef _UINT32_T
+#endif
+
+
+/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+#ifndef USED_FOR_TARGET
+#undef _UINT64_T
+#endif
+
+
+/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+#ifndef USED_FOR_TARGET
+#undef _UINT8_T
+#endif
+
+
/* Define to `char *' if <sys/types.h> does not define. */
#ifndef USED_FOR_TARGET
#undef caddr_t
@@ -1648,7 +1708,43 @@
#undef inline
#endif
-/* Define to `long' if <sys/types.h> does not define. */
+/* Define to the type of a signed integer type of width exactly 16 bits if
+ such a type exists and the standard includes do not define it. */
+#ifndef USED_FOR_TARGET
+#undef int16_t
+#endif
+
+
+/* Define to the type of a signed integer type of width exactly 32 bits if
+ such a type exists and the standard includes do not define it. */
+#ifndef USED_FOR_TARGET
+#undef int32_t
+#endif
+
+
+/* Define to the type of a signed integer type of width exactly 64 bits if
+ such a type exists and the standard includes do not define it. */
+#ifndef USED_FOR_TARGET
+#undef int64_t
+#endif
+
+
+/* Define to the type of a signed integer type of width exactly 8 bits if such
+ a type exists and the standard includes do not define it. */
+#ifndef USED_FOR_TARGET
+#undef int8_t
+#endif
+
+
+/* Define to the widest signed integer type if <stdint.h> and <inttypes.h> do
+ not define. */
+#ifndef USED_FOR_TARGET
+#undef intmax_t
+#endif
+
+
+/* Define to the type of a signed integer type wide enough to hold a pointer,
+ if such a type exists, and if the system does not define it. */
#ifndef USED_FOR_TARGET
#undef intptr_t
#endif
@@ -1672,6 +1768,48 @@
#endif
+/* Define to the type of an unsigned integer type of width exactly 16 bits if
+ such a type exists and the standard includes do not define it. */
+#ifndef USED_FOR_TARGET
+#undef uint16_t
+#endif
+
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+ such a type exists and the standard includes do not define it. */
+#ifndef USED_FOR_TARGET
+#undef uint32_t
+#endif
+
+
+/* Define to the type of an unsigned integer type of width exactly 64 bits if
+ such a type exists and the standard includes do not define it. */
+#ifndef USED_FOR_TARGET
+#undef uint64_t
+#endif
+
+
+/* Define to the type of an unsigned integer type of width exactly 8 bits if
+ such a type exists and the standard includes do not define it. */
+#ifndef USED_FOR_TARGET
+#undef uint8_t
+#endif
+
+
+/* Define to the widest unsigned integer type if <stdint.h> and <inttypes.h>
+ do not define. */
+#ifndef USED_FOR_TARGET
+#undef uintmax_t
+#endif
+
+
+/* Define to the type of an unsigned integer type wide enough to hold a
+ pointer, if such a type exists, and if the system does not define it. */
+#ifndef USED_FOR_TARGET
+#undef uintptr_t
+#endif
+
+
/* Define as `fork' if `vfork' does not work. */
#ifndef USED_FOR_TARGET
#undef vfork
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 1c15e53f996..46ad8f4be2d 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -7664,7 +7664,7 @@ alpha_does_function_need_gp (void)
pop_topmost_sequence ();
for (; insn; insn = NEXT_INSN (insn))
- if (INSN_P (insn)
+ if (NONDEBUG_INSN_P (insn)
&& ! JUMP_TABLE_DATA_P (insn)
&& GET_CODE (PATTERN (insn)) != USE
&& GET_CODE (PATTERN (insn)) != CLOBBER
@@ -8663,8 +8663,6 @@ alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
HOST_WIDE_INT hi, lo;
rtx this_rtx, insn, funexp;
- insn_locators_alloc ();
-
/* We always require a valid GP. */
emit_insn (gen_prologue_ldgp ());
emit_note (NOTE_INSN_PROLOGUE_END);
@@ -8741,6 +8739,7 @@ alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
instruction scheduling worth while. Note that use_thunk calls
assemble_start_function and assemble_end_function. */
insn = get_insns ();
+ insn_locators_alloc ();
shorten_branches (insn);
final_start_function (insn, file, 1);
final (insn, file, 1);
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index ae32da563e1..215c9fba789 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -2368,6 +2368,7 @@ extern int making_const_table;
/* The arm5 clz instruction returns 32. */
#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1)
+#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1)
#undef ASM_APP_OFF
#define ASM_APP_OFF (TARGET_THUMB1 ? "\t.code\t16\n" : \
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 09a1b0841e9..e180c2f08f1 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -100,6 +100,7 @@
(UNSPEC_GOTSYM_OFF 24) ; The offset of the start of the the GOT from a
; a given symbolic address.
(UNSPEC_THUMB1_CASESI 25) ; A Thumb1 compressed dispatch-table call.
+ (UNSPEC_RBIT 26) ; rbit operation.
]
)
@@ -10955,6 +10956,28 @@
[(set_attr "predicable" "yes")
(set_attr "insn" "clz")])
+(define_insn "rbitsi2"
+ [(set (match_operand:SI 0 "s_register_operand" "=r")
+ (unspec:SI [(match_operand:SI 1 "s_register_operand" "r")] UNSPEC_RBIT))]
+ "TARGET_32BIT && arm_arch_thumb2"
+ "rbit%?\\t%0, %1"
+ [(set_attr "predicable" "yes")
+ (set_attr "insn" "clz")])
+
+(define_expand "ctzsi2"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (ctz:SI (match_operand:SI 1 "s_register_operand" "")))]
+ "TARGET_32BIT && arm_arch_thumb2"
+ "
+ {
+ rtx tmp = gen_reg_rtx (SImode);
+ emit_insn (gen_rbitsi2 (tmp, operands[1]));
+ emit_insn (gen_clzsi2 (operands[0], tmp));
+ }
+ DONE;
+ "
+)
+
;; V5E instructions.
(define_insn "prefetch"
diff --git a/gcc/config/arm/vfp.md b/gcc/config/arm/vfp.md
index 298a140f071..77c99d241ef 100644
--- a/gcc/config/arm/vfp.md
+++ b/gcc/config/arm/vfp.md
@@ -960,7 +960,7 @@
(compare:CCFP (match_dup 0)
(match_dup 1)))
(set (reg:CCFP CC_REGNUM)
- (reg:CCFPE VFPCC_REGNUM))]
+ (reg:CCFP VFPCC_REGNUM))]
""
)
diff --git a/gcc/config/bfin/bfin-protos.h b/gcc/config/bfin/bfin-protos.h
index 72698a2b0a1..b2d3d8c2dbd 100644
--- a/gcc/config/bfin/bfin-protos.h
+++ b/gcc/config/bfin/bfin-protos.h
@@ -22,44 +22,6 @@
#ifndef GCC_BFIN_PROTOS_H
#define GCC_BFIN_PROTOS_H
-/* CPU type. */
-typedef enum bfin_cpu_type
-{
- BFIN_CPU_UNKNOWN,
- BFIN_CPU_BF512,
- BFIN_CPU_BF514,
- BFIN_CPU_BF516,
- BFIN_CPU_BF518,
- BFIN_CPU_BF522,
- BFIN_CPU_BF523,
- BFIN_CPU_BF524,
- BFIN_CPU_BF525,
- BFIN_CPU_BF526,
- BFIN_CPU_BF527,
- BFIN_CPU_BF531,
- BFIN_CPU_BF532,
- BFIN_CPU_BF533,
- BFIN_CPU_BF534,
- BFIN_CPU_BF536,
- BFIN_CPU_BF537,
- BFIN_CPU_BF538,
- BFIN_CPU_BF539,
- BFIN_CPU_BF542,
- BFIN_CPU_BF544,
- BFIN_CPU_BF547,
- BFIN_CPU_BF548,
- BFIN_CPU_BF549,
- BFIN_CPU_BF561
-} bfin_cpu_t;
-
-/* Value of -mcpu= */
-extern bfin_cpu_t bfin_cpu_type;
-
-/* Value of -msi-revision= */
-extern int bfin_si_revision;
-
-extern unsigned int bfin_workarounds;
-
/* For the anomaly 05-00-0245 */
#define WA_SPECULATIVE_LOADS 0x00000001
#define ENABLE_WA_SPECULATIVE_LOADS \
@@ -97,6 +59,10 @@ extern unsigned int bfin_workarounds;
#define ENABLE_WA_LOAD_LCREGS \
(bfin_workarounds & WA_LOAD_LCREGS)
+#define WA_05000074 0x00000100
+#define ENABLE_WA_05000074 \
+ (bfin_workarounds & WA_05000074)
+
#define Mmode enum machine_mode
extern rtx function_arg (CUMULATIVE_ARGS *, Mmode, tree, int);
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 61da6db38eb..28406150eea 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -63,6 +63,7 @@ struct GTY(()) machine_function
/* Set if we are notified by the doloop pass that a hardware loop
was created. */
int has_hardware_loops;
+
/* Set if we create a memcpy pattern that uses loop registers. */
int has_loopreg_clobber;
};
@@ -81,6 +82,7 @@ const char *dregs_pair_names[] = DREGS_PAIR_NAMES;
const char *byte_reg_names[] = BYTE_REGISTER_NAMES;
static int arg_regs[] = FUNCTION_ARG_REGISTERS;
+static int ret_regs[] = FUNCTION_RETURN_REGISTERS;
/* Nonzero if -mshared-library-id was given. */
static int bfin_lib_id_given;
@@ -115,184 +117,223 @@ struct bfin_cpu
struct bfin_cpu bfin_cpus[] =
{
{"bf512", BFIN_CPU_BF512, 0x0000,
- WA_SPECULATIVE_LOADS},
+ WA_SPECULATIVE_LOADS | WA_05000074},
{"bf514", BFIN_CPU_BF514, 0x0000,
- WA_SPECULATIVE_LOADS},
+ WA_SPECULATIVE_LOADS | WA_05000074},
{"bf516", BFIN_CPU_BF516, 0x0000,
- WA_SPECULATIVE_LOADS},
+ WA_SPECULATIVE_LOADS | WA_05000074},
{"bf518", BFIN_CPU_BF518, 0x0000,
- WA_SPECULATIVE_LOADS},
+ WA_SPECULATIVE_LOADS | WA_05000074},
{"bf522", BFIN_CPU_BF522, 0x0002,
- WA_SPECULATIVE_LOADS},
+ WA_SPECULATIVE_LOADS | WA_05000074},
{"bf522", BFIN_CPU_BF522, 0x0001,
- WA_SPECULATIVE_LOADS | WA_RETS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf522", BFIN_CPU_BF522, 0x0000,
- WA_SPECULATIVE_LOADS | WA_RETS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf523", BFIN_CPU_BF523, 0x0002,
- WA_SPECULATIVE_LOADS},
+ WA_SPECULATIVE_LOADS | WA_05000074},
{"bf523", BFIN_CPU_BF523, 0x0001,
- WA_SPECULATIVE_LOADS | WA_RETS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf523", BFIN_CPU_BF523, 0x0000,
- WA_SPECULATIVE_LOADS | WA_RETS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf524", BFIN_CPU_BF524, 0x0002,
- WA_SPECULATIVE_LOADS},
+ WA_SPECULATIVE_LOADS | WA_05000074},
{"bf524", BFIN_CPU_BF524, 0x0001,
- WA_SPECULATIVE_LOADS | WA_RETS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf524", BFIN_CPU_BF524, 0x0000,
- WA_SPECULATIVE_LOADS | WA_RETS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf525", BFIN_CPU_BF525, 0x0002,
- WA_SPECULATIVE_LOADS},
+ WA_SPECULATIVE_LOADS | WA_05000074},
{"bf525", BFIN_CPU_BF525, 0x0001,
- WA_SPECULATIVE_LOADS | WA_RETS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf525", BFIN_CPU_BF525, 0x0000,
- WA_SPECULATIVE_LOADS | WA_RETS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf526", BFIN_CPU_BF526, 0x0002,
- WA_SPECULATIVE_LOADS},
+ WA_SPECULATIVE_LOADS | WA_05000074},
{"bf526", BFIN_CPU_BF526, 0x0001,
- WA_SPECULATIVE_LOADS | WA_RETS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf526", BFIN_CPU_BF526, 0x0000,
- WA_SPECULATIVE_LOADS | WA_RETS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf527", BFIN_CPU_BF527, 0x0002,
- WA_SPECULATIVE_LOADS},
+ WA_SPECULATIVE_LOADS | WA_05000074},
{"bf527", BFIN_CPU_BF527, 0x0001,
- WA_SPECULATIVE_LOADS | WA_RETS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf527", BFIN_CPU_BF527, 0x0000,
- WA_SPECULATIVE_LOADS | WA_RETS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf531", BFIN_CPU_BF531, 0x0006,
- WA_SPECULATIVE_LOADS | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_LOAD_LCREGS | WA_05000074},
{"bf531", BFIN_CPU_BF531, 0x0005,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_05000283 | WA_05000315 | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_05000283 | WA_05000315
+ | WA_LOAD_LCREGS | WA_05000074},
{"bf531", BFIN_CPU_BF531, 0x0004,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
- | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
+ | WA_05000074},
{"bf531", BFIN_CPU_BF531, 0x0003,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
- | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
+ | WA_05000074},
{"bf532", BFIN_CPU_BF532, 0x0006,
- WA_SPECULATIVE_LOADS | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_LOAD_LCREGS | WA_05000074},
{"bf532", BFIN_CPU_BF532, 0x0005,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_05000283 | WA_05000315 | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_05000283 | WA_05000315
+ | WA_LOAD_LCREGS | WA_05000074},
{"bf532", BFIN_CPU_BF532, 0x0004,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
- | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
+ | WA_05000074},
{"bf532", BFIN_CPU_BF532, 0x0003,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
- | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
+ | WA_05000074},
{"bf533", BFIN_CPU_BF533, 0x0006,
- WA_SPECULATIVE_LOADS | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_LOAD_LCREGS | WA_05000074},
{"bf533", BFIN_CPU_BF533, 0x0005,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_05000283 | WA_05000315 | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_05000283 | WA_05000315
+ | WA_LOAD_LCREGS | WA_05000074},
{"bf533", BFIN_CPU_BF533, 0x0004,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
- | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
+ | WA_05000074},
{"bf533", BFIN_CPU_BF533, 0x0003,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
- | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
+ | WA_05000074},
{"bf534", BFIN_CPU_BF534, 0x0003,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_LOAD_LCREGS | WA_05000074},
{"bf534", BFIN_CPU_BF534, 0x0002,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
- | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
+ | WA_05000074},
{"bf534", BFIN_CPU_BF534, 0x0001,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
- | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
+ | WA_05000074},
{"bf536", BFIN_CPU_BF536, 0x0003,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_LOAD_LCREGS | WA_05000074},
{"bf536", BFIN_CPU_BF536, 0x0002,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
- | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
+ | WA_05000074},
{"bf536", BFIN_CPU_BF536, 0x0001,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
- | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
+ | WA_05000074},
{"bf537", BFIN_CPU_BF537, 0x0003,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_LOAD_LCREGS | WA_05000074},
{"bf537", BFIN_CPU_BF537, 0x0002,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
- | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
+ | WA_05000074},
{"bf537", BFIN_CPU_BF537, 0x0001,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
- | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
+ | WA_05000074},
{"bf538", BFIN_CPU_BF538, 0x0005,
- WA_SPECULATIVE_LOADS | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_LOAD_LCREGS | WA_05000074},
{"bf538", BFIN_CPU_BF538, 0x0004,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_LOAD_LCREGS | WA_05000074},
{"bf538", BFIN_CPU_BF538, 0x0003,
WA_SPECULATIVE_LOADS | WA_RETS
- | WA_05000283 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000315 | WA_LOAD_LCREGS | WA_05000074},
{"bf538", BFIN_CPU_BF538, 0x0002,
WA_SPECULATIVE_LOADS | WA_RETS
- | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
+ | WA_05000074},
{"bf539", BFIN_CPU_BF539, 0x0005,
- WA_SPECULATIVE_LOADS | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_LOAD_LCREGS | WA_05000074},
{"bf539", BFIN_CPU_BF539, 0x0004,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_LOAD_LCREGS | WA_05000074},
{"bf539", BFIN_CPU_BF539, 0x0003,
WA_SPECULATIVE_LOADS | WA_RETS
- | WA_05000283 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000315 | WA_LOAD_LCREGS | WA_05000074},
{"bf539", BFIN_CPU_BF539, 0x0002,
WA_SPECULATIVE_LOADS | WA_RETS
- | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
+ | WA_05000074},
+
+ {"bf542m", BFIN_CPU_BF542M, 0x0003,
+ WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf542", BFIN_CPU_BF542, 0x0002,
- WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS},
+ WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf542", BFIN_CPU_BF542, 0x0001,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_05000074},
{"bf542", BFIN_CPU_BF542, 0x0000,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_LOAD_LCREGS
+ | WA_05000074},
+
+ {"bf544m", BFIN_CPU_BF544M, 0x0003,
+ WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf544", BFIN_CPU_BF544, 0x0002,
- WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS},
+ WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf544", BFIN_CPU_BF544, 0x0001,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_05000074},
{"bf544", BFIN_CPU_BF544, 0x0000,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_LOAD_LCREGS
+ | WA_05000074},
+
+ {"bf547m", BFIN_CPU_BF547M, 0x0003,
+ WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf547", BFIN_CPU_BF547, 0x0002,
- WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS},
+ WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf547", BFIN_CPU_BF547, 0x0001,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_05000074},
{"bf547", BFIN_CPU_BF547, 0x0000,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_LOAD_LCREGS
+ | WA_05000074},
+
+ {"bf548m", BFIN_CPU_BF548M, 0x0003,
+ WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf548", BFIN_CPU_BF548, 0x0002,
- WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS},
+ WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf548", BFIN_CPU_BF548, 0x0001,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_05000074},
{"bf548", BFIN_CPU_BF548, 0x0000,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_LOAD_LCREGS
+ | WA_05000074},
+
+ {"bf549m", BFIN_CPU_BF549M, 0x0003,
+ WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf549", BFIN_CPU_BF549, 0x0002,
- WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS},
+ WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf549", BFIN_CPU_BF549, 0x0001,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_05000074},
{"bf549", BFIN_CPU_BF549, 0x0000,
- WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_LOAD_LCREGS},
+ WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_LOAD_LCREGS
+ | WA_05000074},
{"bf561", BFIN_CPU_BF561, 0x0005, WA_RETS
- | WA_05000283 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000315 | WA_LOAD_LCREGS | WA_05000074},
{"bf561", BFIN_CPU_BF561, 0x0003,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
- | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
+ | WA_05000074},
{"bf561", BFIN_CPU_BF561, 0x0002,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
- | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS},
+ | WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
+ | WA_05000074},
{NULL, 0, 0, 0}
};
@@ -532,7 +573,14 @@ n_pregs_to_save (bool is_inthandler, bool consecutive)
static bool
must_save_fp_p (void)
{
- return frame_pointer_needed || df_regs_ever_live_p (REG_FP);
+ return df_regs_ever_live_p (REG_FP);
+}
+
+/* Determine if we are going to save the RETS register. */
+static bool
+must_save_rets_p (void)
+{
+ return df_regs_ever_live_p (REG_RETS);
}
static bool
@@ -844,13 +892,12 @@ n_regs_saved_by_prologue (void)
int i;
if (all || stack_frame_needed_p ())
- /* We use a LINK instruction in this case. */
n += 2;
else
{
if (must_save_fp_p ())
n++;
- if (! current_function_is_leaf)
+ if (must_save_rets_p ())
n++;
}
@@ -1092,12 +1139,13 @@ do_link (rtx spreg, HOST_WIDE_INT frame_size, bool all)
{
frame_size += arg_area_size ();
- if (all || stack_frame_needed_p ()
- || (must_save_fp_p () && ! current_function_is_leaf))
+ if (all
+ || stack_frame_needed_p ()
+ || (must_save_rets_p () && must_save_fp_p ()))
emit_link_insn (spreg, frame_size);
else
{
- if (! current_function_is_leaf)
+ if (must_save_rets_p ())
{
rtx pat = gen_movsi (gen_rtx_MEM (Pmode,
gen_rtx_PRE_DEC (Pmode, spreg)),
@@ -1127,20 +1175,20 @@ do_unlink (rtx spreg, HOST_WIDE_INT frame_size, bool all, int epilogue_p)
{
frame_size += arg_area_size ();
- if (all || stack_frame_needed_p ())
+ if (stack_frame_needed_p ())
emit_insn (gen_unlink ());
else
{
rtx postinc = gen_rtx_MEM (Pmode, gen_rtx_POST_INC (Pmode, spreg));
add_to_reg (spreg, frame_size, 0, epilogue_p);
- if (must_save_fp_p ())
+ if (all || must_save_fp_p ())
{
rtx fpreg = gen_rtx_REG (Pmode, REG_FP);
emit_move_insn (fpreg, postinc);
emit_use (fpreg);
}
- if (! current_function_is_leaf)
+ if (all || must_save_rets_p ())
{
emit_move_insn (bfin_rets_rtx, postinc);
emit_use (bfin_rets_rtx);
@@ -1194,9 +1242,7 @@ expand_interrupt_handler_prologue (rtx spreg, e_funkind fkind, bool all)
if (lookup_attribute ("nesting", attrs))
{
- rtx srcreg = gen_rtx_REG (Pmode, (fkind == EXCPT_HANDLER ? REG_RETX
- : fkind == NMI_HANDLER ? REG_RETN
- : REG_RETI));
+ rtx srcreg = gen_rtx_REG (Pmode, ret_regs[fkind]);
insn = emit_move_insn (predec, srcreg);
RTX_FRAME_RELATED_P (insn) = 1;
}
@@ -1238,9 +1284,7 @@ expand_interrupt_handler_epilogue (rtx spreg, e_funkind fkind, bool all)
if (lookup_attribute ("nesting", attrs))
{
- rtx srcreg = gen_rtx_REG (Pmode, (fkind == EXCPT_HANDLER ? REG_RETX
- : fkind == NMI_HANDLER ? REG_RETN
- : REG_RETI));
+ rtx srcreg = gen_rtx_REG (Pmode, ret_regs[fkind]);
emit_move_insn (srcreg, postinc);
}
@@ -1256,7 +1300,7 @@ expand_interrupt_handler_epilogue (rtx spreg, e_funkind fkind, bool all)
if (fkind == EXCPT_HANDLER)
emit_insn (gen_addsi3 (spreg, spreg, GEN_INT (12)));
- emit_jump_insn (gen_return_internal (GEN_INT (fkind)));
+ emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, ret_regs[fkind])));
}
/* Used while emitting the prologue to generate code to load the correct value
@@ -1392,7 +1436,7 @@ bfin_expand_epilogue (int need_return, int eh_return, bool sibcall_p)
if (eh_return)
emit_insn (gen_addsi3 (spreg, spreg, gen_rtx_REG (Pmode, REG_P2)));
- emit_jump_insn (gen_return_internal (GEN_INT (SUBROUTINE)));
+ emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, REG_RETS)));
}
/* Return nonzero if register OLD_REG can be renamed to register NEW_REG. */
@@ -2193,9 +2237,10 @@ bfin_expand_call (rtx retval, rtx fnaddr, rtx callarg1, rtx cookie, int sibcall)
{
rtx use = NULL, call;
rtx callee = XEXP (fnaddr, 0);
- int nelts = 2 + !!sibcall;
+ int nelts = 3;
rtx pat;
rtx picreg = get_hard_reg_initial_val (SImode, FDPIC_REGNO);
+ rtx retsreg = gen_rtx_REG (Pmode, REG_RETS);
int n;
/* In an untyped call, we can get NULL for operand 2. */
@@ -2272,6 +2317,8 @@ bfin_expand_call (rtx retval, rtx fnaddr, rtx callarg1, rtx cookie, int sibcall)
XVECEXP (pat, 0, n++) = gen_rtx_USE (VOIDmode, cookie);
if (sibcall)
XVECEXP (pat, 0, n++) = gen_rtx_RETURN (VOIDmode);
+ else
+ XVECEXP (pat, 0, n++) = gen_rtx_CLOBBER (VOIDmode, retsreg);
call = emit_call_insn (pat);
if (use)
CALL_INSN_FUNCTION_USAGE (call) = use;
@@ -4177,7 +4224,10 @@ bfin_optimize_loop (loop_info loop)
seq_end = emit_insn (copy_rtx (PATTERN (last_insn)));
}
else
- seq_end = emit_jump_insn (gen_jump (label));
+ {
+ emit_jump_insn (gen_jump (label));
+ seq_end = emit_barrier ();
+ }
}
seq = get_insns ();
@@ -4225,6 +4275,7 @@ bfin_optimize_loop (loop_info loop)
else
redirect_edge_succ (e, new_bb);
}
+ e = make_edge (new_bb, loop->head, 0);
}
delete_insn (loop->loop_end);
@@ -4772,15 +4823,27 @@ bfin_gen_bundles (void)
for (insn = BB_HEAD (bb);; insn = next)
{
int at_end;
+ rtx delete_this = NULL_RTX;
+
if (INSN_P (insn))
{
- if (get_attr_type (insn) == TYPE_DSP32)
- slot[0] = insn;
- else if (slot[1] == NULL_RTX)
- slot[1] = insn;
+ enum attr_type type = get_attr_type (insn);
+
+ if (type == TYPE_STALL)
+ {
+ gcc_assert (n_filled == 0);
+ delete_this = insn;
+ }
else
- slot[2] = insn;
- n_filled++;
+ {
+ if (type == TYPE_DSP32 || type == TYPE_DSP32SHIFTIMM)
+ slot[0] = insn;
+ else if (slot[1] == NULL_RTX)
+ slot[1] = insn;
+ else
+ slot[2] = insn;
+ n_filled++;
+ }
}
next = NEXT_INSN (insn);
@@ -4795,7 +4858,7 @@ bfin_gen_bundles (void)
/* BB_END can change due to emitting extra NOPs, so check here. */
at_end = insn == BB_END (bb);
- if (at_end || GET_MODE (next) == TImode)
+ if (delete_this == NULL_RTX && (at_end || GET_MODE (next) == TImode))
{
if ((n_filled < 2
|| !gen_one_bundle (slot))
@@ -4814,6 +4877,8 @@ bfin_gen_bundles (void)
n_filled = 0;
slot[0] = slot[1] = slot[2] = NULL_RTX;
}
+ if (delete_this != NULL_RTX)
+ delete_insn (delete_this);
if (at_end)
break;
}
@@ -4974,28 +5039,38 @@ type_for_anomaly (rtx insn)
return get_attr_type (insn);
}
-/* Return nonzero if INSN contains any loads that may trap. It handles
- SEQUENCEs correctly. */
-
+/* Return true iff the address found in MEM is based on the register
+ NP_REG and optionally has a positive offset. */
static bool
-trapping_loads_p (rtx insn)
+harmless_null_pointer_p (rtx mem, int np_reg)
{
- rtx pat = PATTERN (insn);
- if (GET_CODE (pat) == SEQUENCE)
+ mem = XEXP (mem, 0);
+ if (GET_CODE (mem) == POST_INC || GET_CODE (mem) == POST_DEC)
+ mem = XEXP (mem, 0);
+ if (REG_P (mem) && REGNO (mem) == np_reg)
+ return true;
+ if (GET_CODE (mem) == PLUS
+ && REG_P (XEXP (mem, 0)) && REGNO (XEXP (mem, 0)) == np_reg)
{
- enum attr_type t;
- t = get_attr_type (XVECEXP (pat, 0, 1));
- if (t == TYPE_MCLD
- && may_trap_p (SET_SRC (PATTERN (XVECEXP (pat, 0, 1)))))
- return true;
- t = get_attr_type (XVECEXP (pat, 0, 2));
- if (t == TYPE_MCLD
- && may_trap_p (SET_SRC (PATTERN (XVECEXP (pat, 0, 2)))))
+ mem = XEXP (mem, 1);
+ if (GET_CODE (mem) == CONST_INT && INTVAL (mem) > 0)
return true;
- return false;
}
- else
- return may_trap_p (SET_SRC (single_set (insn)));
+ return false;
+}
+
+/* Return nonzero if INSN contains any loads that may trap. */
+
+static bool
+trapping_loads_p (rtx insn, int np_reg, bool after_np_branch)
+{
+ rtx pat = PATTERN (insn);
+ rtx mem = SET_SRC (single_set (insn));
+
+ if (!after_np_branch)
+ np_reg = -1;
+ return ((np_reg == -1 || !harmless_null_pointer_p (mem, np_reg))
+ && may_trap_p (mem));
}
/* Return INSN if it is of TYPE_MCLD. Alternatively, if INSN is the start of
@@ -5033,6 +5108,24 @@ indirect_call_p (rtx pat)
return REG_P (pat);
}
+/* During workaround_speculation, track whether we're in the shadow of a
+ conditional branch that tests a P register for NULL. If so, we can omit
+ emitting NOPs if we see a load from that P register, since a speculative
+ access at address 0 isn't a problem, and the load is executed in all other
+ cases anyway.
+ Global for communication with note_np_check_stores through note_stores.
+ */
+int np_check_regno = -1;
+bool np_after_branch = false;
+
+/* Subroutine of workaround_speculation, called through note_stores. */
+static void
+note_np_check_stores (rtx x, const_rtx pat, void *data ATTRIBUTE_UNUSED)
+{
+ if (REG_P (x) && (REGNO (x) == REG_CC || REGNO (x) == np_check_regno))
+ np_check_regno = -1;
+}
+
static void
workaround_speculation (void)
{
@@ -5054,17 +5147,38 @@ workaround_speculation (void)
next = find_next_insn_start (insn);
- if (NOTE_P (insn) || BARRIER_P (insn) || LABEL_P (insn))
+ if (NOTE_P (insn) || BARRIER_P (insn))
continue;
+ if (LABEL_P (insn))
+ {
+ np_check_regno = -1;
+ continue;
+ }
+
pat = PATTERN (insn);
if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER
- || GET_CODE (pat) == ASM_INPUT || GET_CODE (pat) == ADDR_VEC
- || GET_CODE (pat) == ADDR_DIFF_VEC || asm_noperands (pat) >= 0)
+ || GET_CODE (pat) == ADDR_VEC || GET_CODE (pat) == ADDR_DIFF_VEC)
continue;
+
+ if (GET_CODE (pat) == ASM_INPUT || asm_noperands (pat) >= 0)
+ {
+ np_check_regno = -1;
+ continue;
+ }
if (JUMP_P (insn))
{
+ /* Is this a condjump based on a null pointer comparison we saw
+ earlier? */
+ if (np_check_regno != -1
+ && recog_memoized (insn) == CODE_FOR_cbranchbi4)
+ {
+ rtx op = XEXP (SET_SRC (PATTERN (insn)), 0);
+ gcc_assert (GET_CODE (op) == EQ || GET_CODE (op) == NE);
+ if (GET_CODE (op) == NE)
+ np_after_branch = true;
+ }
if (any_condjump_p (insn)
&& ! cbranch_predicted_taken_p (insn))
{
@@ -5077,6 +5191,7 @@ workaround_speculation (void)
}
else if (CALL_P (insn))
{
+ np_check_regno = -1;
if (cycles_since_jump < INT_MAX)
cycles_since_jump++;
if (indirect_call_p (pat) && ENABLE_WA_INDIRECT_CALLS)
@@ -5092,13 +5207,44 @@ workaround_speculation (void)
if (cycles_since_jump < INT_MAX)
cycles_since_jump++;
+ /* Detect a comparison of a P register with zero. If we later
+ see a condjump based on it, we have found a null pointer
+ check. */
+ if (recog_memoized (insn) == CODE_FOR_compare_eq)
+ {
+ rtx src = SET_SRC (PATTERN (insn));
+ if (REG_P (XEXP (src, 0))
+ && P_REGNO_P (REGNO (XEXP (src, 0)))
+ && XEXP (src, 1) == const0_rtx)
+ {
+ np_check_regno = REGNO (XEXP (src, 0));
+ np_after_branch = false;
+ }
+ else
+ np_check_regno = -1;
+ }
+
if (load_insn && ENABLE_WA_SPECULATIVE_LOADS)
{
- if (trapping_loads_p (load_insn))
+ if (trapping_loads_p (load_insn, np_check_regno,
+ np_after_branch))
delay_needed = 4;
}
else if (type == TYPE_SYNC && ENABLE_WA_SPECULATIVE_SYNCS)
delay_needed = 3;
+
+ /* See if we need to forget about a null pointer comparison
+ we found earlier. */
+ if (recog_memoized (insn) != CODE_FOR_compare_eq)
+ {
+ note_stores (PATTERN (insn), note_np_check_stores, NULL);
+ if (np_check_regno != -1)
+ {
+ if (find_regno_note (insn, REG_INC, np_check_regno))
+ np_check_regno = -1;
+ }
+ }
+
}
if (delay_needed > cycles_since_jump
@@ -5176,7 +5322,7 @@ workaround_speculation (void)
if (load_insn && ENABLE_WA_SPECULATIVE_LOADS)
{
- if (trapping_loads_p (load_insn))
+ if (trapping_loads_p (load_insn, -1, false))
delay_needed = 2;
}
else if (type == TYPE_SYNC && ENABLE_WA_SPECULATIVE_SYNCS)
@@ -5214,6 +5360,65 @@ workaround_speculation (void)
}
}
+/* Called just before the final scheduling pass. If we need to insert NOPs
+ later on to work around speculative loads, insert special placeholder
+ insns that cause loads to be delayed for as many cycles as necessary
+ (and possible). This reduces the number of NOPs we need to add.
+ The dummy insns we generate are later removed by bfin_gen_bundles. */
+static void
+add_sched_insns_for_speculation (void)
+{
+ rtx insn;
+
+ if (! ENABLE_WA_SPECULATIVE_LOADS && ! ENABLE_WA_SPECULATIVE_SYNCS
+ && ! ENABLE_WA_INDIRECT_CALLS)
+ return;
+
+ /* First pass: find predicted-false branches; if something after them
+ needs nops, insert them or change the branch to predict true. */
+ for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
+ {
+ rtx pat;
+
+ if (NOTE_P (insn) || BARRIER_P (insn) || LABEL_P (insn))
+ continue;
+
+ pat = PATTERN (insn);
+ if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER
+ || GET_CODE (pat) == ASM_INPUT || GET_CODE (pat) == ADDR_VEC
+ || GET_CODE (pat) == ADDR_DIFF_VEC || asm_noperands (pat) >= 0)
+ continue;
+
+ if (JUMP_P (insn))
+ {
+ if (any_condjump_p (insn)
+ && !cbranch_predicted_taken_p (insn))
+ {
+ rtx n = next_real_insn (insn);
+ emit_insn_before (gen_stall (GEN_INT (3)), n);
+ }
+ }
+ }
+
+ /* Second pass: for predicted-true branches, see if anything at the
+ branch destination needs extra nops. */
+ for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
+ {
+ if (JUMP_P (insn)
+ && any_condjump_p (insn)
+ && (cbranch_predicted_taken_p (insn)))
+ {
+ rtx target = JUMP_LABEL (insn);
+ rtx next = next_real_insn (target);
+
+ if (GET_CODE (PATTERN (next)) == UNSPEC_VOLATILE
+ && get_attr_type (next) == TYPE_STALL)
+ continue;
+ emit_insn_before (gen_stall (GEN_INT (1)), next);
+ }
+ }
+}
+
/* We use the machine specific reorg pass for emitting CSYNC instructions
after conditional branches as needed.
@@ -5247,6 +5452,8 @@ bfin_reorg (void)
split_all_insns ();
splitting_for_sched = 0;
+ add_sched_insns_for_speculation ();
+
timevar_push (TV_SCHED2);
schedule_insns ();
timevar_pop (TV_SCHED2);
diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h
index a9ff6fa8b47..34032b28225 100644
--- a/gcc/config/bfin/bfin.h
+++ b/gcc/config/bfin/bfin.h
@@ -26,6 +26,49 @@
#define BRT 1
#define BRF 0
+/* CPU type. */
+typedef enum bfin_cpu_type
+{
+ BFIN_CPU_UNKNOWN,
+ BFIN_CPU_BF512,
+ BFIN_CPU_BF514,
+ BFIN_CPU_BF516,
+ BFIN_CPU_BF518,
+ BFIN_CPU_BF522,
+ BFIN_CPU_BF523,
+ BFIN_CPU_BF524,
+ BFIN_CPU_BF525,
+ BFIN_CPU_BF526,
+ BFIN_CPU_BF527,
+ BFIN_CPU_BF531,
+ BFIN_CPU_BF532,
+ BFIN_CPU_BF533,
+ BFIN_CPU_BF534,
+ BFIN_CPU_BF536,
+ BFIN_CPU_BF537,
+ BFIN_CPU_BF538,
+ BFIN_CPU_BF539,
+ BFIN_CPU_BF542,
+ BFIN_CPU_BF542M,
+ BFIN_CPU_BF544,
+ BFIN_CPU_BF544M,
+ BFIN_CPU_BF547,
+ BFIN_CPU_BF547M,
+ BFIN_CPU_BF548,
+ BFIN_CPU_BF548M,
+ BFIN_CPU_BF549,
+ BFIN_CPU_BF549M,
+ BFIN_CPU_BF561
+} bfin_cpu_t;
+
+/* Value of -mcpu= */
+extern bfin_cpu_t bfin_cpu_type;
+
+/* Value of -msi-revision= */
+extern int bfin_si_revision;
+
+extern unsigned int bfin_workarounds;
+
/* Print subsidiary information on the compiler version in use. */
#define TARGET_VERSION fprintf (stderr, " (BlackFin bfin)")
@@ -109,22 +152,32 @@ extern int target_flags;
case BFIN_CPU_BF539: \
builtin_define ("__ADSPBF539__"); \
break; \
+ case BFIN_CPU_BF542M: \
+ builtin_define ("__ADSPBF542M__"); \
case BFIN_CPU_BF542: \
builtin_define ("__ADSPBF542__"); \
builtin_define ("__ADSPBF54x__"); \
break; \
+ case BFIN_CPU_BF544M: \
+ builtin_define ("__ADSPBF544M__"); \
case BFIN_CPU_BF544: \
builtin_define ("__ADSPBF544__"); \
builtin_define ("__ADSPBF54x__"); \
break; \
- case BFIN_CPU_BF548: \
- builtin_define ("__ADSPBF548__"); \
- builtin_define ("__ADSPBF54x__"); \
- break; \
+ case BFIN_CPU_BF547M: \
+ builtin_define ("__ADSPBF547M__"); \
case BFIN_CPU_BF547: \
builtin_define ("__ADSPBF547__"); \
builtin_define ("__ADSPBF54x__"); \
break; \
+ case BFIN_CPU_BF548M: \
+ builtin_define ("__ADSPBF548M__"); \
+ case BFIN_CPU_BF548: \
+ builtin_define ("__ADSPBF548__"); \
+ builtin_define ("__ADSPBF54x__"); \
+ break; \
+ case BFIN_CPU_BF549M: \
+ builtin_define ("__ADSPBF549M__"); \
case BFIN_CPU_BF549: \
builtin_define ("__ADSPBF549__"); \
builtin_define ("__ADSPBF54x__"); \
@@ -794,6 +847,7 @@ enum reg_class
typedef enum {
SUBROUTINE, INTERRUPT_HANDLER, EXCPT_HANDLER, NMI_HANDLER
} e_funkind;
+#define FUNCTION_RETURN_REGISTERS { REG_RETS, REG_RETI, REG_RETX, REG_RETN }
#define FUNCTION_ARG_REGISTERS { REG_R0, REG_R1, REG_R2, -1 }
@@ -1258,4 +1312,8 @@ extern int splitting_for_sched, splitting_loops;
#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) ((CHAR) == '!')
+#ifndef TARGET_SUPPORTS_SYNC_CALLS
+#define TARGET_SUPPORTS_SYNC_CALLS 0
+#endif
+
#endif /* _BFIN_CONFIG */
diff --git a/gcc/config/bfin/bfin.md b/gcc/config/bfin/bfin.md
index a3638700a53..74c7a0a6f60 100644
--- a/gcc/config/bfin/bfin.md
+++ b/gcc/config/bfin/bfin.md
@@ -138,14 +138,16 @@
;; Distinguish a 32-bit version of an insn from a 16-bit version.
(UNSPEC_32BIT 11)
(UNSPEC_NOP 12)
- (UNSPEC_ONES 12)])
+ (UNSPEC_ONES 13)
+ (UNSPEC_ATOMIC 14)])
(define_constants
[(UNSPEC_VOLATILE_CSYNC 1)
(UNSPEC_VOLATILE_SSYNC 2)
(UNSPEC_VOLATILE_LOAD_FUNCDESC 3)
(UNSPEC_VOLATILE_STORE_EH_HANDLER 4)
- (UNSPEC_VOLATILE_DUMMY 5)])
+ (UNSPEC_VOLATILE_DUMMY 5)
+ (UNSPEC_VOLATILE_STALL 6)])
(define_constants
[(MACFLAG_NONE 0)
@@ -162,28 +164,42 @@
(MACFLAG_IH 11)])
(define_attr "type"
- "move,movcc,mvi,mcld,mcst,dsp32,mult,alu0,shft,brcc,br,call,misc,sync,compare,dummy"
+ "move,movcc,mvi,mcld,mcst,dsp32,dsp32shiftimm,mult,alu0,shft,brcc,br,call,misc,sync,compare,dummy,stall"
(const_string "misc"))
-(define_attr "addrtype" "32bit,preg,ireg"
+(define_attr "addrtype" "32bit,preg,spreg,ireg"
(cond [(and (eq_attr "type" "mcld")
- (and (match_operand 0 "d_register_operand" "")
+ (and (match_operand 0 "dp_register_operand" "")
(match_operand 1 "mem_p_address_operand" "")))
(const_string "preg")
(and (eq_attr "type" "mcld")
- (and (match_operand 0 "d_register_operand" "")
+ (and (match_operand 0 "dp_register_operand" "")
+ (match_operand 1 "mem_spfp_address_operand" "")))
+ (const_string "spreg")
+ (and (eq_attr "type" "mcld")
+ (and (match_operand 0 "dp_register_operand" "")
(match_operand 1 "mem_i_address_operand" "")))
(const_string "ireg")
(and (eq_attr "type" "mcst")
- (and (match_operand 1 "d_register_operand" "")
+ (and (match_operand 1 "dp_register_operand" "")
(match_operand 0 "mem_p_address_operand" "")))
(const_string "preg")
(and (eq_attr "type" "mcst")
- (and (match_operand 1 "d_register_operand" "")
+ (and (match_operand 1 "dp_register_operand" "")
+ (match_operand 0 "mem_spfp_address_operand" "")))
+ (const_string "spreg")
+ (and (eq_attr "type" "mcst")
+ (and (match_operand 1 "dp_register_operand" "")
(match_operand 0 "mem_i_address_operand" "")))
(const_string "ireg")]
(const_string "32bit")))
+(define_attr "storereg" "preg,other"
+ (cond [(and (eq_attr "type" "mcst")
+ (match_operand 1 "p_register_operand" ""))
+ (const_string "preg")]
+ (const_string "other")))
+
;; Scheduling definitions
(define_automaton "bfin")
@@ -198,6 +214,13 @@
(define_cpu_unit "store" "bfin")
(define_cpu_unit "pregs" "bfin")
+;; A dummy unit used to delay scheduling of loads after a conditional
+;; branch.
+(define_cpu_unit "load" "bfin")
+
+;; A logical unit used to work around anomaly 05000074.
+(define_cpu_unit "anomaly_05000074" "bfin")
+
(define_reservation "core" "slot0+slot1+slot2")
(define_insn_reservation "alu" 1
@@ -212,20 +235,37 @@
(eq_attr "type" "dsp32")
"slot0")
+(define_insn_reservation "dsp32shiftimm" 1
+ (and (eq_attr "type" "dsp32shiftimm")
+ (eq (symbol_ref "ENABLE_WA_05000074")
+ (const_int 0)))
+ "slot0")
+
+(define_insn_reservation "dsp32shiftimm_anomaly_05000074" 1
+ (and (eq_attr "type" "dsp32shiftimm")
+ (ne (symbol_ref "ENABLE_WA_05000074")
+ (const_int 0)))
+ "slot0+anomaly_05000074")
+
(define_insn_reservation "load32" 1
(and (not (eq_attr "seq_insns" "multi"))
(and (eq_attr "type" "mcld") (eq_attr "addrtype" "32bit")))
- "core")
+ "core+load")
(define_insn_reservation "loadp" 1
(and (not (eq_attr "seq_insns" "multi"))
(and (eq_attr "type" "mcld") (eq_attr "addrtype" "preg")))
- "(slot1|slot2)+pregs")
+ "slot1+pregs+load")
+
+(define_insn_reservation "loadsp" 1
+ (and (not (eq_attr "seq_insns" "multi"))
+ (and (eq_attr "type" "mcld") (eq_attr "addrtype" "spreg")))
+ "slot1+pregs")
(define_insn_reservation "loadi" 1
(and (not (eq_attr "seq_insns" "multi"))
(and (eq_attr "type" "mcld") (eq_attr "addrtype" "ireg")))
- "(slot1|slot2)")
+ "(slot1|slot2)+load")
(define_insn_reservation "store32" 1
(and (not (eq_attr "seq_insns" "multi"))
@@ -233,19 +273,55 @@
"core")
(define_insn_reservation "storep" 1
- (and (not (eq_attr "seq_insns" "multi"))
- (and (eq_attr "type" "mcst") (eq_attr "addrtype" "preg")))
- "(slot1|slot2)+pregs+store")
+ (and (and (not (eq_attr "seq_insns" "multi"))
+ (and (eq_attr "type" "mcst")
+ (ior (eq_attr "addrtype" "preg")
+ (eq_attr "addrtype" "spreg"))))
+ (ior (eq (symbol_ref "ENABLE_WA_05000074")
+ (const_int 0))
+ (eq_attr "storereg" "other")))
+ "slot1+pregs+store")
+
+(define_insn_reservation "storep_anomaly_05000074" 1
+ (and (and (not (eq_attr "seq_insns" "multi"))
+ (and (eq_attr "type" "mcst")
+ (ior (eq_attr "addrtype" "preg")
+ (eq_attr "addrtype" "spreg"))))
+ (and (ne (symbol_ref "ENABLE_WA_05000074")
+ (const_int 0))
+ (eq_attr "storereg" "preg")))
+ "slot1+anomaly_05000074+pregs+store")
(define_insn_reservation "storei" 1
- (and (not (eq_attr "seq_insns" "multi"))
- (and (eq_attr "type" "mcst") (eq_attr "addrtype" "ireg")))
+ (and (and (not (eq_attr "seq_insns" "multi"))
+ (and (eq_attr "type" "mcst") (eq_attr "addrtype" "ireg")))
+ (ior (eq (symbol_ref "ENABLE_WA_05000074")
+ (const_int 0))
+ (eq_attr "storereg" "other")))
"(slot1|slot2)+store")
+(define_insn_reservation "storei_anomaly_05000074" 1
+ (and (and (not (eq_attr "seq_insns" "multi"))
+ (and (eq_attr "type" "mcst") (eq_attr "addrtype" "ireg")))
+ (and (ne (symbol_ref "ENABLE_WA_05000074")
+ (const_int 0))
+ (eq_attr "storereg" "preg")))
+ "((slot1+anomaly_05000074)|slot2)+store")
+
(define_insn_reservation "multi" 2
(eq_attr "seq_insns" "multi")
"core")
+(define_insn_reservation "load_stall1" 1
+ (and (eq_attr "type" "stall")
+ (match_operand 0 "const1_operand" ""))
+ "core+load*2")
+
+(define_insn_reservation "load_stall3" 1
+ (and (eq_attr "type" "stall")
+ (match_operand 0 "const3_operand" ""))
+ "core+load*4")
+
(absence_set "slot0" "slot1,slot2")
(absence_set "slot1" "slot2")
@@ -302,6 +378,7 @@
(eq_attr "type" "move") (const_int 2)
(eq_attr "type" "dsp32") (const_int 4)
+ (eq_attr "type" "dsp32shiftimm") (const_int 4)
(eq_attr "type" "call") (const_int 4)
(eq_attr "type" "br")
@@ -555,7 +632,7 @@
"@
%0 = ROT %1 BY 0%!
%0 = %0 -|- %0%!"
- [(set_attr "type" "dsp32")])
+ [(set_attr "type" "dsp32shiftimm,dsp32")])
(define_split
[(set (match_operand:SI 0 "d_register_operand" "")
@@ -678,7 +755,7 @@
"@
%d0 = %h1 << 0%!
%d0 = %1;"
- [(set_attr "type" "dsp32,mvi")])
+ [(set_attr "type" "dsp32shiftimm,mvi")])
(define_expand "insv"
[(set (zero_extract:SI (match_operand:SI 0 "register_operand" "")
@@ -1588,7 +1665,7 @@
[(set (match_dup 0) (ashift:SI (match_dup 1) (const_int 2)))
(set (match_dup 0) (ashift:SI (match_dup 0) (match_dup 3)))]
"operands[3] = GEN_INT (INTVAL (operands[2]) - 2);"
- [(set_attr "type" "shft,dsp32,shft,shft,*")])
+ [(set_attr "type" "shft,dsp32shiftimm,shft,shft,*")])
(define_insn "ashrsi3"
[(set (match_operand:SI 0 "register_operand" "=d,d")
@@ -1598,7 +1675,7 @@
"@
%0 >>>= %2;
%0 = %1 >>> %2%!"
- [(set_attr "type" "shft,dsp32")])
+ [(set_attr "type" "shft,dsp32shiftimm")])
(define_insn "rotl16"
[(set (match_operand:SI 0 "register_operand" "=d")
@@ -1639,7 +1716,7 @@
(zero_extract:BI (match_dup 1) (const_int 1) (const_int 0)))]
""
"%0 = ROT %1 BY -1%!"
- [(set_attr "type" "dsp32")])
+ [(set_attr "type" "dsp32shiftimm")])
(define_insn "rol_one"
[(set (match_operand:SI 0 "register_operand" "+d")
@@ -1649,7 +1726,7 @@
(zero_extract:BI (match_dup 1) (const_int 31) (const_int 0)))]
""
"%0 = ROT %1 BY 1%!"
- [(set_attr "type" "dsp32")])
+ [(set_attr "type" "dsp32shiftimm")])
(define_expand "lshrdi3"
[(set (match_operand:DI 0 "register_operand" "")
@@ -1724,7 +1801,7 @@
%0 >>= %2;
%0 = %1 >> %2%!
%0 = %1 >> %2;"
- [(set_attr "type" "shft,dsp32,shft")])
+ [(set_attr "type" "shft,dsp32shiftimm,shft")])
(define_insn "lshrpdi3"
[(set (match_operand:PDI 0 "register_operand" "=e")
@@ -1732,7 +1809,7 @@
(match_operand:SI 2 "nonmemory_operand" "Ku5")))]
""
"%0 = %1 >> %2%!"
- [(set_attr "type" "dsp32")])
+ [(set_attr "type" "dsp32shiftimm")])
(define_insn "ashrpdi3"
[(set (match_operand:PDI 0 "register_operand" "=e")
@@ -1740,7 +1817,7 @@
(match_operand:SI 2 "nonmemory_operand" "Ku5")))]
""
"%0 = %1 >>> %2%!"
- [(set_attr "type" "dsp32")])
+ [(set_attr "type" "dsp32shiftimm")])
;; A pattern to reload the equivalent of
;; (set (Dreg) (plus (FP) (large_constant)))
@@ -2005,7 +2082,8 @@
[(call (mem:SI (match_operand:SI 0 "symbol_ref_operand" "Q"))
(match_operand 1 "general_operand" "g"))
(use (match_operand:SI 2 "register_operand" "Z"))
- (use (match_operand 3 "" ""))]
+ (use (match_operand 3 "" ""))
+ (clobber (reg:SI REG_RETS))]
"! SIBLING_CALL_P (insn)
&& GET_CODE (operands[0]) == SYMBOL_REF
&& !bfin_longcall_p (operands[0], INTVAL (operands[3]))"
@@ -2031,7 +2109,8 @@
(call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "Q"))
(match_operand 2 "general_operand" "g")))
(use (match_operand:SI 3 "register_operand" "Z"))
- (use (match_operand 4 "" ""))]
+ (use (match_operand 4 "" ""))
+ (clobber (reg:SI REG_RETS))]
"! SIBLING_CALL_P (insn)
&& GET_CODE (operands[1]) == SYMBOL_REF
&& !bfin_longcall_p (operands[1], INTVAL (operands[4]))"
@@ -2057,7 +2136,8 @@
[(call (mem:SI (match_operand:SI 0 "register_no_elim_operand" "Y"))
(match_operand 1 "general_operand" "g"))
(use (match_operand:SI 2 "register_operand" "Z"))
- (use (match_operand 3 "" ""))]
+ (use (match_operand 3 "" ""))
+ (clobber (reg:SI REG_RETS))]
"! SIBLING_CALL_P (insn)"
"call (%0);"
[(set_attr "type" "call")
@@ -2079,7 +2159,8 @@
(call (mem:SI (match_operand:SI 1 "register_no_elim_operand" "Y"))
(match_operand 2 "general_operand" "g")))
(use (match_operand:SI 3 "register_operand" "Z"))
- (use (match_operand 4 "" ""))]
+ (use (match_operand 4 "" ""))
+ (clobber (reg:SI REG_RETS))]
"! SIBLING_CALL_P (insn)"
"call (%1);"
[(set_attr "type" "call")
@@ -2100,7 +2181,8 @@
(define_insn "*call_symbol"
[(call (mem:SI (match_operand:SI 0 "symbol_ref_operand" "Q"))
(match_operand 1 "general_operand" "g"))
- (use (match_operand 2 "" ""))]
+ (use (match_operand 2 "" ""))
+ (clobber (reg:SI REG_RETS))]
"! SIBLING_CALL_P (insn)
&& (!TARGET_ID_SHARED_LIBRARY || TARGET_LEAF_ID_SHARED_LIBRARY)
&& GET_CODE (operands[0]) == SYMBOL_REF
@@ -2126,7 +2208,8 @@
[(set (match_operand 0 "register_operand" "=d")
(call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "Q"))
(match_operand 2 "general_operand" "g")))
- (use (match_operand 3 "" ""))]
+ (use (match_operand 3 "" ""))
+ (clobber (reg:SI REG_RETS))]
"! SIBLING_CALL_P (insn)
&& (!TARGET_ID_SHARED_LIBRARY || TARGET_LEAF_ID_SHARED_LIBRARY)
&& GET_CODE (operands[1]) == SYMBOL_REF
@@ -2152,7 +2235,8 @@
(define_insn "*call_insn"
[(call (mem:SI (match_operand:SI 0 "register_no_elim_operand" "a"))
(match_operand 1 "general_operand" "g"))
- (use (match_operand 2 "" ""))]
+ (use (match_operand 2 "" ""))
+ (clobber (reg:SI REG_RETS))]
"! SIBLING_CALL_P (insn)"
"call (%0);"
[(set_attr "type" "call")
@@ -2172,7 +2256,8 @@
[(set (match_operand 0 "register_operand" "=d")
(call (mem:SI (match_operand:SI 1 "register_no_elim_operand" "a"))
(match_operand 2 "general_operand" "g")))
- (use (match_operand 3 "" ""))]
+ (use (match_operand 3 "" ""))
+ (clobber (reg:SI REG_RETS))]
"! SIBLING_CALL_P (insn)"
"call (%1);"
[(set_attr "type" "call")
@@ -2641,23 +2726,26 @@
(define_insn "return_internal"
[(return)
- (unspec [(match_operand 0 "immediate_operand" "i")] UNSPEC_RETURN)]
+ (use (match_operand 0 "register_operand" ""))]
"reload_completed"
{
- switch (INTVAL (operands[0]))
+ switch (REGNO (operands[0]))
{
- case EXCPT_HANDLER:
+ case REG_RETX:
return "rtx;";
- case NMI_HANDLER:
+ case REG_RETN:
return "rtn;";
- case INTERRUPT_HANDLER:
+ case REG_RETI:
return "rti;";
- case SUBROUTINE:
+ case REG_RETS:
return "rts;";
}
gcc_unreachable ();
})
+;; When used at a location where CC contains 1, causes a speculative load
+;; that is later cancelled. This is used for certain workarounds in
+;; interrupt handler prologues.
(define_insn "dummy_load"
[(unspec_volatile [(match_operand 0 "register_operand" "a")
(match_operand 1 "register_operand" "C")]
@@ -2668,6 +2756,17 @@
(set_attr "length" "4")
(set_attr "seq_insns" "multi")])
+;; A placeholder insn inserted before the final scheduling pass. It is used
+;; to improve scheduling of loads when workarounds for speculative loads are
+;; needed, by not placing them in the first few cycles after a conditional
+;; branch.
+(define_insn "stall"
+ [(unspec_volatile [(match_operand 0 "const_int_operand" "P1P3")]
+ UNSPEC_VOLATILE_STALL)]
+ ""
+ ""
+ [(set_attr "type" "stall")])
+
(define_insn "csync"
[(unspec_volatile [(const_int 0)] UNSPEC_VOLATILE_CSYNC)]
""
@@ -2707,7 +2806,7 @@
(parallel [(const_int 1)]))))]
""
"%h0 = %h2 << 0%!"
- [(set_attr "type" "dsp32")])
+ [(set_attr "type" "dsp32shiftimm")])
(define_insn "movhiv2hi_high"
[(set (match_operand:V2HI 0 "register_operand" "=d")
@@ -2717,7 +2816,7 @@
(match_operand:HI 2 "register_operand" "d")))]
""
"%d0 = %h2 << 0%!"
- [(set_attr "type" "dsp32")])
+ [(set_attr "type" "dsp32shiftimm")])
;; No earlyclobber on alternative two since our sequence ought to be safe.
;; The order of operands is intentional to match the VDSP builtin (high word
@@ -2740,7 +2839,7 @@
(match_dup 2)
(vec_select:HI (match_dup 0) (parallel [(const_int 1)]))))]
""
- [(set_attr "type" "dsp32")])
+ [(set_attr "type" "dsp32shiftimm")])
; Like composev2hi, but operating on elements of V2HI vectors.
; Useful on its own, and as a combiner bridge for the multiply and
@@ -2763,7 +2862,7 @@
%0 = PACK (%h2,%d1)%!
%0 = PACK (%d2,%h1)%!
%0 = PACK (%d2,%d1)%!"
- [(set_attr "type" "dsp32")])
+ [(set_attr "type" "dsp32shiftimm,dsp32shiftimm,dsp32shiftimm,dsp32shiftimm,dsp32,dsp32,dsp32,dsp32")])
(define_insn "movv2hi_hi"
[(set (match_operand:HI 0 "register_operand" "=d,d,d")
@@ -2774,7 +2873,7 @@
/* optimized out */
%h0 = %h1 << 0%!
%h0 = %d1 << 0%!"
- [(set_attr "type" "dsp32")])
+ [(set_attr "type" "dsp32shiftimm")])
(define_expand "movv2hi_hi_low"
[(set (match_operand:HI 0 "register_operand" "")
@@ -4038,7 +4137,7 @@
%0 = ASHIFT %1 BY %h2 (V, S)%!
%0 = %1 << %2 (V,S)%!
%0 = %1 >>> %N2 (V,S)%!"
- [(set_attr "type" "dsp32")])
+ [(set_attr "type" "dsp32,dsp32shiftimm,dsp32shiftimm")])
(define_insn "ssashifthi3"
[(set (match_operand:HI 0 "register_operand" "=d,d,d")
@@ -4052,7 +4151,7 @@
%0 = ASHIFT %1 BY %h2 (V, S)%!
%0 = %1 << %2 (V,S)%!
%0 = %1 >>> %N2 (V,S)%!"
- [(set_attr "type" "dsp32")])
+ [(set_attr "type" "dsp32,dsp32shiftimm,dsp32shiftimm")])
(define_insn "ssashiftsi3"
[(set (match_operand:SI 0 "register_operand" "=d,d,d")
@@ -4066,7 +4165,7 @@
%0 = ASHIFT %1 BY %h2 (S)%!
%0 = %1 << %2 (S)%!
%0 = %1 >>> %N2 (S)%!"
- [(set_attr "type" "dsp32")])
+ [(set_attr "type" "dsp32,dsp32shiftimm,dsp32shiftimm")])
(define_insn "lshiftv2hi3"
[(set (match_operand:V2HI 0 "register_operand" "=d,d,d")
@@ -4080,7 +4179,7 @@
%0 = LSHIFT %1 BY %h2 (V)%!
%0 = %1 << %2 (V)%!
%0 = %1 >> %N2 (V)%!"
- [(set_attr "type" "dsp32")])
+ [(set_attr "type" "dsp32,dsp32shiftimm,dsp32shiftimm")])
(define_insn "lshifthi3"
[(set (match_operand:HI 0 "register_operand" "=d,d,d")
@@ -4094,7 +4193,7 @@
%0 = LSHIFT %1 BY %h2 (V)%!
%0 = %1 << %2 (V)%!
%0 = %1 >> %N2 (V)%!"
- [(set_attr "type" "dsp32")])
+ [(set_attr "type" "dsp32,dsp32shiftimm,dsp32shiftimm")])
;; Load without alignment exception (masking off low bits)
@@ -4106,3 +4205,5 @@
"DISALGNEXCPT || %0 = [%1];"
[(set_attr "type" "mcld")
(set_attr "length" "8")])
+
+(include "sync.md")
diff --git a/gcc/config/bfin/linux.h b/gcc/config/bfin/linux.h
index 5d576805e5b..5c716cd67f7 100644
--- a/gcc/config/bfin/linux.h
+++ b/gcc/config/bfin/linux.h
@@ -49,3 +49,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
%{static}} -init __init -fini __fini"
#define MD_UNWIND_SUPPORT "config/bfin/linux-unwind.h"
+
+#undef TARGET_SUPPORTS_SYNC_CALLS
+#define TARGET_SUPPORTS_SYNC_CALLS 1
diff --git a/gcc/config/bfin/predicates.md b/gcc/config/bfin/predicates.md
index bce725a7009..84bf5919509 100644
--- a/gcc/config/bfin/predicates.md
+++ b/gcc/config/bfin/predicates.md
@@ -59,6 +59,14 @@
(and (match_code "const_int")
(match_test "op == const0_rtx || op == const1_rtx")))
+(define_predicate "const1_operand"
+ (and (match_code "const_int")
+ (match_test "op == const1_rtx")))
+
+(define_predicate "const3_operand"
+ (and (match_code "const_int")
+ (match_test "INTVAL (op) == 3")))
+
(define_predicate "vec_shift_operand"
(ior (and (match_code "const_int")
(match_test "INTVAL (op) >= -16 && INTVAL (op) < 15"))
@@ -80,6 +88,14 @@
(and (match_code "reg")
(match_test "D_REGNO_P (REGNO (op))")))
+(define_predicate "p_register_operand"
+ (and (match_code "reg")
+ (match_test "P_REGNO_P (REGNO (op))")))
+
+(define_predicate "dp_register_operand"
+ (and (match_code "reg")
+ (match_test "D_REGNO_P (REGNO (op)) || P_REGNO_P (REGNO (op))")))
+
;; Return nonzero if OP is a LC register.
(define_predicate "lc_register_operand"
(and (match_code "reg")
@@ -180,10 +196,14 @@
(define_predicate "bfin_direct_comparison_operator"
(match_code "eq,lt,le,leu,ltu"))
-;; The following two are used to compute the addrtype attribute. They return
+;; The following three are used to compute the addrtype attribute. They return
;; true if passed a memory address usable for a 16-bit load or store using a
;; P or I register, respectively. If neither matches, we know we have a
;; 32-bit instruction.
+;; We subdivide the P case into normal P registers, and SP/FP. We can assume
+;; that speculative loads through SP and FP are no problem, so this has
+;; an effect on the anomaly workaround code.
+
(define_predicate "mem_p_address_operand"
(match_code "mem")
{
@@ -193,7 +213,19 @@
if (GET_CODE (op) == PLUS || GET_RTX_CLASS (GET_CODE (op)) == RTX_AUTOINC)
op = XEXP (op, 0);
gcc_assert (REG_P (op));
- return PREG_P (op);
+ return PREG_P (op) && op != stack_pointer_rtx && op != frame_pointer_rtx;
+})
+
+(define_predicate "mem_spfp_address_operand"
+ (match_code "mem")
+{
+ if (effective_address_32bit_p (op, mode))
+ return 0;
+ op = XEXP (op, 0);
+ if (GET_CODE (op) == PLUS || GET_RTX_CLASS (GET_CODE (op)) == RTX_AUTOINC)
+ op = XEXP (op, 0);
+ gcc_assert (REG_P (op));
+ return op == stack_pointer_rtx || op == frame_pointer_rtx;
})
(define_predicate "mem_i_address_operand"
diff --git a/gcc/config/bfin/sync.md b/gcc/config/bfin/sync.md
new file mode 100644
index 00000000000..7025af4979d
--- /dev/null
+++ b/gcc/config/bfin/sync.md
@@ -0,0 +1,178 @@
+;; GCC machine description for Blackfin synchronization instructions.
+;; Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+;; Contributed by Analog Devices.
+;;
+;; 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 3, 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 COPYING3. If not see
+;; <http://www.gnu.org/licenses/>.
+
+(define_code_iterator FETCHOP [plus minus ior and xor])
+(define_code_attr fetchop_name
+ [(plus "add") (minus "sub") (ior "ior") (and "and") (xor "xor")])
+(define_code_attr fetchop_addr
+ [(plus "1072") (minus "1088") (ior "1104") (and "1120") (xor "1136")])
+
+(define_insn "sync_<fetchop_name>si_internal"
+ [(set (mem:SI (match_operand:SI 0 "register_operand" "qA"))
+ (unspec:SI
+ [(FETCHOP:SI (mem:SI (match_dup 0))
+ (match_operand:SI 1 "register_operand" "q0"))
+ (match_operand:SI 2 "register_no_elim_operand" "a")]
+ UNSPEC_ATOMIC))
+ (clobber (match_scratch:SI 3 "=q0"))
+ (clobber (match_scratch:SI 4 "=q1"))
+ (clobber (reg:SI REG_RETS))]
+ "TARGET_SUPPORTS_SYNC_CALLS"
+ "call (%2);"
+ [(set_attr "type" "call")])
+
+(define_expand "sync_<fetchop_name>si"
+ [(parallel
+ [(set (match_operand:SI 0 "memory_operand" "+m")
+ (unspec:SI
+ [(FETCHOP:SI (match_dup 0)
+ (match_operand:SI 1 "register_operand" "q0"))
+ (match_dup 2)]
+ UNSPEC_ATOMIC))
+ (clobber (match_scratch:SI 3 ""))
+ (clobber (match_scratch:SI 4 ""))
+ (clobber (reg:SI REG_RETS))])]
+ "TARGET_SUPPORTS_SYNC_CALLS"
+{
+ if (!REG_P (XEXP (operands[0], 0)))
+ {
+ operands[0] = shallow_copy_rtx (operands[0]);
+ XEXP (operands[0], 0) = force_reg (Pmode, XEXP (operands[0], 0));
+ }
+ operands[2] = force_reg (Pmode, GEN_INT (<fetchop_addr>));
+})
+
+(define_insn "sync_old_<fetchop_name>si_internal"
+ [(set (match_operand:SI 0 "register_operand" "=q1")
+ (mem:SI (match_operand:SI 1 "register_operand" "qA")))
+ (set (mem:SI (match_dup 1))
+ (unspec:SI
+ [(FETCHOP:SI (mem:SI (match_dup 1))
+ (match_operand:SI 2 "register_operand" "q0"))
+ (match_operand:SI 3 "register_no_elim_operand" "a")]
+ UNSPEC_ATOMIC))
+ (clobber (match_scratch:SI 4 "=q0"))
+ (clobber (reg:SI REG_RETS))]
+ "TARGET_SUPPORTS_SYNC_CALLS"
+ "call (%3);"
+ [(set_attr "type" "call")])
+
+(define_expand "sync_old_<fetchop_name>si"
+ [(parallel
+ [(set (match_operand:SI 0 "register_operand" "")
+ (match_operand:SI 1 "memory_operand" ""))
+ (set (match_dup 1)
+ (unspec:SI
+ [(FETCHOP:SI (match_dup 1)
+ (match_operand:SI 2 "register_operand" ""))
+ (match_dup 3)]
+ UNSPEC_ATOMIC))
+ (clobber (match_scratch:SI 4 ""))
+ (clobber (reg:SI REG_RETS))])]
+ "TARGET_SUPPORTS_SYNC_CALLS"
+{
+ if (!REG_P (XEXP (operands[1], 0)))
+ {
+ operands[1] = shallow_copy_rtx (operands[1]);
+ XEXP (operands[1], 0) = force_reg (Pmode, XEXP (operands[1], 0));
+ }
+ operands[3] = force_reg (Pmode, GEN_INT (<fetchop_addr>));
+})
+
+(define_insn "sync_new_<fetchop_name>si_internal"
+ [(set (match_operand:SI 0 "register_operand" "=q0")
+ (unspec:SI
+ [(FETCHOP:SI
+ (mem:SI (match_operand:SI 1 "register_operand" "qA"))
+ (match_operand:SI 2 "register_operand" "q0"))
+ (match_operand:SI 3 "register_no_elim_operand" "a")]
+ UNSPEC_ATOMIC))
+ (set (mem:SI (match_dup 1))
+ (unspec:SI
+ [(FETCHOP:SI (mem:SI (match_dup 1)) (match_dup 2))
+ (match_dup 3)]
+ UNSPEC_ATOMIC))
+ (clobber (match_scratch:SI 4 "=q1"))
+ (clobber (reg:SI REG_RETS))]
+ "TARGET_SUPPORTS_SYNC_CALLS"
+ "call (%3);"
+ [(set_attr "type" "call")])
+
+(define_expand "sync_new_<fetchop_name>si"
+ [(parallel
+ [(set (match_operand:SI 0 "register_operand" "")
+ (unspec:SI
+ [(FETCHOP:SI (match_operand:SI 1 "memory_operand" "")
+ (match_operand:SI 2 "register_operand" ""))
+ (match_dup 3)]
+ UNSPEC_ATOMIC))
+ (set (match_dup 1)
+ (unspec:SI
+ [(FETCHOP:SI (match_dup 1) (match_dup 2))
+ (match_dup 3)]
+ UNSPEC_ATOMIC))
+ (clobber (match_scratch:SI 4 ""))
+ (clobber (reg:SI REG_RETS))])]
+ "TARGET_SUPPORTS_SYNC_CALLS"
+{
+ if (!REG_P (XEXP (operands[1], 0)))
+ {
+ operands[1] = shallow_copy_rtx (operands[1]);
+ XEXP (operands[1], 0) = force_reg (Pmode, XEXP (operands[1], 0));
+ }
+ operands[3] = force_reg (Pmode, GEN_INT (<fetchop_addr>));
+})
+
+(define_insn "sync_compare_and_swapsi_internal"
+ [(set (match_operand:SI 0 "register_operand" "=q0")
+ (mem:SI (match_operand:SI 1 "register_operand" "qA")))
+ (set (mem:SI (match_dup 1))
+ (unspec:SI
+ [(mem:SI (match_dup 1))
+ (match_operand:SI 2 "register_operand" "q1")
+ (match_operand:SI 3 "register_operand" "q2")
+ (match_operand:SI 4 "register_no_elim_operand" "a")]
+ UNSPEC_ATOMIC))
+ (clobber (reg:SI REG_RETS))]
+ "TARGET_SUPPORTS_SYNC_CALLS"
+ "call (%4);"
+ [(set_attr "type" "call")])
+
+(define_expand "sync_compare_and_swapsi"
+ [(parallel
+ [(set (match_operand:SI 0 "register_operand" "")
+ (match_operand:SI 1 "memory_operand" ""))
+ (set (match_dup 1)
+ (unspec:SI
+ [(match_dup 1)
+ (match_operand:SI 2 "register_operand" "")
+ (match_operand:SI 3 "register_operand" "")
+ (match_dup 4)]
+ UNSPEC_ATOMIC))
+ (clobber (reg:SI REG_RETS))])]
+ "TARGET_SUPPORTS_SYNC_CALLS"
+{
+ if (!REG_P (XEXP (operands[1], 0)))
+ {
+ operands[1] = shallow_copy_rtx (operands[1]);
+ XEXP (operands[1], 0) = force_reg (Pmode, XEXP (operands[1], 0));
+ }
+ operands[4] = force_reg (Pmode, GEN_INT (0x420));
+})
diff --git a/gcc/config/bfin/t-bfin-elf b/gcc/config/bfin/t-bfin-elf
index 87e00ade16b..39209f628ef 100644
--- a/gcc/config/bfin/t-bfin-elf
+++ b/gcc/config/bfin/t-bfin-elf
@@ -48,8 +48,15 @@ MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf531-none mcpu?bf532-none=mcpu?bf533-non
MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf534-none mcpu?bf532-none=mcpu?bf536-none
MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf537-none mcpu?bf532-none=mcpu?bf538-none
MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf539-none mcpu?bf532-none=mcpu?bf542-none
-MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf544-none mcpu?bf532-none=mcpu?bf547-none
-MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf548-none mcpu?bf532-none=mcpu?bf549-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf542m-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf544-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf544m-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf547-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf547m-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf548-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf548m-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf549-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf549m-none
MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf561-none
MULTILIB_EXCEPTIONS=mleaf-id-shared-library*
diff --git a/gcc/config/bfin/t-bfin-linux b/gcc/config/bfin/t-bfin-linux
index 3fbfb4947ce..f7ba9550128 100644
--- a/gcc/config/bfin/t-bfin-linux
+++ b/gcc/config/bfin/t-bfin-linux
@@ -47,8 +47,15 @@ MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf531-none mcpu?bf532-none=mcpu?bf533-non
MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf534-none mcpu?bf532-none=mcpu?bf536-none
MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf537-none mcpu?bf532-none=mcpu?bf538-none
MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf539-none mcpu?bf532-none=mcpu?bf542-none
-MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf544-none mcpu?bf532-none=mcpu?bf547-none
-MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf548-none mcpu?bf532-none=mcpu?bf549-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf542m-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf544-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf544m-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf547-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf547m-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf548-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf548m-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf549-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf549m-none
MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf561-none
SHLIB_MAPFILES=$(srcdir)/config/bfin/libgcc-bfin.ver
diff --git a/gcc/config/bfin/t-bfin-uclinux b/gcc/config/bfin/t-bfin-uclinux
index f0a8e913d5c..eb6d2253eb0 100644
--- a/gcc/config/bfin/t-bfin-uclinux
+++ b/gcc/config/bfin/t-bfin-uclinux
@@ -48,8 +48,15 @@ MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf531-none mcpu?bf532-none=mcpu?bf533-non
MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf534-none mcpu?bf532-none=mcpu?bf536-none
MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf537-none mcpu?bf532-none=mcpu?bf538-none
MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf539-none mcpu?bf532-none=mcpu?bf542-none
-MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf544-none mcpu?bf532-none=mcpu?bf547-none
-MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf548-none mcpu?bf532-none=mcpu?bf549-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf542m-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf544-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf544m-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf547-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf547m-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf548-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf548m-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf549-none
+MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf549m-none
MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf561-none
MULTILIB_EXCEPTIONS=mleaf-id-shared-library*
diff --git a/gcc/config/bfin/uclinux.h b/gcc/config/bfin/uclinux.h
index 80419da0fba..6001b23645b 100644
--- a/gcc/config/bfin/uclinux.h
+++ b/gcc/config/bfin/uclinux.h
@@ -36,3 +36,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
--wrap=mmap --wrap=munmap --wrap=alloca\
%{fmudflapth: --wrap=pthread_create\
}} %{fmudflap|fmudflapth: --wrap=main}"
+
+#undef TARGET_SUPPORTS_SYNC_CALLS
+#define TARGET_SUPPORTS_SYNC_CALLS 1
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index ccb5e2f1459..f8d77dd6cd0 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -7441,7 +7441,8 @@ ix86_can_use_return_insn_p (void)
return 0;
ix86_compute_frame_layout (&frame);
- return frame.to_allocate == 0 && (frame.nregs + frame.nsseregs) == 0;
+ return frame.to_allocate == 0 && frame.padding0 == 0
+ && (frame.nregs + frame.nsseregs) == 0;
}
/* Value should be nonzero if functions must have frame pointers.
@@ -8482,7 +8483,7 @@ ix86_expand_prologue (void)
&& (! TARGET_STACK_PROBE || allocate < CHECK_STACK_LIMIT)))
{
if (!frame_pointer_needed
- || !frame.to_allocate
+ || !(frame.to_allocate + frame.padding0)
|| crtl->stack_realign_needed)
ix86_emit_save_regs_using_mov (stack_pointer_rtx,
frame.to_allocate
@@ -8492,7 +8493,7 @@ ix86_expand_prologue (void)
-frame.nregs * UNITS_PER_WORD);
}
if (!frame_pointer_needed
- || !frame.to_allocate
+ || !(frame.to_allocate + frame.padding0)
|| crtl->stack_realign_needed)
ix86_emit_save_sse_regs_using_mov (stack_pointer_rtx,
frame.to_allocate);
@@ -8804,9 +8805,10 @@ ix86_expand_epilogue (int style)
if ((!sp_valid && (frame.nregs + frame.nsseregs) <= 1)
|| (TARGET_EPILOGUE_USING_MOVE
&& cfun->machine->use_fast_prologue_epilogue
- && ((frame.nregs + frame.nsseregs) > 1 || frame.to_allocate))
+ && ((frame.nregs + frame.nsseregs) > 1
+ || (frame.to_allocate + frame.padding0) != 0))
|| (frame_pointer_needed && !(frame.nregs + frame.nsseregs)
- && frame.to_allocate)
+ && (frame.to_allocate + frame.padding0) != 0)
|| (frame_pointer_needed && TARGET_USE_LEAVE
&& cfun->machine->use_fast_prologue_epilogue
&& (frame.nregs + frame.nsseregs) == 1)
@@ -8822,7 +8824,7 @@ ix86_expand_epilogue (int style)
be addressed by bp. sp must be used instead. */
if (!frame_pointer_needed
- || (sp_valid && !frame.to_allocate)
+ || (sp_valid && !(frame.to_allocate + frame.padding0))
|| stack_realign_fp)
{
ix86_emit_restore_sse_regs_using_mov (stack_pointer_rtx,
@@ -8952,7 +8954,7 @@ ix86_expand_epilogue (int style)
GEN_INT (frame.nsseregs * 16 + frame.padding0),
style, false);
}
- else if (frame.to_allocate || frame.nsseregs)
+ else if (frame.to_allocate || frame.padding0 || frame.nsseregs)
{
ix86_emit_restore_sse_regs_using_mov (stack_pointer_rtx,
frame.to_allocate, red_offset,
diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h
index e38418f7dcd..85840826674 100644
--- a/gcc/config/i386/mingw-w64.h
+++ b/gcc/config/i386/mingw-w64.h
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3. If not see
/* Enable multilib. */
#undef ASM_SPEC
-#define ASM_SPEC "%{v:-V} %{n} %{T} %{Ym,*} %{Yd,*} \
+#define ASM_SPEC "%{v:-v} %{n} %{T} %{Ym,*} %{Yd,*} \
%{Wa,*:%*} %{m32:--32} %{m64:--64}"
#if TARGET_64BIT_DEFAULT
diff --git a/gcc/config/ia64/unwind-ia64.c b/gcc/config/ia64/unwind-ia64.c
index 34258588292..f935a0ca3e4 100644
--- a/gcc/config/ia64/unwind-ia64.c
+++ b/gcc/config/ia64/unwind-ia64.c
@@ -2126,7 +2126,7 @@ uw_advance_context (struct _Unwind_Context *context, _Unwind_FrameState *fs)
uw_init_context_1 (CONTEXT, __builtin_ia64_bsp ()); \
} while (0)
-static void
+static void __attribute__((noinline))
uw_init_context_1 (struct _Unwind_Context *context, void *bsp)
{
void *rp = __builtin_extract_return_addr (__builtin_return_address (0));
diff --git a/gcc/config/m32c/m32c.h b/gcc/config/m32c/m32c.h
index dea5b55b71a..ee092a56525 100644
--- a/gcc/config/m32c/m32c.h
+++ b/gcc/config/m32c/m32c.h
@@ -48,12 +48,12 @@
thing when no CPU is specified, which defaults to R8C. */
#undef LIB_SPEC
#define LIB_SPEC "-( -lc %{msim*:-lsim}%{!msim*:-lnosys} -) \
-%{msim*:%{!T*: %{mcpu=m32cm:-Tsim24.ld}%{mcpu=m32c:-Tsim24.ld} \
- %{!mcpu=m32cm:%{!mcpu=m32c:-Tsim16.ld}}}} \
-%{!T*:%{!msim*: %{mcpu=m16c:-Tm16c.ld} \
- %{mcpu=m32cm:-Tm32cm.ld} \
- %{mcpu=m32c:-Tm32c.ld} \
- %{!mcpu=m16c:%{!mcpu=m32cm:%{!mcpu=m32c:-Tr8c.ld}}}}} \
+%{msim*:%{!T*: %{mcpu=m32cm:%Tsim24.ld}%{mcpu=m32c:%Tsim24.ld} \
+ %{!mcpu=m32cm:%{!mcpu=m32c:%Tsim16.ld}}}} \
+%{!T*:%{!msim*: %{mcpu=m16c:%Tm16c.ld} \
+ %{mcpu=m32cm:%Tm32cm.ld} \
+ %{mcpu=m32c:%Tm32c.ld} \
+ %{!mcpu=m16c:%{!mcpu=m32cm:%{!mcpu=m32c:%Tr8c.ld}}}}} \
"
/* Run-time Target Specification */
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c
index a473328254d..efed4b6caf6 100644
--- a/gcc/config/mep/mep.c
+++ b/gcc/config/mep/mep.c
@@ -3297,6 +3297,7 @@ const conversions[] =
{ 0, "m+ri", "3(2)" },
{ 0, "mr", "(1)" },
{ 0, "ms", "(1)" },
+ { 0, "ml", "(1)" },
{ 0, "mLrs", "%lo(3)(2)" },
{ 0, "mLr+si", "%lo(4+5)(2)" },
{ 0, "m+ru2s", "%tpoff(5)(2)" },
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 1e4d8bd8ed5..958abce0815 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -97,7 +97,7 @@ along with GCC; see the file COPYING3. If not see
/* True if INSN is a mips.md pattern or asm statement. */
#define USEFUL_INSN_P(INSN) \
- (INSN_P (INSN) \
+ (NONDEBUG_INSN_P (INSN) \
&& GET_CODE (PATTERN (INSN)) != USE \
&& GET_CODE (PATTERN (INSN)) != CLOBBER \
&& GET_CODE (PATTERN (INSN)) != ADDR_VEC \
@@ -8264,7 +8264,7 @@ mips16e_collect_argument_saves (void)
for (insn = get_insns (); insn; insn = next)
{
next = NEXT_INSN (insn);
- if (NOTE_P (insn))
+ if (NOTE_P (insn) || DEBUG_INSN_P (insn))
continue;
if (!INSN_P (insn))
@@ -11771,7 +11771,7 @@ static enum attr_type mips_last_74k_agen_insn = TYPE_UNKNOWN;
static void
mips_74k_agen_init (rtx insn)
{
- if (!insn || !NONJUMP_INSN_P (insn))
+ if (!insn || CALL_P (insn) || JUMP_P (insn))
mips_last_74k_agen_insn = TYPE_UNKNOWN;
else
{
@@ -13080,7 +13080,7 @@ mips16_lay_out_constants (void)
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
{
/* Rewrite constant pool references in INSN. */
- if (INSN_P (insn))
+ if (USEFUL_INSN_P (insn))
{
info.insn = insn;
info.pool = &pool;
@@ -13450,7 +13450,7 @@ r10k_insert_cache_barriers (void)
- the first instruction in an unprotected region otherwise. */
for (insn = BB_HEAD (bb); insn != end; insn = NEXT_INSN (insn))
{
- if (unprotected_region && INSN_P (insn))
+ if (unprotected_region && USEFUL_INSN_P (insn))
{
if (recog_memoized (insn) == CODE_FOR_mips_cache)
/* This CACHE instruction protects the following code. */
@@ -14113,7 +14113,7 @@ mips_reorg_process_insns (void)
/* Make a first pass over the instructions, recording all the LO_SUMs. */
for (insn = get_insns (); insn != 0; insn = NEXT_INSN (insn))
FOR_EACH_SUBINSN (subinsn, insn)
- if (INSN_P (subinsn))
+ if (USEFUL_INSN_P (subinsn))
for_each_rtx (&PATTERN (subinsn), mips_record_lo_sum, htab);
last_insn = 0;
@@ -14127,7 +14127,7 @@ mips_reorg_process_insns (void)
for (insn = get_insns (); insn != 0; insn = next_insn)
{
next_insn = NEXT_INSN (insn);
- if (INSN_P (insn))
+ if (USEFUL_INSN_P (insn))
{
if (GET_CODE (PATTERN (insn)) == SEQUENCE)
{
diff --git a/gcc/config/moxie/constraints.md b/gcc/config/moxie/constraints.md
index 038be5d4c6e..f76726813e3 100644
--- a/gcc/config/moxie/constraints.md
+++ b/gcc/config/moxie/constraints.md
@@ -40,6 +40,11 @@
(match_test "REG_P (XEXP (op, 0))
&& REGNO_OK_FOR_BASE_P (REGNO (XEXP (op, 0)))")))
+(define_constraint "O"
+ "The constant zero"
+ (and (match_code "const_int")
+ (match_test "ival == 0")))
+
(define_constraint "I"
"An 8-bit constant (0..255)"
(and (match_code "const_int")
@@ -49,4 +54,3 @@
"A constant -(0..255)"
(and (match_code "const_int")
(match_test "ival >= -255 && ival <= 0")))
-
diff --git a/gcc/config/moxie/moxie.c b/gcc/config/moxie/moxie.c
index 39a5c10bb69..8b2d8b23fe3 100644
--- a/gcc/config/moxie/moxie.c
+++ b/gcc/config/moxie/moxie.c
@@ -273,25 +273,22 @@ moxie_expand_prologue (void)
if (cfun->machine->size_for_adjusting_sp > 0)
{
- if (cfun->machine->size_for_adjusting_sp <= 255)
+ int i = cfun->machine->size_for_adjusting_sp;
+ while (i > 255)
{
insn = emit_insn (gen_subsi3 (stack_pointer_rtx,
stack_pointer_rtx,
- GEN_INT (cfun->machine->size_for_adjusting_sp)));
+ GEN_INT (255)));
RTX_FRAME_RELATED_P (insn) = 1;
+ i -= 255;
}
- else
+ if (i > 0)
{
- insn =
- emit_insn (gen_movsi
- (gen_rtx_REG (Pmode, MOXIE_R5),
- GEN_INT (-cfun->machine->size_for_adjusting_sp)));
- RTX_FRAME_RELATED_P (insn) = 1;
- insn = emit_insn (gen_addsi3 (stack_pointer_rtx,
+ insn = emit_insn (gen_subsi3 (stack_pointer_rtx,
stack_pointer_rtx,
- gen_rtx_REG (Pmode, MOXIE_R5)));
+ GEN_INT (i)));
RTX_FRAME_RELATED_P (insn) = 1;
- }
+ }
}
}
@@ -359,14 +356,14 @@ moxie_setup_incoming_varargs (CUMULATIVE_ARGS *cum,
int *pretend_size, int no_rtl)
{
int regno;
- int regs = 7 - *cum;
+ int regs = 8 - *cum;
*pretend_size = regs < 0 ? 0 : GET_MODE_SIZE (SImode) * regs;
if (no_rtl)
return;
- for (regno = *cum; regno < 7; regno++)
+ for (regno = *cum; regno < 8; regno++)
{
rtx reg = gen_rtx_REG (SImode, regno);
rtx slot = gen_rtx_PLUS (Pmode,
@@ -395,7 +392,7 @@ rtx
moxie_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
{
- if (cum < 7)
+ if (cum < 8)
return gen_rtx_REG (mode, cum);
else
return NULL_RTX;
@@ -420,7 +417,7 @@ moxie_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
else
size = GET_MODE_SIZE (mode);
- return size > 4*5;
+ return size > 4*6;
}
/* Some function arguments will only partially fit in the registers
@@ -434,7 +431,7 @@ moxie_arg_partial_bytes (CUMULATIVE_ARGS *cum,
{
int bytes_left, size;
- if (*cum >= 7)
+ if (*cum >= 8)
return 0;
if (moxie_pass_by_reference (cum, mode, type, named))
@@ -448,7 +445,7 @@ moxie_arg_partial_bytes (CUMULATIVE_ARGS *cum,
else
size = GET_MODE_SIZE (mode);
- bytes_left = (4 * 5) - ((*cum - 2) * 4);
+ bytes_left = (4 * 6) - ((*cum - 2) * 4);
if (size > bytes_left)
return bytes_left;
diff --git a/gcc/config/moxie/moxie.h b/gcc/config/moxie/moxie.h
index f50a6b2a27e..21792da6527 100644
--- a/gcc/config/moxie/moxie.h
+++ b/gcc/config/moxie/moxie.h
@@ -182,7 +182,7 @@ enum reg_class
/* A C expression whose value is a register class containing hard
register REGNO. */
-#define REGNO_REG_CLASS(R) ((R < MOXIE_PC) ? GENERAL_REGS : \
+#define REGNO_REG_CLASS(R) ((R < MOXIE_PC) ? GENERAL_REGS : \
(R == MOXIE_CC ? CC_REGS : SPECIAL_REGS))
/* A C expression for the number of consecutive hard registers,
@@ -263,7 +263,7 @@ enum reg_class
: (unsigned) int_size_in_bytes (TYPE))
#define FUNCTION_ARG_ADVANCE(CUM,MODE,TYPE,NAMED) \
- (CUM = (CUM < MOXIE_R5 ? \
+ (CUM = (CUM < MOXIE_R6 ? \
CUM + ((3 + MOXIE_FUNCTION_ARG_SIZE(MODE,TYPE))/4) : CUM ))
/* How Scalar Function Values Are Returned */
@@ -299,7 +299,7 @@ enum reg_class
/* Define this if it is the responsibility of the caller to allocate
the area reserved for arguments passed in registers. */
-#define REG_PARM_STACK_SPACE(FNDECL) (5 * UNITS_PER_WORD)
+#define REG_PARM_STACK_SPACE(FNDECL) (6 * UNITS_PER_WORD)
/* Offset from the argument pointer register to the first argument's
address. On some machines it may depend on the data type of the
@@ -463,7 +463,7 @@ do \
/* A C expression that is nonzero if REGNO is the number of a hard
register in which function arguments are sometimes passed. */
-#define FUNCTION_ARG_REGNO_P(r) (r >= MOXIE_R0 && r <= MOXIE_R4)
+#define FUNCTION_ARG_REGNO_P(r) (r >= MOXIE_R0 && r <= MOXIE_R5)
/* A C expression that is nonzero if REGNO is the number of a hard
register in which the values of called function may come back. */
diff --git a/gcc/config/moxie/moxie.md b/gcc/config/moxie/moxie.md
index 02072f48388..a8e68872e3f 100644
--- a/gcc/config/moxie/moxie.md
+++ b/gcc/config/moxie/moxie.md
@@ -223,11 +223,12 @@
}")
(define_insn "*movsi"
- [(set (match_operand:SI 0 "general_operand" "=r,r,W,A,r,r,B,r")
- (match_operand:SI 1 "moxie_general_movsrc_operand" "r,i,r,r,W,A,r,B"))]
+ [(set (match_operand:SI 0 "general_operand" "=r,r,r,W,A,r,r,B,r")
+ (match_operand:SI 1 "moxie_general_movsrc_operand" "O,r,i,r,r,W,A,r,B"))]
"register_operand (operands[0], SImode)
|| register_operand (operands[1], SImode)"
"@
+ xor %0, %0
mov %0, %1
ldi.l %0, %1
st.l %0, %1
@@ -236,7 +237,7 @@
lda.l %0, %1
sto.l %0, %1
ldo.l %0, %1"
- [(set_attr "length" "2,6,2,6,2,6,6,6")])
+ [(set_attr "length" "2,2,6,2,6,2,6,6,6")])
(define_expand "movqi"
[(set (match_operand:QI 0 "general_operand" "")
@@ -250,11 +251,12 @@
}")
(define_insn "*movqi"
- [(set (match_operand:QI 0 "general_operand" "=r,r,W,A,r,r,B,r")
- (match_operand:QI 1 "moxie_general_movsrc_operand" "r,i,r,r,W,A,r,B"))]
+ [(set (match_operand:QI 0 "general_operand" "=r,r,r,W,A,r,r,B,r")
+ (match_operand:QI 1 "moxie_general_movsrc_operand" "O,r,i,r,r,W,A,r,B"))]
"register_operand (operands[0], QImode)
|| register_operand (operands[1], QImode)"
"@
+ xor %0, %0
mov %0, %1
ldi.b %0, %1
st.b %0, %1
@@ -263,7 +265,7 @@
lda.b %0, %1
sto.b %0, %1
ldo.b %0, %1"
- [(set_attr "length" "2,6,2,6,2,6,6,6")])
+ [(set_attr "length" "2,2,6,2,6,2,6,6,6")])
(define_expand "movhi"
[(set (match_operand:HI 0 "general_operand" "")
@@ -277,11 +279,12 @@
}")
(define_insn "*movhi"
- [(set (match_operand:HI 0 "general_operand" "=r,r,W,A,r,r,B,r")
- (match_operand:HI 1 "moxie_general_movsrc_operand" "r,i,r,r,W,A,r,B"))]
+ [(set (match_operand:HI 0 "general_operand" "=r,r,r,W,A,r,r,B,r")
+ (match_operand:HI 1 "moxie_general_movsrc_operand" "O,r,i,r,r,W,A,r,B"))]
"(register_operand (operands[0], HImode)
|| register_operand (operands[1], HImode))"
"@
+ xor %0, %0
mov %0, %1
ldi.s %0, %1
st.s %0, %1
@@ -290,7 +293,7 @@
lda.s %0, %1
sto.s %0, %1
ldo.s %0, %1"
- [(set_attr "length" "2,6,2,6,2,6,6,6")])
+ [(set_attr "length" "2,2,6,2,6,2,6,6,6")])
;; -------------------------------------------------------------------------
;; Compare instructions
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index ea046d3e920..d7f30f84e0d 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -2421,8 +2421,8 @@
[(set (match_operand:DI 0 "reg_or_mem_operand" "=&r,Z,??&r")
(bswap:DI (match_operand:DI 1 "reg_or_mem_operand" "Z,r,r")))
(clobber (match_scratch:DI 2 "=&b,&b,&r"))
- (clobber (match_scratch:DI 3 "=&b,&r,&r"))
- (clobber (match_scratch:DI 4 "=&b,X,&r"))]
+ (clobber (match_scratch:DI 3 "=&r,&r,&r"))
+ (clobber (match_scratch:DI 4 "=&r,X,&r"))]
"TARGET_POWERPC64 && !TARGET_LDBRX
&& (REG_P (operands[0]) || REG_P (operands[1]))"
"#"
@@ -2454,12 +2454,13 @@
if (GET_CODE (addr1) == PLUS)
{
emit_insn (gen_adddi3 (op2, XEXP (addr1, 0), GEN_INT (4)));
- addr1 = XEXP (addr1, 1);
+ addr2 = gen_rtx_PLUS (DImode, op2, XEXP (addr1, 1));
}
else
- emit_move_insn (op2, GEN_INT (4));
-
- addr2 = gen_rtx_PLUS (DImode, op2, addr1);
+ {
+ emit_move_insn (op2, GEN_INT (4));
+ addr2 = gen_rtx_PLUS (DImode, op2, addr1);
+ }
if (BYTES_BIG_ENDIAN)
{
@@ -2484,7 +2485,7 @@
(clobber (match_operand:DI 2 "gpc_reg_operand" ""))
(clobber (match_operand:DI 3 "gpc_reg_operand" ""))
(clobber (match_operand:DI 4 "" ""))]
- "TARGET_POWERPC64 && reload_completed && !TARGET_LDBRX"
+ "TARGET_POWERPC64 && !TARGET_LDBRX && reload_completed"
[(const_int 0)]
"
{
@@ -2503,12 +2504,13 @@
if (GET_CODE (addr1) == PLUS)
{
emit_insn (gen_adddi3 (op2, XEXP (addr1, 0), GEN_INT (4)));
- addr1 = XEXP (addr1, 1);
+ addr2 = gen_rtx_PLUS (DImode, op2, XEXP (addr1, 1));
}
else
- emit_move_insn (op2, GEN_INT (4));
-
- addr2 = gen_rtx_PLUS (DImode, op2, addr1);
+ {
+ emit_move_insn (op2, GEN_INT (4));
+ addr2 = gen_rtx_PLUS (DImode, op2, addr1);
+ }
emit_insn (gen_lshrdi3 (op3, src, GEN_INT (32)));
if (BYTES_BIG_ENDIAN)
@@ -2582,13 +2584,14 @@
addr1 = XEXP (src, 0);
if (GET_CODE (addr1) == PLUS)
{
- emit_insn (gen_adddi3 (op2, XEXP (addr1, 0), GEN_INT (4)));
- addr1 = XEXP (addr1, 1);
+ emit_insn (gen_addsi3 (op2, XEXP (addr1, 0), GEN_INT (4)));
+ addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
}
else
- emit_move_insn (op2, GEN_INT (4));
-
- addr2 = gen_rtx_PLUS (DImode, op2, addr1);
+ {
+ emit_move_insn (op2, GEN_INT (4));
+ addr2 = gen_rtx_PLUS (SImode, op2, addr1);
+ }
if (BYTES_BIG_ENDIAN)
{
@@ -2627,12 +2630,13 @@
if (GET_CODE (addr1) == PLUS)
{
emit_insn (gen_addsi3 (op2, XEXP (addr1, 0), GEN_INT (4)));
- addr1 = XEXP (addr1, 1);
+ addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
}
else
- emit_move_insn (op2, GEN_INT (4));
-
- addr2 = gen_rtx_PLUS (SImode, op2, addr1);
+ {
+ emit_move_insn (op2, GEN_INT (4));
+ addr2 = gen_rtx_PLUS (SImode, op2, addr1);
+ }
if (BYTES_BIG_ENDIAN)
{
diff --git a/gcc/config/s390/2084.md b/gcc/config/s390/2084.md
index 38669c23a97..bedc5c322ba 100644
--- a/gcc/config/s390/2084.md
+++ b/gcc/config/s390/2084.md
@@ -163,17 +163,17 @@
(define_insn_reservation "x_fsimptf" 7
(and (eq_attr "cpu" "z990,z9_109")
- (eq_attr "type" "fsimptf"))
+ (eq_attr "type" "fsimptf,fhex"))
"x_e1_t*2,x-wr-fp")
(define_insn_reservation "x_fsimpdf" 6
(and (eq_attr "cpu" "z990,z9_109")
- (eq_attr "type" "fsimpdf,fmuldf"))
+ (eq_attr "type" "fsimpdf,fmuldf,fhex"))
"x_e1_t,x-wr-fp")
(define_insn_reservation "x_fsimpsf" 6
(and (eq_attr "cpu" "z990,z9_109")
- (eq_attr "type" "fsimpsf,fmulsf"))
+ (eq_attr "type" "fsimpsf,fmulsf,fhex"))
"x_e1_t,x-wr-fp")
diff --git a/gcc/config/s390/2097.md b/gcc/config/s390/2097.md
index f27302e0a2b..eb7240effd4 100644
--- a/gcc/config/s390/2097.md
+++ b/gcc/config/s390/2097.md
@@ -463,29 +463,34 @@
; BFP multiplication and general instructions
-(define_insn_reservation "z10_fsimpdf" 12
+(define_insn_reservation "z10_fsimpdf" 6
(and (eq_attr "cpu" "z10")
(eq_attr "type" "fsimpdf,fmuldf"))
"z10_e1_BOTH, z10_Gate_FP")
-; Wg "z10_e1_T, z10_Gate_FP")
-(define_insn_reservation "z10_fsimpsf" 12
+; LOAD ZERO produces a hex value but we need bin. Using the stage 7
+; bypass causes an exception for format conversion which is very
+; expensive. So, make sure subsequent instructions only get the zero
+; in the normal way.
+(define_insn_reservation "z10_fhex" 12
+ (and (eq_attr "cpu" "z10")
+ (eq_attr "type" "fhex"))
+ "z10_e1_BOTH, z10_Gate_FP")
+
+(define_insn_reservation "z10_fsimpsf" 6
(and (eq_attr "cpu" "z10")
(eq_attr "type" "fsimpsf,fmulsf"))
"z10_e1_BOTH, z10_Gate_FP")
-; Wg "z10_e1_T, z10_Gate_FP")
(define_insn_reservation "z10_fmultf" 52
(and (eq_attr "cpu" "z10")
(eq_attr "type" "fmultf"))
"z10_e1_BOTH*4, z10_Gate_FP")
-; Wg "z10_e1_T*4, z10_Gate_FP")
(define_insn_reservation "z10_fsimptf" 14
(and (eq_attr "cpu" "z10")
(eq_attr "type" "fsimptf"))
"z10_e1_BOTH*2, z10_Gate_FP")
-; Wg "z10_e1_T*2, z10_Gate_FP")
; BFP division
@@ -531,12 +536,12 @@
(eq_attr "type" "floadtf"))
"z10_e1_T, z10_Gate_FP")
-(define_insn_reservation "z10_floaddf" 12
+(define_insn_reservation "z10_floaddf" 1
(and (eq_attr "cpu" "z10")
(eq_attr "type" "floaddf"))
"z10_e1_T, z10_Gate_FP")
-(define_insn_reservation "z10_floadsf" 12
+(define_insn_reservation "z10_floadsf" 1
(and (eq_attr "cpu" "z10")
(eq_attr "type" "floadsf"))
"z10_e1_T, z10_Gate_FP")
@@ -553,12 +558,12 @@
; BFP truncate
-(define_insn_reservation "z10_ftrunctf" 12
+(define_insn_reservation "z10_ftrunctf" 16
(and (eq_attr "cpu" "z10")
(eq_attr "type" "ftrunctf"))
"z10_e1_T, z10_Gate_FP")
-(define_insn_reservation "z10_ftruncdf" 16
+(define_insn_reservation "z10_ftruncdf" 12
(and (eq_attr "cpu" "z10")
(eq_attr "type" "ftruncdf"))
"z10_e1_T, z10_Gate_FP")
@@ -585,8 +590,8 @@
; BFP-related bypasses. There is no bypass for extended mode.
(define_bypass 1 "z10_fsimpdf" "z10_fstoredf")
(define_bypass 1 "z10_fsimpsf" "z10_fstoresf")
-(define_bypass 1 "z10_floaddf" "z10_fsimpdf, z10_fstoredf, z10_floaddf")
-(define_bypass 1 "z10_floadsf" "z10_fsimpsf, z10_fstoresf, z10_floadsf")
+(define_bypass 1 "z10_floaddf" "z10_fsimpdf, z10_fstoredf")
+(define_bypass 1 "z10_floadsf" "z10_fsimpsf, z10_fstoresf")
;
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 05896064d6e..a4ac3a38b6b 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -205,13 +205,13 @@ struct processor_costs z10_cost =
COSTS_N_INSNS (10), /* MSGFR */
COSTS_N_INSNS (10), /* MSGR */
COSTS_N_INSNS (10), /* MSR */
- COSTS_N_INSNS (10), /* multiplication in DFmode */
+ COSTS_N_INSNS (1) , /* multiplication in DFmode */
COSTS_N_INSNS (50), /* MXBR */
COSTS_N_INSNS (120), /* SQXBR */
COSTS_N_INSNS (52), /* SQDBR */
COSTS_N_INSNS (38), /* SQEBR */
- COSTS_N_INSNS (10), /* MADBR */
- COSTS_N_INSNS (10), /* MAEBR */
+ COSTS_N_INSNS (1), /* MADBR */
+ COSTS_N_INSNS (1), /* MAEBR */
COSTS_N_INSNS (111), /* DXBR */
COSTS_N_INSNS (39), /* DDBR */
COSTS_N_INSNS (32), /* DEBR */
@@ -5297,6 +5297,7 @@ s390_agen_dep_p (rtx dep_insn, rtx insn)
A STD instruction should be scheduled earlier,
in order to use the bypass. */
+
static int
s390_adjust_priority (rtx insn ATTRIBUTE_UNUSED, int priority)
{
@@ -5304,7 +5305,8 @@ s390_adjust_priority (rtx insn ATTRIBUTE_UNUSED, int priority)
return priority;
if (s390_tune != PROCESSOR_2084_Z990
- && s390_tune != PROCESSOR_2094_Z9_109)
+ && s390_tune != PROCESSOR_2094_Z9_109
+ && s390_tune != PROCESSOR_2097_Z10)
return priority;
switch (s390_safe_attr_type (insn))
@@ -5323,6 +5325,7 @@ s390_adjust_priority (rtx insn ATTRIBUTE_UNUSED, int priority)
return priority;
}
+
/* The number of instructions that can be issued per cycle. */
static int
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index 0a4361ff267..db326ee766c 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -202,7 +202,7 @@
(define_attr "type" "none,integer,load,lr,la,larl,lm,stm,
cs,vs,store,sem,idiv,
imulhi,imulsi,imuldi,
- branch,jsr,fsimptf,fsimpdf,fsimpsf,
+ branch,jsr,fsimptf,fsimpdf,fsimpsf,fhex,
floadtf,floaddf,floadsf,fstoredf,fstoresf,
fmultf,fmuldf,fmulsf,fdivtf,fdivdf,fdivsf,
ftoi,fsqrttf,fsqrtdf,fsqrtsf,
@@ -1937,7 +1937,7 @@
#
#"
[(set_attr "op_type" "RRE,RRE,*,*,RSY,RSY,*,*")
- (set_attr "type" "fsimptf,fsimptf,*,*,lm,stm,*,*")])
+ (set_attr "type" "fhex,fsimptf,*,*,lm,stm,*,*")])
(define_insn "*mov<mode>_31"
[(set (match_operand:TD_TF 0 "nonimmediate_operand" "=f,f,f,o")
@@ -1949,7 +1949,7 @@
#
#"
[(set_attr "op_type" "RRE,RRE,*,*")
- (set_attr "type" "fsimptf,fsimptf,*,*")])
+ (set_attr "type" "fhex,fsimptf,*,*")])
; TFmode in GPRs splitters
@@ -2057,7 +2057,7 @@
lg\t%0,%1
stg\t%1,%0"
[(set_attr "op_type" "RRE,RR,RRE,RRE,RX,RXY,RX,RXY,RRE,RXY,RXY")
- (set_attr "type" "fsimpdf,floaddf,floaddf,floaddf,floaddf,floaddf,
+ (set_attr "type" "fhex,floaddf,floaddf,floaddf,floaddf,floaddf,
fstoredf,fstoredf,lr,load,store")
(set_attr "z10prop" "*,
*,
@@ -2087,7 +2087,7 @@
lg\t%0,%1
stg\t%1,%0"
[(set_attr "op_type" "RRE,RR,RX,RXY,RX,RXY,RRE,RXY,RXY")
- (set_attr "type" "fsimp<mode>,fload<mode>,fload<mode>,fload<mode>,
+ (set_attr "type" "fhex,fload<mode>,fload<mode>,fload<mode>,
fstore<mode>,fstore<mode>,lr,load,store")
(set_attr "z10prop" "*,
*,
@@ -2119,7 +2119,7 @@
#
#"
[(set_attr "op_type" "RRE,RR,RX,RXY,RX,RXY,RS,RSY,RS,RSY,*,*")
- (set_attr "type" "fsimp<mode>,fload<mode>,fload<mode>,fload<mode>,
+ (set_attr "type" "fhex,fload<mode>,fload<mode>,fload<mode>,
fstore<mode>,fstore<mode>,lm,lm,stm,stm,*,*")])
(define_split
@@ -2186,7 +2186,7 @@
st\t%1,%0
sty\t%1,%0"
[(set_attr "op_type" "RRE,RR,RX,RXY,RX,RXY,RR,RX,RXY,RX,RXY")
- (set_attr "type" "fsimp<mode>,fload<mode>,fload<mode>,fload<mode>,
+ (set_attr "type" "fhex,fload<mode>,fload<mode>,fload<mode>,
fstore<mode>,fstore<mode>,lr,load,load,store,store")
(set_attr "z10prop" "*,
*,
@@ -5286,8 +5286,8 @@
; madbr, maebr, maxb, madb, maeb
(define_insn "*fmadd<mode>"
[(set (match_operand:DSF 0 "register_operand" "=f,f")
- (plus:DSF (mult:DSF (match_operand:DSF 1 "register_operand" "%f,f")
- (match_operand:DSF 2 "nonimmediate_operand" "f,R"))
+ (plus:DSF (mult:DSF (match_operand:DSF 1 "nonimmediate_operand" "%f,f")
+ (match_operand:DSF 2 "nonimmediate_operand" "f,R"))
(match_operand:DSF 3 "register_operand" "0,0")))]
"TARGET_HARD_FLOAT && TARGET_FUSED_MADD"
"@
@@ -5299,8 +5299,8 @@
; msxbr, msdbr, msebr, msxb, msdb, mseb
(define_insn "*fmsub<mode>"
[(set (match_operand:DSF 0 "register_operand" "=f,f")
- (minus:DSF (mult:DSF (match_operand:DSF 1 "register_operand" "f,f")
- (match_operand:DSF 2 "nonimmediate_operand" "f,R"))
+ (minus:DSF (mult:DSF (match_operand:DSF 1 "nonimmediate_operand" "f,f")
+ (match_operand:DSF 2 "nonimmediate_operand" "f,R"))
(match_operand:DSF 3 "register_operand" "0,0")))]
"TARGET_HARD_FLOAT && TARGET_FUSED_MADD"
"@
diff --git a/gcc/config/t-slibgcc-elf-ver b/gcc/config/t-slibgcc-elf-ver
index 49692818476..d5ef9ca163f 100644
--- a/gcc/config/t-slibgcc-elf-ver
+++ b/gcc/config/t-slibgcc-elf-ver
@@ -28,6 +28,9 @@ SHLIB_OBJS = @shlib_objs@
SHLIB_DIR = @multilib_dir@
SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
SHLIB_LC = -lc
+SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
+SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
+ $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-Wl,--soname=$(SHLIB_SONAME) \
@@ -40,7 +43,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
$(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
else true; fi && \
mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
- $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
+ $(SHLIB_MAKE_SOLINK)
# $(slibdir) double quoted to protect it from expansion while building
# libgcc.mk. We want this delayed until actual install time.
SHLIB_INSTALL = \
@@ -48,7 +51,6 @@ SHLIB_INSTALL = \
$(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SONAME) \
$$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
- $(LN_S) $(SHLIB_SONAME) \
- $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
+ $(SHLIB_INSTALL_SOLINK)
SHLIB_MKMAP = $(srcdir)/mkmap-symver.awk
SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
diff --git a/gcc/config/t-slibgcc-libgcc b/gcc/config/t-slibgcc-libgcc
new file mode 100644
index 00000000000..df004a5e964
--- /dev/null
+++ b/gcc/config/t-slibgcc-libgcc
@@ -0,0 +1,32 @@
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# 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 3, 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 COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# Instead of creating $(SHLIB_SOLINK) symlink create a GNU ld
+# linker script which sources in both $(SHLIB_SONAME) and libgcc.a.
+# This is needed on targets where libgcc.a contains routines that aren't in
+# $(SHLIB_SONAME) and are needed for shared libraries.
+
+SHLIB_MAKE_SOLINK = \
+ (echo "/* GNU ld script"; \
+ echo " Use the shared library, but some functions are only in"; \
+ echo " the static library. */"; \
+ echo "GROUP ( $(SHLIB_SONAME) libgcc.a )" \
+ ) > $(SHLIB_DIR)/$(SHLIB_SOLINK)
+SHLIB_INSTALL_SOLINK = \
+ $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SOLINK) \
+ $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
diff --git a/gcc/config/xtensa/unwind-dw2-xtensa.c b/gcc/config/xtensa/unwind-dw2-xtensa.c
index e7ca86a10fb..9544f65ab78 100644
--- a/gcc/config/xtensa/unwind-dw2-xtensa.c
+++ b/gcc/config/xtensa/unwind-dw2-xtensa.c
@@ -459,7 +459,7 @@ uw_advance_context (struct _Unwind_Context *context, _Unwind_FrameState *fs)
} \
while (0)
-static void
+static void __attribute__((noinline))
uw_init_context_1 (struct _Unwind_Context *context, void *outer_cfa,
void *outer_ra)
{
diff --git a/gcc/configure b/gcc/configure
index ab0e6dd73c9..6bc5b5e2b3a 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -1770,7 +1770,7 @@ Optional Packages:
use sysroot as the system root during the build
--with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
--with-pkgversion=PKG Use PKG in the version string in place of "lto
- merged with rev 151374"
+ merged with rev 151592"
--with-bugurl=URL Direct users to URL to report a bug
--with-multilib-list Select multilibs (SH only)
--with-gnu-ld assume the C compiler uses GNU ld default=no
@@ -2392,34 +2392,76 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_c_check_type
-# ac_fn_c_check_header_preproc LINENO HEADER VAR
-# ----------------------------------------------
-# Tests whether HEADER is present, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_preproc ()
+# ac_fn_c_find_intX_t LINENO BITS VAR
+# -----------------------------------
+# Finds a signed integer type with width BITS, setting cache variable VAR
+# accordingly.
+ac_fn_c_find_intX_t ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
+$as_echo_n "checking for int$2_t... " >&6; }
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
+ eval "$3=no"
+ for ac_type in int$2_t 'int' 'long int' \
+ 'long long int' 'short int' 'signed char'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1))];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <$2>
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1)
+ < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 2))];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- eval "$3=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+
else
- eval "$3=no"
+ case $ac_type in #(
+ int$2_t) :
+ eval "$3=yes" ;; #(
+ *) :
+ eval "$3=\$ac_type" ;;
+esac
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval as_val=\$$3
+ if test "x$as_val" = x""no; then :
+
+else
+ break
+fi
+ done
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-} # ac_fn_c_check_header_preproc
+} # ac_fn_c_find_intX_t
# ac_fn_c_try_link LINENO
# -----------------------
@@ -2467,6 +2509,87 @@ fi
} # ac_fn_c_try_link
+# ac_fn_c_find_uintX_t LINENO BITS VAR
+# ------------------------------------
+# Finds an unsigned integer type with width BITS, setting cache variable VAR
+# accordingly.
+ac_fn_c_find_uintX_t ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
+$as_echo_n "checking for uint$2_t... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
+ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(($ac_type) -1 >> ($2 - 1) == 1)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ case $ac_type in #(
+ uint$2_t) :
+ eval "$3=yes" ;; #(
+ *) :
+ eval "$3=\$ac_type" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval as_val=\$$3
+ if test "x$as_val" = x""no; then :
+
+else
+ break
+fi
+ done
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_find_uintX_t
+
+# ac_fn_c_check_header_preproc LINENO HEADER VAR
+# ----------------------------------------------
+# Tests whether HEADER is present, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_preproc ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_preproc
+
# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -5705,16 +5828,369 @@ _ACEOF
fi
-ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
+ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t"
+case $ac_cv_c_int8_t in #(
+ no|yes) ;; #(
+ *)
+
+cat >>confdefs.h <<_ACEOF
+#define int8_t $ac_cv_c_int8_t
+_ACEOF
+;;
+esac
+
+ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t"
+case $ac_cv_c_int16_t in #(
+ no|yes) ;; #(
+ *)
+
+cat >>confdefs.h <<_ACEOF
+#define int16_t $ac_cv_c_int16_t
+_ACEOF
+;;
+esac
+
+ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
+case $ac_cv_c_int32_t in #(
+ no|yes) ;; #(
+ *)
+
+cat >>confdefs.h <<_ACEOF
+#define int32_t $ac_cv_c_int32_t
+_ACEOF
+;;
+esac
+
+ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
+case $ac_cv_c_int64_t in #(
+ no|yes) ;; #(
+ *)
+
+cat >>confdefs.h <<_ACEOF
+#define int64_t $ac_cv_c_int64_t
+_ACEOF
+;;
+esac
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+$as_echo_n "checking for long long int... " >&6; }
+if test "${ac_cv_type_long_long_int+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* For now, do not test the preprocessor; as of 2007 there are too many
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
+ /* Test literals. */
+ long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ unsigned long long int ull = 18446744073709551615ULL;
+ /* Test constant expressions. */
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;
+int
+main ()
+{
+/* Test availability of runtime routines for shift and division. */
+ long long int llmax = 9223372036854775807ll;
+ unsigned long long int ullmax = 18446744073709551615ull;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if test "$cross_compiling" = yes; then :
+ ac_cv_type_long_long_int=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ #ifndef LLONG_MAX
+ # define HALF \
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+ # define LLONG_MAX (HALF - 1 + HALF)
+ #endif
+int
+main ()
+{
+long long int n = 1;
+ int i;
+ for (i = 0; ; i++)
+ {
+ long long int m = n << i;
+ if (m >> i != n)
+ return 1;
+ if (LLONG_MAX / 2 < m)
+ break;
+ }
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_type_long_long_int=yes
+else
+ ac_cv_type_long_long_int=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+else
+ ac_cv_type_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+$as_echo "$ac_cv_type_long_long_int" >&6; }
+ if test $ac_cv_type_long_long_int = yes; then
+
+$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
+
+ fi
+
+
+
+ ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
+if test "x$ac_cv_type_intmax_t" = x""yes; then :
+
+$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
+
+else
+ test $ac_cv_type_long_long_int = yes \
+ && ac_type='long long int' \
+ || ac_type='long int'
+
+cat >>confdefs.h <<_ACEOF
+#define intmax_t $ac_type
+_ACEOF
+
+fi
+
+
+
+ ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
if test "x$ac_cv_type_intptr_t" = x""yes; then :
+$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
+
+else
+ for ac_type in 'int' 'long int' 'long long int'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+cat >>confdefs.h <<_ACEOF
+#define intptr_t $ac_type
+_ACEOF
+
+ ac_type=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test -z "$ac_type" && break
+ done
+fi
+
+
+ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
+case $ac_cv_c_uint8_t in #(
+ no|yes) ;; #(
+ *)
+
+$as_echo "#define _UINT8_T 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint8_t $ac_cv_c_uint8_t
+_ACEOF
+;;
+ esac
+
+ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
+case $ac_cv_c_uint16_t in #(
+ no|yes) ;; #(
+ *)
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint16_t $ac_cv_c_uint16_t
+_ACEOF
+;;
+ esac
+
+ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
+case $ac_cv_c_uint32_t in #(
+ no|yes) ;; #(
+ *)
+
+$as_echo "#define _UINT32_T 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint32_t $ac_cv_c_uint32_t
+_ACEOF
+;;
+ esac
+
+ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
+case $ac_cv_c_uint64_t in #(
+ no|yes) ;; #(
+ *)
+
+$as_echo "#define _UINT64_T 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint64_t $ac_cv_c_uint64_t
+_ACEOF
+;;
+ esac
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+$as_echo_n "checking for unsigned long long int... " >&6; }
+if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* For now, do not test the preprocessor; as of 2007 there are too many
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
+ /* Test literals. */
+ long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ unsigned long long int ull = 18446744073709551615ULL;
+ /* Test constant expressions. */
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;
+int
+main ()
+{
+/* Test availability of runtime routines for shift and division. */
+ long long int llmax = 9223372036854775807ll;
+ unsigned long long int ullmax = 18446744073709551615ull;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_type_unsigned_long_long_int=yes
+else
+ ac_cv_type_unsigned_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+
+$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+
+ fi
+
+
+
+ ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintmax_t" = x""yes; then :
+
+$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
+
+else
+ test $ac_cv_type_unsigned_long_long_int = yes \
+ && ac_type='unsigned long long int' \
+ || ac_type='unsigned long int'
+
+cat >>confdefs.h <<_ACEOF
+#define uintmax_t $ac_type
+_ACEOF
+
+fi
+
+
+
+ ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintptr_t" = x""yes; then :
+
+$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
+
+else
+ for ac_type in 'unsigned int' 'unsigned long int' \
+ 'unsigned long long int'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
cat >>confdefs.h <<_ACEOF
-#define intptr_t long
+#define uintptr_t $ac_type
_ACEOF
+ ac_type=
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test -z "$ac_type" && break
+ done
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
# ---------------------
@@ -6537,7 +7013,7 @@ if test "${with_pkgversion+set}" = set; then :
*) PKGVERSION="($withval) " ;;
esac
else
- PKGVERSION="(lto merged with rev 151374) "
+ PKGVERSION="(lto merged with rev 151592) "
fi
@@ -11096,13 +11572,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:11099: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:11575: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:11102: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:11578: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:11105: output\"" >&5)
+ (eval echo "\"\$as_me:11581: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -12307,7 +12783,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 12310 "configure"' > conftest.$ac_ext
+ echo '#line 12786 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -13967,11 +14443,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13970: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14446: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13974: \$? = $ac_status" >&5
+ echo "$as_me:14450: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14306,11 +14782,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14309: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14785: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14313: \$? = $ac_status" >&5
+ echo "$as_me:14789: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14411,11 +14887,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14414: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14890: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14418: \$? = $ac_status" >&5
+ echo "$as_me:14894: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14466,11 +14942,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14469: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14945: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14473: \$? = $ac_status" >&5
+ echo "$as_me:14949: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16848,7 +17324,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 16851 "configure"
+#line 17327 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -16944,7 +17420,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 16947 "configure"
+#line 17423 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -17421,7 +17897,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
else
GXX=no
@@ -17752,7 +18228,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
;;
*)
if test "$GXX" = yes; then
@@ -17817,7 +18293,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
;;
*)
if test "$GXX" = yes; then
@@ -18161,7 +18637,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
else
# FIXME: insert proper C++ library support
@@ -18245,7 +18721,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
else
# g++ 2.7 appears to require `-G' NOT `-shared' on this
# platform.
@@ -18256,7 +18732,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
fi
hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
@@ -18900,11 +19376,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18903: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:19379: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:18907: \$? = $ac_status" >&5
+ echo "$as_me:19383: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -18999,11 +19475,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:19002: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:19478: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:19006: \$? = $ac_status" >&5
+ echo "$as_me:19482: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -19051,11 +19527,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:19054: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:19530: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:19058: \$? = $ac_status" >&5
+ echo "$as_me:19534: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -23516,16 +23992,7 @@ fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }
then
- # Also check for ld.so support, i.e. glibc 2.11 or higher.
- if test x$host = x$build -a x$host = x$target &&
- glibcver=`ldd --version 2>/dev/null`; then
- glibcmajor=`expr "$glibcver" : "ldd (GNU libc) \([0-9]*\)"`
- glibcminor=`expr "$glibcver" : "ldd (GNU libc) [0-9]*\.\([0-9]*\)"`
- glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
- if test "$glibcnum" -ge 2011 ; then
- gcc_cv_as_gnu_unique_object=yes
- fi
- fi
+ gcc_cv_as_gnu_unique_object=yes
else
echo "configure: failed program was" >&5
cat conftest.s >&5
@@ -23536,7 +24003,16 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gnu_unique_object" >&5
$as_echo "$gcc_cv_as_gnu_unique_object" >&6; }
if test $gcc_cv_as_gnu_unique_object = yes; then
- enable_gnu_unique_object=yes
+ # Also check for ld.so support, i.e. glibc 2.11 or higher.
+ if test x$host = x$build -a x$host = x$target &&
+ glibcver=`ldd --version 2>/dev/null`; then
+ glibcmajor=`expr "$glibcver" : "ldd (GNU libc) \([0-9]*\)"`
+ glibcminor=`expr "$glibcver" : "ldd (GNU libc) [0-9]*\.\([0-9]*\)"`
+ glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
+ if test "$glibcnum" -ge 2011 ; then
+ enable_gnu_unique_object=yes
+ fi
+ fi
fi
fi
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 9b0f66c3d14..8f0a928f0bf 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -311,7 +311,7 @@ AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_TYPES([long long], [AC_CHECK_SIZEOF(long long)])
AC_CHECK_TYPES([__int64], [AC_CHECK_SIZEOF(__int64)])
-AC_CHECK_TYPE(intptr_t, long)
+GCC_STDINT_TYPES
# ---------------------
# Warnings and checking
@@ -795,7 +795,7 @@ esac],
[onestep=""])
AC_SUBST(onestep)
-ACX_PKGVERSION([lto merged with rev 151374])
+ACX_PKGVERSION([lto merged with rev 151592])
ACX_BUGURL([http://gcc.gnu.org/bugs.html])
# Sanity check enable_languages in case someone does not run the toplevel
@@ -3391,7 +3391,7 @@ Valid choices are 'yes' and 'no'.]) ;;
esac],
[gcc_GAS_CHECK_FEATURE([gnu_unique_object], gcc_cv_as_gnu_unique_object,
[elf,2,19,52],,
- [.type foo, @gnu_unique_object],
+ [.type foo, @gnu_unique_object],,
# Also check for ld.so support, i.e. glibc 2.11 or higher.
[if test x$host = x$build -a x$host = x$target &&
glibcver=`ldd --version 2>/dev/null`; then
@@ -3399,10 +3399,9 @@ Valid choices are 'yes' and 'no'.]) ;;
glibcminor=`expr "$glibcver" : "ldd (GNU libc) [[0-9]]*\.\([[0-9]]*\)"`
glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
if test "$glibcnum" -ge 2011 ; then
- gcc_cv_as_gnu_unique_object=yes
+ enable_gnu_unique_object=yes
fi
- fi],
- [enable_gnu_unique_object=yes])])
+ fi])])
if test x$enable_gnu_unique_object = xyes; then
AC_DEFINE(HAVE_GAS_GNU_UNIQUE_OBJECT, 1,
[Define if your assembler supports @gnu_unique_object.])
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index bac7098db72..db2a892988f 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,41 @@
+2009-09-09 Jason Merrill <jason@redhat.com>
+
+ * error.c (find_typenames_r): Also add decltypes.
+
+2009-09-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/28293
+ * decl2.c (grokfield): Check for explicit template argument lists.
+
+2009-09-09 Jack Howarth <howarth@bromo.med.uc.edu>
+
+ PR bootstrap/41180
+ * Make-lang.in: Remove redundant code from linkage for darwin10.
+
+2009-09-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/39923
+ * decl.c (build_init_list_var_init): Check return value of
+ perform_implicit_conversion.
+
+2009-09-03 Jason Merrill <jason@redhat.com>
+
+ * class.c (currently_open_class): Make sure we're dealing with the
+ main variant.
+
+ * cp-tree.h (enum overload_flags): Remove OP_FLAG.
+ * method.c (lazily_declare_fn): Check for dtorness in ABI warning.
+
+ * name-lookup.c (is_class_level): Remove.
+ (push_binding_level, leave_scope, resume_scope): Adjust.
+ (pushlevel_class): Adjust.
+ (poplevel_class): Make sure we're on class_binding_level.
+
+ * decl.c (grokmethod): Rename from start_method.
+ (finish_method): Remove.
+ * cp-tree.h: Adjust.
+ * parser.c (cp_parser_save_member_function_body): Adjust.
+
2009-09-03 Doug Kwan <dougkwan@google.com>
* tree.c (cp_fix_function_decl_p): New.
diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
index 356565f75e5..da5d8ac2b18 100644
--- a/gcc/cp/Make-lang.in
+++ b/gcc/cp/Make-lang.in
@@ -73,8 +73,8 @@ g++-cross$(exeext): g++$(exeext)
# Shared with C front end:
CXX_C_OBJS = attribs.o c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o \
c-dump.o $(CXX_TARGET_OBJS) c-pretty-print.o c-opts.o c-pch.o \
- incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o \
- c-gimplify.o c-omp.o tree-inline.o
+ incpath.o c-ppoutput.o c-cppbuiltin.o prefix.o \
+ c-gimplify.o c-omp.o
# Language-specific object files for C++ and Objective C++.
CXX_AND_OBJCXX_OBJS = cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o \
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 2c308cfb5c9..9938a3d84d1 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -5846,6 +5846,8 @@ currently_open_class (tree t)
if (!CLASS_TYPE_P (t))
return false;
+ t = TYPE_MAIN_VARIANT (t);
+
/* We start looking from 1 because entry 0 is from global scope,
and has no type. */
for (i = current_class_depth; i > 0; --i)
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 23b41d3b62b..ea3b4bf3d14 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -3804,7 +3804,7 @@ extern int at_eof;
TREE_PURPOSE slot. */
extern GTY(()) tree static_aggregates;
-enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
+enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, TYPENAME_FLAG };
/* These are uses as bits in flags passed to various functions to
control their behavior. Despite the LOOKUP_ prefix, many of these
@@ -4418,8 +4418,7 @@ extern tree begin_function_body (void);
extern void finish_function_body (tree);
extern tree outer_curly_brace_block (tree);
extern tree finish_function (int);
-extern tree start_method (cp_decl_specifier_seq *, const cp_declarator *, tree);
-extern tree finish_method (tree);
+extern tree grokmethod (cp_decl_specifier_seq *, const cp_declarator *, tree);
extern void maybe_register_incomplete_var (tree);
extern void maybe_commonize_var (tree);
extern void complete_vars (tree);
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index cad0fc5b2e6..0cfcb4f29ec 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -4415,6 +4415,9 @@ build_init_list_var_init (tree decl, tree type, tree init, tree *cleanup)
{
tree aggr_init, array, arrtype;
init = perform_implicit_conversion (type, init, tf_warning_or_error);
+ if (error_operand_p (init))
+ return error_mark_node;
+
aggr_init = TARGET_EXPR_INITIAL (init);
init = build2 (INIT_EXPR, type, decl, init);
@@ -12444,8 +12447,8 @@ finish_function (int flags)
CHANGES TO CODE IN `grokfield'. */
tree
-start_method (cp_decl_specifier_seq *declspecs,
- const cp_declarator *declarator, tree attrlist)
+grokmethod (cp_decl_specifier_seq *declspecs,
+ const cp_declarator *declarator, tree attrlist)
{
tree fndecl = grokdeclarator (declarator, declspecs, MEMFUNCDEF, 0,
&attrlist);
@@ -12499,62 +12502,9 @@ start_method (cp_decl_specifier_seq *declspecs,
cp_finish_decl (fndecl, NULL_TREE, false, NULL_TREE, 0);
- /* Make a place for the parms. */
- begin_scope (sk_function_parms, fndecl);
-
DECL_IN_AGGR_P (fndecl) = 1;
return fndecl;
}
-
-/* Go through the motions of finishing a function definition.
- We don't compile this method until after the whole class has
- been processed.
-
- FINISH_METHOD must return something that looks as though it
- came from GROKFIELD (since we are defining a method, after all).
-
- This is called after parsing the body of the function definition.
- STMTS is the chain of statements that makes up the function body.
-
- DECL is the ..._DECL that `start_method' provided. */
-
-tree
-finish_method (tree decl)
-{
- tree fndecl = decl;
- tree old_initial;
-
- tree link;
-
- if (decl == void_type_node)
- return decl;
-
- old_initial = DECL_INITIAL (fndecl);
-
- /* Undo the level for the parms (from start_method).
- This is like poplevel, but it causes nothing to be
- saved. Saving information here confuses symbol-table
- output routines. Besides, this information will
- be correctly output when this method is actually
- compiled. */
-
- /* Clear out the meanings of the local variables of this level;
- also record in each decl which block it belongs to. */
-
- for (link = current_binding_level->names; link; link = TREE_CHAIN (link))
- {
- if (DECL_NAME (link) != NULL_TREE)
- pop_binding (DECL_NAME (link), link);
- gcc_assert (TREE_CODE (link) != FUNCTION_DECL);
- DECL_CONTEXT (link) = NULL_TREE;
- }
-
- poplevel (0, 0, 0);
-
- DECL_INITIAL (fndecl) = old_initial;
-
- return decl;
-}
/* VAR is a VAR_DECL. If its type is incomplete, remember VAR so that
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index cc4317aa7b4..eb48c5551f2 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -254,7 +254,7 @@ maybe_retrofit_in_chrg (tree fn)
FUNCTION is a FUNCTION_DECL. It was created by `grokdeclarator'.
FLAGS contains bits saying what's special about today's
- arguments. 1 == DESTRUCTOR. 2 == OPERATOR.
+ arguments. DTOR_FLAG == DESTRUCTOR.
If FUNCTION is a destructor, then we must add the `auto-delete' field
as a second parameter. There is some hair associated with the fact
@@ -764,6 +764,7 @@ grokfield (const cp_declarator *declarator,
tree value;
const char *asmspec = 0;
int flags = LOOKUP_ONLYCONVERTING;
+ tree name;
if (init
&& TREE_CODE (init) == TREE_LIST
@@ -792,11 +793,21 @@ grokfield (const cp_declarator *declarator,
&& DECL_CONTEXT (value) != current_class_type)
return value;
- if (DECL_NAME (value) != NULL_TREE
- && IDENTIFIER_POINTER (DECL_NAME (value))[0] == '_'
- && ! strcmp (IDENTIFIER_POINTER (DECL_NAME (value)), "_vptr"))
- error ("member %qD conflicts with virtual function table field name",
- value);
+ name = DECL_NAME (value);
+
+ if (name != NULL_TREE)
+ {
+ if (TREE_CODE (name) == TEMPLATE_ID_EXPR)
+ {
+ error ("explicit template argument list not allowed");
+ return error_mark_node;
+ }
+
+ if (IDENTIFIER_POINTER (name)[0] == '_'
+ && ! strcmp (IDENTIFIER_POINTER (name), "_vptr"))
+ error ("member %qD conflicts with virtual function table field name",
+ value);
+ }
/* Stash away type declarations. */
if (TREE_CODE (value) == TYPE_DECL)
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 19649292627..5d38e026454 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -1159,7 +1159,8 @@ dump_template_decl (tree t, int flags)
}
/* find_typenames looks through the type of the function template T
- and returns a VEC containing any typedefs or TYPENAME_TYPEs it finds. */
+ and returns a VEC containing any typedefs, decltypes or TYPENAME_TYPEs
+ it finds. */
struct find_typenames_t
{
@@ -1176,7 +1177,8 @@ find_typenames_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED, void *data)
if (TYPE_P (*tp) && is_typedef_decl (TYPE_NAME (*tp)))
/* Add the type of the typedef without any additional cv-quals. */
mv = TREE_TYPE (TYPE_NAME (*tp));
- else if (TREE_CODE (*tp) == TYPENAME_TYPE)
+ else if (TREE_CODE (*tp) == TYPENAME_TYPE
+ || TREE_CODE (*tp) == DECLTYPE_TYPE)
/* Add the typename without any cv-qualifiers. */
mv = TYPE_MAIN_VARIANT (*tp);
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 4563e8f6b5c..6acf1bb4b71 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -1161,7 +1161,7 @@ lazily_declare_fn (special_function_kind sfk, tree type)
/* G++ 3.2 put the implicit destructor at the *beginning* of the
TYPE_METHODS list, which cause the destructor to be emitted
in an incorrect location in the vtable. */
- if (warn_abi && DECL_VIRTUAL_P (fn))
+ if (warn_abi && sfk == sfk_destructor && DECL_VIRTUAL_P (fn))
warning (OPT_Wabi, "vtable layout for class %qT may not be ABI-compliant"
"and may change in a future version of GCC due to "
"implicit virtual destructor",
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index feb2cf280d1..492850648b0 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -1257,7 +1257,6 @@ check_for_out_of_scope_variable (tree decl)
static bool keep_next_level_flag;
static int binding_depth = 0;
-static int is_class_level = 0;
static void
indent (int depth)
@@ -1339,7 +1338,6 @@ push_binding_level (struct cp_binding_level *scope)
scope->binding_depth = binding_depth;
indent (binding_depth);
cxx_scope_debug (scope, input_line, "push");
- is_class_level = 0;
binding_depth++;
}
}
@@ -1427,12 +1425,6 @@ leave_scope (void)
{
indent (--binding_depth);
cxx_scope_debug (scope, input_line, "leave");
- if (is_class_level != (scope == class_binding_level))
- {
- indent (binding_depth);
- verbatim ("XXX is_class_level != (current_scope == class_scope)\n");
- }
- is_class_level = 0;
}
/* Move one nesting level up. */
@@ -1482,7 +1474,6 @@ resume_scope (struct cp_binding_level* b)
b->binding_depth = binding_depth;
indent (binding_depth);
cxx_scope_debug (b, input_line, "resume");
- is_class_level = 0;
binding_depth++;
}
}
@@ -2562,9 +2553,6 @@ pop_inner_scope (tree outer, tree inner)
void
pushlevel_class (void)
{
- if (ENABLE_SCOPE_CHECKING)
- is_class_level = 1;
-
class_binding_level = begin_scope (sk_class, current_class_type);
}
@@ -2602,9 +2590,7 @@ poplevel_class (void)
/* Now, pop out of the binding level which we created up in the
`pushlevel_class' routine. */
- if (ENABLE_SCOPE_CHECKING)
- is_class_level = 1;
-
+ gcc_assert (current_binding_level == level);
leave_scope ();
timevar_pop (TV_NAME_LOOKUP);
}
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 64869cd8476..14733b835bd 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -18172,8 +18172,8 @@ cp_parser_save_member_function_body (cp_parser* parser,
cp_token *last;
tree fn;
- /* Create the function-declaration. */
- fn = start_method (decl_specifiers, declarator, attributes);
+ /* Create the FUNCTION_DECL. */
+ fn = grokmethod (decl_specifiers, declarator, attributes);
/* If something went badly wrong, bail out now. */
if (fn == error_mark_node)
{
@@ -18221,9 +18221,6 @@ cp_parser_save_member_function_body (cp_parser* parser,
friend templates are handled correctly. */
DECL_INITIALIZED_IN_CLASS_P (fn) = 1;
- /* We're done with the inline definition. */
- finish_method (fn);
-
/* Add FN to the queue of functions to be parsed later. */
TREE_VALUE (parser->unparsed_functions_queues)
= tree_cons (NULL_TREE, fn,
diff --git a/gcc/cselib.c b/gcc/cselib.c
index 8d52c519ff3..927f93cbb79 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -1165,12 +1165,12 @@ cselib_expand_value_rtx_1 (rtx orig, struct expand_value_data *evd,
scopy = simplify_gen_subreg (GET_MODE (orig), subreg,
GET_MODE (SUBREG_REG (orig)),
SUBREG_BYTE (orig));
- if (scopy == NULL
- || (GET_CODE (scopy) == SUBREG
- && !REG_P (SUBREG_REG (scopy))
- && !MEM_P (SUBREG_REG (scopy))
- && (REG_P (SUBREG_REG (orig))
- || MEM_P (SUBREG_REG (orig)))))
+ if ((scopy == NULL
+ || (GET_CODE (scopy) == SUBREG
+ && !REG_P (SUBREG_REG (scopy))
+ && !MEM_P (SUBREG_REG (scopy))))
+ && (REG_P (SUBREG_REG (orig))
+ || MEM_P (SUBREG_REG (orig))))
return shallow_copy_rtx (orig);
return scopy;
}
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 8e321141dc0..98af41eb1ba 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -7793,7 +7793,7 @@ whose probability exceeds given threshold (in percents). The default value is
@item early-inlining-insns
Specify growth that early inliner can make. In effect it increases amount of
-inlining for code having large abstraction penalty. The default value is 12.
+inlining for code having large abstraction penalty. The default value is 8.
@item max-early-inliner-iterations
@itemx max-early-inliner-iterations
@@ -8919,7 +8919,16 @@ and @option{-imultilib} as necessary.
@item %s
Current argument is the name of a library or startup file of some sort.
Search for that file in a standard list of directories and substitute
-the full name found.
+the full name found. The current working directory is included in the
+list of directories scanned.
+
+@item %T
+Current argument is the name of a linker script. Search for that file
+in the current list of directories to scan for libraries. If the file
+is located insert a @option{--script} option into the command line
+followed by the full path name found. If the file is not found then
+generate an error message. Note: the current working directory is not
+searched.
@item %e@var{str}
Print @var{str} as an error message. @var{str} is terminated by a newline.
@@ -9768,6 +9777,7 @@ can be one of @samp{bf512}, @samp{bf514}, @samp{bf516}, @samp{bf518},
@samp{bf527}, @samp{bf531}, @samp{bf532}, @samp{bf533},
@samp{bf534}, @samp{bf536}, @samp{bf537}, @samp{bf538}, @samp{bf539},
@samp{bf542}, @samp{bf544}, @samp{bf547}, @samp{bf548}, @samp{bf549},
+@samp{bf542m}, @samp{bf544m}, @samp{bf547m}, @samp{bf548m}, @samp{bf549m},
@samp{bf561}.
The optional @var{sirevision} specifies the silicon revision of the target
Blackfin processor. Any workarounds available for the targeted silicon revision
diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
index 79baa10e25d..ba72b48096b 100644
--- a/gcc/doc/rtl.texi
+++ b/gcc/doc/rtl.texi
@@ -882,6 +882,14 @@ Stored in the @code{volatil} field and printed as @samp{/v}.
Most uses of @code{SYMBOL_REF_FLAG} are historic and may be subsumed
by @code{SYMBOL_REF_FLAGS}. Certainly use of @code{SYMBOL_REF_FLAGS}
is mandatory if the target requires more than one bit of storage.
+
+@findex PREFETCH_SCHEDULE_BARRIER_P
+@cindex @code{prefetch} and @samp{/v}
+@cindex @code{volatile}, in @code{prefetch}
+@item PREFETCH_SCHEDULE_BARRIER_P (@var{x})
+In a @code{prefetch}, indicates that the prefetch is a scheduling barrier.
+No other INSNs will be moved over it.
+Stored in the @code{volatil} field and printed as @samp{/v}.
@end table
These are the fields to which the above macros refer:
@@ -1034,6 +1042,9 @@ In an @code{insn}, 1 means the insn has been deleted.
In @code{label_ref} and @code{reg_label} expressions, 1 means a reference
to a non-local label.
+In @code{prefetch} expressions, 1 means that the containing insn is a
+scheduling barrier.
+
In an RTL dump, this flag is represented as @samp{/v}.
@end table
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 8678b1a927b..50a7284fb58 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -163,7 +163,6 @@ dwarf2out_do_cfi_asm (void)
#endif
if (!flag_dwarf2_cfi_asm || !dwarf2out_do_frame ())
return false;
-
if (saved_do_cfi_asm)
return true;
@@ -11698,21 +11697,23 @@ loc_descriptor (rtx rtl, enum machine_mode mode,
switch (GET_CODE (rtl))
{
case SUBREG:
- case SIGN_EXTEND:
- case ZERO_EXTEND:
/* The case of a subreg may arise when we have a local (register)
variable or a formal (register) parameter which doesn't quite fill
up an entire register. For now, just assume that it is
legitimate to make the Dwarf info refer to the whole register which
contains the given subreg. */
- rtl = SUBREG_REG (rtl);
-
- /* ... fall through ... */
+ loc_result = loc_descriptor (SUBREG_REG (rtl), mode, initialized);
+ break;
case REG:
loc_result = reg_loc_descriptor (rtl, initialized);
break;
+ case SIGN_EXTEND:
+ case ZERO_EXTEND:
+ loc_result = loc_descriptor (XEXP (rtl, 0), mode, initialized);
+ break;
+
case MEM:
loc_result = mem_loc_descriptor (XEXP (rtl, 0), GET_MODE (rtl),
initialized);
diff --git a/gcc/expr.c b/gcc/expr.c
index cd5eae16880..fe74280d7fe 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -761,9 +761,6 @@ convert_modes (enum machine_mode mode, enum machine_mode oldmode, rtx x, int uns
if (GET_MODE (x) != VOIDmode)
oldmode = GET_MODE (x);
- if (mode == oldmode)
- return x;
-
/* There is one case that we must handle specially: If we are converting
a CONST_INT into a mode whose size is twice HOST_BITS_PER_WIDE_INT and
we are to interpret the constant as unsigned, gen_lowpart will do
@@ -829,6 +826,9 @@ convert_modes (enum machine_mode mode, enum machine_mode oldmode, rtx x, int uns
return gen_lowpart (mode, x);
}
+ if (mode == oldmode)
+ return x;
+
/* Converting from integer constant into mode is always equivalent to an
subreg operation. */
if (VECTOR_MODE_P (mode) && GET_MODE (x) == VOIDmode)
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index aeae2835f3a..c01c4b351b0 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,21 @@
+2009-09-09 Richard Guenther <rguenther@suse.de>
+
+ PR fortran/41297
+ * trans-expr.c (gfc_trans_scalar_assign): Correct typo that
+ left 'tmp' unused in derived type assignment.
+
+2009-09-07 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/41197
+ * resolve_c (resolve_allocate_deallocate): Complain
+ if stat or errmsg varaible is an array.
+
+2009-09-05 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/41258
+ * primary.c (gfc_match_varspec): Do not look for typebound
+ procedures unless the derived type has a f2k_derived namespace.
+
2009-09-03 Diego Novillo <dnovillo@google.com>
* f95-lang.c (lang_hooks): Remove const qualifier.
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index 267819c69f6..f25de2397bf 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -1783,7 +1783,11 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag,
if (m != MATCH_YES)
return MATCH_ERROR;
- tbp = gfc_find_typebound_proc (sym, &t, name, false, &gfc_current_locus);
+ if (sym->f2k_derived)
+ tbp = gfc_find_typebound_proc (sym, &t, name, false, &gfc_current_locus);
+ else
+ tbp = NULL;
+
if (tbp)
{
gfc_symbol* tbp_sym;
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index b665c354503..fd365eb136a 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -5732,9 +5732,10 @@ resolve_allocate_deallocate (gfc_code *code, const char *fcn)
gfc_error ("Illegal stat-variable at %L for a PURE procedure",
&stat->where);
- if (stat->ts.type != BT_INTEGER
- && !(stat->ref && (stat->ref->type == REF_ARRAY
- || stat->ref->type == REF_COMPONENT)))
+ if ((stat->ts.type != BT_INTEGER
+ && !(stat->ref && (stat->ref->type == REF_ARRAY
+ || stat->ref->type == REF_COMPONENT)))
+ || stat->rank > 0)
gfc_error ("Stat-variable at %L must be a scalar INTEGER "
"variable", &stat->where);
@@ -5759,10 +5760,11 @@ resolve_allocate_deallocate (gfc_code *code, const char *fcn)
gfc_error ("Illegal errmsg-variable at %L for a PURE procedure",
&errmsg->where);
- if (errmsg->ts.type != BT_CHARACTER
- && !(errmsg->ref
- && (errmsg->ref->type == REF_ARRAY
- || errmsg->ref->type == REF_COMPONENT)))
+ if ((errmsg->ts.type != BT_CHARACTER
+ && !(errmsg->ref
+ && (errmsg->ref->type == REF_ARRAY
+ || errmsg->ref->type == REF_COMPONENT)))
+ || errmsg->rank > 0 )
gfc_error ("Errmsg-variable at %L must be a scalar CHARACTER "
"variable", &errmsg->where);
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 3d675eb0499..b3642c2232c 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -4460,7 +4460,7 @@ gfc_trans_scalar_assign (gfc_se * lse, gfc_se * rse, gfc_typespec ts,
gfc_add_block_to_block (&block, &lse->pre);
gfc_add_block_to_block (&block, &rse->pre);
tmp = gfc_evaluate_now (rse->expr, &block);
- tmp = fold_build1 (VIEW_CONVERT_EXPR, TREE_TYPE (lse->expr), rse->expr);
+ tmp = fold_build1 (VIEW_CONVERT_EXPR, TREE_TYPE (lse->expr), tmp);
gfc_add_modify (&block, lse->expr, tmp);
}
else
diff --git a/gcc/function.c b/gcc/function.c
index 32572544298..85e2f058932 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -2433,20 +2433,25 @@ assign_parm_find_stack_rtl (tree parm, struct assign_parm_data_one *data)
stack_parm = gen_rtx_PLUS (Pmode, stack_parm, offset_rtx);
stack_parm = gen_rtx_MEM (data->promoted_mode, stack_parm);
- set_mem_attributes (stack_parm, parm, 1);
- /* set_mem_attributes could set MEM_SIZE to the passed mode's size,
- while promoted mode's size is needed. */
- if (data->promoted_mode != BLKmode
- && data->promoted_mode != DECL_MODE (parm))
+ if (!data->passed_pointer)
{
- set_mem_size (stack_parm, GEN_INT (GET_MODE_SIZE (data->promoted_mode)));
- if (MEM_EXPR (stack_parm) && MEM_OFFSET (stack_parm))
+ set_mem_attributes (stack_parm, parm, 1);
+ /* set_mem_attributes could set MEM_SIZE to the passed mode's size,
+ while promoted mode's size is needed. */
+ if (data->promoted_mode != BLKmode
+ && data->promoted_mode != DECL_MODE (parm))
{
- int offset = subreg_lowpart_offset (DECL_MODE (parm),
- data->promoted_mode);
- if (offset)
- set_mem_offset (stack_parm,
- plus_constant (MEM_OFFSET (stack_parm), -offset));
+ set_mem_size (stack_parm,
+ GEN_INT (GET_MODE_SIZE (data->promoted_mode)));
+ if (MEM_EXPR (stack_parm) && MEM_OFFSET (stack_parm))
+ {
+ int offset = subreg_lowpart_offset (DECL_MODE (parm),
+ data->promoted_mode);
+ if (offset)
+ set_mem_offset (stack_parm,
+ plus_constant (MEM_OFFSET (stack_parm),
+ -offset));
+ }
}
}
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 2d36520e84b..c87ea038701 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -427,7 +427,7 @@ or with constant text in a single argument.
%b substitute the basename of the input file being processed.
This is the substring up to (and not including) the last period
and not including the directory unless -save-temps was specified
- to put temporaries in a different location.
+ to put temporaries in a different location.
%B same as %b, but include the file suffix (text after the last period).
%gSUFFIX
substitute a file name that has suffix SUFFIX and is chosen
@@ -564,7 +564,7 @@ or with constant text in a single argument.
%{!.S:X} substitutes X, if NOT processing a file with suffix S.
%{,S:X} substitutes X, if processing a file which will use spec S.
%{!,S:X} substitutes X, if NOT processing a file which will use spec S.
-
+
%{S|T:X} substitutes X if either -S or -T was given to GCC. This may be
combined with '!', '.', ',', and '*' as above binding stronger
than the OR.
@@ -3468,7 +3468,7 @@ add_linker_option (const char *option, int len)
if (! linker_options)
linker_options = XNEWVEC (char *, n_linker_options);
else
- linker_options = XRESIZEVEC (char *, linker_options, n_linker_options);
+ linker_options = XRESIZEVEC (char *, linker_options, n_linker_options);
linker_options [n_linker_options - 1] = save_string (option, len);
}
@@ -4710,6 +4710,13 @@ static int this_is_output_file;
search dirs for it. */
static int this_is_library_file;
+/* Nonzero means %T has been seen; the next arg to be terminated
+ is the name of a linker script and we should try all of the
+ standard search dirs for it. If it is found insert a --script
+ command line switch and then substitute the full path in place,
+ otherwise generate an error message. */
+static int this_is_linker_script;
+
/* Nonzero means that the input of this command is coming from a pipe. */
static int input_from_pipe;
@@ -4730,6 +4737,19 @@ end_going_arg (void)
string = XOBFINISH (&obstack, const char *);
if (this_is_library_file)
string = find_file (string);
+ if (this_is_linker_script)
+ {
+ char * full_script_path = find_a_file (&startfile_prefixes, string, R_OK, true);
+
+ if (full_script_path == NULL)
+ {
+ error (_("unable to locate default linker script '%s' in the library search paths"), string);
+ /* Script was not found on search path. */
+ return;
+ }
+ store_arg ("--script", false, false);
+ string = full_script_path;
+ }
store_arg (string, delete_this_arg, this_is_output_file);
if (this_is_output_file)
outfiles[input_file_number] = string;
@@ -4819,6 +4839,7 @@ do_spec_2 (const char *spec)
delete_this_arg = 0;
this_is_output_file = 0;
this_is_library_file = 0;
+ this_is_linker_script = 0;
input_from_pipe = 0;
suffix_subst = NULL;
@@ -5106,6 +5127,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
delete_this_arg = 0;
this_is_output_file = 0;
this_is_library_file = 0;
+ this_is_linker_script = 0;
input_from_pipe = 0;
break;
@@ -5125,6 +5147,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
delete_this_arg = 0;
this_is_output_file = 0;
this_is_library_file = 0;
+ this_is_linker_script = 0;
break;
case '%':
@@ -5572,6 +5595,10 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
this_is_library_file = 1;
break;
+ case 'T':
+ this_is_linker_script = 1;
+ break;
+
case 'V':
outfiles[input_file_number] = NULL;
break;
@@ -5946,6 +5973,7 @@ eval_spec_function (const char *func, const char *args)
int save_this_is_output_file;
int save_this_is_library_file;
int save_input_from_pipe;
+ int save_this_is_linker_script;
const char *save_suffix_subst;
@@ -5962,6 +5990,7 @@ eval_spec_function (const char *func, const char *args)
save_delete_this_arg = delete_this_arg;
save_this_is_output_file = this_is_output_file;
save_this_is_library_file = this_is_library_file;
+ save_this_is_linker_script = this_is_linker_script;
save_input_from_pipe = input_from_pipe;
save_suffix_subst = suffix_subst;
@@ -5987,6 +6016,7 @@ eval_spec_function (const char *func, const char *args)
delete_this_arg = save_delete_this_arg;
this_is_output_file = save_this_is_output_file;
this_is_library_file = save_this_is_library_file;
+ this_is_linker_script = save_this_is_linker_script;
input_from_pipe = save_input_from_pipe;
suffix_subst = save_suffix_subst;
@@ -6231,7 +6261,7 @@ handle_braces (const char *p)
{
if ((a_is_suffix || a_is_spectype) && a_is_starred)
goto invalid;
-
+
if (!a_is_starred)
disj_starred = false;
@@ -6245,7 +6275,7 @@ handle_braces (const char *p)
a_matched = input_spec_matches (atom, end_atom);
else
a_matched = switch_matches (atom, end_atom, a_is_starred);
-
+
if (a_matched != a_is_negated)
{
disj_matched = true;
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index def9a694a0e..4d6295af604 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -319,7 +319,7 @@ static struct attr_hash *attr_hash_table[RTL_HASH_SIZE];
/* Here is how primitive or already-shared RTL's hash
codes are made. */
-#define RTL_HASH(RTL) ((long) (RTL) & 0777777)
+#define RTL_HASH(RTL) ((intptr_t) (RTL) & 0777777)
/* Add an entry to the hash table for RTL with hash code HASHCODE. */
diff --git a/gcc/gimple.h b/gcc/gimple.h
index f05096afd0b..222a7791dee 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -4201,23 +4201,32 @@ gimple_return_set_retval (gimple gs, tree retval)
/* Returns true when the gimple statment STMT is any of the OpenMP types. */
+#define CASE_GIMPLE_OMP \
+ case GIMPLE_OMP_PARALLEL: \
+ case GIMPLE_OMP_TASK: \
+ case GIMPLE_OMP_FOR: \
+ case GIMPLE_OMP_SECTIONS: \
+ case GIMPLE_OMP_SECTIONS_SWITCH: \
+ case GIMPLE_OMP_SINGLE: \
+ case GIMPLE_OMP_SECTION: \
+ case GIMPLE_OMP_MASTER: \
+ case GIMPLE_OMP_ORDERED: \
+ case GIMPLE_OMP_CRITICAL: \
+ case GIMPLE_OMP_RETURN: \
+ case GIMPLE_OMP_ATOMIC_LOAD: \
+ case GIMPLE_OMP_ATOMIC_STORE: \
+ case GIMPLE_OMP_CONTINUE
+
static inline bool
is_gimple_omp (const_gimple stmt)
{
- return (gimple_code (stmt) == GIMPLE_OMP_PARALLEL
- || gimple_code (stmt) == GIMPLE_OMP_TASK
- || gimple_code (stmt) == GIMPLE_OMP_FOR
- || gimple_code (stmt) == GIMPLE_OMP_SECTIONS
- || gimple_code (stmt) == GIMPLE_OMP_SECTIONS_SWITCH
- || gimple_code (stmt) == GIMPLE_OMP_SINGLE
- || gimple_code (stmt) == GIMPLE_OMP_SECTION
- || gimple_code (stmt) == GIMPLE_OMP_MASTER
- || gimple_code (stmt) == GIMPLE_OMP_ORDERED
- || gimple_code (stmt) == GIMPLE_OMP_CRITICAL
- || gimple_code (stmt) == GIMPLE_OMP_RETURN
- || gimple_code (stmt) == GIMPLE_OMP_ATOMIC_LOAD
- || gimple_code (stmt) == GIMPLE_OMP_ATOMIC_STORE
- || gimple_code (stmt) == GIMPLE_OMP_CONTINUE);
+ switch (gimple_code (stmt))
+ {
+ CASE_GIMPLE_OMP:
+ return true;
+ default:
+ return false;
+ }
}
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 3f7a3eeaa4e..9204caae77b 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -216,7 +216,6 @@ cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
node->analyzed = false;
node->local.inlinable = false;
}
- node->local.disregard_inline_limits = false;
}
else
cgraph_remove_node (node);
@@ -315,18 +314,12 @@ function_and_variable_visibility (void)
return 0;
}
-static bool
-gate_ipa_fun_and_var_visibility (void)
-{
- return true;
-}
-
struct simple_ipa_opt_pass pass_ipa_function_and_variable_visibility =
{
{
SIMPLE_IPA_PASS,
"visibility", /* name */
- gate_ipa_fun_and_var_visibility, /* gate */
+ NULL, /* gate */
function_and_variable_visibility, /* execute */
NULL, /* sub */
NULL, /* next */
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index 899e111892f..dc85a384432 100644
--- a/gcc/lto-cgraph.c
+++ b/gcc/lto-cgraph.c
@@ -243,11 +243,9 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node,
bitmap_set_bit (written_decls, DECL_UID (node->decl));
lto_output_fn_decl_index (ob->decl_state, ob->main_stream, node->decl);
+ lto_output_sleb128_stream (ob->main_stream, node->count);
bp = bitpack_create ();
- bp_pack_value (bp, node->lowered, 1);
- bp_pack_value (bp, node->analyzed, 1);
- bp_pack_value (bp, node->needed, 1);
bp_pack_value (bp, local, 1);
bp_pack_value (bp, externally_visible, 1);
bp_pack_value (bp, node->local.finalized, 1);
@@ -256,6 +254,15 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node,
bp_pack_value (bp, node->local.redefined_extern_inline, 1);
bp_pack_value (bp, node->local.for_functions_valid, 1);
bp_pack_value (bp, node->local.vtable_method, 1);
+ bp_pack_value (bp, node->needed, 1);
+ bp_pack_value (bp, node->address_taken, 1);
+ bp_pack_value (bp, node->abstract_and_needed, 1);
+ bp_pack_value (bp, node->reachable, 1);
+ bp_pack_value (bp, node->lowered, 1);
+ bp_pack_value (bp, node->analyzed, 1);
+ bp_pack_value (bp, node->process, 1);
+ bp_pack_value (bp, node->alias, 1);
+ bp_pack_value (bp, node->finalized_by_frontend, 1);
lto_output_bitpack (ob->main_stream, bp);
bitpack_delete (bp);
@@ -374,7 +381,8 @@ output_cgraph (cgraph_node_set set)
STACK_SIZE, SELF_TIME and SELF_SIZE. This is called either to initialize
NODE or to replace the values in it, for instance because the first
time we saw it, the function body was not available but now it
- is. */
+ is. BP is a bitpack with all the bitflags for NODE read from the
+ stream. */
static void
input_overwrite_node (struct lto_file_decl_data *file_data,
@@ -397,9 +405,6 @@ input_overwrite_node (struct lto_file_decl_data *file_data,
node->global.size = self_size;
node->local.lto_file_data = file_data;
- node->lowered = bp_unpack_value (bp, 1);
- node->analyzed = bp_unpack_value (bp, 1);
- node->needed = bp_unpack_value (bp, 1);
node->local.local = bp_unpack_value (bp, 1);
node->local.externally_visible = bp_unpack_value (bp, 1);
node->local.finalized = bp_unpack_value (bp, 1);
@@ -408,6 +413,15 @@ input_overwrite_node (struct lto_file_decl_data *file_data,
node->local.redefined_extern_inline = bp_unpack_value (bp, 1);
node->local.for_functions_valid = bp_unpack_value (bp, 1);
node->local.vtable_method = bp_unpack_value (bp, 1);
+ node->needed = bp_unpack_value (bp, 1);
+ node->address_taken = bp_unpack_value (bp, 1);
+ node->abstract_and_needed = bp_unpack_value (bp, 1);
+ node->reachable = bp_unpack_value (bp, 1);
+ node->lowered = bp_unpack_value (bp, 1);
+ node->analyzed = bp_unpack_value (bp, 1);
+ node->process = bp_unpack_value (bp, 1);
+ node->alias = bp_unpack_value (bp, 1);
+ node->finalized_by_frontend = bp_unpack_value (bp, 1);
}
@@ -443,10 +457,13 @@ input_node (struct lto_file_decl_data *file_data,
fn_decl = lto_file_decl_data_get_fn_decl (file_data, decl_index);
if (clone_p)
- node = cgraph_clone_input_node (cgraph_node (fn_decl));
+ node = cgraph_clone_node (cgraph_node (fn_decl), 0,
+ CGRAPH_FREQ_BASE, 0, false);
+
else
node = cgraph_node (fn_decl);
+ node->count = lto_input_sleb128 (ib);
bp = lto_input_bitpack (ib);
if (tag != LTO_cgraph_unavail_node)
diff --git a/gcc/params.def b/gcc/params.def
index dc5ceaf573e..6099d9fff00 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -185,7 +185,7 @@ DEFPARAM(PARAM_IPCP_UNIT_GROWTH,
DEFPARAM(PARAM_EARLY_INLINING_INSNS,
"early-inlining-insns",
"maximal estimated growth of function body caused by early inlining of single call",
- 12, 0, 0)
+ 8, 0, 0)
DEFPARAM(PARAM_LARGE_STACK_FRAME,
"large-stack-frame",
"The size of stack frame to be considered large",
diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog
index ecc4cae0ffd..e8ba16b4c8d 100644
--- a/gcc/po/ChangeLog
+++ b/gcc/po/ChangeLog
@@ -1,3 +1,7 @@
+2009-09-03 Joseph Myers <joseph@codesourcery.com>
+
+ * fi.po: Update.
+
2009-08-31 Joseph Myers <joseph@codesourcery.com>
* sv.po: Update.
diff --git a/gcc/po/fi.po b/gcc/po/fi.po
index d22e16493ad..a8bc5e1ade6 100644
--- a/gcc/po/fi.po
+++ b/gcc/po/fi.po
@@ -22,10 +22,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: gcc 4.4-b20081121\n"
+"Project-Id-Version: gcc 4.4.1\n"
"Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
"POT-Creation-Date: 2009-07-15 13:37+0200\n"
-"PO-Revision-Date: 2009-02-03 22:16+0200\n"
+"PO-Revision-Date: 2009-09-03 20:43+0300\n"
"Last-Translator: Lauri Nurmi <lanurmi@iki.fi>\n"
"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
@@ -5472,19 +5472,16 @@ msgid "Error count reached limit of %d."
msgstr ""
#: fortran/error.c:734 fortran/error.c:788 fortran/error.c:825
-#, fuzzy
msgid "Warning:"
-msgstr "varoitus: "
+msgstr "Varoitus:"
#: fortran/error.c:790 fortran/error.c:873 fortran/error.c:899
-#, fuzzy
msgid "Error:"
-msgstr "virhe: "
+msgstr "Virhe:"
#: fortran/error.c:923
-#, fuzzy
msgid "Fatal Error:"
-msgstr "vakava virhe: "
+msgstr "Vakava virhe:"
#: fortran/error.c:942
#, no-c-format
@@ -17260,7 +17257,7 @@ msgstr "%qD:n osoite tulee aina olemaan %<true%>"
#: c-common.c:3472 cp/semantics.c:594 cp/typeck.c:6658
#, gcc-internal-format
msgid "suggest parentheses around assignment used as truth value"
-msgstr "ehdotetaan sulkuja totuusarvona käytetyn sijoituksen ympärille"
+msgstr "ehdotetaan sulkeita totuusarvona käytetyn sijoituksen ympärille"
#: c-common.c:3551 c-typeck.c:8974
#, gcc-internal-format
@@ -17800,39 +17797,39 @@ msgid "array subscript has type %<char%>"
msgstr "taulukon indeksin tyyppi on %<char%>"
#: c-common.c:8128
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around %<+%> inside %<<<%>"
-msgstr "sulkumerkkien käyttö + ja - -merkkien ympärillä on suositeltavaa bittisiirron sisällä"
+msgstr "ehdotetaan sulkeita %<+%>:n ympärille %<<<%>:n sisällä"
#: c-common.c:8131
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around %<-%> inside %<<<%>"
-msgstr "sulkumerkkien käyttö + ja - -merkkien ympärillä on suositeltavaa bittisiirron sisällä"
+msgstr "ehdotetaan sulkeita %<-%>:n ympärille %<<<%>:n sisällä"
#: c-common.c:8137
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around %<+%> inside %<>>%>"
-msgstr "sulkumerkkien käyttö + ja - -merkkien ympärillä on suositeltavaa bittisiirron sisällä"
+msgstr "ehdotetaan sulkeita %<+%>:n ympärille %<>>%>:n sisällä"
#: c-common.c:8140
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around %<-%> inside %<>>%>"
-msgstr "sulkumerkkien käyttö + ja - -merkkien ympärillä on suositeltavaa bittisiirron sisällä"
+msgstr "ehdotetaan sulkeita %<-%>:n ympärille %<>>%>:n sisällä"
#: c-common.c:8146
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around %<&&%> within %<||%>"
-msgstr "sulkumerkkien käyttö &&:n ympärillä on suositeltavaa ||:n sisällä"
+msgstr "ehdotetaan sulkeita %<&&%>:n ympärille %<||%>:n sisällä"
#: c-common.c:8155
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around arithmetic in operand of %<|%>"
-msgstr "sulkumerkkien käyttö laskulausekkeen ympärillä on suositeltavaa |:n operandissa"
+msgstr "ehdotetaan sulkeita lausekkeen ympärille %<|%>:n operandissa"
#: c-common.c:8160
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around comparison in operand of %<|%>"
-msgstr "sulkumerkkien käyttö vertailun ympärillä on suositeltavaa |:n operandissa"
+msgstr "ehdotetaan sulkeita vertailun ympärille %<|%>:n operandissa"
#: c-common.c:8164
#, gcc-internal-format
@@ -17840,29 +17837,29 @@ msgid "suggest parentheses around operand of %<!%> or change %<|%> to %<||%> or
msgstr ""
#: c-common.c:8174
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around arithmetic in operand of %<^%>"
-msgstr "sulkumerkkien käyttö laskulausekkeen ympärillä on suositeltavaa ^:n operandissa"
+msgstr "ehdotetaan sulkeita lausekkeen ympärille %<^%>:n operandissa"
#: c-common.c:8179
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around comparison in operand of %<^%>"
-msgstr "sulkumerkkien käyttö vertailun ympärillä on suositeltavaa ^:n operandissa"
+msgstr "ehdotetaan sulkeita vertailun ympärille %<^%>:n operandissa"
#: c-common.c:8185
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around %<+%> in operand of %<&%>"
-msgstr "sulkumerkkien käyttö + tai - -merkkien ympärillä on suositeltavaa &:n operandissa"
+msgstr "ehdotetaan sulkeita %<+%>:n ympärille %<&%>:n operandissa"
#: c-common.c:8188
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around %<-%> in operand of %<&%>"
-msgstr "sulkumerkkien käyttö + tai - -merkkien ympärillä on suositeltavaa &:n operandissa"
+msgstr "ehdotetaan sulkeita %<-%>:n ympärille %<&%>:n operandissa"
#: c-common.c:8193
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around comparison in operand of %<&%>"
-msgstr "sulkumerkkien käyttö vertailun ympärillä on suositeltavaa &:n operandissa"
+msgstr "ehdotetaan sulkeita vertailun ympärille %<&%>:n operandissa"
#: c-common.c:8197
#, gcc-internal-format
@@ -17870,24 +17867,24 @@ msgid "suggest parentheses around operand of %<!%> or change %<&%> to %<&&%> or
msgstr ""
#: c-common.c:8205
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around comparison in operand of %<==%>"
-msgstr "sulkumerkkien käyttö vertailun ympärillä on suositeltavaa |:n operandissa"
+msgstr "ehdotetaan sulkeita vertailun ympärille %<==%>:n operandissa"
#: c-common.c:8211
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around comparison in operand of %<!=%>"
-msgstr "sulkumerkkien käyttö vertailun ympärillä on suositeltavaa |:n operandissa"
+msgstr "ehdotetaan sulkeita vertailun ympärille %<!=%>:n operandissa"
#: c-common.c:8222
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "comparisons like %<X<=Y<=Z%> do not have their mathematical meaning"
-msgstr "X<=Y<=Z -tyyliset vertailut eivät toimi kuten matematiikassa"
+msgstr "%<X<=Y<=Z%> -tyylisillä vertailuilla on eri merkitys kuin matematiikassa"
#: c-common.c:8237
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "label %q+D defined but not used"
-msgstr "%Jnimike %qD määritelty, mutta ei käytetty"
+msgstr "nimike %q+D määritelty mutta käytettämättä"
#: c-common.c:8239
#, gcc-internal-format
@@ -17900,9 +17897,9 @@ msgid "division by zero"
msgstr "jako nollalla"
#: c-common.c:8291
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "comparison between types %qT and %qT"
-msgstr "osoittimen ja kokonaisluvun välinen vertailu"
+msgstr "tyyppien %qT ja %qT välinen vertailu"
#: c-common.c:8342
#, gcc-internal-format
@@ -18051,14 +18048,14 @@ msgid "conflicting types for built-in function %q+D"
msgstr "ristiriitaiset tyypit sisäiselle funktiolle %q+D"
#: c-decl.c:1233 c-decl.c:1246 c-decl.c:1255
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "conflicting types for %q+D"
-msgstr "%Jristiriitaiset tyypit funktiolle %qD"
+msgstr "ristiriitaiset tyypit %qD:lle"
#: c-decl.c:1253
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "conflicting type qualifiers for %q+D"
-msgstr "%J ristiriitaiset tyyppimääreet %qD:lle"
+msgstr "ristiriitaiset tyyppimääreet %q+D:lle"
#. Allow OLDDECL to continue in use.
#: c-decl.c:1273
@@ -18233,14 +18230,14 @@ msgid "%Jjump into scope of identifier with variably modified type"
msgstr ""
#: c-decl.c:2610
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Htraditional C lacks a separate namespace for labels, identifier %qE conflicts"
-msgstr "%Hperinteisestä C:stä puuttuu erillinen nimiavaruus nimikkeille, tunniste %qs on ristiriidassa"
+msgstr "%Hperinteisestä C:stä puuttuu erillinen nimiavaruus nimikkeille, tunniste %qE on ristiriidassa"
#: c-decl.c:2685
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%qE defined as wrong kind of tag"
-msgstr "%H%qs määritelty vääränlaisena tunnisteena"
+msgstr "%H%qE määritelty vääränlaisena tunnisteena"
#: c-decl.c:2908
#, gcc-internal-format
@@ -18703,9 +18700,9 @@ msgid "variable previously declared %<static%> redeclared %<extern%>"
msgstr "%<static%>-määreellä esitelty muuttuja esitelty uudelleen %<extern%>-tyyppiseksi"
#: c-decl.c:4929
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "variable %q+D declared %<inline%>"
-msgstr "%Jmuuttuja %qD esitelty %<inline%>:ksi"
+msgstr "muuttuja %qD esitelty %<inline%>:ksi"
#. C99 6.7.5.2p2
#: c-decl.c:4960
@@ -18749,14 +18746,14 @@ msgid "%<void%> as only parameter may not be qualified"
msgstr "%<void%> vain parametrina ei ole oikeutettu"
#: c-decl.c:5151 c-decl.c:5185
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%<void%> must be the only parameter"
-msgstr "%<void%> pitää olla ainoa parametri"
+msgstr "%<void%>:in on oltava ainoa parametri"
#: c-decl.c:5179
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "parameter %q+D has just a forward declaration"
-msgstr "parametrilla %qD on vain etukäteisesittely"
+msgstr "parametrilla %q+D on vain etukäteisesittely"
#. The %s will be one of 'struct', 'union', or 'enum'.
#: c-decl.c:5224
@@ -19753,17 +19750,17 @@ msgstr "muotoilun %s tyypin pitäisi olla %<%s%s%>, mutta argumentti %d on tyypp
#: c-format.c:2334
#, gcc-internal-format
msgid "format %q.*s expects type %<%s%s%>, but argument %d has type %qT"
-msgstr "muotoilu %q.*s edellyttää tyyppiä %<%s%s%>, mutta %d. argumentin tyyppi on %qT"
+msgstr "muotoilu %q.*s odottaa tyyppiä %<%s%s%>, mutta %d. argumentin tyyppi on %qT"
#: c-format.c:2342
#, gcc-internal-format
msgid "%s should have type %<%T%s%>, but argument %d has type %qT"
-msgstr "moutoilun %s tyypin pitäisi olla %<%T%s%>, mutta argumentti %d on tyyppiä %qT"
+msgstr "muotoilun %s tyypin pitäisi olla %<%T%s%>, mutta argumentti %d on tyyppiä %qT"
#: c-format.c:2346
#, gcc-internal-format
msgid "format %q.*s expects type %<%T%s%>, but argument %d has type %qT"
-msgstr "muotoilu %q.*s edellyttää %<%T%s%>-tyyppiä, mutta %d. argumentin tyyppi on %qT"
+msgstr "muotoilu %q.*s odottaa %<%T%s%>-tyyppiä, mutta %d. argumentin tyyppi on %qT"
#: c-format.c:2405 c-format.c:2411 c-format.c:2562
#, gcc-internal-format
@@ -19867,14 +19864,14 @@ msgid "non-standard suffix on floating constant"
msgstr ""
#: c-lex.c:687 c-lex.c:689
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "floating constant exceeds range of %qT"
-msgstr "liukulukuvakio ylittää arvoalueen %<%s%>"
+msgstr "liukulukuvakio ylittää %qT:n arvoalueen"
#: c-lex.c:697
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "floating constant truncated to zero"
-msgstr "liukulukuvakiota käytetty väärin"
+msgstr "liukulukuvakio katkaistu nollaksi"
#: c-lex.c:888
#, gcc-internal-format
@@ -19884,7 +19881,7 @@ msgstr ""
#: c-lex.c:910
#, gcc-internal-format
msgid "traditional C rejects string constant concatenation"
-msgstr "perinteinen C hylkii merkkijonovakiokatenaatioita"
+msgstr "perinteinen C ei salli merkkijonovakioiden katenointia"
#: c-omp.c:119
#, gcc-internal-format
@@ -20084,7 +20081,7 @@ msgstr "#-opastimen on myöhäistä asettaa debug-hakemisto"
#: c-parser.c:226
#, gcc-internal-format
msgid "identifier %qs conflicts with C++ keyword"
-msgstr ""
+msgstr "tunniste %qs on ristiriidassa C++:n varatun sanan kanssa"
#: c-parser.c:971
#, fuzzy, gcc-internal-format
@@ -20120,9 +20117,9 @@ msgid "expected %<=%>, %<,%>, %<;%>, %<asm%> or %<__attribute__%>"
msgstr ""
#: c-parser.c:1275
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C forbids nested functions"
-msgstr "%HISO C kieltää sisäkkäiset funktiot"
+msgstr "ISO C kieltää sisäkkäiset funktiot"
#: c-parser.c:1641 c-parser.c:2454 c-parser.c:3094 c-parser.c:3352
#: c-parser.c:4292 c-parser.c:4892 c-parser.c:5314 c-parser.c:5335
@@ -20150,24 +20147,24 @@ msgid "expected %<{%>"
msgstr ""
#: c-parser.c:1706
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C forbids forward references to %<enum%> types"
msgstr "ISO C kieltää etukäteisviittaukset %<enum%>-tyyppeihin"
#: c-parser.c:1812
#, gcc-internal-format
msgid "expected class name"
-msgstr ""
+msgstr "odotettiin luokan nimeä"
#: c-parser.c:1831 c-parser.c:5859
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "extra semicolon in struct or union specified"
-msgstr "%Hylimääräinen puolipiste structissa tai unionissa"
+msgstr "ylimääräinen puolipiste structissa tai unionissa"
#: c-parser.c:1860
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "no semicolon at end of struct or union"
-msgstr "%Hpuolipiste puuttuu structin tai unionin lopusta"
+msgstr "puolipiste puuttuu structin tai unionin lopusta"
#: c-parser.c:1863
#, gcc-internal-format
@@ -20180,9 +20177,9 @@ msgid "expected specifier-qualifier-list"
msgstr ""
#: c-parser.c:1952
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C forbids member declarations with no members"
-msgstr "%HISO C kieltää jäsenettömät jäsenesittelyt"
+msgstr "ISO C kieltää jäsenettömät jäsenesittelyt"
#: c-parser.c:2028
#, gcc-internal-format
@@ -20220,12 +20217,12 @@ msgid "wide string literal in %<asm%>"
msgstr "leveä merkkijonovakio %<asm%>-lauseessa"
#: c-parser.c:2689 c-parser.c:6726
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "expected string literal"
-msgstr "leveä merkkijonovakio %<asm%>-lauseessa"
+msgstr "odotettiin merkkijonoliteraalia"
#: c-parser.c:3014
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C forbids empty initializer braces"
msgstr "ISO C kieltää tyhjät alustusaaltosulkeet"
@@ -21651,7 +21648,7 @@ msgstr ""
#: c-typeck.c:7513
#, gcc-internal-format
msgid "%Hsuggest explicit braces to avoid ambiguous %<else%>"
-msgstr ""
+msgstr "%Hehdotetaan aaltosulkeita epäselveän %<else%>n välttämiseksi"
#: c-typeck.c:7622 cp/cp-gimplify.c:92
#, gcc-internal-format
@@ -25598,7 +25595,7 @@ msgstr ""
#: config/frv/frv.c:8784
#, gcc-internal-format
msgid "%qs expects a constant argument"
-msgstr ""
+msgstr "%qs odottaa vakioargumenttia"
#: config/frv/frv.c:8789
#, gcc-internal-format
@@ -27265,29 +27262,29 @@ msgid "parameter list does not match a valid signature for %s()"
msgstr ""
#: config/spu/spu.c:447 config/spu/spu.c:458
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "Unknown architecture '%s'"
-msgstr "tuntematon konetila %qs"
+msgstr "Tuntematon arkkitehtuuri ”%s”"
#: config/spu/spu.c:3713
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "`%s' attribute ignored"
-msgstr "%qs attribuuttia ei huomioida"
+msgstr "”%s”-attribuuttia ei huomioida"
#: config/spu/spu.c:5902
#, gcc-internal-format
msgid "%s expects an integer literal in the range [%d, %d]."
-msgstr ""
+msgstr "%s odottaa kokonaislukuliteraalia väliltä [%d, %d]."
#: config/spu/spu.c:5922
#, gcc-internal-format
msgid "%s expects an integer literal in the range [%d, %d]. ("
-msgstr ""
+msgstr "%s odottaa kokonaislukuliteraalia väliltä [%d, %d]. ("
#: config/spu/spu.c:5952
#, gcc-internal-format
msgid "%d least significant bits of %s are ignored."
-msgstr ""
+msgstr "%d vähiten merkitsevää %s:n bittiä ei huomioida."
#: config/stormy16/stormy16.c:1086
#, gcc-internal-format
@@ -27497,7 +27494,7 @@ msgstr ""
#: cp/call.c:2879
#, gcc-internal-format
msgid "conversion from %qT to %qT is ambiguous"
-msgstr "muunnos tyypistä %qT tyyppiin %qT on monitulkintainen"
+msgstr "muunnos tyypistä %qT tyyppiin %qT on moniselitteinen"
#: cp/call.c:3038 cp/call.c:3058 cp/call.c:3122
#, gcc-internal-format
@@ -31217,9 +31214,9 @@ msgid "%H%qD used without template parameters"
msgstr "%J%qD:n edellinen esittely oli täällä"
#: cp/parser.c:4160 cp/parser.c:14892 cp/parser.c:17189
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hreference to %qD is ambiguous"
-msgstr "muunnos tyypistä %qT tyyppiin %qT on monitulkintainen"
+msgstr ""
#: cp/parser.c:4206 cp/pt.c:5659
#, gcc-internal-format
@@ -34670,6 +34667,9 @@ msgstr ""
#~ msgid "Warn about implicit conversion"
#~ msgstr "Varoita implisiittisistä muunnoksista"
+#~ msgid "Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 201x"
+#~ msgstr "Varoita C++:n rakenteista, joilla on eri merkitys ISO C++ 1998- ja ISO C++ 201x -standardeissa"
+
#~ msgid "Enable OpenMP"
#~ msgstr "Käytä OpenMP:tä"
diff --git a/gcc/reginfo.c b/gcc/reginfo.c
index 9b03d64f590..0f11c91a3de 100644
--- a/gcc/reginfo.c
+++ b/gcc/reginfo.c
@@ -952,13 +952,18 @@ allocate_reg_info (void)
}
-/* Resize reg info. The new elements will be uninitialized. */
+/* Resize reg info. The new elements will be uninitialized. Return
+ TRUE if new elements (for new pseudos) were added. */
bool
resize_reg_info (void)
{
int old;
- gcc_assert (reg_pref != NULL);
+ if (reg_pref == NULL)
+ {
+ allocate_reg_info ();
+ return true;
+ }
if (reg_info_size == max_reg_num ())
return false;
old = reg_info_size;
@@ -1000,7 +1005,6 @@ reginfo_init (void)
/* This prevents dump_flow_info from losing if called
before reginfo is run. */
reg_pref = NULL;
- allocate_reg_info ();
/* No more global register variables may be declared. */
no_global_reg_vars = 1;
return 1;
diff --git a/gcc/rtl.h b/gcc/rtl.h
index c5839df4ecb..3427347225d 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -255,8 +255,7 @@ struct GTY((chain_next ("RTX_NEXT (&%h)"),
ECF_LOOPING_CONST_OR_PURE and DECL_LOOPING_CONST_OR_PURE_P. */
unsigned int call : 1;
/* 1 in a REG, MEM, or CONCAT if the value is set at most once, anywhere.
- 1 in a SUBREG if it references an unsigned object whose mode has been
- from a promoted to a wider mode.
+ 1 in a SUBREG used for SUBREG_PROMOTED_UNSIGNED_P.
1 in a SYMBOL_REF if it addresses something in the per-function
constants pool.
1 in a CALL_INSN logically equivalent to ECF_CONST and TREE_READONLY.
@@ -268,10 +267,12 @@ struct GTY((chain_next ("RTX_NEXT (&%h)"),
if it has been deleted.
1 in a REG expression if corresponds to a variable declared by the user,
0 for an internally generated temporary.
- 1 in a SUBREG with a negative value.
+ 1 in a SUBREG used for SUBREG_PROMOTED_UNSIGNED_P.
1 in a LABEL_REF, REG_LABEL_TARGET or REG_LABEL_OPERAND note for a
non-local label.
- In a SYMBOL_REF, this flag is used for machine-specific purposes. */
+ In a SYMBOL_REF, this flag is used for machine-specific purposes.
+ In a PREFETCH, this flag indicates that it should be considered a scheduling
+ barrier. */
unsigned int volatil : 1;
/* 1 in a MEM referring to a field of an aggregate.
0 if the MEM was a variable or the result of a * operator in C;
@@ -1159,6 +1160,15 @@ do { \
_rtx->unchanging = (VAL); \
} \
} while (0)
+
+/* Valid for subregs which are SUBREG_PROMOTED_VAR_P(). In that case
+ this gives the necessary extensions:
+ 0 - signed
+ 1 - normal unsigned
+ -1 - pointer unsigned, which most often can be handled like unsigned
+ extension, except for generating instructions where we need to
+ emit special code (ptr_extend insns) on some architectures. */
+
#define SUBREG_PROMOTED_UNSIGNED_P(RTX) \
((RTL_FLAG_CHECK1("SUBREG_PROMOTED_UNSIGNED_P", (RTX), SUBREG)->volatil) \
? -1 : (int) (RTX)->unchanging)
@@ -1423,6 +1433,10 @@ do { \
offset within that block. */
#define SYMBOL_REF_BLOCK_OFFSET(RTX) (BLOCK_SYMBOL_CHECK (RTX)->offset)
+/* True if RTX is flagged to be a scheduling barrier. */
+#define PREFETCH_SCHEDULE_BARRIER_P(RTX) \
+ (RTL_FLAG_CHECK1("PREFETCH_SCHEDULE_BARRIER_P", (RTX), PREFETCH)->volatil)
+
/* Indicate whether the machine has any sort of auto increment addressing.
If not, we can avoid checking for REG_INC notes. */
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index 25f03d26b57..cef383a1d0e 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -2487,6 +2487,11 @@ sched_analyze_2 (struct deps *deps, rtx x, rtx insn)
flush_pending_lists (deps, insn, true, false);
break;
+ case PREFETCH:
+ if (PREFETCH_SCHEDULE_BARRIER_P (x))
+ reg_pending_barrier = TRUE_BARRIER;
+ break;
+
case UNSPEC_VOLATILE:
flush_pending_lists (deps, insn, true, true);
/* FALLTHRU */
@@ -2593,6 +2598,12 @@ sched_analyze_insn (struct deps *deps, rtx x, rtx insn)
can_start_lhs_rhs_p = (NONJUMP_INSN_P (insn)
&& code == SET);
+ if (may_trap_p (x))
+ /* Avoid moving trapping instructions accross function calls that might
+ not always return. */
+ add_dependence_list (insn, deps->last_function_call_may_noreturn,
+ 1, REG_DEP_ANTI);
+
if (code == COND_EXEC)
{
sched_analyze_2 (deps, COND_EXEC_TEST (x), insn);
@@ -3109,6 +3120,73 @@ sched_analyze_insn (struct deps *deps, rtx x, rtx insn)
}
}
+/* Return TRUE if INSN might not always return normally (e.g. call exit,
+ longjmp, loop forever, ...). */
+static bool
+call_may_noreturn_p (rtx insn)
+{
+ rtx call;
+
+ /* const or pure calls that aren't looping will always return. */
+ if (RTL_CONST_OR_PURE_CALL_P (insn)
+ && !RTL_LOOPING_CONST_OR_PURE_CALL_P (insn))
+ return false;
+
+ call = PATTERN (insn);
+ if (GET_CODE (call) == PARALLEL)
+ call = XVECEXP (call, 0, 0);
+ if (GET_CODE (call) == SET)
+ call = SET_SRC (call);
+ if (GET_CODE (call) == CALL
+ && MEM_P (XEXP (call, 0))
+ && GET_CODE (XEXP (XEXP (call, 0), 0)) == SYMBOL_REF)
+ {
+ rtx symbol = XEXP (XEXP (call, 0), 0);
+ if (SYMBOL_REF_DECL (symbol)
+ && TREE_CODE (SYMBOL_REF_DECL (symbol)) == FUNCTION_DECL)
+ {
+ if (DECL_BUILT_IN_CLASS (SYMBOL_REF_DECL (symbol))
+ == BUILT_IN_NORMAL)
+ switch (DECL_FUNCTION_CODE (SYMBOL_REF_DECL (symbol)))
+ {
+ case BUILT_IN_BCMP:
+ case BUILT_IN_BCOPY:
+ case BUILT_IN_BZERO:
+ case BUILT_IN_INDEX:
+ case BUILT_IN_MEMCHR:
+ case BUILT_IN_MEMCMP:
+ case BUILT_IN_MEMCPY:
+ case BUILT_IN_MEMMOVE:
+ case BUILT_IN_MEMPCPY:
+ case BUILT_IN_MEMSET:
+ case BUILT_IN_RINDEX:
+ case BUILT_IN_STPCPY:
+ case BUILT_IN_STPNCPY:
+ case BUILT_IN_STRCAT:
+ case BUILT_IN_STRCHR:
+ case BUILT_IN_STRCMP:
+ case BUILT_IN_STRCPY:
+ case BUILT_IN_STRCSPN:
+ case BUILT_IN_STRLEN:
+ case BUILT_IN_STRNCAT:
+ case BUILT_IN_STRNCMP:
+ case BUILT_IN_STRNCPY:
+ case BUILT_IN_STRPBRK:
+ case BUILT_IN_STRRCHR:
+ case BUILT_IN_STRSPN:
+ case BUILT_IN_STRSTR:
+ /* Assume certain string/memory builtins always return. */
+ return false;
+ default:
+ break;
+ }
+ }
+ }
+
+ /* For all other calls assume that they might not always return. */
+ return true;
+}
+
/* Analyze INSN with DEPS as a context. */
void
deps_analyze_insn (struct deps *deps, rtx insn)
@@ -3207,7 +3285,16 @@ deps_analyze_insn (struct deps *deps, rtx insn)
/* Remember the last function call for limiting lifetimes. */
free_INSN_LIST_list (&deps->last_function_call);
deps->last_function_call = alloc_INSN_LIST (insn, NULL_RTX);
-
+
+ if (call_may_noreturn_p (insn))
+ {
+ /* Remember the last function call that might not always return
+ normally for limiting moves of trapping insns. */
+ free_INSN_LIST_list (&deps->last_function_call_may_noreturn);
+ deps->last_function_call_may_noreturn
+ = alloc_INSN_LIST (insn, NULL_RTX);
+ }
+
/* Before reload, begin a post-call group, so as to keep the
lifetimes of hard registers correct. */
if (! reload_completed)
@@ -3361,6 +3448,7 @@ init_deps (struct deps *deps)
deps->pending_flush_length = 0;
deps->last_pending_memory_flush = 0;
deps->last_function_call = 0;
+ deps->last_function_call_may_noreturn = 0;
deps->sched_before_next_call = 0;
deps->in_post_call_group_p = not_post_call;
deps->last_debug_insn = 0;
@@ -3441,7 +3529,11 @@ remove_from_deps (struct deps *deps, rtx insn)
}
if (CALL_P (insn))
- remove_from_dependence_list (insn, &deps->last_function_call);
+ {
+ remove_from_dependence_list (insn, &deps->last_function_call);
+ remove_from_dependence_list (insn,
+ &deps->last_function_call_may_noreturn);
+ }
remove_from_dependence_list (insn, &deps->sched_before_next_call);
}
diff --git a/gcc/sched-int.h b/gcc/sched-int.h
index de780e5e395..4d60ece28c9 100644
--- a/gcc/sched-int.h
+++ b/gcc/sched-int.h
@@ -502,6 +502,12 @@ struct deps
Used to prevent register lifetimes from expanding unnecessarily. */
rtx last_function_call;
+ /* A list of the last function calls that may not return normally
+ we have seen. We use a list to represent last function calls from
+ multiple predecessor blocks. Used to prevent moving trapping insns
+ across such calls. */
+ rtx last_function_call_may_noreturn;
+
/* A list of insns which use a pseudo register that does not already
cross a call. We create dependencies between each of those insn
and the next call insn, to ensure that they won't cross a call after
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index ff559adcda5..de2dd0acd1d 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -2645,6 +2645,11 @@ deps_join (struct deps *succ_deps, struct deps *pred_deps)
= concat_INSN_LIST (pred_deps->last_function_call,
succ_deps->last_function_call);
+ /* last_function_call_may_noreturn is inherited by successor. */
+ succ_deps->last_function_call_may_noreturn
+ = concat_INSN_LIST (pred_deps->last_function_call_may_noreturn,
+ succ_deps->last_function_call_may_noreturn);
+
/* sched_before_next_call is inherited by successor. */
succ_deps->sched_before_next_call
= concat_INSN_LIST (pred_deps->sched_before_next_call,
diff --git a/gcc/system.h b/gcc/system.h
index b74e0e5df2f..1b36ddf389a 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -414,6 +414,14 @@ extern void *calloc (size_t, size_t);
extern void *realloc (void *, size_t);
#endif
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+
/* If the system doesn't provide strsignal, we get it defined in
libiberty but no declaration is supplied. */
#if !defined (HAVE_STRSIGNAL) \
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 06e50502bc4..c3d6c52f9a4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,218 @@
+2009-09-10 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41257
+ * g++.dg/torture/pr41257-2.C: New testcase.
+
+2009-09-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/28293
+ * g++.dg/template/crash91.C: New.
+
+2009-09-09 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/39779
+ * gcc.dg/pr39979.c: New test.
+
+2009-09-09 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/41101
+ * gcc.c-torture/compile/pr41101.c: New testcase.
+
+2009-09-09 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41317
+ * gcc.c-torture/execute/pr41317.c: New testcase.
+ * gcc.dg/tree-ssa/forwprop-11.c: XFAIL.
+ * gcc.dg/tree-ssa/forwprop-12.c: Likewise.
+
+2009-09-08 Dodji Seketeli <dodji@redhat.com>
+
+ Fix some test breakages on Darwin
+ * g++.dg/debug/dwarf2/namespace-1.C: Use -fno-merge-debug-string
+ and adjust.
+ * g++.dg/debug/dwarf2/template-func-params-6.C: Likewise.
+ * g++.dg/debug/dwarf2/template-func-params-7.C: Likewise.
+ * g++.dg/debug/dwarf2/template-params-6.C: Likewise.
+ * g++.dg/debug/dwarf2/pubnames-1.C: Likewise. Also, adjust to
+ take darwin specifics in account.
+
+2009-09-08 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/profile-dir-1.c, gcc.dg/profile-dir-2.c,
+ gcc.dg/profile-dir-3.c: Disable for remote-host testing.
+
+2009-09-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/39923
+ * g++.dg/cpp0x/initlist24.C: New.
+
+2009-09-08 Ozkan Sezer <sezeroz@gmail.com>
+
+ * gcc.dg/large-size-array-2.c: Fix target requirement.
+ * gcc.dg/large-size-array-4.c: Likewise.
+ * gcc.dg/c90-const-expr-2.c: Define ZERO as 0LL for _WIN64.
+ * gcc.dg/c99-const-expr-2.c: Likewise.
+ * gcc.dg/c90-const-expr-6.c: Typedef ptrdiff_t with __extension__.
+ * gcc.dg/c90-const-expr-9.c: Typedef size_t with __extension__.
+ * gcc.dg/c90-const-expr-10.c: Likewise.
+ * gcc.dg/torture/pr39074.c: Use intptr_t typedef'ed as __PTRDIFF_TYPE__
+ instead of long.
+ * gcc.dg/tree-ssa/pr33920.c: Likewise.
+ * gcc.dg/vect/pr33846.c: Likewise.
+ * gcc.dg/vect/pr33833.c: Use uintptr_t, typedef'ed as unsigned
+ __PTRDIFF_TYPE__, instead of unsigned long.
+ * gcc.dg/vect/O1-pr33854.c: Use __SIZE_TYPE__ instead of unsigned long.
+
+2009-09-08 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/41229
+ PR debug/41291
+ PR debug/41300
+ * gfortran.dg/pr41229.f90: New.
+
+2009-09-08 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/41232
+ * gcc.dg/pr41232.c: New.
+
+2009-09-08 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.misc-tests/i386-prefetch.exp: Skip tests when multilib flags
+ contain -march.
+ * gcc.dg/tree-ssa/prefetch-7.c, gcc.target/i386/387-1.c,
+ gcc.target/i386/387-5.c, gcc.target/i386/cmov7.c,
+ gcc.target/i386/funcspec-1.c, gcc.target/i386/funcspec-8.c,
+ gcc.target/i386/gcc-have-sync-compare-and-swap-1.c,
+ gcc.target/i386/gcc-have-sync-compare-and-swap-2.c,
+ gcc.target/i386/isa-6.c, gcc.target/i386/lea.c,
+ gcc.target/i386/pentium4-not-mull.c, gcc.target/i386/sse-5.c,
+ gcc.target/i386/ssefn-1.c: Skip when multilib flags contain -march
+ options other than that used in dg-options.
+
+2009-09-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/41239
+ * gcc.c-torture/execute/pr41239.c: New test.
+
+2009-09-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libgfortran/41192
+ * gfortran.dg/namelist_59.f90: New test.
+
+2009-09-07 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ From Mike Frysinger <michael.frysinger@analog.com>
+ * gcc.target/bfin/mcpu-bf542m.c: New file.
+ * gcc.target/bfin/mcpu-bf544m.c: Likewise.
+ * gcc.target/bfin/mcpu-bf546m.c: Likewise.
+ * gcc.target/bfin/mcpu-bf548m.c: Likewise.
+ * gcc.target/bfin/mcpu-bf549m.c: Likewise.
+
+2009-09-07 Martin Jambor <mjambor@suse.cz>
+
+ PR middle-end/41282
+ * gcc.c-torture/compile/pr41282.c: New test.
+
+2009-09-07 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/41197
+ * gfortran.dg/allocate_alloc_opt_1.f90: Use scalar
+ variables for stat and errmsg.
+ * gfortran.dg/deallocate_alloc_opt_1.f90: Likewise.
+ * gfortran.dg/allocate_stat_2.f90: New test.
+
+2009-09-07 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * gcc.c-torture/compile/20090907-1.c: New test.
+
+2009-09-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/41241
+ * gcc.dg/pr41241.c: New test.
+
+2009-09-06 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41144
+ * g++.dg/torture/pr41144.C: New testcase.
+
+2009-09-06 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41261
+ * gcc.dg/torture/pr41261.c: New testcase.
+
+2009-09-05 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41181
+ * gcc.c-torture/compile/pr41181.c: New testcase.
+
+2009-09-05 Richard Guenther <rguenther@suse.de>
+
+ PR debug/41273
+ * g++.dg/torture/pr41273.C: New testcase.
+
+2009-09-05 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/41258
+ * gfortran.dg/typebound_proc_12.f90 : New test.
+
+2009-09-04 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/41225
+ * gfortran.dg/pr41225.f90: New.
+
+2009-09-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * gcc.dg/guality/guality.h: Include stdint.h. Drop unnecessary
+ unistd.h, sys/types.h and sys/wait.h.
+ (gualchk_t): New.
+ (GUALCVT): New.
+ (GUALCHKXPR, GUALCHKVAL, GUALCHKFLA): Use it.
+ (GUALITY_GDB_REDIRECT): New.
+ (GUALITY_GDB_ARGS): Use it.
+
+2009-09-04 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41257
+ * g++.dg/torture/pr41257.C: New testcase.
+
+2009-09-04 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/41112
+ * gnat.dg/array8.adb: New test.
+
+2009-09-03 Daniel Gutson <dgutson@codesourcery.com>
+
+ * gcc.target/arm/ctz.c: New test case.
+
+2009-09-03 Alon Dayan <alond@il.ibm.com>
+
+ PR tree-optimization/38275
+ * testsuite/gcc.dg/autopar/reduc-1char.c: Increase number
+ of iterations. Adjust the logic accordingly.
+ * testsuite/gcc.dg/autopar/reduc-2char.c: Ditto.
+ * testsuite/gcc.dg/autopar/reduc-1.c: Ditto.
+ * testsuite/gcc.dg/autopar/reduc-2.c: Ditto.
+ * testsuite/gcc.dg/autopar/reduc-3.c: Ditto.
+ * testsuite/gcc.dg/autopar/reduc-6.c: Ditto.
+ * testsuite/gcc.dg/autopar/reduc-7.c: Ditto.
+ * testsuite/gcc.dg/autopar/reduc-8.c: Ditto.
+ * testsuite/gcc.dg/autopar/reduc-9.c: Ditto.
+ * testsuite/gcc.dg/autopar/pr39500-1.c: Ditto.
+ * testsuite/gcc.dg/autopar/reduc-1short.c: Ditto.
+ * testsuite/gcc.dg/autopar/reduc-2short.c: Ditto.
+ * testsuite/gcc.dg/autopar/parallelization-1.c: Ditto.
+
+2009-09-03 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/guality/guality.exp: Only run guality tests if a trivial
+ testcase using guality.h compiles and links and if a global variable
+ can be verified by gdb.
+
+2009-09-03 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * lib/target-supports.exp (check_effective_target_sync_int_long):
+ Supported on Blackfin Linux targets.
+
2009-09-02 David Daney <ddaney@caviumnetworks.com>
* gcc.c-torture/compile/builtin_unreachable-1.c: New testcase.
@@ -23,7 +238,7 @@
* gcc.dg/memcpy-1.c: Add . to match pattern.
* gcc.dg/uninit-I.c: XFAIL warning test.
* g++.dg/warn/unit-1.C: XFAIL warning test.
-
+
2009-09-02 Ian Lance Taylor <iant@google.com>
* gcc.dg/20090902-1.c: New test.
@@ -35,9 +250,9 @@
2009-09-02 Olivier Hainque <hainque@adacore.com>
* gnat.dg/array7.ad[bs]: Add check for Signed_Integer_Type_Definition.
-
+
2009-09-02 Eric Botcazou <ebotcazou@adacore.com>
- Olivier Hainque <hainque@adacore.com>
+ Olivier Hainque <hainque@adacore.com>
* gnat.dg/misaligned_param.adb: New test.
* gnat.dg/misaligned_param_pkg.ad[sb]: New helper.
@@ -345,7 +560,7 @@
2009-08-11 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
- * gcc.target/arm/combine-cmp-shift.c: New test.
+ * gcc.target/arm/combine-cmp-shift.c: New test.
2009-08-24 Kai Tietz <kai.tietz@onevision.com>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist24.C b/gcc/testsuite/g++.dg/cpp0x/initlist24.C
new file mode 100644
index 00000000000..33e97c7dfb4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist24.C
@@ -0,0 +1,9 @@
+// PR c++/39923
+// { dg-options "-std=c++0x" }
+
+#include <initializer_list>
+
+void test3()
+{
+ std::initializer_list<int> list{move}; // { dg-error "not declared|could not convert" }
+}
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C
index 59b608fc7ec..d3f26f11222 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C
@@ -1,12 +1,12 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/41170
-// { dg-options "-g -dA" }
+// { dg-options "-g -dA -fno-merge-debug-strings" }
//
// We want to test that there is a DW_TAG_namespace DIE DW_AT_name is set
// to "not_emitted". That namespace die has a child DW_TAG_typedef DIE
// which DW_AT_name is the null terminated string "T".
// { dg-final { scan-assembler-times "DIE +\\(.*?\\) DW_TAG_namespace" 1 } }
-// { dg-final { scan-assembler-times "DW_AT_name: \"not_emitted\"" 1 } }
+// { dg-final { scan-assembler-times "\"not_emitted.0\".*?DW_AT_name" 1 } }
// { dg-final { scan-assembler-times "DIE +\\(.*?\\) DW_TAG_typedef" 1 } }
// { dg-final { scan-assembler-times "\.ascii \"T.0\"\[\t \]+.*?DW_AT_name" 1 } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C
index b2f67036e24..543439da323 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C
@@ -1,9 +1,18 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/39706
-// { dg-options "-g -dA" }
+// { dg-options "-g -dA -fno-merge-debug-strings" }
// { dg-do compile }
-// { dg-final { scan-assembler-times ".debug_pubnames" 1 } }
-// { dg-final { scan-assembler-times "\"main\".*external name" 1 } }
+//
+// There should be one debug_pubnames section generated.
+// On Darwin though, there is also a label pointing at the begining of the
+// debug_pubnames section. The assembly code of that label adds an occurence
+// of section declaration assembly. So on Darwin, we need to check for two
+// occurences of the debug_pubnames section declaration.
+// { dg-final { scan-assembler-times "\.section\[\t \].*?debug_pubnames" 1 { target { ! *-*-darwin* } } } }
+// { dg-final { scan-assembler-times "\.section\[\t \].*?debug_pubnames" 2 { target { *-*-darwin* } } } }
+//
+// Then check of the presence of the names we are interested in.
+// { dg-final { scan-assembler-times "\"main.0\".*external name" 1 } }
// { dg-final { scan-assembler-times "\"ns::ns_x.*external name" 1 } }
// { dg-final { scan-assembler-times "\"y::y_x.*external name" 1 } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C
index 155add48ef4..99bbba3da8d 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C
@@ -1,8 +1,8 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161
-// { dg-options "-g -dA" }
+// { dg-options "-g -dA -fno-merge-debug-strings" }
// { dg-final { scan-assembler-times "DW_TAG_GNU_template_template_param" 2 } }
-// { dg-final { scan-assembler-times "DW_AT_GNU_template_name: \"vector\"" 1 } }
+// { dg-final { scan-assembler-times "\"vector.0\".*?DW_AT_GNU_template_name" 1 } }
// { dg-final { scan-assembler-times ".ascii \"U.0\".*?DW_AT_name" 1 } }
template <class T>
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C
index 07aece6917f..dc6ac990313 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C
@@ -1,6 +1,6 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161
-// { dg-options "-g -dA -std=c++0x" }
+// { dg-options "-g -dA -std=c++0x -fno-merge-debug-strings" }
// { dg-do compile }
// There must be 5 subprograms generated:
@@ -10,10 +10,10 @@
// That makes 6 template type parameters.
// { dg-final {scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_template_type_param" 6 } }
-// { dg-final {scan-assembler-times "DW_AT_name: \"printf<int, char, int>\"" 1 } }
-// { dg-final {scan-assembler-times "DW_AT_name: \"printf<char, int>\"" 1 } }
-// { dg-final {scan-assembler-times "DW_AT_name: \"printf<int>\"" 1 } }
-// { dg-final {scan-assembler-times "DW_AT_name: \"printf\"" 1 } }
+// { dg-final {scan-assembler-times "\"printf<int, char, int>.0\".*?DW_AT_name" 1 } }
+// { dg-final {scan-assembler-times "\"printf<char, int>.0\".*?DW_AT_name" 1 } }
+// { dg-final {scan-assembler-times "\"printf<int>.0\".*?DW_AT_name" 1 } }
+// { dg-final {scan-assembler-times "\"printf.0\".*?DW_AT_name" 1 } }
// printf<int, char, int> and printf<char, int> have a pack expansion as
// function parameters. In the former, the elements of the parameter pack
@@ -21,9 +21,9 @@
// args#1. In the later, the element of the parameter pack expansion
// is PackTypes#0 and the argument is args#0.
// { dg-final {scan-assembler-times "DW_AT_name: \"PackTypes#0\"" 2 } }
-// { dg-final {scan-assembler-times "DW_AT_name: \"args#0\"" 2 } }
-// { dg-final {scan-assembler-times "DW_AT_name: \"PackTypes#1\"" 1 } }
-// { dg-final {scan-assembler-times "DW_AT_name: \"args#1\"" 1 } }
+// { dg-final {scan-assembler-times "\"args#0.0\".*?DW_AT_name" 2 } }
+// { dg-final {scan-assembler-times "\"PackTypes#1.0\".*?DW_AT_name" 1 } }
+// { dg-final {scan-assembler-times "\"args#1.0\".*?DW_AT_name" 1 } }
// { dg_final {scan-assembler-times "\.ascii \"T.0\"\[\t \]+.*?DW_AT_name" 3 } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C
index dc401fa06e7..184a90f98aa 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C
@@ -1,8 +1,8 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161
-// { dg-options "-g -dA" }
+// { dg-options "-g -dA -fno-merge-debug-strings" }
// { dg-final { scan-assembler-times "DW_TAG_GNU_template_template_param" 2 } }
-// { dg-final { scan-assembler-times "DW_AT_GNU_template_name: \"vector\"" 1 } }
+// { dg-final { scan-assembler-times "\"vector.0\".*?DW_AT_GNU_template_name" 1 } }
// { dg-final { scan-assembler-times ".ascii \"U.0\".*?DW_AT_name" 1 } }
template <class T>
diff --git a/gcc/testsuite/g++.dg/template/crash91.C b/gcc/testsuite/g++.dg/template/crash91.C
new file mode 100644
index 00000000000..39575cd9f27
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash91.C
@@ -0,0 +1,8 @@
+// PR c++/28293
+
+template<int> void foo();
+
+struct A
+{
+ typedef void foo<0>(); // { dg-error "explicit template argument list not allowed" }
+};
diff --git a/gcc/testsuite/g++.dg/torture/pr41144.C b/gcc/testsuite/g++.dg/torture/pr41144.C
new file mode 100644
index 00000000000..64dc117d7c6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr41144.C
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+
+struct rgba8;
+template<class ColorT> class span_gouraud {
+public:
+ struct coord_type { };
+ coord_type m_coord[3];
+};
+template<class ColorT> class span_gouraud_rgba : public span_gouraud<ColorT>
+{
+ typedef ColorT color_type;
+ typedef span_gouraud<color_type> base_type;
+ typedef typename base_type::coord_type coord_type;
+public:
+ void prepare() {
+ coord_type coord[3];
+ }
+};
+void the_application() {
+ typedef span_gouraud_rgba<rgba8> gouraud_span_gen_type;
+ gouraud_span_gen_type span_gouraud;
+ span_gouraud.prepare();
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr41257-2.C b/gcc/testsuite/g++.dg/torture/pr41257-2.C
new file mode 100644
index 00000000000..230fa5dde49
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr41257-2.C
@@ -0,0 +1,16 @@
+/* { dg-do link } */
+
+struct A
+{
+ virtual ~A();
+};
+
+struct B : virtual A
+{
+ virtual ~B() {}
+};
+
+int main()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr41257.C b/gcc/testsuite/g++.dg/torture/pr41257.C
new file mode 100644
index 00000000000..60cfc533979
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr41257.C
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+
+struct A
+{
+ virtual void foo();
+ virtual ~A();
+ int i;
+};
+
+struct B : virtual A {};
+
+struct C : B
+{
+ virtual void foo();
+};
+
+void bar()
+{
+ C().foo();
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr41273.C b/gcc/testsuite/g++.dg/torture/pr41273.C
new file mode 100644
index 00000000000..bdce0535583
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr41273.C
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-g" } */
+
+long *H2_ipX_ener_sort;
+double H2_old_populations[2];
+double H2_total;
+
+void H2_LevelPops()
+{
+ double sum_pop = 0.;
+ long nEner = 0;
+ while( nEner < 3 && sum_pop/H2_total < 0.99999 )
+ {
+ long ip = H2_ipX_ener_sort[nEner];
+ sum_pop += H2_old_populations[ip];
+ ++nEner;
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20090907-1.c b/gcc/testsuite/gcc.c-torture/compile/20090907-1.c
new file mode 100644
index 00000000000..907574c4230
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20090907-1.c
@@ -0,0 +1,84 @@
+struct platform_device;
+typedef unsigned long __kernel_size_t;
+typedef unsigned short __u16;
+typedef unsigned int __u32;
+typedef unsigned char u8;
+typedef unsigned short u16;
+typedef __kernel_size_t size_t;
+typedef __u32 uint32_t;
+static inline __attribute__ ((always_inline))
+uint32_t __attribute__ ((pure)) bfin_dspid (void)
+{
+ return ( {
+ uint32_t __v; __v;}
+ );
+}
+struct list_head {
+ struct list_head *next, *prev;
+};
+struct page {
+ union {
+ };
+ struct list_head lru;
+};
+struct device_driver {
+ const char *name;
+ struct module *owner;
+};
+struct fb_info {
+ struct device *dev;
+};
+struct platform_driver {
+ int (*probe) (struct platform_device *);
+ int (*remove) (struct platform_device *);
+ struct device_driver driver;
+};
+struct firmware {
+ size_t size;
+ const u8 *data;
+};
+struct metronomefb_par {
+ struct fb_info *info;
+};
+struct waveform_hdr {
+ u8 trc;
+};
+static u8 calc_cksum (int start, int end, u8 * mem)
+{
+ u8 tmp = 0;
+ int i;
+ for (i = start; i < end; i++)
+ tmp += mem[i];
+ return tmp;
+}
+extern struct waveform_hdr *wfm_hdr;
+extern int wmta;
+
+static int
+load_waveform (u8 * mem, size_t size, int m, int t, struct metronomefb_par *par)
+{
+ int tta;
+ int trn = 0;
+ int i;
+ u8 cksum;
+ int cksum_idx;
+ struct device *dev = par->info->dev;
+ for (i = 0; i <= sizeof (*wfm_hdr) + wfm_hdr->trc; i++) {
+ if (mem[i] > t) {
+ trn = i - sizeof (*wfm_hdr) - 1;
+ }
+ }
+ tta = * (mem + wmta + m * 4) & 0x00FFFFFF;
+ cksum_idx = tta + trn * 4 + 3;
+ cksum = calc_cksum (cksum_idx - 3, cksum_idx, mem);
+ if (cksum != mem[cksum_idx]) {
+ abort();
+ }
+}
+extern struct firmware *fw_entry;
+extern struct metronomefb_par *par;
+
+int metronomefb_probe (struct platform_device *dev)
+{
+ return load_waveform ((u8 *) fw_entry->data, fw_entry->size, 3, 31, par);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41101.c b/gcc/testsuite/gcc.c-torture/compile/pr41101.c
new file mode 100644
index 00000000000..8d21a00ce8a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr41101.c
@@ -0,0 +1,19 @@
+int func(int);
+
+void
+bug(int* x, int* y, unsigned long int N)
+{
+ unsigned long int i;
+ int* t;
+
+ while (1)
+ {
+ for (i=1; i<=N; i++)
+ {
+ y[i] = func(x[i] - x[1]);
+ if (y[i])
+ return;
+ }
+ t=x; x=y; y=t;
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41181.c b/gcc/testsuite/gcc.c-torture/compile/pr41181.c
new file mode 100644
index 00000000000..d0af52d912b
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr41181.c
@@ -0,0 +1,10 @@
+char paths[1024];
+static void x264_slicetype_path(char (*best_paths)[250], int n, int length)
+{
+ __builtin_memcpy (best_paths[n], paths, length);
+}
+void x264_slicetype_analyse(int n, int length)
+{
+ char best_paths[250][250];
+ x264_slicetype_path (best_paths, n, length);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41282.c b/gcc/testsuite/gcc.c-torture/compile/pr41282.c
new file mode 100644
index 00000000000..3a0f02d63ab
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr41282.c
@@ -0,0 +1,20 @@
+struct S
+{
+ unsigned int iu;
+};
+
+union U
+{
+ struct S s;
+ signed int is;
+};
+
+extern signed int bar ();
+
+struct S foo (void)
+{
+ union U u;
+
+ u.is = bar ();
+ return u.s;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr41239.c b/gcc/testsuite/gcc.c-torture/execute/pr41239.c
new file mode 100644
index 00000000000..9966b867c3b
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr41239.c
@@ -0,0 +1,67 @@
+/* PR rtl-optimization/41239 */
+
+struct S
+{
+ short nargs;
+ unsigned long arg[2];
+};
+
+extern void abort (void);
+extern void exit (int);
+extern char fn1 (int, const char *, int, const char *, const char *);
+extern void fn2 (int, ...);
+extern int fn3 (int);
+extern int fn4 (const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
+
+unsigned long
+test (struct S *x)
+{
+ signed int arg1 = x->arg[0];
+ long int arg2 = x->arg[1];
+
+ if (arg2 == 0)
+ (fn1 (20, "foo", 924, __func__, ((void *) 0))
+ ? (fn2 (fn3 (0x2040082), fn4 ("division by zero")))
+ : (void) 0);
+
+ return (long int) arg1 / arg2;
+}
+
+int
+main (void)
+{
+ struct S s = { 2, { 5, 0 } };
+ test (&s);
+ abort ();
+}
+
+__attribute__((noinline)) char
+fn1 (int x, const char *y, int z, const char *w, const char *v)
+{
+ asm volatile ("" : : "r" (w), "r" (v) : "memory");
+ asm volatile ("" : "+r" (x) : "r" (y), "r" (z) : "memory");
+ return x;
+}
+
+__attribute__((noinline)) int
+fn3 (int x)
+{
+ asm volatile ("" : "+r" (x) : : "memory");
+ return x;
+}
+
+__attribute__((noinline)) int
+fn4 (const char *x, ...)
+{
+ asm volatile ("" : "+r" (x) : : "memory");
+ return *x;
+}
+
+__attribute__((noinline)) void
+fn2 (int x, ...)
+{
+ asm volatile ("" : "+r" (x) : : "memory");
+ if (x)
+ /* Could be a longjmp or throw too. */
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr41317.c b/gcc/testsuite/gcc.c-torture/execute/pr41317.c
new file mode 100644
index 00000000000..742068b9ad4
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr41317.c
@@ -0,0 +1,28 @@
+extern void abort (void);
+
+struct A
+{
+ int i;
+};
+struct B
+{
+ struct A a;
+ int j;
+};
+
+static void
+foo (struct B *p)
+{
+ ((struct A *)p)->i = 1;
+}
+
+int main()
+{
+ struct A a;
+ a.i = 0;
+ foo ((struct B *)&a);
+ if (a.i != 1)
+ abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-10.c b/gcc/testsuite/gcc.dg/c90-const-expr-10.c
index 6159390bb94..bad388c90b1 100644
--- a/gcc/testsuite/gcc.dg/c90-const-expr-10.c
+++ b/gcc/testsuite/gcc.dg/c90-const-expr-10.c
@@ -5,24 +5,26 @@
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
-void *p = (__SIZE_TYPE__)(void *)0; /* { dg-error "without a cast" } */
-struct s { void *a; } q = { (__SIZE_TYPE__)(void *)0 }; /* { dg-error "without a cast" } */
+__extension__ typedef __SIZE_TYPE__ size_t;
+
+void *p = (size_t)(void *)0; /* { dg-error "without a cast" } */
+struct s { void *a; } q = { (size_t)(void *)0 }; /* { dg-error "without a cast" } */
void *
f (void)
{
void *r;
- r = (__SIZE_TYPE__)(void *)0; /* { dg-error "without a cast" } */
- return (__SIZE_TYPE__)(void *)0; /* { dg-error "without a cast" } */
+ r = (size_t)(void *)0; /* { dg-error "without a cast" } */
+ return (size_t)(void *)0; /* { dg-error "without a cast" } */
}
void g (void *); /* { dg-message "but argument is of type" } */
void
h (void)
{
- g ((__SIZE_TYPE__)(void *)0); /* { dg-error "without a cast" } */
+ g ((size_t)(void *)0); /* { dg-error "without a cast" } */
}
void g2 (int, void *); /* { dg-message "but argument is of type" } */
void
h2 (void)
{
- g2 (0, (__SIZE_TYPE__)(void *)0); /* { dg-error "without a cast" } */
+ g2 (0, (size_t)(void *)0); /* { dg-error "without a cast" } */
}
diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-2.c b/gcc/testsuite/gcc.dg/c90-const-expr-2.c
index 662d8e790dc..ee57d550372 100644
--- a/gcc/testsuite/gcc.dg/c90-const-expr-2.c
+++ b/gcc/testsuite/gcc.dg/c90-const-expr-2.c
@@ -14,8 +14,10 @@ int *a;
int b;
long *c;
-#if defined(_LP64) || defined(_WIN64)
+#if defined(_LP64)
#define ZERO 0L
+#elif defined(_WIN64)
+#define ZERO 0LL
#else
#define ZERO 0
#endif
diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-6.c b/gcc/testsuite/gcc.dg/c90-const-expr-6.c
index 50de3a9525f..c432cca6343 100644
--- a/gcc/testsuite/gcc.dg/c90-const-expr-6.c
+++ b/gcc/testsuite/gcc.dg/c90-const-expr-6.c
@@ -4,11 +4,13 @@
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
+__extension__ typedef __PTRDIFF_TYPE__ ptrdiff_t;
+
/* PR 29116. */
int n = 0, p[n * 0 + 1]; /* { dg-error "variabl|can't be evaluated" } */
/* PR 31871. */
-extern int c[1 + ((__PTRDIFF_TYPE__) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
+extern int c[1 + ((ptrdiff_t) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
/* Implicit conversions from floating-point constants are not OK,
although explicit ones are. */
@@ -32,7 +34,7 @@ struct s {
};
enum e {
- E = (1 + ((__PTRDIFF_TYPE__) (void *) 0)), /* { dg-error "constant" } */
+ E = (1 + ((ptrdiff_t) (void *) 0)), /* { dg-error "constant" } */
E2 = 0
};
@@ -44,7 +46,7 @@ enum f {
void
f (int a)
{
- int v[1 + ((__PTRDIFF_TYPE__) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
+ int v[1 + ((ptrdiff_t) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
switch (a)
{
case (n * 0 + 1): /* { dg-error "constant" } */
diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-9.c b/gcc/testsuite/gcc.dg/c90-const-expr-9.c
index d9ab3756599..a06cdd951b2 100644
--- a/gcc/testsuite/gcc.dg/c90-const-expr-9.c
+++ b/gcc/testsuite/gcc.dg/c90-const-expr-9.c
@@ -14,7 +14,9 @@ struct t {
int b[2];
};
-#define old_offsetof(TYPE, MEMBER) ((__SIZE_TYPE__) &((TYPE *)0)->MEMBER)
+__extension__ typedef __SIZE_TYPE__ size_t;
+
+#define old_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
enum e {
E1 = old_offsetof (struct s, a), /* { dg-error "constant" } */
diff --git a/gcc/testsuite/gcc.dg/c99-const-expr-2.c b/gcc/testsuite/gcc.dg/c99-const-expr-2.c
index 8e5a600185f..a78e412d35a 100644
--- a/gcc/testsuite/gcc.dg/c99-const-expr-2.c
+++ b/gcc/testsuite/gcc.dg/c99-const-expr-2.c
@@ -14,8 +14,10 @@ int *a;
int b;
long *c;
-#if defined(_LP64) || defined(_WIN64)
+#if defined(_LP64)
#define ZERO 0L
+#elif defined(_WIN64)
+#define ZERO 0LL
#else
#define ZERO 0
#endif
diff --git a/gcc/testsuite/gcc.dg/guality/guality.exp b/gcc/testsuite/gcc.dg/guality/guality.exp
index b151c2e0772..15a6e5e6342 100644
--- a/gcc/testsuite/gcc.dg/guality/guality.exp
+++ b/gcc/testsuite/gcc.dg/guality/guality.exp
@@ -2,6 +2,30 @@
load_lib gcc-dg.exp
+proc check_guality {args} {
+ set result [eval check_compile guality_check executable $args "-g -O0"]
+ set lines [lindex $result 0]
+ set output [lindex $result 1]
+ set ret 0
+ if {[string match "" $lines]} {
+ set execout [gcc_load "./$output"]
+ set ret [string match "*1 PASS, 0 FAIL, 0 UNRESOLVED*" $execout]
+ }
+ remote_file build delete $output
+ return $ret
+}
+
dg-init
-gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] ""
+
+if {[check_guality "
+ #include \"$srcdir/$subdir/guality.h\"
+ volatile long int varl = 6;
+ int main (int argc, char *argv\[\])
+ {
+ GUALCHKVAL (varl);
+ return 0;
+ }
+"]} {
+ gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] ""
+}
dg-finish
diff --git a/gcc/testsuite/gcc.dg/guality/guality.h b/gcc/testsuite/gcc.dg/guality/guality.h
index 6025da8b028..eec0ab6bedf 100644
--- a/gcc/testsuite/gcc.dg/guality/guality.h
+++ b/gcc/testsuite/gcc.dg/guality/guality.h
@@ -21,9 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/wait.h>
+#include <stdint.h>
/* This is a first cut at checking that debug information matches
run-time. The idea is to annotate programs with GUALCHK* macros
@@ -56,8 +54,20 @@ along with GCC; see the file COPYING3. If not see
so that __FILE__ and __LINE__ will be usable to identify them.
*/
+/* This is the type we use to pass values to guality_check. */
+
+typedef intmax_t gualchk_t;
+
+/* Convert a pointer or integral type to the widest integral type,
+ as expected by guality_check. */
+
+#define GUALCVT(val) \
+ ((gualchk_t)__builtin_choose_expr \
+ (__builtin_types_compatible_p (__typeof (val), gualchk_t), \
+ (val), (intptr_t)(val)))
+
/* Attach a debugger to the current process and verify that the string
- EXPR, evaluated by the debugger, yields the long long number VAL.
+ EXPR, evaluated by the debugger, yields the gualchk_t number VAL.
If the debugger cannot compute the expression, say because the
variable is unavailable, this will count as an error, unless unkok
is nonzero. */
@@ -73,13 +83,13 @@ along with GCC; see the file COPYING3. If not see
guality_check, although not necessarily after the call. */
#define GUALCHKXPR(expr) \
- GUALCHKXPRVAL (#expr, (long long)(expr), 1)
+ GUALCHKXPRVAL (#expr, GUALCVT (expr), 1)
/* Same as GUALCHKXPR, but issue an error if the variable is optimized
away. */
#define GUALCHKVAL(expr) \
- GUALCHKXPRVAL (#expr, (long long)(expr), 0)
+ GUALCHKXPRVAL (#expr, GUALCVT (expr), 0)
/* Check that a debugger knows that EXPR evaluates to the run-time
value of EXPR. Unknown values are marked as errors, because the
@@ -91,7 +101,7 @@ along with GCC; see the file COPYING3. If not see
#define GUALCHKFLA(expr) do { \
__typeof(expr) volatile __preserve_after; \
__typeof(expr) __preserve_before = (expr); \
- GUALCHKXPRVAL (#expr, (long long)(__preserve_before), 0); \
+ GUALCHKXPRVAL (#expr, GUALCVT (__preserve_before), 0); \
__preserve_after = __preserve_before; \
asm ("" : : "m" (__preserve_after)); \
} while (0)
@@ -119,7 +129,14 @@ along with GCC; see the file COPYING3. If not see
static const char *guality_gdb_command;
#define GUALITY_GDB_DEFAULT "gdb"
-#define GUALITY_GDB_ARGS " -nx -nw --quiet > /dev/null 2>&1"
+#if defined(__unix)
+# define GUALITY_GDB_REDIRECT " > /dev/null 2>&1"
+#elif defined (_WIN32) || defined (MSDOS)
+# define GUALITY_GDB_REDIRECT " > nul"
+#else
+# define GUALITY_GDB_REDRECT ""
+#endif
+#define GUALITY_GDB_ARGS " -nx -nw --quiet" GUALITY_GDB_REDIRECT
/* Kinds of results communicated as exit status from child process
that runs gdb to the parent process that's being monitored. */
@@ -155,7 +172,7 @@ int volatile guality_attached;
extern int guality_main (int argc, char *argv[]);
static void __attribute__((noinline))
-guality_check (const char *name, long long value, int unknown_ok);
+guality_check (const char *name, gualchk_t value, int unknown_ok);
/* Set things up, run guality_main, then print a summary and quit. */
@@ -228,7 +245,7 @@ continue\n\
have an UNRESOLVED. Otherwise, it's a FAIL. */
static void __attribute__((noinline))
-guality_check (const char *name, long long value, int unknown_ok)
+guality_check (const char *name, gualchk_t value, int unknown_ok)
{
int result;
@@ -236,7 +253,7 @@ guality_check (const char *name, long long value, int unknown_ok)
return;
{
- volatile long long xvalue = -1;
+ volatile gualchk_t xvalue = -1;
volatile int unavailable = 0;
if (name)
{
diff --git a/gcc/testsuite/gcc.dg/large-size-array-2.c b/gcc/testsuite/gcc.dg/large-size-array-2.c
index a1da14b1f72..bff2f8250fb 100644
--- a/gcc/testsuite/gcc.dg/large-size-array-2.c
+++ b/gcc/testsuite/gcc.dg/large-size-array-2.c
@@ -4,4 +4,4 @@
static char * name[] = {
[0x80000000] = "bar"
};
-/* { dg-error "too large" "" { target { { ! lp64 } || x86_64-*-mingw* } } 6 } */
+/* { dg-error "too large" "" { target { { ! lp64 } && { ! llp64 } } } 6 } */
diff --git a/gcc/testsuite/gcc.dg/large-size-array-4.c b/gcc/testsuite/gcc.dg/large-size-array-4.c
index 4f88f2c93ed..f6099b9152b 100644
--- a/gcc/testsuite/gcc.dg/large-size-array-4.c
+++ b/gcc/testsuite/gcc.dg/large-size-array-4.c
@@ -4,4 +4,4 @@
static char * name[] = {
[0x80000000] = "bar"
};
-/* { dg-error "too large" "" { target { { ! lp64 } || x86_64-*-mingw* } } 6 } */
+/* { dg-error "too large" "" { target { { ! lp64 } && { ! llp64 } } } 6 } */
diff --git a/gcc/testsuite/gcc.dg/pr39779.c b/gcc/testsuite/gcc.dg/pr39779.c
new file mode 100644
index 00000000000..7d3cef17c67
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr39779.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-w" } */
+
+int test (char v1)
+{
+ v1 >>= 0xdebecced;
+ return v1;
+}
diff --git a/gcc/testsuite/gcc.dg/pr41232.c b/gcc/testsuite/gcc.dg/pr41232.c
new file mode 100644
index 00000000000..17ec54899d7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr41232.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -g" } */
+extern int atoi (const char *);
+extern int sprintf (char *, const char *, ...);
+void malloc_init() {
+ char *cptr;
+ char buf[1];
+ int tmbd = atoi(cptr);
+ if (tmbd > 0)
+ tmbd = (tmbd <= 124) ? tmbd : 124;
+ else
+ tmbd = 0;
+ sprintf(buf, "%d\n", tmbd);
+}
diff --git a/gcc/testsuite/gcc.dg/pr41241.c b/gcc/testsuite/gcc.dg/pr41241.c
new file mode 100644
index 00000000000..b69aa96ca5e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr41241.c
@@ -0,0 +1,34 @@
+/* PR bootstrap/41241 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcompare-debug -g" } */
+/* { dg-options "-O2 -fcompare-debug -g -march=i586 -mtune=i586 -fomit-frame-pointer" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+
+typedef struct { int t1; int t2; int t3; } *T;
+typedef struct { int s; } S;
+
+int fn1 (int);
+int fn2 (int, int, int);
+int fn3 (void);
+
+static S
+bar ()
+{
+ S s = { 0 };
+ return s;
+}
+
+void
+foo (T x)
+{
+ int a, b, c, d, e;
+ T f, g;
+ S h;
+ a = x->t2;
+ fn1 (x->t1);
+ h = bar (b);
+ c = fn1 (e);
+ d = fn3 ();
+ f->t3 &= g->t3 |= fn2 (0, b, x->t1);
+ fn2 (0, c, d);
+ fn2 (0, e, 0);
+}
diff --git a/gcc/testsuite/gcc.dg/profile-dir-1.c b/gcc/testsuite/gcc.dg/profile-dir-1.c
index a0a22ffb0b0..6745c3b0daa 100644
--- a/gcc/testsuite/gcc.dg/profile-dir-1.c
+++ b/gcc/testsuite/gcc.dg/profile-dir-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O -fprofile-generate=. -fdump-tree-tree_profile" } */
+/* { dg-require-host-local "" } */
/* { dg-final { scan-tree-dump " ./profile-dir-1.gcda" "tree_profile" } } */
int
diff --git a/gcc/testsuite/gcc.dg/profile-dir-2.c b/gcc/testsuite/gcc.dg/profile-dir-2.c
index 454f0641aa2..2bfbee3f408 100644
--- a/gcc/testsuite/gcc.dg/profile-dir-2.c
+++ b/gcc/testsuite/gcc.dg/profile-dir-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O -fprofile-generate -fdump-tree-tree_profile" } */
+/* { dg-require-host-local "" } */
/* { dg-final { scan-tree-dump "/profile-dir-2.gcda" "tree_profile" } } */
int
diff --git a/gcc/testsuite/gcc.dg/profile-dir-3.c b/gcc/testsuite/gcc.dg/profile-dir-3.c
index 29b0a558712..8de891f03b8 100644
--- a/gcc/testsuite/gcc.dg/profile-dir-3.c
+++ b/gcc/testsuite/gcc.dg/profile-dir-3.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O -fprofile-generate -fprofile-dir=. -fdump-tree-tree_profile" } */
+/* { dg-require-host-local "" } */
/* { dg-final { scan-tree-dump " ./profile-dir-3.gcda" "tree_profile" } } */
int
diff --git a/gcc/testsuite/gcc.dg/torture/pr39074.c b/gcc/testsuite/gcc.dg/torture/pr39074.c
index 7be7e227b25..fe35cd908ae 100644
--- a/gcc/testsuite/gcc.dg/torture/pr39074.c
+++ b/gcc/testsuite/gcc.dg/torture/pr39074.c
@@ -2,9 +2,11 @@
/* { dg-options "-fdump-tree-alias" } */
/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
+typedef __PTRDIFF_TYPE__ intptr_t;
+
int i;
void __attribute__((noinline))
-foo(long b, long q)
+foo(long b, intptr_t q)
{
int *y;
int **a = &y, **x;
diff --git a/gcc/testsuite/gcc.dg/torture/pr41261.c b/gcc/testsuite/gcc.dg/torture/pr41261.c
new file mode 100644
index 00000000000..8e601555cb5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr41261.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-fprofile-arcs" } */
+
+extern void relocate_kernel();
+void machine_kexec(void *control_page)
+{
+ __builtin_memcpy(control_page, relocate_kernel, 2048);
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c
index eaaa6dd4e24..73051ae9645 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c
@@ -15,5 +15,5 @@ int g(int *p, int n)
return q[-1];
}
-/* { dg-final { scan-tree-dump-times "= \\\(\\\*a_..\\\)\\\[1\\\];" 2 "forwprop1" } } */
+/* { dg-final { scan-tree-dump-times "= \\\(\\\*a_..\\\)\\\[1\\\];" 2 "forwprop1" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "forwprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-12.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-12.c
index a74809b609e..1c5ea02ba78 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-12.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-12.c
@@ -18,5 +18,5 @@ int bar(struct X *p, int i)
/* We should have propagated the base array address through the
address arithmetic into the memory access as an array access. */
-/* { dg-final { scan-tree-dump-times "->a\\\[D\\\." 2 "forwprop1" } } */
+/* { dg-final { scan-tree-dump-times "->a\\\[D\\\." 2 "forwprop1" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "forwprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr33920.c b/gcc/testsuite/gcc.dg/tree-ssa/pr33920.c
index 7ddcb21921f..0b91dae3840 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr33920.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr33920.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-O3" } */
+typedef __PTRDIFF_TYPE__ intptr_t;
typedef union lispunion *object;
struct character
{
@@ -22,14 +23,14 @@ void init_code ()
object V659;
object _x, _y;
object V643;
- long V648;
+ intptr_t V648;
unsigned char V653;
object V651;
object V654;
object V658;
T1240:
-if (V648 >= (long)V651) /* { dg-warning "cast from pointer to integer of different size" "" { target { ! int32plus } } } */
+if (V648 >= (intptr_t)V651) /* { dg-warning "cast from pointer to integer of different size" "" { target { ! int32plus } } } */
goto T1243;
V653 = ((char *) V654->v.v_self)[V648];
V659 = (object) V654 + V653;
@@ -41,7 +42,7 @@ T1261:
goto T1249;
goto T1224;
T1249:
- V648 = (long) V648 + 1;
+ V648 = (intptr_t) V648 + 1;
goto T1240;
T1243:
V643 = (object) & Cnil_body;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c b/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c
index 3024bed1b71..856df0a4a8f 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c
@@ -1,5 +1,6 @@
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=athlon" } } */
/* { dg-options "-O2 -fprefetch-loop-arrays -march=athlon -msse2 -mfpmath=sse --param simultaneous-prefetches=100 --param max-unrolled-insns=1 -fdump-tree-aprefetch-details -fdump-tree-optimized" } */
#define K 1000000
diff --git a/gcc/testsuite/gcc.dg/vect/O1-pr33854.c b/gcc/testsuite/gcc.dg/vect/O1-pr33854.c
index 346da6b60bd..4d4171fc449 100644
--- a/gcc/testsuite/gcc.dg/vect/O1-pr33854.c
+++ b/gcc/testsuite/gcc.dg/vect/O1-pr33854.c
@@ -1,7 +1,7 @@
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
/* { dg-do compile } */
-extern void *malloc (long unsigned int __size);
+extern void *malloc (__SIZE_TYPE__ __size);
typedef struct VMatrix_ VMatrix;
struct VMatrix_
{
diff --git a/gcc/testsuite/gcc.dg/vect/pr33833.c b/gcc/testsuite/gcc.dg/vect/pr33833.c
index f862a915cb6..ebdfcb1f818 100644
--- a/gcc/testsuite/gcc.dg/vect/pr33833.c
+++ b/gcc/testsuite/gcc.dg/vect/pr33833.c
@@ -1,6 +1,10 @@
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
/* { dg-do compile } */
+#define signed
+typedef unsigned __PTRDIFF_TYPE__ uintptr_t;
+#undef signed
+
struct list_head
{
struct list_head *prev;
@@ -14,7 +18,7 @@ struct rq
struct prio_array *active, arrays[2];
} per_cpu__runqueues;
-void sched_init (unsigned long __ptr)
+void sched_init (uintptr_t __ptr)
{
int j, k;
struct prio_array *array;
diff --git a/gcc/testsuite/gcc.dg/vect/pr33846.c b/gcc/testsuite/gcc.dg/vect/pr33846.c
index f31e207bdef..3f421c9b75d 100644
--- a/gcc/testsuite/gcc.dg/vect/pr33846.c
+++ b/gcc/testsuite/gcc.dg/vect/pr33846.c
@@ -7,7 +7,9 @@ int clamp_val (int i)
return ~i >> 31;
}
-void _mix_some_samples (long buf, int *mix_buffer, int mix_size)
+typedef __PTRDIFF_TYPE__ intptr_t;
+
+void _mix_some_samples (intptr_t buf, int *mix_buffer, int mix_size)
{
int i;
signed int *p = mix_buffer;
diff --git a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
index 60f7e6ba533..9aa81e68641 100644
--- a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
+++ b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
@@ -90,6 +90,13 @@ load_lib torture-options.exp
dg-init
torture-init
+if { [board_info target exists multilib_flags]
+ && [string match "* -march=*" " [board_info target multilib_flags] "] } {
+ # Multilib flags come after the -march flags we pass and override
+ # them, so skip these tests when such flags are passed.
+ return
+}
+
set-torture-options $PREFETCH_NONE {{}} $LTO_TORTURE_OPTIONS
gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/i386-pf-none-*.c]] ""
diff --git a/gcc/testsuite/gcc.target/arm/ctz.c b/gcc/testsuite/gcc.target/arm/ctz.c
new file mode 100644
index 00000000000..63e9d0266d2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ctz.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm32 } */
+/* { dg-options "-O2 -march=armv6t2" } */
+
+unsigned int functest(unsigned int x)
+{
+ return __builtin_ctz(x);
+}
+
+/* { dg-final { scan-assembler "rbit" } } */
+/* { dg-final { scan-assembler "clz" } } */
+/* { dg-final { scan-assembler-not "rsb" } } */
diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf542m.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf542m.c
new file mode 100644
index 00000000000..74d377045c9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf542m.c
@@ -0,0 +1,41 @@
+/* Test for -mcpu=. */
+/* { dg-do preprocess } */
+/* { dg-bfin-options "-mcpu=bf542m" } */
+
+#ifndef __ADSPBF542__
+#error "__ADSPBF542__ is not defined"
+#endif
+
+#ifndef __ADSPBF542M__
+#error "__ADSPBF542M__ is not defined"
+#endif
+
+#ifndef __ADSPBF54x__
+#error "__ADSPBF54x__ is not defined"
+#endif
+
+#if __SILICON_REVISION__ != 0x0003
+#error "__SILICON_REVISION__ is not 0x0003"
+#endif
+
+#ifndef __WORKAROUNDS_ENABLED
+#error "__WORKAROUNDS_ENABLED is not defined"
+#endif
+
+#if __SILICON_REVISION__ <= 0x0001
+#ifndef __WORKAROUND_RETS
+#error "__WORKAROUND_RETS is not defined"
+#endif
+#else
+#ifdef __WORKAROUND_RETS
+#error "__WORKAROUND_RETS is defined"
+#endif
+#endif
+
+#ifndef __WORKAROUND_SPECULATIVE_LOADS
+#error "__WORKAROUND_SPECULATIVE_LOADS is not defined"
+#endif
+
+#ifdef __WORKAROUND_SPECULATIVE_SYNCS
+#error "__WORKAROUND_SPECULATIVE_SYNCS is defined"
+#endif
diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf544m.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf544m.c
new file mode 100644
index 00000000000..a0289378c1a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf544m.c
@@ -0,0 +1,41 @@
+/* Test for -mcpu=. */
+/* { dg-do preprocess } */
+/* { dg-bfin-options "-mcpu=bf544m" } */
+
+#ifndef __ADSPBF544__
+#error "__ADSPBF544__ is not defined"
+#endif
+
+#ifndef __ADSPBF544M__
+#error "__ADSPBF544M__ is not defined"
+#endif
+
+#ifndef __ADSPBF54x__
+#error "__ADSPBF54x__ is not defined"
+#endif
+
+#if __SILICON_REVISION__ != 0x0003
+#error "__SILICON_REVISION__ is not 0x0003"
+#endif
+
+#ifndef __WORKAROUNDS_ENABLED
+#error "__WORKAROUNDS_ENABLED is not defined"
+#endif
+
+#if __SILICON_REVISION__ <= 0x0001
+#ifndef __WORKAROUND_RETS
+#error "__WORKAROUND_RETS is not defined"
+#endif
+#else
+#ifdef __WORKAROUND_RETS
+#error "__WORKAROUND_RETS is defined"
+#endif
+#endif
+
+#ifndef __WORKAROUND_SPECULATIVE_LOADS
+#error "__WORKAROUND_SPECULATIVE_LOADS is not defined"
+#endif
+
+#ifdef __WORKAROUND_SPECULATIVE_SYNCS
+#error "__WORKAROUND_SPECULATIVE_SYNCS is defined"
+#endif
diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf547m.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf547m.c
new file mode 100644
index 00000000000..e5e1f9b30ae
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf547m.c
@@ -0,0 +1,41 @@
+/* Test for -mcpu=. */
+/* { dg-do preprocess } */
+/* { dg-bfin-options "-mcpu=bf547m" } */
+
+#ifndef __ADSPBF547__
+#error "__ADSPBF547__ is not defined"
+#endif
+
+#ifndef __ADSPBF547M__
+#error "__ADSPBF547M__ is not defined"
+#endif
+
+#ifndef __ADSPBF54x__
+#error "__ADSPBF54x__ is not defined"
+#endif
+
+#if __SILICON_REVISION__ != 0x0003
+#error "__SILICON_REVISION__ is not 0x0003"
+#endif
+
+#ifndef __WORKAROUNDS_ENABLED
+#error "__WORKAROUNDS_ENABLED is not defined"
+#endif
+
+#if __SILICON_REVISION__ <= 0x0001
+#ifndef __WORKAROUND_RETS
+#error "__WORKAROUND_RETS is not defined"
+#endif
+#else
+#ifdef __WORKAROUND_RETS
+#error "__WORKAROUND_RETS is defined"
+#endif
+#endif
+
+#ifndef __WORKAROUND_SPECULATIVE_LOADS
+#error "__WORKAROUND_SPECULATIVE_LOADS is not defined"
+#endif
+
+#ifdef __WORKAROUND_SPECULATIVE_SYNCS
+#error "__WORKAROUND_SPECULATIVE_SYNCS is defined"
+#endif
diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf548m.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf548m.c
new file mode 100644
index 00000000000..47afafffef5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf548m.c
@@ -0,0 +1,41 @@
+/* Test for -mcpu=. */
+/* { dg-do preprocess } */
+/* { dg-bfin-options "-mcpu=bf548m" } */
+
+#ifndef __ADSPBF548__
+#error "__ADSPBF548__ is not defined"
+#endif
+
+#ifndef __ADSPBF548M__
+#error "__ADSPBF548M__ is not defined"
+#endif
+
+#ifndef __ADSPBF54x__
+#error "__ADSPBF54x__ is not defined"
+#endif
+
+#if __SILICON_REVISION__ != 0x0003
+#error "__SILICON_REVISION__ is not 0x0003"
+#endif
+
+#ifndef __WORKAROUNDS_ENABLED
+#error "__WORKAROUNDS_ENABLED is not defined"
+#endif
+
+#if __SILICON_REVISION__ <= 0x0001
+#ifndef __WORKAROUND_RETS
+#error "__WORKAROUND_RETS is not defined"
+#endif
+#else
+#ifdef __WORKAROUND_RETS
+#error "__WORKAROUND_RETS is defined"
+#endif
+#endif
+
+#ifndef __WORKAROUND_SPECULATIVE_LOADS
+#error "__WORKAROUND_SPECULATIVE_LOADS is not defined"
+#endif
+
+#ifdef __WORKAROUND_SPECULATIVE_SYNCS
+#error "__WORKAROUND_SPECULATIVE_SYNCS is defined"
+#endif
diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf549m.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf549m.c
new file mode 100644
index 00000000000..8aa7ad56057
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf549m.c
@@ -0,0 +1,41 @@
+/* Test for -mcpu=. */
+/* { dg-do preprocess } */
+/* { dg-bfin-options "-mcpu=bf549m" } */
+
+#ifndef __ADSPBF549__
+#error "__ADSPBF549__ is not defined"
+#endif
+
+#ifndef __ADSPBF549M__
+#error "__ADSPBF549M__ is not defined"
+#endif
+
+#ifndef __ADSPBF54x__
+#error "__ADSPBF54x__ is not defined"
+#endif
+
+#if __SILICON_REVISION__ != 0x0003
+#error "__SILICON_REVISION__ is not 0x0003"
+#endif
+
+#ifndef __WORKAROUNDS_ENABLED
+#error "__WORKAROUNDS_ENABLED is not defined"
+#endif
+
+#if __SILICON_REVISION__ <= 0x0001
+#ifndef __WORKAROUND_RETS
+#error "__WORKAROUND_RETS is not defined"
+#endif
+#else
+#ifdef __WORKAROUND_RETS
+#error "__WORKAROUND_RETS is defined"
+#endif
+#endif
+
+#ifndef __WORKAROUND_SPECULATIVE_LOADS
+#error "__WORKAROUND_SPECULATIVE_LOADS is not defined"
+#endif
+
+#ifdef __WORKAROUND_SPECULATIVE_SYNCS
+#error "__WORKAROUND_SPECULATIVE_SYNCS is defined"
+#endif
diff --git a/gcc/testsuite/gcc.target/i386/387-1.c b/gcc/testsuite/gcc.target/i386/387-1.c
index 2b3ca0b0610..83af71f9647 100644
--- a/gcc/testsuite/gcc.target/i386/387-1.c
+++ b/gcc/testsuite/gcc.target/i386/387-1.c
@@ -1,6 +1,7 @@
/* Verify that -mno-fancy-math-387 works. */
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=i386" } } */
/* { dg-options "-O -ffast-math -mfpmath=387 -mno-fancy-math-387 -march=i386" } */
/* { dg-final { scan-assembler "call\t(.*)sin" } } */
/* { dg-final { scan-assembler "call\t(.*)cos" } } */
diff --git a/gcc/testsuite/gcc.target/i386/387-5.c b/gcc/testsuite/gcc.target/i386/387-5.c
index 0a050081780..027799a878a 100644
--- a/gcc/testsuite/gcc.target/i386/387-5.c
+++ b/gcc/testsuite/gcc.target/i386/387-5.c
@@ -1,6 +1,7 @@
/* Verify that -mno-fancy-math-387 works. */
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=i386" } } */
/* { dg-options "-O -ffast-math -mfpmath=387 -mno-fancy-math-387 -march=i386" } */
/* { dg-final { scan-assembler "call\t(.*)atan" } } */
/* { dg-final { scan-assembler "call\t(.*)log1p" } } */
diff --git a/gcc/testsuite/gcc.target/i386/cmov7.c b/gcc/testsuite/gcc.target/i386/cmov7.c
index 31b48165432..433bf57f8e7 100644
--- a/gcc/testsuite/gcc.target/i386/cmov7.c
+++ b/gcc/testsuite/gcc.target/i386/cmov7.c
@@ -1,6 +1,7 @@
/* PR middle-end/33187 */
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -ffast-math -march=k8 -mbranch-cost=5 -mfpmath=387" } */
/* { dg-final { scan-assembler "fcmov" } } */
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-1.c b/gcc/testsuite/gcc.target/i386/funcspec-1.c
index 1416c75f357..52420ec93e9 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-1.c
+++ b/gcc/testsuite/gcc.target/i386/funcspec-1.c
@@ -3,6 +3,7 @@
for a function that doesn't use attribute((option)). */
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=i386" } } */
/* { dg-options "-O3 -ftree-vectorize -march=i386" } */
/* { dg-final { scan-assembler "addps\[ \t\]" } } */
/* { dg-final { scan-assembler "fsubs\[ \t\]" } } */
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-8.c b/gcc/testsuite/gcc.target/i386/funcspec-8.c
index 2b8bb6f4af6..c370733a01b 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-8.c
+++ b/gcc/testsuite/gcc.target/i386/funcspec-8.c
@@ -1,6 +1,7 @@
/* Test whether using target specific options, we can use the x86 builtin
functions in functions with the appropriate function specific options. */
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -march=k8 -mfpmath=sse" } */
typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__));
diff --git a/gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-1.c b/gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-1.c
index 598f2ddbc31..d20a7176038 100644
--- a/gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-1.c
+++ b/gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-1.c
@@ -1,5 +1,6 @@
/* { dg-do preprocess } */
/* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=i386" } } */
/* { dg-options "-march=i386" } */
#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
diff --git a/gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-2.c b/gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-2.c
index fa6e7c654ef..01a49b64a83 100644
--- a/gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-2.c
+++ b/gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-2.c
@@ -1,5 +1,6 @@
/* { dg-do preprocess } */
/* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=i486" } } */
/* { dg-options "-march=i486" } */
#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
diff --git a/gcc/testsuite/gcc.target/i386/isa-6.c b/gcc/testsuite/gcc.target/i386/isa-6.c
index ec1fbeaa4d4..7f01a884ea6 100644
--- a/gcc/testsuite/gcc.target/i386/isa-6.c
+++ b/gcc/testsuite/gcc.target/i386/isa-6.c
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=amdfam10" } } */
/* { dg-options "-march=amdfam10 -mno-sse4" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/i386/lea.c b/gcc/testsuite/gcc.target/i386/lea.c
index afbbfa4fbc0..f8f967e00f1 100644
--- a/gcc/testsuite/gcc.target/i386/lea.c
+++ b/gcc/testsuite/gcc.target/i386/lea.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=pentiumpro" } } */
/* { dg-options "-O2 -march=pentiumpro" } */
/* { dg-final { scan-assembler "leal" } } */
typedef struct {
diff --git a/gcc/testsuite/gcc.target/i386/pentium4-not-mull.c b/gcc/testsuite/gcc.target/i386/pentium4-not-mull.c
index be48185a86c..a846aae61b0 100644
--- a/gcc/testsuite/gcc.target/i386/pentium4-not-mull.c
+++ b/gcc/testsuite/gcc.target/i386/pentium4-not-mull.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=pentium4" } } */
/* { dg-options "-O2 -march=pentium4" } */
/* { dg-final { scan-assembler-not "imull" } } */
diff --git a/gcc/testsuite/gcc.target/i386/sse-5.c b/gcc/testsuite/gcc.target/i386/sse-5.c
index c3ed8f2672b..bdbd5012e48 100644
--- a/gcc/testsuite/gcc.target/i386/sse-5.c
+++ b/gcc/testsuite/gcc.target/i386/sse-5.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=i386" } } */
/* { dg-options "-Winline -O2 -march=i386" } */
typedef double v2df __attribute__ ((vector_size (16)));
diff --git a/gcc/testsuite/gcc.target/i386/ssefn-1.c b/gcc/testsuite/gcc.target/i386/ssefn-1.c
index 0279a553346..bea6cb2bf0b 100644
--- a/gcc/testsuite/gcc.target/i386/ssefn-1.c
+++ b/gcc/testsuite/gcc.target/i386/ssefn-1.c
@@ -7,6 +7,7 @@
/* { dg-final { scan-assembler "mulss" } } */
/* { dg-final { scan-assembler-not "movsd" } } */
/* { dg-final { scan-assembler-not "mulsd" } } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=i386" } } */
/* { dg-options "-O2 -march=i386 -msse -mfpmath=sse -fno-inline" } */
static float xs (void)
diff --git a/gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f90 b/gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f90
index cd611ccfde6..52e0262f4e6 100644
--- a/gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f90
+++ b/gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f90
@@ -26,8 +26,8 @@ program a
allocate(err) ! { dg-error "nonprocedure pointer or an allocatable" }
- allocate(error(2),stat=j,errmsg=error) ! { dg-error "shall not be ALLOCATEd within" }
- allocate(i(2), stat = i) ! { dg-error "shall not be ALLOCATEd within" }
+ allocate(error(2),stat=j,errmsg=error(1)) ! { dg-error "shall not be ALLOCATEd within" }
+ allocate(i(2), stat = i(1)) ! { dg-error "shall not be ALLOCATEd within" }
allocate(n) ! { dg-error "must be ALLOCATABLE or a POINTER" }
diff --git a/gcc/testsuite/gfortran.dg/allocate_stat_2.f90 b/gcc/testsuite/gfortran.dg/allocate_stat_2.f90
new file mode 100644
index 00000000000..7cf6d659ea2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocate_stat_2.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! PR 41197
+program main
+ integer, dimension (4) :: ier = 0
+ character(len=30), dimension(2) :: er
+ integer, dimension (:), allocatable :: a
+ allocate (a (16), stat = ier) ! { dg-error "must be a scalar INTEGER" }
+ allocate (a (14), stat=ier(1),errmsg=er) ! { dg-error "must be a scalar CHARACTER" }
+end
+
diff --git a/gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f90 b/gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f90
index 75da7013f30..5c00741f61c 100644
--- a/gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f90
+++ b/gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f90
@@ -26,8 +26,8 @@ program a
deallocate(err) ! { dg-error "nonprocedure pointer or an allocatable" }
- deallocate(error,stat=j,errmsg=error) ! { dg-error "shall not be DEALLOCATEd within" }
- deallocate(i, stat = i) ! { dg-error "shall not be DEALLOCATEd within" }
+ deallocate(error,stat=j,errmsg=error(1)) ! { dg-error "shall not be DEALLOCATEd within" }
+ deallocate(i, stat = i(1)) ! { dg-error "shall not be DEALLOCATEd within" }
deallocate(n) ! { dg-error "must be ALLOCATABLE or a POINTER" }
diff --git a/gcc/testsuite/gfortran.dg/namelist_59.f90 b/gcc/testsuite/gfortran.dg/namelist_59.f90
new file mode 100644
index 00000000000..bb68b9bebe9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_59.f90
@@ -0,0 +1,26 @@
+! { dg-do run }
+! PR41192 NAMELIST input with just a comment ("&NAME ! comment \") error
+program cmdline
+! comment by itself causes error in gfortran
+ call process(' ')
+ call process('i=10 , j=20 k=30 ! change all three values')
+ call process(' ')
+ call process('! change no values')! before patch this failed.
+end program cmdline
+
+subroutine process(string)
+ implicit none
+ character(len=*) :: string
+ character(len=132) :: lines(3)
+ character(len=255) :: message
+ integer :: i=1,j=2,k=3
+ integer ios
+ namelist /cmd/ i,j,k
+ save cmd
+ lines(1)='&cmd'
+ lines(2)=string
+ lines(3)='/'
+
+ read(lines,nml=cmd,iostat=ios,iomsg=message)
+ if (ios.ne.0) call abort
+end subroutine process
diff --git a/gcc/testsuite/gfortran.dg/pr41225.f90 b/gcc/testsuite/gfortran.dg/pr41225.f90
new file mode 100644
index 00000000000..54daf4d1e24
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr41225.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+! { dg-options "-O2 -ffast-math -funroll-loops -ftree-vectorize -g" }
+ SUBROUTINE block_15_1_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale)
+ INTEGER, PARAMETER :: dp=8
+ REAL(KIND=dp) :: kbd(1*1), kbc(1*1), kad(15*1), kac(15*1), pbd(1*1), &
+ pbc(1*1), pad(15*1), pac(15*1), prim(15*1*1*1), scale
+ INTEGER :: ma, mb, mc, md, p_index
+ DO md = 1,1
+ DO mc = 1,1
+ DO mb = 1,1
+ DO ma = 1,15
+ p_index=p_index+1
+ tmp = scale*prim(p_index)
+ ks_bd = ks_bd + tmp* pac((mc-1)*15+ma)
+ END DO
+ kbd((md-1)*1+mb) = kbd((md-1)*1+mb) - ks_bd
+ END DO
+ END DO
+ END DO
+ END SUBROUTINE block_15_1_1_1
diff --git a/gcc/testsuite/gfortran.dg/pr41229.f90 b/gcc/testsuite/gfortran.dg/pr41229.f90
new file mode 100644
index 00000000000..9f6e566fc9b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr41229.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! { dg-options "-O2 -g" }
+SUBROUTINE cp_fm_triangular_multiply()
+ INTEGER, PARAMETER :: dp=KIND(0.0D0)
+ REAL(dp), ALLOCATABLE, DIMENSION(:) :: tau, work
+ REAL(KIND=dp), DIMENSION(:, :), POINTER :: a
+ ndim = SIZE(a,2)
+ ALLOCATE(tau(ndim),STAT=istat)
+ ALLOCATE(work(2*ndim),STAT=istat)
+END SUBROUTINE
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_12.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_12.f90
new file mode 100644
index 00000000000..4612d4982f3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_12.f90
@@ -0,0 +1,12 @@
+! { dg-do compile }
+! Test the fix for PR41258, where an ICE was caused by a search
+! for a typebound procedure to resolve d%c%e
+!
+! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
+!
+ TYPE a
+ TYPE(b), DIMENSION(:), POINTER :: c ! { dg-error "type that has not been declared" }
+ END TYPE
+ TYPE(a), POINTER :: d
+ CALL X(d%c%e) ! { dg-error "before it is defined" }
+end
diff --git a/gcc/testsuite/gnat.dg/array8.adb b/gcc/testsuite/gnat.dg/array8.adb
new file mode 100644
index 00000000000..6e18ecadf94
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/array8.adb
@@ -0,0 +1,34 @@
+-- { dg-do compile }
+-- { dg-options "-O2" }
+
+PROCEDURE Array8 IS
+
+ function ID (I : Integer) return Integer is
+ begin
+ return I;
+ end;
+
+ SUBTYPE STB IS INTEGER RANGE ID(-8) .. -5;
+
+ TYPE TB IS ARRAY (STB RANGE <>) OF INTEGER;
+
+ GENERIC
+ B1 : TB;
+ PROCEDURE PROC1;
+
+ PROCEDURE PROC1 IS
+ BEGIN
+ IF B1'FIRST /= -8 THEN
+ raise Program_Error;
+ ELSIF B1'LAST /= ID(-5) THEN
+ raise Program_Error;
+ ELSIF B1 /= (7, 6, 5, 4) THEN
+ raise Program_Error;
+ END IF;
+ END;
+
+ PROCEDURE PROC2 IS NEW PROC1 ((7, 6, ID(5), 4));
+
+BEGIN
+ PROC2;
+END;
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index d3da016df01..ec80af1641b 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2670,6 +2670,7 @@ proc check_effective_target_sync_int_long { } {
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| [istarget alpha*-*-*]
+ || [istarget bfin*-*linux*]
|| [istarget s390*-*-*]
|| [istarget powerpc*-*-*]
|| [istarget sparc64-*-*]
diff --git a/gcc/toplev.c b/gcc/toplev.c
index f8632ac6d43..854e4e8ee86 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1904,7 +1904,12 @@ process_options (void)
if (flag_gtoggle)
{
if (debug_info_level == DINFO_LEVEL_NONE)
- debug_info_level = DINFO_LEVEL_NORMAL;
+ {
+ debug_info_level = DINFO_LEVEL_NORMAL;
+
+ if (write_symbols == NO_DEBUG)
+ write_symbols = PREFERRED_DEBUGGING_TYPE;
+ }
else
debug_info_level = DINFO_LEVEL_NONE;
}
@@ -2003,15 +2008,18 @@ process_options (void)
flag_var_tracking_uninit = 0;
}
- if (flag_rename_registers == AUTODETECT_VALUE)
- flag_rename_registers = default_debug_hooks->var_location
- != do_nothing_debug_hooks.var_location;
+ /* If the user specifically requested variable tracking with tagging
+ uninitialized variables, we need to turn on variable tracking.
+ (We already determined above that variable tracking is feasible.) */
+ if (flag_var_tracking_uninit)
+ flag_var_tracking = 1;
if (flag_var_tracking == AUTODETECT_VALUE)
flag_var_tracking = optimize >= 1;
if (flag_var_tracking_assignments == AUTODETECT_VALUE)
- flag_var_tracking_assignments = flag_var_tracking;
+ flag_var_tracking_assignments = flag_var_tracking
+ && !(flag_selective_scheduling || flag_selective_scheduling2);
if (flag_var_tracking_assignments_toggle)
flag_var_tracking_assignments = !flag_var_tracking_assignments;
@@ -2019,6 +2027,14 @@ process_options (void)
if (flag_var_tracking_assignments && !flag_var_tracking)
flag_var_tracking = flag_var_tracking_assignments = -1;
+ if (flag_var_tracking_assignments
+ && (flag_selective_scheduling || flag_selective_scheduling2))
+ warning (0, "var-tracking-assignments changes selective scheduling");
+
+ if (flag_rename_registers == AUTODETECT_VALUE)
+ flag_rename_registers = default_debug_hooks->var_location
+ != do_nothing_debug_hooks.var_location;
+
if (flag_tree_cselim == AUTODETECT_VALUE)
#ifdef HAVE_conditional_move
flag_tree_cselim = 1;
@@ -2026,12 +2042,6 @@ process_options (void)
flag_tree_cselim = 0;
#endif
- /* If the user specifically requested variable tracking with tagging
- uninitialized variables, we need to turn on variable tracking.
- (We already determined above that variable tracking is feasible.) */
- if (flag_var_tracking_uninit)
- flag_var_tracking = 1;
-
/* If auxiliary info generation is desired, open the output file.
This goes in the same directory as the source file--unlike
all the other output files. */
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 53cb88db90a..fa1e50e3dd7 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -2748,24 +2748,30 @@ is_ctrl_altering_stmt (gimple t)
{
gcc_assert (t);
- if (is_gimple_call (t))
+ switch (gimple_code (t))
{
- int flags = gimple_call_flags (t);
+ case GIMPLE_CALL:
+ {
+ int flags = gimple_call_flags (t);
- /* A non-pure/const call alters flow control if the current
- function has nonlocal labels. */
- if (!(flags & (ECF_CONST | ECF_PURE))
- && cfun->has_nonlocal_label)
- return true;
+ /* A non-pure/const call alters flow control if the current
+ function has nonlocal labels. */
+ if (!(flags & (ECF_CONST | ECF_PURE)) && cfun->has_nonlocal_label)
+ return true;
- /* A call also alters control flow if it does not return. */
- if (gimple_call_flags (t) & ECF_NORETURN)
- return true;
- }
+ /* A call also alters control flow if it does not return. */
+ if (gimple_call_flags (t) & ECF_NORETURN)
+ return true;
+ }
+ break;
- /* OpenMP directives alter control flow. */
- if (is_gimple_omp (t))
- return true;
+ CASE_GIMPLE_OMP:
+ /* OpenMP directives alter control flow. */
+ return true;
+
+ default:
+ break;
+ }
/* If a statement can throw, it alters control flow. */
return stmt_can_throw_internal (t);
@@ -4143,7 +4149,7 @@ verify_gimple_phi (gimple stmt)
tree type = TREE_TYPE (gimple_phi_result (stmt));
unsigned i;
- if (!is_gimple_variable (gimple_phi_result (stmt)))
+ if (TREE_CODE (gimple_phi_result (stmt)) != SSA_NAME)
{
error ("Invalid PHI result");
return true;
@@ -4196,17 +4202,6 @@ verify_gimple_debug (gimple stmt ATTRIBUTE_UNUSED)
static bool
verify_types_in_gimple_stmt (gimple stmt)
{
- if (is_gimple_omp (stmt))
- {
- /* OpenMP directives are validated by the FE and never operated
- on by the optimizers. Furthermore, GIMPLE_OMP_FOR may contain
- non-gimple expressions when the main index variable has had
- its address taken. This does not affect the loop itself
- because the header of an GIMPLE_OMP_FOR is merely used to determine
- how to setup the parallel iteration. */
- return false;
- }
-
switch (gimple_code (stmt))
{
case GIMPLE_ASSIGN:
@@ -4244,6 +4239,15 @@ verify_types_in_gimple_stmt (gimple stmt)
case GIMPLE_PREDICT:
return false;
+ CASE_GIMPLE_OMP:
+ /* OpenMP directives are validated by the FE and never operated
+ on by the optimizers. Furthermore, GIMPLE_OMP_FOR may contain
+ non-gimple expressions when the main index variable has had
+ its address taken. This does not affect the loop itself
+ because the header of an GIMPLE_OMP_FOR is merely used to determine
+ how to setup the parallel iteration. */
+ return false;
+
case GIMPLE_DEBUG:
return verify_gimple_debug (stmt);
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index c3837d1be04..d423c9f6b63 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -638,9 +638,10 @@ typedef bool (*walk_use_def_chains_fn) (tree, gimple, void *);
extern void walk_use_def_chains (tree, walk_use_def_chains_fn, void *, bool);
void propagate_defs_into_debug_stmts (gimple, basic_block,
- const gimple_stmt_iterator *);
+ const gimple_stmt_iterator *);
void propagate_var_def_into_debug_stmts (tree, basic_block,
- const gimple_stmt_iterator *);
+ const gimple_stmt_iterator *);
+void release_defs_bitset (bitmap toremove);
/* In tree-into-ssa.c */
void update_ssa (unsigned);
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index 48e910a124d..ca9ec932d3f 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -1908,8 +1908,8 @@ parallelize_loops (void)
/* FIXME: Bypass this check as graphite doesn't update the
count and frequency correctly now. */
if (!flag_loop_parallelize_all
- && (estimated_loop_iterations_int (loop, false)
- <= n_threads * MIN_PER_THREAD
+ && ((estimated_loop_iterations_int (loop, false)
+ <= (HOST_WIDE_INT) n_threads * MIN_PER_THREAD)
/* Do not bother with loops in cold areas. */
|| optimize_loop_nest_for_size_p (loop)))
continue;
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 8d4dc90d179..1a0622ef8eb 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -1039,7 +1039,7 @@ build_ref_for_offset_1 (tree *res, tree type, HOST_WIDE_INT offset,
while (1)
{
tree fld;
- tree tr_size, index;
+ tree tr_size, index, minidx;
HOST_WIDE_INT el_size;
if (offset == 0 && exp_type
@@ -1090,13 +1090,14 @@ build_ref_for_offset_1 (tree *res, tree type, HOST_WIDE_INT offset,
return false;
el_size = tree_low_cst (tr_size, 1);
+ minidx = TYPE_MIN_VALUE (TYPE_DOMAIN (type));
+ if (TREE_CODE (minidx) != INTEGER_CST)
+ return false;
if (res)
{
index = build_int_cst (TYPE_DOMAIN (type), offset / el_size);
- if (!integer_zerop (TYPE_MIN_VALUE (TYPE_DOMAIN (type))))
- index = int_const_binop (PLUS_EXPR, index,
- TYPE_MIN_VALUE (TYPE_DOMAIN (type)),
- 0);
+ if (!integer_zerop (minidx))
+ index = int_const_binop (PLUS_EXPR, index, minidx, 0);
*res = build4 (ARRAY_REF, TREE_TYPE (type), *res, index,
NULL_TREE, NULL_TREE);
}
@@ -1164,7 +1165,13 @@ find_var_candidates (void)
|| !COMPLETE_TYPE_P (type)
|| !host_integerp (TYPE_SIZE (type), 1)
|| tree_low_cst (TYPE_SIZE (type), 1) == 0
- || type_internals_preclude_sra_p (type))
+ || type_internals_preclude_sra_p (type)
+ /* Fix for PR 41089. tree-stdarg.c needs to have va_lists intact but
+ we also want to schedule it rather late. Thus we ignore it in
+ the early pass. */
+ || (sra_mode == SRA_MODE_EARLY_INTRA
+ && (TYPE_MAIN_VARIANT (TREE_TYPE (var))
+ == TYPE_MAIN_VARIANT (va_list_type_node))))
continue;
bitmap_set_bit (candidate_bitmap, DECL_UID (var));
@@ -1378,6 +1385,22 @@ build_access_trees (struct access *access)
}
}
+/* Return true if expr contains some ARRAY_REFs into a variable bounded
+ array. */
+
+static bool
+expr_with_var_bounded_array_refs_p (tree expr)
+{
+ while (handled_component_p (expr))
+ {
+ if (TREE_CODE (expr) == ARRAY_REF
+ && !host_integerp (array_ref_low_bound (expr), 0))
+ return true;
+ expr = TREE_OPERAND (expr, 0);
+ }
+ return false;
+}
+
/* Analyze the subtree of accesses rooted in ROOT, scheduling replacements when
both seeming beneficial and when ALLOW_REPLACEMENTS allows it. Also set
all sorts of access flags appropriately along the way, notably always ser
@@ -1407,6 +1430,9 @@ analyze_access_subtree (struct access *root, bool allow_replacements,
if (root->grp_unscalarizable_region)
allow_replacements = false;
+ if (allow_replacements && expr_with_var_bounded_array_refs_p (root->expr))
+ allow_replacements = false;
+
for (child = root->first_child; child; child = child->next_sibling)
{
if (!hole && child->offset < covered_to)
@@ -1496,31 +1522,11 @@ child_would_conflict_in_lacc (struct access *lacc, HOST_WIDE_INT norm_offset,
return false;
}
-/* Set the expr of TARGET to one just like MODEL but with is own base at the
- bottom of the handled components. */
-
-static void
-duplicate_expr_for_different_base (struct access *target,
- struct access *model)
-{
- tree t, expr = unshare_expr (model->expr);
-
- gcc_assert (handled_component_p (expr));
- t = expr;
- while (handled_component_p (TREE_OPERAND (t, 0)))
- t = TREE_OPERAND (t, 0);
- gcc_assert (TREE_OPERAND (t, 0) == model->base);
- TREE_OPERAND (t, 0) = target->base;
-
- target->expr = expr;
-}
-
-
/* Create a new child access of PARENT, with all properties just like MODEL
except for its offset and with its grp_write false and grp_read true.
- Return the new access. Note that this access is created long after all
- splicing and sorting, it's not located in any access vector and is
- automatically a representative of its group. */
+ Return the new access or NULL if it cannot be created. Note that this access
+ is created long after all splicing and sorting, it's not located in any
+ access vector and is automatically a representative of its group. */
static struct access *
create_artificial_child_access (struct access *parent, struct access *model,
@@ -1528,15 +1534,20 @@ create_artificial_child_access (struct access *parent, struct access *model,
{
struct access *access;
struct access **child;
+ tree expr = parent->base;;
gcc_assert (!model->grp_unscalarizable_region);
+ if (!build_ref_for_offset (&expr, TREE_TYPE (expr), new_offset,
+ model->type, false))
+ return NULL;
+
access = (struct access *) pool_alloc (access_pool);
memset (access, 0, sizeof (struct access));
access->base = parent->base;
+ access->expr = expr;
access->offset = new_offset;
access->size = model->size;
- duplicate_expr_for_different_base (access, model);
access->type = model->type;
access->grp_write = true;
access->grp_read = false;
@@ -1554,7 +1565,7 @@ create_artificial_child_access (struct access *parent, struct access *model,
/* Propagate all subaccesses of RACC across an assignment link to LACC. Return
true if any new subaccess was created. Additionally, if RACC is a scalar
- access but LACC is not, change the type of the latter. */
+ access but LACC is not, change the type of the latter, if possible. */
static bool
propagate_subacesses_accross_link (struct access *lacc, struct access *racc)
@@ -1571,8 +1582,14 @@ propagate_subacesses_accross_link (struct access *lacc, struct access *racc)
if (!lacc->first_child && !racc->first_child
&& is_gimple_reg_type (racc->type))
{
- duplicate_expr_for_different_base (lacc, racc);
- lacc->type = racc->type;
+ tree t = lacc->base;
+
+ if (build_ref_for_offset (&t, TREE_TYPE (t), lacc->offset, racc->type,
+ false))
+ {
+ lacc->expr = t;
+ lacc->type = racc->type;
+ }
return false;
}
@@ -1606,10 +1623,12 @@ propagate_subacesses_accross_link (struct access *lacc, struct access *racc)
rchild->grp_hint = 1;
new_acc = create_artificial_child_access (lacc, rchild, norm_offset);
- if (racc->first_child)
- propagate_subacesses_accross_link (new_acc, rchild);
-
- ret = true;
+ if (new_acc)
+ {
+ ret = true;
+ if (racc->first_child)
+ propagate_subacesses_accross_link (new_acc, rchild);
+ }
}
return ret;
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 7e83a84b82c..89804a923b1 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -784,6 +784,12 @@ refs_may_alias_p_1 (ao_ref *ref1, ao_ref *ref2, bool tbaa_p)
|| is_gimple_min_invariant (base2))
return false;
+ /* We can end up refering to code via function decls. As we likely
+ do not properly track code aliases conservatively bail out. */
+ if (TREE_CODE (base1) == FUNCTION_DECL
+ || TREE_CODE (base2) == FUNCTION_DECL)
+ return true;
+
/* Defer to simple offset based disambiguation if we have
references based on two decls. Do this before defering to
TBAA to handle must-alias cases in conformance with the
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 949c4b5ce77..61827a74ab4 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -1818,8 +1818,7 @@ maybe_fold_offset_to_array_ref (location_t loc, tree base, tree offset,
static tree
maybe_fold_offset_to_component_ref (location_t loc, tree record_type,
- tree base, tree offset,
- tree orig_type, bool base_is_ptr)
+ tree base, tree offset, tree orig_type)
{
tree f, t, field_type, tail_array_field, field_offset;
tree ret;
@@ -1871,8 +1870,6 @@ maybe_fold_offset_to_component_ref (location_t loc, tree record_type,
if (cmp == 0
&& useless_type_conversion_p (orig_type, field_type))
{
- if (base_is_ptr)
- base = build1 (INDIRECT_REF, record_type, base);
t = build3 (COMPONENT_REF, field_type, base, f, NULL_TREE);
return t;
}
@@ -1897,13 +1894,8 @@ maybe_fold_offset_to_component_ref (location_t loc, tree record_type,
/* If we matched, then set offset to the displacement into
this field. */
- if (base_is_ptr)
- new_base = build1 (INDIRECT_REF, record_type, base);
- else
- new_base = base;
- protected_set_expr_location (new_base, loc);
- new_base = build3 (COMPONENT_REF, field_type, new_base, f, NULL_TREE);
- protected_set_expr_location (new_base, loc);
+ new_base = build3 (COMPONENT_REF, field_type, base, f, NULL_TREE);
+ SET_EXPR_LOCATION (new_base, loc);
/* Recurse to possibly find the match. */
ret = maybe_fold_offset_to_array_ref (loc, new_base, t, orig_type,
@@ -1911,7 +1903,7 @@ maybe_fold_offset_to_component_ref (location_t loc, tree record_type,
if (ret)
return ret;
ret = maybe_fold_offset_to_component_ref (loc, field_type, new_base, t,
- orig_type, false);
+ orig_type);
if (ret)
return ret;
}
@@ -1925,11 +1917,6 @@ maybe_fold_offset_to_component_ref (location_t loc, tree record_type,
/* If we get here, we've got an aggregate field, and a possibly
nonzero offset into them. Recurse and hope for a valid match. */
- if (base_is_ptr)
- {
- base = build1 (INDIRECT_REF, record_type, base);
- SET_EXPR_LOCATION (base, loc);
- }
base = build3 (COMPONENT_REF, field_type, base, f, NULL_TREE);
SET_EXPR_LOCATION (base, loc);
@@ -1938,7 +1925,7 @@ maybe_fold_offset_to_component_ref (location_t loc, tree record_type,
if (t)
return t;
return maybe_fold_offset_to_component_ref (loc, field_type, base, offset,
- orig_type, false);
+ orig_type);
}
/* Attempt to express (ORIG_TYPE)BASE+OFFSET as BASE->field_of_orig_type
@@ -1955,61 +1942,44 @@ maybe_fold_offset_to_reference (location_t loc, tree base, tree offset,
{
tree ret;
tree type;
- bool base_is_ptr = true;
STRIP_NOPS (base);
- if (TREE_CODE (base) == ADDR_EXPR)
- {
- base_is_ptr = false;
-
- base = TREE_OPERAND (base, 0);
+ if (TREE_CODE (base) != ADDR_EXPR)
+ return NULL_TREE;
- /* Handle case where existing COMPONENT_REF pick e.g. wrong field of union,
- so it needs to be removed and new COMPONENT_REF constructed.
- The wrong COMPONENT_REF are often constructed by folding the
- (type *)&object within the expression (type *)&object+offset */
- if (handled_component_p (base))
+ base = TREE_OPERAND (base, 0);
+
+ /* Handle case where existing COMPONENT_REF pick e.g. wrong field of union,
+ so it needs to be removed and new COMPONENT_REF constructed.
+ The wrong COMPONENT_REF are often constructed by folding the
+ (type *)&object within the expression (type *)&object+offset */
+ if (handled_component_p (base))
+ {
+ HOST_WIDE_INT sub_offset, size, maxsize;
+ tree newbase;
+ newbase = get_ref_base_and_extent (base, &sub_offset,
+ &size, &maxsize);
+ gcc_assert (newbase);
+ if (size == maxsize
+ && size != -1
+ && !(sub_offset & (BITS_PER_UNIT - 1)))
{
- HOST_WIDE_INT sub_offset, size, maxsize;
- tree newbase;
- newbase = get_ref_base_and_extent (base, &sub_offset,
- &size, &maxsize);
- gcc_assert (newbase);
- if (size == maxsize
- && size != -1
- && !(sub_offset & (BITS_PER_UNIT - 1)))
- {
- base = newbase;
- if (sub_offset)
- offset = int_const_binop (PLUS_EXPR, offset,
- build_int_cst (TREE_TYPE (offset),
- sub_offset / BITS_PER_UNIT), 1);
- }
+ base = newbase;
+ if (sub_offset)
+ offset = int_const_binop (PLUS_EXPR, offset,
+ build_int_cst (TREE_TYPE (offset),
+ sub_offset / BITS_PER_UNIT), 1);
}
- if (useless_type_conversion_p (orig_type, TREE_TYPE (base))
- && integer_zerop (offset))
- return base;
- type = TREE_TYPE (base);
}
- else
- {
- base_is_ptr = true;
- if (!POINTER_TYPE_P (TREE_TYPE (base)))
- return NULL_TREE;
- type = TREE_TYPE (TREE_TYPE (base));
- }
- ret = maybe_fold_offset_to_component_ref (loc, type, base, offset,
- orig_type, base_is_ptr);
+ if (useless_type_conversion_p (orig_type, TREE_TYPE (base))
+ && integer_zerop (offset))
+ return base;
+ type = TREE_TYPE (base);
+
+ ret = maybe_fold_offset_to_component_ref (loc, type, base, offset, orig_type);
if (!ret)
- {
- if (base_is_ptr)
- {
- base = build1 (INDIRECT_REF, type, base);
- SET_EXPR_LOCATION (base, loc);
- }
- ret = maybe_fold_offset_to_array_ref (loc,
- base, offset, orig_type, true);
- }
+ ret = maybe_fold_offset_to_array_ref (loc, base, offset, orig_type, true);
+
return ret;
}
@@ -2214,16 +2184,16 @@ maybe_fold_stmt_addition (location_t loc, tree res_type, tree op0, tree op1)
&& TREE_CODE (gimple_assign_rhs2 (offset_def)) == INTEGER_CST
&& tree_int_cst_equal (gimple_assign_rhs2 (offset_def),
TYPE_SIZE_UNIT (TREE_TYPE (op0))))
- return build1 (ADDR_EXPR, res_type,
- build4 (ARRAY_REF, TREE_TYPE (op0),
+ return build_fold_addr_expr
+ (build4 (ARRAY_REF, TREE_TYPE (op0),
TREE_OPERAND (op0, 0),
gimple_assign_rhs1 (offset_def),
TREE_OPERAND (op0, 2),
TREE_OPERAND (op0, 3)));
else if (integer_onep (TYPE_SIZE_UNIT (TREE_TYPE (op0)))
&& gimple_assign_rhs_code (offset_def) != MULT_EXPR)
- return build1 (ADDR_EXPR, res_type,
- build4 (ARRAY_REF, TREE_TYPE (op0),
+ return build_fold_addr_expr
+ (build4 (ARRAY_REF, TREE_TYPE (op0),
TREE_OPERAND (op0, 0),
op1,
TREE_OPERAND (op0, 2),
@@ -2286,7 +2256,7 @@ maybe_fold_stmt_addition (location_t loc, tree res_type, tree op0, tree op1)
t = maybe_fold_offset_to_array_ref (loc, op0, op1, ptd_type, true);
if (!t)
t = maybe_fold_offset_to_component_ref (loc, TREE_TYPE (op0), op0, op1,
- ptd_type, false);
+ ptd_type);
if (t)
{
t = build1 (ADDR_EXPR, res_type, t);
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 05988636489..42b2ef36252 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -5297,42 +5297,6 @@ create_new_ivs (struct ivopts_data *data, struct iv_ca *set)
}
}
-/* Returns the phi-node in BB with result RESULT. */
-
-static gimple
-get_phi_with_result (basic_block bb, tree result)
-{
- gimple_stmt_iterator i = gsi_start_phis (bb);
-
- for (; !gsi_end_p (i); gsi_next (&i))
- if (gimple_phi_result (gsi_stmt (i)) == result)
- return gsi_stmt (i);
-
- gcc_unreachable ();
- return NULL;
-}
-
-
-/* Removes statement STMT (real or a phi node). If INCLUDING_DEFINED_NAME
- is true, remove also the ssa name defined by the statement. */
-
-static void
-remove_statement (gimple stmt, bool including_defined_name)
-{
- if (gimple_code (stmt) == GIMPLE_PHI)
- {
- gimple bb_phi = get_phi_with_result (gimple_bb (stmt),
- gimple_phi_result (stmt));
- gimple_stmt_iterator bsi = gsi_for_stmt (bb_phi);
- remove_phi_node (&bsi, including_defined_name);
- }
- else
- {
- gimple_stmt_iterator bsi = gsi_for_stmt (stmt);
- gsi_remove (&bsi, true);
- release_defs (stmt);
- }
-}
/* Rewrites USE (definition of iv used in a nonlinear expression)
using candidate CAND. */
@@ -5435,7 +5399,9 @@ rewrite_use_nonlinear_expr (struct ivopts_data *data,
{
ass = gimple_build_assign (tgt, op);
gsi_insert_before (&bsi, ass, GSI_SAME_STMT);
- remove_statement (use->stmt, false);
+
+ bsi = gsi_for_stmt (use->stmt);
+ remove_phi_node (&bsi, false);
}
else
{
@@ -5611,7 +5577,11 @@ remove_unused_ivs (struct ivopts_data *data)
{
unsigned j;
bitmap_iterator bi;
+ bitmap toremove = BITMAP_ALLOC (NULL);
+ /* Figure out an order in which to release SSA DEFs so that we don't
+ release something that we'd have to propagate into a debug stmt
+ afterwards. */
EXECUTE_IF_SET_IN_BITMAP (data->relevant, 0, j, bi)
{
struct version_info *info;
@@ -5622,25 +5592,12 @@ remove_unused_ivs (struct ivopts_data *data)
&& !info->inv_id
&& !info->iv->have_use_for
&& !info->preserve_biv)
- {
- if (MAY_HAVE_DEBUG_STMTS)
- {
- gimple stmt;
- imm_use_iterator iter;
-
- FOR_EACH_IMM_USE_STMT (stmt, iter, info->iv->ssa_name)
- {
- if (!gimple_debug_bind_p (stmt))
- continue;
-
- /* ??? We can probably do better than this. */
- gimple_debug_bind_reset_value (stmt);
- update_stmt (stmt);
- }
- }
- remove_statement (SSA_NAME_DEF_STMT (info->iv->ssa_name), true);
- }
+ bitmap_set_bit (toremove, SSA_NAME_VERSION (info->iv->ssa_name));
}
+
+ release_defs_bitset (toremove);
+
+ BITMAP_FREE (toremove);
}
/* Frees data allocated by the optimization of a single loop. */
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index ac84fb978b0..16f4a43dba3 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -735,8 +735,8 @@ static void
get_tmr_operands (gimple stmt, tree expr, int flags)
{
/* First record the real operands. */
- get_expr_operands (stmt, &TMR_BASE (expr), opf_use);
- get_expr_operands (stmt, &TMR_INDEX (expr), opf_use);
+ get_expr_operands (stmt, &TMR_BASE (expr), opf_use | (flags & opf_no_vops));
+ get_expr_operands (stmt, &TMR_INDEX (expr), opf_use | (flags & opf_no_vops));
if (TMR_SYMBOL (expr))
mark_address_taken (TMR_SYMBOL (expr));
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index b809ab30f8d..3accbbc2bb1 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -857,7 +857,7 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb,
/* Move the statement from the middle block. */
gsi = gsi_last_bb (cond_bb);
- gsi_from = gsi_last_bb (middle_bb);
+ gsi_from = gsi_last_nondebug_bb (middle_bb);
gsi_move_before (&gsi_from, &gsi);
}
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 7a0533e4301..267aeb5e2fd 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -401,10 +401,6 @@ typedef struct bb_bitmap_sets
#define BB_DEFERRED(BB) ((bb_value_sets_t) ((BB)->aux))->deferred
-/* Maximal set of values, used to initialize the ANTIC problem, which
- is an intersection problem. */
-static bitmap_set_t maximal_set;
-
/* Basic block list in postorder. */
static int *postorder;
@@ -2201,49 +2197,45 @@ compute_antic_aux (basic_block block, bool block_has_abnormal_pred_edge)
{
VEC(basic_block, heap) * worklist;
size_t i;
- basic_block bprime, first;
+ basic_block bprime, first = NULL;
worklist = VEC_alloc (basic_block, heap, EDGE_COUNT (block->succs));
FOR_EACH_EDGE (e, ei, block->succs)
- VEC_quick_push (basic_block, worklist, e->dest);
- first = VEC_index (basic_block, worklist, 0);
-
- if (phi_nodes (first))
{
- bitmap_set_t from = ANTIC_IN (first);
-
- if (!BB_VISITED (first))
- from = maximal_set;
- phi_translate_set (ANTIC_OUT, from, block, first);
+ if (!first
+ && BB_VISITED (e->dest))
+ first = e->dest;
+ else if (BB_VISITED (e->dest))
+ VEC_quick_push (basic_block, worklist, e->dest);
}
- else
+
+ /* Of multiple successors we have to have visited one already. */
+ if (!first)
{
- if (!BB_VISITED (first))
- bitmap_set_copy (ANTIC_OUT, maximal_set);
- else
- bitmap_set_copy (ANTIC_OUT, ANTIC_IN (first));
+ SET_BIT (changed_blocks, block->index);
+ BB_VISITED (block) = 0;
+ BB_DEFERRED (block) = 1;
+ changed = true;
+ VEC_free (basic_block, heap, worklist);
+ goto maybe_dump_sets;
}
- for (i = 1; VEC_iterate (basic_block, worklist, i, bprime); i++)
+ if (phi_nodes (first))
+ phi_translate_set (ANTIC_OUT, ANTIC_IN (first), block, first);
+ else
+ bitmap_set_copy (ANTIC_OUT, ANTIC_IN (first));
+
+ for (i = 0; VEC_iterate (basic_block, worklist, i, bprime); i++)
{
if (phi_nodes (bprime))
{
bitmap_set_t tmp = bitmap_set_new ();
- bitmap_set_t from = ANTIC_IN (bprime);
-
- if (!BB_VISITED (bprime))
- from = maximal_set;
- phi_translate_set (tmp, from, block, bprime);
+ phi_translate_set (tmp, ANTIC_IN (bprime), block, bprime);
bitmap_set_and (ANTIC_OUT, tmp);
bitmap_set_free (tmp);
}
else
- {
- if (!BB_VISITED (bprime))
- bitmap_set_and (ANTIC_OUT, maximal_set);
- else
- bitmap_set_and (ANTIC_OUT, ANTIC_IN (bprime));
- }
+ bitmap_set_and (ANTIC_OUT, ANTIC_IN (bprime));
}
VEC_free (basic_block, heap, worklist);
}
@@ -3711,7 +3703,6 @@ add_to_exp_gen (basic_block block, tree op)
return;
result = get_or_alloc_expr_for_name (op);
bitmap_value_insert_into_set (EXP_GEN (block), result);
- bitmap_value_insert_into_set (maximal_set, result);
}
}
@@ -3740,7 +3731,6 @@ make_values_for_phi (gimple phi, basic_block block)
{
e = get_or_alloc_expr_for_name (arg);
add_to_value (get_expr_value_id (e), e);
- bitmap_value_insert_into_set (maximal_set, e);
}
}
}
@@ -3781,10 +3771,7 @@ compute_avail (void)
e = get_or_alloc_expr_for_name (name);
add_to_value (get_expr_value_id (e), e);
if (!in_fre)
- {
- bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), e);
- bitmap_value_insert_into_set (maximal_set, e);
- }
+ bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), e);
bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR), e);
}
@@ -3888,11 +3875,7 @@ compute_avail (void)
get_or_alloc_expression_id (result);
add_to_value (get_expr_value_id (result), result);
if (!in_fre)
- {
- bitmap_value_insert_into_set (EXP_GEN (block),
- result);
- bitmap_value_insert_into_set (maximal_set, result);
- }
+ bitmap_value_insert_into_set (EXP_GEN (block), result);
continue;
}
@@ -3974,10 +3957,7 @@ compute_avail (void)
get_or_alloc_expression_id (result);
add_to_value (get_expr_value_id (result), result);
if (!in_fre)
- {
- bitmap_value_insert_into_set (EXP_GEN (block), result);
- bitmap_value_insert_into_set (maximal_set, result);
- }
+ bitmap_value_insert_into_set (EXP_GEN (block), result);
continue;
}
@@ -4515,7 +4495,6 @@ init_pre (bool do_fre)
TMP_GEN (bb) = bitmap_set_new ();
AVAIL_OUT (bb) = bitmap_set_new ();
}
- maximal_set = in_fre ? NULL : bitmap_set_new ();
need_eh_cleanup = BITMAP_ALLOC (NULL);
}
@@ -4601,8 +4580,6 @@ execute_pre (bool do_fre ATTRIBUTE_UNUSED)
print_bitmap_set (dump_file, TMP_GEN (bb), "tmp_gen", bb->index);
print_bitmap_set (dump_file, AVAIL_OUT (bb), "avail_out", bb->index);
}
-
- print_bitmap_set (dump_file, maximal_set, "maximal", 0);
}
/* Insert can get quite slow on an incredibly large number of basic
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index d97f51367e2..55ce2f65a4f 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -192,7 +192,7 @@ static inline long
find_operand_rank (tree e)
{
void **slot = pointer_map_contains (operand_rank, e);
- return slot ? (long) *slot : -1;
+ return slot ? (long) (intptr_t) *slot : -1;
}
/* Insert {E,RANK} into the operand rank hashtable. */
@@ -204,7 +204,7 @@ insert_operand_rank (tree e, long rank)
gcc_assert (rank > 0);
slot = pointer_map_insert (operand_rank, e);
gcc_assert (!*slot);
- *slot = (void *) rank;
+ *slot = (void *) (intptr_t) rank;
}
/* Given an expression E, return the rank of the expression. */
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index 3d814fc2e0b..255e8a533b8 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -1120,7 +1120,7 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_)
copy_reference_ops_from_ref (gimple_assign_lhs (def_stmt), &lhs);
i = VEC_length (vn_reference_op_s, vr->operands) - 1;
j = VEC_length (vn_reference_op_s, lhs) - 1;
- while (j >= 0
+ while (j >= 0 && i >= 0
&& vn_reference_op_eq (VEC_index (vn_reference_op_s,
vr->operands, i),
VEC_index (vn_reference_op_s, lhs, j)))
@@ -1128,13 +1128,14 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_)
i--;
j--;
}
+
+ VEC_free (vn_reference_op_s, heap, lhs);
/* i now points to the first additional op.
??? LHS may not be completely contained in VR, one or more
VIEW_CONVERT_EXPRs could be in its way. We could at least
try handling outermost VIEW_CONVERT_EXPRs. */
if (j != -1)
return (void *)-1;
- VEC_free (vn_reference_op_s, heap, lhs);
/* Now re-write REF to be based on the rhs of the assignment. */
copy_reference_ops_from_ref (gimple_assign_rhs1 (def_stmt), &rhs);
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index db707fb35a9..9015d19c189 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -444,6 +444,74 @@ propagate_defs_into_debug_stmts (gimple def, basic_block tobb,
}
}
+/* Delete SSA DEFs for SSA versions in the TOREMOVE bitmap, removing
+ dominated stmts before their dominators, so that release_ssa_defs
+ stands a chance of propagating DEFs into debug bind stmts. */
+
+void
+release_defs_bitset (bitmap toremove)
+{
+ unsigned j;
+ bitmap_iterator bi;
+
+ /* Performing a topological sort is probably overkill, this will
+ most likely run in slightly superlinear time, rather than the
+ pathological quadratic worst case. */
+ while (!bitmap_empty_p (toremove))
+ EXECUTE_IF_SET_IN_BITMAP (toremove, 0, j, bi)
+ {
+ bool remove_now = true;
+ tree var = ssa_name (j);
+ gimple stmt;
+ imm_use_iterator uit;
+
+ FOR_EACH_IMM_USE_STMT (stmt, uit, var)
+ {
+ ssa_op_iter dit;
+ def_operand_p def_p;
+
+ /* We can't propagate PHI nodes into debug stmts. */
+ if (gimple_code (stmt) == GIMPLE_PHI
+ || is_gimple_debug (stmt))
+ continue;
+
+ /* If we find another definition to remove that uses
+ the one we're looking at, defer the removal of this
+ one, so that it can be propagated into debug stmts
+ after the other is. */
+ FOR_EACH_SSA_DEF_OPERAND (def_p, stmt, dit, SSA_OP_DEF)
+ {
+ tree odef = DEF_FROM_PTR (def_p);
+
+ if (bitmap_bit_p (toremove, SSA_NAME_VERSION (odef)))
+ {
+ remove_now = false;
+ break;
+ }
+ }
+
+ if (!remove_now)
+ BREAK_FROM_IMM_USE_STMT (uit);
+ }
+
+ if (remove_now)
+ {
+ gimple def = SSA_NAME_DEF_STMT (var);
+ gimple_stmt_iterator gsi = gsi_for_stmt (def);
+
+ if (gimple_code (def) == GIMPLE_PHI)
+ remove_phi_node (&gsi, true);
+ else
+ {
+ gsi_remove (&gsi, true);
+ release_defs (def);
+ }
+
+ bitmap_clear_bit (toremove, j);
+ }
+ }
+}
+
/* Return true if SSA_NAME is malformed and mark it visited.
IS_VIRTUAL is true if this SSA_NAME was found inside a virtual
@@ -1289,7 +1357,8 @@ useless_type_conversion_p (tree outer_type, tree inner_type)
if (!TYPE_ARG_TYPES (outer_type))
return true;
- /* If the argument types are compatible the conversion is useless. */
+ /* If the unqualified argument types are compatible the conversion
+ is useless. */
if (TYPE_ARG_TYPES (outer_type) == TYPE_ARG_TYPES (inner_type))
return true;
@@ -1298,8 +1367,9 @@ useless_type_conversion_p (tree outer_type, tree inner_type)
outer_parm && inner_parm;
outer_parm = TREE_CHAIN (outer_parm),
inner_parm = TREE_CHAIN (inner_parm))
- if (!useless_type_conversion_p (TREE_VALUE (outer_parm),
- TREE_VALUE (inner_parm)))
+ if (!useless_type_conversion_p
+ (TYPE_MAIN_VARIANT (TREE_VALUE (outer_parm)),
+ TYPE_MAIN_VARIANT (TREE_VALUE (inner_parm))))
return false;
/* If there is a mismatch in the number of arguments the functions
@@ -1893,7 +1963,8 @@ execute_update_addresses_taken (bool do_optimize)
{
gimple stmt = gsi_stmt (gsi);
- if (gimple_references_memory_p (stmt))
+ if (gimple_references_memory_p (stmt)
+ || is_gimple_debug (stmt))
update_stmt (stmt);
}
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 0a2ab19a232..7e45123faff 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -145,6 +145,9 @@ vect_stmt_relevant_p (gimple stmt, loop_vec_info loop_vinfo,
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "vec_stmt_relevant_p: used out of loop.");
+ if (is_gimple_debug (USE_STMT (use_p)))
+ continue;
+
/* We expect all such uses to be in the loop exit phis
(because of loop closed form) */
gcc_assert (gimple_code (USE_STMT (use_p)) == GIMPLE_PHI);
diff --git a/gcc/tree.c b/gcc/tree.c
index 1cdea5737ba..cd224500eca 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -2004,18 +2004,6 @@ tree_last (tree chain)
return chain;
}
-/* Return the node in a chain of nodes whose value is x, NULL if not found. */
-
-tree
-tree_find_value (tree chain, tree x)
-{
- tree list;
- for (list = chain; list; list = TREE_CHAIN (list))
- if (TREE_VALUE (list) == x)
- return list;
- return NULL;
-}
-
/* Reverse the order of elements in the chain T,
and return the new head of the chain (old last element). */
@@ -4458,6 +4446,9 @@ free_lang_data_in_decl (tree decl)
struct free_lang_data_d
{
+ /* Worklist to avoid excessive recursion. */
+ VEC(tree,heap) *worklist;
+
/* Set of traversed objects. Used to avoid duplicate visits. */
struct pointer_set_t *pset;
@@ -4519,6 +4510,9 @@ add_tree_to_fld_list (tree t, struct free_lang_data_d *fld)
gcc_unreachable ();
}
+#define PUSH(t) \
+ if (t && !pointer_set_contains (fld->pset, t)) \
+ VEC_safe_push (tree, heap, fld->worklist, (t))
/* Operand callback helper for free_lang_data_in_node. *TP is the
subtree operand being considered. */
@@ -4529,49 +4523,49 @@ find_decls_types_r (tree *tp, int *ws ATTRIBUTE_UNUSED, void *data)
tree t = *tp;
struct free_lang_data_d *fld = (struct free_lang_data_d *) data;
+ if (TREE_CODE (t) == TREE_LIST)
+ return NULL_TREE;
+
if (DECL_P (t))
{
/* Note that walk_tree does not traverse every possible field in
decls, so we have to do our own traversals here. */
add_tree_to_fld_list (t, fld);
- walk_tree (&DECL_NAME (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&DECL_CONTEXT (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&DECL_SIZE (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&DECL_SIZE_UNIT (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&DECL_INITIAL (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&DECL_ATTRIBUTES (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&DECL_ABSTRACT_ORIGIN (t), find_decls_types_r, fld, fld->pset);
+ PUSH (DECL_NAME (t));
+ PUSH (DECL_CONTEXT (t));
+ PUSH (DECL_SIZE (t));
+ PUSH (DECL_SIZE_UNIT (t));
+ PUSH (DECL_INITIAL(t));
+ PUSH (DECL_ATTRIBUTES (t));
+ PUSH (DECL_ABSTRACT_ORIGIN (t));
if (TREE_CODE (t) == FUNCTION_DECL)
{
- walk_tree (&DECL_ARGUMENTS (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&DECL_RESULT (t), find_decls_types_r, fld, fld->pset);
+ PUSH (DECL_ARGUMENTS (t));
+ PUSH (DECL_RESULT (t));
}
else if (TREE_CODE (t) == TYPE_DECL)
{
- walk_tree (&DECL_ARGUMENT_FLD (t), find_decls_types_r, fld,
- fld->pset);
- walk_tree (&DECL_VINDEX (t), find_decls_types_r, fld, fld->pset);
+ PUSH (DECL_ARGUMENT_FLD (t));
+ PUSH (DECL_VINDEX (t));
}
else if (TREE_CODE (t) == FIELD_DECL)
{
- walk_tree (&DECL_FIELD_OFFSET (t), find_decls_types_r, fld,
- fld->pset);
- walk_tree (&DECL_BIT_FIELD_TYPE (t), find_decls_types_r, fld,
- fld->pset);
- walk_tree (&DECL_QUALIFIER (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&DECL_FIELD_BIT_OFFSET (t), find_decls_types_r, fld,
- fld->pset);
- walk_tree (&DECL_FCONTEXT (t), find_decls_types_r, fld, fld->pset);
+ PUSH (DECL_FIELD_OFFSET (t));
+ PUSH (DECL_BIT_FIELD_TYPE (t));
+ PUSH (DECL_QUALIFIER (t));
+ PUSH (DECL_FIELD_BIT_OFFSET (t));
+ PUSH (DECL_FCONTEXT (t));
}
else if (TREE_CODE (t) == VAR_DECL)
{
- walk_tree (&DECL_SECTION_NAME (t), find_decls_types_r, fld,
- fld->pset);
- walk_tree (&DECL_COMDAT_GROUP (t), find_decls_types_r, fld,
- fld->pset);
+ PUSH (DECL_SECTION_NAME (t));
+ PUSH (DECL_COMDAT_GROUP (t));
}
+
+ PUSH (TREE_CHAIN (t));
+ *ws = 0;
}
else if (TYPE_P (t))
{
@@ -4579,38 +4573,55 @@ find_decls_types_r (tree *tp, int *ws ATTRIBUTE_UNUSED, void *data)
types, so we have to do our own traversals here. */
add_tree_to_fld_list (t, fld);
- walk_tree (&TYPE_CACHED_VALUES (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&TYPE_SIZE (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&TYPE_SIZE_UNIT (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&TYPE_ATTRIBUTES (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&TYPE_POINTER_TO (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&TYPE_REFERENCE_TO (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&TYPE_NAME (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&TYPE_MINVAL (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&TYPE_MAXVAL (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&TYPE_NEXT_VARIANT (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&TYPE_MAIN_VARIANT (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&TYPE_CONTEXT (t), find_decls_types_r, fld, fld->pset);
- walk_tree (&TYPE_CANONICAL (t), find_decls_types_r, fld, fld->pset);
- if (RECORD_OR_UNION_TYPE_P (t))
- walk_tree (&TYPE_BINFO (t), find_decls_types_r, fld, fld->pset);
- }
-
- if (TREE_TYPE (t))
- walk_tree (&TREE_TYPE (t), find_decls_types_r, fld, fld->pset);
+ PUSH (TYPE_CACHED_VALUES (t));
+ PUSH (TYPE_SIZE (t));
+ PUSH (TYPE_SIZE_UNIT (t));
+ PUSH (TYPE_ATTRIBUTES (t));
+ PUSH (TYPE_POINTER_TO (t));
+ PUSH (TYPE_REFERENCE_TO (t));
+ PUSH (TYPE_NAME (t));
+ PUSH (TYPE_MINVAL (t));
+ PUSH (TYPE_MAXVAL (t));
+ PUSH (TYPE_MAIN_VARIANT (t));
+ PUSH (TYPE_NEXT_VARIANT (t));
+ PUSH (TYPE_CONTEXT (t));
+ PUSH (TYPE_CANONICAL (t));
+
+ if (RECORD_OR_UNION_TYPE_P (t)
+ && TYPE_BINFO (t))
+ {
+ unsigned i;
+ tree tem;
+ for (i = 0; VEC_iterate (tree, BINFO_BASE_BINFOS (TYPE_BINFO (t)),
+ i, tem); ++i)
+ PUSH (TREE_TYPE (tem));
+ }
- /* Do not recurse into TREE_CHAIN to avoid blowing up the stack. */
- for (tp = &TREE_CHAIN (t); *tp; tp = &TREE_CHAIN (*tp))
- {
- tree saved_chain = TREE_CHAIN (*tp);
- TREE_CHAIN (*tp) = NULL_TREE;
- walk_tree (tp, find_decls_types_r, fld, fld->pset);
- TREE_CHAIN (*tp) = saved_chain;
+ PUSH (TREE_CHAIN (t));
+ *ws = 0;
}
+ PUSH (TREE_TYPE (t));
+
return NULL_TREE;
}
+#undef PUSH
+
+/* Find decls and types in T. */
+
+static void
+find_decls_types (tree t, struct free_lang_data_d *fld)
+{
+ while (1)
+ {
+ if (!pointer_set_contains (fld->pset, t))
+ walk_tree (&t, find_decls_types_r, fld, fld->pset);
+ if (VEC_empty (tree, fld->worklist))
+ break;
+ t = VEC_pop (tree, fld->worklist);
+ }
+}
/* Translate all the types in LIST with the corresponding runtime
types. */
@@ -4654,13 +4665,13 @@ find_decls_types_in_eh_region (eh_region r, struct free_lang_data_d *fld)
{
tree list = r->u.eh_catch.type_list;
r->u.eh_catch.type_list = get_eh_types_for_runtime (list);
- walk_tree (&r->u.eh_catch.type_list, find_decls_types_r, fld, fld->pset);
+ find_decls_types (r->u.eh_catch.type_list, fld);
}
else if (r->type == ERT_ALLOWED_EXCEPTIONS)
{
tree list = r->u.allowed.type_list;
r->u.allowed.type_list = get_eh_types_for_runtime (list);
- walk_tree (&r->u.allowed.type_list, find_decls_types_r, fld, fld->pset);
+ find_decls_types (r->u.allowed.type_list, fld);
}
}
@@ -4678,7 +4689,7 @@ find_decls_types_in_node (struct cgraph_node *n, struct free_lang_data_d *fld)
struct function *fn;
tree t;
- walk_tree (&n->decl, find_decls_types_r, fld, fld->pset);
+ find_decls_types (n->decl, fld);
if (!gimple_has_body_p (n->decl))
return;
@@ -4689,13 +4700,7 @@ find_decls_types_in_node (struct cgraph_node *n, struct free_lang_data_d *fld)
/* Traverse locals. */
for (t = fn->local_decls; t; t = TREE_CHAIN (t))
- {
- tree *tp = &TREE_VALUE (t);
- tree saved_chain = TREE_CHAIN (*tp);
- TREE_CHAIN (*tp) = NULL_TREE;
- walk_tree (tp, find_decls_types_r, fld, fld->pset);
- TREE_CHAIN (*tp) = saved_chain;
- }
+ find_decls_types (TREE_VALUE (t), fld);
/* Traverse EH regions in FN. */
if (fn->eh->region_array)
@@ -4720,7 +4725,7 @@ find_decls_types_in_node (struct cgraph_node *n, struct free_lang_data_d *fld)
for (i = 0; i < gimple_phi_num_args (phi); i++)
{
tree *arg_p = gimple_phi_arg_def_ptr (phi, i);
- walk_tree (arg_p, find_decls_types_r, fld, fld->pset);
+ find_decls_types (*arg_p, fld);
}
}
@@ -4730,8 +4735,8 @@ find_decls_types_in_node (struct cgraph_node *n, struct free_lang_data_d *fld)
for (i = 0; i < gimple_num_ops (stmt); i++)
{
- tree *arg_p = gimple_op_ptr (stmt, i);
- walk_tree (arg_p, find_decls_types_r, fld, fld->pset);
+ tree arg = gimple_op (stmt, i);
+ find_decls_types (arg, fld);
}
}
}
@@ -4747,7 +4752,7 @@ find_decls_types_in_node (struct cgraph_node *n, struct free_lang_data_d *fld)
static void
find_decls_types_in_var (struct varpool_node *v, struct free_lang_data_d *fld)
{
- walk_tree (&v->decl, find_decls_types_r, fld, fld->pset);
+ find_decls_types (v->decl, fld);
}
@@ -4780,6 +4785,7 @@ free_lang_data_in_cgraph (void)
/* Initialize sets and arrays to store referenced decls and types. */
fld.pset = pointer_set_create ();
+ fld.worklist = NULL;
fld.decls = VEC_alloc (tree, heap, 100);
fld.types = VEC_alloc (tree, heap, 100);
@@ -4788,7 +4794,7 @@ free_lang_data_in_cgraph (void)
find_decls_types_in_node (n, &fld);
for (i = 0; VEC_iterate (alias_pair, alias_pairs, i, p); i++)
- walk_tree (&p->decl, find_decls_types_r, &fld, fld.pset);
+ find_decls_types (p->decl, &fld);
/* Find decls and types in every varpool symbol. */
for (v = varpool_nodes_queue; v; v = v->next_needed)
@@ -4828,6 +4834,7 @@ free_lang_data_in_cgraph (void)
free_lang_data_in_type (t);
pointer_set_destroy (fld.pset);
+ VEC_free (tree, heap, fld.worklist);
VEC_free (tree, heap, fld.decls);
VEC_free (tree, heap, fld.types);
}
@@ -4916,7 +4923,7 @@ struct simple_ipa_opt_pass pass_ipa_free_lang_data =
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- 0 /* todo_flags_finish */
+ TODO_ggc_collect /* todo_flags_finish */
}
};
@@ -6912,44 +6919,29 @@ build_array_type (tree elt_type, tree index_type)
t = make_node (ARRAY_TYPE);
TREE_TYPE (t) = elt_type;
TYPE_DOMAIN (t) = index_type;
-
- if (index_type == 0)
- {
- tree save = t;
- hashcode = iterative_hash_object (TYPE_HASH (elt_type), hashcode);
- t = type_hash_canon (hashcode, t);
- if (save == t)
- layout_type (t);
-
- if (TYPE_CANONICAL (t) == t)
- {
- if (TYPE_STRUCTURAL_EQUALITY_P (elt_type))
- SET_TYPE_STRUCTURAL_EQUALITY (t);
- else if (TYPE_CANONICAL (elt_type) != elt_type)
- TYPE_CANONICAL (t)
- = build_array_type (TYPE_CANONICAL (elt_type), index_type);
- }
+ layout_type (t);
- return t;
- }
+ /* If the element type is incomplete at this point we get marked for
+ structural equality. Do not record these types in the canonical
+ type hashtable. */
+ if (TYPE_STRUCTURAL_EQUALITY_P (t))
+ return t;
hashcode = iterative_hash_object (TYPE_HASH (elt_type), hashcode);
- hashcode = iterative_hash_object (TYPE_HASH (index_type), hashcode);
+ if (index_type)
+ hashcode = iterative_hash_object (TYPE_HASH (index_type), hashcode);
t = type_hash_canon (hashcode, t);
- if (!COMPLETE_TYPE_P (t))
- layout_type (t);
-
if (TYPE_CANONICAL (t) == t)
{
if (TYPE_STRUCTURAL_EQUALITY_P (elt_type)
- || TYPE_STRUCTURAL_EQUALITY_P (index_type))
+ || (index_type && TYPE_STRUCTURAL_EQUALITY_P (index_type)))
SET_TYPE_STRUCTURAL_EQUALITY (t);
else if (TYPE_CANONICAL (elt_type) != elt_type
- || TYPE_CANONICAL (index_type) != index_type)
+ || (index_type && TYPE_CANONICAL (index_type) != index_type))
TYPE_CANONICAL (t)
= build_array_type (TYPE_CANONICAL (elt_type),
- TYPE_CANONICAL (index_type));
+ index_type ? TYPE_CANONICAL (index_type) : NULL);
}
return t;
diff --git a/gcc/tree.h b/gcc/tree.h
index d912f7041d4..c6ccff0a2d1 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1067,9 +1067,9 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
/* Nonzero if TYPE is a record or union type. */
#define RECORD_OR_UNION_TYPE_P(TYPE) \
- (TREE_CODE (TYPE) == RECORD_TYPE \
- || TREE_CODE (TYPE) == UNION_TYPE \
- || TREE_CODE (TYPE) == QUAL_UNION_TYPE)
+ (TREE_CODE (TYPE) == RECORD_TYPE \
+ || TREE_CODE (TYPE) == UNION_TYPE \
+ || TREE_CODE (TYPE) == QUAL_UNION_TYPE)
/* Nonzero if TYPE represents an aggregate (multi-component) type.
Keep these checks in ascending code order. */
@@ -4293,10 +4293,6 @@ extern tree tree_cons_stat (tree, tree, tree MEM_STAT_DECL);
extern tree tree_last (tree);
-/* Return the node in a chain whose TREE_VALUE is x, NULL if not found. */
-
-extern tree tree_find_value (tree, tree);
-
/* Reverse the order of elements in a chain, and return the new head. */
extern tree nreverse (tree);
diff --git a/gcc/unwind-dw2.c b/gcc/unwind-dw2.c
index 68a1a282b34..a86c21b7129 100644
--- a/gcc/unwind-dw2.c
+++ b/gcc/unwind-dw2.c
@@ -1431,7 +1431,7 @@ init_dwarf_reg_size_table (void)
__builtin_init_dwarf_reg_size_table (dwarf_reg_size_table);
}
-static void
+static void __attribute__((noinline))
uw_init_context_1 (struct _Unwind_Context *context,
void *outer_cfa, void *outer_ra)
{
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index a24755fe07e..475ba57553e 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -723,12 +723,24 @@ static inline bool
dv_is_decl_p (decl_or_value dv)
{
if (!dv)
- return false;
+ return true;
- if (GET_CODE ((rtx)dv) == VALUE)
- return false;
+ /* Make sure relevant codes don't overlap. */
+ switch ((int)TREE_CODE ((tree)dv))
+ {
+ case (int)VAR_DECL:
+ case (int)PARM_DECL:
+ case (int)RESULT_DECL:
+ case (int)FUNCTION_DECL:
+ case (int)COMPONENT_REF:
+ return true;
- return true;
+ case (int)VALUE:
+ return false;
+
+ default:
+ gcc_unreachable ();
+ }
}
/* Return true if a decl_or_value is a VALUE rtl. */
@@ -790,21 +802,13 @@ dv_pool (decl_or_value dv)
return dv_onepart_p (dv) ? valvar_pool : var_pool;
}
-#define IS_DECL_CODE(C) ((C) == VAR_DECL || (C) == PARM_DECL \
- || (C) == RESULT_DECL || (C) == COMPONENT_REF)
-
-/* Check that VALUE won't ever look like a DECL. */
-static char check_value_is_not_decl [(!IS_DECL_CODE ((enum tree_code)VALUE))
- ? 1 : -1] ATTRIBUTE_UNUSED;
-
-
/* Build a decl_or_value out of a decl. */
static inline decl_or_value
dv_from_decl (tree decl)
{
decl_or_value dv;
- gcc_assert (!decl || IS_DECL_CODE (TREE_CODE (decl)));
dv = decl;
+ gcc_assert (dv_is_decl_p (dv));
return dv;
}
@@ -813,8 +817,8 @@ static inline decl_or_value
dv_from_value (rtx value)
{
decl_or_value dv;
- gcc_assert (value);
dv = value;
+ gcc_assert (dv_is_value_p (dv));
return dv;
}
@@ -7058,10 +7062,20 @@ vt_add_function_parameters (void)
if (!vt_get_decl_and_offset (incoming, &decl, &offset))
{
- if (!vt_get_decl_and_offset (decl_rtl, &decl, &offset))
- continue;
- offset += byte_lowpart_offset (GET_MODE (incoming),
- GET_MODE (decl_rtl));
+ if (REG_P (incoming) || MEM_P (incoming))
+ {
+ /* This means argument is passed by invisible reference. */
+ offset = 0;
+ decl = parm;
+ incoming = gen_rtx_MEM (GET_MODE (decl_rtl), incoming);
+ }
+ else
+ {
+ if (!vt_get_decl_and_offset (decl_rtl, &decl, &offset))
+ continue;
+ offset += byte_lowpart_offset (GET_MODE (incoming),
+ GET_MODE (decl_rtl));
+ }
}
if (!decl)
diff --git a/gcc/varasm.c b/gcc/varasm.c
index b2729fc1a22..4a07b9ad212 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -2325,11 +2325,11 @@ assemble_external (tree decl ATTRIBUTE_UNUSED)
for declarations that can be weak, it happens to be
match. */
&& !TREE_STATIC (decl)
- && tree_find_value (weak_decls, decl) == NULL_TREE)
- weak_decls = tree_cons (NULL, decl, weak_decls);
+ && value_member (decl, weak_decls) == NULL_TREE)
+ weak_decls = tree_cons (NULL, decl, weak_decls);
#ifdef ASM_OUTPUT_EXTERNAL
- if (tree_find_value (pending_assemble_externals, decl) == NULL_TREE)
+ if (value_member (decl, pending_assemble_externals) == NULL_TREE)
pending_assemble_externals = tree_cons (NULL, decl,
pending_assemble_externals);
#endif
@@ -5392,13 +5392,7 @@ find_decl_and_mark_needed (tree decl, tree target)
if (fnode)
{
- /* We can't mark function nodes as used after cgraph global info
- is finished. This wouldn't generally be necessary, but C++
- virtual table thunks are introduced late in the game and
- might seem like they need marking, although in fact they
- don't. */
- if (! cgraph_global_info_ready)
- cgraph_mark_needed_node (fnode);
+ cgraph_mark_needed_node (fnode);
return fnode->decl;
}
else if (vnode)
@@ -5568,7 +5562,7 @@ finish_aliases_1 (void)
to bind locally. Of course this is a hack - to keep it
working do the following (which is not strictly correct). */
&& (! TREE_CODE (target_decl) == FUNCTION_DECL
- || ! TREE_STATIC (target_decl))
+ || ! DECL_VIRTUAL_P (target_decl))
&& ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
error ("%q+D aliased to external symbol %qE",
p->decl, p->target);
diff --git a/libcpp/po/ChangeLog b/libcpp/po/ChangeLog
index 03e5017bd02..179a1c6d523 100644
--- a/libcpp/po/ChangeLog
+++ b/libcpp/po/ChangeLog
@@ -1,3 +1,7 @@
+2009-09-08 Joseph Myers <joseph@codesourcery.com>
+
+ * id.po: Update.
+
2009-09-02 Joseph Myers <joseph@codesourcery.com>
* es.po: Update.
diff --git a/libcpp/po/id.po b/libcpp/po/id.po
index da4c89cb9d3..ba92679d03b 100644
--- a/libcpp/po/id.po
+++ b/libcpp/po/id.po
@@ -1,14 +1,14 @@
# Pesan bahasa indonesia untuk cpplib
# Copyright (C) 2008 Free Software Foundation, Inc.
# This file is distributed under the same license as the gcc package.
-# Arif E. Nugroho <arif_endro@yahoo.com>, 2008.
+# Arif E. Nugroho <arif_endro@yahoo.com>, 2008, 2009.
#
msgid ""
msgstr ""
-"Project-Id-Version: cpplib 4.4-b20081121\n"
+"Project-Id-Version: cpplib 4.4.1\n"
"Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
"POT-Creation-Date: 2009-04-22 16:32+0000\n"
-"PO-Revision-Date: 2008-11-26 07:30+0700\n"
+"PO-Revision-Date: 2009-09-08 18:00+0700\n"
"Last-Translator: Arif E. Nugroho <arif_endro@yahoo.com>\n"
"Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
@@ -900,9 +900,9 @@ msgid "while writing precompiled header"
msgstr "ketika menulis precompiled header"
#: pch.c:484
-#, fuzzy, c-format
+#, c-format
msgid "%s: not used because `%.*s' is poisoned"
-msgstr "%s: tidak digunakan karena `%s' didefinisikan"
+msgstr "%s: tidak digunakan karena `%.*s' teracuni"
#: pch.c:506
#, c-format
diff --git a/libdecnumber/ChangeLog b/libdecnumber/ChangeLog
index 52415c8727e..b64e561a0cc 100644
--- a/libdecnumber/ChangeLog
+++ b/libdecnumber/ChangeLog
@@ -1,3 +1,11 @@
+2009-09-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure: Regenerate.
+
+2009-09-08 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure: Regenerate.
+
2009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac (AC_PREREQ): Bump to 2.64.
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 065a4ba3c73..f46f11a861e 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,26 @@
+2009-09-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure: Regenerate.
+
+2009-09-08 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure: Regenerate.
+
+2009-09-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libgfortran/41192
+ * io/list_read.c (eat_line): Enable eat_line to function on
+ internal units.
+
+ PR libgfortran/41219
+ * io/list_read.c (nml_read_obj): Replace GFC_DTYPE_UNKNOWN with
+ BT_NULL to get rid of warning.
+
+2009-09-04 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/41219
+ * intrinsics/getlog.c: Define _POSIX for MINGW32.
+
2009-09-03 Tobias Burnus <burnus@net-b.de>
PR fortran/41219
diff --git a/libgfortran/intrinsics/getlog.c b/libgfortran/intrinsics/getlog.c
index 0456c5796a2..e75aa1cb7d2 100644
--- a/libgfortran/intrinsics/getlog.c
+++ b/libgfortran/intrinsics/getlog.c
@@ -28,6 +28,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include <string.h>
#ifdef HAVE_UNISTD_H
+# if defined __MINGW32__ && defined HAVE_GETLOGIN
+# define _POSIX 1
+# endif
#include <unistd.h>
#endif
#ifdef HAVE_PWD_H
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index bcc00e17c26..d8ad602e593 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -287,10 +287,10 @@ static void
eat_line (st_parameter_dt *dtp)
{
char c;
- if (!is_internal_unit (dtp))
- do
- c = next_char (dtp);
- while (c != '\n');
+
+ do
+ c = next_char (dtp);
+ while (c != '\n');
}
@@ -2374,10 +2374,10 @@ nml_read_obj (st_parameter_dt *dtp, namelist_info * nl, index_type offset,
if (dtp->u.p.input_complete)
return SUCCESS;
- /* GFC_TYPE_UNKNOWN through for nulls and is detected
- after the switch block. */
+ /* BT_NULL (equivalent to GFC_DTYPE_UNKNOWN) falls through
+ for nulls and is detected at default: of switch block. */
- dtp->u.p.saved_type = GFC_DTYPE_UNKNOWN;
+ dtp->u.p.saved_type = BT_NULL;
free_saved (dtp);
switch (nl->type)
@@ -2467,7 +2467,7 @@ nml_read_obj (st_parameter_dt *dtp, namelist_info * nl, index_type offset,
return SUCCESS;
}
- if (dtp->u.p.saved_type == GFC_DTYPE_UNKNOWN)
+ if (dtp->u.p.saved_type == BT_NULL)
{
dtp->u.p.expanded_read = 0;
goto incr_idx;
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index be981b8389a..b3dc41708b4 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,20 @@
+2009-09-04 Ozkan Sezer <sezeroz@gmail.com>
+
+ PR target/39065
+ * configure.ac: Replace AC_CHECK_TYPE() for intptr_t and uintptr_t
+ with AC_TYPE_INTPTR_T and AC_TYPE_UINTPTR_T.
+ * config.in: Regenerated.
+ * configure: Regenerated.
+
+2009-09-03 Ozkan Sezer <sezeroz@gmail.com>
+
+ PR target/39065
+ * configure.ac: Also check for intptr_t.
+ * config.h.in: Regenerated.
+ * configure: Regenerated.
+ * hashtab.c (hash_pointer): Cast the pointer argument to intptr_t
+ instead of of long.
+
2009-09-02 Tristan Gingold <gingold@adacore.com>
* vmsbuild.com: Removed as unused and superceeded by makefile.vms.
diff --git a/libiberty/config.in b/libiberty/config.in
index 514e73c2732..193164830cf 100644
--- a/libiberty/config.in
+++ b/libiberty/config.in
@@ -121,6 +121,9 @@
/* Define to 1 if you have the `insque' function. */
#undef HAVE_INSQUE
+/* Define to 1 if the system has the type `intptr_t'. */
+#undef HAVE_INTPTR_T
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@@ -457,10 +460,15 @@
#undef inline
#endif
+/* Define to the type of a signed integer type wide enough to hold a pointer,
+ if such a type exists, and if the system does not define it. */
+#undef intptr_t
+
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
-/* Define to `unsigned long' if <sys/types.h> does not define. */
+/* Define to the type of an unsigned integer type wide enough to hold a
+ pointer, if such a type exists, and if the system does not define it. */
#undef uintptr_t
/* Define as `fork' if `vfork' does not work. */
diff --git a/libiberty/configure b/libiberty/configure
index f37e82664c4..a767e1b81ff 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -5047,18 +5047,6 @@ _ACEOF
-ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_uintptr_t" = x""yes; then :
-
-else
-
-cat >>confdefs.h <<_ACEOF
-#define uintptr_t unsigned long
-_ACEOF
-
-fi
-
-
# Look for a 64-bit type.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a 64-bit type" >&5
$as_echo_n "checking for a 64-bit type... " >&6; }
@@ -5138,6 +5126,78 @@ _ACEOF
fi
+
+ ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_intptr_t" = x""yes; then :
+
+$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
+
+else
+ for ac_type in 'int' 'long int' 'long long int'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+cat >>confdefs.h <<_ACEOF
+#define intptr_t $ac_type
+_ACEOF
+
+ ac_type=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test -z "$ac_type" && break
+ done
+fi
+
+
+
+ ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintptr_t" = x""yes; then :
+
+$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
+
+else
+ for ac_type in 'unsigned int' 'unsigned long int' \
+ 'unsigned long long int'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+cat >>confdefs.h <<_ACEOF
+#define uintptr_t $ac_type
+_ACEOF
+
+ ac_type=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test -z "$ac_type" && break
+ done
+fi
+
+
+
# Given the above check, we always have uintptr_t or a fallback
# definition. So define HAVE_UINTPTR_T in case any imported code
# relies on it.
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
index 979cd215999..c2e851c29b4 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
@@ -255,8 +255,6 @@ libiberty_AC_DECLARE_ERRNO
# Determine the size of an int for struct fibnode.
AC_CHECK_SIZEOF([int])
-AC_CHECK_TYPE(uintptr_t, unsigned long)
-
# Look for a 64-bit type.
AC_MSG_CHECKING([for a 64-bit type])
AC_CACHE_VAL(liberty_cv_uint64,
@@ -290,6 +288,9 @@ if test "$liberty_cv_uint64" != none; then
[Define to an unsigned 64-bit type available in the compiler.])
fi
+AC_TYPE_INTPTR_T
+AC_TYPE_UINTPTR_T
+
# Given the above check, we always have uintptr_t or a fallback
# definition. So define HAVE_UINTPTR_T in case any imported code
# relies on it.
diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c
index 3e649215f42..8c8bd3110ad 100644
--- a/libiberty/hashtab.c
+++ b/libiberty/hashtab.c
@@ -196,7 +196,7 @@ higher_prime_index (unsigned long n)
static hashval_t
hash_pointer (const PTR p)
{
- return (hashval_t) ((long)p >> 3);
+ return (hashval_t) ((intptr_t)p >> 3);
}
/* Returns non-zero if P1 and P2 are equal. */
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 2498fc742b2..be89f186885 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,7 @@
+2009-09-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure: Rebuilt with modified libtool.m4.
+
2009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac (AC_PREREQ): Bump to 2.64.
diff --git a/libjava/configure b/libjava/configure
index 63a238fbd14..a7c464a0bdb 100755
--- a/libjava/configure
+++ b/libjava/configure
@@ -14080,7 +14080,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
else
GXX=no
@@ -14417,7 +14417,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
;;
*)
if test "$GXX" = yes; then
@@ -14482,7 +14482,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
;;
*)
if test "$GXX" = yes; then
@@ -14826,7 +14826,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
else
# FIXME: insert proper C++ library support
@@ -14910,7 +14910,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
else
# g++ 2.7 appears to require `-G' NOT `-shared' on this
# platform.
@@ -14921,7 +14921,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
fi
hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index d0562a6d89c..7f646a97526 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,39 @@
+2009-09-09 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/30_threads/thread/native_handle/typesizes.cc: Remove
+ *-*-freebsd* from both dg-do and dg-options.
+
+2009-09-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure: Rebuilt with modified libtool.m4.
+
+2009-09-07 H.J. Lu <hongjiu.lu@intel.com>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ PR libstdc++/41280
+ * configure.ac: Run "${multi_basedir}/config-ml.in" to generate
+ MULTISUBDIR = in subdirectory Makefiles, with ml_norecursion set.
+ * configure: Regenerate.
+
+2009-09-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/41267
+ * include/bits/stl_algobase.h (__copy_move::__copy_m,
+ __copy_move_backward::__copy_move_b): Don't call __builtin_memmove
+ with a null third argument.
+
+2009-09-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ Revert.
+ 2009-08-06 Benjamin Kosnik <bkoz@redhat.com>
+ * src/compatibility.cc: Make C++0x safe, add in explicit casts to
+ bool for stream sentry objects.
+ * include/bits/istream.tcc: Same.
+ * include/bits/ostream.tcc: Same.
+ * include/bits/basic_string.tcc: Same.
+ * include/bits/ostream_insert.h: Same.
+ * src/istream.cc: Same.
+
2009-09-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac: Replace AC_CONFIG_COMMANDS([default])
@@ -21,7 +57,7 @@
2009-09-02 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/stl_uninitialized.h
- (__uninitialized_copy::uninitialized_copy): Just call (the now
+ (__uninitialized_copy::uninitialized_copy): Just call (the now
forwarding) _Construct.
2009-09-01 Chris Jefferson <chris@bubblescope.net>
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 2d0c97782cf..1430a8b0307 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -12336,7 +12336,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
else
GXX=no
@@ -12673,7 +12673,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
;;
*)
if test "$GXX" = yes; then
@@ -12738,7 +12738,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
;;
*)
if test "$GXX" = yes; then
@@ -13082,7 +13082,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
else
# FIXME: insert proper C++ library support
@@ -13166,7 +13166,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
else
# g++ 2.7 appears to require `-G' NOT `-shared' on this
# platform.
@@ -13177,7 +13177,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
fi
hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
@@ -61956,57 +61956,78 @@ fi
s!`test -f '$<' || echo '$(srcdir)/'`!!
_EOF
sed -f vpsed$$ $ac_file > tmp$$
- grep '^MULTISUBDIR =' Makefile >> tmp$$
mv tmp$$ $ac_file
rm vpsed$$
+ echo 'MULTISUBDIR =' >> $ac_file
+ ml_norecursion=yes
+ . ${multi_basedir}/config-ml.in
+ { ml_norecursion=; unset ml_norecursion;}
;;
"libsupc++/Makefile":F) cat > vpsed$$ << \_EOF
s!`test -f '$<' || echo '$(srcdir)/'`!!
_EOF
sed -f vpsed$$ $ac_file > tmp$$
- grep '^MULTISUBDIR =' Makefile >> tmp$$
mv tmp$$ $ac_file
rm vpsed$$
+ echo 'MULTISUBDIR =' >> $ac_file
+ ml_norecursion=yes
+ . ${multi_basedir}/config-ml.in
+ { ml_norecursion=; unset ml_norecursion;}
;;
"python/Makefile":F) cat > vpsed$$ << \_EOF
s!`test -f '$<' || echo '$(srcdir)/'`!!
_EOF
sed -f vpsed$$ $ac_file > tmp$$
- grep '^MULTISUBDIR =' Makefile >> tmp$$
mv tmp$$ $ac_file
rm vpsed$$
+ echo 'MULTISUBDIR =' >> $ac_file
+ ml_norecursion=yes
+ . ${multi_basedir}/config-ml.in
+ { ml_norecursion=; unset ml_norecursion;}
;;
"src/Makefile":F) cat > vpsed$$ << \_EOF
s!`test -f '$<' || echo '$(srcdir)/'`!!
_EOF
sed -f vpsed$$ $ac_file > tmp$$
- grep '^MULTISUBDIR =' Makefile >> tmp$$
mv tmp$$ $ac_file
rm vpsed$$
+ echo 'MULTISUBDIR =' >> $ac_file
+ ml_norecursion=yes
+ . ${multi_basedir}/config-ml.in
+ { ml_norecursion=; unset ml_norecursion;}
;;
"doc/Makefile":F) cat > vpsed$$ << \_EOF
s!`test -f '$<' || echo '$(srcdir)/'`!!
_EOF
sed -f vpsed$$ $ac_file > tmp$$
- grep '^MULTISUBDIR =' Makefile >> tmp$$
mv tmp$$ $ac_file
rm vpsed$$
+ echo 'MULTISUBDIR =' >> $ac_file
+ ml_norecursion=yes
+ . ${multi_basedir}/config-ml.in
+ { ml_norecursion=; unset ml_norecursion;}
;;
"po/Makefile":F) cat > vpsed$$ << \_EOF
s!`test -f '$<' || echo '$(srcdir)/'`!!
_EOF
sed -f vpsed$$ $ac_file > tmp$$
- grep '^MULTISUBDIR =' Makefile >> tmp$$
mv tmp$$ $ac_file
rm vpsed$$
+ echo 'MULTISUBDIR =' >> $ac_file
+ ml_norecursion=yes
+ . ${multi_basedir}/config-ml.in
+ { ml_norecursion=; unset ml_norecursion;}
;;
"testsuite/Makefile":F) cat > vpsed$$ << \_EOF
s!`test -f '$<' || echo '$(srcdir)/'`!!
_EOF
sed -f vpsed$$ $ac_file > tmp$$
- grep '^MULTISUBDIR =' Makefile >> tmp$$
mv tmp$$ $ac_file
rm vpsed$$
+ echo 'MULTISUBDIR =' >> $ac_file
+ ml_norecursion=yes
+ . ${multi_basedir}/config-ml.in
+ { ml_norecursion=; unset ml_norecursion;}
;;
"generate-headers":C) (cd include && ${MAKE-make} pch_build= ) ;;
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index e8f680526e9..e35bc0a9d51 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -404,9 +404,12 @@ AC_CONFIG_FILES(AC_FOREACH([DIR], glibcxx_SUBDIRS, [DIR/Makefile ]),
s!`test -f '$<' || echo '$(srcdir)/'`!!
_EOF
sed -f vpsed$$ $ac_file > tmp$$
- grep '^MULTISUBDIR =' Makefile >> tmp$$
mv tmp$$ $ac_file
rm vpsed$$
+ echo 'MULTISUBDIR =' >> $ac_file
+ ml_norecursion=yes
+ . ${multi_basedir}/config-ml.in
+ AS_UNSET([ml_norecursion])
])
AC_CONFIG_COMMANDS([generate-headers],
diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc
index 10dea7563d8..d450a4717de 100644
--- a/libstdc++-v3/include/bits/basic_string.tcc
+++ b/libstdc++-v3/include/bits/basic_string.tcc
@@ -1007,7 +1007,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__size_type __extracted = 0;
typename __ios_base::iostate __err = __ios_base::goodbit;
typename __istream_type::sentry __cerb(__in, false);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
__try
{
@@ -1078,7 +1078,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
const __size_type __n = __str.max_size();
typename __ios_base::iostate __err = __ios_base::goodbit;
typename __istream_type::sentry __cerb(__in, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
__try
{
diff --git a/libstdc++-v3/include/bits/istream.tcc b/libstdc++-v3/include/bits/istream.tcc
index 6d1679d152f..d005f736f03 100644
--- a/libstdc++-v3/include/bits/istream.tcc
+++ b/libstdc++-v3/include/bits/istream.tcc
@@ -87,7 +87,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_M_extract(_ValueT& __v)
{
sentry __cerb(*this, false);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -116,7 +116,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 118. basic_istream uses nonexistent num_get member functions.
sentry __cerb(*this, false);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -161,7 +161,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 118. basic_istream uses nonexistent num_get member functions.
sentry __cerb(*this, false);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -205,7 +205,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
ios_base::iostate __err = ios_base::goodbit;
sentry __cerb(*this, false);
- if (__sbout && static_cast<bool>(__cerb))
+ if (__cerb && __sbout)
{
__try
{
@@ -240,7 +240,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_M_gcount = 0;
ios_base::iostate __err = ios_base::goodbit;
sentry __cerb(*this, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
__try
{
@@ -274,7 +274,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_M_gcount = 0;
ios_base::iostate __err = ios_base::goodbit;
sentry __cerb(*this, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
__try
{
@@ -311,7 +311,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_M_gcount = 0;
ios_base::iostate __err = ios_base::goodbit;
sentry __cerb(*this, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
__try
{
@@ -358,7 +358,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_M_gcount = 0;
ios_base::iostate __err = ios_base::goodbit;
sentry __cerb(*this, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
__try
{
@@ -402,7 +402,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_M_gcount = 0;
ios_base::iostate __err = ios_base::goodbit;
sentry __cerb(*this, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
__try
{
@@ -461,7 +461,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
_M_gcount = 0;
sentry __cerb(*this, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -494,7 +494,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
_M_gcount = 0;
sentry __cerb(*this, true);
- if (__n > 0 && static_cast<bool>(__cerb))
+ if (__cerb && __n > 0)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -556,7 +556,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
_M_gcount = 0;
sentry __cerb(*this, true);
- if (__n > 0 && static_cast<bool>(__cerb))
+ if (__cerb && __n > 0)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -622,7 +622,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
int_type __c = traits_type::eof();
_M_gcount = 0;
sentry __cerb(*this, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -651,7 +651,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
_M_gcount = 0;
sentry __cerb(*this, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -680,7 +680,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
_M_gcount = 0;
sentry __cerb(*this, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -714,7 +714,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// 60. What is a formatted input function?
_M_gcount = 0;
sentry __cerb(*this, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -747,7 +747,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// 60. What is a formatted input function?
_M_gcount = 0;
sentry __cerb(*this, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -780,7 +780,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// DR60. Do not change _M_gcount.
int __ret = -1;
sentry __cerb(*this, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -906,7 +906,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typedef typename __istream_type::int_type __int_type;
typename __istream_type::sentry __cerb(__in, false);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -943,7 +943,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
streamsize __extracted = 0;
ios_base::iostate __err = ios_base::goodbit;
typename __istream_type::sentry __cerb(__in, false);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
__try
{
diff --git a/libstdc++-v3/include/bits/ostream.tcc b/libstdc++-v3/include/bits/ostream.tcc
index df68a57fa61..1147212aa14 100644
--- a/libstdc++-v3/include/bits/ostream.tcc
+++ b/libstdc++-v3/include/bits/ostream.tcc
@@ -64,7 +64,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_M_insert(_ValueT __v)
{
sentry __cerb(*this);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -121,7 +121,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
ios_base::iostate __err = ios_base::goodbit;
sentry __cerb(*this);
- if (__sbin && static_cast<bool>(__cerb))
+ if (__cerb && __sbin)
{
__try
{
@@ -155,7 +155,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// Unformatted output functions should catch exceptions thrown
// from streambuf members.
sentry __cerb(*this);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -190,7 +190,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// Unformatted output functions should catch exceptions thrown
// from streambuf members.
sentry __cerb(*this);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
__try
{ _M_write(__s, __n); }
diff --git a/libstdc++-v3/include/bits/ostream_insert.h b/libstdc++-v3/include/bits/ostream_insert.h
index 4fc52c86aff..e0017ee7cfd 100644
--- a/libstdc++-v3/include/bits/ostream_insert.h
+++ b/libstdc++-v3/include/bits/ostream_insert.h
@@ -78,7 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typedef typename __ostream_type::ios_base __ios_base;
typename __ostream_type::sentry __cerb(__out);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
__try
{
diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h
index 2cef9237d76..c638c547887 100644
--- a/libstdc++-v3/include/bits/stl_algobase.h
+++ b/libstdc++-v3/include/bits/stl_algobase.h
@@ -375,9 +375,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
static _Tp*
__copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
- __builtin_memmove(__result, __first,
- sizeof(_Tp) * (__last - __first));
- return __result + (__last - __first);
+ const ptrdiff_t _Num = __last - __first;
+ if (_Num)
+ __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
+ return __result + _Num;
}
};
@@ -572,7 +573,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
const ptrdiff_t _Num = __last - __first;
- __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
+ if (_Num)
+ __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
return __result - _Num;
}
};
diff --git a/libstdc++-v3/src/compatibility.cc b/libstdc++-v3/src/compatibility.cc
index 53d8e84e4f2..c81f08e070f 100644
--- a/libstdc++-v3/src/compatibility.cc
+++ b/libstdc++-v3/src/compatibility.cc
@@ -62,7 +62,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_M_gcount = 0;
sentry __cerb(*this, true);
- if (__n > 0 && static_cast<bool>(__cerb))
+ if ( __n > 0 && __cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -134,7 +134,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_M_gcount = 0;
sentry __cerb(*this, true);
- if (__n > 0 && static_cast<bool>(__cerb))
+ if (__n > 0 && __cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
diff --git a/libstdc++-v3/src/istream.cc b/libstdc++-v3/src/istream.cc
index 0e7cbfb9084..e4102779aa8 100644
--- a/libstdc++-v3/src/istream.cc
+++ b/libstdc++-v3/src/istream.cc
@@ -39,7 +39,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_M_gcount = 0;
ios_base::iostate __err = ios_base::goodbit;
sentry __cerb(*this, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
__try
{
@@ -116,7 +116,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_M_gcount = 0;
sentry __cerb(*this, true);
- if (__n > 0 && static_cast<bool>(__cerb))
+ if (__n > 0 && __cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
@@ -205,7 +205,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
streamsize __extracted = 0;
ios_base::iostate __err = ios_base::goodbit;
__istream_type::sentry __cerb(__in, false);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
__try
{
@@ -288,7 +288,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__size_type __extracted = 0;
ios_base::iostate __err = ios_base::goodbit;
__istream_type::sentry __cerb(__in, false);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
__try
{
@@ -370,7 +370,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
const __size_type __n = __str.max_size();
ios_base::iostate __err = ios_base::goodbit;
__istream_type::sentry __cerb(__in, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
__try
{
@@ -446,7 +446,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_M_gcount = 0;
ios_base::iostate __err = ios_base::goodbit;
sentry __cerb(*this, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
__try
{
@@ -523,12 +523,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_M_gcount = 0;
sentry __cerb(*this, true);
- if (__n > 0 && static_cast<bool>(__cerb))
+ if (__n > 0 && __cerb)
{
ios_base::iostate __err = ios_base::goodbit;
__try
{
- const char_type __cdelim = traits_type::to_char_type(__delim);
+ const char_type __cdelim = traits_type::to_char_type(__delim);
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
int_type __c = __sb->sgetc();
@@ -616,7 +616,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
const __size_type __n = __str.max_size();
ios_base::iostate __err = ios_base::goodbit;
__istream_type::sentry __cerb(__in, true);
- if (static_cast<bool>(__cerb))
+ if (__cerb)
{
__try
{
diff --git a/libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc
index 8f9b1933bfc..ffc0e40f630 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc
@@ -1,5 +1,5 @@
-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-do run { target *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthread" { target *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
// { dg-require-cstdint "" }
diff --git a/libtool.m4 b/libtool.m4
index c17514b9260..12d45a5a8a5 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -5471,7 +5471,7 @@ if test "$_lt_caught_CXX_error" != yes; then
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
else
GXX=no
@@ -5716,7 +5716,7 @@ if test "$_lt_caught_CXX_error" != yes; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
;;
*)
if test "$GXX" = yes; then
@@ -5781,7 +5781,7 @@ if test "$_lt_caught_CXX_error" != yes; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
;;
*)
if test "$GXX" = yes; then
@@ -6125,7 +6125,7 @@ if test "$_lt_caught_CXX_error" != yes; then
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
else
# FIXME: insert proper C++ library support
@@ -6209,7 +6209,7 @@ if test "$_lt_caught_CXX_error" != yes; then
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
else
# g++ 2.7 appears to require `-G' NOT `-shared' on this
# platform.
@@ -6220,7 +6220,7 @@ if test "$_lt_caught_CXX_error" != yes; then
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"'
fi
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'