Roll out GCC 4.8.2 mobile release.

This release is based on crosstool v17.3, which was released about 2
weeks ago, the base version for crosstool v17.3 is -
  git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/google/gcc-4_8@207971 138bc75d-0d04-0410-961f-82ee72b054a4

Besides those local patchs that are already on GCC 4.8.1 release, we
have some additional local patches included.

    Local patches include -
    0. Rollback Hou Cong's CL (enable -ftree-loop-vectorize under -O2) - 7b463f77)
       Reverted CL - git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/google/gcc-4_8@206589 138bc75d-0d04-0410-961f-82ee72b054a4

    1. Cherry-pick patch for pr/55260.
       Bug url here - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55260

       The picked patch -
         From 123840d5c0acd8b3dee58195da40538ce48b58fa Mon Sep 17 00:00:00 2001
         From: jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>
         Date: Fri, 21 Feb 2014 13:05:40 +0000
         Subject: [PATCH] 2014-02-21  Martin Jambor  <mjambor@suse.cz>

            PR ipa/55260
            * ipa-cp.c (cgraph_edge_brings_all_agg_vals_for_node): Uce correct
            info when checking whether lattices are bottom.

         testsuite/
           * gcc.dg/ipa/pr55260.c: New test.

         git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch@207990 138bc75d

       Change-Id: I4848dba9059df21eb3030bba750d9bbb5fd8bf07

    2. Temporarily disable out-of-array-bounday warnings - currently there
       is at least 1 outstanding bug entry regarding bogus
       out-of-array-bounday warnings for gcc 4.8. So disable it
       temporarily. Bug entry here -
       http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124

    3. [no logner a local patch, fixed by Teresa Johnson on google-gcc-4_8]
       Fixed the ICE while compiling llvm - bug here -
       https://b.corp.google.com/issue?id=12971524

    4. Fix the x86-alex compiler building problem caused by Wei Mi's CL - bug here -
       https://b.corp.google.com/issue?id=12971672

Performance tests show no noticeable improvement/regression.

[The local dir for this is - ~/hdd2/gcc-rollout-workspace/rollout_gcc/src/third_party/gcc]

TEST=cbuildbot with '--hwtest' for x86-alex parrot daisy chromiumos-sdk
BUG=None

Change-Id: I5434e196b8c39cf230609be432cbcff06f8ddc47
Reviewed-on: https://chromium-review.googlesource.com/186691
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Han Shen <shenhan@google.com>
Commit-Queue: Han Shen <shenhan@google.com>
diff --git a/ChangeLog b/ChangeLog
index 0bc4cbb..5358ac2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-09-03  Richard Biener  <rguenther@suse.de>
 
 	* configure.ac: Also allow ISL 0.12.
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog
index fd7dfeb..efb3eb8 100644
--- a/boehm-gc/ChangeLog
+++ b/boehm-gc/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-09-04  Matthias Klose  <doko@ubuntu.com>
 
 	* Makefile.am (libgcjgc_la_LIBADD): Add EXTRA_TEST_LIBS.
diff --git a/config/ChangeLog b/config/ChangeLog
index c6af37a..33b7cf7 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index 61a8390..9df98cb 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,15 @@
+2014-01-31  Brooks Moses  <bmoses@google.com>
+
+	* gcc_update (files_and_dependencies): Add aarch64-tune.md.
+
+2013-10-21  Mike Stump  <mikestump@comcast.net>
+
+	* gcc_update (configure): Update to handle svn 1.8.1.
+
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/contrib/gcc_update b/contrib/gcc_update
index 10a5970..1b88c21 100755
--- a/contrib/gcc_update
+++ b/contrib/gcc_update
@@ -79,6 +79,7 @@
 gcc/cstamp-h.in: gcc/configure.ac
 gcc/config.in: gcc/cstamp-h.in
 gcc/fixinc/fixincl.x: gcc/fixinc/fixincl.tpl gcc/fixinc/inclhack.def
+gcc/config/aarch64/aarch64-tune.md: gcc/config/aarch64/aarch64-cores.def gcc/config/aarch64/gentune.sh
 gcc/config/arm/arm-tune.md: gcc/config/arm/arm-cores.def gcc/config/arm/gentune.sh
 gcc/config/arm/arm-tables.opt: gcc/config/arm/arm-arches.def gcc/config/arm/arm-cores.def gcc/config/arm/arm-fpus.def gcc/config/arm/genopt.sh
 gcc/config/avr/avr-tables.opt: gcc/config/avr/avr-mcus.def gcc/config/avr/genopt.sh
@@ -382,7 +383,7 @@
 	fi
 
 	revision=`$GCC_SVN info | awk '/Revision:/ { print $2 }'`
-	branch=`$GCC_SVN info | sed -ne "/URL:/ {
+	branch=`$GCC_SVN info | sed -ne "/^URL:/ {
 	    s,.*/trunk,trunk,
 	    s,.*/branches/,,
 	    s,.*/tags/,,
diff --git a/contrib/profile_tool b/contrib/profile_tool
index 0f1b423..8cf96c3 100644
--- a/contrib/profile_tool
+++ b/contrib/profile_tool
@@ -674,6 +674,7 @@
     self.module_id = reader.ReadWord()
     self.is_primary = reader.ReadWord()
     self.flags = reader.ReadWord()
+    self.ggc_memory = reader.ReadWord()
     self.language = reader.ReadWord()
     self.num_quote_paths = reader.ReadWord()
     self.num_bracket_paths = reader.ReadWord()
@@ -710,6 +711,7 @@
     writer.WriteWord(self.is_primary)
     writer.WriteWord(self.flags)
     writer.WriteWord(self.language)
+    writer.WriteWord(self.ggc_memory)
     writer.WriteWord(self.num_quote_paths)
     writer.WriteWord(self.num_bracket_paths)
     writer.WriteWord(self.num_system_paths)
diff --git a/contrib/reghunt/ChangeLog b/contrib/reghunt/ChangeLog
index b142931..e77d115 100644
--- a/contrib/reghunt/ChangeLog
+++ b/contrib/reghunt/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/contrib/regression/ChangeLog b/contrib/regression/ChangeLog
index 4c24e12..e3259f6 100644
--- a/contrib/regression/ChangeLog
+++ b/contrib/regression/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/contrib/testsuite-management/aarch64-grtev3-linux-gnu.xfail b/contrib/testsuite-management/aarch64-grtev3-linux-gnu.xfail
new file mode 100644
index 0000000..10eb3eb
--- /dev/null
+++ b/contrib/testsuite-management/aarch64-grtev3-linux-gnu.xfail
@@ -0,0 +1,209 @@
+# Marked test failures for v17-powerpc64le toolchain.
+
+# *** gcc:
+
+# Also xfailed in x86; REAL bug in google/main
+FAIL: gcc.dg/wself-assign-1.c (test for warnings, line 15)
+FAIL: gcc.dg/wself-assign-1.c (test for warnings, line 19)
+FAIL: gcc.dg/wself-assign-1.c (test for warnings, line 20)
+FAIL: gcc.dg/wself-assign-1.c (test for warnings, line 21)
+FAIL: gcc.dg/wself-assign-1.c (test for warnings, line 22)
+
+# Also xfailed in x86; Inline failures not seen outside of google/main.
+FAIL: gcc.dg/inline_3.c (test for excess errors)
+FAIL: gcc.dg/inline_4.c (test for excess errors)
+
+# Also xfailed in x86; REAL bug in google/main
+FAIL: gcc.dg/ipa/ipcp-agg-7.c scan-ipa-dump-times cp "Clone of foo" 1
+FAIL: gcc.dg/ipa/ipcp-agg-7.c scan-tree-dump-not optimized "->c;"
+
+# AArch64-specific, fixed in trunk: http://gcc.gnu.org/ml/gcc-patches/2013-11/msg02110.html.
+FAIL: gcc.c-torture/execute/20101011-1.c execution,  -O0
+FAIL: gcc.c-torture/execute/20101011-1.c execution,  -O1
+FAIL: gcc.c-torture/execute/20101011-1.c execution,  -O2
+FAIL: gcc.c-torture/execute/20101011-1.c execution,  -O3 -fomit-frame-pointer
+FAIL: gcc.c-torture/execute/20101011-1.c execution,  -O3 -g
+FAIL: gcc.c-torture/execute/20101011-1.c execution,  -Os
+FAIL: gcc.c-torture/execute/20101011-1.c execution,  -Og -g
+FAIL: gcc.c-torture/execute/20101011-1.c execution,  -O2 -flto -fno-use-linker-plugin -flto-partition=none
+FAIL: gcc.c-torture/execute/20101011-1.c execution,  -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects
+
+# AArch64-specific, discussed upstream: http://gcc.gnu.org/ml/gcc-patches/2012-11/msg02345.html
+FAIL: gcc.dg/torture/asm-subreg-1.c -O1  (internal compiler error)
+FAIL: gcc.dg/torture/asm-subreg-1.c -O1  (test for excess errors)
+
+# AArch64-specific: "sorry, unimplemented: function profiling"
+FAIL: gcc.dg/20021014-1.c (test for excess errors)
+UNRESOLVED: gcc.dg/20021014-1.c compilation failed to produce executable
+FAIL: gcc.dg/nest.c (test for excess errors)
+UNRESOLVED: gcc.dg/nest.c compilation failed to produce executable
+FAIL: gcc.dg/nested-func-4.c (test for excess errors)
+UNRESOLVED: gcc.dg/nested-func-4.c compilation failed to produce executable
+FAIL: gcc.dg/pr32450.c (test for excess errors)
+UNRESOLVED: gcc.dg/pr32450.c compilation failed to produce executable
+FAIL: gcc.dg/pr43643.c (test for excess errors)
+UNRESOLVED: gcc.dg/pr43643.c compilation failed to produce executable
+
+# AArch64-specific: "error: 'LONG_LONG_MAX' undeclared"
+FAIL: gcc.target/aarch64/vect-abs.c (test for excess errors)
+UNRESOLVED: gcc.target/aarch64/vect-abs.c compilation failed to produce executable
+
+# AArch64-specific test optimization and execution failures (not yet analyzed)
+FAIL: gcc.c-torture/execute/ieee/pr50310.c execution,  -O2
+FAIL: gcc.c-torture/execute/ieee/pr50310.c execution,  -O2 -flto -fno-use-linker-plugin -flto-partition=none
+FAIL: gcc.c-torture/execute/ieee/pr50310.c execution,  -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects
+FAIL: gcc.dg/cleanup-10.c execution test
+FAIL: gcc.dg/cleanup-11.c execution test
+FAIL: gcc.dg/debug/dwarf2/asm-line1.c scan-assembler is_stmt 1
+FAIL: gcc.dg/pr44194-1.c scan-rtl-dump-not final "insn [^\n]*set \\(mem"
+FAIL: gcc.dg/pr57518.c scan-rtl-dump-not ira "REG_EQUIV.*mem.*"ip""
+FAIL: gcc.dg/sms-3.c execution test
+XPASS: gcc.dg/tree-ssa/20040204-1.c scan-tree-dump-times optimized "link_error" 0
+FAIL: gcc.dg/tree-ssa/gen-vect-11b.c scan-tree-dump-times vect "vectorized 0 loops" 1
+FAIL: gcc.dg/tree-ssa/gen-vect-11c.c scan-tree-dump-times vect "vectorized 0 loops" 1
+FAIL: gcc.dg/unroll_1.c scan-rtl-dump-times loop2_unroll "Turned loop into non-loop; it never loops" 2
+FAIL: gcc.dg/unroll_2.c scan-rtl-dump-times loop2_unroll "Turned loop into non-loop; it never loops" 1
+FAIL: gcc.dg/unroll_3.c scan-rtl-dump-times loop2_unroll "Turned loop into non-loop; it never loops" 1
+FAIL: gcc.dg/unroll_4.c scan-rtl-dump-times loop2_unroll "Turned loop into non-loop; it never loops" 1
+FAIL: gcc.dg/unroll_5.c scan-rtl-dump-times loop2_unroll "upper bound: 999999" 1
+FAIL: gcc.dg/unroll_5.c scan-rtl-dump-times loop2_unroll "upper bound: 2999999" 1
+FAIL: gcc.dg/unroll_5.c scan-rtl-dump-times loop2_unroll "realistic bound: 2999999" 1
+FAIL: gcc.dg/var-expand2.c execution test
+FAIL: gcc.dg/vect/fast-math-vect-pr29925.c execution test
+FAIL: gcc.dg/vect/fast-math-vect-reduc-5.c execution test
+FAIL: gcc.dg/vect/fast-math-vect-reduc-7.c execution test
+FAIL: gcc.dg/vect/fast-math-vect-reduc-9.c execution test
+FAIL: gcc.dg/vect/no-trapping-math-2.c execution test
+FAIL: gcc.dg/vect/no-trapping-math-vect-111.c execution test
+FAIL: gcc.dg/vect/no-trapping-math-vect-ifcvt-11.c execution test
+FAIL: gcc.dg/vect/no-trapping-math-vect-ifcvt-12.c execution test
+FAIL: gcc.dg/vect/no-trapping-math-vect-ifcvt-13.c execution test
+FAIL: gcc.dg/vect/no-trapping-math-vect-ifcvt-14.c execution test
+FAIL: gcc.dg/vect/no-trapping-math-vect-ifcvt-15.c execution test
+FAIL: gcc.dg/vect/vect-112-big-array.c execution test
+FAIL: gcc.dg/vect/vect-112-big-array.c -flto execution test
+FAIL: gcc.dg/vect/vect-112.c execution test
+FAIL: gcc.dg/vect/vect-112.c -flto execution test
+FAIL: gcc.dg/vect/vect-cond-7.c execution test
+FAIL: gcc.dg/vect/vect-cond-7.c -flto execution test
+FAIL: gcc.dg/vect/vect-float-extend-1.c scan-tree-dump-times vect "vectorized 1 loops" 1
+FAIL: gcc.dg/vect/vect-float-extend-1.c -flto  scan-tree-dump-times vect "vectorized 1 loops" 1
+FAIL: gcc.dg/vect/vect-float-truncate-1.c scan-tree-dump-times vect "vectorized 1 loops" 1
+FAIL: gcc.dg/vect/vect-float-truncate-1.c -flto  scan-tree-dump-times vect "vectorized 1 loops" 1
+FAIL: gcc.dg/vect/vect-ifcvt-16.c execution test
+FAIL: gcc.dg/vect/vect-ifcvt-16.c -flto execution test
+FAIL: gcc.dg/vect/vect-ifcvt-17.c execution test
+FAIL: gcc.dg/vect/vect-ifcvt-17.c -flto execution test
+
+# AArch64-specific test execution failures (new 2014-01-28, not yet analyzed)
+FAIL: gcc.dg/vect/no-scevccp-outer-7.c execution test
+FAIL: gcc.dg/vect/slp-reduc-3.c -flto execution test
+FAIL: gcc.dg/vect/vect-outer-4i.c execution test
+FAIL: gcc.dg/vect/vect-outer-4i.c -flto execution test
+FAIL: gcc.dg/vect/vect-outer-4m.c execution test
+FAIL: gcc.dg/vect/vect-outer-4m.c -flto execution test
+
+# AArch64 target failures (not yet analyzed)
+FAIL: gcc.target/aarch64/extend.c scan-assembler sub\tw[0-9]+,.*sxth #?1
+FAIL: gcc.target/aarch64/extend.c scan-assembler add\tw[0-9]+,.*sxth #?1
+FAIL: gcc.target/aarch64/fcvt_double_long.c scan-assembler-times fcvtas\tx[0-9]+, *d[0-9] 2
+FAIL: gcc.target/aarch64/fcvt_float_long.c scan-assembler-times fcvtas\tx[0-9]+, *s[0-9] 2
+FAIL: gcc.target/aarch64/vect-abs-compile.c scan-assembler abs\\tv[0-9]+.16b
+FAIL: gcc.target/aarch64/vect-abs-compile.c scan-assembler abs\\tv[0-9]+.8h
+FAIL: gcc.target/aarch64/vect-faddv.c execution test
+FAIL: gcc.target/aarch64/vect-fcm-eq-d.c execution test
+FAIL: gcc.target/aarch64/vect-fcm-eq-f.c execution test
+FAIL: gcc.target/aarch64/vect-fcm-ge-d.c execution test
+FAIL: gcc.target/aarch64/vect-fcm-ge-f.c execution test
+FAIL: gcc.target/aarch64/vect-fcm-gt-d.c execution test
+FAIL: gcc.target/aarch64/vect-fcm-gt-f.c execution test
+FAIL: gcc.target/aarch64/vect-fmax-fmin.c execution test
+FAIL: gcc.target/aarch64/vect-fmovd-zero.c scan-assembler movi\\tv[0-9]+\\.2d, 0
+FAIL: gcc.target/aarch64/vect-fmovd-zero.c scan-tree-dump-times vect "vectorized 1 loops" 1
+FAIL: gcc.target/aarch64/vect-fmovd.c scan-tree-dump-times vect "vectorized 1 loops" 1
+FAIL: gcc.target/aarch64/vect-fmovd.c scan-assembler fmov\\tv[0-9]+\\.2d, 4\\.25
+FAIL: gcc.target/aarch64/vect.c execution test
+FAIL: gcc.target/aarch64/vmlsq_laneq.c execution test
+FAIL: gcc.target/aarch64/volatile-bitfields-1.c scan-assembler ldrb[\\t ]+[^\n]*,[\\t ]*\\[[^\n]*\\]
+FAIL: gcc.target/aarch64/vsqrt.c execution test
+
+
+# *** g++:
+
+# Also xfailed in x86; explanation unknown.
+FAIL: g++.dg/ipa/devirt-11.C -std=gnu++98  scan-ipa-dump-times inline "and turned into root of the clone tree" 1
+FAIL: g++.dg/ipa/devirt-11.C -std=gnu++11  scan-ipa-dump-times inline "and turned into root of the clone tree" 1
+
+# Also xfailed in x86; REAL bug in google/main
+FAIL: g++.dg/warn/Wself-assign-2.C -std=gnu++11  (test for warnings, line 12)
+
+# Execution failures common to Power targets running under QEMU.
+FAIL: g++.dg/abi/forced.C -std=gnu++98 execution test
+FAIL: g++.dg/abi/forced.C -std=gnu++11 execution test
+FAIL: g++.dg/ext/cleanup-10.C -std=gnu++98 execution test
+FAIL: g++.dg/ext/cleanup-10.C -std=gnu++11 execution test
+FAIL: g++.dg/ext/cleanup-11.C -std=gnu++98 execution test
+FAIL: g++.dg/ext/cleanup-11.C -std=gnu++11 execution test
+FAIL: g++.dg/tls/thread_local5.C -std=gnu++11 execution test
+FAIL: g++.dg/tls/thread_local5g.C -std=gnu++11 execution test
+FAIL: g++.dg/tls/thread_local6.C execution test
+FAIL: g++.dg/tls/thread_local6g.C execution test
+
+# AArch64-specific: "error: target system does not support the "stabs" debug format"
+FAIL: g++.dg/cpp0x/alias-decl-debug-0.C (test for excess errors)
+
+# AArch64-specific: "sorry, unimplemented: function profiling"
+FAIL: g++.old-deja/g++.law/profile1.C -std=gnu++98 (test for excess errors)
+UNRESOLVED: g++.old-deja/g++.law/profile1.C -std=gnu++98 compilation failed to produce executable
+FAIL: g++.old-deja/g++.law/profile1.C -std=gnu++11 (test for excess errors)
+UNRESOLVED: g++.old-deja/g++.law/profile1.C -std=gnu++11 compilation failed to produce executable
+
+
+# Fortran failures are not important to us so far.
+# *** gfortran:
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -O2  execution test
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer  execution test
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer -funroll-loops  execution test
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -g  execution test
+FAIL: gfortran.dg/anint_1.f90 -O2  execution test
+FAIL: gfortran.dg/anint_1.f90 -O3 -fomit-frame-pointer  execution test
+FAIL: gfortran.dg/anint_1.f90 -O3 -fomit-frame-pointer -funroll-loops  execution test
+FAIL: gfortran.dg/anint_1.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test
+FAIL: gfortran.dg/anint_1.f90 -O3 -g  execution test
+FAIL: gfortran.dg/array_2.f90 -O2  execution test
+FAIL: gfortran.dg/array_2.f90 -O3 -fomit-frame-pointer  execution test
+FAIL: gfortran.dg/array_2.f90 -O3 -fomit-frame-pointer -funroll-loops  execution test
+FAIL: gfortran.dg/array_2.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test
+FAIL: gfortran.dg/array_2.f90 -O3 -g  execution test
+FAIL: gfortran.dg/array_constructor_10.f90 -O2  execution test
+FAIL: gfortran.dg/array_constructor_10.f90 -O3 -fomit-frame-pointer  execution test
+FAIL: gfortran.dg/array_constructor_10.f90 -O3 -fomit-frame-pointer -funroll-loops  execution test
+FAIL: gfortran.dg/array_constructor_10.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test
+FAIL: gfortran.dg/array_constructor_10.f90 -O3 -g  execution test
+FAIL: gfortran.dg/inline_sum_2.f90 -O3 -fomit-frame-pointer  execution test
+FAIL: gfortran.dg/inline_sum_2.f90 -O3 -fomit-frame-pointer -funroll-loops  execution test
+FAIL: gfortran.dg/inline_sum_2.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test
+FAIL: gfortran.dg/inline_sum_2.f90 -O3 -g  execution test
+FAIL: gfortran.dg/minlocval_3.f90 -O3 -fomit-frame-pointer  execution test
+FAIL: gfortran.dg/minlocval_3.f90 -O3 -fomit-frame-pointer -funroll-loops  execution test
+FAIL: gfortran.dg/minlocval_3.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test
+FAIL: gfortran.dg/minlocval_3.f90 -O3 -g  execution test
+FAIL: gfortran.dg/nint_2.f90 -O0  execution test
+FAIL: gfortran.dg/pr45636.f90 -O   scan-tree-dump-times forwprop2 "memset" 0
+FAIL: gfortran.dg/vect/fast-math-rnflow-trs2a2.f90 scan-tree-dump-times vect "vectorized 1 loops" 1
+FAIL: gfortran.dg/vect/vect-8.f90 -O   scan-tree-dump-times vect "vectorized 19 loops" 1
+FAIL: gfortran.fortran-torture/execute/intrinsic_aint_anint.f90 execution,  -O0
+FAIL: gfortran.fortran-torture/execute/intrinsic_aint_anint.f90 execution,  -O1
+FAIL: gfortran.fortran-torture/execute/intrinsic_aint_anint.f90 execution,  -O2
+FAIL: gfortran.fortran-torture/execute/intrinsic_aint_anint.f90 execution,  -O2 -fomit-frame-pointer -finline-functions
+FAIL: gfortran.fortran-torture/execute/intrinsic_aint_anint.f90 execution,  -O2 -fomit-frame-pointer -finline-functions -funroll-loops
+FAIL: gfortran.fortran-torture/execute/intrinsic_aint_anint.f90 execution,  -O2 -fbounds-check
+FAIL: gfortran.fortran-torture/execute/intrinsic_aint_anint.f90 execution,  -O3 -g
+FAIL: gfortran.fortran-torture/execute/intrinsic_aint_anint.f90 execution,  -Os
+FAIL: gfortran.fortran-torture/execute/intrinsic_dotprod.f90 execution,  -O2
+FAIL: gfortran.fortran-torture/execute/intrinsic_dotprod.f90 execution,  -O2 -fomit-frame-pointer -finline-functions
+FAIL: gfortran.fortran-torture/execute/intrinsic_dotprod.f90 execution,  -O2 -fomit-frame-pointer -finline-functions -funroll-loops
+FAIL: gfortran.fortran-torture/execute/intrinsic_dotprod.f90 execution,  -O2 -fbounds-check
+FAIL: gfortran.fortran-torture/execute/intrinsic_dotprod.f90 execution,  -O3 -g
+
diff --git a/contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail b/contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail
index f78c904..f97030f 100644
--- a/contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail
+++ b/contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail
@@ -1,126 +1,87 @@
-# Ignore r194995 for gcc pr55852.
-FAIL: gfortran.dg/intrinsic_size_3.f90 -O   scan-tree-dump-times original "iszs = \\(integer\\(kind=2\\)\\) MAX_EXPR <\\(D.....->dim.0..ubound - D.....->dim.0..lbound\\) \\+ 1, 0>;" 1
-# Ignore gcc pr54127.
-FAIL: gcc.dg/torture/pr53589.c -O3 -g  (test for excess errors)
-FAIL: gcc.dg/torture/pr53589.c  -O3 -g  (internal compiler error)
-# Ignore Google ref b/6983319.
-FAIL: gcc.target/powerpc/regnames-1.c (test for excess errors)
-FAIL: gcc.target/powerpc/regnames-1.c (internal compiler error)
+# Marked test failures for v17-powerpc32 toolchain.
 
-FAIL: gfortran.dg/bessel_6.f90  -O0  execution test
-FAIL: gfortran.dg/bessel_6.f90  -O1  execution test
-FAIL: gfortran.dg/bessel_6.f90  -O2  execution test
-FAIL: gfortran.dg/bessel_6.f90  -O3 -fomit-frame-pointer  execution test
-FAIL: gfortran.dg/bessel_6.f90  -O3 -fomit-frame-pointer -funroll-loops  execution test
-FAIL: gfortran.dg/bessel_6.f90  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test
-FAIL: gfortran.dg/bessel_6.f90  -O3 -g  execution test
-FAIL: gfortran.dg/bessel_6.f90  -Os  execution test
-XPASS: gfortran.dg/nint_2.f90  -O0  execution test
-FAIL: gfortran.dg/unf_io_convert_3.f90  -O0  execution test
-FAIL: gfortran.dg/unf_io_convert_3.f90  -O1  execution test
-FAIL: gfortran.dg/unf_io_convert_3.f90  -O2  execution test
-FAIL: gfortran.dg/unf_io_convert_3.f90  -O3 -fomit-frame-pointer  execution test
-FAIL: gfortran.dg/unf_io_convert_3.f90  -O3 -fomit-frame-pointer -funroll-loops  execution test
-FAIL: gfortran.dg/unf_io_convert_3.f90  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test
-FAIL: gfortran.dg/unf_io_convert_3.f90  -O3 -g  execution test
-FAIL: gfortran.dg/unf_io_convert_3.f90  -Os  execution test
-FAIL: gfortran.dg/x_slash_2.f  -O0  execution test
-FAIL: g++.dg/abi/forced.C -std=gnu++98 execution test
-FAIL: g++.dg/abi/forced.C -std=gnu++11 execution test
-FAIL: g++.dg/ext/cleanup-10.C -std=gnu++98 execution test
-FAIL: g++.dg/ext/cleanup-10.C -std=gnu++11 execution test
-FAIL: g++.dg/ext/cleanup-11.C -std=gnu++98 execution test
-FAIL: g++.dg/ext/cleanup-11.C -std=gnu++11 execution test
-FAIL: g++.dg/ext/cleanup-8.C -std=gnu++98 execution test
-FAIL: g++.dg/ext/cleanup-8.C -std=gnu++11 execution test
-FAIL: g++.dg/ext/cleanup-9.C -std=gnu++98 execution test
-FAIL: g++.dg/ext/cleanup-9.C -std=gnu++11 execution test
-FAIL: g++.dg/warn/Wself-assign-2.C -std=gnu++11  (test for warnings, line 12)
-FAIL: g++.dg/tree-prof/lipo/vcall1_0.C scan-ipa-dump-times profile "Indirect call -> direct call" 2
-FAIL: g++.dg/tree-prof/lipo/vcall1_0.C scan-ipa-dump-times profile "Indirect call -> direct call" 2
-FAIL: g++.dg/tree-prof/lipo/vcall1_0.C scan-ipa-dump-times profile "Indirect call -> direct call" 2
-FAIL: g++.dg/tree-prof/lipo/vcall1_0.C scan-ipa-dump-times profile "Indirect call -> direct call" 2
-FAIL: g++.dg/tree-prof/lipo/vcall1_0.C scan-ipa-dump-times profile "Indirect call -> direct call" 2
-FAIL: g++.dg/tree-prof/lipo/vcall1_0.C scan-ipa-dump-times profile "Indirect call -> direct call" 2
-FAIL: g++.dg/tree-prof/lipo/vcall1_0.C scan-ipa-dump-times profile "Indirect call -> direct call" 2
-UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file Callgraph group : main _Z3barv _Z3foov\n
-UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file .text.*.main\n.text.*._Z3barv\n.text.*._Z3foov\n.text.*._Z9notcalledv
-UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file Callgraph group : main _Z3barv _Z3foov\n
-UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file .text.*.main\n.text.*._Z3barv\n.text.*._Z3foov\n.text.*._Z9notcalledv
-UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file Callgraph group : main _Z3barv _Z3foov\n
-UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file .text.*.main\n.text.*._Z3barv\n.text.*._Z3foov\n.text.*._Z9notcalledv
-UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file Callgraph group : main _Z3barv _Z3foov\n
-UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file .text.*.main\n.text.*._Z3barv\n.text.*._Z3foov\n.text.*._Z9notcalledv
-UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file Callgraph group : main _Z3barv _Z3foov\n
-UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file .text.*.main\n.text.*._Z3barv\n.text.*._Z3foov\n.text.*._Z9notcalledv
-UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file Callgraph group : main _Z3barv _Z3foov\n
-UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file .text.*.main\n.text.*._Z3barv\n.text.*._Z3foov\n.text.*._Z9notcalledv
-UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file Callgraph group : main _Z3barv _Z3foov\n
-UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file .text.*.main\n.text.*._Z3barv\n.text.*._Z3foov\n.text.*._Z9notcalledv
-UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file Moving 1 section\\(s\\) to new segment
-FAIL: g++.dg/tree-prof/mversn15.C execution,    -g  -fprofile-generate
-UNRESOLVED: g++.dg/tree-prof/mversn15.C compilation,  -g  -fprofile-use
-UNRESOLVED: g++.dg/tree-prof/mversn15.C execution,    -g  -fprofile-use
-FAIL: g++.dg/tree-prof/mversn15.C execution,    -O0  -fprofile-generate
-UNRESOLVED: g++.dg/tree-prof/mversn15.C compilation,  -O0  -fprofile-use
-UNRESOLVED: g++.dg/tree-prof/mversn15.C execution,    -O0  -fprofile-use
-FAIL: g++.dg/tree-prof/mversn15.C execution,    -O1  -fprofile-generate
-UNRESOLVED: g++.dg/tree-prof/mversn15.C compilation,  -O1  -fprofile-use
-UNRESOLVED: g++.dg/tree-prof/mversn15.C execution,    -O1  -fprofile-use
-FAIL: g++.dg/tree-prof/mversn15.C execution,    -O2  -fprofile-generate
-UNRESOLVED: g++.dg/tree-prof/mversn15.C compilation,  -O2  -fprofile-use
-UNRESOLVED: g++.dg/tree-prof/mversn15.C execution,    -O2  -fprofile-use
-FAIL: g++.dg/tree-prof/mversn15.C execution,    -O3  -fprofile-generate
-UNRESOLVED: g++.dg/tree-prof/mversn15.C compilation,  -O3  -fprofile-use
-UNRESOLVED: g++.dg/tree-prof/mversn15.C execution,    -O3  -fprofile-use
-FAIL: g++.dg/tree-prof/mversn15.C execution,    -O3 -g  -fprofile-generate
-UNRESOLVED: g++.dg/tree-prof/mversn15.C compilation,  -O3 -g  -fprofile-use
-UNRESOLVED: g++.dg/tree-prof/mversn15.C execution,    -O3 -g  -fprofile-use
-FAIL: g++.dg/tree-prof/mversn15.C execution,    -Os  -fprofile-generate
-UNRESOLVED: g++.dg/tree-prof/mversn15.C compilation,  -Os  -fprofile-use
-UNRESOLVED: g++.dg/tree-prof/mversn15.C execution,    -Os  -fprofile-use
-FAIL: g++.dg/tree-prof/mversn15a.C execution,    -g  -fprofile-generate
-UNRESOLVED: g++.dg/tree-prof/mversn15a.C compilation,  -g  -fprofile-use
-UNRESOLVED: g++.dg/tree-prof/mversn15a.C execution,    -g  -fprofile-use
-FAIL: g++.dg/tree-prof/mversn15a.C execution,    -O0  -fprofile-generate
-UNRESOLVED: g++.dg/tree-prof/mversn15a.C compilation,  -O0  -fprofile-use
-UNRESOLVED: g++.dg/tree-prof/mversn15a.C execution,    -O0  -fprofile-use
-FAIL: g++.dg/tree-prof/mversn15a.C execution,    -O1  -fprofile-generate
-UNRESOLVED: g++.dg/tree-prof/mversn15a.C compilation,  -O1  -fprofile-use
-UNRESOLVED: g++.dg/tree-prof/mversn15a.C execution,    -O1  -fprofile-use
-FAIL: g++.dg/tree-prof/mversn15a.C execution,    -O2  -fprofile-generate
-UNRESOLVED: g++.dg/tree-prof/mversn15a.C compilation,  -O2  -fprofile-use
-UNRESOLVED: g++.dg/tree-prof/mversn15a.C execution,    -O2  -fprofile-use
-FAIL: g++.dg/tree-prof/mversn15a.C execution,    -O3  -fprofile-generate
-UNRESOLVED: g++.dg/tree-prof/mversn15a.C compilation,  -O3  -fprofile-use
-UNRESOLVED: g++.dg/tree-prof/mversn15a.C execution,    -O3  -fprofile-use
-FAIL: g++.dg/tree-prof/mversn15a.C execution,    -O3 -g  -fprofile-generate
-UNRESOLVED: g++.dg/tree-prof/mversn15a.C compilation,  -O3 -g  -fprofile-use
-UNRESOLVED: g++.dg/tree-prof/mversn15a.C execution,    -O3 -g  -fprofile-use
-FAIL: g++.dg/tree-prof/mversn15a.C execution,    -Os  -fprofile-generate
-UNRESOLVED: g++.dg/tree-prof/mversn15a.C compilation,  -Os  -fprofile-use
-UNRESOLVED: g++.dg/tree-prof/mversn15a.C execution,    -Os  -fprofile-use
+# *** gcc:
+
+# Also xfailed in x86; REAL bug in google/main
+FAIL: gcc.dg/wself-assign-1.c  (test for warnings, line 15)
+FAIL: gcc.dg/wself-assign-1.c  (test for warnings, line 19)
+FAIL: gcc.dg/wself-assign-1.c  (test for warnings, line 20)
+FAIL: gcc.dg/wself-assign-1.c  (test for warnings, line 21)
+FAIL: gcc.dg/wself-assign-1.c  (test for warnings, line 22)
+
+# Also xfailed in x86; Inline failures not seen outside of google/main.
+FAIL: gcc.dg/inline_3.c (test for excess errors)
+FAIL: gcc.dg/inline_4.c (test for excess errors)
+
+# Also xfailed in x86; REAL bug in google/main
+FAIL: gcc.dg/ipa/ipcp-agg-7.c scan-ipa-dump-times cp "Clone of foo" 1
+FAIL: gcc.dg/ipa/ipcp-agg-7.c scan-tree-dump-not optimized "->c;"
+
+# Power (32- and 64-bit) specific.  From PR33512, still failing in truck despite resolved PR.
 FAIL: gcc.dg/and-1.c scan-assembler-not nand
-FAIL: gcc.dg/cleanup-10.c execution test
-FAIL: gcc.dg/cleanup-11.c execution test
-FAIL: gcc.dg/cleanup-8.c execution test
-FAIL: gcc.dg/cleanup-9.c execution test
-FAIL: gcc.dg/pr46728-6.c scan-assembler-not pow
-FAIL: gcc.dg/pr53060.c (test for excess errors)
-FAIL: gcc.dg/thread_annot_lock-23.c  (test for warnings, line 10)
-FAIL: gcc.dg/thread_annot_lock-23.c  (test for warnings, line 13)
-FAIL: gcc.dg/thread_annot_lock-23.c  (test for warnings, line 15)
-FAIL: gcc.dg/thread_annot_lock-23.c  (test for warnings, line 18)
-FAIL: gcc.dg/thread_annot_lock-23.c  (test for warnings, line 19)
-FAIL: gcc.dg/thread_annot_lock-24.c  (test for warnings, line 8)
-FAIL: gcc.dg/thread_annot_lock-24.c  (test for warnings, line 9)
-FAIL: gcc.dg/thread_annot_lock-24.c  (test for warnings, line 10)
-FAIL: gcc.dg/thread_annot_lock-25.c  (test for warnings, line 8)
-FAIL: gcc.dg/thread_annot_lock-25.c  (test for warnings, line 9)
-FAIL: gcc.dg/thread_annot_lock-25.c  (test for warnings, line 10)
-FAIL: gcc.dg/thread_annot_lock-25.c  (test for warnings, line 22)
-FAIL: gcc.dg/thread_annot_lock-25.c  (test for warnings, line 30)
-FAIL: gcc.dg/thread_annot_lock-42.c  (test for warnings, line 9)
+
+# Power (32- and 64-bit) specific.  Test error; Power should be handled like MIPS for same reason.
+FAIL: gcc.dg/tree-ssa/ssa-dom-thread-4.c scan-tree-dump-times dom1 "Threaded" 3
+
+# Power (32- and 64-bit) specific.  Also failing in trunk.  Related to PR38219 and
+# LOGICAL_OP_NON_SHORT_CIRCUIT definition.
+FAIL: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times vrp1 "[xy][^ ]* !=" 0
+FAIL: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times dom2 "x[^ ]* & y" 1
+
+# Power (32- and 64-bit) specific.  Also failing in trunk.  (PR57955; PPC64 is using ld, not lvx.)
+FAIL: gcc.target/powerpc/ppc-vector-memcpy.c scan-assembler lvx
+
+# Power (32- and 64-bit) specific, introduced 2013-06-04.  TODO: Needs investigation.  (This is
+# not PR52614)
+FAIL: gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c scan-tree-dump-times slp "basic block vectorized using SLP" 1
+
+# Power (32- and 64-bit) specific, profile-driven-optimization issues.
+FAIL: gcc.dg/tree-prof/lipo/ic-misattribution-1_0.c scan-ipa-dump-times profile "Indirect call -> direct call" 2
+FAIL: gcc.dg/tree-prof/lipo/indir-call-prof_0.c scan-ipa-dump profile "Indirect call -> direct call.* a1"
+FAIL: gcc.dg/tree-prof/lipo/lipo_inline1_0.c scan-tree-dump-not optimized "foo"
+FAIL: gcc.dg/tree-prof/lipo/lipo_inline1_0.c scan-tree-dump-not optimized "goo"
+
+# Remote-target-specific.  The output file is not getting copied back to
+# the host.
+UNRESOLVED: gcc.dg/pr47793.c scan-file .
+
+# Power 32-bit specific.  Internal compiler error, upstream PR54273.
+FAIL: gcc.target/powerpc/regnames-1.c (internal compiler error)
+FAIL: gcc.target/powerpc/regnames-1.c (test for excess errors)
+
+# Power 32-bit specific.  Testcase locally backported from trunk.
+FAIL: gcc.dg/pr57518.c scan-rtl-dump-not ira "REG_EQUIV.*mem.*"ip""
+
+# Power 32-bit specific.  "libgcc/libgcov.c 1591: undefined reference to `__atomic_fetch_add_8'"
+# (This reference is in Google-local code added as r200877.)
+FAIL: gcc.dg/pr47793.c (test for excess errors)
+UNRESOLVED: gcc.dg/pr47793.c compilation failed to produce executable
+FAIL: gcc.dg/profile-generate-3.c (test for excess errors)
+
+# Power (32- and 64-bit) specific, introduced 2014-01-23.  Fallout from IVOPT changes.
+FAIL: gcc.target/powerpc/20050830-1.c scan-assembler bdn
+
+# Power 32-bit specific.  Not yet analyzed.
+FAIL: gcc.dg/tree-ssa/sra-12.c scan-tree-dump-times release_ssa "l;" 0
+FAIL: gcc.target/powerpc/405-dlmzb-strlen-1.c scan-assembler dlmzb\\.
+FAIL: gcc.target/powerpc/440-dlmzb-strlen-1.c scan-assembler dlmzb\\.
+FAIL: gcc.target/powerpc/dfmode_off.c object-size text == 320
+FAIL: gcc.target/powerpc/lhs-1.c scan-assembler-times nop 3
+FAIL: gcc.target/powerpc/lhs-2.c scan-assembler ori 1,1,0
+FAIL: gcc.target/powerpc/lhs-3.c scan-assembler ori 2,2,0
+FAIL: gcc.target/powerpc/loop_align.c scan-assembler .p2align 5,,31
+FAIL: gcc.target/powerpc/pr46728-1.c scan-assembler-times fsqrt|xssqrtdp 2
+FAIL: gcc.target/powerpc/pr46728-16.c scan-assembler fmadd
+FAIL: gcc.target/powerpc/pr46728-2.c scan-assembler-times fsqrt|xssqrtdp 4
+FAIL: gcc.target/powerpc/pr46728-3.c scan-assembler-times sqrt 4
+FAIL: gcc.target/powerpc/pr46728-5.c scan-assembler-times cbrt 2
+FAIL: gcc.target/powerpc/pr52775.c scan-assembler-times fcfid 2
+FAIL: gcc.target/powerpc/tfmode_off.c object-size text == 544
+
+# Power 32-bit specific execution failures.  Not yet analyzed.
+FAIL: gcc.dg/torture/fp-int-convert-long-double.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  execution test
+FAIL: gcc.target/powerpc/ppc-get-timebase.c execution test
+FAIL: gcc.target/powerpc/ppc-mftb.c execution test
 flaky | FAIL: gcc.dg/torture/tls/tls-test.c  -O0  execution test
 flaky | FAIL: gcc.dg/torture/tls/tls-test.c  -O0  -fpic  execution test
 flaky | FAIL: gcc.dg/torture/tls/tls-test.c  -O0  -fPIC  execution test
@@ -153,68 +114,590 @@
 flaky | FAIL: gcc.dg/torture/tls/tls-test.c  -Os  -fPIC  execution test
 flaky | FAIL: gcc.dg/torture/tls/tls-test.c  -Os  -pie -fpie  execution test
 flaky | FAIL: gcc.dg/torture/tls/tls-test.c  -Os  -pie -fPIE  execution test
-FAIL: gcc.dg/tree-prof/lipo/ic-misattribution-1_0.c scan-ipa-dump-times profile "Indirect call -> direct call" 2
-FAIL: gcc.dg/tree-prof/lipo/indir-call-prof_0.c scan-ipa-dump profile "Indirect call -> direct call.* a1"
-FAIL: gcc.dg/tree-prof/lipo/lipo_inline1_0.c scan-tree-dump-not optimized "foo"
-FAIL: gcc.dg/tree-prof/lipo/lipo_inline1_0.c scan-tree-dump-not optimized "goo"
-FAIL: gcc.dg/tree-ssa/sra-12.c scan-tree-dump-times release_ssa "l;" 0
-FAIL: gcc.dg/tree-ssa/ssa-dom-thread-4.c scan-tree-dump-times dom1 "Threaded" 3
-FAIL: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times vrp1 "[xy][^ ]* !=" 0
-FAIL: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times dom2 "x[^ ]* & y" 1
-FAIL: gcc.dg/vect/pr48765.c (test for excess errors)
-FAIL: gcc.dg/vect/pr48765.c -flto (test for excess errors)
-FAIL: gcc.target/powerpc/405-dlmzb-strlen-1.c scan-assembler dlmzb\\. 
-FAIL: gcc.target/powerpc/440-dlmzb-strlen-1.c scan-assembler dlmzb\\. 
-FAIL: gcc.target/powerpc/ppc-vector-memcpy.c scan-assembler lvx
-FAIL: gcc.target/powerpc/pr46728-1.c scan-assembler-not pow
-FAIL: gcc.target/powerpc/pr46728-10.c execution test
-FAIL: gcc.target/powerpc/pr46728-11.c execution test
-FAIL: gcc.target/powerpc/pr46728-13.c execution test
-FAIL: gcc.target/powerpc/pr46728-14.c execution test
-FAIL: gcc.target/powerpc/pr46728-2.c scan-assembler-not pow
-FAIL: gcc.target/powerpc/pr46728-3.c scan-assembler-not pow
-FAIL: gcc.target/powerpc/pr46728-4.c scan-assembler-not pow
-FAIL: gcc.target/powerpc/pr46728-7.c scan-assembler-not pow
-FAIL: gcc.target/powerpc/pr46728-8.c scan-assembler-not pow
 
-# Entries due to soft-float.
+# Execution failures common to Power targets running under QEMU.
+FAIL: gcc.dg/cleanup-10.c execution test
+FAIL: gcc.dg/cleanup-11.c execution test
+FAIL: gcc.dg/cleanup-8.c execution test
+FAIL: gcc.dg/cleanup-9.c execution test
+
+
+# *** g++:
+
+# Also xfailed in x86; explanation unknown.
+FAIL: g++.dg/ipa/devirt-11.C -std=gnu++98  scan-ipa-dump-times inline "and turned into root of the clone tree" 1
+FAIL: g++.dg/ipa/devirt-11.C -std=gnu++11  scan-ipa-dump-times inline "and turned into root of the clone tree" 1
+
+# Also xfailed in x86; REAL bug in google/main
+FAIL: g++.dg/warn/Wself-assign-2.C -std=gnu++11  (test for warnings, line 12)
+
+# Power (32- and 64-bit) specific, profile-driven-optimization issues.
+FAIL: g++.dg/tree-prof/lipo/vcall1_0.C scan-ipa-dump-times profile "Indirect call -> direct call" 2
+
+# Power 32-bit specific execution failures.  Not yet analyzed.
+FAIL: g++.dg/other/pr55650.C -std=gnu++98 (test for excess errors)
+FAIL: g++.dg/other/pr55650.C -std=gnu++11 (test for excess errors)
+
+# Execution failures common to Power targets running under QEMU.
+FAIL: g++.dg/abi/forced.C -std=gnu++98 execution test
+FAIL: g++.dg/abi/forced.C -std=gnu++11 execution test
 FAIL: g++.dg/cdce3.C -std=gnu++98 execution test
 FAIL: g++.dg/cdce3.C -std=gnu++11 execution test
-FAIL: g++.dg/tree-prof/mversn15.C execution,    -fprofile-generate
-UNRESOLVED: g++.dg/tree-prof/mversn15.C execution,    -fprofile-use
-UNRESOLVED: g++.dg/tree-prof/mversn15.C compilation,  -fprofile-use
-FAIL: g++.dg/tree-prof/mversn15a.C execution,    -fprofile-generate
-UNRESOLVED: g++.dg/tree-prof/mversn15a.C execution,    -fprofile-use
-UNRESOLVED: g++.dg/tree-prof/mversn15a.C compilation,  -fprofile-use
-FAIL: gcc.dg/torture/fp-int-convert-long-double.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  execution test
-FAIL: gcc.target/powerpc/lhs-1.c scan-assembler-times nop 3
-FAIL: gcc.target/powerpc/lhs-2.c scan-assembler ori 1,1,0
-FAIL: gcc.target/powerpc/lhs-3.c scan-assembler ori 2,2,0
-FAIL: gcc.target/powerpc/loop_align.c scan-assembler .p2align 5,,31
-FAIL: gcc.target/powerpc/pr46728-1.c scan-assembler-times fsqrt 2
-FAIL: gcc.target/powerpc/pr46728-16.c scan-assembler fmadd
-FAIL: gcc.target/powerpc/pr46728-2.c scan-assembler-times fsqrt 4
-FAIL: gcc.target/powerpc/pr46728-3.c scan-assembler-times sqrt 4
-FAIL: gcc.target/powerpc/pr46728-5.c scan-assembler-times cbrt 2
-FAIL: gcc.target/powerpc/pr52775.c scan-assembler-times fcfid 2
-FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer -funroll-loops  execution test
-FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -g  execution test
+FAIL: g++.dg/ext/cleanup-10.C -std=gnu++98 execution test
+FAIL: g++.dg/ext/cleanup-10.C -std=gnu++11 execution test
+FAIL: g++.dg/ext/cleanup-11.C -std=gnu++98 execution test
+FAIL: g++.dg/ext/cleanup-11.C -std=gnu++11 execution test
+FAIL: g++.dg/ext/cleanup-8.C -std=gnu++98 execution test
+FAIL: g++.dg/ext/cleanup-8.C -std=gnu++11 execution test
+FAIL: g++.dg/ext/cleanup-9.C -std=gnu++98 execution test
+FAIL: g++.dg/ext/cleanup-9.C -std=gnu++11 execution test
+FAIL: g++.dg/tls/thread_local3.C -std=gnu++11 execution test
+FAIL: g++.dg/tls/thread_local3g.C -std=gnu++11 execution test
+FAIL: g++.dg/tls/thread_local4.C -std=gnu++11 execution test
+FAIL: g++.dg/tls/thread_local4g.C -std=gnu++11 execution test
+FAIL: g++.dg/tls/thread_local5.C -std=gnu++11 execution test
+FAIL: g++.dg/tls/thread_local5g.C -std=gnu++11 execution test
+FAIL: g++.dg/tls/thread_local6.C execution test
+FAIL: g++.dg/tls/thread_local6g.C execution test
+
+
+
+# Fortran failures are not important to us so far.
+# *** gfortran:
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -O0  execution test
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -O1  execution test
 FAIL: gfortran.dg/actual_array_constructor_3.f90 -O2  execution test
 FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer  execution test
-FAIL: gfortran.dg/actual_array_constructor_3.f90 -O1  execution test
 FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer -funroll-loops  execution test
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -g  execution test
 FAIL: gfortran.dg/actual_array_constructor_3.f90 -Os  execution test
-FAIL: gfortran.dg/actual_array_constructor_3.f90 -O0  execution test
+FAIL: gfortran.dg/norm2_3.f90 -O0  execution test
+FAIL: gfortran.dg/norm2_3.f90 -O1  execution test
+FAIL: gfortran.dg/norm2_3.f90 -O2  execution test
+FAIL: gfortran.dg/norm2_3.f90 -O3 -fomit-frame-pointer  execution test
 FAIL: gfortran.dg/norm2_3.f90 -O3 -fomit-frame-pointer -funroll-loops  execution test
 FAIL: gfortran.dg/norm2_3.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test
-FAIL: gfortran.dg/norm2_3.f90 -O0  execution test
-FAIL: gfortran.dg/norm2_3.f90 -Os  execution test
-FAIL: gfortran.dg/norm2_3.f90 -O2  execution test
 FAIL: gfortran.dg/norm2_3.f90 -O3 -g  execution test
-FAIL: gfortran.dg/norm2_3.f90 -O3 -fomit-frame-pointer  execution test
-FAIL: gfortran.dg/norm2_3.f90 -O1  execution test
+FAIL: gfortran.dg/norm2_3.f90 -Os  execution test
+XPASS: gfortran.dg/nint_2.f90  -O0  execution test
 
-# See http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00141.html.  Revert once
-# that is resolved.
-UNRESOLVED: 23_containers/map/element_access/2.cc compilation failed to produce executable
-FAIL: 23_containers/map/element_access/2.cc (test for excess errors)
+
+
+
+
+
+# Profiling errors on Power-32:
+FAIL: g++.dg/tree-prof/indir-call-prof-2.C compilation,  -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/indir-call-prof-2.C execution,    -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/indir-call-prof-2.C compilation,  -fprofile-use
+UNRESOLVED: g++.dg/tree-prof/indir-call-prof-2.C execution,    -fprofile-use
+FAIL: g++.dg/tree-prof/indir-call-prof.C compilation,  -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/indir-call-prof.C execution,    -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/indir-call-prof.C compilation,  -fprofile-use
+UNRESOLVED: g++.dg/tree-prof/indir-call-prof.C execution,    -fprofile-use
+FAIL: g++.dg/tree-prof/inline_mismatch_args.C compilation,  -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/inline_mismatch_args.C execution,    -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/inline_mismatch_args.C compilation,  -fprofile-use
+UNRESOLVED: g++.dg/tree-prof/inline_mismatch_args.C execution,    -fprofile-use
+FAIL: g++.dg/tree-prof/partition1.C compilation,  -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/partition1.C execution,    -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/partition1.C compilation,  -fprofile-use
+UNRESOLVED: g++.dg/tree-prof/partition1.C execution,    -fprofile-use
+FAIL: g++.dg/tree-prof/partition2.C compilation,  -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/partition2.C execution,    -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/partition2.C compilation,  -fprofile-use
+UNRESOLVED: g++.dg/tree-prof/partition2.C execution,    -fprofile-use
+FAIL: g++.dg/tree-prof/partition3.C compilation,  -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/partition3.C execution,    -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/partition3.C compilation,  -fprofile-use
+UNRESOLVED: g++.dg/tree-prof/partition3.C execution,    -fprofile-use
+FAIL: g++.dg/tree-prof/pr51719.C compilation,  -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/pr51719.C execution,    -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/pr51719.C compilation,  -fprofile-use
+UNRESOLVED: g++.dg/tree-prof/pr51719.C execution,    -fprofile-use
+FAIL: g++.dg/tree-prof/pr53460.C compilation,  -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/pr53460.C execution,    -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/pr53460.C compilation,  -fprofile-use
+UNRESOLVED: g++.dg/tree-prof/pr53460.C execution,    -fprofile-use
+FAIL: gcc.dg/tree-prof/bb-reorg.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/bb-reorg.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/bb-reorg.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/bb-reorg.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/ic-misattribution-1.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/ic-misattribution-1.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/ic-misattribution-1.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/ic-misattribution-1.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/ic-misattribution-1a.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/ic-misattribution-1a.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/ic-misattribution-1a.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/ic-misattribution-1a.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/indir-call-prof.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/indir-call-prof.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/indir-call-prof.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/indir-call-prof.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/inliner-1.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/inliner-1.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/inliner-1.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/inliner-1.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/lipo/inliner-1_0.c compilation,  -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/inliner-1_0.c execution,    -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/inliner-1_0.c compilation,  -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/inliner-1_0.c execution,    -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+FAIL: gcc.dg/tree-prof/lipo/pr47187_0.c compilation,  -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/pr47187_0.c execution,    -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/pr47187_0.c compilation,  -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/pr47187_0.c execution,    -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+FAIL: gcc.dg/tree-prof/lipo/stringop-1_0.c compilation,  -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/stringop-1_0.c execution,    -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/stringop-1_0.c compilation,  -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/stringop-1_0.c execution,    -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+FAIL: gcc.dg/tree-prof/lipo/stringop-2_0.c compilation,  -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/stringop-2_0.c execution,    -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/stringop-2_0.c compilation,  -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/stringop-2_0.c execution,    -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+FAIL: gcc.dg/tree-prof/lipo/val-prof-1_0.c compilation,  -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-1_0.c execution,    -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-1_0.c compilation,  -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-1_0.c execution,    -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+FAIL: gcc.dg/tree-prof/lipo/val-prof-2_0.c compilation,  -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-2_0.c execution,    -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-2_0.c compilation,  -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-2_0.c execution,    -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+FAIL: gcc.dg/tree-prof/lipo/val-prof-3_0.c compilation,  -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-3_0.c execution,    -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-3_0.c compilation,  -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-3_0.c execution,    -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+FAIL: gcc.dg/tree-prof/lipo/val-prof-4_0.c compilation,  -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-4_0.c execution,    -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-4_0.c compilation,  -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-4_0.c execution,    -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+FAIL: gcc.dg/tree-prof/lipo/val-prof-5_0.c compilation,  -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-5_0.c execution,    -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-5_0.c compilation,  -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-5_0.c execution,    -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+FAIL: gcc.dg/tree-prof/lipo/val-prof-6_0.c compilation,  -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-6_0.c execution,    -fprofile-generate -fripa -D_PROFILE_GENERATE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-6_0.c compilation,  -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+UNRESOLVED: gcc.dg/tree-prof/lipo/val-prof-6_0.c execution,    -fprofile-use -fripa -D_PROFILE_USE -fno-section-anchors
+FAIL: gcc.dg/tree-prof/peel-1.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/peel-1.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/peel-1.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/peel-1.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/pr34999.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr34999.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr34999.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/pr34999.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/pr44777.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr44777.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr44777.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/pr44777.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/pr45354.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr45354.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr45354.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/pr45354.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/pr47187.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr47187.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr47187.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/pr47187.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/pr49299-1.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr49299-1.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr49299-1.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/pr49299-1.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/pr49299-2.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr49299-2.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr49299-2.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/pr49299-2.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/pr50907.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr50907.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr50907.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/pr50907.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/pr52027.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr52027.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr52027.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/pr52027.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/pr52150.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr52150.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/pr52150.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/pr52150.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/prof-robust-1.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/prof-robust-1.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/prof-robust-1.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/prof-robust-1.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/stringop-1.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/stringop-1.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/stringop-1.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/stringop-1.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/stringop-2.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/stringop-2.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/stringop-2.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/stringop-2.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/switch-case-1.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/switch-case-1.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/switch-case-1.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/switch-case-1.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/switch-case-2.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/switch-case-2.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/switch-case-2.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/switch-case-2.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/tracer-1.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/tracer-1.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/tracer-1.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/tracer-1.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/unroll-1.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/unroll-1.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/unroll-1.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/unroll-1.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/update-cunroll-2.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/update-cunroll-2.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/update-cunroll-2.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/update-cunroll-2.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/update-loopch.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/update-loopch.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/update-loopch.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/update-loopch.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/update-tailcall.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/update-tailcall.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/update-tailcall.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/update-tailcall.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/val-prof-1.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-1.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-1.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-1.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/val-prof-2.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-2.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-2.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-2.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/val-prof-3.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-3.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-3.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-3.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/val-prof-4.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-4.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-4.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-4.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/val-prof-5.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-5.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-5.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-5.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/val-prof-6.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-6.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-6.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/val-prof-6.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/wcoverage-mismatch.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/wcoverage-mismatch.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/wcoverage-mismatch.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/wcoverage-mismatch.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: g++.dg/tree-prof/pr57451.C compilation,  -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/pr57451.C execution,    -fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/pr57451.C compilation,  -fprofile-use
+UNRESOLVED: g++.dg/tree-prof/pr57451.C execution,    -fprofile-use
+FAIL: gcc.dg/tree-prof/20041218-1.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/20041218-1.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/20041218-1.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/20041218-1.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/cold_partition_label.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/cold_partition_label.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/cold_partition_label.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/cold_partition_label.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/comp-goto-1.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/comp-goto-1.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/comp-goto-1.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/comp-goto-1.c execution,    -fprofile-use -D_PROFILE_USE
+FAIL: gcc.dg/tree-prof/va-arg-pack-1.c compilation,  -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/va-arg-pack-1.c execution,    -fprofile-generate -D_PROFILE_GENERATE
+UNRESOLVED: gcc.dg/tree-prof/va-arg-pack-1.c compilation,  -fprofile-use -D_PROFILE_USE
+UNRESOLVED: gcc.dg/tree-prof/va-arg-pack-1.c execution,    -fprofile-use -D_PROFILE_USE
+
+
+
+
+
+
+# ASAN-specific.
+FAIL: c-c++-common/asan/global-overflow-1.c -O0  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/global-overflow-1.c -O0  compilation failed to produce executable
+FAIL: c-c++-common/asan/global-overflow-1.c -O1  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/global-overflow-1.c -O1  compilation failed to produce executable
+FAIL: c-c++-common/asan/global-overflow-1.c -O2  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/global-overflow-1.c -O2  compilation failed to produce executable
+FAIL: c-c++-common/asan/global-overflow-1.c -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/global-overflow-1.c -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: c-c++-common/asan/global-overflow-1.c -O3 -g  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/global-overflow-1.c -O3 -g  compilation failed to produce executable
+FAIL: c-c++-common/asan/global-overflow-1.c -Os  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/global-overflow-1.c -Os  compilation failed to produce executable
+FAIL: c-c++-common/asan/global-overflow-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/global-overflow-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: c-c++-common/asan/global-overflow-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/global-overflow-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: c-c++-common/asan/heap-overflow-1.c -O0  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/heap-overflow-1.c -O0  compilation failed to produce executable
+FAIL: c-c++-common/asan/heap-overflow-1.c -O1  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/heap-overflow-1.c -O1  compilation failed to produce executable
+FAIL: c-c++-common/asan/heap-overflow-1.c -O2  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/heap-overflow-1.c -O2  compilation failed to produce executable
+FAIL: c-c++-common/asan/heap-overflow-1.c -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/heap-overflow-1.c -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: c-c++-common/asan/heap-overflow-1.c -O3 -g  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/heap-overflow-1.c -O3 -g  compilation failed to produce executable
+FAIL: c-c++-common/asan/heap-overflow-1.c -Os  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/heap-overflow-1.c -Os  compilation failed to produce executable
+FAIL: c-c++-common/asan/heap-overflow-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/heap-overflow-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: c-c++-common/asan/heap-overflow-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/heap-overflow-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: c-c++-common/asan/memcmp-1.c -O0  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/memcmp-1.c -O0  compilation failed to produce executable
+FAIL: c-c++-common/asan/memcmp-1.c -O1  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/memcmp-1.c -O1  compilation failed to produce executable
+FAIL: c-c++-common/asan/memcmp-1.c -O2  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/memcmp-1.c -O2  compilation failed to produce executable
+FAIL: c-c++-common/asan/memcmp-1.c -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/memcmp-1.c -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: c-c++-common/asan/memcmp-1.c -O3 -g  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/memcmp-1.c -O3 -g  compilation failed to produce executable
+FAIL: c-c++-common/asan/memcmp-1.c -Os  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/memcmp-1.c -Os  compilation failed to produce executable
+FAIL: c-c++-common/asan/memcmp-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/memcmp-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: c-c++-common/asan/memcmp-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/memcmp-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: c-c++-common/asan/null-deref-1.c -O0  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/null-deref-1.c -O0  compilation failed to produce executable
+FAIL: c-c++-common/asan/null-deref-1.c -O1  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/null-deref-1.c -O1  compilation failed to produce executable
+FAIL: c-c++-common/asan/null-deref-1.c -O2  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/null-deref-1.c -O2  compilation failed to produce executable
+FAIL: c-c++-common/asan/null-deref-1.c -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/null-deref-1.c -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: c-c++-common/asan/null-deref-1.c -O3 -g  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/null-deref-1.c -O3 -g  compilation failed to produce executable
+FAIL: c-c++-common/asan/null-deref-1.c -Os  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/null-deref-1.c -Os  compilation failed to produce executable
+FAIL: c-c++-common/asan/null-deref-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/null-deref-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: c-c++-common/asan/null-deref-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/null-deref-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: c-c++-common/asan/sanity-check-pure-c-1.c -O0  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/sanity-check-pure-c-1.c -O0  compilation failed to produce executable
+FAIL: c-c++-common/asan/sanity-check-pure-c-1.c -O1  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/sanity-check-pure-c-1.c -O1  compilation failed to produce executable
+FAIL: c-c++-common/asan/sanity-check-pure-c-1.c -O2  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/sanity-check-pure-c-1.c -O2  compilation failed to produce executable
+FAIL: c-c++-common/asan/sanity-check-pure-c-1.c -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/sanity-check-pure-c-1.c -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: c-c++-common/asan/sanity-check-pure-c-1.c -O3 -g  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/sanity-check-pure-c-1.c -O3 -g  compilation failed to produce executable
+FAIL: c-c++-common/asan/sanity-check-pure-c-1.c -Os  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/sanity-check-pure-c-1.c -Os  compilation failed to produce executable
+FAIL: c-c++-common/asan/sanity-check-pure-c-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/sanity-check-pure-c-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: c-c++-common/asan/sanity-check-pure-c-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/sanity-check-pure-c-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: c-c++-common/asan/sleep-before-dying-1.c -O2  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/sleep-before-dying-1.c -O2  compilation failed to produce executable
+FAIL: c-c++-common/asan/sleep-before-dying-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/sleep-before-dying-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: c-c++-common/asan/sleep-before-dying-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/sleep-before-dying-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: c-c++-common/asan/stack-overflow-1.c -O0  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/stack-overflow-1.c -O0  compilation failed to produce executable
+FAIL: c-c++-common/asan/stack-overflow-1.c -O1  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/stack-overflow-1.c -O1  compilation failed to produce executable
+FAIL: c-c++-common/asan/stack-overflow-1.c -O2  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/stack-overflow-1.c -O2  compilation failed to produce executable
+FAIL: c-c++-common/asan/stack-overflow-1.c -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/stack-overflow-1.c -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: c-c++-common/asan/stack-overflow-1.c -O3 -g  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/stack-overflow-1.c -O3 -g  compilation failed to produce executable
+FAIL: c-c++-common/asan/stack-overflow-1.c -Os  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/stack-overflow-1.c -Os  compilation failed to produce executable
+FAIL: c-c++-common/asan/stack-overflow-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/stack-overflow-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: c-c++-common/asan/stack-overflow-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/stack-overflow-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: c-c++-common/asan/strip-path-prefix-1.c -O2  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/strip-path-prefix-1.c -O2  compilation failed to produce executable
+FAIL: c-c++-common/asan/strip-path-prefix-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/strip-path-prefix-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: c-c++-common/asan/strip-path-prefix-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/strip-path-prefix-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: c-c++-common/asan/strncpy-overflow-1.c -O0  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/strncpy-overflow-1.c -O0  compilation failed to produce executable
+FAIL: c-c++-common/asan/strncpy-overflow-1.c -O1  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/strncpy-overflow-1.c -O1  compilation failed to produce executable
+FAIL: c-c++-common/asan/strncpy-overflow-1.c -O2  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/strncpy-overflow-1.c -O2  compilation failed to produce executable
+FAIL: c-c++-common/asan/strncpy-overflow-1.c -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/strncpy-overflow-1.c -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: c-c++-common/asan/strncpy-overflow-1.c -O3 -g  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/strncpy-overflow-1.c -O3 -g  compilation failed to produce executable
+FAIL: c-c++-common/asan/strncpy-overflow-1.c -Os  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/strncpy-overflow-1.c -Os  compilation failed to produce executable
+FAIL: c-c++-common/asan/strncpy-overflow-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/strncpy-overflow-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: c-c++-common/asan/strncpy-overflow-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/strncpy-overflow-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: c-c++-common/asan/use-after-free-1.c -O0  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/use-after-free-1.c -O0  compilation failed to produce executable
+FAIL: c-c++-common/asan/use-after-free-1.c -O1  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/use-after-free-1.c -O1  compilation failed to produce executable
+FAIL: c-c++-common/asan/use-after-free-1.c -O2  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/use-after-free-1.c -O2  compilation failed to produce executable
+FAIL: c-c++-common/asan/use-after-free-1.c -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/use-after-free-1.c -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: c-c++-common/asan/use-after-free-1.c -O3 -g  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/use-after-free-1.c -O3 -g  compilation failed to produce executable
+FAIL: c-c++-common/asan/use-after-free-1.c -Os  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/use-after-free-1.c -Os  compilation failed to produce executable
+FAIL: c-c++-common/asan/use-after-free-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/use-after-free-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: c-c++-common/asan/use-after-free-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: c-c++-common/asan/use-after-free-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-stack-uaf-1.C -O0  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-stack-uaf-1.C -O0  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-stack-uaf-1.C -O1  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-stack-uaf-1.C -O1  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-stack-uaf-1.C -O2  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-stack-uaf-1.C -O2  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-stack-uaf-1.C -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-stack-uaf-1.C -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-stack-uaf-1.C -O3 -g  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-stack-uaf-1.C -O3 -g  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-stack-uaf-1.C -Os  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-stack-uaf-1.C -Os  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-tail-call-1.C -O0  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-tail-call-1.C -O0  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-tail-call-1.C -O1  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-tail-call-1.C -O1  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-tail-call-1.C -O2  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-tail-call-1.C -O2  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-tail-call-1.C -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-tail-call-1.C -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-tail-call-1.C -O3 -g  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-tail-call-1.C -O3 -g  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-tail-call-1.C -Os  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-tail-call-1.C -Os  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-tail-call-1.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-tail-call-1.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-tail-call-1.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-tail-call-1.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-thread-stack-1.C -O0  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-thread-stack-1.C -O0  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-thread-stack-1.C -O1  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-thread-stack-1.C -O1  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-thread-stack-1.C -O2  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-thread-stack-1.C -O2  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-thread-stack-1.C -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-thread-stack-1.C -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-thread-stack-1.C -O3 -g  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-thread-stack-1.C -O3 -g  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-thread-stack-1.C -Os  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-thread-stack-1.C -Os  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-thread-stack-1.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-thread-stack-1.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: g++.dg/asan/deep-thread-stack-1.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: g++.dg/asan/deep-thread-stack-1.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: g++.dg/asan/default-options-1.C -O0  (test for excess errors)
+UNRESOLVED: g++.dg/asan/default-options-1.C -O0  compilation failed to produce executable
+FAIL: g++.dg/asan/default-options-1.C -O1  (test for excess errors)
+UNRESOLVED: g++.dg/asan/default-options-1.C -O1  compilation failed to produce executable
+FAIL: g++.dg/asan/default-options-1.C -O2  (test for excess errors)
+UNRESOLVED: g++.dg/asan/default-options-1.C -O2  compilation failed to produce executable
+FAIL: g++.dg/asan/default-options-1.C -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: g++.dg/asan/default-options-1.C -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: g++.dg/asan/default-options-1.C -O3 -g  (test for excess errors)
+UNRESOLVED: g++.dg/asan/default-options-1.C -O3 -g  compilation failed to produce executable
+FAIL: g++.dg/asan/default-options-1.C -Os  (test for excess errors)
+UNRESOLVED: g++.dg/asan/default-options-1.C -Os  compilation failed to produce executable
+FAIL: g++.dg/asan/default-options-1.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: g++.dg/asan/default-options-1.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: g++.dg/asan/default-options-1.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: g++.dg/asan/default-options-1.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-failure-test-1.C -O0  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-failure-test-1.C -O0  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-failure-test-1.C -O1  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-failure-test-1.C -O1  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-failure-test-1.C -O2  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-failure-test-1.C -O2  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-failure-test-1.C -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-failure-test-1.C -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-failure-test-1.C -O3 -g  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-failure-test-1.C -O3 -g  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-failure-test-1.C -Os  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-failure-test-1.C -Os  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-failure-test-1.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-failure-test-1.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-failure-test-1.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-failure-test-1.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-malloc-test-1.C -O0  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-malloc-test-1.C -O0  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-malloc-test-1.C -O1  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-malloc-test-1.C -O1  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-malloc-test-1.C -O2  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-malloc-test-1.C -O2  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-malloc-test-1.C -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-malloc-test-1.C -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-malloc-test-1.C -O3 -g  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-malloc-test-1.C -O3 -g  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-malloc-test-1.C -Os  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-malloc-test-1.C -Os  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-malloc-test-1.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-malloc-test-1.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-malloc-test-1.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-malloc-test-1.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-test-1.C -O0  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-test-1.C -O0  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-test-1.C -O1  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-test-1.C -O1  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-test-1.C -O2  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-test-1.C -O2  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-test-1.C -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-test-1.C -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-test-1.C -O3 -g  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-test-1.C -O3 -g  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-test-1.C -Os  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-test-1.C -Os  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-test-1.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-test-1.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: g++.dg/asan/interception-test-1.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: g++.dg/asan/interception-test-1.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: g++.dg/asan/large-func-test-1.C -O0  (test for excess errors)
+UNRESOLVED: g++.dg/asan/large-func-test-1.C -O0  compilation failed to produce executable
+FAIL: g++.dg/asan/large-func-test-1.C -O1  (test for excess errors)
+UNRESOLVED: g++.dg/asan/large-func-test-1.C -O1  compilation failed to produce executable
+FAIL: g++.dg/asan/large-func-test-1.C -O2  (test for excess errors)
+UNRESOLVED: g++.dg/asan/large-func-test-1.C -O2  compilation failed to produce executable
+FAIL: g++.dg/asan/large-func-test-1.C -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: g++.dg/asan/large-func-test-1.C -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: g++.dg/asan/large-func-test-1.C -O3 -g  (test for excess errors)
+UNRESOLVED: g++.dg/asan/large-func-test-1.C -O3 -g  compilation failed to produce executable
+FAIL: g++.dg/asan/large-func-test-1.C -Os  (test for excess errors)
+UNRESOLVED: g++.dg/asan/large-func-test-1.C -Os  compilation failed to produce executable
+FAIL: g++.dg/asan/large-func-test-1.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: g++.dg/asan/large-func-test-1.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: g++.dg/asan/large-func-test-1.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: g++.dg/asan/large-func-test-1.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: g++.dg/asan/pr55617.C -O0  (test for excess errors)
+UNRESOLVED: g++.dg/asan/pr55617.C -O0  compilation failed to produce executable
+FAIL: g++.dg/asan/pr55617.C -O1  (test for excess errors)
+UNRESOLVED: g++.dg/asan/pr55617.C -O1  compilation failed to produce executable
+FAIL: g++.dg/asan/pr55617.C -O2  (test for excess errors)
+UNRESOLVED: g++.dg/asan/pr55617.C -O2  compilation failed to produce executable
+FAIL: g++.dg/asan/pr55617.C -O3 -fomit-frame-pointer  (test for excess errors)
+UNRESOLVED: g++.dg/asan/pr55617.C -O3 -fomit-frame-pointer  compilation failed to produce executable
+FAIL: g++.dg/asan/pr55617.C -O3 -g  (test for excess errors)
+UNRESOLVED: g++.dg/asan/pr55617.C -O3 -g  compilation failed to produce executable
+FAIL: g++.dg/asan/pr55617.C -Os  (test for excess errors)
+UNRESOLVED: g++.dg/asan/pr55617.C -Os  compilation failed to produce executable
+FAIL: g++.dg/asan/pr55617.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: g++.dg/asan/pr55617.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: g++.dg/asan/pr55617.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: g++.dg/asan/pr55617.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
+FAIL: g++.dg/asan/symbolize-callback-1.C -O2  (test for excess errors)
+UNRESOLVED: g++.dg/asan/symbolize-callback-1.C -O2  compilation failed to produce executable
+FAIL: g++.dg/asan/symbolize-callback-1.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
+UNRESOLVED: g++.dg/asan/symbolize-callback-1.C -O2 -flto -fno-use-linker-plugin -flto-partition=none  compilation failed to produce executable
+FAIL: g++.dg/asan/symbolize-callback-1.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
+UNRESOLVED: g++.dg/asan/symbolize-callback-1.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce executable
diff --git a/contrib/testsuite-management/powerpc64-grtev3-linux-gnu.xfail b/contrib/testsuite-management/powerpc64-grtev3-linux-gnu.xfail
index ab89d49..32f84a3 100644
--- a/contrib/testsuite-management/powerpc64-grtev3-linux-gnu.xfail
+++ b/contrib/testsuite-management/powerpc64-grtev3-linux-gnu.xfail
@@ -41,13 +41,15 @@
 # not PR52614)
 FAIL: gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c scan-tree-dump-times slp "basic block vectorized using SLP" 1
 
+# PPC-specific, introduced 2014-01-23.  Fallout from IVOPT changes.
+FAIL: gcc.dg/sms-4.c scan-rtl-dump-times sms "SMS succeeded" 1
+FAIL: gcc.target/powerpc/20050830-1.c scan-assembler bdn
+
 # PPC-specific, profile-driven-optimization issues.
 FAIL: gcc.dg/tree-prof/lipo/ic-misattribution-1_0.c scan-ipa-dump-times profile "Indirect call -> direct call" 2
 FAIL: gcc.dg/tree-prof/lipo/indir-call-prof_0.c scan-ipa-dump profile "Indirect call -> direct call.* a1"
 FAIL: gcc.dg/tree-prof/lipo/lipo_inline1_0.c scan-tree-dump-not optimized "foo"
 FAIL: gcc.dg/tree-prof/lipo/lipo_inline1_0.c scan-tree-dump-not optimized "goo"
-FAIL: gcc.dg/tree-prof/ic-misattribution-1.c compilation,  -fprofile-use -D_PROFILE_USE
-UNRESOLVED: gcc.dg/tree-prof/ic-misattribution-1.c execution,    -fprofile-use -D_PROFILE_USE
 
 # Remote-target-specific.  The output file is not getting copied back to
 # the host.
@@ -106,6 +108,9 @@
 
 
 # *** libstdc++:
+# PPC-specific.  This test occasionally times out.
+flaky | UNRESOLVED: 20_util/hash/quality.cc execution test
+
 # PPC-specific.  TODO: Needs investigation.
 FAIL: libstdc++-abi/abi_check
 
diff --git a/contrib/testsuite-management/powerpc64le-grtev3-linux-gnu.xfail b/contrib/testsuite-management/powerpc64le-grtev3-linux-gnu.xfail
index 53db550..db19072 100644
--- a/contrib/testsuite-management/powerpc64le-grtev3-linux-gnu.xfail
+++ b/contrib/testsuite-management/powerpc64le-grtev3-linux-gnu.xfail
@@ -39,6 +39,10 @@
 # PPC-specific, recent.  TODO: Needs investigation.  (This is not PR52614)
 FAIL: gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c scan-tree-dump-times slp "basic block vectorized using SLP" 1
 
+# PPC-specific, introduced 2014-01-23.  Fallout from IVOPT changes.
+FAIL: gcc.dg/sms-4.c scan-rtl-dump-times sms "SMS succeeded" 1
+FAIL: gcc.target/powerpc/20050830-1.c scan-assembler bdn
+
 # PPCle-specific execution failures.  Not yet analyzed.
 FAIL: c-c++-common/dfp/cast.c execution test
 FAIL: c-c++-common/dfp/cast.c -std=c++98 execution test
@@ -81,10 +85,6 @@
 FAIL: gcc.c-torture/execute/float-floor.c execution,  -Os
 FAIL: gcc.c-torture/execute/float-floor.c execution,  -Og -g
 FAIL: gcc.c-torture/execute/float-floor.c execution,  -O2 -flto -fno-use-linker-plugin -flto-partition=none
-FAIL: gcc.dg/cleanup-10.c execution test
-FAIL: gcc.dg/cleanup-11.c execution test
-FAIL: gcc.dg/cleanup-8.c execution test
-FAIL: gcc.dg/cleanup-9.c execution test
 FAIL: gcc.dg/dfp/fe-binop.c execution test
 FAIL: gcc.dg/pr43419.c execution test
 FAIL: gcc.dg/torture/tls/tls-test.c -O0  execution test
@@ -120,6 +120,12 @@
 FAIL: gcc.dg/torture/tls/tls-test.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  execution test
 FAIL: gcc.dg/torture/tls/tls-test.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  execution test
 
+# Execution failures common to Power targets running under QEMU.
+FAIL: gcc.dg/cleanup-10.c execution test
+FAIL: gcc.dg/cleanup-11.c execution test
+FAIL: gcc.dg/cleanup-8.c execution test
+FAIL: gcc.dg/cleanup-9.c execution test
+
 
 # *** g++:
 
@@ -131,6 +137,10 @@
 FAIL: g++.dg/warn/Wself-assign-2.C -std=gnu++11  (test for warnings, line 12)
 
 # PPCle-specific execution failures.  Not yet analyzed.
+FAIL: g++.dg/tls/thread_local3.C -std=gnu++11 execution test
+FAIL: g++.dg/tls/thread_local3g.C -std=gnu++11 execution test
+
+# Execution failures common to Power targets running under QEMU.
 FAIL: g++.dg/abi/forced.C -std=gnu++98 execution test
 FAIL: g++.dg/abi/forced.C -std=gnu++11 execution test
 FAIL: g++.dg/cdce3.C -std=gnu++98 execution test
@@ -143,8 +153,6 @@
 FAIL: g++.dg/ext/cleanup-8.C -std=gnu++11 execution test
 FAIL: g++.dg/ext/cleanup-9.C -std=gnu++98 execution test
 FAIL: g++.dg/ext/cleanup-9.C -std=gnu++11 execution test
-FAIL: g++.dg/tls/thread_local3.C -std=gnu++11 execution test
-FAIL: g++.dg/tls/thread_local3g.C -std=gnu++11 execution test
 FAIL: g++.dg/tls/thread_local4.C -std=gnu++11 execution test
 FAIL: g++.dg/tls/thread_local4g.C -std=gnu++11 execution test
 FAIL: g++.dg/tls/thread_local5.C -std=gnu++11 execution test
@@ -152,7 +160,6 @@
 FAIL: g++.dg/tls/thread_local6.C execution test
 FAIL: g++.dg/tls/thread_local6g.C execution test
 
-
 # PPCle-specific: There are known bugs in little-endian vector support.
 FAIL: gcc.dg/vect/bb-slp-24.c execution test
 FAIL: gcc.dg/vect/bb-slp-24.c -flto execution test
@@ -164,7 +171,6 @@
 FAIL: gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c scan-tree-dump-times slp "basic block vectorized using SLP" 1
 FAIL: gcc.dg/vect/costmodel/ppc/costmodel-slp-12.c execution test
 FAIL: gcc.dg/vect/costmodel/ppc/costmodel-vect-reduc-1char.c execution test
-FAIL: gcc.dg/vect/fast-math-vect-complex-3.c execution test
 FAIL: gcc.dg/vect/if-cvt-stores-vect-ifcvt-18.c execution test
 FAIL: gcc.dg/vect/no-scevccp-outer-10a.c execution test
 FAIL: gcc.dg/vect/no-scevccp-outer-10b.c execution test
@@ -251,8 +257,6 @@
 FAIL: gcc.dg/vect/slp-perm-6.c -flto execution test
 FAIL: gcc.dg/vect/slp-perm-7.c execution test
 FAIL: gcc.dg/vect/slp-perm-7.c -flto execution test
-FAIL: gcc.dg/vect/slp-perm-8.c execution test
-FAIL: gcc.dg/vect/slp-perm-8.c -flto execution test
 FAIL: gcc.dg/vect/slp-reduc-3.c execution test
 FAIL: gcc.dg/vect/slp-reduc-3.c -flto execution test
 FAIL: gcc.dg/vect/slp-reduc-6.c execution test
@@ -415,8 +419,6 @@
 FAIL: gcc.dg/vect/vect-strided-mult-char-ls.c -flto execution test
 FAIL: gcc.dg/vect/vect-strided-mult.c execution test
 FAIL: gcc.dg/vect/vect-strided-mult.c -flto execution test
-FAIL: gcc.dg/vect/vect-strided-same-dr.c execution test
-FAIL: gcc.dg/vect/vect-strided-same-dr.c -flto execution test
 FAIL: gcc.dg/vect/vect-strided-store-a-u8-i2.c execution test
 FAIL: gcc.dg/vect/vect-strided-store-a-u8-i2.c -flto execution test
 FAIL: gcc.dg/vect/vect-strided-store-u16-i4.c execution test
@@ -449,8 +451,6 @@
 FAIL: gcc.dg/vect/vect-strided-u8-i8-gap7.c -flto execution test
 FAIL: gcc.dg/vect/vect-strided-u8-i8.c execution test
 FAIL: gcc.dg/vect/vect-strided-u8-i8.c -flto execution test
-FAIL: gcc.dg/vect/vect-vfa-03.c execution test
-FAIL: gcc.dg/vect/vect-vfa-03.c -flto execution test
 FAIL: gcc.dg/vect/vect-widen-mult-const-s16.c execution test
 FAIL: gcc.dg/vect/vect-widen-mult-const-s16.c -flto execution test
 FAIL: gcc.dg/vect/vect-widen-mult-const-u16.c execution test
@@ -523,8 +523,6 @@
 FAIL: gcc.dg/vmx/gcc-bug-i.c -Os  execution test
 FAIL: gcc.dg/vmx/gcc-bug-i.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  execution test
 FAIL: gcc.dg/vmx/gcc-bug-i.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  execution test
-FAIL: gcc.target/powerpc/altivec-consts.c (internal compiler error)
-FAIL: gcc.target/powerpc/altivec-consts.c (test for excess errors)
 FAIL: gcc.target/powerpc/darwin-longlong.c execution test
 FAIL: gcc.target/powerpc/lhs-3.c (test for excess errors)
 FAIL: gcc.target/powerpc/loop_align.c (test for excess errors)
@@ -546,6 +544,9 @@
 FAIL: gcc.target/powerpc/recip-4.c scan-assembler-times xvmulsp 4
 FAIL: gcc.target/powerpc/recip-4.c scan-assembler-times xvnmsub.sp 2
 
+# PPCle-specific, new 2014-01-28.
+FAIL: gcc.dg/vect/fast-math-vect-complex-3.c execution test
+
 
 # Fortran failures are not important to us so far.
 # *** gfortran:
@@ -737,7 +738,6 @@
 FAIL: gfortran.dg/specifics_1.f90 -O3 -g  execution test
 FAIL: gfortran.dg/specifics_1.f90 -Os  execution test
 FAIL: gfortran.dg/vect/pr45714-b.f -O  (test for excess errors)
-FAIL: gfortran.fortran-torture/execute/forall_4.f90 execution, -O2 -ftree-vectorize -maltivec
 FAIL: gfortran.fortran-torture/execute/in-pack.f90 execution, -O2 -ftree-vectorize -maltivec
 FAIL: gfortran.fortran-torture/execute/intrinsic_aint_anint.f90 execution,  -O0
 FAIL: gfortran.fortran-torture/execute/intrinsic_aint_anint.f90 execution,  -O1
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index f75064e..25cd5cf 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
 	Backport from mainline:
diff --git a/function_reordering_plugin/callgraph.c b/function_reordering_plugin/callgraph.c
index 00cbffc..8f7399e 100644
--- a/function_reordering_plugin/callgraph.c
+++ b/function_reordering_plugin/callgraph.c
@@ -550,6 +550,27 @@
       s->computed_weight = n->computed_weight; 
       s->max_count = n->max_count;
 
+      /* If s is split into a cold section, assign the split weight to the
+         max count of the split section.   Use this also for the weight of the
+         split section.  */
+      if (s->split_section)
+        {
+          s->split_section->max_count = s->split_section->weight = n->split_weight;
+          /* If split_section is comdat, update all the comdat
+    	     candidates for weight.  */
+          s_comdat = s->split_section->comdat_group;
+          while (s_comdat != NULL)
+            {
+	      /* Set the different weights for comdat candidates.  No need to se
+		 computed_weight as it is zero for split sections.  A split cold
+		 section is never called, it is only jumped into from the parent
+		 section.  */
+              s_comdat->weight = s->split_section->weight;
+              s_comdat->max_count = s->split_section->max_count;
+              s_comdat = s_comdat->comdat_group;
+            }
+	}
+
       /* If s is comdat, update all the comdat candidates for weight.  */
       s_comdat = s->comdat_group;
       while (s_comdat != NULL)
@@ -699,26 +720,131 @@
     }
   else
     {
-      /* The function already exists, it must be a COMDAT.  Only one section
-	 in the comdat group will be kept, we don't know which.  Chain all the
-         comdat sections in the same comdat group to be emitted together later.
-         Keep one section as representative (kept) and update its section_type
-         to be equal to the type of the highest priority section in the
-         group.  */
+      /* Handle function splitting here.  With function splitting, the split
+         function sections have the same name and they are in the same module.
+	 Here, we only care about the section that is marked with prefix
+	 like ".text.hot".  The other section is cold.  The plugin should not
+	 be adding this cold section to the section_map.  In get_layout it will
+	 later be picked up when processing the non-callgraph sections and it
+	 will laid out appropriately.  */
       Section_id *kept = (Section_id *)(*slot);
       Section_id *section = make_section_id (function_name, section_name,
                                              section_type, handle, shndx);
+      int is_split_function = 0;
+      Section_id *split_comdat = NULL;
+      /* Check if this is a split function. The modules are the same means this
+	 is not comdat and we assume it is split.  It can be split and comdat
+	 too, in which case we have to search the comdat list of kept.  */
+      if (kept->handle == handle)
+	is_split_function = 1;
+      else if (kept->comdat_group != NULL)
+	{
+	  split_comdat = kept;
+	  do
+	    {
+	      if (split_comdat->comdat_group->handle == handle)
+		break;
+	      split_comdat = split_comdat->comdat_group;
+	    }
+	  while (split_comdat->comdat_group != NULL);
+	}
 
-      /* Two comdats in the same group can have different priorities.  This
-	 ensures that the "kept" comdat section has the priority of the higest
-  	 section in that comdat group.   This is necessary because the plugin
-	 does not know which section will be kept.  */
-      if (section_priority[kept->section_type]
-	  > section_priority[section_type])
-        kept->section_type = section_type;
+      /* It is split and it is comdat.  */
+      if (split_comdat != NULL
+	  && split_comdat->comdat_group != NULL)
+	{
+	  /* The comdat_section that is split.  */
+	  Section_id *comdat_section = split_comdat->comdat_group;
+	  Section_id *cold_section = NULL;
+	  /* If the existing section is cold, the newly detected split must 
+	     be hot.  */
+	  if (is_prefix_of (".text.unlikely", comdat_section->full_name))
+	    {
+	      assert (!is_prefix_of (".text.unlikely", section_name));
+	      cold_section = comdat_section;
+	      /* Replace the comdat_section in the kept section list with the
+		 new section.  */
+	      split_comdat->comdat_group = section;
+	      section->comdat_group = comdat_section->comdat_group;
+	      comdat_section->comdat_group = NULL;
+	    }
+	  else
+	    {
+	      assert (is_prefix_of (".text.unlikely", section_name));
+	      cold_section = section;
+	    }
+	  assert (cold_section != NULL && cold_section->comdat_group == NULL);
+	  cold_section->is_split_cold_section = 1;
+	  /* The cold section must be added to the unlikely chain of comdat
+	     groups.  */
+	  if (kept->split_section == NULL)
+	    {	
+	      /* This happens if no comdat function in this group so far has
+		 been split.  */
+	      kept->split_section = cold_section;
+	    }
+	  else
+	    {
+	      /* Add the cold_section to the unlikely chain of comdats.  */
+	      cold_section->comdat_group = kept->split_section->comdat_group;
+	      kept->split_section->comdat_group = cold_section;
+	    }
+	}
+      /* It is split and it is not comdat.  */
+      else if (is_split_function)
+	{
+	  Section_id *cold_section = NULL;
+	  /* Function splitting means that the "hot" part is really the
+	     relevant section and the other section is unlikely executed and
+	     should not be part of the callgraph.  */
 
-      section->comdat_group = kept->comdat_group;
-      kept->comdat_group = section;
+	  /* Store the new section in the section list.  */
+	  section->next = first_section;
+	  first_section = section;
+	  /* If the existing section is cold, the newly detected split must 
+	     be hot.  */
+          if (is_prefix_of (".text.unlikely", kept->full_name))
+	    {
+	      assert (!is_prefix_of (".text.unlikely", section_name));
+	      /* The kept section was the unlikely section.  Change the section
+		 in section_map to be the new section which is the hot one.  */
+	      *slot = section;
+	      /* Record the split cold section in the hot section.  */
+	      section->split_section = kept;
+	      /* Comdats and function splitting are already handled.  */
+	      assert (kept->comdat_group == NULL);
+	      cold_section = kept;
+	    }
+	  else
+	    {
+	      /* Record the split cold section in the hot section.  */
+	      assert (is_prefix_of (".text.unlikely", section_name));
+	      kept->split_section = section;
+	      cold_section = section;
+	    }
+	  assert (cold_section != NULL && cold_section->comdat_group == NULL);
+	  cold_section->is_split_cold_section = 1;
+	}
+      else
+	{
+          /* The function already exists, it must be a COMDAT.  Only one section
+	     in the comdat group will be kept, we don't know which.  Chain all
+	     the comdat sections in the same comdat group to be emitted
+	     together later.  Keep one section as representative (kept) and
+	     update its section_type to be equal to the type of the highest
+	     priority section in the group.  */
+
+          /* Two comdats in the same group can have different priorities.  This
+	     ensures that the "kept" comdat section has the priority of the
+	     highest section in that comdat group.   This is necessary because
+	     the plugin does not know which section will be kept.  */
+          if (section_priority[kept->section_type]
+	      > section_priority[section_type])
+            kept->section_type = section_type;
+
+          section->comdat_group = kept->comdat_group;
+          kept->comdat_group = section;
+	}
     }
 }
 
@@ -1012,8 +1138,10 @@
 	  if (fp != NULL)
 	    {
 	      fprintf (fp, "%s entry count = %llu computed = %llu "
-		       "max count = %llu\n", s_it->full_name, s_it->weight,
-		       s_it->computed_weight, s_it->max_count);
+		       "max count = %llu split = %d\n", 
+		       s_it->full_name, s_it->weight,
+		       s_it->computed_weight, s_it->max_count,
+		       s_it->is_split_cold_section);
 	    }
 	  s_it = s_it->group;
         }
diff --git a/function_reordering_plugin/callgraph.h b/function_reordering_plugin/callgraph.h
index 3e07ca6..5d6e1e2 100644
--- a/function_reordering_plugin/callgraph.h
+++ b/function_reordering_plugin/callgraph.h
@@ -236,6 +236,8 @@
      is comdat hot and kept, pointer to the kept cold split
      section.  */
   struct section_id_ *split_section;
+  /* If this is the cold part of a split section.  */
+  char is_split_cold_section;
   /* Check if this section has been considered for output.  */
   char processed;
 } Section_id;
@@ -260,6 +262,7 @@
   s->computed_weight = 0;
   s->max_count = 0;
   s->split_section = NULL;
+  s->is_split_cold_section = 0;
 
   return s;
 }
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index aac8d77..69b9b68 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5733 +1,30 @@
-2013-09-24  Cong Hou  <congh@google.com>
+2014-02-11  Cong Hou  <congh@google.com>
 
-	Backport from mainline:
-	2013-09-24  Richard Biener  <rguenther@suse.de>
+	* c-family/c-opts.c (c_common_init_options_struct): 
+	Don't set x_flag_complex_method to 2 for C++.
 
-	PR middle-end/58513
-	* tree.c (reference_alias_ptr_type): Move ...
-	* alias.c (reference_alias_ptr_type): ... here and implement
-	in terms of the new reference_alias_ptr_type_1.
-	(ref_all_alias_ptr_type_p): New helper.
-	(get_deref_alias_set_1): Drop flag_strict_aliasing here,
-	use ref_all_alias_ptr_type_p.
-	(get_deref_alias_set): Add flag_strict_aliasing check here.
-	(reference_alias_ptr_type_1): New function, split out from ...
-	(get_alias_set): ... here.
-	(alias_ptr_types_compatible_p): New function.
-	* alias.h (reference_alias_ptr_type): Declare.
-	(alias_ptr_types_compatible_p): Likewise.
-	* tree.h (reference_alias_ptr_type): Remove.
-	* fold-const.c (operand_equal_p): Use alias_ptr_types_compatible_p
-	to compare MEM_REF alias types.
+2014-02-11  Cong Hou  <congh@google.com>
 
-	2013-09-25  Richard Biener  <rguenther@suse.de>
+	* config/i386/i386.c: Add m_GENERIC to
+	X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL and
+	X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL.
 
-	PR middle-end/58521
-	* tree.c (iterative_hash_expr): Remove MEM_REF special handling.
-
-2013-09-20  Cong Hou  <congh@google.com>
-
-	Backport from mainline:
-	2013-09-13  Cong Hou  <congh@google.com>
-
-	* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug
-	when checking the dot production pattern. The type of rhs operand
-	of multiply is now checked correctly.
-
-2013-09-03  Richard Biener  <rguenther@suse.de>
+2014-02-03  Cong Hou  <congh@google.com>
 
 	Backport from mainline
-	2013-08-29  Richard Biener  <rguenther@suse.de>
+	2014-02-03  Cong Hou  <congh@google.com>
 
-	PR tree-optimization/58246
-	* tree-ssa-dce.c (mark_aliased_reaching_defs_necessary_1): Properly
-	handle the dominance check inside a basic-block.
+	PR tree-optimization/60000
+	* tree-vect-loop.c (vect_transform_loop): Set pattern_def_seq to NULL
+	if the vectorized statement is a store.  A store statement can only
+	appear at the end of pattern statements.
 
-2013-09-03  Richard Biener  <rguenther@suse.de>
+2014-01-13  Cong Hou  <congh@google.com>
 
-	Backport from mainline
-	2013-08-30  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/58228
-	* tree-vect-data-refs.c (vect_analyze_data_ref_access): Do not
-	allow invariant loads in nested loop vectorization.
-
-2013-09-03  Richard Biener  <rguenther@suse.de>
-
-	Backport from mainline
-	2013-08-30  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/58010
-	* tree-vect-loop.c (vect_create_epilog_for_reduction): Remove
-	assert that we have a loop-closed PHI.
-
-2013-09-01  Uros Bizjak  <ubizjak@gmail.com>
-
-	Backport from mainline
-	2013-08-31  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/alpha/alpha.c (alpha_emit_conditional_move): Update
-	"cmp" RTX before signed_comparison_operator check to account
-	for "code" changes.
-
-2013-09-01  John David Anglin  <danglin@gcc.gnu.org>
-
-	* config/pa/pa.md: Allow "const 0" operand 1 in "scc" insns.
-
-2013-08-30  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/58277
-	* tree-ssa-strlen.c (strlen_enter_block): If do_invalidate gave up
-	after seeing too many stmts with vdef in between dombb and current
-	bb, invalidate everything.
-
-2013-08-29  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	Backport from mainline
-	2013-08-05  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	PR other/12081
-	* recog.h (rtx (*insn_gen_fn) (rtx, ...)): Replace typedef with	new
-	class insn_gen_fn.
-	* expr.c (move_by_pieces_1, store_by_pieces_2): Replace argument
-	rtx (*) (rtx, ...) with insn_gen_fn.
-	* genoutput.c (output_insn_data): Cast gen_? function pointers to
-	insn_gen_fn::stored_funcptr.  Add initializer braces.
-
-	Backport from mainline
-	2013-08-07  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	PR other/12081
-	* config/rs6000/rs6000.c (gen_2arg_fn_t): Remove typedef.
-	(rs6000_emit_swdiv_high_precision, rs6000_emit_swdiv_low_precision,
-	rs6000_emit_swrsqrt): Don't cast result of GEN_FCN to gen_2arg_fn_t.
-
-2013-08-29  Jakub Jelinek  <jakub@redhat.com>
-
-	Backported from mainline
-	2013-05-27  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/57381
-	PR tree-optimization/57417
-	* tree-ssa-sccvn.c (vn_reference_fold_indirect): Fix test
-	for unchanged base.
-	(set_ssa_val_to): Compare addresses using
-	get_addr_base_and_unit_offset.
-
-	PR tree-optimization/57396
-	* tree-affine.c (double_int_constant_multiple_p): Properly
-	return false for val == 0 and div != 0.
-
-	PR tree-optimization/57343
-	* tree-ssa-loop-niter.c (number_of_iterations_ne_max): Do not
-	use multiple_of_p if not TYPE_OVERFLOW_UNDEFINED.
-	(number_of_iterations_cond): Do not build the folded tree.
-
-2013-08-28  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/58257
-	* omp-low.c (copy_var_decl): Copy over TREE_NO_WARNING flag.
-
-2013-08-28  Richard Biener  <rguenther@suse.de>
-
-	Backport from mainline
-	2013-06-24  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/56977
-	* passes.c (init_optimization_passes): Move pass_fold_builtins
-	and pass_dce earlier with -Og.
-
-2013-08-28  Uros Bizjak  <ubizjak@gmail.com>
-
-	Backport from mainline
-	2013-08-27  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* config/i386/driver-i386.c (host_detect_local_cpu): Update
-	Haswell processor detection.
-
-	Backport from mainline
-	2013-08-27  Christian Widmer  <shadow@umbrox.de>
-
-	PR target/57927
-	* config/i386/driver-i386.c (host_detect_local_cpu): Add detection
-	of Ivy Bridge and Haswell processors.  Assume core-avx2 for unknown
-	AVX2 capable processors.
-
-2013-08-23  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/58218
-	* config/i386/x86-64.h (TARGET_SECTION_TYPE_FLAGS): Define.
-	* config/i386/i386.c (x86_64_elf_section_type_flags): New function.
-
-	PR tree-optimization/58209
-	* tree-tailcall.c (find_tail_calls): Give up for pointer result types
-	if m or a is non-NULL.
-
-2013-08-21  Richard Earnshaw  <rearnsha@arm.com>
-
-	PR target/56979
-	* arm.c (aapcs_vfp_allocate): Decompose the argument if the
-	suggested mode for the assignment isn't compatible with the
-	registers required.
-
-2013-08-20  Alan Modra  <amodra@gmail.com>
-
-	PR target/57865
-	* config/rs6000/rs6000.c (rs6000_emit_prologue): Correct ool_adjust.
-	(rs6000_emit_epilogue): Likewise.
-
-2013-08-19  Peter Bergner  <bergner@vnet.ibm.com>
-	    Jakub Jelinek  <jakub@redhat.com>
-
-	Backport from mainline
-	* config/rs6000/dfp.md (*negtd2_fpr): Handle non-overlapping
-	destination and source operands.
-
-2013-08-18  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/58006
-	* tree-parloops.c (take_address_of): Don't ICE if get_name
-	returns NULL.
-	(eliminate_local_variables_stmt): Remove clobber stmts.
-
-2013-08-16  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/58164
-	* gimple.c (walk_stmt_load_store_addr_ops): For visit_addr
-	walk gimple_goto_dest of GIMPLE_GOTO.
-
-	PR tree-optimization/58165
-	* tree-call-cdce.c (shrink_wrap_one_built_in_call): If
-	bi_call must be the last stmt in a bb, don't split_block, instead
-	use fallthru edge from it and give up if there is none.
-	Release conds vector when returning early.
-
-2013-08-15  David Given  <dg@cowlark.com>
-
-	Backport from mainline
-	2013-04-26  Vladimir Makarov  <vmakarov@redhat.com>
-
-	* lra-constraints.c (process_alt_operands): Use #if HAVE_ATTR_enable
-	instead of #ifdef.
-
-2013-08-14  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/58145
-	* tree-sra.c (build_ref_for_offset): If prev_base has
-	TREE_THIS_VOLATILE or TREE_SIDE_EFFECTS, propagate it to MEM_REF.
-
-2013-08-14  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	* config/s390/htmxlintrin.h: Add file missing from last commit.
-	* config/s390/htmintrin.h: Likewise.
-	* config/s390/s390intrin.h: Likewise.
-
-2013-08-14  Uros Bizjak  <ubizjak@gmail.com>
-
-	Backport from mainline
-	2013-08-13  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/sse.md (*sse2_maskmovdqu): Emit addr32 prefix
-	when Pmode != word_mode.  Add length_address attribute.
-	(sse3_monitor_<mode>): Merge from sse3_monitor and
-	sse3_monitor64_<mode> insn patterns.  Emit addr32 prefix when
-	Pmode != word_mode.  Update insn length attribute.
-	* config/i386/i386.c (ix86_option_override_internal): Update
-	ix86_gen_monitor selection for merged sse3_monitor insn.
-
-2013-08-14  Jakub Jelinek  <jakub@redhat.com>
-	    Alexandre Oliva  <aoliva@redhat.com>
-
-	PR target/58067
-	* config/i386/i386.c (ix86_delegitimize_address): For CM_MEDIUM_PIC
-	and CM_LARGE_PIC ix86_cmodel fall thru into the -m32 code, handle
-	there also UNSPEC_PLTOFF.
-
-2013-08-13  Jakub Jelinek  <jakub@redhat.com>
-
-	PR sanitizer/56417
-	* asan.c (instrument_strlen_call): Fix typo in comment.
-	Use char * type even for the lhs of POINTER_PLUS_EXPR.
-
-2013-08-13  Vladimir Makarov  <vmakarov@redhat.com>
-
-	Backport from mainline
-	2013-06-06  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/57459
-	* lra-constraints.c (update_ebb_live_info): Fix typo for operand
-	type when setting live regs.
-
-2013-08-13  Marek Polacek  <polacek@redhat.com>
-	    Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/57980
-	* tree-tailcall.c (process_assignment): Return false
-	when not dealing with integers or floats.
-
-2013-08-12  Andrew Haley  <aph@redhat.com>
-
-	Backport from mainline:
-	* 2013-07-11  Andreas Schwab  <schwab@suse.de>
-
-	* config/aarch64/aarch64-linux.h (CPP_SPEC): Define.
-
-2013-08-13  Uros Bizjak  <ubizjak@gmail.com>
-
-	Backport from mainline
-	2013-08-12  Perez Read  <netfirewall@gmail.com>
-
-	PR target/58132
-	* config/i386/i386.md (*movabs<mode>_1):  Add <ptrsize> PTR before
-	operand 0 for intel asm alternative.
-	(*movabs<mode>_2): Ditto for operand 1.
-
-2013-08-09  Zhenqiang Chen  <zhenqiang.chen@linaro.org>
-
-	Backport from mainline:
-	2013-08-09  Zhenqiang Chen  <zhenqiang.chen@linaro.org>
-
-	* config/arm/neon.md (vcond): Fix floating-point vector
-	comparisons against 0.
-
-2013-08-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
-
-	Backport from mainline:
-	2013-08-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
-
-	* config/arm/neon.md (movmisalign<mode>): Disable when we
-	don't allow unaligned accesses.
-	(*movmisalign<mode>_neon_store): Likewise.
-	(*movmisalign<mode>_neon_load): Likewise.
-	(*movmisalign<mode>_neon_store): Likewise.
-	(*movmisalign<mode>_neon_load): Likewise.
-
-2013-08-06  Martin Jambor  <mjambor@suse.cz>
-
-	PR middle-end/58041
-	* gimple-ssa-strength-reduction.c (replace_ref): Make sure built
-	MEM_REF has proper alignment information.
-
-2013-08-05  Richard Earnshaw  <rearnsha@arm.com>
-
-	PR rtl-optimization/57708
-	* recog.c (peep2_find_free_register): Validate all regs in a
-	multi-reg mode.
-
-2013-08-02  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* config/sparc/sparc.c (sparc_emit_membar_for_model) <SMM_TSO>: Add
-	the implied StoreLoad barrier for atomic operations if before.
-
-2013-08-02  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	Backports from mainline:
-	2013-06-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	* config/s390/s390.c: Rename UNSPEC_CCU_TO_INT to
-	UNSPEC_STRCMPCC_TO_INT and UNSPEC_CCZ_TO_INT to UNSPEC_CC_TO_INT.
-	(struct machine_function): Add tbegin_p.
-	(s390_canonicalize_comparison): Fold CC mode compares to
-	conditional jump if possible.
-	(s390_emit_jump): Return the emitted jump.
-	(s390_branch_condition_mask, s390_branch_condition_mnemonic):
-	Handle CCRAWmode compares.
-	(s390_option_override): Default to -mhtm if available.
-	(s390_reg_clobbered_rtx): Handle floating point regs as well.
-	(s390_regs_ever_clobbered): Use s390_regs_ever_clobbered also for
-	FPRs instead of df_regs_ever_live_p.
-	(s390_optimize_nonescaping_tx): New function.
-	(s390_init_frame_layout): Extend clobbered_regs array to cover
-	FPRs as well.
-	(s390_emit_prologue): Call s390_optimize_nonescaping_tx.
-	(s390_expand_tbegin): New function.
-	(enum s390_builtin): New enum definition.
-	(code_for_builtin): New array definition.
-	(s390_init_builtins): New function.
-	(s390_expand_builtin): New function.
-	(TARGET_INIT_BUILTINS): Define.
-	(TARGET_EXPAND_BUILTIN): Define.
-	* common/config/s390/s390-common.c (processor_flags_table): Add PF_TX.
-	* config/s390/predicates.md (s390_comparison): Handle CCRAWmode.
-	(s390_alc_comparison): Likewise.
-	* config/s390/s390-modes.def: Add CCRAWmode.
-	* config/s390/s390.h (processor_flags): Add PF_TX.
-	(TARGET_CPU_HTM): Define macro.
-	(TARGET_HTM): Define macro.
-	(TARGET_CPU_CPP_BUILTINS): Define __HTM__ for htm.
-	* config/s390/s390.md: Rename UNSPEC_CCU_TO_INT to
-	UNSPEC_STRCMPCC_TO_INT and UNSPEC_CCZ_TO_INT to UNSPEC_CC_TO_INT.
-	(UNSPECV_TBEGIN, UNSPECV_TBEGINC, UNSPECV_TEND, UNSPECV_TABORT)
-	(UNSPECV_ETND, UNSPECV_NTSTG, UNSPECV_PPA): New unspecv enum
-	values.
-	(TBEGIN_MASK, TBEGINC_MASK): New constants.
-	("*cc_to_int"): Move up.
-	("*mov<mode>cc", "*cjump_64", "*cjump_31"): Accept integer
-	constants other than 0.
-	("*ccraw_to_int"): New insn and splitter definition.
-	("tbegin", "tbegin_nofloat", "tbegin_retry")
-	("tbegin_retry_nofloat", "tbeginc", "tend", "tabort")
-	("tx_assist"): New expander.
-	("tbegin_1", "tbegin_nofloat_1", "*tbeginc_1", "*tend_1")
-	("*tabort_1", "etnd", "ntstg", "*ppa"): New insn definition.
-	* config/s390/s390.opt: Add -mhtm option.
-	* config/s390/s390-protos.h (s390_emit_jump): Add return type.
-	* config/s390/htmxlintrin.h: New file.
-	* config/s390/htmintrin.h: New file.
-	* config/s390/s390intrin.h: New file.
-	* doc/extend.texi: Document htm builtins.
-	* config.gcc: Add the new header files to extra_headers.
-
-	2013-07-17  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	* config/s390/s390.c: (s390_expand_builtin): Allow -mhtm to be
-	enabled without -march=zEC12.
-	* config/s390/s390.h (TARGET_HTM): Do not require EC12 machine
-	flags to be set.
-
-2013-08-01  Ganesh Gopalasubramanian  <Ganesh.Gopalasubramanian@amd.com>
-
-	Backport from mainline
-	2013-05-13  Ganesh Gopalasubramanian
-		    <Ganesh.Gopalasubramanian@amd.com>
-
-	* config/i386/i386.c (processor_target_table): Modified default
-	alignment values for AMD BD and BT architectures.
-
-2013-07-31  Sriraman Tallam  <tmsriram@google.com>
-
-	* config/i386/i386.c (dispatch_function_versions): Fix array
-	indexing of function_version_info to match actual_versions.
-
-2013-07-31  Sebastian Huber  <sebastian.huber@embedded-brains.de>
-
-	* config.gcc (*-*-rtems*): Use __cxa_atexit by default.
-	* config/rs6000/rtems.h (TARGET_LIBGCC_SDATA_SECTION): Define.
-
-2013-07-31  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	Backport from mainline
-        2013-03-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	* config/s390/s390.h (TARGET_FLT_EVAL_METHOD): Define.
-
-	2013-07-23  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	* config/s390/linux-unwind.h: Use the proper dwarf to hard reg
-	mapping for FPRs when creating the fallback framestate.
-
-	2013-07-29  Dominik Vogt  <vogt@linux.vnet.ibm.com>
-
-	* config/s390/s390.md ("movcc"): Swap load and store instructions.
-
-2013-07-25  Terry Guo  <terry.guo@arm.com>
-
-	Backport from mainline:
-	2013-07-25  Terry Guo  <terry.guo@arm.com>
-
-	* config/arm/arm.c (thumb1_size_rtx_costs): Assign proper cost for
-	shift_add/shift_sub0/shift_sub1 RTXs.
-
-2013-07-22  Iain Sandoe  <iain@codesourcery.com>
-
-	Backport from mainline:
-	2013-07-22  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/i386.md (nonlocal_goto_receiver): Delete insn if
-	it is not needed after split.
-
-	2013-07-20  Iain Sandoe  <iain@codesourcery.com>
-
-	PR target/51784
-	* config/i386/i386.c (output_set_got) [TARGET_MACHO]: Adjust to emit a
-	second label for nonlocal goto receivers. Don't output pic base labels
-	unless we're producing PIC; mark that action unreachable().
-	(ix86_save_reg): If the function contains a nonlocal label, save the
-	PIC base reg.
-	* config/darwin-protos.h (machopic_should_output_picbase_label): New.
-	* gcc/config/darwin.c (emitted_pic_label_num): New GTY.
-	(update_pic_label_number_if_needed): New.
-	(machopic_output_function_base_name): Adjust for nonlocal receiver
-	case.
-	(machopic_should_output_picbase_label): New.
-	* config/i386/i386.md (enum unspecv): UNSPECV_NLGR: New.
-	(nonlocal_goto_receiver): New insn and split.
-
-2013-07-19 Wei Mi  <wmi@google.com>
-
-	Backport from mainline:
-	2013-07-18  Vladimir Makarov  <vmakarov@redhat.com>
-		    Wei Mi  <wmi@google.com>
-
-	PR rtl-optimization/57878
-	* lra-assigns.c (assign_by_spills): Move non_reload_pseudos to the
-	top. Promote lra_assert to gcc_assert.
-	(reload_pseudo_compare_func): Check regs first for reload pseudos.
-
-2013-07-11  Georg-Johann Lay  <avr@gjlay.de>
-
-	Backport from 2013-07-19 trunk r201051.
-
-	PR target/57516
-	* config/avr/avr-fixed.md (round<mode>3_const): Turn expander to insn.
-	* config/avr/avr.md (adjust_len): Add `round'.
-	* config/avr/avr-protos.h (avr_out_round): New prototype.
-	(avr_out_plus): Add `out_label' argument.
-	* config/avr/avr.c (avr_out_plus_1): Add `out_label' argument.
-	(avr_out_plus): Pass down `out_label' to avr_out_plus_1.
-	Handle the case where `insn' is just a pattern.
-	(avr_out_bitop): Handle the case where `insn' is just a pattern.
-	(avr_out_round): New function.
-	(avr_adjust_insn_length): Handle ADJUST_LEN_ROUND.
-
-2013-07-19  Kirill Yukhin  <kirill.yukhin@intel.com>
-
-	* config/i386/bmiintrin.h (_bextr_u32): New.
-	(_bextr_u64): Ditto.
-	(_blsi_u32): New.
-	(_blsi_u64): Ditto.
-	(_blsr_u32): Ditto.
-	(_blsr_u64): Ditto.
-	(_blsmsk_u32): Ditto.
-	(_blsmsk_u64): Ditto.
-	(_tzcnt_u32): Ditto.
-	(_tzcnt_u64): Ditto.
-
-2013-07-17  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	Backport From mainline:
-	2013-07-03  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* config/aarch64/aarch64-builtins.c
-	(aarch64_simd_expand_builtin): Handle AARCH64_SIMD_STORE1.
-	* config/aarch64/aarch64-simd-builtins.def (ld1): New.
-	(st1): Likewise.
-	* config/aarch64/aarch64-simd.md
-	(aarch64_ld1<VALL:mode>): New.
-	(aarch64_st1<VALL:mode>): Likewise.
-	* config/aarch64/arm_neon.h
-	(vld1<q>_<fpsu><8, 16, 32, 64>): Convert to RTL builtins.
-
-2013-07-11  Georg-Johann Lay  <avr@gjlay.de>
-
-	Backport from 2013-07-11 trunk r200901.
-
-	PR target/57631
-	* config/avr/avr.c (avr_set_current_function): Sanity-check signal
-	name seen by assembler/linker if available.
-
-2013-07-10  Georg-Johann Lay  <avr@gjlay.de>
-
-	Backport from 2013-07-10 trunk r200872.
-
-	PR target/57844
-	* config/avr/avr.c (avr_prologue_setup_frame): Trunk -size to mode
-	of my_fp.
-
-2013-07-10  Georg-Johann Lay  <avr@gjlay.de>
-
-	Backport from 2013-07-10 trunk r200870.
-
-	PR target/57506
-	* config/avr/avr-mcus.def (atmega16hva, atmega16hva2, atmega16hvb)
-	(atmega16m1, atmega16u4, atmega32a, atmega32c1, atmega32hvb)
-	(atmega32m1, atmega32u4, atmega32u6, atmega64c1, atmega64m1):
-	Remove duplicate devices.
-	* config/avr/gen-avr-mmcu-texi.c (print_mcus): Fail on duplicate MCUs.
-	* config/avr/t-multilib: Regenerate.
-	* config/avr/avr-tables.opt: Regenerate.
-	* doc/avr-mmcu.texi: Regenerate.
-
-2013-07-10  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR target/56987
-	* config/avr/avr.opt (Waddr-space-convert): Fix typo.
-
-2013-07-09  Joseph Myers  <joseph@codesourcery.com>
-
-	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Only
-	adjust register size for TDmode and TFmode for VSX registers.
-
-2013-07-08  Kai Tietz  <ktietz@redhat.com>
-
-	Backport from mainline
-	PR target/56892
-	* config/i386/i386.c (TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P): Define as
-	hook_bool_const_tree_true.
-
-2013-07-08  Uros Bizjak  <ubizjak@gmail.com>
-
-	Backport from mainline
-	2013-07-07  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/driver-i386.c (host_detect_local_cpu): Do not check
-	signature_TM2_ebx, it interferes with signature_INTEL_ebx.
-
-	Backport from mainline
-	2013-07-06  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/sse.md (sse_movlhps): Change alternative 3
-	of operand 2 to "m".
-
-2013-07-08  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* Makefile.in (tree-ssa-reassoc.o): Add dependency on $(PARAMS_H).
-
-2013-07-08  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/57829
-	* simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Ensure that
-	mask bits outside of mode are just sign-extension from mode to HWI.
-
-2013-07-03  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/57777
-	* config/i386/predicates.md (vsib_address_operand): Disallow
-	SYMBOL_REF or LABEL_REF in parts.disp if TARGET_64BIT && flag_pic.
-
-2013-06-30  Terry Guo  <terry.guo@arm.com>
-
-	Backport from mainline
-	2013-03-27  Bin Cheng  <bin.cheng@arm.com>
-
-	PR target/56102
-	* config/arm/arm.c (thumb1_rtx_costs, thumb1_size_rtx_costs): Fix
-	rtx costs for SET/ASHIFT/ASHIFTRT/LSHIFTRT/ROTATERT patterns with
-	mult-word mode.
-
-2013-06-28  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/57736
-	* config/i386/i386.c (ix86_expand_builtin): If target == NULL
-	and mode is VOIDmode, don't create a VOIDmode pseudo to copy result
-	into.
-
-2013-06-27  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/57623
-	* config/i386/i386.md (bmi_bextr_<mode>): Swap predicates and
-	constraints of operand 1 and 2.
-
-	PR target/57623
-	* config/i386/i386.md (bmi2_bzhi_<mode>3): Swap AND arguments
-	to match RTL canonicalization.  Swap predicates and
-	constraints of operand 1 and 2.
-
-	* tree-vect-stmts.c (vectorizable_store): Move ptr_incr var
-	decl before the loop, initialize to NULL.
-	(vectorizable_load): Initialize ptr_incr to NULL.
-
-2013-06-24  Martin Jambor  <mjambor@suse.cz>
-
-	PR tree-optimization/57358
-	* ipa-prop.c (parm_ref_data_preserved_p): Always return true when
-	not optimizing.
-
-2013-06-24  Alan Modra  <amodra@gmail.com>
-
-	* config/rs6000/rs6000.c (vspltis_constant): Correct for little-endian.
-	(gen_easy_altivec_constant): Likewise.
-	* config/rs6000/predicates.md (easy_vector_constant_add_self,
-	easy_vector_constant_msb): Likewise.
-
-2013-06-21  Uros Bizjak  <ubizjak@gmail.com>
-
-	Backport from mainline
-	2013-06-20  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/57655
-	* config/i386/i386.c (construct_container): Report error if
-	long double is used with disabled x87 float returns.
-
-2013-06-20  Wei Mi  <wmi@google.com>
-
-	Backport from mainline
-	2013-06-19  Wei Mi  <wmi@google.com>
-
-	PR rtl-optimization/57518
-	* ira.c (set_paradoxical_subreg): Set pdx_subregs[regno]
-	if regno is used in paradoxical subreg.
-	(update_equiv_regs): Check pdx_subregs[regno] before
-	set a reg to be equivalent with a mem.
-
-
-2013-06-20  David Edelsohn  <dje.gcc@gmail.com>
-
-	Backport from mainline
-	2013-06-19  David Edelsohn  <dje.gcc@gmail.com>
-
-	PR driver/57652
-	* collect2.c (collect_atexit): New.
-	(collect_exit): Delete.
-	(main): Register collect_atexit with atexit.
-	(collect_wait): Change collect_exit to exit.
-	(do_wait): Same.
-	* collect2.h (collect_exit): Delete.
-	* tlink.c (do_tlink): Rename exit to ret. Change collect_exit to exit.
-
-2013-06-19  Matthias Klose  <doko@ubuntu.com>
-
-	PR driver/57651
-	* file-find.h (find_a_file): Add a mode parameter.
-	* file-find.c (find_a_file): Likewise.
-	* gcc-ar.c (main): Call find_a_file with R_OK for the plugin,
-	with X_OK for the executables.
-	* collect2.c (main): Call find_a_file with X_OK.
-
-2013-06-19  Igor Zamyatin  <igor.zamyatin@intel.com>
-
-	* doc/invoke.texi (core-avx2): Document.
-	(atom): Updated with MOVBE.
-
-2013-06-19  Jakub Jelinek  <jakub@redhat.com>
-
-	PR driver/57651
-	* gcc-ar.c (main): If not CROSS_DIRECTORY_STRUCTURE, look for
-	PERSONALITY in $PATH derived prefixes.
-
-2013-06-19  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/56544
-	* doc/cpp.texi [Standard Predefined Macros, __cplusplus]: Document
-	that now in C++ the value is correct per the C++ standards.
-
-2013-06-19  Alan Modra  <amodra@gmail.com>
-
-	Apply mainline patches
-	2013-06-13  Alan Modra  <amodra@gmail.com>
-	* config/rs6000/rs6000.h (LONG_DOUBLE_LARGE_FIRST): Define.
-	* config/rs6000/rs6000.md (signbittf2): New insn.
-	(extenddftf2_internal): Use LONG_DOUBLE_LARGE_FIRST.
-	(abstf2_internal, cmptf_internal2): Likewise.
-	* config/rs6000/spe.md (spe_abstf2_cmp, spe_abstf2_tst): Likewise.
-
-	2013-06-11  Anton Blanchard  <anton@samba.org>
-	* config/rs6000/rs6000.c (rs6000_adjust_atomic_subword): Calculate
-	correct shift value in little-endian mode.
-
-	2013-06-07  Alan Modra  <amodra@gmail.com>
-	* config/rs6000/rs6000.c (setup_incoming_varargs): Round up
-	va_list_gpr_size.
-
-	2013-06-04  Alan Modra  <amodra@gmail.com>
-	* config/rs6000/rs6000.c (output_toc): Correct little-endian float
-	constant output.
-
-	2013-05-10  Alan Modra  <amodra@gmail.com>
-	* configure.ac (HAVE_AS_TLS): Swap powerpc64 and powerpc cases.
-	(HAVE_LD_LARGE_TOC): Don't mention AIX in help text.
-	* configure: Regenerate.
-
-	2013-05-09  Alan Modra  <amodra@gmail.com>
-	* configure.ac (HAVE_AS_TLS): Enable tests for powerpcle and
-	powerpc64le.
-	* configure: Regenerate.
-
-	2013-05-07  Anton Blanchard  <anton@samba.org>
-	* configure.ac (HAVE_LD_LARGE_TOC): Use right linker emulation
-	for powerpc64 little endian.
-	* configure: Regenerate.
-
-	2013-05-06  Alan Modra  <amodra@gmail.com>
-	* config/rs6000/linux.h (DEFAULT_ASM_ENDIAN): Define.
-	(LINK_OS_LINUX_EMUL): Use ENDIAN_SELECT.
-	* config/rs6000/linux64.h (DEFAULT_ASM_ENDIAN): Define.
-	* config/rs6000/sysv4le.h (DEFAULT_ASM_ENDIAN): Define.
-	(LINK_TARGET_SPEC): Use ENDIAN_SELECT.
-	* config/rs6000/sysv4.h (DEFAULT_ASM_ENDIAN): Define as -mbig.
-
-	2013-05-06  Alan Modra  <amodra@gmail.com>
-	* config/rs6000/sysv4.h (ENDIAN_SELECT): Define, extracted from
-	(ASM_SPEC): ..here.  Emit DEFAULT_ASM_ENDIAN too.
-	(DEFAULT_ASM_ENDIAN): Define.
-	(CC1_SPEC, LINK_TARGET_SPEC): Use ENDIAN_SELECT.
-	* config/rs6000/linux64.h (ASM_SPEC32): Remove endian options.
-	Update -K PIC clause from sysv4.h.
-	(ASM_SPEC_COMMON): Use ENDIAN_SELECT.
-	(LINK_OS_LINUX_EMUL32, LINK_OS_LINUX_EMUL64): Likewise.
-
-	2013-05-06  Alan Modra  <amodra@gmail.com>
-	* config/rs6000/rs6000.md (bswapdi 2nd splitter): Don't swap words
-	twice for little-endian.
-	(ashrdi3_no_power, ashrdi3): Support little-endian.
-
-	2013-04-25  Alan Modra  <amodra@gmail.com>
-	* config.gcc: Support little-endian powerpc-linux targets.
-	* config/rs6000/linux.h (LINK_OS_LINUX_EMUL): Define.
-	(LINK_OS_LINUX_SPEC): Define.
-	* config/rs6000/linuxspe.h (TARGET_DEFAULT):
-	Preserve MASK_LITTLE_ENDIAN.
-	* config/rs6000/default64.h (TARGET_DEFAULT): Likewise.
-	* config/rs6000/linuxaltivec.h (TARGET_DEFAULT): Likewise.
-	* config/rs6000/linux64.h (OPTION_LITTLE_ENDIAN): Don't zero.
-	(LINK_OS_LINUX_EMUL32, LINK_OS_LINUX_EMUL64): Define.
-	(LINK_OS_LINUX_SPEC32, LINK_OS_LINUX_SPEC64): Use above.
-	* config/rs6000/rs6000.c (output_toc): Don't use .tc for TARGET_ELF.
-	Correct fp word order for little-endian.  Don't shift toc entries
-	smaller than a word for little-endian.
-	* config/rs6000/rs6000.md (bswaphi2, bswapsi2 split): Comment.
-	(bswapdi2 splits): Correct low-part subreg for little-endian.
-	Remove wrong BYTES_BIG_ENDIAN tests, and rename vars to remove
-	low/high where such is correct only for be.
-	* config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Allow
-	little-endian for -mcall-aixdesc.
-
-2013-06-12  Martin Jambor  <mjambor@suse.cz>
-
-	* ipa-cp.c (ipa_get_indirect_edge_target_1): Check that param_index is
-	within bounds at the beginning of the function.
-
-2013-06-12  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/57537
-	* tree-vect-patterns.c (vect_recog_widen_mult_pattern): If
-	vect_handle_widen_op_by_const, convert oprnd1 to half_type1.
-
-2013-06-10  Uros Bizjak  <ubizjak@gmail.com>
-
-	Backport from mainline
-	2013-06-10  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/alpha/alpha.c (alpha_emit_xfloating_compare): Also use
-	cmp_code to construct REG_EQUAL note.
-
-2013-06-10  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	Backport from mainline
-	2013-05-20  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	PR target/56547
-	* config/sh/sh.md (fmasf4): Remove empty constraints strings.
-	(*fmasf4, *fmasf4_media): New insns.
-
-2013-06-09  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/57568
-	* config/i386/i386.md (TARGET_READ_MODIFY_WRITE peepholes): Ensure
-	that operands[2] doesn't overlap with operands[0].
-
-2013-06-07  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
-
-	* recog.c (offsettable_address_addr_space_p): Fix calculation of
-	address mode.  Move pointer mode initialization to the same place.
-
-2013-06-07  Sofiane Naci  <sofiane.naci@arm.com>
-
-	Backport from mainline
-	* config/aarch64/aarch64.md (*movdi_aarch64): Define "simd" attribute.
-
-2013-06-07  Uros Bizjak  <ubizjak@gmail.com>
-
-	Backport from mainline
-	2013-06-05  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/alpha/alpha.c (alpha_emit_conditional_move): Swap all
-	GE, GT, GEU and GTU compares, modulo DImode compares with zero.
-
-	Backport from mainline
-	2013-05-23  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/57379
-	* config/alpha/alpha.md (unspec): Add UNSPEC_XFLT_COMPARE.
-	* config/alpha/alpha.c (alpha_emit_xfloating_compare): Construct
-	REG_EQUAL note as UNSPEC_XFLT_COMPARE unspec.
-
-2013-06-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
-
-	Backport from mainline.
-	2013-05-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
-
-	* config/rs6000/rs6000.h (MALLOC_ABI_ALIGNMENT): New #define.
-
-2013-06-03  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	Backport from mainline.
-	2013-04-25  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* config/aarch64/aarch64.c (aarch64_print_operand): Fix asm_fprintf
-	format specifier in 'X' case.
-
-2013-05-31  Richard Henderson  <rth@redhat.com>
-
-	PR target/56742
-	* config/i386/i386.c (ix86_seh_fixup_eh_fallthru): New.
-	(ix86_reorg): Call it.
-
-2012-05-31  Jakub Jelinek  <jakub@redhat.com>
-
-	* BASE-VER: Set to 4.8.2.
-	* DEV-PHASE: Set to prerelease.
-
-2013-05-31  Release Manager
-
-	* GCC 4.8.1 released.
-
-2013-05-24  Greta Yorsh  <Greta.Yorsh@arm.com>
-
-	Backport from mainline
-	2013-05-02  Greta Yorsh  <Greta.Yorsh@arm.com>
-
-	PR target/56732
-	* config/arm/arm.c (arm_expand_epilogue): Check really_return before
-	generating simple_return for naked functions.
-
-2013-05-24  Alexander Ivchenko  <alexander.ivchenko@intel.com>
-
-	PR tree-ssa/57385
-	* tree-ssa-sccvn.c (fully_constant_vn_reference_p): Check
-	that index is not negative.
-
-2013-05-23  Martin Jambor  <mjambor@suse.cz>
-
-	PR middle-end/57347
-	* tree.h (contains_bitfld_component_ref_p): Declare.
-	* tree-sra.c (contains_bitfld_comp_ref_p): Move...
-	* tree.c (contains_bitfld_component_ref_p): ...here.  Adjust its caller.
-	* ipa-prop.c (determine_known_aggregate_parts): Check that LHS does
-	not access a bit-field.  Assert all final offsets are byte-aligned.
-
-2013-05-23  Richard Biener  <rguenther@suse.de>
-
-	PR rtl-optimization/57341
-	* ira.c (validate_equiv_mem_from_store): Use anti_dependence
-	instead of true_dependence.
-
-2013-05-23  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/57344
-	* expmed.c (store_split_bit_field): If op0 is a REG or
-	SUBREG of a REG, don't lower unit.  Handle unit not being
-	always BITS_PER_WORD.
-
-2013-05-22  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/57356
-	* config/i386/i386.md (*movti_internal_rex64): Emit movaps/movups
-	for non-sse2 targets.
-	(*movti_internal): Simplify mode attribute calculation.
-
-2013-05-22  Richard Biener  <rguenther@suse.de>
-
-	Backport from mainline
-	2013-05-21  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/57318
-	* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Do not
-	estimate stmts with side-effects as likely eliminated.
-
-	2013-05-21  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/57330
-	* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Properly
-	preserve the call stmts fntype.
-
-	2013-05-21  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/57303
-	* tree-ssa-sink.c (statement_sink_location): Properly handle
-	self-assignments.
-
-2013-05-21  Magnus Granberg  <baldrick@free.fr>
-
-	PR plugins/56754
-	* Makefile.in (PLUGIN_HEADERS): Add $(TARGET_H).
-
-2013-05-21  Eric Botcazou  <ebotcazou@adacore.com>
-
-	Backport from mainline
-	2013-05-14  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* config/sparc/sp64-elf.h (CPP_SUBTARGET_SPEC): Delete.
-	* config/sparc/openbsd64.h (CPP_SUBTARGET_SPEC): Likewise.
-
-2013-05-17  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/57281
-	PR rtl-optimization/57300
-	* config/i386/i386.md (extendsidi2_1 dead reg splitter): Remove.
-	(extendsidi2_1 peephole2s): Add instead 2 new peephole2s, that undo
-	what the other splitter did if the registers are dead.
-
-2013-05-17  Uros Bizjak  <ubizjak@gmail.com>
-
-	Backport from mainline
-	2013-05-16  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/driver-i386.c (host_detect_local_cpu): Determine
-	cache parameters using detect_caches_amd also for CYRIX,
-	NSC and TM2 signatures.
-
-	2013-05-16  Uros Bizjak  <ubizjak@gmail.com>
-		    Dzianis Kahanovich  <mahatma@eu.by>
-
-	PR target/45359
-	PR target/46396
-	* config/i386/driver-i386.c (host_detect_local_cpu): Detect
-	VIA/Centaur processors and determine their cache parameters
-	using detect_caches_amd.
-
-	2013-05-15  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/i386.c (ix86_option_override_internal): Update
-	processor_alias_table for missing PTA_PRFCHW and PTA_FXSR flags.  Add
-	PTA_POPCNT to corei7 entry. Do not enable SSE prefetch on
-	non-SSE 3dNow! targets.  Enable TARGET_PRFCHW for TARGET_3DNOW targets.
-	* config/i386/i386.md (prefetch): Enable for TARGET_PRFCHW instead
-	of TARGET_3DNOW.
-	(*prefetch_3dnow): Enable for TARGET_PRFCHW only.
-
-2013-05-17  Jakub Jelinek  <jakub@redhat.com>
-
-	* gcc.c (SANITIZER_SPEC): Reject -fsanitize=address -fsanitize=thread
-	linking.
-
-	PR tree-optimization/57051
-	* fold-const.c (const_binop) <case VEC_LSHIFT_EXPR,
-	case VEC_RSHIFT_EXPR>: Fix BYTES_BIG_ENDIAN handling.
-
-2013-05-16  Jakub Jelinek  <jakub@redhat.com>
-
-	* omp-low.c (extract_omp_for_data): For collapsed loops,
-	if at least one of the loops is known at compile time to
-	iterate zero times, set count to 0.
-	(expand_omp_regimplify_p): New function.
-	(expand_omp_for_generic): For collapsed loops, if at least
-	one of the loops isn't known to iterate at least once,
-	add runtime check with setting count to 0.
-	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk):
-	For unsigned types if it isn't known at compile time that
-	the loop will iterate at least once, add runtime check to bypass
-	the whole loop if initial condition isn't true.
-
-2013-05-14  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/57251
-	* expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: Handle
-	the case when both op0 and op1 have VOIDmode.
-
-2013-05-13  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/57230
-	* tree-ssa-strlen.c (handle_char_store): Add missing integer_zerop
-	check.
-
-2013-05-12  Joern Rennecke  <joern.rennecke@embecosm.com>
-
-	* config/epiphany/epiphany.c (epiphany_init): Check size of
-	NUM_MODES_FOR_MODE_SWITCHING.
-	(epiphany_expand_prologue):
-	Remove CONFIG_REGNUM initial value handling code.
-	(epiphany_optimize_mode_switching): Handle EPIPHANY_MSW_ENTITY_CONFIG.
-	(epiphany_mode_needed, epiphany_mode_entry_exit): Likewise.
-	(emit_set_fp_mode, epiphany_mode_after): Likewise.
-	(epiphany_mode_needed) <Handle EPIPHANY_MSW_ENTITY_AND>:
-	Don't return 1 for FP_MODE_NONE.
-	* config/epiphany/epiphany.h (NUM_MODES_FOR_MODE_SWITCHING):
-	Add value for EPIPHANY_MSW_ENTITY_CONFIG.
-	(EPIPHANY_MSW_ENTITY_CONFIG, EPIPHANY_MSW_ENTITY_NUM): Define.
-	* config/epiphany/epiphany.md (save_config): New pattern.
-
-2013-05-10  Sebastian Huber  <sebastian.huber@embedded-brains.de>
-
-	* config/arm/t-rtems-eabi: Remove mthumb/march=armv7 multilib.
-	Add mthumb/march=armv7-a multilib.
-	Add mthumb/march=armv7-r multilib.
-	Add mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard multilib.
-
-2013-05-10  Ralf Corsépius  <ralf.corsepius@rtems.org>
-
-	PR target/57237
-	* config/v850/t-rtems: Add more multilibs.
-
-2013-05-10  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/57214
-	* tree-ssa-loop-ivcanon.c (propagate_constants_for_unrolling): Do
-	not propagate from SSA names that occur in abnormal PHI nodes.
-
-2013-05-10  Alan Modra  <amodra@gmail.com>
-
-	PR target/55033
-	* varasm.c (default_elf_select_section): Move !DECL_P check..
-	(get_named_section): ..to here before calling get_section_name.
-	Adjust assertion.
-	(default_section_type_flags): Add DECL_P check.
-	* config/i386/winnt.c (i386_pe_section_type_flags): Likewise.
-	* config/rs6000/rs6000.c (rs6000_xcoff_section_type_flags): Likewise.
-
-2013-05-09  Joern Rennecke  <joern.rennecke@embecosm.com>
-
-	* config/epiphany/epiphany.c (epiphany_expand_prologue):
-	When using gen_stack_adjust_str with a register offset, add a
-	REG_FRAME_RELATED_EXPR note.
-
-2013-05-09  Martin Jambor  <mjambor@suse.cz>
-
-	PR middle-end/56988
-	* ipa-prop.h (ipa_agg_replacement_value): New flag by_ref.
-	* ipa-cp.c (find_aggregate_values_for_callers_subset): Fill in the
-	by_ref flag of ipa_agg_replacement_value structures.
-	(known_aggs_to_agg_replacement_list): Likewise.
-	* ipa-prop.c (write_agg_replacement_chain): Stream by_ref flag.
-	(read_agg_replacement_chain): Likewise.
-	(ipcp_transform_function): Also check that by_ref flags match.
-
-2013-05-08  Diego Novillo  <dnovillo@google.com>
-
-	PR bootstrap/54659
-
-	Revert:
-
-	2012-08-17  Diego Novillo  <dnovillo@google.com>
-
-		PR bootstrap/54281
-		* configure.ac: Add libintl.h to AC_CHECK_HEADERS list.
-		* config.in: Regenerate.
-		* configure: Regenerate.
-		* intl.h: Always include libintl.h if HAVE_LIBINTL_H is
-		set.
-
-2013-05-08  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR tree-optimization/57200
-	* tree-ssa-loop-niter.c (do_warn_aggressive_loop_optimizations):
-	Only call inform if the preceding warning_at returns true.
-
-2013-05-07  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/57149
-	* tree-ssa-uninit.c (uninit_undefined_value_p): New inline.
-	(can_skip_redundant_opnd, compute_uninit_opnds_pos,
-	collect_phi_def_edges, execute_late_warn_uninitialized): Use
-	uninit_undefined_value_p instead of ssa_undefined_value_p.
-
-	PR debug/57184
-	* expr.c (expand_expr_addr_expr_1): Handle COMPOUND_LITERAL_EXPR
-	for modifier == EXPAND_INITIALIZER.
-
-2013-05-07  Richard Biener  <rguenther@suse.de>
-
-	Backport from mainline
-	2013-05-06  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/57185
-	* tree-parloops.c (add_field_for_reduction): Handle anonymous
-	SSA names properly.
-
-	2013-04-19  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/57000
-	* tree-ssa-reassoc.c (pass_reassoc): Add TODO_update_ssa_only_virtuals.
-
-2013-05-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
-
-	Backport from trunk
-	2013-05-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
-
-	PR target/57150
-	* config/rs6000/rs6000.h (HARD_REGNO_CALLER_SAVE_MODE): Use DFmode
-	to save TFmode registers and DImode to save TImode registers for
-	caller save operations.
-	(HARD_REGNO_CALL_PART_CLOBBERED): TFmode and TDmode do not need to
-	mark being partially clobbered since they only use the first
-	double word.
-
-	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): TFmode
-	and TDmode only use the upper 64-bits of each VSX register.
-
-2013-05-06  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	PR target/57108
-	* config/sh/sh.md (tstsi_t_zero_extract_eq): Use QIHISIDI mode iterator.
-
-2013-05-06  Uros Bizjak  <ubizjak@gmail.com>
-
-	Backport from mainline
-	2013-05-06  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/57106
-	* config/i386/i386.c (add_parameter_dependencies): Add dependence
-	between "first_arg" and "insn", not "last" and "insn".
-
-2013-05-03  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/57130
-	* combine.c (make_compound_operation) <case SUBREG>: Pass
-	SET instead of COMPARE as in_code to the recursive call
-	if needed.
-
-	Backported from mainline
-	2013-04-26  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/57051
-	* fold-const.c (const_binop): Handle VEC_LSHIFT_EXPR
-	and VEC_RSHIFT_EXPR if shift count is a multiple of element
-	bitsize.
-
-	2013-04-12  Marc Glisse  <marc.glisse@inria.fr>
-
-	* fold-const.c (fold_binary_loc): Call const_binop also for mixed
-	vector-scalar operations.
-
-2013-05-03  Marek Polacek  <polacek@redhat.com>
-
-	Backport from mainline
-	2013-04-25  Marek Polacek  <polacek@redhat.com>
-
-	PR tree-optimization/57066
-	* builtins.c (fold_builtin_logb): Return +Inf for -Inf.
-
-2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
-
-	Backport from mainline
-	2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
-
-	* lra-constraints.c (process_alt_operands): Add checking alt
-	number to choose the best alternative.
-
-	2013-05-01  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR target/57091
-	* lra-constraints.c (best_small_class_operands_num): Remove.
-	(process_alt_operands): Remove small_class_operands_num.  Take
-	small classes operands into losers and only if the operand is not
-	matched.  Modify debugging output.
-	(curr_insn_transform): Remove best_small_class_operands_num.
-	Print insn name.
-
-2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
-
-	Backport from mainline
-	2013-04-29  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR target/57097
-	* lra-constraints.c (process_alt_operands): Discourage a bit more
-	using memory for pseudos.  Print cost dump for alternatives.
-	Modify cost values for conflicts with early clobbers.
-	(curr_insn_transform): Spill pseudos reassigned to NO_REGS.
-
-2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
-
-	Backport from mainline
-	2013-04-24  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimizations/57046
-	* lra-constraints (split_reg): Set up lra_risky_transformations_p
-	for multi-reg splits.
-
-2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
-
-	Backport from mainline
-	2013-04-22  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR target/57018
-	* lra-eliminations.c (mark_not_eliminable): Prevent elimination of
-	a set sp if no stack realignment.
-
-2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
-
-	Backport from mainline
-	2013-04-18  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/56999
-	* lra-coalesce.c (coalescable_pseudo_p): Remove 2nd parameter and
-	related code.
-	(lra_coalesce): Remove split_origin_bitmap and related code.
-	* lra.c (lra): Coalesce after undoing inheritance. Recreate live
-	ranges if necessary.
-
-2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
-
-	Backport from mainline
-	2013-04-19  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/56847
-	* lra-constraints.c (process_alt_operands): Discourage alternative
-	with non-matche doffsettable memory constraint fro memory with
-	known offset.
-
-2013-05-02  Ian Bolton  <ian.bolton@arm.com>
-
-	Backport from mainline
-	2013-03-28  Ian Bolton  <ian.bolton@arm.com>
-
-	* config/aarch64/aarch64.md (aarch64_can_eliminate): Keep frame
-	record only when desired or required.
-
-2013-04-30  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/57104
-	* tsan.c (instrument_expr): Don't instrument accesses to
-	DECL_HARD_REGISTER VAR_DECLs.
-
-2013-04-30  Uros Bizjak  <ubizjak@gmail.com>
-
-	Backport from mainline
-	2013-04-29  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/44578
-	* config/i386/i386.md (*zero_extendsidi2_rex64): Add "!" to m->?*y
-	alternative.
-	(*zero_extendsidi2): Ditto.
-
-	Backport from mainline
-	2013-04-29  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/57098
-	* config/i386/i386.c (ix86_expand_vec_perm): Validize constant memory.
-
-2013-04-29  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/57103
-	* tree-cfg.c (move_stmt_op): Fix condition under which to update
-	TREE_BLOCK.
-	(move_stmt_r): Remove redundant checking.
-
-2013-04-29  Christian Bruel  <christian.bruel@st.com>
-
-	PR target/57108
-	* sh.md (tstsi_t_zero_extract_eq): Set mode for operand 0.
-
-2013-04-29  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/57083
-	* tree-vrp.c (extract_range_from_binary_expr_1): For LSHIFT_EXPR with
-	non-singleton shift count range, zero extend low_bound for uns case.
-
-2013-04-28  Eric Botcazou  <ebotcazou@gcc.gnu.org>
-
-	* stor-layout.c (finalize_size_functions): Allocate a structure and
-	reset cfun before dumping the functions.
-
-2013-04-27  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/56866
-	* config/i386/i386.c (ix86_expand_mul_widen_evenodd): Don't
-	use xop_pmacsdqh if uns_p.
-	* config/i386/sse.md (xop_rotr<mode>3): Fix up computation of
-	the immediate rotate count.
-
-2013-04-25  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/57003
-	* regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
-	call note_stores with kill_clobbered_value callback again after
-	killing regs_invalidated_by_call.
-
-2013-04-25  Ian Bolton  <ian.bolton@arm.com>
-
-	Backported from mainline.
-	2013-03-22  Ian Bolton  <ian.bolton@arm.com>
-
-	* config/aarch64/aarch64.c (aarch64_print_operand): New
-	format specifier for printing a constant in hex.
-	* config/aarch64/aarch64.md (insv_imm<mode>): Use the X
-	format specifier for printing second operand.
-
-2013-04-24  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	Backported from mainline.
-	2013-04-24  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* config/aarch64/arm_neon.h (vld1<q>_lane*): Fix constraints.
-	(vld1<q>_dup_<sufp><8, 16, 32, 64>): Likewise.
-	(vld1<q>_<sufp><8, 16, 32, 64>): Likewise.
-
-2013-04-24  Greta Yorsh  <Greta.Yorsh@arm.com>
-
-	Backported from mainline.
-	PR target/56797
-	* config/arm/arm.c (load_multiple_sequence): Require SP
-	as base register for loads if SP is in the register list.
-
-2013-04-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
-	    Steven Bosscher <steven@gcc.gnu.org>
-
-	Backported from mainline.
-	PR rtl-optimization/56605
-	* loop-iv.c (implies_p): Handle equal RTXs and subregs.
-
-2013-04-22  Marek Polacek  <polacek@redhat.com>
-
-	Backported from mainline.
-	2013-04-22  Marek Polacek  <polacek@redhat.com>
-
-	PR sanitizer/56990
-	* tsan.c (instrument_expr): Don't instrument expression
-	in case its size is zero.
-
-2013-04-22  Yufeng Zhang  <yufeng.zhang@arm.com>
-
-	Backported from mainline.
-	2013-04-10  Yufeng Zhang  <yufeng.zhang@arm.com>
-	* config/aarch64/aarch64.c (aarch64_print_extension): New function.
-	(aarch64_start_file): Use the new function.
-
-2013-04-18  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56984
-	* tree-vrp.c (register_edge_assert_for_2): For (x >> M) < N
-	and (x >> M) >= N don't register any assertion if N << M is the
-	minimum value.
-
-2013-04-17  David Edelsohn  <dje.gcc@gmail.com>
-
-	PR target/56948
-	* config/rs6000/vsx.md (vsx_mov<mode>): Add j->r alternative.
-
-2013-04-15  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56962
-	* gimple-ssa-strength-reduction.c (record_increment): Only set
-	initializer if gimple_assign_rhs_code is {,POINTER_}PLUS_EXPR and
-	either rhs1 or rhs2 is equal to c->base_expr.
-
-2013-04-15  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	* emit-rtl.c (reset_all_used_flags): New function.
-	(verify_rtl_sharing): Call reset_all_used_flags before and after
-	performing the checks.
-
-2013-04-15  Eric Botcazou  <ebotcazou@adacore.com>
-
-	PR target/56890
-	* config/sparc/sparc.c (enum sparc_mode_class): Add H_MODE value.
-	(S_MODES): Set H_MODE bit.
-	(SF_MODES): Set only S_MODE and SF_MODE bits.
-	(DF_MODES): Set SF_MODES and only D_MODE and DF_MODE bits.
-	(sparc_init_modes) <MODE_INT>: Set H_MODE bit for sub-word modes.
-	<MODE_VECTOR_INT>: Do not set SF_MODE for sub-word modes.
-	<MODE_FLOAT>: Likewise.
-
-2013-04-12  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR target/56903
-	* config/i386/i386.c (ix86_hard_regno_mode_ok): Add
-	lra_in_progress for return.
-
-2013-04-12  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56918
-	PR tree-optimization/56920
-	* fold-const.c (int_const_binop_1): Use op1.mul_with_sign (op2, ...)
-	instead of op1 - op2.  Pass 2 * TYPE_PRECISION (type) as second
-	argument to rshift method.
-
-2013-04-12  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	* ifcvt.c (end_ifcvt_sequence): Mark a and b for unsharing as
-	well.
-
-2013-04-11  Marek Polacek  <polacek@redhat.com>
-
-	PR tree-optimization/48184
-	* params.def (PARAM_ALIGN_THRESHOLD): Increase the minimum
-	value to 1.
-
-2013-04-11  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	Backported from mainline.
-	2013-04-11  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* config/aarch64/aarch64-simd.md (aarch64_vcond_internal): Fix
-	floating-point vector comparisons against 0.
-
-2013-04-11  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56899
-	* fold-const.c (extract_muldiv_1): Apply distributive law
-	only if TYPE_OVERFLOW_WRAPS (ctype).
-
-2013-04-10  David S. Miller  <davem@davemloft.net>
-
-	* config/sparc/sparc.h (ASM_CPU_SPEC): Pass -Av8 if -mcpu=supersparc
-	or -mcpu=hypersparc.
-
-2013-04-10  Jakub Jelinek  <jakub@redhat.com>
-
-	Backported from mainline
-	2013-04-09  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56883
-	* omp-low.c (expand_omp_for_generic, expand_omp_for_static_nochunk,
-	expand_omp_for_static_chunk): Use simple_p = true in
-	force_gimple_operand_gsi calls when assigning to addressable decls.
-
-2013-04-09  Marek Polacek  <polacek@redhat.com>
-
-	PR tree-optimization/48762
-	* params.def (PARAM_MAX_CSE_INSNS): Increase the minimum
-	value to 1.
-
-2013-04-08  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	* config/s390/s390.c (s390_expand_insv): Only accept insertions
-	within mode size.
-
-2013-04-08  Marek Polacek  <polacek@redhat.com>
-
-	PR rtl-optimization/48182
-	* params.def (PARAM_MIN_CROSSJUMP_INSNS): Increase the minimum
-	value to 1.
-
-2013-04-06  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
-
-	PR target/55487
-	* config/pa/pa.c (legitimize_pic_address): Before incrementing label
-	nuses, make sure we have a label.
-
-2013-04-04  Ian Lance Taylor  <iant@google.com>
-
-	Backport from mainline:
-	* doc/standards.texi (Standards): The Go frontend supports the Go
-	1 language standard.
-
-2013-04-04  Marek Polacek  <polacek@redhat.com>
-
-	Backport from mainline:
-	2013-04-04  Marek Polacek  <polacek@redhat.com>
-
-	PR tree-optimization/48186
-	* predict.c (maybe_hot_frequency_p): Return false if
-	HOT_BB_FREQUENCY_FRACTION is 0.
-	(cgraph_maybe_hot_edge_p): Likewise.
-
-2013-04-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
-
-	Backport from mainline:
-	2013-03-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
-
-	PR target/56720
-	* config/arm/iterators.md (v_cmp_result): New mode attribute.
-	* config/arm/neon.md (vcond<mode><mode>): Handle unordered cases.
-
-2013-04-04  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56837
-	* tree-loop-distribution.c (classify_partition): For non-zero
-	values require that the value has the same precision as its
-	mode to be useful as memset value.
-
-2013-04-03  Roland McGrath  <mcgrathr@google.com>
-
-	Backport from mainline:
-	2013-03-26  Roland McGrath  <mcgrathr@google.com>
-
-	* config/arm/arm.c (arm_print_operand: case 'w'): Use fputs rather
-	than fprintf with a non-constant, non-format string.
-
-2013-04-03  Marek Polacek  <polacek@redhat.com>
-
-	Backport from mainline:
-	2013-04-03  Marek Polacek  <polacek@redhat.com>
-
-	PR sanitizer/55702
-	* tsan.c (instrument_func_exit): Allow BUILT_IN_RETURN
-	functions.
-
-2013-04-03  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56817
-	* tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely):
-	Split out ...
-	(tree_unroll_loops_completely_1): ... new function to manually
-	walk the loop tree, properly defering outer loops of unrolled
-	loops to later iterations.
-
-2013-04-02  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/56745
-	* ifcvt.c (cond_exec_find_if_block): Don't try to optimize
-	if then_bb has no successors and else_bb is EXIT_BLOCK_PTR.
-
-2013-04-02  Wei Mi  <wmi@google.com>
-
-	* config/i386/i386.c (ix86_rtx_costs): Set proper rtx cost for
-	ashl<mode>3_mask, *<shift_insn><mode>3_mask and
-	*<rotate_insn><mode>3_mask in i386.md.
-
-2013-04-01  Wei Mi  <wmi@google.com>
-
-	* config/i386/i386.md (*ashl<mode>3_mask): Rewrite as define_insn.
-	Truncate operand 2 using %b asm operand modifier.
-	(*<shift_insn><mode>3_mask): Ditto.
-	(*<rotate_insn><mode>3_mask): Ditto.
-
-2013-04-01  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/i386.md (*movsf_internal): Change type of
-	alternatives 3,4 to imov.
-
-2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR lto/56777
-	* doc/invoke.texi ([-fwhole-program]): Fix typo.
-
-2013-03-29  Kirill Yukhin  <kirill.yukhin@intel.com>
-
-	* config/i386/avx2intrin.h (_mm256_broadcastsi128_si256):
-	Fix declaration name.
-
-2013-03-28  Gerald Pfeifer  <gerald@pfeifer.com>
-
-	* doc/invoke.texi (AVR Options): Tweak link for AVR-LibC user manual.
-	* doc/extend.texi (Named Address Spaces): Ditto.
-	(Variable Attributes): Ditto.
-
-2013-03-28  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* toplev.c (process_options): Do not disable -fomit-frame-pointer on a
-	general basis if unwind info is requested and ACCUMULATE_OUTGOING_ARGS
-	is not enabled.
-
-2013-03-27  Walter Lee  <walt@tilera.com>
-
-	Backport from mainline:
-	2013-03-27  Walter Lee  <walt@tilera.com>
-
-	* config/tilegx/tilegx.c (tilegx_expand_prologue): Avoid
-	double-decrement of next_scratch_regno.
-
-2013-03-27  Walter Lee  <walt@tilera.com>
-
-	Backport from mainline:
-	2013-03-27  Walter Lee  <walt@tilera.com>
-
-	* config/tilegx/tilegx.md (insn_v1mulu): Fix predicates on
-	input operands.
-	(insn_v1mulus): Ditto.
-	(insn_v2muls): Ditto.
-
-2013-03-27  Walter Lee  <walt@tilera.com>
-
-	Backport from mainline:
-	2013-03-27  Walter Lee  <walt@tilera.com>
-
-	* config/tilegx/tilegx.h (ASM_OUTPUT_ADDR_VEC_ELT): Delete
-	extra tab.
-	(ASM_OUTPUT_ADDR_DIFF_ELT): Ditto.
-
-2013-03-27  Walter Lee  <walt@tilera.com>
-
-	Backport from mainline:
-	2013-03-27  Walter Lee  <walt@tilera.com>
-
-	* config/tilegx/tilegx.md (*sibcall_insn): Fix type atribute for jr.
-	(*sibcall_value): Ditto.
-
-2013-03-27  Walter Lee  <walt@tilera.com>
-
-	Backport from mainline:
-	2013-03-27  Walter Lee  <walt@tilera.com>
-
-	* config/tilegx/tilegx.md (insn_mnz_<mode>): Replaced by ...
-	(insn_mnz_v8qi): ... this ...
-	(insn_mnz_v4hi): ... and this.  Replace (const_int 0) with the
-	vector equivalent.
-	(insn_v<n>mnz): Replaced by ...
-	(insn_v1mnz): ... this ...
-	(insn_v2mnz): ... and this.  Replace (const_int 0) with the vector
-	equivalent.
-	(insn_mz_<mode>): Replaced by ...
-	(insn_mz_v8qi): ... this ...
-	(insn_mz_v4hi): ... and this.  Replace (const_int 0) with the
-	vector equivalent.
-	(insn_v<n>mz): Replaced by ...
-	(insn_v1mz): ... this ...
-	(insn_v2mz): ... and this.  Replace (const_int 0) with the vector
-	equivalent.
-
-2013-03-26  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* doc/invoke.texi (SPARC options): Remove -mlittle-endian.
-
-2013-03-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
-
-	* config/rtems.opt: Add -pthread option.
-
-2013-03-26  Sofiane Naci  <sofiane.naci@arm.com>
-
-	* config/aarch64/aarch64.c (aarch64_classify_address): Support
-	PC-relative load in SI modes and above only.
-
-2013-03-26  Walter Lee  <walt@tilera.com>
-
-	Backport from mainline:
-	2013-03-26  Walter Lee  <walt@tilera.com>
-
-	* config/tilegx/tilegx.h (PROFILE_BEFORE_PROLOGUE): Define.
-	* config/tilegx/tilepro.h (PROFILE_BEFORE_PROLOGUE): Define.
-
-2013-03-26  Walter Lee  <walt@tilera.com>
-
-	Backport from mainline:
-	2013-03-25  Walter Lee  <walt@tilera.com>
-
-	* config/tilegx/tilegx-builtins.h (enum tilegx_builtin): Add
-	TILEGX_INSN_SHUFFLEBYTES1.
-	* config/tilegx/tilegx.c (tilegx_builtin_info): Add entry for
-	shufflebytes1.
-	(tilegx_builtins): Ditto.
-	* config/tilegx/tilegx.md (insn_shufflebytes1): New pattern.
-
-2013-03-26  Walter Lee  <walt@tilera.com>
-
-	Backport from mainline:
-	2013-03-25  Walter Lee  <walt@tilera.com>
-
-	* config/tilegx/tilegx.c (expand_set_cint64_one_inst): Inline
-	tests for constraint J, K, N, P.
-
-2013-03-26  Walter Lee  <walt@tilera.com>
-
-	Backport from mainline:
-	2013-03-25  Walter Lee  <walt@tilera.com>
-
-	* config/tilegx/tilegx.c (tilegx_asm_preferred_eh_data_format):
-	Use indirect/pcrel encoding.
-	* config/tilepro/tilepro.c (tilepro_asm_preferred_eh_data_format):
-	Ditto.
-
-2013-03-25  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/56694
-	* tree-eh.c (lower_eh_must_not_throw): Strip BLOCKs from the
-	must-not-throw stmt location.
-
-2012-03-22  Jakub Jelinek  <jakub@redhat.com>
-
-	* BASE-VER: Set to 4.8.1.
-	* DEV-PHASE: Set to prerelease.
-
-2013-03-22  Release Manager
-
-	* GCC 4.8.0 released.
-
-2013-03-21  Walter Lee  <walt@tilera.com>
-
-	* config/tilegx/sync.md (atomic_test_and_set): New pattern.
-
-2013-03-21  Mark Wielaard  <mjw@redhat.com>
-
-	* dwarf2out.c (size_of_aranges): Skip DECL_IGNORED_P functions.
-
-2013-03-20  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56661
-	* tree-ssa-sccvn.c (visit_use): Only value-number calls if
-	the result does not have to be distinct.
-
-2013-03-20  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56635
-	* tree-ssa-phiopt.c (cond_if_else_store_replacement_1): Give up
-	if lhs of then_assign and else_assign don't have compatible types.
-
-2013-03-17  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/56640
-	* config/arm/arm.h (REG_CLASS_NAMES): Add "SFP_REG" and "AFP_REG"
-	class names.  Remove trailing comma after "ALL_REGS".
-
-2013-03-16  Jakub Jelinek  <jakub@redhat.com>
-
-	* DEV-PHASE: Set to prerelease.
-
-2013-03-14  Andi Kleen  <ak@linux.intel.com>
-
-	PR target/56619
-	* doc/extend.texi: Document __ATOMIC_HLE_ACQUIRE,
-	__ATOMIC_HLE_RELEASE. Document __builtin_ia32 TSX intrincs.
-	Document _x* TSX intrinsics.
-
-2013-03-14  Edgar E. Iglesias <edgar.iglesias@xilinx.com>
-	    David Holsgrove <david.holsgrove@xilinx.com>
-
-	* configure.ac: Add MicroBlaze TLS support detection.
-	* configure: Regenerate.
-	* config/microblaze/microblaze-protos.h
-	(microblaze_cannot_force_const_mem, microblaze_tls_referenced_p,
-	symbol_mentioned_p, label_mentioned_p): Add prototypes.
-	* config/microblaze/microblaze.c (microblaze_address_type): Add
-	ADDRESS_TLS and tls_reloc address types.
-	(microblaze_address_info): Add tls_reloc.
-	(TARGET_HAVE_TLS): Define.
-	(get_tls_get_addr, microblaze_tls_symbol_p, microblaze_tls_operand_p_1,
-	microblaze_tls_referenced_p, microblaze_cannot_force_const_mem,
-	symbol_mentioned_p, label_mentioned_p, tls_mentioned_p,
-	load_tls_operand, microblaze_call_tls_get_addr,
-	microblaze_legitimize_tls_address): New functions.
-	(microblaze_classify_unspec): Handle UNSPEC_TLS.
-	(get_base_reg): Use microblaze_tls_symbol_p.
-	(microblaze_classify_address): Handle TLS.
-	(microblaze_legitimate_pic_operand): Use symbol_mentioned_p,
-	label_mentioned_p and microblaze_tls_referenced_p.
-	(microblaze_legitimize_address): Handle TLS.
-	(microblaze_address_insns): Handle ADDRESS_TLS.
-	(pic_address_needs_scratch): Handle TLS.
-	(print_operand_address): Handle TLS.
-	(microblaze_expand_prologue): Check TLS_NEEDS_GOT.
-	(microblaze_expand_move): Handle TLS.
-	(microblaze_legitimate_constant_p): Check
-	microblaze_cannot_force_const_mem and microblaze_tls_symbol_p.
-	(TARGET_CANNOT_FORCE_CONST_MEM): Define.
-	* config/microblaze/microblaze.h (TLS_NEEDS_GOT): Define
-	(PIC_OFFSET_TABLE_REGNUM): Set.
-	* config/microblaze/linux.h (TLS_NEEDS_GOT): Define.
-	* config/microblaze/microblaze.md (UNSPEC_TLS): Define.
-	(addsi3, movsi_internal2, movdf_internal): Update constraints
-	* config/microblaze/predicates.md (arith_plus_operand): Define
-	(move_operand): Redefine as move_src_operand, check
-	microblaze_tls_referenced_p.
-
-2013-03-14  Ian Bolton  <ian.bolton@arm.com>
-
-	* config/aarch64/aarch64.md: (*and<mode>3nr_compare0): Use CC_NZ.
-	(*and_<SHIFT:optab><mode>3nr_compare0): Likewise.
-
-2013-03-14  Ian Bolton  <ian.bolton@arm.com>
-
-	* config/aarch64/aarch64.c (aarch64_select_cc_mode): Return correct
-	CC mode for AND.
-
-2013-03-14  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/53265
-	* common.opt (Waggressive-loop-optimizations): New option.
-	* tree-ssa-loop-niter.c: Include tree-pass.h.
-	(do_warn_aggressive_loop_optimizations): New function.
-	(record_estimate): Call it.  Don't add !is_exit bounds to loop->bounds
-	if number_of_latch_executions returned constant.
-	(estimate_numbers_of_iterations_loop): Call number_of_latch_executions
-	early.  If number_of_latch_executions returned constant, set
-	nb_iterations_upper_bound back to it.
-	* cfgloop.h (struct loop): Add warned_aggressive_loop_optimizations
-	field.
-	* Makefile.in (tree-ssa-loop-niter.o): Depend on $(TREE_PASS_H).
-	* doc/invoke.texi (-Wno-aggressive-loop-optimizations): Document.
-
-	* config/aarch64/t-aarch64-linux (MULTARCH_DIRNAME): Remove.
-	(MULTILIB_OSDIRNAMES): Set.
-	* genmultilib: If defaultosdirname doesn't start with :: , set
-	defaultosdirname2 instead, clear it and emit two . multilib_raw
-	entries instead of just one.
-
-2013-03-14  Kaz Kojima  <kkojima@gcc.gnu.org>
-
-	* config/sh/linux.h (TARGET_DEFAULT): Remove MASK_USERMODE.
-	(SUBTARGET_OVERRIDE_OPTIONS): Set TARGET_USERMODE as default.
-	* config/sh/netbsd-elf.h (TARGET_DEFAULT): Remove MASK_USERMODE.
-	(SUBTARGET_OVERRIDE_OPTIONS): New.
-
-2013-03-13  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	PR target/49880
-	* config/sh/sh.opt (FPU_SINGLE_ONLY): New mask.
-	(musermode): Convert to Var(TARGET_USERMODE).
-	* config/sh/sh.h (SELECT_SH2A_SINGLE_ONLY, SELECT_SH4_SINGLE_ONLY,
-	MASK_ARCH): Add MASK_FPU_SINGLE_ONLY.
-	* config/sh/sh.c (sh_option_override): Use
-	TARGET_FPU_DOUBLE || TARGET_FPU_SINGLE_ONLY for call-fp case.
-	* config/sh/sh.md (udivsi3_i1, divsi3_i1): Remove ! TARGET_SH4
-	condition.
-	(udivsi3_i4, divsi3_i4): Use TARGET_FPU_DOUBLE condition instead of
-	TARGET_SH4.
-	(udivsi3_i4_single, divsi3_i4_single): Use
-	TARGET_FPU_SINGLE_ONLY || TARGET_FPU_DOUBLE instead of TARGET_HARD_SH4.
-
-2013-03-13  Dave Korn  <dave.korn.cygwin@....>
-
-	* config/i386/cygwin.h (SHARED_LIBGCC_SPEC): Make shared libgcc the
-	default setting.
-
-2013-03-13  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56608
-	* tree-vect-slp.c (vect_schedule_slp): Do not remove scalar
-	calls when vectorizing basic-blocks.
-
-2013-03-13  Jakub Jelinek  <jakub@redhat.com>
-
-	PR plugins/45078
-	* config.gcc: On arm, mips, sh and sparc add vxworks-dummy.h to
-	tm_file.
-
-2013-03-12  Jakub Jelinek  <jakub@redhat.com>
-
-	* doc/invoke.texi (-Waddr-space-convert): Move into the table earlier.
-
-2013-03-11  Jan Hubicka  <jh@suse.cz>
-
-	PR lto/56557
-	* lto-streamer-out.c (output_symbol_p): Skip references from
-	constructors of external variables.
-
-2013-03-11  Jan Hubicka  <jh@suse.cz>
-
-	PR middle-end/56571
-	* valtrack.c (cleanup_auto_inc_dec): Unshare clobbers originating
-	from pseudos.
-	* emit-rtl.c (verify_rtx_sharing): Likewise.
-	(copy_insn_1): Likewise.
-	* rtl.c (copy_rtx): Likewise.
-
-2013-03-11  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR target/56591
-	* config/avr/avr.c (avr_print_operand): Add space after '%c' in
-	output_operand_lossage message.
-
-2013-03-11  Richard Earnshaw  <rearnsha@arm.com>
-
-	PR target/56470
-	* arm.c (shift_op): Validate RTL pattern on the fly.
-	(arm_print_operand, case 'S'): Don't use shift_operator to validate
-	the RTL.
-
-2013-03-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
-
-	PR target/56347
-	* config/pa/pa.md (call_value): Check for calls to powf and direct to
-	new call patterns that clobber %fr12.
-	(call_val_powf, call_val_powf_pic, call_val_powf_64bit): New insn,
-	split and postreload patterns.
-	* config/pa/pa.c (pa_conditional_register_usage): Revert marking
-	registers %fr12 and %fr12R as call used.
-
-2013-03-09  Steven Bosscher  <steven@gcc.gnu.org>
-
-	* dse.c (delete_dead_store_insn): Respect TDF_DETAILS.
-	(canon_address, record_store, replace_read, check_mem_read_rtx,
-	scan_insn, dse_step1, dse_step2_init, dse_step2_spill,
-	dse_step4, dse_step5_nospill, dse_step5_spill, dse_step6,
-	rest_of_handle_dse): Likewise.
-
-2013-03-09  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	PR middle-end/56524
-	* tree.h (tree_optimization_option): Rename target_optabs to optabs.
-	Add base_optabs.
-	(TREE_OPTIMIZATION_OPTABS): Update after previous field change.
-	(TREE_OPTIMIZATION_BASE_OPTABS): New macro.
-	(save_optabs_if_changed): Replace with...
-	(init_tree_optimization_optabs): ...this.
-	* optabs.c (save_optabs_if_changed): Rename to...
-	(init_tree_optimization_optabs): ...this.  Take the optimization node
-	as argument.  Do nothing if the base optabs are already correct.
-	Reuse the existing TREE_OPTIMIZATION_OPTABS memory if we need
-	to recompute optabs.
-	* function.h (function): Remove optabs field.
-	* function.c (invoke_set_current_function_hook): Call
-	init_tree_optimization_optabs.  Use the result to initialize
-	this_fn_optabs.
-
-2013-02-27  Aldy Hernandez  <aldyh@redhat.com>
-
-	* trans-mem.c (expand_transaction): Do not set PR_INSTRUMENTEDCODE
-	if GTMA_HAS_NO_INSTRUMENTATION.
-	(generate_tm_state): Keep GTMA_HAS_NO_INSTRUMENTATION bit.
-	(ipa_tm_transform_transaction): Set GTMA_HAS_NO_INSTRUMENTATION.
-	* gimple.h (GTMA_HAS_NO_INSTRUMENTATION): Define.
-	* gimple-pretty-print.c (dump_gimple_transaction): Handle
-	GTMA_HAS_NO_INSTRUMENTATION.
-
-2013-03-08  Jakub Jelinek  <jakub@redhat.com>
-
-	* config/gnu-user.h (LIBTSAN_EARLY_SPEC): Don't link against
-	libasan_preinit.o.
-
-2013-03-08  Marek Polacek  <polacek@redhat.com>
-	    Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56478
-	* predict.c (is_comparison_with_loop_invariant_p): Change the
-	type of loop_step to tree.
-	(predict_loops): Adjust.
-	(predict_iv_comparison): Perform the computations on double_ints.
-
-2013-03-08  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56570
-	* tree-cfg.c (verify_expr_location_1): Verify locations for
-	DECL_DEBUG_EXPR.
-	* tree-sra.c (create_access_replacement): Strip locations
-	from DECL_DEBUG_EXPRs.
-
-2013-03-08  Richard Biener  <rguenther@suse.de>
-
-	* tree-inline.c (expand_call_inline): Do not associate
-	a BLOCK with the location in BLOCK_SOURCE_LOCATION.
-	* tree-cfg.c (verify_location): Verify BLOCK_SOURCE_LOCATION.
-
-2013-03-08  Richard Biener  <rguenther@suse.de>
-
-	* tree-ssa-ter.c (is_replaceable_p): Do not TER across location
-	or block changes with -Og.  Fix for location / block encoding
-	changes and PHI arguments with locations.
-
-2013-03-07  Steven Bosscher  <steven@gcc.gnu.org>
-
-	* bitmap.c (struct bitmap_descriptor_d): Use unsigned HOST_WIDEST_INT
-	for all counters.
-	(struct output_info): Likewise.
-	(register_overhead): Remove bad gcc_assert.
-	(bitmap_find_bit): If there is only a single bitmap element, do not
-	count a miss as a search.
-	(print_statistics): Update for counter type changes.
-	(dump_bitmap_statistics): Likewise.  Print headers such that they
-	are properly lined up with the printed counters.
-
-2013-03-07  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56559
-	* tree-ssa-reassoc.c (zero_one_operation): When looking at rhs2,
-	check that it has only a single use.
-
-2013-03-07  Richard Biener  <rguenther@suse.de>
-
-	* doc/invoke.texi (fwhole-program): Discourage use in combination
-	with -flto.
-
-2013-03-06  Jakub Jelinek  <jakub@redhat.com>
-
-	* config/arm/t-arm (TM_H, OPTIONS_H_EXTRA): Add arm-cores.def.
-
-	PR tree-optimization/56539
-	* tree-tailcall.c (adjust_return_value_with_ops): Use GSI_SAME_STMT
-	instead of GSI_CONTINUE_LINKING as last argument to
-	force_gimple_operand_gsi.  Adjust function comment.
-
-	* config/aarch64/t-aarch64 (TM_H, OPTIONS_H_EXTRA): Add
-	aarch64-cores.def.
-
-	PR middle-end/56548
-	* expr.c (expand_cond_expr_using_cmove): When expanding cmove in
-	promoted mode, convert the result back to the original mode.
-
-2013-03-06  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/56294
-	* tree-into-ssa.c (insert_phi_nodes_for): Add dumping.
-	(insert_updated_phi_nodes_compare_uids): New function.
-	(update_ssa): Sort symbols_to_rename after UID before
-	traversing it to insert PHI nodes.
-
-2013-03-06  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/50494
-	* tree-vect-data-refs.c (vect_can_force_dr_alignment_p):
-	Do not adjust alignment of DECL_IN_CONSTANT_POOL decls.
-
-	Revert
-	2013-02-13  Richard Biener  <rguenther@suse.de>
-
-	PR lto/50494
-	* varasm.c (output_constant_def_1): Get the decl representing
-	the constant as argument.
-	(output_constant_def): Wrap output_constant_def_1.
-	(make_decl_rtl): Use output_constant_def_1 with the decl
-	representing the constant.
-	(build_constant_desc): Optionally re-use a decl already
-	representing the constant.
-	(tree_output_constant_def): Adjust.
-
-2013-03-06  Joey Ye  <joey.ye@arm.com>
-
-	PR lto/50293
-	* gcc.c (convert_white_space): New function.
-	(main): Handles white space in function name.
-
-2013-03-06  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	PR target/56529
-	* config/sh/sh.c (sh_option_override): Check for TARGET_DYNSHIFT
-	instead of TARGET_SH2 for call-table case.  Do not set sh_div_strategy
-	to SH_DIV_CALL_TABLE for TARGET_SH2.
-	* config.gcc (sh_multilibs): Add m2 and m2a to sh*-*-linux* multilib
-	list.
-	* doc/invoke.texi (SH options): Document mdiv= call-div1, call-fp,
-	call-table options.
-
-2013-03-05  Sterling Augustine  <saugustine@google.com>
-	    Cary Coutant  <ccoutant@google.com>
-
-	PR debug/55364
-	* dwarf2out.c (resolve_addr): Don't call
-	remove_loc_list_addr_table_entries a second time for the same
-	expression.
-
-2013-03-05  Jakub Jelinek  <jakub@redhat.com>
-
-	PR debug/56510
-	* cfgexpand.c (expand_debug_parm_decl): Call copy_rtx on incoming.
-	(avoid_complex_debug_insns): New function.
-	(expand_debug_locations): Call it.
-
-	PR rtl-optimization/56484
-	* ifcvt.c (noce_process_if_block): If else_bb is NULL, avoid extending
-	lifetimes of hard registers on small register class machines.
-
-2013-03-05  David Holsgrove  <david.holsgrove@xilinx.com>
-
-	* config/microblaze/microblaze-protos.h: Rename
-	microblaze_is_interrupt_handler to microblaze_is_interrupt_variant.
-	* config/microblaze/microblaze.c (microblaze_attribute_table): Add
-	fast_interrupt.
-	(microblaze_fast_interrupt_function_p): New function.
-	(microblaze_is_interrupt_handler): Rename to
-	microblaze_is_interrupt_variant and add fast_interrupt check.
-	(microblaze_must_save_register): Use microblaze_is_interrupt_variant.
-	(save_restore_insns): Likewise.
-	(compute_frame_size): Likewise.
-	(microblaze_function_prologue): Add FAST_INTERRUPT_NAME.
-	(microblaze_globalize_label): Likewise.
-	* config/microblaze/microblaze.h: Define FAST_INTERRUPT_NAME.
-	* config/microblaze/microblaze.md: Use wrapper
-	microblaze_is_interrupt_variant.
-
-2013-03-05  Kai Tietz  <ktietz@redhat.com>
-
-	* sdbout.c (sdbout_one_type): Switch to current function's section
-	supporting cold/hot.
-
-2013-03-05  David Holsgrove  <david.holsgrove@xilinx.com>
-
-	* doc/invoke.texi (MicroBlaze): Add -mbig-endian, -mlittle-endian,
-	-mxl-reorder.
-
-2013-03-05  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56461
-	* ggc-common.c (gt_pch_save): For ENABLE_VALGRIND_CHECKING,
-	if VALGRIND_GET_VBITS is defined, temporarily make object
-	memory all defined, and restore previous valgrind addressability
-	and definability afterwards.  Free this_object at the end.
-
-	PR middle-end/56461
-	* lra.c (lra): Call lra_clear_live_ranges if live_p,
-	right before calling lra_create_live_ranges, also call it
-	when clearing live_p.  Only call lra_clear_live_ranges
-	at the end if live_p.
-
-	PR middle-end/56461
-	* sched-deps.c (delete_dep_node): Free DEP_REPLACE.
-
-2013-03-05  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56521
-	* tree-ssa-sccvn.c (set_value_id_for_result): Always initialize
-	value-id.
-
-2013-03-05  Steven Bosscher  <steven@gcc.gnu.org>
-
-	PR c++/55135
-	* except.h (remove_unreachable_eh_regions): New prototype.
-	* except.c (remove_eh_handler_splicer): New function, split out
-	of remove_eh_handler.
-	(remove_eh_handler): Use remove_eh_handler_splicer.  Add comment
-	warning about running it on many EH regions one at a time.
-	(remove_unreachable_eh_regions_worker): New function, walk the
-	EH tree in depth-first order and remove non-marked regions.
-	(remove_unreachable_eh_regions): New function.
-	* tree-eh.c (mark_reachable_handlers): New function, split out
-	from remove_unreachable_handlers.
-	(remove_unreachable_handlers): Use mark_reachable_handlers and
-	remove_unreachable_eh_regions.
-	(remove_unreachable_handlers_no_lp): Use mark_reachable_handlers
-	and remove_unreachable_eh_regions.
-
-2013-03-05  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/56525
-	* loop-init.c (fix_loop_structure): Remove loops in two stages,
-	not freeing them until the end.
-
-2013-03-05  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	* config/s390/s390.h: Define DWARF2_ASM_LINE_DEBUG_INFO.
-
-2013-03-05  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56270
-	* tree-vect-slp.c (vect_schedule_slp): Clear vectorized stmts
-	of loads after scheduling an SLP instance.
-
-2013-03-05  Jakub Jelinek  <jakub@redhat.com>
-
-	* Makefile.in (dg_target_exps): Add aarch64.exp, epiphany.exp and
-	tic6x.exp.
-	(check_gcc_parallelize): Run guality.exp as a separate job from
-	vect.exp with unsorted.exp and $(dg_target_exps) separately from
-	struct-layout-1.exp with stackalign.exp.
-
-	* alias.c (init_alias_analysis): Clear reg_known_equiv_p bitmap.
-
-	PR middle-end/56461
-	* tree-vect-slp.c (vect_supported_load_permutation_p): Free
-	load_index sbitmap even if some bit in it isn't set.
-
-	PR middle-end/56461
-	* tree-ssa-loop-niter.c (bb_queue): Remove typedef.
-	(discover_iteration_bound_by_body_walk): Change queues to
-	vec<vec<basic_block> > and queue to vec<basic_block>.  Fix up
-	spelling in comment.  Call safe_push on queues[bound_index] directly.
-	Release queues[queue_index] in every iteration unconditionally.
-	Release bounds vector.
-
-	PR middle-end/56461
-	* tree-vect-stmts.c (free_stmt_vec_info_vec): Call
-	free_stmt_vec_info on any left-over stmt_vec_info in the vector.
-	* tree-vect-loop.c (vect_create_epilog_for_reduction): Release
-	inner_phis vector.
-
-2013-03-05  Richard Biener  <rguenther@suse.de>
-
-	PR lto/56515
-	* tree-inline.c (remap_blocks_to_null): New function.
-	(expand_call_inline): When expanding a call stmt without
-	an associated block inline remap all callee blocks to NULL.
-
-2013-03-05  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/56494
-	* simplify-rtx.c (simplify_truncation): If C is narrower than A,
-	optimize (truncate:A (subreg:B (truncate:C X) 0)) into
-	(subreg:A (truncate:C X) 0) instead of (truncate:A X).
-
-	PR middle-end/56461
-	* sel-sched-ir.c (free_sched_pools): Release
-	succs_info_pool.stack[succs_info_pool.max_top] vectors too
-	if succs_info_pool.max_top isn't -1.
-
-	PR bootstrap/56509
-	* opts.c (opts_obstack, opts_concat): Moved to...
-	* opts-common.c (opts_obstack, opts_concat): ... here.
-
-2013-03-04  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56461
-	* diagnostic.c (diagnostic_append_note): Save and restore old prefix.
-
-2013-03-04  Martin Jambor  <mjambor@suse.cz>
-
-	* tree-dfa.c (get_or_create_ssa_default_def): Use parameter fn in
-	all appropriate places.
-
-2013-01-04  Eric Botcazou  <ebotcazou@adacore.com>
-
-	PR tree-optimization/56424
-	* ipa-split.c (split_function): Do not set the RSO flag if result is
-	not by reference and its type is a register type.
-
-2013-03-04  David Holsgrove  <david.holsgrove@xilinx.com>
-
-	* config/microblaze/microblaze.c (microblaze_valid_pic_const): New.
-	(microblaze_legitimate_pic_operand): Likewise.
-	* config/microblaze/microblaze.h (LEGITIMATE_PIC_OPERAND_P): Call
-	new function microblaze_legitimate_pic_operand.
-	* config/microblaze/microblaze-protos.h
-	(microblaze_legitimate_pic_operand): Declare.
-
-2013-03-04  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
-
-	* config/microblaze/predicates.md (call_insn_simple_operand):
-	New predicate for supported rtx code types.
-	* config/microblaze/microblaze.md (call_internal1): Use
-	call_insn_simple_operand predicate.
-
-2013-03-04  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56461
-	* tree-loop-distribution.c (ldist_gen): Call partition_free after each
-	partitions.ordered_remove.
-
-	PR middle-end/56461
-	* tree-vect-stmts.c (vectorizable_conversion): Don't call
-	vec_oprnds0.create (1) for modifier == NONE.
-
-	PR middle-end/56461
-	* tree-vect-stmts.c (vectorizable_shift): Don't call create methods
-	on vec_oprnds0 or vec_oprnds1 before loop, only call it on
-	vec_oprnds1 right before pushing anything to it for
-	scalar_shift_arg.
-
-	PR middle-end/56461
-	* tree-vect-loop.c (destroy_loop_vec_info): For !clean_stmts, just
-	set nbbs to 0 instead of having separate code path.
-	(vect_analyze_loop_form): Call destroy_loop_vec_info with true
-	instead of false as last argument if returning NULL.
-
-2013-03-03  Sandra Loosemore  <sandra@codesourcery.com>
-
-	* target.def (TARGET_OPTION_VALID_ATTRIBUTE_P): Update comments;
-	the attribute is now called "target" instead of "option".
-	(TARGET_OPTION_PRAGMA_PARSE): Likewise, for the pragma.
-	* doc/tm.texi.in (Target Attributes):  Likewise document the correct
-	attribute/pragma name for TARGET_OPTION_VALID_P and
-	TARGET_OPTION_PRAGMA_PARSE.  Also copy-edit and correct markup.
-	* doc/tm.texi: Regenerated.
-
-2013-03-02  David Holsgrove  <david.holsgrove@xilinx.com>
-
-	* config/microblaze/microblaze.c:
-	Check mcpu, pcmp requirement and set TARGET_REORDER to 0 if not met.
-	* config/microblaze/microblaze.h: Add -mxl-reorder to
-	DRIVER_SELF_SPECS.
-	* config/microblaze/microblaze.md: New bswapsi2 and bswaphi2.
-	instructions emitted if TARGET_REORDER.
-	* config/microblaze/microblaze.opt: New option -mxl-reorder set to 1
-	or 0 for -m/-mno case, but initialises as 2 to detect default use case
-	separately.
-
-2013-03-01  Xinliang David Li  <davidxl@google.com>
-
-	* tree-ssa-uninit.c (compute_control_dep_chain): Limit post-dom
-	walk length.
-
-2013-03-01  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56461
-	* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Release path
-	vector even when returning true.  Fix up function comment formatting.
-
-	PR middle-end/56461
-	* ira-build.c (ira_loop_nodes_count): New variable.
-	(create_loop_tree_nodes): Initialize it.
-	(finish_loop_tree_nodes): Use it instead of looking at current_loops.
-
-	PR middle-end/56461
-	* tree-vect-data-refs.c (vect_permute_store_chain): Avoid using copy
-	method on dr_chain and result_chain.
-	* tree-vect-stmts.c (vectorizable_store): Only call
-	result_chain.create if j == 0.
-
-	PR middle-end/56461
-	* tree-vect-stmts.c (vect_create_vectorized_promotion_stmts): Call
-	vec_oprnds0->release (); rather than vec_oprnds0->truncate (0)
-	before overwriting it.
-
-2013-03-01  Tobias Burnus  <burnus@net-b.de>
-
-	* doc/extended.texi (C Extensions): Change order in @menu
-	to match @node.
-	(Other MIPS Built-in Functions): Move last MIPS entry before
-	"picoChip Built-in Functions".
-	(SH Built-in Functions): Move after RX Built-in Functions.
-	* doc/gcc.texi (Introduction): Change order in @menu to match @node.
-	* doc/md.texi (Constraints): Ditto.
-	* gty.texi (Type Information): Ditto.
-	(User-provided marking routines for template types): Make subsection.
-	* doc/invoke.texi (AArch64 Options): Move before
-	"Adapteva Epiphany Options".
-
-2013-02-28  Konstantin Serebryany  <konstantin.s.serebryany@gmail.com>
-	    Jakub Jelinek  <jakub@redhat.com>
-
-	PR sanitizer/56454
-	* asan.c (gate_asan): Lookup no_sanitize_address instead of
-	no_address_safety_analysis attribute.
-	* doc/extend.texi (no_address_safety_attribute): Rename to
-	no_sanitize_address attribute, mention no_address_safety_analysis
-	attribute as deprecated alias.
-
-2013-02-28  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56461
-	* tree-vectorizer.h (vect_get_slp_defs): Change 3rd argument
-	type to vec<vec<tree> > *.
-	* tree-vect-slp.c (vect_get_slp_defs): Likewise.  Change vec_defs
-	to be vec<tree> instead of vec<tree> *, set vec_defs
-	to vNULL and call vec_defs.create (number_of_vects), adjust other
-	uses of vec_defs.
-	* tree-vect-stmts.c (vect_get_vec_defs, vectorizable_call,
-	vectorizable_condition): Adjust vect_get_slp_defs callers.
-
-2013-02-28  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* config/aarch64/aarch64.c
-	(aarch64_float_const_representable): Remove unused variable.
-
-2013-02-28  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* config/aarch64/aarch64.c (aarch64_mangle_type): Make static.
-
-2013-02-28  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* config/aarch64/aarch64-builtins.c
-	(aarch64_init_simd_builtins): Make static.
-
-2013-02-28  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* config/aarch64/aarch64.c
-	(aarch64_simd_make_constant): Make static.
-
-2013-02-28  Martin Jambor  <mjambor@suse.cz>
-
-	* tree-sra.c (load_assign_lhs_subreplacements): Do not put replacements
-	with no initialization to the RHS of debug statements.
-
-2013-02-28  Martin Jambor  <mjambor@suse.cz>
-
-	PR tree-optimization/56294
-	* tree-sra.c (analyze_access_subtree): Create replacement declarations.
-	Adjust dumping.
-	(get_access_replacement): Do not call create_access_replacement.
-	Assert a replacement exists.
-	(get_repl_default_def_ssa_name): Create the replacement declaration
-	itself.
-
-2013-02-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
-
-	* config/arm/arm.c (arm_output_mi_thunk): Call final_start_function and
-	final_end_function.
-
-2013-02-28  Marek Polacek  <polacek@redhat.com>
-
-	PR rtl-optimization/56466
-	* loop-unroll.c (unroll_and_peel_loops): Call fix_loop_structure
-	if we're changing a loop.
-	(peel_loops_completely): Likewise.
-
-2013-02-28  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/55813
-	* doc/invoke.texi ([-Wctor-dtor-privacy]): Complete.
-
-2013-02-28  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR target/56445
-	* config/avr/avr.c (avr_init_builtins): Use 'n' instead of empty
-	macro parameters with: FX_FTYPE_FX, FX_FTYPE_FX_INT, INT_FTYPE_FX,
-	INTX_FTYPE_FX, FX_FTYPE_INTX.
-	* config/avr/builtins.def: Adjust respective DEF_BUILTIN.
-
-2013-02-28  Georg-Johann Lay  <avr@gjlay.de>
-
-	* avr/avr-mcus.def (ata5272, ata5505, attiny1634, ata6285)
-	(ata6286, atmega8a, atmega48pa, ata5790, ata5790n, ata5795)
-	(atmega164pa, atmega165pa, atmega168pa, atmega16hva, atmega16hvb)
-	(atmega16hvbrevb, atmega16m1, atmega16u4, atmega26hvg, atmega32a)
-	(atmega32a, atmega3250pa, atmega3290pa, atmega32c1, atmega32m1)
-	(atmega32u4, atmega32u6, atmega64a, atmega6490a, atmega6490p)
-	(atmega64c1, atmega64m1, atmega64rfa2, atmega64rfr2, atmega32hvb)
-	(atmega32hvbrevb, atmega16hva2, atmega48hvf, at90pwm161)
-	(atmega128a, atmega1284, atmxt112sl, atmxt224, atmxt224e)
-	(atmxt336s, atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4)
-	(atxmega32e5, atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3)
-	(atxmega64c3, atxmega64d4, atxmega128a3u, atxmega128b1)
-	(atxmega128b3, atxmega128c3, atxmega128d4, atmxt540s, atmxt540sreva)
-	(atxmega192a3u, atxmega192c3, atxmega256a3u, atxmega256c3)
-	(atxmega384c3, atxmega384d3, atxmega128a4u): New AVR_MCU.
-	(avrxmega6): Increase max flash segments from 5 to 6.
-	* config/avr/t-multilib: Regenerate.
-	* config/avr/avr-tables.opt: Regenerate.
-	* doc/avr-mmcu.texi: Regenerate.
-
-2013-02-28  Georg-Johann Lay  <avr@gjlay.de>
-
-	* config/avr/avr.h (device_to_arch): Rename to device_to_ld.
-	(avr_device_to_arch): Rename to avr_device_to_ld.
-	(avr_device_to_as): New prototype.
-	(EXTRA_SPEC_FUNCTIONS): Add device_to_as.
-	(ASM_SPEC): Use device_to_as to get -mmcu= and -mno-skip-bug=.
-	* config/avr/driver-avr.c (avr_device_to_as): New.
-	(avr_device_to_arch): Rename to avr_device_to_ld.
-
-2013-02-27  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56461
-	* tree-vect-data-refs.c (vect_permute_load_chain): Avoid using copy
-	method on dr_chain and result_chain.
-
-	PR middle-end/56461
-	* tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Call
-	pointer_set_destroy on not_executed_last_iteration.
-
-	PR middle-end/56461
-	* tree-vect-loop.c (vectorizable_reduction): Release vect_defs vector.
-
-	PR middle-end/56461
-	* ipa-pure-const.c (propagate): Use FOR_EACH_FUNCTION instead of
-	FOR_EACH_DEFINED_FUNCTION when freeing state.
-
-	PR middle-end/56461
-	* df-scan.c (df_insn_delete): Use df_scan_free_mws_vec before
-	pool_free.
-	(df_insn_rescan_debug_internal): Use df_scan_free_mws_vec before
-	overwriting it.
-
-	PR middle-end/56461
-	* ipa-cp.c (decide_whether_version_node): Call vec_free on
-	known_aggs[i].items and release known_aggs vector.
-
-	PR middle-end/56461
-	* ipa-reference.c (propagate): Free node_info even for alias nodes.
-
-2013-02-27  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
-
-	* config/microblaze/microblaze.c (microblaze_emit_compare):
-	Use xor for EQ/NE comparisions.
-	* config/microblaze/microblaze.md (cstoresf4): Add constraints
-	(cbranchsf4): Adjust operator to comparison_operator.
-
-2013-02-27  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56461
-	* tree-flow.h (edge_var_map_vector): Change into va_heap, vl_embed
-	vector.
-	* tree-ssa.c (redirect_edge_var_map_add): Use vec_safe_reserve and
-	vec_safe_push, always update *slot.
-	(redirect_edge_var_map_clear): Use vec_free.
-	(redirect_edge_var_map_dup): Use vec_safe_copy and vec_safe_reserve.
-	(free_var_map_entry): Use vec_free.
-	* tree-cfgcleanup.c (remove_forwarder_block_with_phi): Use
-	FOR_EACH_VEC_SAFE_ELT instead of FOR_EACH_VEC_ELT.
-
-2013-02-27  Andrey Belevantsev  <abel@ispras.ru>
-
-	PR middle-end/45472
-	* sel-sched-ir.c (merge_expr): Also change vinsn of merged expr
-	when the may_trap_p bit of the exprs being merged differs.
-	Reorder tests for speculativeness in the logical and operator.
-
-2013-02-27  Jakub Jelinek  <jakub@redhat.com>
-
-	* incpath.c (add_standard_paths): Use reconcat instead of concat
-	where appropriate and avoid leaking memory.
-
-	* opts.h: Include obstack.h.
-	(opts_concat): New prototype.
-	(opts_obstack): New declaration.
-	* opts.c (opts_concat): New function.
-	(opts_obstack): New variable.
-	(init_options_struct): Call gcc_init_obstack on opts_obstack.
-	(finish_options): Use opts_concat instead of concat
-	and XOBNEWVEC instead of XNEWVEC.
-	* opts-common.c (generate_canonical_option, decode_cmdline_option,
-	generate_option): Likewise.
-	* Makefile.in (OPTS_H): Depend on $(OBSTACK_H).
-	* lto-wrapper.c (main): Call gcc_init_obstack on opts_obstack.
-
-	PR target/56455
-	* stmt.c (expand_switch_as_decision_tree_p): If flag_pic
-	and ASM_OUTPUT_ADDR_DIFF_ELT isn't defined, return true.
-
-2013-02-26  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56461
-	* lra-spills.c (lra_spill): Free spill_hard_reg at the end.
-
-2013-02-26  Joern Rennecke  <joern.rennecke@embecosm.com>
-
-	* config/arm/arm.c (const_ok_for_dimode_op): Back out last change.
-	(arm_block_move_unaligned_straight): Likewise.
-	(arm_adjust_block_mem): Likewise.
-
-2013-02-26  Joern Rennecke  <joern.rennecke@embecosm.com>
-
-	PR target/48901
-	* config/lm32/lm32.c (gen_int_relational): Remove unused variables
-	temp, cond and label.
-	* config/lm32/lm32.md (ashlsi3): Remove unused variable one.
-
-	PR target/52500
-	* config/c6x/c6x.c (dbx_register_map): Change to unsigned.
-	* config/c6x/c6x.h (dbx_register_map): Update declaration.
-
-	PR target/52501
-	* config/cr16/cr16-protos.h: Move end of RTX_CODE guard below end
-	of prologue/epilogue functions.
-
-	PR target/52550
-	* config/tilegx/tilegx.c (tilegx_expand_prologue):
-	Remove unused variable cfa_offset.
-	* config/tilepro/tilepro.c (tilepro_expand_prologue): Likewise.
-
-	PR target/54639
-	* config/mn10300/mn10300.c (mn10300_expand_epilogue): Avoid offset
-	type promotion to unsigned.
-
-	PR target/54640
-	* config/arm/arm.c (const_ok_for_dimode_op): Make code consistent
-	for HOST_WIDE_INT of 32 bit / same size as int.
-	(arm_block_move_unaligned_straight): Likewise.
-	(arm_adjust_block_mem): Likewise.
-
-	PR target/54662
-	* config/mep/t-mep (mep-pragma.o): Use ALL_COMPILERFLAGS instead of
-	ALL_CFLAGS.
-
-2013-02-26  Marek Polacek  <polacek@redhat.com>
-
-	PR tree-optimization/56426
-	* tree-ssa-loop.c (tree_ssa_loop_init): Always call
-	scev_initialize.
-
-2013-02-26  Richard Biener  <rguenther@suse.de>
-
-	PR target/56444
-	* config/mn10300/mn10300.c (mn10300_scan_for_setlb_lcc): Remove
-	unused variable loops.
-
-2013-02-26  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56448
-	* fold-const.c (operand_equal_p) <case tcc_reference>: Don't look at
-	TREE_SIDE_EFFECTS if flags contain OEP_CONSTANT_ADDRESS_OF.
-	Clear OEP_CONSTANT_ADDRESS_OF from flags before recursing on second or
-	later operands of the references, or even first operand for
-	INDIRECT_REF, TARGET_MEM_REF or MEM_REF.
-
-	PR tree-optimization/56443
-	* tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): For
-	overaligned types, pass TYPE_UNSIGNED (scalar_type) as second argument
-	to type_for_mode langhook.
-
-2013-02-25  Matt Turner  <mattst88@gmail.com>
-
-	* doc/invoke.texi: Document r4700.
-
-2013-02-25  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56175
-	* tree-ssa-forwprop.c (hoist_conversion_for_bitop_p): New predicate,
-	split out from ...
-	(simplify_bitwise_binary): ... here.  Also guard the conversion
-	of (type) X op CST to (type) (X op ((type-x) CST)) with it.
-
-2013-02-25  Catherine Moore  <clm@codesourcery.com>
-
-	Revert:
-	2013-02-24  Catherine Moore  <clm@codesourcery.com>
-	    Maciej W. Rozycki  <macro@codesourcery.com>
-	    Tom de Vries  <tom@codesourcery.com>
-	    Nathan Sidwell  <nathan@codesourcery.com>
-	    Iain Sandoe  <iain@codesourcery.com>
-	    Nathan Froyd  <froydnj@codesourcery.com>
-	    Chao-ying Fu  <fu@mips.com>
-
-	* doc/extend.texi (micromips, nomicromips, nocompression):
-	Document new function attributes.
-	* doc/invoke.texi (minterlink-compressed, mmicromips,
-	m14k, m14ke, m14kec): Document new options.
-	(minterlink-mips16): Update documentation.
-	* doc/md.texi (ZC, ZD): Document new constraints.
-	* configure.ac (gcc_cv_as_micromips): Check if linker
-	supports the .set micromips directive.
-	* configure: Regenerate.
-	* config.in: Regenerate.
-	* config/mips/mips-tables.opt: Regenerate.
-	* config/mips/micromips.md: New file.
-	* constraints.md (ZC, AD): New constraints.
-	* config/mips/predicates.md (movep_src_register): New predicate.
-	(movep_src_operand): New predicate.
-	(non_volatile_mem_operand): New predicate.
-	* config/mips/mips.md (multimem): New type.
-	(length): Differentiate between 17-bit and 18-bit branch offsets.
-	(MOVEP1, MOVEP2): New mode iterator.
-	(mov_<load>l): Use ZC constraint.
-	(mov_<load>r): Likewise.
-	(mov_<store>l): Likewise.
-	(mov_<store>r): Likewise.
-	(*branch_equality<mode>_inverted): Add microMIPS support.
-	(*branch_equality<mode>): Likewise.
-	(*jump_absolute): Likewise.
-	(indirect_jump_<mode>): Likewise.
-	(tablejump_<mode>): Likewise.
-	(<optab>_internal): Likewise.
-	(sibcall_internal): Likewise.
-	(sibcall_value_internal): Likewise.
-	(prefetch): Use constraint ZD.
-	* config/mips/mips.opt (minterlink-compressed): New option.
-	(minterlink-mips16): Now an alias for minterlink-compressed.
-	(mmicromips): New option.
-	* config/mips/sync.md (sync_compare_and_swap<mode>): Use ZR constraint.
-	(compare_and_swap_12): Likewise.
-	(sync_add<mode>): Likewise.
-	(sync_<optab>_12): Likewise.
-	(sync_old_<optab>_12): Likewise.
-	(sync_new_<optab>_12): Likewise.
-	(sync_nand_12): Likewise.
-	(sync_old_nand_12): Likewise.
-	(sync_new_nand_12): Likewise.
-	(sync_sub<mode>): Likewise.
-	(sync_old_add<mode>): Likewise.
-	(sync_old_sub<mode>): Likewise.
-	(sync_new_add<mode>): Likewise.
-	(sync_new_sub<mode>): Likewise.
-	(sync_<optab><mode>): Likewise.
-	(sync_old_<optab><mode>): Likewise.
-	(sync_new_<optab><mode>): Likewise.
-	(sync_nand<mode>): Likewise.
-	(sync_old_nand<mode>): Likewise.
-	(sync_new_nand<mode>): Likewise.
-	(sync_lock_test_and_set<mode>): Likewise.
-	(test_and_set_12): Likewise.
-	(atomic_compare_and_swap<mode>): Likewise.
-	(atomic_exchange<mode>_llsc): Likewise.
-	(atomic_fetch_add<mode>_llsc): Likewise.
-	* config/mips/mips-cpus.def (m14kc, m14k): New processors.
-	* config/mips/mips-protos.h (umips_output_save_restore): New prototype.
-	(umips_save_restore_pattern_p): Likewise.
-	(umips_load_store_pair_p): Likewise.
-	(umips_output_load_store_pair): Likewise.
-	(umips_movep_target_p): Likewise.
-	(umips_12bit_offset_address_p): Likewise.
-	* config/mips/mips.c (MIPS_MAX_FIRST_STEP): Update for microMIPS.
-	(mips_base_mips16): Rename this...
-	(mips_base_compression_flags): ...to this. Update all uses.
-	(mips_attribute_table): Add micromips, nomicromips and nocompression.
-	(mips_mips16_decl_p): Delete.
-	(mips_nomips16_decl_p): Delete.
-	(mips_get_compress_on_flags): New function.
-	(mips_get_compress_off_flags): New function.
-	(mips_get_compress_mode): New function.
-	(mips_get_compress_on_name): New function.
-	(mips_get_compress_off_name): New function.
-	(mips_insert_attributes): Support multiple compression types.
-	(mips_merge_decl_attributes): Likewise.
-	(umips_12bit_offset_address_p): New function.
-	(mips_start_function_definition): Emit .set micromips directive.
-	(mips_call_may_need_jalx_p): New function.
-	(mips_function_ok_for_sibcall): Add microMIPS support.
-	(mips_print_operand_punctuation): Support short delay slots and
-	compact jumps.
-	(umips_swm_mask, umips_swm_encoding): New.
-	(umips_build_save_restore): New function.
-	(mips_for_each_saved_gpr_and_fpr): Add microMIPS support.
-	(was_mips16_p): Remove.
-	(old_compression_mode): New.
-	(mips_set_compression_mode): New function.
-	(mips_set_current_function): Add microMIPS support.
-	(mips_option_override): Likewise.
-	(umips_save_restore_pattern_p): New function.
-	(umips_output_save_restore): New function.
-	(umips_load_store_pair_p_1): New function.
-	(umips_load_store_pair_p): New function.
-	(umips_output_load_store_pair_1): New function.
-	(umips_output_load_store_pair): New function.
-	(umips_movep_target_p) New function.
-	(mips_prepare_pch_save): Add microMIPS support.
-	* config/mips/mips.h (TARGET_COMPRESSION): New.
-	(TARGET_CPU_CPP_BUILTINS): Update macro
-	to use new compression flags and to support microMIPS.
-	(MIPS_ISA_LEVEL_SPEC): Add m14k processors.
-	(MIPS_ARCH_FLOAT_SPEC): Likewise.
-	(ISA_HAS_LWXS): Include TARGET_MICROMIPS.
-	(ISA_HAS_LOAD_DELAY): Exclude TARGET_MICROMIPS.
-	(ASM_SPEC): Support mmicromips and mno-micromips.
-	(M16STORE_REG_P): New macro.
-	(MIPS_CALL): Support TARGET_MICROMIPS.
-	(MICROMIPS_J): New macro.
-	(mips_base_mips16): Rename this...
-	(mips_base_compression_flags): ...to this.
-	(UMIPS_12BIT_OFFSET_P): New macro.
-	* config/mips/t-sde: (MULTILIB_OPTIONS): Add microMIPS.
-	(MULTILIB_DIRNAMES): Likewise.
-
-2013-02-25  Tom de Vries  <tom@codesourcery.com>
-
-	PR rtl-optimization/56131
-	* insn-notes.def (INSN_NOTE_BASIC_BLOCK): Update comment.
-	* cfgrtl.c (delete_insn): Don't reorder NOTE_INSN_DELETED_LABEL and
-	NOTE_INSN_BASIC_BLOCK if BLOCK_FOR_INSN == NULL.
-
-2013-02-25  Tobias Burnus  <burnus@net-b.de>
-
-	* doc/invoke.texi (-fsanitize=): Move from optimization
-	to debugging options.
-
-2013-02-25  Andrey Belevantsev  <abel@ispras.ru>
-
-	* sched-deps.c (sched_analyze_insn): Fix typo in comment.
-
-2013-02-25  Andrey Belevantsev  <abel@ispras.ru>
-	    Alexander Monakov  <amonakov@ispras.ru>
-
-	PR middle-end/56077
-	* sched-deps.c (sched_analyze_insn): When reg_pending_barrier,
-	flush pending lists also on non-jumps.  Adjust comment.
-
-2013-02-24  Catherine Moore  <clm@codesourcery.com>
-	    Maciej W. Rozycki  <macro@codesourcery.com>
-	    Tom de Vries  <tom@codesourcery.com>
-	    Nathan Sidwell  <nathan@codesourcery.com>
-	    Iain Sandoe  <iain@codesourcery.com>
-	    Nathan Froyd  <froydnj@codesourcery.com>
-	    Chao-ying Fu  <fu@mips.com>
-
-	* doc/extend.texi (micromips, nomicromips, nocompression):
-	Document new function attributes.
-	* doc/invoke.texi (minterlink-compressed, mmicromips,
-	m14k, m14ke, m14kec): Document new options.
-	(minterlink-mips16): Update documentation.
-	* doc/md.texi (ZC, ZD): Document new constraints.
-	* configure.ac (gcc_cv_as_micromips): Check if linker
-	supports the .set micromips directive.
-	* configure: Regenerate.
-	* config.in: Regenerate.
-	* config/mips/mips-tables.opt: Regenerate.
-	* config/mips/micromips.md: New file.
-	* constraints.md (ZC, AD): New constraints.
-	* config/mips/predicates.md (movep_src_register): New predicate.
-	(movep_src_operand): New predicate.
-	(non_volatile_mem_operand): New predicate.
-	* config/mips/mips.md (multimem): New type.
-	(length): Differentiate between 17-bit and 18-bit branch offsets.
-	(MOVEP1, MOVEP2): New mode iterator.
-	(mov_<load>l): Use ZC constraint.
-	(mov_<load>r): Likewise.
-	(mov_<store>l): Likewise.
-	(mov_<store>r): Likewise.
-	(*branch_equality<mode>_inverted): Add microMIPS support.
-	(*branch_equality<mode>): Likewise.
-	(*jump_absolute): Likewise.
-	(indirect_jump_<mode>): Likewise.
-	(tablejump_<mode>): Likewise.
-	(<optab>_internal): Likewise.
-	(sibcall_internal): Likewise.
-	(sibcall_value_internal): Likewise.
-	(prefetch): Use constraint ZD.
-	* config/mips/mips.opt (minterlink-compressed): New option.
-	(minterlink-mips16): Now an alias for minterlink-compressed.
-	(mmicromips): New option.
-	* config/mips/sync.md (sync_compare_and_swap<mode>): Use ZR constraint.
-	(compare_and_swap_12): Likewise.
-	(sync_add<mode>): Likewise.
-	(sync_<optab>_12): Likewise.
-	(sync_old_<optab>_12): Likewise.
-	(sync_new_<optab>_12): Likewise.
-	(sync_nand_12): Likewise.
-	(sync_old_nand_12): Likewise.
-	(sync_new_nand_12): Likewise.
-	(sync_sub<mode>): Likewise.
-	(sync_old_add<mode>): Likewise.
-	(sync_old_sub<mode>): Likewise.
-	(sync_new_add<mode>): Likewise.
-	(sync_new_sub<mode>): Likewise.
-	(sync_<optab><mode>): Likewise.
-	(sync_old_<optab><mode>): Likewise.
-	(sync_new_<optab><mode>): Likewise.
-	(sync_nand<mode>): Likewise.
-	(sync_old_nand<mode>): Likewise.
-	(sync_new_nand<mode>): Likewise.
-	(sync_lock_test_and_set<mode>): Likewise.
-	(test_and_set_12): Likewise.
-	(atomic_compare_and_swap<mode>): Likewise.
-	(atomic_exchange<mode>_llsc): Likewise.
-	(atomic_fetch_add<mode>_llsc): Likewise.
-	* config/mips/mips-cpus.def (m14kc, m14k): New processors.
-	* config/mips/mips-protos.h (umips_output_save_restore): New prototype.
-	(umips_save_restore_pattern_p): Likewise.
-	(umips_load_store_pair_p): Likewise.
-	(umips_output_load_store_pair): Likewise.
-	(umips_movep_target_p): Likewise.
-	(umips_12bit_offset_address_p): Likewise.
-	* config/mips/mips.c (MIPS_MAX_FIRST_STEP): Update for microMIPS.
-	(mips_base_mips16): Rename this...
-	(mips_base_compression_flags): ...to this. Update all uses.
-	(mips_attribute_table): Add micromips, nomicromips and nocompression.
-	(mips_mips16_decl_p): Delete.
-	(mips_nomips16_decl_p): Delete.
-	(mips_get_compress_on_flags): New function.
-	(mips_get_compress_off_flags): New function.
-	(mips_get_compress_mode): New function.
-	(mips_get_compress_on_name): New function.
-	(mips_get_compress_off_name): New function.
-	(mips_insert_attributes): Support multiple compression types.
-	(mips_merge_decl_attributes): Likewise.
-	(umips_12bit_offset_address_p): New function.
-	(mips_start_function_definition): Emit .set micromips directive.
-	(mips_call_may_need_jalx_p): New function.
-	(mips_function_ok_for_sibcall): Add microMIPS support.
-	(mips_print_operand_punctuation): Support short delay slots and
-	compact jumps.
-	(umips_swm_mask, umips_swm_encoding): New.
-	(umips_build_save_restore): New function.
-	(mips_for_each_saved_gpr_and_fpr): Add microMIPS support.
-	(was_mips16_p): Remove.
-	(old_compression_mode): New.
-	(mips_set_compression_mode): New function.
-	(mips_set_current_function): Add microMIPS support.
-	(mips_option_override): Likewise.
-	(umips_save_restore_pattern_p): New function.
-	(umips_output_save_restore): New function.
-	(umips_load_store_pair_p_1): New function.
-	(umips_load_store_pair_p): New function.
-	(umips_output_load_store_pair_1): New function.
-	(umips_output_load_store_pair): New function.
-	(umips_movep_target_p) New function.
-	(mips_prepare_pch_save): Add microMIPS support.
-	* config/mips/mips.h (TARGET_COMPRESSION): New.
-	(TARGET_CPU_CPP_BUILTINS): Update macro
-	to use new compression flags and to support microMIPS.
-	(MIPS_ISA_LEVEL_SPEC): Add m14k processors.
-	(MIPS_ARCH_FLOAT_SPEC): Likewise.
-	(ISA_HAS_LWXS): Include TARGET_MICROMIPS.
-	(ISA_HAS_LOAD_DELAY): Exclude TARGET_MICROMIPS.
-	(ASM_SPEC): Support mmicromips and mno-micromips.
-	(M16STORE_REG_P): New macro.
-	(MIPS_CALL): Support TARGET_MICROMIPS.
-	(MICROMIPS_J): New macro.
-	(mips_base_mips16): Rename this...
-	(mips_base_compression_flags): ...to this.
-	(UMIPS_12BIT_OFFSET_P): New macro.
-	* config/mips/t-sde: (MULTILIB_OPTIONS): Add microMIPS.
-	(MULTILIB_DIRNAMES): Likewise.
-
-2013-02-24  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/52555
-	* target-globals.c (save_target_globals): For init_reg_sets and
-	target_reinit remporarily set this_fn_optabs to this_target_optabs.
-
-2013-02-22  James Grennahlgh  <james.greenhalgh@arm.com>
-
-	* config/aarch64/aarch64-simd-builtins.def: Add copyright header.
-	* config/aarch64/t-aarch64
-	(aarch64-builtins.o): Depend on aarch64-simd-builtins.def.
-
-2013-02-22  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR inline-asm/56148
-	* lra-constraints.c (process_alt_operands): Reload operand
-	conflicting with earlier clobber only if no more other conflicting
-	operands.
-
-2013-02-22  Jakub Jelinek  <jakub@redhat.com>
-
-	PR sanitizer/56393
-	* config/gnu-user.h (LIBASAN_EARLY_SPEC): Link in libasan_preinit.o
-	if not linking a shared library.
-
-2013-02-22  Seth LaForge  <sethml@google.com>
-
-	* config.gcc (arm*-*-eabi*): Treat arm*eb as big-endian.
-
-2013-02-22  Greta Yorsh  <Greta.Yorsh@arm.com>
-
-	* config/arm/arm.md (split for extendsidi): Update condition.
-	(zero_extend<mode>di2,extend<mode>di2): Add an alternative.
-	* config/arm/iterators.md (qhs_extenddi_cstr): Likewise.
-	(qhs_zextenddi_cstr): Likewise.
-
-2013-02-21  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56420
-	* expmed.c (EXACT_POWER_OF_2_OR_ZERO_P): Do subtraction in uhwi, to
-	avoid signed wrapping.
-	(expand_mult): Handle properly multiplication by
-	((dword_type) -1) << (BITS_PER_WORD - 1).  Improve multiplication by
-	((dword_type) 1) << (BITS_PER_WORD - 1).  Avoid undefined behavior
-	in the compiler if coeff is HOST_WIDE_INT_MIN.
-	(expand_divmod): Don't make ext_op1 static, change it's type to uhwi.
-	Avoid undefined behavior in -INTVAL (op1).
-
-	PR rtl-optimization/50339
-	* lower-subreg.h (struct lower_subreg_choices): Add splitting_ashiftrt
-	field.
-	* lower-subreg.c (compute_splitting_shift): Handle ASHIFTRT.
-	(compute_costs): Call compute_splitting_shift also for ASHIFTRT
-	into splitting_ashiftrt field.
-	(find_decomposable_shift_zext, resolve_shift_zext): Handle also
-	ASHIFTRT.
-	(dump_choices): Fix up printing LSHIFTRT choices, print ASHIFTRT
-	choices.
-
-2013-02-20  Aldy Hernandez  <aldyh@redhat.com>
-
-	PR middle-end/56108
-	* trans-mem.c (execute_tm_mark): Do not expand transactions that
-	are sure to go irrevocable.
-
-2013-02-21  Hans-Peter Nilsson  <hp@axis.com>
-
-	* doc/rtl.texi (vec_concat, vec_duplicate): Mention that
-	scalars are valid operands.
-
-2013-02-21  Martin Jambor  <mjambor@suse.cz>
-
-	PR tree-optimization/56310
-	* ipa-cp.c (agg_replacements_to_vector): New parameter index, copy
-	only matching indices and non-negative final offsets.
-	(intersect_aggregates_with_edge): Pass src_idx to
-	agg_replacements_to_vector.  Pass src_idx insstead of index to
-	intersect_with_agg_replacements.
-
-2013-02-21  Martin Jambor  <mjambor@suse.cz>
-
-	* ipa-cp.c (good_cloning_opportunity_p): Dump the real threshold
-	instead of hard-wired defaults.
-
-2013-02-21  Maciej W. Rozycki  <macro@codesourcery.com>
-
-	* doc/invoke.texi (MIPS Options): Update documentation of the
-	floating-point multiply-accumulate instruction restrictions.
-
-2013-02-21  Kostya Serebryany  <kcc@google.com>
-
-	* config/i386/i386.c (ix86_asan_shadow_offset): Use 0x7fff8000 as
-	asan_shadow_offset on x86_64 linux.
-
-2013-02-21  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56415
-	Revert
-	2013-02-11  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56273
-	* tree-vrp.c (simplify_cond_using_ranges): Disable for the
-	first VRP run.
-
-2013-02-21  Jakub Jelinek  <jakub@redhat.com>
-
-	PR bootstrap/56258
-	* doc/invoke.texi (-fdump-rtl-pro_and_epilogue): Use @item
-	instead of @itemx.
-
-	PR inline-asm/56405
-	* expr.c (expand_expr_real_1) <case TARGET_MEM_REF, MEM_REF>: Don't
-	use movmisalign or extract_bit_field for EXPAND_MEMORY modifier.
-
-2013-02-20  Jan Hubicka  <jh@suse.cz>
-
-	PR tree-optimization/56265
-	* ipa-prop.c (ipa_make_edge_direct_to_target): Fixup callgraph when
-	target is referenced for first time.
-
-2013-02-20  Richard Biener  <rguenther@suse.de>
-
-	* tree-call-cdce.c (tree_call_cdce): Do not remove unused locals.
-	* tree-ssa-forwprop.c (ssa_forward_propagate_and_combine): Likewise.
-	* tree-ssa-dce.c (perform_tree_ssa_dce): Likewise.
-	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Do
-	not return anything.
-	(rename_ssa_copies): Do not remove unused locals.
-	* tree-ssa-ccp.c (do_ssa_ccp): Likewise.
-	* tree-ssanames.c (pass_release_ssa_names): Remove unused locals first.
-	* passes.c (execute_function_todo): Do not schedule unused locals
-	removal if cleanup_tree_cfg did something.
-	* tree-ssa-live.c (remove_unused_locals): Dump statistics
-	about the number of removed locals.
-
-2013-02-20  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56398
-	* tree-vect-loop-manip.c (adjust_debug_stmts): Skip
-	SSA default defs.
-
-2013-02-20  Martin Jambor  <mjambor@suse.cz>
-
-	PR tree-optimization/55334
-	* ipa-cp.c (initialize_node_lattices): Disable IPA-CP through and to
-	restricted pointers to arrays.
-
-2013-02-20  Richard Biener  <rguenther@suse.de>
-	Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56396
-	* tree-ssa-ccp.c (n_const_val): New static variable.
-	(get_value): Return NULL for SSA names we don't have a lattice
-	entry for.
-	(ccp_initialize): Initialize n_const_val.
-	* tree-ssa-copy.c (n_copy_of): New static variable.
-	(init_copy_prop): Initialize n_copy_of.
-	(get_value): Return NULL_TREE for SSA names we don't have a
-	lattice entry for.
-
-2013-02-20  Martin Jambor  <mjambor@suse.cz>
-
-	* ipa-cp.c (initialize_node_lattices): Fix dumping condition.
-
-2013-02-20  Richard Biener  <rguenther@suse.de>
-
-	* genpreds.c (write_lookup_constraint): Do not compare first
-	letter of the constraint again.
-
-2013-02-20  Richard Biener  <rguenther@suse.de>
-
-	* tree-ssa-loop-ivopts.c (alloc_use_cost_map): Use bitmap_count_bits
-	and ceil_log2.
-	(get_use_iv_cost): Terminate hashtable walk when coming across
-	an empty entry.
-
-2013-02-20  Igor Zamyatin  <igor.zamyatin@intel.com>
-
-	* config/i386/i386.c (initial_ix86_tune_features): Turn on fp
-	reassociation for avx2 targets.
-
-2012-02-19  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
-
-	* config/microblaze/microblaze.c: microblaze_has_clz = 0
-	Add version check for v8.10.a to enable microblaze_has_clz
-	* config/microblaze/microblaze.h: Add TARGET_HAS_CLZ as combined
-	version and TARGET_PATTERN_COMPARE check
-	* config/microblaze/microblaze.md: New clzsi2 instruction
-
-2012-02-19  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
-
-	* config/microblaze/microblaze.md (call_value_intern): Check symbol is
-	function before branching.
-
-2012-02-19  Andrey Belevantsev  <abel@ispras.ru>
-
-	* sel-sched-dump.c (dump_insn_rtx_flags): Explicitly set
-	DUMP_INSN_RTX_UID.
-	(dump_insn_rtx_1): Pass PATTERN (insn) to str_pattern_slim.
-
-2012-02-19  Andrey Belevantsev  <abel@ispras.ru>
-
-	PR middle-end/55889
-	* sel-sched.c: Include ira.h.
-	(implicit_clobber_conflict_p): New function.
-	(moveup_expr): Use it.
-	* Makefile.in (sel-sched.o): Depend on ira.h.
-
-2013-02-19  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56384
-	* tree-ssa-sccvn.h (struct vn_phi_s): Add type member.
-	(vn_hash_type): Split out from ...
-	(vn_hash_constant_with_type): ... here.
-	* tree-ssa-sccvn.c (vn_phi_compute_hash): Use vn_hash_type.
-	(vn_phi_eq): Compare types from vn_phi_s structure.
-	(vn_phi_lookup): Populate vn_phi_s type.
-	(vn_phi_insert): Likewise.
-
-2013-02-19  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56350
-	* tree-vect-loop.c (vectorizable_reduction): If orig_stmt, return false
-	if haven't found reduction or nested cycle operand, rather than
-	asserting we must find it.
-
-	PR tree-optimization/56381
-	* tree-ssa-pre.c (create_expression_by_pieces): Fix up last argument
-	to fold_build3.
-
-2013-02-18  Aldy Hernandez  <aldyh@redhat.com>
-	    Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/52555
-	* genopinit.c (raw_optab_handler): Use this_fn_optabs.
-	(swap_optab_enable): Same.
-	(init_all_optabs): Use argument instead of global.
-	* tree.h (struct tree_optimization_option): New field target_optabs.
-	* expr.h (init_all_optabs): Add argument to prototype.
-	(TREE_OPTIMIZATION_OPTABS): New.
-	(save_optabs_if_changed): Protoize.
-	* optabs.h: Declare this_fn_optabs.
-	* optabs.c (save_optabs_if_changed): New.
-	Declare this_fn_optabs.
-	(init_optabs): Add argument to init_all_optabs() call.
-	* function.c (invoke_set_current_function_hook): Handle per
-	function optabs.
-	* function.h (struct function): New field optabs.
-	* config/mips/mips.c (mips_set_mips16_mode): Handle when
-	optimization_current_node has changed.
-	* target-globals.h (save_target_globals_default_opts): Protoize.
-	* target-globals.c (save_target_globals_default_opts): New.
-
-2013-02-18  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
-
-	PR target/56347
-	* config/pa/pa.c (pa_conditional_register_usage): On HP-UX, mark
-	registers %fr12 and %fr12R as call used.
-
-	PR target/56214
-	* config/pa/predicates.md (base14_operand): Except for BLKmode, QImode
-	and HImode, require all displacements to be an integer multiple of
-	their mode size.
-	* config/pa/pa.c (pa_legitimate_address_p): For REG+BASE addresses,
-	only allow QImode and HImode when reload is in progress and strict is
-	true.  Likewise for symbolic addresses.  Use base14_operand to check
-	displacements in REG+BASE addresses.
-
-2013-02-18  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56366
-	* tree-vect-loop.c (get_initial_def_for_induction): Properly
-	handle sign-conversion of outer-loop initial induction value.
-
-2013-02-18  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/56349
-	* cfghooks.c (merge_blocks): If we merge a latch into another
-	block adjust references to it.
-	* cfgloop.c (flow_loops_find): Reset latch before recomputing it.
-	(verify_loop_structure): Verify that a recorded latch is in fact
-	a latch.
-
-2013-02-18  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56321
-	* tree-ssa-reassoc.c (propagate_op_to_single_use): Properly
-	order SSA name release and virtual operand unlinking.
-
-2013-02-17  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
-
-	* config/microblaze/microblaze.md (save_stack_block): Define.
-	(restore_stack_block): Likewise.
-
-2013-02-16  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
-
-	* config/microblaze/linux.h (TARGET_SUPPORTS_PIC): Define as 1.
-	* config/microblaze/microblaze.h (TARGET_SUPPORTS_PIC): Define as 1.
-	* config/microblaze/microblaze.c (microblaze_option_override):
-	Bail out early for PIC modes when target does not support PIC.
-
-2013-02-16  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
-
-	* config/microblaze/microblaze.c (microblaze_asm_trampoline_template):
-	Replace with a microblaze version.
-	(microblaze_trampoline_init): Adapt for microblaze.
-	* config/microblaze/microblaze.h (TRAMPOLINE_SIZE): Adapt for
-	microblaze.
-
-2013-02-16  Jakub Jelinek  <jakub@redhat.com>
-	    Dodji Seketeli  <dodji@redhat.com>
-
-	PR asan/56330
-	* asan.c (get_mem_refs_of_builtin_call): White space and style
-	cleanup.
-	(instrument_mem_region_access): Do not forget to always put
-	instrumentation of the of 'base' and 'base + len' in a "if (len !=
-	0) statement, even for cases where either 'base' or 'base + len'
-	are not instrumented -- because they have been previously
-	instrumented.  Simplify the logic by putting all the statements
-	instrument 'base + len' inside a sequence, and then insert that
-	sequence right before the current insertion point.  Then, to
-	instrument 'base + len', just get an iterator on that statement.
-	And do not forget to update the pointer to iterator the function
-	received as argument.
-
-2013-02-15  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/56348
-	* lra-assigns.c (reload_pseudo_compare_func): Prefer bigger pseudos.
-
-2013-02-15  Steven Bosscher  <steven@gcc.gnu.org>
-
-	* graph.c (start_graph_dump): Print dumpfile base as digraph label.
-	(clean_graph_dump_file): Pass base to start_graph_dump.
-
-2013-02-14  Richard Henderson  <rth@redhat.com>
-
-	PR target/55941
-	* lower-subreg.c (simple_move): Check dest mode instead of src mode.
-
-2013-02-14  Steven Bosscher  <steven@gcc.gnu.org>
-
-	* collect2-aix.h: Define F_LOADONLY.
-
-2013-02-14  Richard Biener  <rguenther@suse.de>
-
-	PR lto/50494
-	* varasm.c (output_constant_def_1): Get the decl representing
-	the constant as argument.
-	(output_constant_def): Wrap output_constant_def_1.
-	(make_decl_rtl): Use output_constant_def_1 with the decl
-	representing the constant.
-	(build_constant_desc): Optionally re-use a decl already
-	representing the constant.
-	(tree_output_constant_def): Adjust.
-
-2013-02-14  Dodji Seketeli  <dodji@redhat.com>
-
-	Fix an asan crash
-	* asan.c (instrument_builtin_call):  Really put the length of the
-	second source argument into src1_len.
-
-2013-02-13  Jakub Jelinek  <jakub@redhat.com>
-
-	* asan.c (create_cond_insert_point): Add create_then_fallthru_edge
-	argument.  If it is false, don't create edge from then_bb to
-	fallthru_bb.
-	(insert_if_then_before_iter): Pass true to it.
-	(build_check_stmt): Pass false to it.
-	(transform_statements): Flush hash table only on extended basic
-	block boundaries, rather than at the beginning of every bb.
-	Don't flush hash table on nonfreeing_call_p calls.
-	* tree-flow.h (nonfreeing_call_p): New prototype.
-	* tree-ssa-phiopt.c (nonfreeing_call_p): No longer static.
-
-2013-02-13  David S. Miller  <davem@davemloft.net>
-
-	* expmed.c (expand_shift_1): Only strip scalar integer subregs.
-
-2013-02-13  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR target/56184
-	* ira.c (max_regno_before_ira): Move from ...
-	(ira): ... here.
-	(fix_reg_equiv_init): Use max_regno_before_ira instead of
-	vec_safe_length.
-
-2013-02-13  Jakub Jelinek  <jakub@redhat.com>
-
-	* config/i386/i386.c (ix86_asan_shadow_offset): Revert last change.
-
-2013-02-13  Richard Biener  <rguenther@suse.de>
-
-	PR lto/56295
-	* gimple-streamer-out.c (output_gimple_stmt): Undo wrapping
-	globals in MEM_REFs.
-
-2013-02-13  Richard Biener  <rguenther@suse.de>
-
-	* loop-init.c (loop_optimizer_init): Clear loop state when
-	re-initializing preserved loops.
-	* loop-unswitch.c (unswitch_single_loop): Return whether
-	we unswitched the loop.  Do not verify loop state here.
-	(unswitch_loops): When we unswitched a loop discover new
-	loops.
-
-2013-02-13  Kostya Serebryany  <kcc@google.com>
-
-	* config/i386/i386.c: Use 0x7fff8000 as asan_shadow_offset on x86_64
-	linux.
-	* sanitizer.def: Rename __asan_init to __asan_init_v1.
-
-2013-02-12  Dodji Seketeli  <dodji@redhat.com>
-
-	Avoid instrumenting duplicated memory access in the same basic block
-	* Makefile.in (asan.o): Add new dependency on hash-table.h
-	* asan.c (struct asan_mem_ref, struct mem_ref_hasher): New types.
-	(asan_mem_ref_init, asan_mem_ref_get_end, get_mem_ref_hash_table)
-	(has_stmt_been_instrumented_p, empty_mem_ref_hash_table)
-	(free_mem_ref_resources, has_mem_ref_been_instrumented)
-	(has_stmt_been_instrumented_p, update_mem_ref_hash_table)
-	(get_mem_ref_of_assignment): New functions.
-	(get_mem_refs_of_builtin_call): Extract from
-	instrument_builtin_call and tweak a little bit to make it fit with
-	the new signature.
-	(instrument_builtin_call): Use the new
-	get_mem_refs_of_builtin_call.  Use gimple_call_builtin_p instead
-	of is_gimple_builtin_call.
-	(instrument_derefs, instrument_mem_region_access): Insert the
-	instrumented memory reference into the hash table.
-	(maybe_instrument_assignment): Renamed instrument_assignment into
-	this, and change it to advance the iterator when instrumentation
-	actually happened and return true in that case.  This makes it
-	homogeneous with maybe_instrument_assignment, and thus give a
-	chance to callers to be more 'regular'.
-	(transform_statements): Clear the memory reference hash table
-	whenever we enter a new BB, when we cross a function call, or when
-	we are done transforming statements.  Use
-	maybe_instrument_assignment instead of instrumentation.  No more
-	need to special case maybe_instrument_assignment and advance the
-	iterator after calling it; it's now handled just like
-	maybe_instrument_call.  Update comment.
-
-2013-02-13  Richard Biener  <rguenther@suse.de>
-
-	* config/mn10300/mn10300.c (mn10300_scan_for_setlb_lcc):
-	Fix loop discovery code.
-
-2013-02-12  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR inline-asm/56148
-	* lra-constraints.c (process_alt_operands): Match early clobber
-	operand with itself.  Check conflicts with earlyclobber only if
-	the operand is not reloaded.  Prefer to reload conflicting operand
-	if earlyclobber and matching operands are the same.
-
-2013-02-12  Richard Biener  <rguenther@suse.de>
-
-	PR lto/56297
-	* lto-streamer-out.c (write_symbol): Do not output symbols
-	for hard register variables.
-
-2013-02-12  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR target/54222
-	* config/avr/avr-dimode.md (umulsidi3, mulsidi3): New expanders.
-	(umulsidi3_insn, mulsidi3_insn): New insns.
-
-2013-02-12  Christophe Lyon  <christophe.lyon@linaro.org>
-
-	* config/arm/arm-protos.h (struct cpu_vec_costs): New struct type.
-	(struct tune_params): Add vec_costs field.
-	* config/arm/arm.c (arm_builtin_vectorization_cost)
-	(arm_add_stmt_cost): New functions.
-	(TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST)
-	(TARGET_VECTORIZE_ADD_STMT_COST): Define.
-	(arm_default_vec_cost): New struct of type cpu_vec_costs.
-	(arm_slowmul_tune, arm_fastmul_tune, arm_strongarm_tune)
-	(arm_xscale_tune, arm_9e_tune, arm_v6t2_tune, arm_cortex_tune)
-	(arm_cortex_a15_tune, arm_cortex_a5_tune, arm_cortex_a9_tune)
-	(arm_v6m_tune, arm_fa726te_tune): Define new vec_costs field.
-
-2013-02-12  Richard Biener  <rguenther@suse.de>
-
-	PR lto/56295
-	* gimple-streamer-in.c (input_gimple_stmt): Strip MEM_REFs off
-	decls again if possible.
-
-2013-02-12  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/56288
-	* tree-ssa.c (verify_ssa_name): Fix check, move
-	SSA_NAME_IN_FREE_LIST check up.
-
-2013-02-12  Jakub Jelinek  <jakub@redhat.com>
-	    Steven Bosscher   <steven@gcc.gnu.org>
-
-	PR rtl-optimization/56151
-	* optabs.c (add_equal_note): Don't return 0 if target is a MEM,
-	equal to op0 or op1, and last_insn pattern is CODE operation
-	with MEM dest and one of the operands matches that MEM.
-
-2013-02-11  Sriraman Tallam  <tmsriramgoogle.com>
-
-	* doc/extend.texi: Document Function Multiversioning and "default"
-	parameter string to target attribute.
-	* config/i386/i386.c (get_builtin_code_for_version): Return 0 if
-	target attribute parameter is "default".
-	(ix86_compare_version_priority): Remove checks for target attribute.
-	(ix86_mangle_function_version_assembler_name): Change error to sorry.
-	Remove check for target attribute equal to NULL. Add assert.
-	(ix86_generate_version_dispatcher_body): Change error to sorry.
-
-2013-02-11  Iain Sandoe  <iain@codesourcery.com>
-	    Jack Howarth  <howarth@bromo.med.uc.edu>
-	    Patrick Marlier  <patrick.marlier@gmail.com>
-
-	PR libitm/55693
-	* config/darwin.h: Replace ENDFILE_SPEC with TM_DESTRUCTOR and
-	define ENDFILE_SPEC as TM_DESTRUCTOR.
-	* config/i386/darwin.h (ENDFILE_SPEC): Use TM_DESTRUCTOR.
-
-2013-02-11  Alexander Potapenko  <glider@google.com>
-	    Jack Howarth  <howarth@bromo.med.uc.edu>
-	    Jakub Jelinek  <jakub@redhat.com>
-
-	PR sanitizer/55617
-	* config/darwin.c (cdtor_record): Rename ctor_record.
-	(sort_cdtor_records): Rename sort_ctor_records.
-	(finalize_dtors): New routine to sort destructors by
-	priority before use in assemble_integer.
-	(machopic_asm_out_destructor): Use finalize_dtors if needed.
-
-2013-02-11  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR rtl-optimization/56275
-	* simplify-rtx.c (avoid_constant_pool_reference): Check that
-	offset is non-negative and less than cmode size before
-	calling simplify_subreg.
-
-2013-02-11  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56264
-	* cfgloop.h (fix_loop_structure): Adjust prototype.
-	* loop-init.c (fix_loop_structure): Return the number of
-	newly discovered loops.
-	* tree-cfgcleanup.c (repair_loop_structures): When new loops
-	are discovered, do a full loop-closed SSA rewrite.
-
-2013-02-11  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56273
-	* tree-vrp.c (simplify_cond_using_ranges): Disable for the
-	first VRP run.
-	(check_array_ref): Fix missing newline in dumps.
-	(search_for_addr_array): Likewise.
-
-2013-02-09  David Edelsohn  <dje.gcc@gmail.com>
-
-	* config/rs6000/aix61.h (OS_MISSING_ALTIVEC): Undefine.
-
-2013-02-09  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/56256
-	* config/rs6000/rs6000.h (ASSEMBLER_DIALECT): Define.
-
-2013-02-08  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/56246
-	* lra-constraints.c (simplify_operand_subreg): Try to reuse
-	reload pseudo.
-	* lra.c (lra): Clear lra_optional_reload_pseudos only when all
-	constraints are satisfied.
-
-2013-02-08  Jeff Law  <law@redhat.com>
-
-	PR debug/53948
-	* emit-rtl.c (reg_is_parm_p): New function.
-	* regs.h (reg_is_parm_p): New prototype.
-	* ira-conflicts.c (ira_build_conflicts): Allow parameters in
-	callee-clobbered registers.
-
-2013-02-08  Michael Meissner  <meissner@linux.vnet.ibm.com>
-
-	PR target/56043
-	* config/rs6000/rs6000.c (rs6000_builtin_vectorized_libmass):
-	If there is no implicit builtin declaration, just return NULL.
-
-2013-02-08  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/sse.md (FMAMODEM): New mode iterator.
-	(fma<mode>4, fms<mode>4, fnma<mode>4, fnms<mode>4): Use FMAMODEM
-	mode iterator. Do not use TARGET_SSE_MATH in insn constraint.
-
-2013-02-08  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/gnu-user.h (TARGET_CAN_SPLIT_STACK): Define only
-	when HAVE_GAS_CFI_PERSONALITY_DIRECTIVE is set.
-	* config/i386/gnu-user64.h (TARGET_CAN_SPLIT_STACK): Ditto.
-
-2013-02-08  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
-
-	* config.gcc (microblaze*-linux*): Add TARGET_BIG_ENDIAN_DEFAULT.
-	(microblaze*-*-elf): Likewise.
-	* config/microblaze/linux.h: Add -mbig-endian / -mlittle-endian to
-	LINK_SPEC.
-	* config/microblaze/microblaze-c.c: Add builtin defines for
-	_LITTLE_ENDIAN and _BIG_ENDIAN.
-	* config/microblaze/microblaze.h: Add TARGET_ENDIAN_DEFAULT and
-	add to TARGET_DEFAULT flags.
-	Expand ASM_SPEC and LINK_SPEC.
-	Update BYTES_BIG_ENDIAN and WORDS_BIG_ENDIAN.
-	* config/microblaze/microblaze.md: Update extendsidi2 and
-	movdi_internal instructions to use low-order / high-order reg
-	print_operands.
-	* config/microblaze/microblaze.opt: Add mbig-endian and mlittle-endian
-	options and inversemask / mask of LITTLE_ENDIAN.
-	* config/microblaze/t-microblaze: Expand multilib options to
-	include mlittle-endian (le) and update exceptions patterns.
-
-2013-02-08  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/56195
-	* lra-constraints.c (get_reload_reg): Don't reuse regs
-	if they have smaller mode than requested, if they have
-	wider mode than requested, try to return a SUBREG.
-
-	PR tree-optimization/56250
-	* fold-const.c (extract_muldiv_1) <case NEGATE_EXPR>: Don't optimize
-	if type is unsigned and code isn't MULT_EXPR.
-
-2013-02-08  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR tree-optimization/56064
-	* fixed-value.c (fixed_from_double_int): Sign/zero extend payload
-	bits according to mode.
-	* fixed-value.h (fixed_from_double_int)
-	(const_fixed_from_double_int): Adjust comments.
-
-2013-02-08  Richard Biener  <rguenther@suse.de>
-
-	PR lto/56231
-	* lto-streamer.h (struct data_in): Remove current_file, current_line
-	and current_col members.
-	* lto-streamer-out.c (lto_output_location): Stream changed bits
-	en-block for efficiency.
-	* lto-streamer-in.c (clear_line_info): Remove.
-	(lto_input_location): Cache current file, line and column
-	globally via local statics.  Read changed bits en-block.
-	(input_function): Do not call clear_line_info.
-	(lto_read_body): Likewise.
-	(lto_input_toplevel_asms): Likewise.
-
-2013-02-08  Michael Matz  <matz@suse.de>
-
-	PR tree-optimization/52448
-	* tree-ssa-phiopt.c (struct name_to_bb): Add phase member.
-	(nt_call_phase): New static.
-	(add_or_mark_expr): Only mark accesses with newer phase than any
-	call seen.
-	(nonfreeing_call_p): New.
-	(nt_init_block): Update nt_call_phase, mark blocks as visited.
-	(nt_fini_block): Keep blocks marked as visited.
-	(get_non_trapping): Initialize nt_call_phase, and reset aux pointer.
-
-2013-02-08  Richard Biener  <rguenther@suse.de>
-
-	* ira.c (ira): Free broken dominator information.
-
-2013-02-08  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/i386.c (ix86_spill_class): Use INTEGER_CLASS_P macro.
-
-2013-02-08  Marek Polacek  <polacek@redhat.com>
-
-	* cfgloop.c (verify_loop_structure): Add more checking of headers.
-
-2013-02-08  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/56181
-	* cfgloop.h (flow_loops_find): Adjust.
-	(bb_loop_header_p): Declare.
-	* cfgloop.c (bb_loop_header_p): New function split out from ...
-	(flow_loops_find): ... here.  Adjust function signature,
-	support incremental loop structure update.
-	(verify_loop_structure): Cleanup.  Verify a loop is a loop.
-	* cfgloopmanip.c (fix_loop_structure): Move ...
-	* loop-init.c (fix_loop_structure): ... here.
-	(apply_loop_flags): Split out from ...
-	(loop_optimizer_init): ... here.
-	(fix_loop_structure): Use apply_loop_flags.  Use flow_loops_find
-	in incremental mode, only remove dead loops here.
-
-2013-02-08  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR target/54222
-	* config/avr/avr.md (unspec) <UNSPEC_ROUND>: Add.
-	* config/avr/avr-fixed.md (ALL4QA, ALL124QA): New mode iterators.
-	(round<mode>3, round<mode>3_const): New expanders for fixed-mode.
-	(*round<mode>3.libgcc): New insns for fixed-modes.
-	* config/avr/builtins.def (ABSxx): Use a non-NULL LIBNAME.
-	(ROUNDxx, COUNTLSxx, BITSxx, xxBITS): New DEF_BUILTINs.
-	(ROUNDFX, COUNTLSFX, ABSFX): New DEF_BUILTINs.
-	* config/avr/stdfix.h (absFX, bitsFX, FXbits): Remove inline
-	implementations.  Define to __builtin_avr_absFX,
-	__builtin_avr_bitsFX, __builtin_avr_FXbits, respectively.
-	(roundFX, countlsFX): Define to __builtin_avr_roundFX,
-	__builtin_avr_countlsFX, respectively.
-	* config/avr/avr-c.c (target.h): Include it.
-	(enum avr_builtin_id): New enum.
-	(avr_resolve_overloaded_builtin): New static function.
-	(avr_register_target_pragmas): Use it to set
-	targetm.resolve_overloaded_builtin.
-	* config/avr/avr.c (avr_init_builtins): Supply myriads of local
-	tree nodes used by DEF_BUILTIN.
-	(avr_expand_builtin) <AVR_BUILTIN_ROUNDxx>: Sanity-check them.
-	(avr_fold_builtin) <AVR_BUILTIN_BITSxx>: Fold to VIEW_COVERT_EXPR.
-	<AVR_BUILTIN_xxBITS>: Same.
-
-2013-02-08  Richard Biener  <rguenther@suse.de>
-
-	* cfgloop.c (verify_loop_structure): Properly handle
-	a loop exiting to another loop header.
-	* ira-int.h (ira_loops): Remove.
-	* ira.c (ira_loops): Remove.
-	(ira): Use loop_optimizer_init and loop_optimizer_finalize.
-	(do_reload): Use loop_optimizer_finalize.
-	* ira-build.c (create_loop_tree_nodes): Use get_loops and
-	number_of_loops to access the loop tree.
-	(more_one_region_p): Likewise.
-	(finish_loop_tree_nodes): Likewise.
-	(rebuild_regno_allocno_maps): Likewise.
-	(mark_loops_for_removal): Likewise.
-	(mark_all_loops_for_removal): Likewise.
-	(remove_unnecessary_regions): Likewise.
-	(ira_build): Likewise.
-	* ira-emit.c (setup_entered_from_non_parent_p): Likewise.
-
-2013-02-08  Richard Biener  <rguenther@suse.de>
-
-	* Makefile.in (tree-tailcall.o): Add $(CFGLOOP_H) dependency.
-	* ipa-pure-const.c (analyze_function): Avoid calling
-	mark_irreducible_loops twice.
-	* tree-tailcall.c (tree_optimize_tail_calls_1): Mark loops for fixup.
-
-2013-02-07  David S. Miller  <davem@davemloft.net>
-
-	* dwarf2out.c (based_loc_descr): Perform leaf register remapping
-	on 'reg'.
-	* var-tracking.c (vt_add_function_parameter): Test the presence of
-	HAVE_window_save properly and do not remap argument registers when
-	we have a leaf function.
-
-2013-02-07  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR bootstrap/56227
-	* ggc-page.c (ggc_print_statistics): Use HOST_LONG_LONG_FORMAT
-	instead of "ll".
-	* config/i386/i386.c (ix86_print_operand): Ditto.
-
-2013-02-07  Vladimir Makarov  <vmakarov@redhat.com>
-
-	* lra-constraints.c (process_alt_operands): Fix recently added comment.
-
-2013-02-07  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/56225
-	* lra-constraints.c (process_alt_operands): Check that reload hard
-	reg can hold value for strict_low_part.
-
-2013-02-07  Jakub Jelinek  <jakub@redhat.com>
-
-	PR debug/56154
-	* dwarf2out.c (dwarf2_debug_hooks): Set end_function hook to
-	dwarf2out_end_function.
-	(in_first_function_p, maybe_at_text_label_p,
-	first_loclabel_num_not_at_text_label): New variables.
-	(dwarf2out_var_location): In the first function find out
-	lowest loclabel_num N where .LVLN is known not to be equal to .Ltext0.
-	(find_empty_loc_ranges_at_text_label, dwarf2out_end_function): New
-	functions.
-
-2013-02-07  Eric Botcazou  <ebotcazou@adacore.com>
-
-	PR rtl-optimization/56178
-	* cse.c (cse_insn): Do not create a REG_EQUAL note if the source is a
-	SUBREG of a register.  Tidy up related block of code.
-	* fwprop.c (forward_propagate_and_simplify): Do not create a REG_EQUAL
-	note if the source is a register or a SUBREG of a register.
-
-2013-02-07  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/56228
-	* config/rs6000/rs6000.md (ptrm): New mode attr.
-	(call_indirect_aix<ptrsize>, call_indirect_aix<ptrsize>_nor11,
-	call_value_indirect_aix<pttrsize>,
-	call_value_indirect_aix<pttrsize>_nor11): Use <ptrm> instead of
-	m in constraints.
-
-2013-02-07  Michael Haubenwallner  <michael.haubenwallner@salomon.at>
-
-	* collect2.c (main): Set aix64_flag for -G and -bsvr4 too, disable
-	if -bnortl. Convert to strcmp and strncmp.
-
-2013-02-07  Alan Modra  <amodra@gmail.com>
-
-	PR target/54009
-	* config/rs6000/rs6000.c (mem_operand_gpr): Check that LO_SUM
-	addresses won't wrap when offsetting.
-	(rs6000_secondary_reload): Provide secondary reloads needed for
-	wrapping LO_SUM addresses.
-
-2013-02-06  Thomas Schwinge  <thomas@codesourcery.com>
-
-	* config/gnu.h (GNU_USER_TARGET_OS_CPP_BUILTINS): Never define
-	MACH, just __MACH__.
-
-2013-02-06  Richard Biener  <rguenther@suse.de>
-
-	* tracer.c (tracer): Mark loops with LOOPS_NEED_FIXUP
-	instead of calling fix_loop_structure.
-
-2013-02-06  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56217
-	* omp-low.c (use_pointer_for_field): Return false if
-	lower_send_shared_vars doesn't generate any copy-out code.
-
-2013-02-06  Tom de Vries  <tom@codesourcery.com>
-
-	PR rtl-optimization/56131
-	* cfgrtl.c (delete_insn): Use NOTE_BASIC_BLOCK instead of BLOCK_FOR_INSN
-	to get the bb of a NOTE_INSN_BASIC_BLOCK.  Handle the case that the bb
-	of the label is NULL.  Add comment.
-
-2013-02-05  Jakub Jelinek  <jakub@redhat.com>
-
-	* tree.h (struct tree_decl_with_vis): Remove thread_local field.
-
-	PR sanitizer/55374
-	* config/gnu-user.h (LIBTSAN_EARLY_SPEC): Define.
-	(STATIC_LIBTSAN_LIBS): Likewise.
-	* gcc.c (ADD_STATIC_LIBTSAN_LIBS, LIBTSAN_EARLY_SPEC): Define.
-	(LIBTSAN_SPEC): Add ADD_STATIC_LIBTSAN_LIBS, if LIBTSAN_EARLY_SPEC
-	is defined, don't add anything else beyond that.
-	(SANITIZER_EARLY_SPEC, SANITIZER_SPEC): Define.
-	(LINK_COMMAND_SPEC): Use them.
-
-	PR tree-optimization/56205
-	* tree-stdarg.c (check_all_va_list_escapes): Return true if
-	there are any PHI nodes that set non-va_list_escape_vars SSA_NAME
-	and some va_list_escape_vars SSA_NAME appears in some PHI argument.
-
-2013-02-05  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/53342
-	PR tree-optimization/53185
-	* tree-vectorizer.h (vect_check_strided_load): Remove.
-	* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Do
-	not disallow peeling for vectorized strided loads.
-	(vect_check_strided_load): Make static and simplify.
-	(vect_analyze_data_refs): Adjust.
-	* tree-vect-stmts.c (vectorizable_load): Handle peeled loops
-	correctly when vectorizing strided loads.
-
-2013-02-05  Richard Biener  <rguenther@suse.de>
-
-	* doc/install.texi: Refer to ISL, not PPL.
-
-2013-02-05  Jan Hubicka  <jh@suse.cz>
-
-	PR tree-optimization/55789
-	* params.def (PARAM_EARLY_INLINER_MAX_ITERATIONS): Drop to 1.
-
-2013-02-05  Jan Hubicka  <jh@suse.cz>
-
-	PR tree-optimization/55789
-	* cgraphclones.c (cgraph_remove_node_and_inline_clones): Remove
-	the dead call anyway.
-
-2013-02-05  Eric Botcazou  <ebotcazou@adacore.com>
-
-	PR sanitizer/55374
-	* config/gnu-user.h (LIBASAN_EARLY_SPEC): Add missing guard.
-
-2013-02-04  Alexander Potapenko  <glider@google.com>
-	    Jack Howarth  <howarth@bromo.med.uc.edu>
-	    Jakub Jelinek  <jakub@redhat.com>
-
-	PR sanitizer/55617
-	* config/darwin.c (sort_ctor_records): Stabilized qsort
-	on constructor priority by using original position.
-	(finalize_ctors): New routine to sort constructors by
-	priority before use in assemble_integer.
-	(machopic_asm_out_constructor): Use finalize_ctors if needed.
-
-2013-02-04  Jakub Jelinek  <jakub@redhat.com>
-
-	PR libstdc++/54314
-	* config/i386/winnt.c (i386_pe_assemble_visibility): Don't warn
-	about visibility on artificial decls.
-	* config/sol2.c (solaris_assemble_visibility): Likewise.
-
-2013-02-04  Kai Tietz  <ktietz@redhat.com>
-
-	PR target/56186
-	* config/i386/i386.c (function_value_ms_64): Add additional valtype
-	argument and improve checking of return-argument types for 16-byte
-	modes.
-	(ix86_function_value_1): Add additional valtype argument on call
-	of function_value_64.
-	(return_in_memory_ms_64): Sync 16-byte sized mode handling with
-	handling infunction_value_64 function.
-
-2013-02-04  Matthew Gretton-Dann  <matthew.gretton-dann@linaro.org>
-
-	* reload.c (subst_reloads): Fix DEBUG_RELOAD build issue.
-
-2013-02-04  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56188
-	* tree-ssa-structalias.c (label_visit): Consider case with
-	initially non-empty points-to set.
-	(perform_var_substitution): Dump node mapping and clean up.
-
-2013-02-04  Richard Guenther  <rguenther@suse.de>
-
-	PR lto/56168
-	* lto-symtab.c (lto_symtab_merge_decls_1): Make non-builtin
-	node prevail as last resort.
-	(lto_symtab_merge_decls): Remove guard on LTRANS here.
-	(lto_symtab_prevailing_decl): Builtins are their own prevailing decl.
-
-2013-02-04  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56113
-	* tree-ssa-structalias.c (equiv_class_lookup, equiv_class_add):
-	Merge into ...
-	(equiv_class_lookup_or_add): ... this.
-	(label_visit): Adjust and fix error in previous patch.
-	(perform_var_substitution): Adjust.
-
-2013-02-03  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	* config/sh/divtab.c: Fix formatting and comments throughout the file.
-	* config/sh/sh4-300.md: Likewise.
-	* config/sh/sh4a.md: Likewise.
-	* config/sh/constraints.md: Likewise.
-	* config/sh/sh.md: Likewise.
-	* config/sh/netbsd-elf.h: Likewise.
-	* config/sh/predicates.md: Likewise.
-	* config/sh/sh-protos.h: Likewise.
-	* config/sh/ushmedia.h: Likewise.
-	* config/sh/linux.h: Likewise.
-	* config/sh/sh.c: Likewise.
-	* config/sh/superh.h: Likewise.
-	* config/sh/elf.h: Likewise.
-	* config/sh/sh4.md: Likewise.
-	* config/sh/sh.h: Likewise.
-
-2013-02-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
-
-	* config/pa/constraints.md: Adjust unused letters.  Change "T"
-	constraint to match_test floating_point_store_memory_operand().
-	* config/pa/predicates.md (reg_plus_base_memory_operand): New.
-	(base14_operand): New.
-	(floating_point_store_memory_operand): New.
-	(integer_store_memory_operand): Revise to use base14_operand and
-	reg_plus_base_memory_operand.
-	(move_dest_operand): Allow symbolic_memory_operands.
-	(symbolic_memory_operand): Check for LO_SOM.
-	(symbolic_operand): Change default case to break.
-	* config/pa/pa.md: Remove unamed DFmode and SFmode patterns to force
-	CONST_DOUBLE values to be reloaded by putting them into memory when
-	the destination is a floating point register.
-	(movdf): Remove code to handle CONST_DOUBLE.
-	(movsf): Likewise.
-	(reload_indf_r1): New.
-	(reload_insf_r1): New.
-	Consistently use "Q" and "T" constraints with integer and floating
-	point move instructions, respectively.
-	(movdi): Remove FAIL.
-	Change predicate for source operand unamed DImode move from
-	general_operand to move_src_operand.
-	(umulsidi3): Change predicate for destination operand to
-	register_operand.
-	Likewise for similar unamed patterns.
-	* config/pa/pa-protos.h (pa_legitimize_reload_address): Declare.
-	* config/pa/pa.c (pa_symbolic_expression_p): Remove extra parenthesis.
-	(hppa_legitimize_address): Simplify mask calculation.
-	(pa_emit_move_sequence): Revised handling of secondary reloads from
-	REG+D addresses for floating point loads and stores.  Directly handle
-	loading CONST0_RTX (mode) to a floating point register.
-	(pa_secondary_reload): Handle reloading DF and SFmode constant values
-	to floating point registers.  Don't restrict secondary reloads to
-	floating point registers to integer modes.  Revise some comments and
-	cleanup some code.
-	(TARGET_LEGITIMATE_ADDRESS_P): Define.
-	(pa_legitimate_address_p): New.
-	(pa_legitimize_reload_address): New.
-	* config/pa/pa.h (STRICT_REG_OK_FOR_INDEX_P): New.
-	(STRICT_REG_OK_FOR_BASE_P): New.
-	(GO_IF_LEGITIMATE_ADDRESS): Delete.  Update some related comments.
-	(LEGITIMIZE_RELOAD_ADDRESS): Revise to use pa_legitimize_reload_address.
-
-2013-02-03  David Edelsohn  <dje.gcc@gmail.com>
-	    Andrew Dixie  <andrewd@gentrack.com>
-
-	* collect2.c (GCC_CHECK_HDR): Do not scan objects with F_LOADONLY
-	flag set.
-
-2013-02-03  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* expmed.c (extract_bit_field_1): Pass the full width of the
-	structure to get_best_reg_extraction_insn.
-
-2013-02-01  David Edelsohn  <dje.gcc@gmail.com>
-
-	PR target/54601
-	* configure.ac (use_cxa_atexit): Add AIX.
-	* configure: Regenerate.
-
-	* config/rs6000/aix61.h (STARTFILE_SPEC): Add crtcxa.o.
-
-2013-02-01  Jakub Jelinek  <jakub@redhat.com>
-
-	PR debug/54793
-	* final.c (need_profile_function): New variable.
-	(final_start_function): Drop ATTRIBUTE_UNUSED from first argument.
-	If first of NOTE_INSN_BASIC_BLOCK or NOTE_INSN_FUNCTION_BEG
-	is only preceeded by NOTE_INSN_VAR_LOCATION or NOTE_INSN_DELETED
-	notes, targetm.asm_out.function_prologue doesn't emit anything,
-	HAVE_prologue and profiler should be emitted before prologue,
-	set need_profile_function instead of emitting it.
-	(final_scan_insn): If need_profile_function, emit
-	profile_function on the first NOTE_INSN_BASIC_BLOCK or
-	NOTE_INSN_FUNCTION_BEG note.
-
-2013-02-01  Richard Henderson  <rth@redhat.com>
-
-	* config/rs6000/rs6000.md (smulditi3): New.
-	(umulditi3): New.
-
-	* config/alpha/alpha.md (umulditi3): New.
-
-2013-02-01  David Edelsohn  <dje.gcc@gmail.com>
-
-	* config/rs6000/xcoff.h (ASM_OUTPUT_ALIGNED_COMMON): Use floor_log2.
-	(ASM_OUTPUT_ALIGNED_LOCAL): New.
-
-2013-02-01  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56113
-	* tree-ssa-structalias.c (label_visit): Reduce work for
-	single-predecessor nodes.
-
-2013-02-01  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* fold-const.c (make_range_step) <TRUTH_NOT_EXPR>: Bail out if the
-	range isn't testing for zero.
-
-2013-01-31  Steven Bosscher  <steven@gcc.gnu.org>
-
-	PR middle-end/56113
-	* fwprop.c (fwprop_init): Set up loops without CFG modifications.
-
-2013-01-31  Hiroyuki Ono  <hiroyuki.ono.jc@renesas.com>
-	    Nick Clifton  <nickc@redhat.com>
-
-	* config/v850/constraints.md (Q): Define as a memory constraint.
-	* config/v850/predicates.md (label_ref_operand): New predicate.
-	(e3v5_shift_operand): New predicate.
-	(ior_operator): New predicate.
-	* config/v850/t-v850: Add e3v5 multilib.
-	* config/v850/v850-protos.h (v850_adjust_insn_length): Prototype.
-	(v850_gen_movdi): Prototype.
-	* config/v850/v850.c: Add support for e3v5 architecture.
-	Rename all uses of TARGET_V850E || TARGET_V850E2_ALL to
-	TARGET_V850E_UP.
-	(construct_save_jarl): Add e3v5 long JARL support.
-	(v850_adjust_insn_length): New function.  Adjust length of call
-	insns when using e3v5 instructions.
-	(v850_gen_movdi): New function: Generate instructions to move a
-	DImode value.
-	* config/v850/v850.h (TARGET_CPU_v850e3v5): Define.
-	(CPP_SPEC): Define __v850e3v5__ as appropriate.
-	(TARGET_USE_FPU): Enable for e3v5.
-	(CONST_OK_FOR_W): New macro.
-	(ADJUST_INSN_LENGTH): Define.
-	* config/v850/v850.md (UNSPEC_LOOP): Define.
-	(attr cpu): Add v850e3v5.
-	Rename all uses of TARGET_V850E2 to TARGET_V850E2V3_UP.
-	(movdi): New pattern.
-	(movdi_internal): New pattern.
-	(cbranchsf4): Conditionalize on TARGET_USE_FPU.
-	(cbranchdf4): Conditionalize on TARGET_USE_FPU.
-	(cstoresf4): Likewise.
-	(cstoredf4): Likewise.
-	(insv): New pattern.
-	(rotlso3_a): New pattern.
-	(rotlsi3_b): New pattern
-	(rotlsi3_v850e3v5): New pattern.
-	(doloop_begin): New pattern.
-	(fix_loop_counter): New pattern.
-	(doloop_end): New pattern.
-	(branch_normal): Add e3v5 long branch support.
-	(branch_invert): Likewise.
-	(branch_z_normal): Likewise.
-	(branch_z_invert): Likewise.
-	(branch_nz_normal): Likewise.
-	(branch_nz_invert): Likewise.
-	(call_internal_short): Add e3v5 register-indirect JARL support.
-	(call_internal_long): Likewise.
-	(call_value_internal_short): Likewise.
-	(call_value_internal_long): Likewise.
-	* config/v850/v850.opt (mv850e3v5, mv850e2v4): New options.
-	(mloop): New option.
-	* config.gcc: Add support for configuring v840e3v5 target.
-	* doc/invoke.texi: Document new v850 specific command line options.
-
-2013-01-31  Paul Koning  <ni1d@arrl.net>
-
-	PR debug/55059
-	PR debug/54508
-	* dwarf2out.c (prune_unused_types_mark): Mark all of parent's
-	children if parent is a class.
-	(prune_unused_types_prune): Don't add DW_AT_declaration.
-
-2013-01-31  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56157
-	* tree-vect-slp.c (vect_get_slp_defs): More thoroughly try to
-	match up operand with SLP child.
-
-2013-01-31  Jason Merrill  <jason@redhat.com>
-
-	PR debug/54410
-	* dwarf2out.c (gen_struct_or_union_type_die): Always schedule template
-	parameters the first time.
-	(gen_scheduled_generic_parms_dies): Check completeness here.
-
-2013-01-31  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/53073
-	* common.opt (faggressive-loop-optimizations): New flag,
-	enabled by default.
-	* doc/invoke.texi (faggressive-loop-optimizations): Document.
-	* tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Guard
-	infer_loop_bounds_from_undefined by it.
-
-2013-01-31  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56150
-	* tree-ssa-loop-manip.c (find_uses_to_rename_stmt): Do not
-	visit virtual operands.
-	(find_uses_to_rename_bb): Likewise.
-
-2013-01-31  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56150
-	* tree-ssa-tail-merge.c (gimple_equal_p): Properly handle
-	mixed store non-store stmts.
-
-2013-01-30  Jakub Jelinek  <jakub@redhat.com>
-
-	PR sanitizer/55374
-	* gcc.c (LIBASAN_SPEC): Define just to ADD_STATIC_LIBASAN_LIBS if
-	LIBASAN_EARLY_SPEC is defined.
-	(LIBASAN_EARLY_SPEC): Define to empty string if not already defined.
-	(LINK_COMMAND_SPEC): Add LIBASAN_EARLY_SPEC for -fsanitize=address,
-	before %o.
-	* config/gnu-user.h (LIBASAN_EARLY_SPEC): Define.
-
-	PR c++/55742
-	* config/i386/i386.c (ix86_valid_target_attribute_inner_p): Diagnose
-	invalid args instead of ICEing on it.
-	(ix86_valid_target_attribute_tree): Return error_mark_node if
-	ix86_valid_target_attribute_inner_p failed.
-	(ix86_valid_target_attribute_p): Return false only if
-	ix86_valid_target_attribute_tree returned error_mark_node.  Allow
-	target("default") attribute.
-	(sorted_attr_string): Change argument from const char * to tree,
-	merge in all target attribute arguments rather than just one.
-	Formatting fix.  Use XNEWVEC instead of xmalloc and XDELETEVEC
-	instead of free.  Avoid using strcat.
-	(ix86_mangle_function_version_assembler_name): Mangle
-	target("default") as if no target attribute is present.  Adjust
-	sorted_attr_string caller.  Avoid leaking memory.  Use XNEWVEC
-	instead of xmalloc and XDELETEVEC instead of free.
-	(ix86_function_versions): Don't return true if one of the decls
-	doesn't have target attribute.  If they don't and one of the decls
-	is DECL_FUNCTION_VERSIONED, report an error.  Adjust
-	sorted_attr_string caller.  Use XDELETEVEC instead of free.
-	(ix86_supports_function_versions): Remove.
-	(make_name): Fix up formatting.
-	(make_dispatcher_decl): Remove resolver_name and its initialization.
-	Avoid leaking memory.
-	(is_function_default_version): Return true if there is
-	target("default") attribute rather than no target attribute at all.
-	(make_resolver_func): Avoid leaking memory.
-	(ix86_generate_version_dispatcher_body): Likewise.
-	(TARGET_OPTION_SUPPORTS_FUNCTION_VERSIONS): Remove.
-	* target.def (supports_function_versions): Remove.
-	* doc/tm.texi.in (SUPPORTS_FUNCTION_VERSIONS): Remove.
-	* doc/tm.texi: Regenerated.
-
-2013-01-30  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/56144
-	* lra-constraints.c (get_reload_reg): Don't reuse reload pseudo
-	for values with side effects.
-
-2013-01-30  Richard Biener  <rguenther@suse.de>
-
-	* sparseset.h (sparseset_bit_p): Use gcc_checking_assert.
-	(sparseset_pop): Likewise.
-	* cfganal.c (compute_idf): Likewise.  Increase work-stack size
-	to be able to use quick_push in the worker loop.
-
-2013-01-30  Marek Polacek  <polacek@redhat.com>
-
-	* cfgcleanup.c (cleanup_cfg): Don't mark affected BBs.
-
-2013-01-30  Richard Biener  <rguenther@suse.de>
-
-	PR lto/56147
-	* lto-symtab.c (lto_symtab_merge_decls_1): Guard DECL_BUILT_IN check.
-
-2013-01-30  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR tree-optimization/56064
-	* fixed-value.c (fixed_from_double_int): New function.
-	* fixed-value.h (fixed_from_double_int): New prototype.
-	(const_fixed_from_double_int): New static inline function.
-	* fold-const.c (native_interpret_fixed): New static function.
-	(native_interpret_expr) <FIXED_POINT_TYPE>: Use it.
-	(can_native_interpret_type_p) <FIXED_POINT_TYPE>: Return true.
-	(native_encode_fixed): New static function.
-	(native_encode_expr) <FIXED_CST>: Use it.
-	(native_interpret_int): Move double_int worker code to...
-	* double-int.c (double_int::from_buffer): ...this new static method.
-	* double-int.h (double_int::from_buffer): Prototype it.
-
-2013-01-30  Richard Biener  <rguenther@suse.de>
-
-	* tree-ssa-structalias.c (final_solutions, final_solutions_obstack):
-	New pointer-map and obstack.
-	(init_alias_vars): Allocate pointer-map and obstack.
-	(delete_points_to_sets): Free them.
-	(find_what_var_points_to): Cache result.
-	(find_what_p_points_to): Adjust for changed interface of
-	find_what_var_points_to.
-	(compute_points_to_sets): Likewise.
-	(ipa_pta_execute): Likewise.
-
-2013-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
-
-	* configure.ac (HAVE_AS_SPARC_NOBITS): New test.
-	* configure: Regenerate.
-	* config.in: Regenerate.
-	* config/sparc/sparc.c (sparc_solaris_elf_asm_named_section): Emit
-	#nobits/#progbits if supported.
-
-2013-01-29  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	PR target/56121
-	* config/sh/sh.md (bclr_m2a, bset_m2a, bst_m2a, bld_m2a, bldsign_m2a,
-	bld_reg, *bld_regqi, band_m2a, bandreg_m2a, bor_m2a, borreg_m2a,
-	bxor_m2a, bxorreg_m2a): Add satisfies_constraint_K03 condition.
-
-2013-01-29  Greta Yorsh  <Greta.Yorsh@arm.com>
-
-	* config/arm/cortex-a7.md (cortex_a7_neon, cortex_a7_all): Remove.
-	(cortex_a7_idiv): Use cortex_a7_both instead of cortex_a7_all.
-
-2013-01-29  Greta Yorsh  <Greta.Yorsh@arm.com>
-
-	* config/arm/arm.c (cortexa7_younger): Return true for TYPE_CALL.
-	* config/arm/cortex-a7.md (cortex_a7_call): Update required units.
-
-2013-01-29  Greta Yorsh  <Greta.Yorsh@arm.com>
-
-	* config/arm/arm-protos.h (arm_mac_accumulator_is_result): New
-	declaration.
-	* config/arm/arm.c (arm_mac_accumulator_is_result): New function.
-	* config/arm/cortex-a7.md: New bypasses using
-	arm_mac_accumulator_is_result.
-
-2013-01-29  Greta Yorsh  <Greta.Yorsh@arm.com>
-
-	* config/arm/cortex-a7.md (cortex_a7_neon_mul):  New reservation.
-	(cortex_a7_neon_mla): Likewise.
-	(cortex_a7_fpfmad): New reservation.
-	(cortex_a7_fpmacs): Use ffmas and update required units.
-	(cortex_a7_fpmuld): Update required units and latency.
-	(cortex_a7_fpmacd): Likewise.
-	(cortex_a7_fdivs, cortex_a7_fdivd): Likewise.
-	(cortex_a7_neon). Likewise.
-	(bypass) Update participating units.
-
-2013-01-29  Greta Yorsh  <Greta.Yorsh@arm.com>
-
-	* config/arm/arm.md (type): Add ffmas and ffmad to "type" attribute.
-	* config/arm/vfp.md (fma,fmsub,fnmsub,fnmadd): Change type
-	from fmac to ffma.
-	* config/arm/vfp11.md (vfp_farith): Use ffmas.
-	(vfp_fmul): Use ffmad.
-	* config/arm/cortex-r4f.md (cortex_r4_fmacs): Use ffmas.
-	(cortex_r4_fmacd): Use ffmad.
-	* config/arm/cortex-m4-fpu.md (cortex_m4_fmacs): Use ffmas.
-	* config/arm/cortex-a9.md (cortex_a9_fmacs):  Use ffmas.
-	(cortex_a9_fmacd): Use ffmad.
-	* config/arm/cortex-a8-neon.md (cortex_a8_vfp_macs): Use ffmas.
-	(cortex_a8_vfp_macd): Use ffmad.
-	* config/arm/cortex-a5.md (cortex_a5_fpmacs): Use ffmas.
-	(cortex_a5_fpmacd): Use ffmad.
-	* config/arm/cortex-a15-neon.md (cortex_a15_vfp_macs) Use ffmas.
-	(cortex_a15_vfp_macd): Use ffmad.
-	* config/arm/arm1020e.md (v10_fmul): Use ffmas and ffmad.
-
-2013-01-29  Jason Merrill  <jason@redhat.com>
-
-	PR libstdc++/54314
-	* varasm.c (default_assemble_visibility): Don't warn about
-	visibility on artificial decls.
-
-2013-01-29  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56113
-	* tree-ssa-structalias.c (equiv_class_lookup): Also return
-	the bitmap leader.
-	(label_visit): Free duplicate bitmaps and record the leader instead.
-	(perform_var_substitution): Adjust.
-
-2013-01-29  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/55270
-	* tree-ssa-dom.c (eliminate_degenerate_phis): If we changed
-	the CFG, schedule loops for fixup.
-
-2013-01-29  Nick Clifton  <nickc@redhat.com>
-
-	* config/rl78/rl78.c (rl78_regno_mode_code_ok_for_base_p): Allow
-	SP_REG.
-
-2013-01-28  Leif Ekblad  <leif@rdos.net>
-
-	* config.gcc (i[34567]86-*-rdos*, x86_64-*-rdos*): New targets.
-	* config/i386/i386.h (TARGET_RDOS): New macro.
-	(DEFAULT_LARGE_SECTION_THRESHOLD): New macro.
-	* config/i386/i386.c (ix86_option_override_internal): For 64bit
-	TARGET_RDOS, set ix86_cmodel to CM_MEDIUM_PIC and flag_pic to 1.
-	* config/i386/i386.opt (mlarge-data-threshold): Initialize to
-	DEFAULT_LARGE_SECTION_THRESHOLD.
-	* config/i386/i386.md (R14_REG, R15_REG): New constants.
-	* config/i386/rdos.h: New file.
-	* config/i386/rdos64.h: New file.
-
-2013-01-28  Bernd Schmidt  <bernds@codesourcery.com>
-
-	PR other/54814
-	* reload.c (find_valid_class_1): Use in_hard_reg_set_p instead of
-	TEST_HARD_REG_BIT.
-
-2013-01-28  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/56117
-	* sched-deps.c (sched_analyze_2) <case PREFETCH>: For use_cselib
-	call cselib_lookup_from_insn on the MEM before calling
-	add_insn_mem_dependence.
-
-2013-01-28  Richard Biener  <rguenther@suse.de>
-
-	* tree-inline.c (remap_gimple_stmt): Do not assing a BLOCK
-	to a stmt that didn't have one.
-	(copy_phis_for_bb): Likewise for PHI arguments.
-	(copy_debug_stmt): Likewise for debug stmts.
-
-2013-01-28  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56034
-	* tree-loop-distribution.c (enum partition_kind): Add PKIND_REDUCTION.
-	(partition_builtin_p): Adjust.
-	(generate_code_for_partition): Handle PKIND_REDUCTION.  Assert
-	it is the last partition.
-	(rdg_flag_uses): Check SSA_NAME_IS_DEFAULT_DEF before looking
-	up the vertex for the definition.
-	(classify_partition): Classify whether a partition is a
-	PKIND_REDUCTION, thus has uses outside of the loop.
-	(ldist_gen): Inherit PKIND_REDUCTION when merging partitions.
-	Merge all PKIND_REDUCTION partitions into the last partition.
-	(tree_loop_distribution): Seed partitions from reductions as well.
-
-2013-01-28  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56125
-	* tree-ssa-math-opts.c (gimple_expand_builtin_pow): Don't optimize
-	pow(x,c) into sqrt(x) * powi(x, n/2) or
-	1.0 / (sqrt(x) * powi(x, abs(n/2))) if c is an integer or when
-	optimizing for size.
-	Don't optimize pow(x,c) into powi(x, n/3) * powi(cbrt(x), n%3) or
-	1.0 / (powi(x, abs(n)/3) * powi(cbrt(x), abs(n)%3)) if 2c is an
-	integer.
-
-	PR tree-optimization/56094
-	* gimplify.c (force_gimple_operand_1): Temporarily set input_location
-	to UNKNOWN_LOCATION while gimplifying expr.
-
-2013-01-27  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/56114
-	* config/i386/i386.md (*movabs<mode>_1): Add square brackets around
-	operand 0 in movabs insn template for -masm=intel asm alternative.
-	(*movabs<mode>_2): Ditto for operand 1.
-
-2013-01-26  David Holsgrove  <david.holsgrove@xilinx.com>
-
-	PR target/54663
-	* config.gcc (microblaze*-linux*): Add tmake_file to allow building
-	of microblaze-c.o
-
-2013-01-26  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
-
-	* config.gcc (microblaze*-*-*): Rename microblaze*-*-elf, update
-	tm_file.
-
-2013-01-25  Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>
-
-	* config/aarch64/aarch64.c (TARGET_FIXED_CONDITION_CODE_REGS):
-	Undef to avoid warning.
-
-2013-01-25  Michael Haubenwallner  <michael.haubenwallner@salomon.at>
-
-	* configure.ac (gcc_cv_ld_static_dynamic): Define for AIX native ld.
-	* configure: Regenerate.
-
-2013-01-25  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56098
-	* tree-ssa-phiopt.c (nt_init_block): Don't call add_or_mark_expr
-	for stmts with volatile ops.
-	(cond_store_replacement): Don't optimize if assign has volatile ops.
-	(cond_if_else_store_replacement_1): Don't optimize if either
-	then_assign or else_assign have volatile ops.
-	(hoist_adjacent_loads): Don't optimize if either def1 or def2 have
-	volatile ops.
-
-2013-01-25  Georg-Johann Lay  <avr@gjlay.de>
-
-	* doc/invoke.texi (AVR Built-in Macros): Document __XMEGA__.
-
-2013-01-25  Georg-Johann Lay  <avr@gjlay.de>
-
-	* doc/extend.texi (Example of asm with clobbered asm reg): Fix
-	missing ':' in asm example.
-
-2013-01-25  Tejas Belagod  <tejas.belagod@arm.com>
-
-	* config/aarch64/aarch64-simd-builtins.def: Separate sq<r>dmulh_lane
-	entries into lane and laneq entries.
-	* config/aarch64/aarch64-simd.md (aarch64_sq<r>dmulh_lane<mode>):
-	Remove AdvSIMD scalar modes.
-	(aarch64_sq<r>dmulh_laneq<mode>): New.
-	(aarch64_sq<r>dmulh_lane<mode>): New RTL pattern for Scalar AdvSIMD
-	modes.
-	* config/aarch64/arm_neon.h: Fix all the vq<r>dmulh_lane* intrinsics'
-	builtin implementations to relfect changes in RTL in aarch64-simd.md.
-	* config/aarch64/iterators.md (VCOND): New.
-	(VCONQ): New.
-
-2013-01-25  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR target/54222
-	* config/avr/builtins.def (DEF_BUILTIN): Add LIBNAME argument.
-	Add NULL LIBNAME argument to existing definitions.
-	(ABSHR, ABSR, ABSLR, ABSLLR, ABSHK, ABSK, ABSLK, ABSLLK): New.
-	* config/avr/avr-c.c (DEF_BUILTIN): Add LIBNAME argument.
-	* config/avr/avr.c (DEF_BUILTIN): Same.
-	(avr_init_builtins): Pass down LIBNAME to add_builtin_function.
-	(avr_expand_builtin): Expand to a vanilla call if a libgcc
-	implementation is available (DECL_ASSEMBLER_NAME is set).
-	(avr_fold_absfx): New static function.
-	(avr_fold_builtin): Use it to handle: AVR_BUILTIN_ABSHR,
-	AVR_BUILTIN_ABSR, AVR_BUILTIN_ABSLR, AVR_BUILTIN_ABSLLR,
-	AVR_BUILTIN_ABSHK, AVR_BUILTIN_ABSK, AVR_BUILTIN_ABSLK,
-	AVR_BUILTIN_ABSLLK.
-	* config/avr/stdfix.h (abshr, absr, abslr, absllr)
-	(abshk, absk, abslk, absllk): Provide as static inline functions.
-
-2013-01-25  Marek Polacek  <polacek@redhat.com>
-
-	PR tree-optimization/56035
-	* cfgloopmanip.c (fix_loop_structure): Remove redundant condition.
-
-2012-01-24  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/i386.md (*movti_internal_rex64): Add (o,e) alternative.
-	(*movtf_internal_rex64): Add (!o,C) alternative
-	(*movxf_internal_rex64): Ditto.
-	(*movdf_internal_rex64): Add (?r,C) and (?m,C) alternatives.
-
-2013-01-24  Shenghou Ma  <minux.ma@gmail.com>
-
-	* doc/invoke.texi: fix typo.
-	* doc/objc.texi: fix typo.
-
-2013-01-24  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* config/mips/mips.md (*and<mode>3_mips16): Use the "W" constraint
-	for the first two alternatives.
-
-2013-01-24  Diego Novillo  <dnovillo@google.com>
-
-	* Makefile.in (GGC): Remove.  Replace all instances with ggc-page.o.
-	(ggc-zone.o): Remove.
-	* configure.ac: Remove option --with-gc.
-	* configure: Re-generate.
-	* doc/install.texi: Remove documentation for --with-gc.
-	* gengtype.c (write_enum_defn): Remove.  Update all users.
-	(write_Types_process_field): Remove generation of gt_e_* argument.
-	(output_type_enum): Remove.  Update all users.
-	(write_enum_defn): Remove.  Update all users.
-	(enum alloc_zone): Remove.  Update all users.
-	(write_splay_tree_allocator_def): Remove generation of gt_e_* argument.
-	* ggc-common.c (ggc_splay_alloc): Remove first argument.
-	Update all callers.
-	(struct ptr_data): Remove field TYPE.  Update all users.
-	(gt_pch_note_object): Remove argument TYPE.  Update all users.
-	* ggc-internal.h (ggc_pch_alloc_object): Remove last argument.
-	Update all users.
-	* ggc-none.c (ggc_alloc_typed_stat): Remove.
-	(struct alloc_zone): Remove.
-	(ggc_internal_alloc_zone_stat): Remove.
-	(ggc_internal_cleared_alloc_zone_stat): Remove.
-	* ggc-page.c (ggc_alloc_typed_stat): Remove.
-	(ggc_pch_count_object): Remove last argument.  Update all users.
-	(ggc_pch_alloc_object): Remove last argument.  Update all users.
-	(struct alloc_zone): Remove.
-	* ggc-zone.c: Remove.
-	* ggc.h (gt_pch_note_object): Remove last argument.  Update all users.
-	(struct alloc_zone): Remove.
-	(ggc_alloc_typed_stat): Remove.
-	(ggc_alloc_typed): Remove.
-	(ggc_splay_alloc): Remove first argument.
-	(rtl_zone): Remove.  Update all users.
-	(tree_zone): Remove.  Update all users.
-	(tree_id_zone): Remove.  Update all users.
-	(ggc_internal_zone_alloc_stat): Remove.  Update all users.
-	(ggc_internal_zone_cleared_alloc_stat): Remove.  Update all users.
-	(ggc_internal_zone_vec_alloc_stat): Remove.  Update all users.
-	* tree-ssanames.c: Remove references to zone allocator in comments.
-
-2013-01-24  Georg-Johann Lay  <avr@gjlay.de>
-
-	* config/avr/avr.c (avr_out_fract): Make register numbers that
-	might be outside of source operand signed.
-
-2013-01-24  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/constraints.md (Yf): New constraint.
-	* config/i386/i386.md (*movdf_internal_rex64): Use Yf*f instead
-	of f constraint to conditionaly disable x87 register preferences.
-	(*movdf_internal): Ditto.
-	(*movsf_internal): Ditto.
-
-2013-01-24  Steven Bosscher  <steven@gcc.gnu.org>
-
-	PR inline-asm/55934
-	* lra-assigns.c (assign_by_spills): Throw away the pattern of asms
-	that have operands with impossible constraints.
-	Add a FIXME for a speed-up opportunity.
-	* lra-constraints.c (process_alt_operands): Verify that a class
-	selected from constraints on asms is valid for the operand mode.
-	(curr_insn_transform): Remove incorrect comment.
-
-2013-01-23  David Edelsohn  <dje.gcc@gmail.com>
-
-	* config/rs6000/rs6000.c (rs6000_delegitimize_address): Check that
-	TOC operand is a valid symbol ref in the constant pool.
-
-2013-01-23  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
-
-	* config/microblaze/linux.h: Add TARGET_OS_CPP_BUILTINS
-
-2013-01-23  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR target/54222
-	* config/avr/stdfix.h: New file.
-	* t-avr (stdfix-gcc.h): New rule to build it.
-	(EXTRA_HEADERS): Set it to install stdfix.h, stdfix-gcc.h.
-
-2013-01-23  Kostya Serebryany  <kcc@google.com>
-
-	* config/darwin.h: remove dependency on
-	CoreFoundation (asan on Mac OS).
-
-2013-01-23  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/49069
-	* config/arm/arm.md (cbranchdi4, cstoredi4): Use s_register_operand
-	instead of cmpdi_operand for first comparison operand.
-	Don't assert that comparison operands aren't both constants.
-
-2013-01-22  Jonathan Wakely  <jwakely.gcc@gmail.com>
-
-	* doc/install.texi (Downloading the Source): Update references to
-	downloading separate components.
-
-2013-01-22  Jonathan Wakely  <jwakely.gcc@gmail.com>
-
-	* doc/extend.texi (__int128): Improve grammar.
-
-2013-01-22  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/56028
-	* config/i386/i386.md (*movti_internal_rex64): Change (o,riF)
-	alternative to (o,r).
-	(*movdi_internal_rex64): Remove (!o,n) alternative.
-	(DImode immediate->memory splitter): Remove.
-	(DImode immediate->memory peephole2): Remove.
-	(movtf): Enable for TARGET_64BIT || TARGET_SSE.
-	(*movtf_internal_rex64): Rename from *movtf_internal. Change (!o,F*r)
-	alternative to (!o,*r).
-	(*movtf_internal_sse): New pattern.
-	(*movxf_internal_rex64): New pattern.
-	(*movxf_internal): Disable for TARGET_64BIT.
-	(*movdf_internal_rex64): Remove (!o,F) alternative.
-
-2013-01-22  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56074
-	* dumpfile.c (dump_loc): Only print loc if LOCATION_LOCUS (loc)
-	isn't UNKNOWN_LOCATION nor BUILTINS_LOCATION.
-	* tree-vect-loop-manip.c (find_loop_location): Also ignore
-	stmt locations where LOCATION_LOCUS of the stmt location is
-	UNKNOWN_LOCATION or BUILTINS_LOCATION.
-
-	PR target/55686
-	* config/i386/i386.md (UNSPEC_STOS): New.
-	(strset_singleop, *strsetdi_rex_1, *strsetsi_1, *strsethi_1,
-	*strsetqi_1): Add UNSPEC_STOS.
-
-2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/56067
-	* doc/invoke.texi: Remove left over -Wsynth example.
-
-2013-01-21  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56051
-	* fold-const.c (fold_binary_loc): Don't fold
-	X < (cast) (1 << Y) into (X >> Y) != 0 if cast is either
-	a narrowing conversion, or widening conversion from signed
-	to unsigned.
-
-2013-01-21  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR rtl-optimization/56023
-	* haifa-sched.c (fix_inter_tick): Do not update ticks of instructions,
-	dependent on debug instruction.
-
-2013-01-21  Martin Jambor  <mjambor@suse.cz>
-
-	PR middle-end/56022
-	* function.c (allocate_struct_function): Call
-	invoke_set_current_function_hook earlier.
-
-2013-01-21  Jakub Jelinek  <jakub@redhat.com>
-
-	* reload1.c (init_reload): Only initialize reload_obstack
-	during the first call.
-
-2013-01-21  Marek Polacek  <polacek@redhat.com>
-
-	* cfgloop.c (verify_loop_structure): Fix up grammar.
-
-2013-01-21  Yi-Hsiu Hsu  <ahsu@marvell.com>
-
-	* config/arm/marvell-pj4.md (pj4_shift_conds, pj4_alu_shift,
-	pj4_alu_shift_conds, pj4_shift): Handle simple_alu_shift.
-
-2013-01-21  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
-
-	PR target/56058
-	* config/arm/marvell-pj4.md: Update copyright year.
-	Fix up use of alu to alu_reg and simple_alu_imm.
-
-2013-01-21  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/i386.md (enabled): Do not disable fma4 for TARGET_FMA.
-
-2013-01-20  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR target/55433
-	* lra-constraints.c (curr_insn_transform): Don't reuse original
-	insn for secondary memory move when memory mode should be different.
-
-2013-01-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
-
-	* config/pa/pa.md (atomic_loaddi, atomic_loaddi_1, atomic_storedi,
-	atomic_storedi_1): New patterns.
-
-2013-01-20  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>
-
-	btver2 pipeline descriptions.
-	* config/i386/i386.c: Enable CPU_BTVER2 to use btver2 pipeline
-	descriptions.
-	* config/i386/i386.md (btver2_decode): New type attributes.
-	* config/i386/sse.md (btver2_decode, btver2_sse_attr): New
-	type attributes.
-	* config/i386/btver2.md: New file describing btver2 pipelines.
-
-2013-01-19  Andrew Pinski  <apinski@cavium.com>
-
-	PR tree-optimization/52631
-	* tree-ssa-sccvn (visit_use): Before looking up the original
-	statement, try looking up the simplified expression.
-
-2013-01-19  Anthony Green  <green@moxielogic.com>
-
-	* config/moxie/moxie.c (moxie_expand_prologue): Set
-	current_function_static_stack_size.
-
-2013-01-18  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56029
-	* tree-phinodes.c (reserve_phi_args_for_new_edge): Set
-	gimple_phi_arg_location for the new arg to UNKNOWN_LOCATION.
-
-2013-01-18  Sharad Singhai  <singhai@google.com>
-
-	PR tree-optimization/55995
-	* dumpfile.c (dump_loc): Print location only if available.
-	* tree-vectorizer.c (increase_alignment): Intialize vect_location.
-
-2013-01-18  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR target/55433
-	* lra-constraints.c (curr_insn_transform): Reuse original insn for
-	secondary memory move.
-	(inherit_reload_reg): Use rclass instead of cl for
-	check_secondary_memory_needed_p.
-
-2013-01-18  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56015
-	* expr.c (expand_expr_real_2) <case COMPLEX_EXPR>: Handle
-	the case where writing real complex part of target modifies op1.
-
-2013-01-18  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* config/aarch64/aarch64-simd.md
-	(aarch64_vcond_internal<mode>): Handle unordered cases.
-	* config/aarch64/iterators.md (v_cmp_result): New.
-
-2013-01-18  Yi-Hsiu Hsu  <ahsu@marvell.com>
-	    Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
-
-	* config/arm/marvell-pj4.md: New file.
-	* config/arm/arm.c (arm_issue_rate): Add marvell_pj4.
-	* config/arm/arm.md (generic_sched): Add marvell_pj4.
-	(generic_vfp): Likewise.
-	* config/arm/arm-cores.def: Add marvell-pj4.
-	* config/arm/arm-tune.md: Regenerate.
-	* config/arm/arm-tables.opt: Regenerate.
-	* config/arm/bpabi.h (BE8_LINK_SPEC): Add marvell_pj4.
-	* doc/invoke.texi: Document marvell-pj4.
-
-2013-01-18  Tejas Belagod  <tejas.belagod@arm.com>
-
-	* config/aarch64/arm_neon.h: Map scalar types to standard types.
-
-2013-01-18  Alexandre Oliva  <aoliva@redhat.com>
-
-	PR debug/54114
-	PR debug/54402
-	PR debug/49888
-	* var-tracking.c (negative_power_of_two_p): New.
-	(global_get_addr_cache, local_get_addr_cache): New.
-	(get_addr_from_global_cache, get_addr_from_local_cache): New.
-	(vt_canonicalize_addr): Rewrite using the above.  Adjust the
-	heading comment.
-	(vt_stack_offset_p): Remove.
-	(vt_canon_true_dep): Always canonicalize loc's address.
-	(clobber_overlapping_mems): Make sure we have a MEM.
-	(local_get_addr_clear_given_value): New.
-	(val_reset): Clear local cached entries.
-	(compute_bb_dataflow): Create and release the local cache.
-	Disable duplicate MEMs clobbering.
-	(emit_notes_in_bb): Clobber MEMs likewise.
-	(vt_emit_notes): Create and release the local cache.
-	(vt_initialize, vt_finalize): Create and release the global
-	cache, respectively.
-	* alias.c (rtx_equal_for_memref_p): Compare operands of ENTRY_VALUEs.
-
-2013-01-18  Alexandre Oliva  <aoliva@redhat.com>
-
-	PR libmudflap/53359
-	* tree-mudflap.c (mudflap_finish_file): Skip deferred decls
-	not found in the symtab.
-
-2013-01-18  Alexandre Oliva  <aoliva@redhat.com>
-
-	PR debug/56006
-	PR rtl-optimization/55547
-	PR rtl-optimization/53827
-	PR debug/53671
-	PR debug/49888
-	* alias.c (offset_overlap_p): New, factored out of...
-	(memrefs_conflict_p): ... this.  Use absolute sizes.  Retain
-	the conservative special case for symbolic constants.  Don't
-	adjust zero sizes on alignment.
-
-2013-01-18  Bernd Schmidt  <bernds@codesourcery.com>
-
-	PR rtl-optimization/52573
-	* regrename.c (build_def_use): Ignore REG_DEAD notes if there is a
-	REG_UNUSED for the same register.
-
-2013-01-17  Richard Biener  <rguenther@suse.de>
-	    Marek Polacek  <polacek@redhat.com>
-
-	PR rtl-optimization/55833
-	* loop-unswitch.c (unswitch_loops): Move loop verification...
-	(unswitch_single_loop): ...here.  Call mark_irreducible_loops.
-	* cfgloopmanip.c (fix_loop_placement): Add IRRED_INVALIDATED parameter.
-	Set it to true when we're removing a loop from hierarchy tree in
-	an irreducible region.
-	(fix_bb_placements): Adjust caller.
-	(fix_loop_placements): Likewise.
-
-2013-01-17  Georg-Johann Lay  <avr@gjlay.de>
-
-	* config/avr/builtins.def (DEF_BUILTIN): Factor out
-	"__builtin_avr_" from NAME, turn NAME to an uppercase identifier.
-	Factor out 'CODE_FOR_' from ICODE, use 'nothing' instead of '-1'.
-	Remove ID.  Adjust comments.
-	* config/avr/avr-c.c (avr_builtin_name): Remove.
-	(avr_cpu_cpp_builtins): Use DEF_BUILTIN instead of for-loop.
-	* config/avr/avr.c (avr_tolower): New static function.
-	(DEF_BUILTIN): Remove parameter ID.  Prefix ICODE by 'CODE_FOR_'.
-	Stringify NAME, prefix it with "__builtin_avr_" and lowercase it.
-	(avr_expand_builtin): Assert insn_code != CODE_FOR_nothing for
-	default expansion.
-
-2013-01-17  Jan Hubicka  <jh@suse.cz>
-
-	PR tree-optimization/55273
-	* loop-iv.c (iv_number_of_iterations): Consider zero iteration case.
-
-2013-01-17  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/55981
-	* config/i386/sync.md (atomic_store<mode>): Always generate SWImode
-	store through atomic_store<mode>_1.
-	(atomic_store<mode>_1): Macroize insn using SWI mode iterator.
-
-2013-01-17  Martin Jambor  <mjambor@suse.cz>
-
-	PR tree-optimizations/55264
-	* ipa-inline-transform.c (can_remove_node_now_p_1): Never return true
-	for virtual methods.
-	* ipa.c (symtab_remove_unreachable_nodes): Never return true for
-	virtual methods before inlining is over.
-	* cgraph.h (cgraph_only_called_directly_or_aliased_p): Return false for
-	virtual functions.
-	* cgraphclones.c (cgraph_create_virtual_clone): Mark clones as
-	non-virtual.
-
-2013-01-16  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/56005
-	* sched-deps.c (sched_analyze_2): Check deps->readonly for adding
-	pending reads for prefetch.
-
-2013-01-16  Ian Bolton  <ian.bolton@arm.com>
-
-	* config/aarch64/aarch64.md
-	(*cstoresi_neg_uxtw): New pattern.
-	(*cmovsi_insn_uxtw): New pattern.
-	(*<optab>si3_uxtw): New pattern.
-	(*<LOGICAL:optab>_<SHIFT:optab>si3_uxtw): New pattern.
-	(*<optab>si3_insn_uxtw): New pattern.
-	(*bswapsi2_uxtw): New pattern.
-
-2013-01-16  Richard Biener  <rguenther@suse.de>
-
-	* tree-inline.c (tree_function_versioning): Remove set but
-	never used variable.
-
-2013-01-16  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/55964
-	* tree-flow.h (rename_variables_in_loop): Remove.
-	(rename_variables_in_bb): Likewise.
-	* tree-loop-distribution.c (update_phis_for_loop_copy): Remove.
-	(copy_loop_before): Adjust and delete update-ssa status.
-	* tree-vect-loop-manip.c (rename_variables_in_bb): Make static.
-	(rename_variables_in_bb): Likewise.  Properly walk over predecessors.
-	(rename_variables_in_loop): Remove.
-	(slpeel_update_phis_for_duplicate_loop): Likewise.
-	(slpeel_tree_duplicate_loop_to_edge_cfg): Handle nested loops,
-	use available cfg machinery instead of duplicating it.
-	Update PHI nodes and perform poor-mans SSA update here.
-	(slpeel_tree_peel_loop_to_edge): Adjust.
-
-2013-01-16  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/54767
-	PR tree-optimization/53465
-	* tree-vrp.c (vrp_meet_1): Revert original fix for PR53465.
-	(vrp_visit_phi_node): For PHI arguments coming via backedges
-	drop all symbolical range information.
-	(execute_vrp): Compute backedges.
-
-2013-01-16  Richard Biener  <rguenther@suse.de>
-
-	* doc/install.texi: Update CLooG and ISL requirements to
-	0.18.0 and 0.11.1.
-
-2013-01-16  Christian Bruel  <christian.bruel@st.com>
-
-	PR target/55301
-	* config/sh/sh.c (sh_expand_prologue): Postpone new_stack mem symbol.
-	(broken_move): Handle UNSPECV_SP_SWITCH_B.
-	* config/sh/sh.md (sp_switch_1): Use set (reg:SI SP_REG).
-
-2013-01-16  DJ Delorie  <dj@redhat.com>
-
-	* config/sh/sh.md (UNSPECV_SP_SWITCH_B): New.
-	(UNSPECV_SP_SWITCH_E): New.
-	(sp_switch_1): Change to an unspec.
-	(sp_switch_2): Change to an unspec.  Don't use post-inc when we
-	replace $r15.
-
-2013-01-16  Uros Bizjak  <ubizjak@gmail.com>
-
-	* emit-rtl.c (need_atomic_barrier_p): Mask memory model argument
-	with MEMMODEL_MASK before comparing with MEMMODEL_* memory types.
-	* optabs.c (maybe_emit_sync_lock_test_and_set): Ditto.
-	(expand_mem_thread_fence): Ditto.
-	(expand_mem_signal_fence): Ditto.
-	(expand_atomic_load): Ditto.
-	(expand_atomic_store): Ditto.
-
-2013-01-16  Alexandre Oliva  <aoliva@redhat.com>
-
-	PR rtl-optimization/55547
-	PR rtl-optimization/53827
-	PR debug/53671
-	PR debug/49888
-	* alias.c (memrefs_conflict_p): Set sizes to negative after
-	AND adjustments.
-
-2013-01-15  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/55940
-	* function.c (thread_prologue_and_epilogue_insns): Always
-	add crtl->drap_reg to set_up_by_prologue.set, even if
-	stack_realign_drap is false.
-
-2013-01-15  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
-
-	* config/vax/vax.md (add<mode>3, sub<mode>3, mul<mode>3, div<mode>3,
-	and<mode>3, *and<mode>_const_int, ior<mode>3, xor<mode>3, ashrsi3,
-	*call): Fix indention.
-
-2013-01-15  Tom de Vries  <tom@codesourcery.com>
-
-	PR target/55876
-	* optabs.c (widen_operand): Use gen_lowpart instead of gen_rtx_SUBREG.
-	Update comment.
-
-2013-01-15  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/55153
-	* sched-deps.c (sched_analyze_2): Add pending reads for prefetch.
-
-2013-01-15  Martin Jambor  <mjambor@suse.cz>
-
-	PR tree-optimization/55920
-	* tree-sra.c (analyze_access_subtree): Do not mark non-removable
-	accesses as grp_to_be_debug_replaced.
-
-2013-01-15  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/55920
-	* tree-sra.c (sra_modify_assign): If for lacc->grp_to_be_debug_replaced
-	there is non-useless type conversion needed from debug rhs to lhs,
-	use build_debug_ref_for_model and/or VIEW_CONVERT_EXPR.
-
-2013-01-15  Joseph Myers  <joseph@codesourcery.com>
-	    Mikael Pettersson  <mikpe@it.uu.se>
-
-	PR target/43961
-	* config/arm/arm.h (ADDR_VEC_ALIGN): Align SImode jump tables for
-	Thumb.
-	(ASM_OUTPUT_CASE_LABEL): Remove.
-	(ASM_OUTPUT_BEFORE_CASE_LABEL): Define to empty.
-	* final.c (shorten_branches): Update alignment of labels before
-	jump tables if CASE_VECTOR_SHORTEN_MODE.
-
-2013-01-15  Richard Biener  <rguenther@suse.de>
-
-	PR bootstrap/55961
-	* system.h: Do not include gmp.h for building host tools.
-
-2013-01-15  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/55882
-	* emit-rtl.c (set_mem_attributes_minus_bitpos): Correctly
-	account for bitpos when computing alignment.
-
-2013-01-15  Vladimir Yakovlev  <vladimir.b.yakovlev@intel.com>
-
-	* config/i386/i386-c.c (ix86_target_macros_internal): New case.
-	(ix86_target_macros_internal): Likewise.
-
-	* config/i386/i386.c (m_CORE2I7): Removed.
-	(m_CORE_HASWELL): New macro.
-	(m_CORE_ALL): Likewise.
-	(initial_ix86_tune_features): m_CORE2I7 is replaced by m_CORE_ALL.
-	(initial_ix86_arch_features): Likewise.
-	(processor_target_table): Initializations for Core avx2.
-	(cpu_names): New names "core-avx2".
-	(ix86_option_override_internal): Changed PROCESSOR_COREI7 by
-	PROCESSOR_CORE_HASWELL.
-	(ix86_issue_rate): New case.
-	(ia32_multipass_dfa_lookahead): Likewise.
-	(ix86_sched_init_global): Likewise.
-
-	* config/i386/i386.h (TARGET_HASWELL): New macro.
-	(target_cpu_default): New TARGET_CPU_DEFAULT_haswell.
-	(processor_type): New PROCESSOR_HASWELL.
-
-2013-01-15  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/55955
-	* tree-vect-loop.c (vectorizable_reduction): Give up early on
-	*SHIFT_EXPR and *ROTATE_EXPR codes.
-
-	PR tree-optimization/48766
-	* opts.c (common_handle_option): For -fwrapv disable -ftrapv, for
-	-ftrapv disable -fwrapv.
-
-2013-01-14  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR target/55974
-	* config/avr/avr-c.c (avr_cpu_cpp_builtins): Define __FLASH
-	etc. to 1 and not to __flash.
-	Use LL suffix for __INT24_MAX__ with -mint8.
-	Use ULL suffix for __UINT24_MAX__ with -mint8.
-
-2013-01-14  Georg-Johann Lay  <avr@gjlay.de>
-
-	* config/avr/avr-arch.h
-	(struct base_arch_s): Use typedef avr_arch_t instead.
-	(struct arch_info_s): Use typedef avr_arch_info_t instead.
-	(struct mcu_type_s): Use typedef avr_mcu_t instead.
-	* config/avr/avr.c: Same.
-	* config/avr/avr-devices.c: Same.
-	* config/avr/driver-avr.c: Same.
-	* config/avr/gen-avr-mmcu-texi.c: Same.
-	* config/avr/avr-mcus.def: Adjust comment.
-
-2013-01-14  Tejas Belagod  <tejas.belagod@arm.com>
-
-	* config/aarch64/aarch64-simd.md (*aarch64_simd_ld1r<mode>): New.
-	* config/aarch64/iterators.md (VALLDI): New.
-
-2013-01-14  Uros Bizjak  <ubizjak@gmail.com>
-	    Andi Kleen  <ak@linux.intel.com>
-
-	PR target/55948
-	* config/i386/sync.md (atomic_store<mode>_1): New pattern.
-	(atomic_store<mode>): Call atomic_store<mode>_1 for IX86_HLE_RELEASE
-	memmodel flag.
-
-2013-01-14  Georg-Johann Lay  <avr@gjlay.de>
-
-	* config/avr/avr-stdint.h: Remove trailing blanks.
-	* config/avr/avr-log.h: Same.
-	* config/avr/avr-arch.h: Same.
-	* config/avr/avr-devices.c: Same.
-	* config/avr/avr-dimode.md: Same.
-	* config/avr/predicates.md: Same.
-	* config/avr/avr-c.c: Same.  And fix typo.
-
-	* config/avr/avr-protos.h: Same.  And:
-	(function_arg_regno_p): Rename to avr_function_arg_regno_p.
-	(init_cumulative_args): Rename to avr_init_cumulative_args.
-	(expand_prologue): Rename to avr_expand_prologue.
-	(expand_epilogue): Rename to avr_expand_epilogue.
-	(adjust_insn_length): Rename to avr_adjust_insn_length.
-	(notice_update_cc): Rename to avr_notice_update_cc.
-	(final_prescan_insn): Rename to avr_final_prescan_insn.
-	* config/avr/avr.c: Same.
-	* config/avr/avr.h: Same.
-	* config/avr/avr.md: Remove trailing blanks.
-	(prologue): Use avr_expand_prologue.
-	(epilogue, sibcall_epilogue): Use avr_expand_epilogue.
-
-2013-01-14  Richard Biener  <rguenther@suse.de>
-
-	* tree-cfg.c (verify_expr_location, verify_expr_location_1,
-	verify_location, collect_subblocks): New functions.
-	(verify_gimple_in_cfg): Verify that locations only reference
-	BLOCKs in the functions BLOCK tree.
-
-2013-01-14  Richard Biener  <rguenther@suse.de>
-
-	* tree-cfgcleanup.c (remove_forwarder_block): Unshare propagated
-	PHI argument.
-	* graphite-sese-to-poly.c (insert_out_of_ssa_copy): Properly
-	unshare reference.
-	(insert_out_of_ssa_copy_on_edge): Likewise.
-	(rewrite_close_phi_out_of_ssa): Likewise.
-	* tree-ssa.c (insert_debug_temp_for_var_def): Properly unshare
-	debug expressions.
-	* tree-ssa-pre.c (insert_into_preds_of_block): Properly unshare
-	propagated constants.
-	* tree-cfg.c (tree_node_can_be_shared): Handled component-refs
-	can not be shared.
-
-2013-01-14  Georg-Johann Lay  <avr@gjlay.de>
-
-	* config/avr/avr-modes.def: Add GPL copyright notice.
-
-2013-01-13  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/sync.md (mem_thread_fence): Mask operands[0] with
-	MEMMODEL_MASK to determine memory model.
-	(atomic_store<mode>): Ditto from operands[2].
-	* config/i386/i386.c (ix86_memmodel_check): Declare "strong" as bool.
-
-2013-01-13  Jakub Jelinek  <jakub@redhat.com>
-
-	PR fortran/55935
-	* gimple-fold.c (get_symbol_constant_value): Call unshare_expr.
-	(fold_gimple_assign): Don't call unshare_expr here.
-	(fold_ctor_reference): Call unshare_expr.
-
-2013-01-13  Terry Guo  <terry.guo@arm.com>
-
-	* Makefile.in (s-mlib): New argument MULTILIB_REUSE.
-	* doc/fragments.texi: Document MULTILIB_REUSE.
-	* gcc.c (multilib_reuse): New internal spec.
-	(set_multilib_dir): Also search multilib from multilib_reuse.
-	* genmultilib (tmpmultilib3): Refactor code.
-	(tmpmultilib4): Ditto.
-	(multilib_reuse): New multilib argument.
-
-2013-01-13  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* Makefile.in: Update copyright.
-
-2013-01-12  Tom de Vries  <tom@codesourcery.com>
-
-	PR middle-end/55890
-	* calls.c (expand_call): Check if arg_nr is valid.
-
-2013-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
-
-	* doc/extend.texi (X86 Built-in Functions): Add whitespace in
-	__builtin_ia32_paddb256 and __builtin_ia32_pavgb256
-	documentation.  Add missing '__' in front of
-	__builtin_ia32_packssdw256.
-
-2013-01-11  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	PR target/55719
-	* config/s390/s390.c (s390_preferred_reload_class): Do not return
-	NO_REGS for larl operands.
-	(s390_reload_larl_operand): Use s390_load_address instead of
-	emit_move_insn.
-
-2013-01-11  Richard Biener  <rguenther@suse.de>
-
-	* tree-cfg.c (verify_node_sharing_1): Split out from ...
-	(verify_node_sharing): ... here.
-	(verify_gimple_in_cfg): Use verify_node_sharing_1 for walk_tree.
-
-2013-01-11  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* configure.ac (Tree checking): Set TREECHECKING to yes if enabled.
-	Substitute TREECHECKING.
-	* configure: Regenerate.
-	* Makefile.in (TREECHECKING): New.
-
-2013-01-11  Richard Guenther  <rguenther@suse.de>
-
-	PR tree-optimization/44061
-	* tree-vrp.c (extract_range_basic): Compute zero as
-	value-range for __builtin_constant_p of function parameters.
-
-2013-01-10  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	Update copyright years.
-
-2013-01-10  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/55672
-	* lra-eliminations.c (mark_not_eliminable): Permit addition with
-	const to be eliminable.
-
-2013-01-10  David Edelsohn  <dje.gcc@gmail.com>
-
-	* configure.ac (HAVE_AS_TLS): Add check for powerpc-ibm-aix.
-	* configure: Regenerate.
-
-2013-01-10  Richard Biener  <rguenther@suse.de>
-
-	* builtins.c (expand_builtin_init_trampoline): Use set_mem_attributes.
-
-2013-01-10  Richard Biener  <rguenther@suse.de>
-
-	PR bootstrap/55792
-	* tree-into-ssa.c (rewrite_add_phi_arguments): Do not set
-	locations for virtual PHI arguments.
-	(rewrite_update_phi_arguments): Likewise.
-
-2013-01-10  Joel Sherrill  <joel.sherrill@OARcorp.com>
-
-	* config/v850/rtems.h (ASM_SPEC): Pass -m8byte-align and -mgcc-abi
-	on to assembler.
-
-2013-01-10  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/55921
-	* tree-complex.c (expand_complex_asm): New function.
-	(expand_complex_operations_1): Call it for GIMPLE_ASM.
-
-2013-01-10  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	PR target/55718
-	* config/s390/s390.c (s390_symref_operand_p)
-	(s390_loadrelative_operand_p): Merge the two functions.
-	(s390_check_qrst_address, print_operand_address): Add parameters
-	to s390_loadrelative_operand_p invokation.
-	(s390_check_symref_alignment): Use s390_loadrelative_operand_p.
-	(s390_reload_larl_operand, s390_secondary_reload): Use
-	s390_loadrelative_operand_p instead of s390_symref_operand_p.
-	(legitimize_pic_address): Handle @GOTENT and @PLT + addend.
-
-2013-01-09  Mike Stump  <mikestump@comcast.net>
-
-	* dse.c (record_store): Remove unnecessary assert.
-
-2013-01-09  Jan Hubicka  <jh@suse.cz>
-
-	PR tree-optimization/55569
-	* cfgloopmanip.c (scale_loop_profile): Make ITERATION_BOUND gcov_type.
-	* cfgloop.h (scale_loop_profile): Likewise.
-
-2013-01-09  Jan Hubicka  <jh@suse.cz>
-
-	PR lto/45375
-	* ipa-inline.c (ipa_inline): Remove extern inlines and virtual
-	functions.
-	* cgraphclones.c (cgraph_clone_node): Cpoy also LTO file data.
-
-2013-01-09  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	PR middle-end/55114
-	* expr.h (maybe_emit_group_store): Declare.
-	* expr.c (maybe_emit_group_store): New function.
-	* builtins.c (expand_builtin_int_roundingfn): Call it.
-	(expand_builtin_int_roundingfn_2): Likewise.
-
-2013-01-09  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/55829
-	* lra-constraints.c (match_reload): Add code for absent output.
-	(curr_insn_transform): Add code for reloads of matched inputs
-	without output.
-
-2013-01-09  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/sse.md (*vec_interleave_highv2df): Change mode
-	attribute of movddup insn to DF.
-	(*vec_interleave_lowv2df): Ditto.
-	(vec_dupv2df): Ditto.
-
-2013-01-09  Jan Hubicka  <jh@suse.cz>
-
-	PR tree-optimiation/55875
-	* tree-ssa-loop-niter.c (number_of_iterations_cond): Add
-	EVERY_ITERATION parameter.
-	(number_of_iterations_exit): Check if exit is executed every iteration.
-	(idx_infer_loop_bounds): Similarly here.
-	(n_of_executions_at_most): Simplify
-	to only test for cases where statement is dominated by the
-	particular bound; handle correctly the "postdominance" test.
-	(scev_probably_wraps_p): Use max loop iterations info
-	as a global bound first.
-
-2013-01-09  Nguyen Duy Dat  <dat.nguyen.yn@rvc.renesas.com>
-	    Nick Clifton  <nickc@redhat.com>
-
-	* config/v850/v850.md (cbranchsf4): New pattern.
-	(cstoresf4): New pattern.
-	(cbranchdf4): New pattern.
-	(cstoredf4): New pattern.
-	(movsicc): Disallow floating point comparisons.
-	(cmpsf_le_insn): Fix order of operators.
-	(cmpsf_lt_insn): Likewise.
-	(cmpsf_eq_insn): Likewise.
-	(cmpdf_le_insn): Likewise.
-	(cmpdf_lt_insn): Likewise.
-	(cmpdf_eq_insn): Likewise.
-	(cmpsf_ge_insn): Use LE comparison.
-	(cmpdf_ge_insn): Likewise.
-	(cmpsf_gt_insn): Use LT comparison.
-	(cmpdf_gt_insn): Likewise.
-	(cmpsf_ne_insn): Delete pattern.
-	(cmpdf_ne_insn): Delete pattern.
-	* config/v850/v850.c (v850_gen_float_compare): Use
-	gen_cmpdf_eq_insn for NE comparison.
-	(v850_float_z_comparison_operator)
-	(v850_float_nz_comparison_operator): Move from here ...
-	* config/v850/predicates.md: ... to here.  Move GT and GE
-	comparisons into v850_float_z_comparison_operator.
-	* config/v850/v850-protos.h (v850_float_z_comparison_operator):
-	Delete prototype.
-	(v850_float_nz_comparison_operator): Likewise.
-
-2013-01-09  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
-
-	* config/pa/pa.c (pa_emit_move_sequence): Replace calls to gen_insv
-	with calls to gen_insvsi/gen_insvdi.
-
-2013-01-09  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>
-
-	* config/i386/i386.c (initial_ix86_tune_features): Set up
-	X86_TUNE_AVX128_OPTIMAL for m_BTVER2.
-
-2013-01-09  Steven Bosscher  <steven@gcc.gnu.org>
-	    Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/48189
-	* predict.c (predict_loops): If max is 0, don't call compare_tree_int.
-	If nitercst is 0, don't predict the exit edge.
-
-2013-01-08  Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>
-
-	* config/aarch64/aarch64.c (aarch64_print_operand): Replace %r
-	in asm_fprintf with reg_names.
-	(aarch64_print_operand_address): Likewise.
-	(aarch64_return_addr): Likewise.
-	* config/aarch64/aarch64.h (ASM_FPRINTF_EXTENSIONS): Remove.
-
-2013-01-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
-
-	* config/pa/pa.h (VAL_U6_BITS_P): Define.
-	(INT_U6_BITS): Likewise.
-	* config/pa/predicates.md (uint6_operand): New predicate.
-	(shift5_operand, shift6_operand): Likewise.
-	* config/pa/pa.md (lshrsi3, rotrsi3): Use shift5_operand instead of
-	arith32_operand.
-	(lshrdi3): Use shift6_operand.
-	(shrpsi4, shrpdi4): New insn patterns.
-	(extzv): Delete expander.
-	(extzvsi, extzvdi): New expanders.  Use uint5_operand and uint6_operand
-	predicates in unamed zero extract patterns.  Tighten common constraint.
-	(extv): Delete expander.
-	(extvsi, extvdi): New expanders.  Use uint5_operand and uint6_operand
-	predicates in unamed sign extract patterns.  Tighten common constraint.
-	(insv): Delete expander.
-	(insvsi, insvdi): New expanders.  Use uint5_operand and uint6_operand
-	predicates in unamed insert patterns.  Tighten common constraint.
-	Change uint32_operand predicate to uint6_operand predicate in unamed
-	DImode pattern to insert constant values of type 1...1xxxx.
-
-2013-01-04  Jan Hubicka  <jh@suse.cz>
-
-	PR tree-optimization/55823
-	* ipa-prop.c (update_indirect_edges_after_inlining): Fix ordering
-	issue.
-
-2013-01-08  Jakub Jelinek  <jakub@redhat.com>
-	    Uros Bizjak  <ubizjak@gmail.com>
-
-	PR rtl-optimization/55845
-	* df-problems.c (can_move_insns_across): Stop scanning at
-	volatile_insn_p source instruction or give up if
-	across_from .. across_to range contains any volatile_insn_p
-	instructions.
-
-2013-01-08  Tejas Belagod  <tejas.belagod@arm.com>
-
-	* config/aarch64/aarch64-simd.md (vec_init<mode>): New.
-	* config/aarch64/aarch64-protos.h (aarch64_expand_vector_init):
-	Declare.
-	* config/aarch64/aarch64.c (aarch64_simd_dup_constant,
-	aarch64_simd_make_constant, aarch64_expand_vector_init): New.
-
-2013-01-08  Jakub Jelinek  <jakub@redhat.com>
-
-	PR fortran/55341
-	* asan.c (asan_clear_shadow): New function.
-	(asan_emit_stack_protection): Use it.
-
-2013-01-08  Tejas Belagod  <tejas.belagod@arm.com>
-
-	* config/aarch64/aarch64-simd.md (aarch64_simd_vec_<su>mult_lo_<mode>,
-	aarch64_simd_vec_<su>mult_hi_<mode>): Separate instruction and operand
-	with tab instead of space.
-
-2013-01-08  Nick Clifton  <nickc@redhat.com>
-
-	* config/rl78/rl78.c (rl78_expand_prologue): Always select
-	register bank 0 at the start of an interrupt handler.
-	* config/rl78/rl78.md (mulsi3_g13): Correct values for MDBL and
-	MDBH registers.
-
-2013-01-08  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* config/aarch64/aarch64-simd.md
-	(aarch64_simd_bsl<mode>_internal): Add floating-point modes.
-	(aarch64_simd_bsl): Likewise.
-	(aarch64_vcond_internal<mode>): Likewise.
-	(vcond<mode><mode>): Likewise.
-	(aarch64_cm<cmp><mode>): Fix constraints, add new modes.
-	* config/aarch64/iterators.md (V_cmp_result): Add V2DF.
-
-2013-01-08  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* config/aarch64/aarch64-builtins.c
-	(aarch64_builtin_vectorized_function): Handle sqrt, sqrtf.
-
-2013-01-08  Martin Jambor  <mjambor@suse.cz>
-
-	PR debug/55579
-	* tree-sra.c (analyze_access_subtree): Return true also after
-	potentially creating a debug-only replacement.
-
-2013-01-08  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/55890
-	* tree-ssa-ccp.c (evaluate_stmt): Use gimple_call_builtin_p.
-
-	PR tree-optimization/54120
-	* tree-vrp.c (range_fits_type_p): Don't allow
-	src_precision < precision from signed vr to unsigned_p
-	if vr->min or vr->max is negative.
-	(simplify_float_conversion_using_ranges): Test can_float_p
-	against CODE_FOR_nothing.
-
-2013-01-08  Jakub Jelinek  <jakub@redhat.com>
-	    Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/55851
-	* fold-const.c (int_binop_types_match_p): Allow all INTEGRAL_TYPE_P
-	types instead of just INTEGER_TYPE types.
-
-2013-01-07  Mark Kettenis  <kettenis@openbsd.org>
-
-	* config/i386/openbsdelf.h (LIBGCC2_HAS_TF_MODE, LIBGCC2_TF_CEXT,
-	TF_SIZE): Define.
-
-2013-01-07  Steve Ellcey  <sellcey@mips.com>
-
-	PR target/42661
-	* config/mips/mips.opt: Change mad to mmad to match documentation.
-
-2013-01-07  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR target/55897
-	* doc/extend.texi (AVR Named Address Spaces): __memx goes into
-	.progmemx.data now.
-
-2013-01-07  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR target/55897
-	* config/avr/avr.h (ADDR_SPACE_COUNT): New enum.
-	(avr_addrspace_t): Add .section_name field.
-	* config/avr/avr.c (progmem_section): Use ADDR_SPACE_COUNT as
-	array size.
-	(avr_addrspace): Same.  Initialize .section_name.  Remove last
-	NULL entry.  Put __memx into .progmemx.data.
-	(progmem_section_prefix): Remove.
-	(avr_asm_init_sections): No need to initialize progmem_section.
-	(avr_asm_named_section): Use avr_addrspace[].section_name to get
-	section name prefix.
-	(avr_asm_select_section): Ditto.  And use get_unnamed_section to
-	retrieve the progmem section.
-	* avr-c.c (avr_cpu_cpp_builtins): Use ADDR_SPACE_COUNT as loop
-	boundary to run over avr_addrspace[].
-	(avr_register_target_pragmas): Ditto.
-
-2013-01-06  Jakub Jelinek  <jakub@redhat.com>
-
-	* varasm.c (output_constant_def_contents): For asan_protect_global
-	protected strings, adjust DECL_ALIGN if needed, before testing for
-	anchored symbols.
-	(place_block_symbol): Adjust size for asan protected STRING_CSTs if
-	TREE_CONSTANT_POOL_ADDRESS_P.  Increase alignment for asan protected
-	normal decls.
-	(output_object_block): For asan protected decls, emit asan padding
-	after their contents.
-	* asan.c (asan_protect_global): Don't check TREE_ASM_WRITTEN here.
-	(asan_finish_file): Test it here instead.
-
-2013-01-07  Nick Clifton  <nickc@redhat.com>
-	    Matthias Klose  <doko@debian.org>
-	    Doug Kwan  <dougkwan@google.com>
-	    H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR driver/55470
-	* collect2.c (main): Support -fuse-ld=bfd and -fuse-ld=gold.
-
-	* common.opt: Add fuse-ld=bfd and fuse-ld=gold.
-
-	* gcc.c (LINK_COMMAND_SPEC): Pass -fuse-ld=* to collect2.
-
-	* opts.c (comman_handle_option): Ignore -fuse-ld=bfd and -fuse-ld=gold.
-
-	* doc/invoke.texi: Document -fuse-ld=bfd and -fuse-ld=gold.
-
-2013-01-07  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR target/54461
-	* doc/install.texi (Cross-Compiler-Specific Options): Document
-	--with-avrlibc.
-
-2013-01-07  Tejas Belagod  <tejas.belagod@arm.com>
-
-	* config/aarch64/arm_neon.h (vmovn_high_is16, vmovn_high_s32,
-	vmovn_high_s64, vmovn_high_u16, vmovn_high_u32, vmovn_high_u64,
-	vqmovn_high_s16, vqmovn_high_s32, vqmovn_high_s64, vqmovn_high_u16,
-	vqmovn_high_u32, vqmovn_high_u64, vqmovun_high_s16, vqmovun_high_s32,
-	vqmovun_high_s64): Fix source operand number and update copyright.
-
-2013-01-07  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/55890
-	* gimple.h (gimple_call_builtin_p): New overload.
-	* gimple.c (validate_call): New function.
-	(gimple_call_builtin_p): Likewise.
-	* tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
-	Use gimple_call_builtin_p.
-	(find_func_clobbers): Likewise.
-	* tree-ssa-strlen.c (adjust_last_stmt): Likewise.
-	(strlen_optimize_stmt): Likewise.
-
-2013-01-07  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* config/aarch64/arm_neon.h (vld1_dup_*): Make argument const.
-	(vld1q_dup_*): Likewise.
-	(vld1_*): Likewise.
-	(vld1q_*): Likewise.
-	(vld1_lane_*): Likewise.
-	(vld1q_lane_*): Likewise.
-
-2013-01-07  Richard Biener  <rguenther@suse.de>
-
-	* lto-streamer.h (LTO_minor_version): Bump to 2.
-
-2013-01-07  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* config/aarch64/aarch64-protos.h
-	(aarch64_const_double_zero_rtx_p): Rename to...
-	(aarch64_float_const_zero_rtx_p): ...this.
-	(aarch64_float_const_representable_p): New.
-	(aarch64_output_simd_mov_immediate): Likewise.
-	* config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>): Refactor
-	move immediate case.
-	* config/aarch64/aarch64.c
-	(aarch64_const_double_zero_rtx_p): Rename to...
-	(aarch64_float_const_zero_rtx_p): ...this.
-	(aarch64_print_operand): Allow printing of new constants.
-	(aarch64_valid_floating_const): New.
-	(aarch64_legitimate_constant_p): Check for valid floating-point
-	constants.
-	(aarch64_simd_valid_immediate): Likewise.
-	(aarch64_vect_float_const_representable_p): New.
-	(aarch64_float_const_representable_p): Likewise.
-	(aarch64_simd_imm_zero_p): Also allow for floating-point 0.0.
-	(aarch64_output_simd_mov_immediate): New.
-	* config/aarch64/aarch64.md (*movsf_aarch64): Add new alternative.
-	(*movdf_aarch64): Likewise.
-	* config/aarch64/constraints.md (Ufc): New.
-	(Y): call aarch64_float_const_zero_rtx.
-	* config/aarch64/predicates.md (aarch64_fp_compare_operand): New.
-
-2013-01-07  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/55888
-	PR tree-optimization/55862
-	* tree-ssa-pre.c (phi_translate_1): Revert previous change.
-	(valid_in_sets): Check if a NAME has a leader in AVAIL_OUT,
-	not if it is contained therein.
-
-2013-01-07  Georg-Johann Lay  <avr@gjlay.de>
-
-	* config/avr/t-avr: Typo.
-
-2013-01-07  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR55243
-	* config/avr/t-avr: Don't automatically rebuild
-	$(srcdir)/config/avr/t-multilib
-	$(srcdir)/config/avr/avr-tables.opt
-	$(srcdir)/doc/avr-mmcu.texi
-	(avr-mcus): New phony target to build them on request.
-	(s-avr-mlib, s-avr-mmcu-texi): Remove.
-	* avr/avr-mcus.def: Adjust comments.
-
-2013-01-07  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/i386.c (DEFAULT_PCC_STRUCT_RETURN): Remove.
-
-2013-01-06  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* file-find.c, file-find.h, realmpfr.c: Add FSF as copyright holder.
-
-2013-01-06  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* config/tilepro/gen-mul-tables.cc: Put copyright on one line.
-
-2013-01-05  David Edelsohn  <dje.gcc@gmail.com>
-
-	* config/rs6000/aix53.h (LIB_SPEC): Add -lpthreads when compiling
-	to generate profiling.
-	* config/rs6000/aix64.h (LIB_SPEC): Same.
-
-2013-01-04  Andrew Pinski  <apinski@cavium.com>
-
-	* config/aarch64/aarch64.c (aarch64_fixed_condition_code_regs):
-	New function.
-	(TARGET_FIXED_CONDITION_CODE_REGS): Define.
-
-2013-01-04  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/i386.c (ix86_legitimize_address): Call convert_to_mode
-	unconditionally.
-	(ix86_expand_move): Ditto.
-	(ix86_zero_extend_to_Pmode): Ditto.
-	(ix86_expand_call): Ditto.
-	(ix86_expand_special_args_builtin): Ditto.
-	(ix86_expand_builtin): Ditto.
-
-2013-01-04  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/55862
-	* tree-ssa-pre.c (phi_translate_1): Valueize SSA names after
-	translating them through PHI nodes.
-
-2013-01-04  Martin Jambor  <mjambor@suse.cz>
-
-	PR tree-optimization/55755
-	* tree-sra.c (sra_modify_assign): Do not check that an access has no
-	children when trying to avoid producing a VIEW_CONVERT_EXPR.
-
-2013-01-04  Marek Polacek  <polacek@redhat.com>
-
-	PR middle-end/55859
-	* opts.c (default_options_optimization): Clarify error message.
-
-2013-01-04  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/55863
-	* fold-const.c (split_tree): Undo -X - 1 to ~X folding for
-	reassociation.
-
-2013-01-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
-
-	PR target/53789
-	* config/pa/pa.md (movsi): Revert previous change.
-	* config/pa/pa.c (pa_legitimate_constant_p): Reject all TLS symbol
-	references.
-
-2013-01-03  Richard Henderson  <rth@redhat.com>
-
-	* config/i386/i386.c (ix86_expand_move): Always assign to op1
-	after eliminating TLS symbols.
-
-2013-01-03  Marc Glisse  <marc.glisse@inria.fr>
-
-	PR bootstrap/50167
-	* graphite-interchange.c (pdr_stride_in_loop): Use gmp_fprintf.
-	* graphite-poly.c (debug_gmp_value): Likewise.
-
-2013-01-03  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/55712
-	* config/i386/i386-c.c (ix86_target_macros_internal): Depending on
-	selected code model, define __code_mode_small__, __code_model_medium__,
-	__code_model_large__, __code_model_32__ or __code_model_kernel__.
-	* config/i386/cpuid.h (__cpuid, __cpuid_count) [__i386__]: Prefix
-	xchg temporary register with %k.  Declare temporary register as
-	early clobbered.
-	[__x86_64__]: For medium and large code models, preserve %rbx register.
-
-2013-01-03  Richard Biener  <rguenther@suse.de>
-
-	* tree-data-ref.c (dump_conflict_function): Use less vertical spacing.
-	(dump_subscript): Adjust.
-	(finalize_ddr_dependent): Do not dump redundant info.
-	(analyze_siv_subscript): Adjust.
-	(subscript_dependence_tester): Likewise.
-	(compute_affine_dependence): Likewise.
-
-2013-01-03  Richard Biener  <rguenther@suse.de>
-
-	Revert
-	2013-01-03  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/55857
-	* tree-vect-stmts.c (vectorizable_load): Do not setup
-	re-alignment for invariant loads.
-
-	2013-01-02  Richard Biener  <rguenther@suse.de>
-
-	* tree-vect-stmts.c (vectorizable_load): When vectorizing an
-	invariant load do not generate a vector load from the scalar location.
-
-2013-01-03  Richard Biener  <rguenther@suse.de>
-
-	* tree-vect-loop.c (vect_analyze_loop_form): Clarify reason
-	for not vectorizing.
-	* tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref): Do
-	not build INDIRECT_REFs, call get_name once only.
-	(vect_create_data_ref_ptr): Likewise.  Dump base object kind
-	based on DR_BASE_OBJECT, not DR_BASE_ADDRESS.
-
-2013-01-03  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/55857
-	* tree-vect-stmts.c (vectorizable_load): Do not setup
-	re-alignment for invariant loads.
-
-2013-01-03  Richard Biener  <rguenther@suse.de>
-
-	PR lto/55848
-	* lto-symtab.c (lto_symtab_merge_decls_1): As last resort, always
-	prefer a built-in decl.
-
-2013-01-03  Jakub Jelinek  <jakub@redhat.com>
-
-	* gcc.c (process_command): Update copyright notice dates.
-	* gcov.c (print_version): Likewise.
-	* gcov-dump.c (print_version): Likewise.
-
-	PR rtl-optimization/55838
-	* loop-iv.c (iv_number_of_iterations): Call lowpart_subreg on
-	iv0.step, iv1.step and step.
-
-2013-01-03  Jakub Jelinek  <jakub@redhat.com>
-	    Marc Glisse  <marc.glisse@inria.fr>
-
-	PR tree-optimization/55832
-	* fold-const.c (fold_binary_loc): For ABS_EXPR<x> >= 0 and
-	ABS_EXPR<x> < 0 folding use constant_boolean_node instead of
-	integer_{one,zero}_node.
-
-2013-01-03  Jakub Jelinek  <jakub@redhat.com>
-
-	PR debug/54402
-	* params.def (PARAM_MAX_VARTRACK_REVERSE_OP_SIZE): New param.
-	* var-tracking.c (reverse_op): Don't add reverse ops to
-	VALUEs that have already
-	PARAM_VALUE (PARAM_MAX_VARTRACK_REVERSE_OP_SIZE) or longer locs list.
-
-2013-01-02  Gerald Pfeifer  <gerald@pfeifer.com>
-
-	* doc/contrib.texi: Note years as release manager for Mark Mitchell.
-
-2013-01-02  Teresa Johnson  <tejohnson@google.com>
-
-	* dumpfile.c (dump_loc): Print filename with location.
-	* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Use
-	new location_t parameter to emit complete unroll message with
-	new dump framework.
-	(canonicalize_loop_induction_variables): Compute loops location
-	and pass to try_unroll_loop_completely.
-	* loop-unroll.c (report_unroll_peel): New function.
-	(peel_loops_completely): Use new dump format with location
-	for main dumpfile message, and invoke report_unroll_peel on success.
-	(decide_unrolling_and_peeling): Ditto.
-	(decide_peel_once_rolling): Remove old dumpfile message subsumed
-	by report_unroll_peel.
-	(decide_peel_completely): Ditto.
-	(decide_unroll_constant_iterations): Ditto.
-	(decide_unroll_runtime_iterations): Ditto.
-	(decide_peel_simple): Ditto.
-	(decide_unroll_stupid): Ditto.
-	* cfgloop.c (get_loop_location): New function.
-	* cfgloop.h (get_loop_location): Declare.
-
-2013-01-02  Sriraman Tallam  <tmsriram@google.com>
-
-	* config/i386/i386.c (fold_builtin_cpu): Remove unnecessary checks for
-	NULL.
-
-2013-01-02  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
-
-	PR middle-end/55198
-	* expr.c (expand_expr_real_1): Don't use bitfield extraction for non
-	BLKmode objects when EXPAND_MEMORY is specified.
-
-2013-01-02  Sriraman Tallam  <tmsriram@google.com>
-
-	* config/i386/i386.c (ix86_get_function_versions_dispatcher): Fix bug
-	in loop predicate.
-	(fold_builtin_cpu): Do not share cpu model decls across statements.
-
-2013-01-02  Jason Merrill  <jason@redhat.com>
-
-	PR c++/55804
-	* tree.c (build_array_type_1): Revert earlier change.
-
-2013-01-02  Yufeng Zhang  <yufeng.zhang@arm.com>
-
-	* config/aarch64/aarch64-cores.def: Add entries for "cortex-a53" and
-	"cortex-a57".
-	* config/aarch64/aarch64-tune.md: Re-generate.
-
-2013-01-02  Richard Biener  <rguenther@suse.de>
-
-	* tree-vect-stmts.c (vectorizable_load): When vectorizing an
-	invariant load do not generate a vector load from the scalar location.
-
-2013-01-02  Richard Biener  <rguenther@suse.de>
-
-	PR bootstrap/55784
-	* configure.ac: Add $GMPINC to CFLAGS/CXXFLAGS.
-	* configure: Regenerate.
-
-2013-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* builtins.c (expand_builtin_mathfn, expand_builtin_mathfn_2)
-	(expand_builtin_mathfn_ternary, expand_builtin_mathfn_3)
-	(expand_builtin_int_roundingfn_2): Keep the original target around
-	for the fallback case.
-
-2013-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* tree-vrp.c (range_fits_type_p): Require the MSB of the double_int
-	to be clear for sign changes.
-
-2013-01-01  Jan Hubicka  <jh@suse.cz>
-
-	* ipa-inline-analysis.c: Fix formatting.
-
-2013-01-01  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/55831
-	* tree-vect-loop.c (get_initial_def_for_induction): Use
-	gsi_after_labels instead of gsi_start_bb.
+	* opts.c (struct default_options default_options_table):
+	Turn on -ftree-loop-vectorize at -O2.
 
-Copyright (C) 2013 Free Software Foundation, Inc.
+Copyright (C) 2014 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
diff --git a/gcc/ChangeLog-2013 b/gcc/ChangeLog-2013
new file mode 100644
index 0000000..1d6d0b5
--- /dev/null
+++ b/gcc/ChangeLog-2013
@@ -0,0 +1,6180 @@
+2013-11-14  Cong Hou  <congh@google.com>
+
+	Backport from mainline
+	2013-11-14  Cong Hou  <congh@google.com>
+
+	* tree-vectorizer.h (struct dr_with_seg_len): Remove the base
+	address field as it can be obtained from dr.  Rename the struct.
+	* tree-vect-data-refs.c (comp_dr_with_seg_len_pair): Consider
+	steps of data references during sort.
+	(vect_prune_runtime_alias_test_list): Adjust with the change to
+	struct dr_with_seg_len.
+	* tree-vect-loop-manip.c (vect_create_cond_for_alias_checks):
+	Adjust with the change to struct dr_with_seg_len.
+
+	2013-11-07  Cong Hou  <congh@google.com>
+
+	PR tree-optimization/56764
+	* tree-vect-loop-manip.c (vect_create_cond_for_alias_checks):
+	Combine alias checks if it is possible to amortize the runtime
+	overhead.  Return the number of alias checks after merging.
+	* tree-vect-data-refs.c (vect_prune_runtime_alias_test_list):
+	Use the function vect_create_cond_for_alias_checks () to check
+	the number of alias checks.
+
+2013-11-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Backport from mainline
+	2013-10-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR target/58690
+	* config/i386/i386.c (ix86_copy_addr_to_reg): New function.
+	(ix86_expand_movmem): Replace copy_addr_to_reg with
+	ix86_copy_addr_to_reg.
+	(ix86_expand_setmem): Likewise.
+
+2013-10-30  Cong Hou  <congh@google.com>
+
+	Backport from mainline:
+	2013-10-15  Cong Hou  <congh@google.com>
+
+	* tree-vect-loop-manip.c (vect_loop_versioning): Hoist loop invariant
+	statement that contains data refs with zero-step.
+
+2013-10-30  Cong Hou  <congh@google.com>
+
+	Backport from mainline:
+	2013-10-15  Cong Hou  <congh@google.com>
+
+	* tree-vect-loop.c (vect_is_simple_reduction_1): Relax the 
+	requirement of the reduction pattern so that one operand of the 
+	reduction operation can come from outside of the loop.
+
+2013-10-30  Cong Hou  <congh@google.com>
+
+	Backport from mainline:
+	2013-10-30  Cong Hou  <congh@google.com>
+
+	PR target/58762
+	* config/i386/i386-protos.h (ix86_expand_sse2_abs): New function.
+	* config/i386/i386.c (ix86_expand_sse2_abs): New function.
+	* config/i386/sse.md: Add SSE2 support to abs (8/16/32-bit-int).
+
+2013-10-29  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	PR rtl-optimization/58079
+	* combine.c (combine_simplify_rtx): Avoid using SUBST if
+	simplify_comparison has widened a comparison with an integer.
+
+2013-10-29  Martin Jambor  <mjambor@suse.cz>
+
+	PR middle-end/58789
+	Backport from mainline
+        2013-05-09  Martin Jambor  <mjambor@suse.cz>
+
+	PR lto/57084
+	* gimple-fold.c (canonicalize_constructor_val): Call
+	cgraph_get_create_real_symbol_node instead of cgraph_get_create_node.
+
+	Backport from mainline
+	2013-03-16  Jan Hubicka  <jh@suse.cz>
+
+	* cgraph.h (cgraph_get_create_real_symbol_node): Declare.
+	* cgraph.c (cgraph_get_create_real_symbol_node): New function.
+	* cgrpahbuild.c: Use cgraph_get_create_real_symbol_node instead
+	of cgraph_get_create_node.
+	* ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
+
+2013-10-28  Tom de Vries  <tom@codesourcery.com>
+
+	* cfgexpand.c (gimple_expand_cfg): Remove test for parm_birth_insn.
+	Don't commit insertions after NOTE_INSN_FUNCTION_BEG.
+
+2013-10-26  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-10-22  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/58779
+	* config/i386/i386.c (put_condition_code) <case GTU, case LEU>:
+	Remove CCCmode handling.
+	<case LTU>: Return 'c' suffix for CCCmode.
+	<case GEU>: Return 'nc' suffix for CCCmode.
+	(ix86_cc_mode) <case GTU, case LEU>: Do not generate overflow checks.
+	* config/i386/i386.md (*sub<mode>3_cconly_overflow): Remove.
+	(*sub<mode>3_cc_overflow): Ditto.
+	(*subsi3_zext_cc_overflow): Ditto.
+
+2013-10-26  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-10-19  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/58792
+	* config/i386/i386.c (ix86_function_value_regno): Add DX_REG,
+	ST1_REG and XMM1_REG for 32bit and 64bit targets.  Also add DI_REG
+	and SI_REG for 64bit SYSV ABI targets.
+
+2013-10-25  Eric Botcazou  <ebotcazou@adacore.com>
+
+	PR rtl-optimization/58831
+	* alias.c (init_alias_analysis): At the beginning of each iteration, set
+	the reg_seen[N] bit if static_reg_base_value[N] is non-null.
+
+2013-10-25  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* recog.c (search_ofs): New static variable moved from...
+	(peep2_find_free_register): ...here.
+	(peephole2_optimize): Initialize it.
+
+2013-10-24  David Edelsohn  <dje.gcc@gmail.com>
+
+	Backport from mainline
+	2013-10-23  David Edelsohn  <dje.gcc@gmail.com>
+
+	PR target/58838
+	* config/rs6000/rs6000.md (mulsi3_internal1 and splitter): Add
+	TARGET_32BIT final condition.
+	(mulsi3_internal2 and splitter): Same.
+
+2013-10-23  Tom de Vries  <tom@codesourcery.com>
+
+	PR tree-optimization/58805
+	* tree-ssa-tail-merge.c (stmt_local_def): Add gimple_vdef check.
+
+2013-10-23  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-06-24  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57488
+	* tree-ssa-pre.c (insert): Clear NEW sets before each iteration.
+
+2013-10-16  Ganesh Gopalasubramanian  <Ganesh.Gopalasubramanian@amd.com>
+
+	Backport from mainline
+	2013-10-16  Ganesh Gopalasubramanian
+	            <Ganesh.Gopalasubramanian@amd.com>
+
+	* config/i386/i386.c (ix86_option_override_internal): Enable FMA4
+	for AMD bdver3.
+
+2013-10-16  Jakub Jelinek  <jakub@redhat.com>
+
+	* BASE-VER: Set to 4.8.3.
+	* DEV-PHASE: Set to prerelease.
+
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
+2013-10-12  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	Backport from mainline.
+	2013-10-12  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* config/aarch64/arm_neon.h
+	(vtbx<1,3>_<psu>8): Fix register constriants.
+
+2013-10-10  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/58670
+	* stmt.c (expand_asm_operands): Add FALLTHRU_BB argument,
+	if any labels are in FALLTHRU_BB, use a special label emitted
+	immediately after the asm goto insn rather than label_rtx
+	of the LABEL_DECL.
+	(expand_asm_stmt): Adjust caller.
+	* cfgrtl.c (commit_one_edge_insertion): Force splitting of
+	edge if the last insn in predecessor is a jump with single successor,
+	but it isn't simplejump_p.
+
+2013-10-09  Jakub Jelinek  <jakub@redhat.com>
+
+	Backport from mainline
+	2013-09-26  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/58539
+	* tree-vect-loop.c (vect_create_epilog_for_reduction): Honor
+	the fact that debug statements are not taking part in loop-closed
+	SSA construction.
+
+2013-10-07  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* config/s390/s390.c (s390_register_info): Make the call-saved FPR
+	loop to work also for 31bit ABI.
+	Save the stack pointer for frame_size > 0.
+
+2013-10-07  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* config/s390/s390.md ("tbegin", "tbegin_nofloat", "tbegin_retry")
+	("tbegin_retry_nofloat", "tend", "tabort", "tx_assist"): Remove
+	constraint letters from expanders.
+	("tbegin_retry", "tbegin_retry_nofloat"): Change predicate of the
+	retry count to general_operand.
+	("tabort"): Give operand 0 a mode.
+	("tabort_1"): Add mode and constraint letter for operand 0.
+	* doc/extend.texi: Fix protoype of __builtin_non_tx_store.
+
+2013-10-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	Backport from mainline.
+
+	PR target/58460
+	* config/aarch64/aarch64.md (*add_<shift>_<mode>)
+	(*add_<shift>_si_uxtw,*add_mul_imm_<mode>)
+	(*sub_<shift>_<mode>)
+	(*sub_<shift>_si_uxtw,*sub_mul_imm_<mode>, *sub_mul_imm_si_uxtw):
+	Remove k constraint.
+
+2013-10-02  John David Anglin  <danglin@gcc.gnu.org>
+
+	* config.gcc (hppa*64*-*-linux*): Don't add pa/t-linux to tmake_file.
+
+2013-10-01  Jakub Jelinek  <jakub@redhat.com>
+	    Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	PR target/58574
+	* config/s390/s390.c (s390_chunkify_start): Handle tablejump_p first,
+	continue when done, for other jumps look through PARALLEL
+	unconditionally.
+
+2013-09-30  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/58564
+	* fold-const.c (fold_ternary_loc): For A < 0 : <sign bit of A> : 0
+	optimization, punt if sign_bit_p looked through any zero extension.
+
+2013-09-27  Paulo Matos  <pmatos@broadcom.com>
+
+	Backport from mainline.
+
+	PR middle-end/58463
+	2013-03-27  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56716
+	* tree-ssa-structalias.c (perform_var_substitution): Adjust
+	dumping for ref nodes.
+
+2013-09-27  Paulo Matos  <pmatos@broadcom.com>
+
+	Backport from mainline.
+
+	2013-09-27  Paulo Matos  <pmatos@broadcom.com>
+	PR middle-end/58463
+	* gcc.dg/pr58463.c: New test.
+
+2013-09-24  Cong Hou  <congh@google.com>
+
+	Backport from mainline:
+	2013-09-24  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/58513
+	* tree.c (reference_alias_ptr_type): Move ...
+	* alias.c (reference_alias_ptr_type): ... here and implement
+	in terms of the new reference_alias_ptr_type_1.
+	(ref_all_alias_ptr_type_p): New helper.
+	(get_deref_alias_set_1): Drop flag_strict_aliasing here,
+	use ref_all_alias_ptr_type_p.
+	(get_deref_alias_set): Add flag_strict_aliasing check here.
+	(reference_alias_ptr_type_1): New function, split out from ...
+	(get_alias_set): ... here.
+	(alias_ptr_types_compatible_p): New function.
+	* alias.h (reference_alias_ptr_type): Declare.
+	(alias_ptr_types_compatible_p): Likewise.
+	* tree.h (reference_alias_ptr_type): Remove.
+	* fold-const.c (operand_equal_p): Use alias_ptr_types_compatible_p
+	to compare MEM_REF alias types.
+
+	2013-09-25  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/58521
+	* tree.c (iterative_hash_expr): Remove MEM_REF special handling.
+
+2013-09-23  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* tree-ssa-ccp.c (insert_clobber_before_stack_restore): Recurse on copy
+	assignment statements.
+
+2013-09-23  Alan Modra  <amodra@gmail.com>
+
+	PR target/58330
+	* config/rs6000/rs6000.md (bswapdi2_64bit): Disable for volatile mems.
+
+2013-09-23  Alan Modra  <amodra@gmail.com>
+
+	* config/rs6000/predicates.md (add_cint_operand): New.
+	(reg_or_add_cint_operand, small_toc_ref): Use add_cint_operand.
+	* config/rs6000/rs6000.md (largetoc_high_plus): Restrict offset
+	using add_cint_operand.
+	(largetoc_high_plus_aix): Likewise.
+	* config/rs6000/rs6000.c (toc_relative_expr_p): Use add_cint_operand.
+
+2013-09-20  Cong Hou  <congh@google.com>
+
+	Backport from mainline:
+	2013-09-13  Cong Hou  <congh@google.com>
+
+	* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug
+	when checking the dot production pattern. The type of rhs operand
+	of multiply is now checked correctly.
+
+2013-09-20  John David Anglin  <danglin@gcc.gnu.org>
+
+	PR middle-end/56791
+	* config/pa/pa.c (pa_option_override): Disable auto increment and
+	decrement instructions until reload is completed.
+
+	* config/pa/pa.md: In "scc" insn patterns, change output template to
+	handle const0_rtx in reg_or_0_operand operands.
+
+2013-09-19  Jakub Jelinek  <jakub@redhat.com>
+
+	* omp-low.c (expand_omp_sections): Always pass len - 1 to
+	GOMP_sections_start, even if !exit_reachable.
+
+2013-09-18  Richard Earnshaw  <rearnsha@arm.com>
+
+	* arm.c (arm_expand_prologue): Validate architecture supports
+	LDRD/STRD before accepting tuning preferences.
+	(arm_expand_epilogue): Likewise.
+
+2013-09-18  Daniel Morris  <danielm@ecoscentric.com>
+	    Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/58458
+	* doc/implement-cxx.texi: Fix references to the C++ standards.
+
+2013-09-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+	PR tree-optimization/58088
+	* fold-const.c (mask_with_trailing_zeros): New function.
+	(fold_binary_loc): Make sure we don't recurse infinitely
+	when the X in (X & C1) | C2 is a tree of the form (Y * K1) & K2.
+	Use mask_with_trailing_zeros where appropriate.
+
+2013-09-14  John David Anglin  <danglin@gcc.gnu.org>
+
+	PR target/58382
+	* config/pa/pa.c (pa_expand_prologue): Change mode in gen_rtx_POST_INC
+	calls to word_mode.
+
+2013-09-13  Christian Bruel  <christian.bruel@st.com>
+
+	PR target/58314
+	* config/sh/sh.md (mov<mode>_reg_reg): Allow memory reloads.
+
+2013-09-11  Andi Kleen  <ak@linux.intel.com>
+
+	Backport from mainline
+	* doc/extend.texi: Use __atomic_store_n instead of
+	__atomic_store in HLE example.
+
+2013-09-11  Andi Kleen  <ak@linux.intel.com>
+
+	Backport from mainline
+	* doc/extend.texi: Dont use __atomic_clear in HLE
+	example.  Fix typo.
+
+2013-09-11  Andi Kleen  <ak@linux.intel.com>
+
+	Backport from mainline
+	* doc/extend.texi: Document that __atomic_clear and
+	  __atomic_test_and_set should only be used with bool.
+
+2013-09-11  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/58377
+	* passes.c (init_optimization_passes): Split critical edges
+	before late uninit warning pass in the -Og pipeline.
+
+2013-09-11  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/58385
+	* fold-const.c (build_range_check): If both low and high are NULL,
+	use omit_one_operand_loc to preserve exp side-effects.
+
+2013-09-10  Richard Earnshaw  <rearnsha@arm.com>
+
+	PR target/58361
+	* arm/vfp.md (combine_vcvt_f32_<FCVTI32typename>): Fix pattern to
+	support conditional execution.
+	(combine_vcvt_f64_<FCVTI32typename>): Likewise.
+
+2013-09-10  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/58365
+	* cfgcleanup.c (merge_memattrs): Also clear MEM_READONLY_P
+	resp. MEM_NOTRAP_P if they differ, or set MEM_VOLATILE_P if
+	it differs.
+
+2013-09-09  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/58364
+	* tree-ssa-reassoc.c (init_range_entry): For BIT_NOT_EXPR on
+	BOOLEAN_TYPE, only invert in_p and continue with arg0 if
+	the current range can't be an unconditional true or false.
+
+2013-09-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+	PR target/57735
+	Backport from mainline
+	2013-04-30  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
+
+	* explow.c (plus_constant): Pass "mode" to immed_double_int_const.
+	Use gen_int_mode rather than GEN_INT.
+
+2013-09-09  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-08-27  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57521
+	* tree-if-conv.c (if_convertible_bb_p): Verify that at least
+	one edge is non-critical.
+	(find_phi_replacement_condition): Make sure to use a non-critical
+	edge.  Cleanup and remove old bug workarounds.
+	(bb_postdominates_preds): Remove.
+	(if_convertible_loop_p_1): Do not compute post-dominators.
+	(combine_blocks): Do not free post-dominators.
+	(main_tree_if_conversion): Likewise.
+
+2013-09-09  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-09-03  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/57656
+	* fold-const.c (negate_expr_p): Fix division case.
+	(negate_expr): Likewise.
+
+2013-09-09  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-08-29  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57685
+	* tree-vrp.c (register_edge_assert_for_1): Recurse only for
+	single-use operands to avoid exponential complexity.
+
+2013-09-09  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-08-30  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/58223
+	* tree-loop-distribution.c (has_anti_dependence): Rename to ...
+	(has_anti_or_output_dependence): ... this and adjust to also
+	look for output dependences.
+	(mark_nodes_having_upstream_mem_writes): Adjust.
+	(rdg_flag_uses): Likewise.
+
+2013-09-03  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-08-29  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/58246
+	* tree-ssa-dce.c (mark_aliased_reaching_defs_necessary_1): Properly
+	handle the dominance check inside a basic-block.
+
+2013-09-03  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-08-30  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/58228
+	* tree-vect-data-refs.c (vect_analyze_data_ref_access): Do not
+	allow invariant loads in nested loop vectorization.
+
+2013-09-03  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-08-30  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/58010
+	* tree-vect-loop.c (vect_create_epilog_for_reduction): Remove
+	assert that we have a loop-closed PHI.
+
+2013-09-01  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-08-31  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/alpha/alpha.c (alpha_emit_conditional_move): Update
+	"cmp" RTX before signed_comparison_operator check to account
+	for "code" changes.
+
+2013-09-01  John David Anglin  <danglin@gcc.gnu.org>
+
+	* config/pa/pa.md: Allow "const 0" operand 1 in "scc" insns.
+
+2013-08-30  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/58277
+	* tree-ssa-strlen.c (strlen_enter_block): If do_invalidate gave up
+	after seeing too many stmts with vdef in between dombb and current
+	bb, invalidate everything.
+
+2013-08-29  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	Backport from mainline
+	2013-08-05  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	PR other/12081
+	* recog.h (rtx (*insn_gen_fn) (rtx, ...)): Replace typedef with	new
+	class insn_gen_fn.
+	* expr.c (move_by_pieces_1, store_by_pieces_2): Replace argument
+	rtx (*) (rtx, ...) with insn_gen_fn.
+	* genoutput.c (output_insn_data): Cast gen_? function pointers to
+	insn_gen_fn::stored_funcptr.  Add initializer braces.
+
+	Backport from mainline
+	2013-08-07  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	PR other/12081
+	* config/rs6000/rs6000.c (gen_2arg_fn_t): Remove typedef.
+	(rs6000_emit_swdiv_high_precision, rs6000_emit_swdiv_low_precision,
+	rs6000_emit_swrsqrt): Don't cast result of GEN_FCN to gen_2arg_fn_t.
+
+2013-08-29  Jakub Jelinek  <jakub@redhat.com>
+
+	Backported from mainline
+	2013-05-27  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/57381
+	PR tree-optimization/57417
+	* tree-ssa-sccvn.c (vn_reference_fold_indirect): Fix test
+	for unchanged base.
+	(set_ssa_val_to): Compare addresses using
+	get_addr_base_and_unit_offset.
+
+	PR tree-optimization/57396
+	* tree-affine.c (double_int_constant_multiple_p): Properly
+	return false for val == 0 and div != 0.
+
+	PR tree-optimization/57343
+	* tree-ssa-loop-niter.c (number_of_iterations_ne_max): Do not
+	use multiple_of_p if not TYPE_OVERFLOW_UNDEFINED.
+	(number_of_iterations_cond): Do not build the folded tree.
+
+2013-08-28  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/58257
+	* omp-low.c (copy_var_decl): Copy over TREE_NO_WARNING flag.
+
+2013-08-28  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-06-24  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/56977
+	* passes.c (init_optimization_passes): Move pass_fold_builtins
+	and pass_dce earlier with -Og.
+
+2013-08-28  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-08-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* config/i386/driver-i386.c (host_detect_local_cpu): Update
+	Haswell processor detection.
+
+	Backport from mainline
+	2013-08-27  Christian Widmer  <shadow@umbrox.de>
+
+	PR target/57927
+	* config/i386/driver-i386.c (host_detect_local_cpu): Add detection
+	of Ivy Bridge and Haswell processors.  Assume core-avx2 for unknown
+	AVX2 capable processors.
+
+2013-08-25  Richard Henderson  <rth@twiddle.net>
+
+	PR rtl/58542
+	* optabs.c (maybe_emit_atomic_exchange): Use create_input_operand
+	instead of create_convert_operand_to.
+	(maybe_emit_sync_lock_test_and_set): Likewise.
+	(expand_atomic_compare_and_swap): Likewise.
+	(maybe_emit_compare_and_swap_exchange_loop): Don't convert_modes.
+
+2013-08-23  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/58218
+	* config/i386/x86-64.h (TARGET_SECTION_TYPE_FLAGS): Define.
+	* config/i386/i386.c (x86_64_elf_section_type_flags): New function.
+
+	PR tree-optimization/58209
+	* tree-tailcall.c (find_tail_calls): Give up for pointer result types
+	if m or a is non-NULL.
+
+2013-08-21  Richard Earnshaw  <rearnsha@arm.com>
+
+	PR target/56979
+	* arm.c (aapcs_vfp_allocate): Decompose the argument if the
+	suggested mode for the assignment isn't compatible with the
+	registers required.
+
+2013-08-20  Alan Modra  <amodra@gmail.com>
+
+	PR target/57865
+	* config/rs6000/rs6000.c (rs6000_emit_prologue): Correct ool_adjust.
+	(rs6000_emit_epilogue): Likewise.
+
+2013-08-19  Peter Bergner  <bergner@vnet.ibm.com>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	Backport from mainline
+	* config/rs6000/dfp.md (*negtd2_fpr): Handle non-overlapping
+	destination and source operands.
+
+2013-08-18  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/58006
+	* tree-parloops.c (take_address_of): Don't ICE if get_name
+	returns NULL.
+	(eliminate_local_variables_stmt): Remove clobber stmts.
+
+2013-08-16  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/58164
+	* gimple.c (walk_stmt_load_store_addr_ops): For visit_addr
+	walk gimple_goto_dest of GIMPLE_GOTO.
+
+	PR tree-optimization/58165
+	* tree-call-cdce.c (shrink_wrap_one_built_in_call): If
+	bi_call must be the last stmt in a bb, don't split_block, instead
+	use fallthru edge from it and give up if there is none.
+	Release conds vector when returning early.
+
+2013-08-15  David Given  <dg@cowlark.com>
+
+	Backport from mainline
+	2013-04-26  Vladimir Makarov  <vmakarov@redhat.com>
+
+	* lra-constraints.c (process_alt_operands): Use #if HAVE_ATTR_enable
+	instead of #ifdef.
+
+2013-08-14  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/58145
+	* tree-sra.c (build_ref_for_offset): If prev_base has
+	TREE_THIS_VOLATILE or TREE_SIDE_EFFECTS, propagate it to MEM_REF.
+
+2013-08-14  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* config/s390/htmxlintrin.h: Add file missing from last commit.
+	* config/s390/htmintrin.h: Likewise.
+	* config/s390/s390intrin.h: Likewise.
+
+2013-08-14  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-08-13  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/sse.md (*sse2_maskmovdqu): Emit addr32 prefix
+	when Pmode != word_mode.  Add length_address attribute.
+	(sse3_monitor_<mode>): Merge from sse3_monitor and
+	sse3_monitor64_<mode> insn patterns.  Emit addr32 prefix when
+	Pmode != word_mode.  Update insn length attribute.
+	* config/i386/i386.c (ix86_option_override_internal): Update
+	ix86_gen_monitor selection for merged sse3_monitor insn.
+
+2013-08-14  Jakub Jelinek  <jakub@redhat.com>
+	    Alexandre Oliva  <aoliva@redhat.com>
+
+	PR target/58067
+	* config/i386/i386.c (ix86_delegitimize_address): For CM_MEDIUM_PIC
+	and CM_LARGE_PIC ix86_cmodel fall thru into the -m32 code, handle
+	there also UNSPEC_PLTOFF.
+
+2013-08-13  Jakub Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/56417
+	* asan.c (instrument_strlen_call): Fix typo in comment.
+	Use char * type even for the lhs of POINTER_PLUS_EXPR.
+
+2013-08-13  Vladimir Makarov  <vmakarov@redhat.com>
+
+	Backport from mainline
+	2013-06-06  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/57459
+	* lra-constraints.c (update_ebb_live_info): Fix typo for operand
+	type when setting live regs.
+
+2013-08-13  Marek Polacek  <polacek@redhat.com>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/57980
+	* tree-tailcall.c (process_assignment): Return false
+	when not dealing with integers or floats.
+
+2013-08-12  Andrew Haley  <aph@redhat.com>
+
+	Backport from mainline:
+	* 2013-07-11  Andreas Schwab  <schwab@suse.de>
+
+	* config/aarch64/aarch64-linux.h (CPP_SPEC): Define.
+
+2013-08-13  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-08-12  Perez Read  <netfirewall@gmail.com>
+
+	PR target/58132
+	* config/i386/i386.md (*movabs<mode>_1):  Add <ptrsize> PTR before
+	operand 0 for intel asm alternative.
+	(*movabs<mode>_2): Ditto for operand 1.
+
+2013-08-09  Zhenqiang Chen  <zhenqiang.chen@linaro.org>
+
+	Backport from mainline:
+	2013-08-09  Zhenqiang Chen  <zhenqiang.chen@linaro.org>
+
+	* config/arm/neon.md (vcond): Fix floating-point vector
+	comparisons against 0.
+
+2013-08-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+	Backport from mainline:
+	2013-08-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+	* config/arm/neon.md (movmisalign<mode>): Disable when we
+	don't allow unaligned accesses.
+	(*movmisalign<mode>_neon_store): Likewise.
+	(*movmisalign<mode>_neon_load): Likewise.
+	(*movmisalign<mode>_neon_store): Likewise.
+	(*movmisalign<mode>_neon_load): Likewise.
+
+2013-08-06  Martin Jambor  <mjambor@suse.cz>
+
+	PR middle-end/58041
+	* gimple-ssa-strength-reduction.c (replace_ref): Make sure built
+	MEM_REF has proper alignment information.
+
+2013-08-05  Richard Earnshaw  <rearnsha@arm.com>
+
+	PR rtl-optimization/57708
+	* recog.c (peep2_find_free_register): Validate all regs in a
+	multi-reg mode.
+
+2013-08-02  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* config/sparc/sparc.c (sparc_emit_membar_for_model) <SMM_TSO>: Add
+	the implied StoreLoad barrier for atomic operations if before.
+
+2013-08-02  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	Backports from mainline:
+	2013-06-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* config/s390/s390.c: Rename UNSPEC_CCU_TO_INT to
+	UNSPEC_STRCMPCC_TO_INT and UNSPEC_CCZ_TO_INT to UNSPEC_CC_TO_INT.
+	(struct machine_function): Add tbegin_p.
+	(s390_canonicalize_comparison): Fold CC mode compares to
+	conditional jump if possible.
+	(s390_emit_jump): Return the emitted jump.
+	(s390_branch_condition_mask, s390_branch_condition_mnemonic):
+	Handle CCRAWmode compares.
+	(s390_option_override): Default to -mhtm if available.
+	(s390_reg_clobbered_rtx): Handle floating point regs as well.
+	(s390_regs_ever_clobbered): Use s390_regs_ever_clobbered also for
+	FPRs instead of df_regs_ever_live_p.
+	(s390_optimize_nonescaping_tx): New function.
+	(s390_init_frame_layout): Extend clobbered_regs array to cover
+	FPRs as well.
+	(s390_emit_prologue): Call s390_optimize_nonescaping_tx.
+	(s390_expand_tbegin): New function.
+	(enum s390_builtin): New enum definition.
+	(code_for_builtin): New array definition.
+	(s390_init_builtins): New function.
+	(s390_expand_builtin): New function.
+	(TARGET_INIT_BUILTINS): Define.
+	(TARGET_EXPAND_BUILTIN): Define.
+	* common/config/s390/s390-common.c (processor_flags_table): Add PF_TX.
+	* config/s390/predicates.md (s390_comparison): Handle CCRAWmode.
+	(s390_alc_comparison): Likewise.
+	* config/s390/s390-modes.def: Add CCRAWmode.
+	* config/s390/s390.h (processor_flags): Add PF_TX.
+	(TARGET_CPU_HTM): Define macro.
+	(TARGET_HTM): Define macro.
+	(TARGET_CPU_CPP_BUILTINS): Define __HTM__ for htm.
+	* config/s390/s390.md: Rename UNSPEC_CCU_TO_INT to
+	UNSPEC_STRCMPCC_TO_INT and UNSPEC_CCZ_TO_INT to UNSPEC_CC_TO_INT.
+	(UNSPECV_TBEGIN, UNSPECV_TBEGINC, UNSPECV_TEND, UNSPECV_TABORT)
+	(UNSPECV_ETND, UNSPECV_NTSTG, UNSPECV_PPA): New unspecv enum
+	values.
+	(TBEGIN_MASK, TBEGINC_MASK): New constants.
+	("*cc_to_int"): Move up.
+	("*mov<mode>cc", "*cjump_64", "*cjump_31"): Accept integer
+	constants other than 0.
+	("*ccraw_to_int"): New insn and splitter definition.
+	("tbegin", "tbegin_nofloat", "tbegin_retry")
+	("tbegin_retry_nofloat", "tbeginc", "tend", "tabort")
+	("tx_assist"): New expander.
+	("tbegin_1", "tbegin_nofloat_1", "*tbeginc_1", "*tend_1")
+	("*tabort_1", "etnd", "ntstg", "*ppa"): New insn definition.
+	* config/s390/s390.opt: Add -mhtm option.
+	* config/s390/s390-protos.h (s390_emit_jump): Add return type.
+	* config/s390/htmxlintrin.h: New file.
+	* config/s390/htmintrin.h: New file.
+	* config/s390/s390intrin.h: New file.
+	* doc/extend.texi: Document htm builtins.
+	* config.gcc: Add the new header files to extra_headers.
+
+	2013-07-17  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* config/s390/s390.c: (s390_expand_builtin): Allow -mhtm to be
+	enabled without -march=zEC12.
+	* config/s390/s390.h (TARGET_HTM): Do not require EC12 machine
+	flags to be set.
+
+2013-08-01  Ganesh Gopalasubramanian  <Ganesh.Gopalasubramanian@amd.com>
+
+	Backport from mainline
+	2013-05-13  Ganesh Gopalasubramanian
+		    <Ganesh.Gopalasubramanian@amd.com>
+
+	* config/i386/i386.c (processor_target_table): Modified default
+	alignment values for AMD BD and BT architectures.
+
+2013-07-31  Sriraman Tallam  <tmsriram@google.com>
+
+	* config/i386/i386.c (dispatch_function_versions): Fix array
+	indexing of function_version_info to match actual_versions.
+
+2013-07-31  Sebastian Huber  <sebastian.huber@embedded-brains.de>
+
+	* config.gcc (*-*-rtems*): Use __cxa_atexit by default.
+	* config/rs6000/rtems.h (TARGET_LIBGCC_SDATA_SECTION): Define.
+
+2013-07-31  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	Backport from mainline
+	2013-03-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* config/s390/s390.h (TARGET_FLT_EVAL_METHOD): Define.
+
+	2013-07-23  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* config/s390/linux-unwind.h: Use the proper dwarf to hard reg
+	mapping for FPRs when creating the fallback framestate.
+
+	2013-07-29  Dominik Vogt  <vogt@linux.vnet.ibm.com>
+
+	* config/s390/s390.md ("movcc"): Swap load and store instructions.
+
+2013-07-25  Terry Guo  <terry.guo@arm.com>
+
+	Backport from mainline:
+	2013-07-25  Terry Guo  <terry.guo@arm.com>
+
+	* config/arm/arm.c (thumb1_size_rtx_costs): Assign proper cost for
+	shift_add/shift_sub0/shift_sub1 RTXs.
+
+2013-07-22  Iain Sandoe  <iain@codesourcery.com>
+
+	Backport from mainline:
+	2013-07-22  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/i386.md (nonlocal_goto_receiver): Delete insn if
+	it is not needed after split.
+
+	2013-07-20  Iain Sandoe  <iain@codesourcery.com>
+
+	PR target/51784
+	* config/i386/i386.c (output_set_got) [TARGET_MACHO]: Adjust to emit a
+	second label for nonlocal goto receivers. Don't output pic base labels
+	unless we're producing PIC; mark that action unreachable().
+	(ix86_save_reg): If the function contains a nonlocal label, save the
+	PIC base reg.
+	* config/darwin-protos.h (machopic_should_output_picbase_label): New.
+	* gcc/config/darwin.c (emitted_pic_label_num): New GTY.
+	(update_pic_label_number_if_needed): New.
+	(machopic_output_function_base_name): Adjust for nonlocal receiver
+	case.
+	(machopic_should_output_picbase_label): New.
+	* config/i386/i386.md (enum unspecv): UNSPECV_NLGR: New.
+	(nonlocal_goto_receiver): New insn and split.
+
+2013-07-19  Wei Mi  <wmi@google.com>
+
+	Backport from mainline:
+	2013-07-18  Vladimir Makarov  <vmakarov@redhat.com>
+		    Wei Mi  <wmi@google.com>
+
+	PR rtl-optimization/57878
+	* lra-assigns.c (assign_by_spills): Move non_reload_pseudos to the
+	top. Promote lra_assert to gcc_assert.
+	(reload_pseudo_compare_func): Check regs first for reload pseudos.
+
+2013-07-11  Georg-Johann Lay  <avr@gjlay.de>
+
+	Backport from 2013-07-19 trunk r201051.
+
+	PR target/57516
+	* config/avr/avr-fixed.md (round<mode>3_const): Turn expander to insn.
+	* config/avr/avr.md (adjust_len): Add `round'.
+	* config/avr/avr-protos.h (avr_out_round): New prototype.
+	(avr_out_plus): Add `out_label' argument.
+	* config/avr/avr.c (avr_out_plus_1): Add `out_label' argument.
+	(avr_out_plus): Pass down `out_label' to avr_out_plus_1.
+	Handle the case where `insn' is just a pattern.
+	(avr_out_bitop): Handle the case where `insn' is just a pattern.
+	(avr_out_round): New function.
+	(avr_adjust_insn_length): Handle ADJUST_LEN_ROUND.
+
+2013-07-19  Kirill Yukhin  <kirill.yukhin@intel.com>
+
+	* config/i386/bmiintrin.h (_bextr_u32): New.
+	(_bextr_u64): Ditto.
+	(_blsi_u32): New.
+	(_blsi_u64): Ditto.
+	(_blsr_u32): Ditto.
+	(_blsr_u64): Ditto.
+	(_blsmsk_u32): Ditto.
+	(_blsmsk_u64): Ditto.
+	(_tzcnt_u32): Ditto.
+	(_tzcnt_u64): Ditto.
+
+2013-07-17  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	Backport From mainline:
+	2013-07-03  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* config/aarch64/aarch64-builtins.c
+	(aarch64_simd_expand_builtin): Handle AARCH64_SIMD_STORE1.
+	* config/aarch64/aarch64-simd-builtins.def (ld1): New.
+	(st1): Likewise.
+	* config/aarch64/aarch64-simd.md
+	(aarch64_ld1<VALL:mode>): New.
+	(aarch64_st1<VALL:mode>): Likewise.
+	* config/aarch64/arm_neon.h
+	(vld1<q>_<fpsu><8, 16, 32, 64>): Convert to RTL builtins.
+
+2013-07-11  Georg-Johann Lay  <avr@gjlay.de>
+
+	Backport from 2013-07-11 trunk r200901.
+
+	PR target/57631
+	* config/avr/avr.c (avr_set_current_function): Sanity-check signal
+	name seen by assembler/linker if available.
+
+2013-07-10  Georg-Johann Lay  <avr@gjlay.de>
+
+	Backport from 2013-07-10 trunk r200872.
+
+	PR target/57844
+	* config/avr/avr.c (avr_prologue_setup_frame): Trunk -size to mode
+	of my_fp.
+
+2013-07-10  Georg-Johann Lay  <avr@gjlay.de>
+
+	Backport from 2013-07-10 trunk r200870.
+
+	PR target/57506
+	* config/avr/avr-mcus.def (atmega16hva, atmega16hva2, atmega16hvb)
+	(atmega16m1, atmega16u4, atmega32a, atmega32c1, atmega32hvb)
+	(atmega32m1, atmega32u4, atmega32u6, atmega64c1, atmega64m1):
+	Remove duplicate devices.
+	* config/avr/gen-avr-mmcu-texi.c (print_mcus): Fail on duplicate MCUs.
+	* config/avr/t-multilib: Regenerate.
+	* config/avr/avr-tables.opt: Regenerate.
+	* doc/avr-mmcu.texi: Regenerate.
+
+2013-07-10  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR target/56987
+	* config/avr/avr.opt (Waddr-space-convert): Fix typo.
+
+2013-07-09  Joseph Myers  <joseph@codesourcery.com>
+
+	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Only
+	adjust register size for TDmode and TFmode for VSX registers.
+
+2013-07-08  Kai Tietz  <ktietz@redhat.com>
+
+	Backport from mainline
+	PR target/56892
+	* config/i386/i386.c (TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P): Define as
+	hook_bool_const_tree_true.
+
+2013-07-08  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-07-07  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/driver-i386.c (host_detect_local_cpu): Do not check
+	signature_TM2_ebx, it interferes with signature_INTEL_ebx.
+
+	Backport from mainline
+	2013-07-06  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/sse.md (sse_movlhps): Change alternative 3
+	of operand 2 to "m".
+
+2013-07-08  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* Makefile.in (tree-ssa-reassoc.o): Add dependency on $(PARAMS_H).
+
+2013-07-08  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/57829
+	* simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Ensure that
+	mask bits outside of mode are just sign-extension from mode to HWI.
+
+2013-07-03  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/57777
+	* config/i386/predicates.md (vsib_address_operand): Disallow
+	SYMBOL_REF or LABEL_REF in parts.disp if TARGET_64BIT && flag_pic.
+
+2013-06-30  Terry Guo  <terry.guo@arm.com>
+
+	Backport from mainline
+	2013-03-27  Bin Cheng  <bin.cheng@arm.com>
+
+	PR target/56102
+	* config/arm/arm.c (thumb1_rtx_costs, thumb1_size_rtx_costs): Fix
+	rtx costs for SET/ASHIFT/ASHIFTRT/LSHIFTRT/ROTATERT patterns with
+	mult-word mode.
+
+2013-06-28  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/57736
+	* config/i386/i386.c (ix86_expand_builtin): If target == NULL
+	and mode is VOIDmode, don't create a VOIDmode pseudo to copy result
+	into.
+
+2013-06-27  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/57623
+	* config/i386/i386.md (bmi_bextr_<mode>): Swap predicates and
+	constraints of operand 1 and 2.
+
+	PR target/57623
+	* config/i386/i386.md (bmi2_bzhi_<mode>3): Swap AND arguments
+	to match RTL canonicalization.  Swap predicates and
+	constraints of operand 1 and 2.
+
+	* tree-vect-stmts.c (vectorizable_store): Move ptr_incr var
+	decl before the loop, initialize to NULL.
+	(vectorizable_load): Initialize ptr_incr to NULL.
+
+2013-06-24  Martin Jambor  <mjambor@suse.cz>
+
+	PR tree-optimization/57358
+	* ipa-prop.c (parm_ref_data_preserved_p): Always return true when
+	not optimizing.
+
+2013-06-24  Alan Modra  <amodra@gmail.com>
+
+	* config/rs6000/rs6000.c (vspltis_constant): Correct for little-endian.
+	(gen_easy_altivec_constant): Likewise.
+	* config/rs6000/predicates.md (easy_vector_constant_add_self,
+	easy_vector_constant_msb): Likewise.
+
+2013-06-21  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-06-20  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/57655
+	* config/i386/i386.c (construct_container): Report error if
+	long double is used with disabled x87 float returns.
+
+2013-06-20  Wei Mi  <wmi@google.com>
+
+	Backport from mainline
+	2013-06-19  Wei Mi  <wmi@google.com>
+
+	PR rtl-optimization/57518
+	* ira.c (set_paradoxical_subreg): Set pdx_subregs[regno]
+	if regno is used in paradoxical subreg.
+	(update_equiv_regs): Check pdx_subregs[regno] before
+	set a reg to be equivalent with a mem.
+
+
+2013-06-20  David Edelsohn  <dje.gcc@gmail.com>
+
+	Backport from mainline
+	2013-06-19  David Edelsohn  <dje.gcc@gmail.com>
+
+	PR driver/57652
+	* collect2.c (collect_atexit): New.
+	(collect_exit): Delete.
+	(main): Register collect_atexit with atexit.
+	(collect_wait): Change collect_exit to exit.
+	(do_wait): Same.
+	* collect2.h (collect_exit): Delete.
+	* tlink.c (do_tlink): Rename exit to ret. Change collect_exit to exit.
+
+2013-06-19  Matthias Klose  <doko@ubuntu.com>
+
+	PR driver/57651
+	* file-find.h (find_a_file): Add a mode parameter.
+	* file-find.c (find_a_file): Likewise.
+	* gcc-ar.c (main): Call find_a_file with R_OK for the plugin,
+	with X_OK for the executables.
+	* collect2.c (main): Call find_a_file with X_OK.
+
+2013-06-19  Igor Zamyatin  <igor.zamyatin@intel.com>
+
+	* doc/invoke.texi (core-avx2): Document.
+	(atom): Updated with MOVBE.
+
+2013-06-19  Jakub Jelinek  <jakub@redhat.com>
+
+	PR driver/57651
+	* gcc-ar.c (main): If not CROSS_DIRECTORY_STRUCTURE, look for
+	PERSONALITY in $PATH derived prefixes.
+
+2013-06-19  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/56544
+	* doc/cpp.texi [Standard Predefined Macros, __cplusplus]: Document
+	that now in C++ the value is correct per the C++ standards.
+
+2013-06-19  Alan Modra  <amodra@gmail.com>
+
+	Apply mainline patches
+	2013-06-13  Alan Modra  <amodra@gmail.com>
+	* config/rs6000/rs6000.h (LONG_DOUBLE_LARGE_FIRST): Define.
+	* config/rs6000/rs6000.md (signbittf2): New insn.
+	(extenddftf2_internal): Use LONG_DOUBLE_LARGE_FIRST.
+	(abstf2_internal, cmptf_internal2): Likewise.
+	* config/rs6000/spe.md (spe_abstf2_cmp, spe_abstf2_tst): Likewise.
+
+	2013-06-11  Anton Blanchard  <anton@samba.org>
+	* config/rs6000/rs6000.c (rs6000_adjust_atomic_subword): Calculate
+	correct shift value in little-endian mode.
+
+	2013-06-07  Alan Modra  <amodra@gmail.com>
+	* config/rs6000/rs6000.c (setup_incoming_varargs): Round up
+	va_list_gpr_size.
+
+	2013-06-04  Alan Modra  <amodra@gmail.com>
+	* config/rs6000/rs6000.c (output_toc): Correct little-endian float
+	constant output.
+
+	2013-05-10  Alan Modra  <amodra@gmail.com>
+	* configure.ac (HAVE_AS_TLS): Swap powerpc64 and powerpc cases.
+	(HAVE_LD_LARGE_TOC): Don't mention AIX in help text.
+	* configure: Regenerate.
+
+	2013-05-09  Alan Modra  <amodra@gmail.com>
+	* configure.ac (HAVE_AS_TLS): Enable tests for powerpcle and
+	powerpc64le.
+	* configure: Regenerate.
+
+	2013-05-07  Anton Blanchard  <anton@samba.org>
+	* configure.ac (HAVE_LD_LARGE_TOC): Use right linker emulation
+	for powerpc64 little endian.
+	* configure: Regenerate.
+
+	2013-05-06  Alan Modra  <amodra@gmail.com>
+	* config/rs6000/linux.h (DEFAULT_ASM_ENDIAN): Define.
+	(LINK_OS_LINUX_EMUL): Use ENDIAN_SELECT.
+	* config/rs6000/linux64.h (DEFAULT_ASM_ENDIAN): Define.
+	* config/rs6000/sysv4le.h (DEFAULT_ASM_ENDIAN): Define.
+	(LINK_TARGET_SPEC): Use ENDIAN_SELECT.
+	* config/rs6000/sysv4.h (DEFAULT_ASM_ENDIAN): Define as -mbig.
+
+	2013-05-06  Alan Modra  <amodra@gmail.com>
+	* config/rs6000/sysv4.h (ENDIAN_SELECT): Define, extracted from
+	(ASM_SPEC): ..here.  Emit DEFAULT_ASM_ENDIAN too.
+	(DEFAULT_ASM_ENDIAN): Define.
+	(CC1_SPEC, LINK_TARGET_SPEC): Use ENDIAN_SELECT.
+	* config/rs6000/linux64.h (ASM_SPEC32): Remove endian options.
+	Update -K PIC clause from sysv4.h.
+	(ASM_SPEC_COMMON): Use ENDIAN_SELECT.
+	(LINK_OS_LINUX_EMUL32, LINK_OS_LINUX_EMUL64): Likewise.
+
+	2013-05-06  Alan Modra  <amodra@gmail.com>
+	* config/rs6000/rs6000.md (bswapdi 2nd splitter): Don't swap words
+	twice for little-endian.
+	(ashrdi3_no_power, ashrdi3): Support little-endian.
+
+	2013-04-25  Alan Modra  <amodra@gmail.com>
+	* config.gcc: Support little-endian powerpc-linux targets.
+	* config/rs6000/linux.h (LINK_OS_LINUX_EMUL): Define.
+	(LINK_OS_LINUX_SPEC): Define.
+	* config/rs6000/linuxspe.h (TARGET_DEFAULT):
+	Preserve MASK_LITTLE_ENDIAN.
+	* config/rs6000/default64.h (TARGET_DEFAULT): Likewise.
+	* config/rs6000/linuxaltivec.h (TARGET_DEFAULT): Likewise.
+	* config/rs6000/linux64.h (OPTION_LITTLE_ENDIAN): Don't zero.
+	(LINK_OS_LINUX_EMUL32, LINK_OS_LINUX_EMUL64): Define.
+	(LINK_OS_LINUX_SPEC32, LINK_OS_LINUX_SPEC64): Use above.
+	* config/rs6000/rs6000.c (output_toc): Don't use .tc for TARGET_ELF.
+	Correct fp word order for little-endian.  Don't shift toc entries
+	smaller than a word for little-endian.
+	* config/rs6000/rs6000.md (bswaphi2, bswapsi2 split): Comment.
+	(bswapdi2 splits): Correct low-part subreg for little-endian.
+	Remove wrong BYTES_BIG_ENDIAN tests, and rename vars to remove
+	low/high where such is correct only for be.
+	* config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Allow
+	little-endian for -mcall-aixdesc.
+
+2013-06-12  Martin Jambor  <mjambor@suse.cz>
+
+	* ipa-cp.c (ipa_get_indirect_edge_target_1): Check that param_index is
+	within bounds at the beginning of the function.
+
+2013-06-12  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/57537
+	* tree-vect-patterns.c (vect_recog_widen_mult_pattern): If
+	vect_handle_widen_op_by_const, convert oprnd1 to half_type1.
+
+2013-06-10  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-06-10  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/alpha/alpha.c (alpha_emit_xfloating_compare): Also use
+	cmp_code to construct REG_EQUAL note.
+
+2013-06-10  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	Backport from mainline
+	2013-05-20  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	PR target/56547
+	* config/sh/sh.md (fmasf4): Remove empty constraints strings.
+	(*fmasf4, *fmasf4_media): New insns.
+
+2013-06-09  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/57568
+	* config/i386/i386.md (TARGET_READ_MODIFY_WRITE peepholes): Ensure
+	that operands[2] doesn't overlap with operands[0].
+
+2013-06-07  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
+
+	* recog.c (offsettable_address_addr_space_p): Fix calculation of
+	address mode.  Move pointer mode initialization to the same place.
+
+2013-06-07  Sofiane Naci  <sofiane.naci@arm.com>
+
+	Backport from mainline
+	* config/aarch64/aarch64.md (*movdi_aarch64): Define "simd" attribute.
+
+2013-06-07  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-06-05  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/alpha/alpha.c (alpha_emit_conditional_move): Swap all
+	GE, GT, GEU and GTU compares, modulo DImode compares with zero.
+
+	Backport from mainline
+	2013-05-23  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/57379
+	* config/alpha/alpha.md (unspec): Add UNSPEC_XFLT_COMPARE.
+	* config/alpha/alpha.c (alpha_emit_xfloating_compare): Construct
+	REG_EQUAL note as UNSPEC_XFLT_COMPARE unspec.
+
+2013-06-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+	Backport from mainline.
+	2013-05-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+	* config/rs6000/rs6000.h (MALLOC_ABI_ALIGNMENT): New #define.
+
+2013-06-03  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	Backport from mainline.
+	2013-04-25  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* config/aarch64/aarch64.c (aarch64_print_operand): Fix asm_fprintf
+	format specifier in 'X' case.
+
+2013-05-31  Richard Henderson  <rth@redhat.com>
+
+	PR target/56742
+	* config/i386/i386.c (ix86_seh_fixup_eh_fallthru): New.
+	(ix86_reorg): Call it.
+
+2012-05-31  Jakub Jelinek  <jakub@redhat.com>
+
+	* BASE-VER: Set to 4.8.2.
+	* DEV-PHASE: Set to prerelease.
+
+2013-05-31  Release Manager
+
+	* GCC 4.8.1 released.
+
+2013-05-24  Greta Yorsh  <Greta.Yorsh@arm.com>
+
+	Backport from mainline
+	2013-05-02  Greta Yorsh  <Greta.Yorsh@arm.com>
+
+	PR target/56732
+	* config/arm/arm.c (arm_expand_epilogue): Check really_return before
+	generating simple_return for naked functions.
+
+2013-05-24  Alexander Ivchenko  <alexander.ivchenko@intel.com>
+
+	PR tree-ssa/57385
+	* tree-ssa-sccvn.c (fully_constant_vn_reference_p): Check
+	that index is not negative.
+
+2013-05-23  Martin Jambor  <mjambor@suse.cz>
+
+	PR middle-end/57347
+	* tree.h (contains_bitfld_component_ref_p): Declare.
+	* tree-sra.c (contains_bitfld_comp_ref_p): Move...
+	* tree.c (contains_bitfld_component_ref_p): ...here.  Adjust its caller.
+	* ipa-prop.c (determine_known_aggregate_parts): Check that LHS does
+	not access a bit-field.  Assert all final offsets are byte-aligned.
+
+2013-05-23  Richard Biener  <rguenther@suse.de>
+
+	PR rtl-optimization/57341
+	* ira.c (validate_equiv_mem_from_store): Use anti_dependence
+	instead of true_dependence.
+
+2013-05-23  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/57344
+	* expmed.c (store_split_bit_field): If op0 is a REG or
+	SUBREG of a REG, don't lower unit.  Handle unit not being
+	always BITS_PER_WORD.
+
+2013-05-22  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/57356
+	* config/i386/i386.md (*movti_internal_rex64): Emit movaps/movups
+	for non-sse2 targets.
+	(*movti_internal): Simplify mode attribute calculation.
+
+2013-05-22  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-05-21  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57318
+	* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Do not
+	estimate stmts with side-effects as likely eliminated.
+
+	2013-05-21  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57330
+	* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Properly
+	preserve the call stmts fntype.
+
+	2013-05-21  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57303
+	* tree-ssa-sink.c (statement_sink_location): Properly handle
+	self-assignments.
+
+2013-05-21  Magnus Granberg  <baldrick@free.fr>
+
+	PR plugins/56754
+	* Makefile.in (PLUGIN_HEADERS): Add $(TARGET_H).
+
+2013-05-21  Eric Botcazou  <ebotcazou@adacore.com>
+
+	Backport from mainline
+	2013-05-14  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* config/sparc/sp64-elf.h (CPP_SUBTARGET_SPEC): Delete.
+	* config/sparc/openbsd64.h (CPP_SUBTARGET_SPEC): Likewise.
+
+2013-05-17  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/57281
+	PR rtl-optimization/57300
+	* config/i386/i386.md (extendsidi2_1 dead reg splitter): Remove.
+	(extendsidi2_1 peephole2s): Add instead 2 new peephole2s, that undo
+	what the other splitter did if the registers are dead.
+
+2013-05-17  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-05-16  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/driver-i386.c (host_detect_local_cpu): Determine
+	cache parameters using detect_caches_amd also for CYRIX,
+	NSC and TM2 signatures.
+
+	2013-05-16  Uros Bizjak  <ubizjak@gmail.com>
+		    Dzianis Kahanovich  <mahatma@eu.by>
+
+	PR target/45359
+	PR target/46396
+	* config/i386/driver-i386.c (host_detect_local_cpu): Detect
+	VIA/Centaur processors and determine their cache parameters
+	using detect_caches_amd.
+
+	2013-05-15  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/i386.c (ix86_option_override_internal): Update
+	processor_alias_table for missing PTA_PRFCHW and PTA_FXSR flags.  Add
+	PTA_POPCNT to corei7 entry. Do not enable SSE prefetch on
+	non-SSE 3dNow! targets.  Enable TARGET_PRFCHW for TARGET_3DNOW targets.
+	* config/i386/i386.md (prefetch): Enable for TARGET_PRFCHW instead
+	of TARGET_3DNOW.
+	(*prefetch_3dnow): Enable for TARGET_PRFCHW only.
+
+2013-05-17  Jakub Jelinek  <jakub@redhat.com>
+
+	* gcc.c (SANITIZER_SPEC): Reject -fsanitize=address -fsanitize=thread
+	linking.
+
+	PR tree-optimization/57051
+	* fold-const.c (const_binop) <case VEC_LSHIFT_EXPR,
+	case VEC_RSHIFT_EXPR>: Fix BYTES_BIG_ENDIAN handling.
+
+2013-05-16  Jakub Jelinek  <jakub@redhat.com>
+
+	* omp-low.c (extract_omp_for_data): For collapsed loops,
+	if at least one of the loops is known at compile time to
+	iterate zero times, set count to 0.
+	(expand_omp_regimplify_p): New function.
+	(expand_omp_for_generic): For collapsed loops, if at least
+	one of the loops isn't known to iterate at least once,
+	add runtime check with setting count to 0.
+	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk):
+	For unsigned types if it isn't known at compile time that
+	the loop will iterate at least once, add runtime check to bypass
+	the whole loop if initial condition isn't true.
+
+2013-05-14  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/57251
+	* expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: Handle
+	the case when both op0 and op1 have VOIDmode.
+
+2013-05-13  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/57230
+	* tree-ssa-strlen.c (handle_char_store): Add missing integer_zerop
+	check.
+
+2013-05-12  Joern Rennecke  <joern.rennecke@embecosm.com>
+
+	* config/epiphany/epiphany.c (epiphany_init): Check size of
+	NUM_MODES_FOR_MODE_SWITCHING.
+	(epiphany_expand_prologue):
+	Remove CONFIG_REGNUM initial value handling code.
+	(epiphany_optimize_mode_switching): Handle EPIPHANY_MSW_ENTITY_CONFIG.
+	(epiphany_mode_needed, epiphany_mode_entry_exit): Likewise.
+	(emit_set_fp_mode, epiphany_mode_after): Likewise.
+	(epiphany_mode_needed) <Handle EPIPHANY_MSW_ENTITY_AND>:
+	Don't return 1 for FP_MODE_NONE.
+	* config/epiphany/epiphany.h (NUM_MODES_FOR_MODE_SWITCHING):
+	Add value for EPIPHANY_MSW_ENTITY_CONFIG.
+	(EPIPHANY_MSW_ENTITY_CONFIG, EPIPHANY_MSW_ENTITY_NUM): Define.
+	* config/epiphany/epiphany.md (save_config): New pattern.
+
+2013-05-10  Sebastian Huber  <sebastian.huber@embedded-brains.de>
+
+	* config/arm/t-rtems-eabi: Remove mthumb/march=armv7 multilib.
+	Add mthumb/march=armv7-a multilib.
+	Add mthumb/march=armv7-r multilib.
+	Add mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard multilib.
+
+2013-05-10  Ralf Corsépius  <ralf.corsepius@rtems.org>
+
+	PR target/57237
+	* config/v850/t-rtems: Add more multilibs.
+
+2013-05-10  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57214
+	* tree-ssa-loop-ivcanon.c (propagate_constants_for_unrolling): Do
+	not propagate from SSA names that occur in abnormal PHI nodes.
+
+2013-05-10  Alan Modra  <amodra@gmail.com>
+
+	PR target/55033
+	* varasm.c (default_elf_select_section): Move !DECL_P check..
+	(get_named_section): ..to here before calling get_section_name.
+	Adjust assertion.
+	(default_section_type_flags): Add DECL_P check.
+	* config/i386/winnt.c (i386_pe_section_type_flags): Likewise.
+	* config/rs6000/rs6000.c (rs6000_xcoff_section_type_flags): Likewise.
+
+2013-05-09  Joern Rennecke  <joern.rennecke@embecosm.com>
+
+	* config/epiphany/epiphany.c (epiphany_expand_prologue):
+	When using gen_stack_adjust_str with a register offset, add a
+	REG_FRAME_RELATED_EXPR note.
+
+2013-05-09  Martin Jambor  <mjambor@suse.cz>
+
+	PR middle-end/56988
+	* ipa-prop.h (ipa_agg_replacement_value): New flag by_ref.
+	* ipa-cp.c (find_aggregate_values_for_callers_subset): Fill in the
+	by_ref flag of ipa_agg_replacement_value structures.
+	(known_aggs_to_agg_replacement_list): Likewise.
+	* ipa-prop.c (write_agg_replacement_chain): Stream by_ref flag.
+	(read_agg_replacement_chain): Likewise.
+	(ipcp_transform_function): Also check that by_ref flags match.
+
+2013-05-08  Diego Novillo  <dnovillo@google.com>
+
+	PR bootstrap/54659
+
+	Revert:
+
+	2012-08-17  Diego Novillo  <dnovillo@google.com>
+
+		PR bootstrap/54281
+		* configure.ac: Add libintl.h to AC_CHECK_HEADERS list.
+		* config.in: Regenerate.
+		* configure: Regenerate.
+		* intl.h: Always include libintl.h if HAVE_LIBINTL_H is
+		set.
+
+2013-05-08  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR tree-optimization/57200
+	* tree-ssa-loop-niter.c (do_warn_aggressive_loop_optimizations):
+	Only call inform if the preceding warning_at returns true.
+
+2013-05-07  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/57149
+	* tree-ssa-uninit.c (uninit_undefined_value_p): New inline.
+	(can_skip_redundant_opnd, compute_uninit_opnds_pos,
+	collect_phi_def_edges, execute_late_warn_uninitialized): Use
+	uninit_undefined_value_p instead of ssa_undefined_value_p.
+
+	PR debug/57184
+	* expr.c (expand_expr_addr_expr_1): Handle COMPOUND_LITERAL_EXPR
+	for modifier == EXPAND_INITIALIZER.
+
+2013-05-07  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-05-06  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57185
+	* tree-parloops.c (add_field_for_reduction): Handle anonymous
+	SSA names properly.
+
+	2013-04-19  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57000
+	* tree-ssa-reassoc.c (pass_reassoc): Add TODO_update_ssa_only_virtuals.
+
+2013-05-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
+
+	Backport from trunk
+	2013-05-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
+
+	PR target/57150
+	* config/rs6000/rs6000.h (HARD_REGNO_CALLER_SAVE_MODE): Use DFmode
+	to save TFmode registers and DImode to save TImode registers for
+	caller save operations.
+	(HARD_REGNO_CALL_PART_CLOBBERED): TFmode and TDmode do not need to
+	mark being partially clobbered since they only use the first
+	double word.
+
+	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): TFmode
+	and TDmode only use the upper 64-bits of each VSX register.
+
+2013-05-06  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	PR target/57108
+	* config/sh/sh.md (tstsi_t_zero_extract_eq): Use QIHISIDI mode iterator.
+
+2013-05-06  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-05-06  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/57106
+	* config/i386/i386.c (add_parameter_dependencies): Add dependence
+	between "first_arg" and "insn", not "last" and "insn".
+
+2013-05-03  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/57130
+	* combine.c (make_compound_operation) <case SUBREG>: Pass
+	SET instead of COMPARE as in_code to the recursive call
+	if needed.
+
+	Backported from mainline
+	2013-04-26  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/57051
+	* fold-const.c (const_binop): Handle VEC_LSHIFT_EXPR
+	and VEC_RSHIFT_EXPR if shift count is a multiple of element
+	bitsize.
+
+	2013-04-12  Marc Glisse  <marc.glisse@inria.fr>
+
+	* fold-const.c (fold_binary_loc): Call const_binop also for mixed
+	vector-scalar operations.
+
+2013-05-03  Marek Polacek  <polacek@redhat.com>
+
+	Backport from mainline
+	2013-04-25  Marek Polacek  <polacek@redhat.com>
+
+	PR tree-optimization/57066
+	* builtins.c (fold_builtin_logb): Return +Inf for -Inf.
+
+2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
+
+	Backport from mainline
+	2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
+
+	* lra-constraints.c (process_alt_operands): Add checking alt
+	number to choose the best alternative.
+
+	2013-05-01  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR target/57091
+	* lra-constraints.c (best_small_class_operands_num): Remove.
+	(process_alt_operands): Remove small_class_operands_num.  Take
+	small classes operands into losers and only if the operand is not
+	matched.  Modify debugging output.
+	(curr_insn_transform): Remove best_small_class_operands_num.
+	Print insn name.
+
+2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
+
+	Backport from mainline
+	2013-04-29  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR target/57097
+	* lra-constraints.c (process_alt_operands): Discourage a bit more
+	using memory for pseudos.  Print cost dump for alternatives.
+	Modify cost values for conflicts with early clobbers.
+	(curr_insn_transform): Spill pseudos reassigned to NO_REGS.
+
+2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
+
+	Backport from mainline
+	2013-04-24  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimizations/57046
+	* lra-constraints (split_reg): Set up lra_risky_transformations_p
+	for multi-reg splits.
+
+2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
+
+	Backport from mainline
+	2013-04-22  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR target/57018
+	* lra-eliminations.c (mark_not_eliminable): Prevent elimination of
+	a set sp if no stack realignment.
+
+2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
+
+	Backport from mainline
+	2013-04-18  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/56999
+	* lra-coalesce.c (coalescable_pseudo_p): Remove 2nd parameter and
+	related code.
+	(lra_coalesce): Remove split_origin_bitmap and related code.
+	* lra.c (lra): Coalesce after undoing inheritance. Recreate live
+	ranges if necessary.
+
+2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
+
+	Backport from mainline
+	2013-04-19  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/56847
+	* lra-constraints.c (process_alt_operands): Discourage alternative
+	with non-matche doffsettable memory constraint fro memory with
+	known offset.
+
+2013-05-02  Ian Bolton  <ian.bolton@arm.com>
+
+	Backport from mainline
+	2013-03-28  Ian Bolton  <ian.bolton@arm.com>
+
+	* config/aarch64/aarch64.md (aarch64_can_eliminate): Keep frame
+	record only when desired or required.
+
+2013-04-30  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/57104
+	* tsan.c (instrument_expr): Don't instrument accesses to
+	DECL_HARD_REGISTER VAR_DECLs.
+
+2013-04-30  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-04-29  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/44578
+	* config/i386/i386.md (*zero_extendsidi2_rex64): Add "!" to m->?*y
+	alternative.
+	(*zero_extendsidi2): Ditto.
+
+	Backport from mainline
+	2013-04-29  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/57098
+	* config/i386/i386.c (ix86_expand_vec_perm): Validize constant memory.
+
+2013-04-29  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/57103
+	* tree-cfg.c (move_stmt_op): Fix condition under which to update
+	TREE_BLOCK.
+	(move_stmt_r): Remove redundant checking.
+
+2013-04-29  Christian Bruel  <christian.bruel@st.com>
+
+	PR target/57108
+	* sh.md (tstsi_t_zero_extract_eq): Set mode for operand 0.
+
+2013-04-29  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/57083
+	* tree-vrp.c (extract_range_from_binary_expr_1): For LSHIFT_EXPR with
+	non-singleton shift count range, zero extend low_bound for uns case.
+
+2013-04-28  Eric Botcazou  <ebotcazou@gcc.gnu.org>
+
+	* stor-layout.c (finalize_size_functions): Allocate a structure and
+	reset cfun before dumping the functions.
+
+2013-04-27  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/56866
+	* config/i386/i386.c (ix86_expand_mul_widen_evenodd): Don't
+	use xop_pmacsdqh if uns_p.
+	* config/i386/sse.md (xop_rotr<mode>3): Fix up computation of
+	the immediate rotate count.
+
+2013-04-25  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/57003
+	* regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
+	call note_stores with kill_clobbered_value callback again after
+	killing regs_invalidated_by_call.
+
+2013-04-25  Ian Bolton  <ian.bolton@arm.com>
+
+	Backported from mainline.
+	2013-03-22  Ian Bolton  <ian.bolton@arm.com>
+
+	* config/aarch64/aarch64.c (aarch64_print_operand): New
+	format specifier for printing a constant in hex.
+	* config/aarch64/aarch64.md (insv_imm<mode>): Use the X
+	format specifier for printing second operand.
+
+2013-04-24  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	Backported from mainline.
+	2013-04-24  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* config/aarch64/arm_neon.h (vld1<q>_lane*): Fix constraints.
+	(vld1<q>_dup_<sufp><8, 16, 32, 64>): Likewise.
+	(vld1<q>_<sufp><8, 16, 32, 64>): Likewise.
+
+2013-04-24  Greta Yorsh  <Greta.Yorsh@arm.com>
+
+	Backported from mainline.
+	PR target/56797
+	* config/arm/arm.c (load_multiple_sequence): Require SP
+	as base register for loads if SP is in the register list.
+
+2013-04-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+	    Steven Bosscher <steven@gcc.gnu.org>
+
+	Backported from mainline.
+	PR rtl-optimization/56605
+	* loop-iv.c (implies_p): Handle equal RTXs and subregs.
+
+2013-04-22  Marek Polacek  <polacek@redhat.com>
+
+	Backported from mainline.
+	2013-04-22  Marek Polacek  <polacek@redhat.com>
+
+	PR sanitizer/56990
+	* tsan.c (instrument_expr): Don't instrument expression
+	in case its size is zero.
+
+2013-04-22  Yufeng Zhang  <yufeng.zhang@arm.com>
+
+	Backported from mainline.
+	2013-04-10  Yufeng Zhang  <yufeng.zhang@arm.com>
+	* config/aarch64/aarch64.c (aarch64_print_extension): New function.
+	(aarch64_start_file): Use the new function.
+
+2013-04-18  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56984
+	* tree-vrp.c (register_edge_assert_for_2): For (x >> M) < N
+	and (x >> M) >= N don't register any assertion if N << M is the
+	minimum value.
+
+2013-04-17  David Edelsohn  <dje.gcc@gmail.com>
+
+	PR target/56948
+	* config/rs6000/vsx.md (vsx_mov<mode>): Add j->r alternative.
+
+2013-04-15  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56962
+	* gimple-ssa-strength-reduction.c (record_increment): Only set
+	initializer if gimple_assign_rhs_code is {,POINTER_}PLUS_EXPR and
+	either rhs1 or rhs2 is equal to c->base_expr.
+
+2013-04-15  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* emit-rtl.c (reset_all_used_flags): New function.
+	(verify_rtl_sharing): Call reset_all_used_flags before and after
+	performing the checks.
+
+2013-04-15  Eric Botcazou  <ebotcazou@adacore.com>
+
+	PR target/56890
+	* config/sparc/sparc.c (enum sparc_mode_class): Add H_MODE value.
+	(S_MODES): Set H_MODE bit.
+	(SF_MODES): Set only S_MODE and SF_MODE bits.
+	(DF_MODES): Set SF_MODES and only D_MODE and DF_MODE bits.
+	(sparc_init_modes) <MODE_INT>: Set H_MODE bit for sub-word modes.
+	<MODE_VECTOR_INT>: Do not set SF_MODE for sub-word modes.
+	<MODE_FLOAT>: Likewise.
+
+2013-04-12  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR target/56903
+	* config/i386/i386.c (ix86_hard_regno_mode_ok): Add
+	lra_in_progress for return.
+
+2013-04-12  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56918
+	PR tree-optimization/56920
+	* fold-const.c (int_const_binop_1): Use op1.mul_with_sign (op2, ...)
+	instead of op1 - op2.  Pass 2 * TYPE_PRECISION (type) as second
+	argument to rshift method.
+
+2013-04-12  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* ifcvt.c (end_ifcvt_sequence): Mark a and b for unsharing as
+	well.
+
+2013-04-11  Marek Polacek  <polacek@redhat.com>
+
+	PR tree-optimization/48184
+	* params.def (PARAM_ALIGN_THRESHOLD): Increase the minimum
+	value to 1.
+
+2013-04-11  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	Backported from mainline.
+	2013-04-11  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* config/aarch64/aarch64-simd.md (aarch64_vcond_internal): Fix
+	floating-point vector comparisons against 0.
+
+2013-04-11  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56899
+	* fold-const.c (extract_muldiv_1): Apply distributive law
+	only if TYPE_OVERFLOW_WRAPS (ctype).
+
+2013-04-10  David S. Miller  <davem@davemloft.net>
+
+	* config/sparc/sparc.h (ASM_CPU_SPEC): Pass -Av8 if -mcpu=supersparc
+	or -mcpu=hypersparc.
+
+2013-04-10  Jakub Jelinek  <jakub@redhat.com>
+
+	Backported from mainline
+	2013-04-09  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56883
+	* omp-low.c (expand_omp_for_generic, expand_omp_for_static_nochunk,
+	expand_omp_for_static_chunk): Use simple_p = true in
+	force_gimple_operand_gsi calls when assigning to addressable decls.
+
+2013-04-09  Marek Polacek  <polacek@redhat.com>
+
+	PR tree-optimization/48762
+	* params.def (PARAM_MAX_CSE_INSNS): Increase the minimum
+	value to 1.
+
+2013-04-08  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* config/s390/s390.c (s390_expand_insv): Only accept insertions
+	within mode size.
+
+2013-04-08  Marek Polacek  <polacek@redhat.com>
+
+	PR rtl-optimization/48182
+	* params.def (PARAM_MIN_CROSSJUMP_INSNS): Increase the minimum
+	value to 1.
+
+2013-04-06  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	PR target/55487
+	* config/pa/pa.c (legitimize_pic_address): Before incrementing label
+	nuses, make sure we have a label.
+
+2013-04-04  Ian Lance Taylor  <iant@google.com>
+
+	Backport from mainline:
+	* doc/standards.texi (Standards): The Go frontend supports the Go
+	1 language standard.
+
+2013-04-04  Marek Polacek  <polacek@redhat.com>
+
+	Backport from mainline:
+	2013-04-04  Marek Polacek  <polacek@redhat.com>
+
+	PR tree-optimization/48186
+	* predict.c (maybe_hot_frequency_p): Return false if
+	HOT_BB_FREQUENCY_FRACTION is 0.
+	(cgraph_maybe_hot_edge_p): Likewise.
+
+2013-04-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+	Backport from mainline:
+	2013-03-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+	PR target/56720
+	* config/arm/iterators.md (v_cmp_result): New mode attribute.
+	* config/arm/neon.md (vcond<mode><mode>): Handle unordered cases.
+
+2013-04-04  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56837
+	* tree-loop-distribution.c (classify_partition): For non-zero
+	values require that the value has the same precision as its
+	mode to be useful as memset value.
+
+2013-04-03  Roland McGrath  <mcgrathr@google.com>
+
+	Backport from mainline:
+	2013-03-26  Roland McGrath  <mcgrathr@google.com>
+
+	* config/arm/arm.c (arm_print_operand: case 'w'): Use fputs rather
+	than fprintf with a non-constant, non-format string.
+
+2013-04-03  Marek Polacek  <polacek@redhat.com>
+
+	Backport from mainline:
+	2013-04-03  Marek Polacek  <polacek@redhat.com>
+
+	PR sanitizer/55702
+	* tsan.c (instrument_func_exit): Allow BUILT_IN_RETURN
+	functions.
+
+2013-04-03  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56817
+	* tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely):
+	Split out ...
+	(tree_unroll_loops_completely_1): ... new function to manually
+	walk the loop tree, properly defering outer loops of unrolled
+	loops to later iterations.
+
+2013-04-02  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/56745
+	* ifcvt.c (cond_exec_find_if_block): Don't try to optimize
+	if then_bb has no successors and else_bb is EXIT_BLOCK_PTR.
+
+2013-04-02  Wei Mi  <wmi@google.com>
+
+	* config/i386/i386.c (ix86_rtx_costs): Set proper rtx cost for
+	ashl<mode>3_mask, *<shift_insn><mode>3_mask and
+	*<rotate_insn><mode>3_mask in i386.md.
+
+2013-04-01  Wei Mi  <wmi@google.com>
+
+	* config/i386/i386.md (*ashl<mode>3_mask): Rewrite as define_insn.
+	Truncate operand 2 using %b asm operand modifier.
+	(*<shift_insn><mode>3_mask): Ditto.
+	(*<rotate_insn><mode>3_mask): Ditto.
+
+2013-04-01  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/i386.md (*movsf_internal): Change type of
+	alternatives 3,4 to imov.
+
+2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR lto/56777
+	* doc/invoke.texi ([-fwhole-program]): Fix typo.
+
+2013-03-29  Kirill Yukhin  <kirill.yukhin@intel.com>
+
+	* config/i386/avx2intrin.h (_mm256_broadcastsi128_si256):
+	Fix declaration name.
+
+2013-03-28  Gerald Pfeifer  <gerald@pfeifer.com>
+
+	* doc/invoke.texi (AVR Options): Tweak link for AVR-LibC user manual.
+	* doc/extend.texi (Named Address Spaces): Ditto.
+	(Variable Attributes): Ditto.
+
+2013-03-28  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* toplev.c (process_options): Do not disable -fomit-frame-pointer on a
+	general basis if unwind info is requested and ACCUMULATE_OUTGOING_ARGS
+	is not enabled.
+
+2013-03-27  Walter Lee  <walt@tilera.com>
+
+	Backport from mainline:
+	2013-03-27  Walter Lee  <walt@tilera.com>
+
+	* config/tilegx/tilegx.c (tilegx_expand_prologue): Avoid
+	double-decrement of next_scratch_regno.
+
+2013-03-27  Walter Lee  <walt@tilera.com>
+
+	Backport from mainline:
+	2013-03-27  Walter Lee  <walt@tilera.com>
+
+	* config/tilegx/tilegx.md (insn_v1mulu): Fix predicates on
+	input operands.
+	(insn_v1mulus): Ditto.
+	(insn_v2muls): Ditto.
+
+2013-03-27  Walter Lee  <walt@tilera.com>
+
+	Backport from mainline:
+	2013-03-27  Walter Lee  <walt@tilera.com>
+
+	* config/tilegx/tilegx.h (ASM_OUTPUT_ADDR_VEC_ELT): Delete
+	extra tab.
+	(ASM_OUTPUT_ADDR_DIFF_ELT): Ditto.
+
+2013-03-27  Walter Lee  <walt@tilera.com>
+
+	Backport from mainline:
+	2013-03-27  Walter Lee  <walt@tilera.com>
+
+	* config/tilegx/tilegx.md (*sibcall_insn): Fix type atribute for jr.
+	(*sibcall_value): Ditto.
+
+2013-03-27  Walter Lee  <walt@tilera.com>
+
+	Backport from mainline:
+	2013-03-27  Walter Lee  <walt@tilera.com>
+
+	* config/tilegx/tilegx.md (insn_mnz_<mode>): Replaced by ...
+	(insn_mnz_v8qi): ... this ...
+	(insn_mnz_v4hi): ... and this.  Replace (const_int 0) with the
+	vector equivalent.
+	(insn_v<n>mnz): Replaced by ...
+	(insn_v1mnz): ... this ...
+	(insn_v2mnz): ... and this.  Replace (const_int 0) with the vector
+	equivalent.
+	(insn_mz_<mode>): Replaced by ...
+	(insn_mz_v8qi): ... this ...
+	(insn_mz_v4hi): ... and this.  Replace (const_int 0) with the
+	vector equivalent.
+	(insn_v<n>mz): Replaced by ...
+	(insn_v1mz): ... this ...
+	(insn_v2mz): ... and this.  Replace (const_int 0) with the vector
+	equivalent.
+
+2013-03-26  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* doc/invoke.texi (SPARC options): Remove -mlittle-endian.
+
+2013-03-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
+
+	* config/rtems.opt: Add -pthread option.
+
+2013-03-26  Sofiane Naci  <sofiane.naci@arm.com>
+
+	* config/aarch64/aarch64.c (aarch64_classify_address): Support
+	PC-relative load in SI modes and above only.
+
+2013-03-26  Walter Lee  <walt@tilera.com>
+
+	Backport from mainline:
+	2013-03-26  Walter Lee  <walt@tilera.com>
+
+	* config/tilegx/tilegx.h (PROFILE_BEFORE_PROLOGUE): Define.
+	* config/tilegx/tilepro.h (PROFILE_BEFORE_PROLOGUE): Define.
+
+2013-03-26  Walter Lee  <walt@tilera.com>
+
+	Backport from mainline:
+	2013-03-25  Walter Lee  <walt@tilera.com>
+
+	* config/tilegx/tilegx-builtins.h (enum tilegx_builtin): Add
+	TILEGX_INSN_SHUFFLEBYTES1.
+	* config/tilegx/tilegx.c (tilegx_builtin_info): Add entry for
+	shufflebytes1.
+	(tilegx_builtins): Ditto.
+	* config/tilegx/tilegx.md (insn_shufflebytes1): New pattern.
+
+2013-03-26  Walter Lee  <walt@tilera.com>
+
+	Backport from mainline:
+	2013-03-25  Walter Lee  <walt@tilera.com>
+
+	* config/tilegx/tilegx.c (expand_set_cint64_one_inst): Inline
+	tests for constraint J, K, N, P.
+
+2013-03-26  Walter Lee  <walt@tilera.com>
+
+	Backport from mainline:
+	2013-03-25  Walter Lee  <walt@tilera.com>
+
+	* config/tilegx/tilegx.c (tilegx_asm_preferred_eh_data_format):
+	Use indirect/pcrel encoding.
+	* config/tilepro/tilepro.c (tilepro_asm_preferred_eh_data_format):
+	Ditto.
+
+2013-03-25  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/56694
+	* tree-eh.c (lower_eh_must_not_throw): Strip BLOCKs from the
+	must-not-throw stmt location.
+
+2012-03-22  Jakub Jelinek  <jakub@redhat.com>
+
+	* BASE-VER: Set to 4.8.1.
+	* DEV-PHASE: Set to prerelease.
+
+2013-03-22  Release Manager
+
+	* GCC 4.8.0 released.
+
+2013-03-21  Walter Lee  <walt@tilera.com>
+
+	* config/tilegx/sync.md (atomic_test_and_set): New pattern.
+
+2013-03-21  Mark Wielaard  <mjw@redhat.com>
+
+	* dwarf2out.c (size_of_aranges): Skip DECL_IGNORED_P functions.
+
+2013-03-20  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56661
+	* tree-ssa-sccvn.c (visit_use): Only value-number calls if
+	the result does not have to be distinct.
+
+2013-03-20  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56635
+	* tree-ssa-phiopt.c (cond_if_else_store_replacement_1): Give up
+	if lhs of then_assign and else_assign don't have compatible types.
+
+2013-03-17  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/56640
+	* config/arm/arm.h (REG_CLASS_NAMES): Add "SFP_REG" and "AFP_REG"
+	class names.  Remove trailing comma after "ALL_REGS".
+
+2013-03-16  Jakub Jelinek  <jakub@redhat.com>
+
+	* DEV-PHASE: Set to prerelease.
+
+2013-03-14  Andi Kleen  <ak@linux.intel.com>
+
+	PR target/56619
+	* doc/extend.texi: Document __ATOMIC_HLE_ACQUIRE,
+	__ATOMIC_HLE_RELEASE. Document __builtin_ia32 TSX intrincs.
+	Document _x* TSX intrinsics.
+
+2013-03-14  Edgar E. Iglesias <edgar.iglesias@xilinx.com>
+	    David Holsgrove <david.holsgrove@xilinx.com>
+
+	* configure.ac: Add MicroBlaze TLS support detection.
+	* configure: Regenerate.
+	* config/microblaze/microblaze-protos.h
+	(microblaze_cannot_force_const_mem, microblaze_tls_referenced_p,
+	symbol_mentioned_p, label_mentioned_p): Add prototypes.
+	* config/microblaze/microblaze.c (microblaze_address_type): Add
+	ADDRESS_TLS and tls_reloc address types.
+	(microblaze_address_info): Add tls_reloc.
+	(TARGET_HAVE_TLS): Define.
+	(get_tls_get_addr, microblaze_tls_symbol_p, microblaze_tls_operand_p_1,
+	microblaze_tls_referenced_p, microblaze_cannot_force_const_mem,
+	symbol_mentioned_p, label_mentioned_p, tls_mentioned_p,
+	load_tls_operand, microblaze_call_tls_get_addr,
+	microblaze_legitimize_tls_address): New functions.
+	(microblaze_classify_unspec): Handle UNSPEC_TLS.
+	(get_base_reg): Use microblaze_tls_symbol_p.
+	(microblaze_classify_address): Handle TLS.
+	(microblaze_legitimate_pic_operand): Use symbol_mentioned_p,
+	label_mentioned_p and microblaze_tls_referenced_p.
+	(microblaze_legitimize_address): Handle TLS.
+	(microblaze_address_insns): Handle ADDRESS_TLS.
+	(pic_address_needs_scratch): Handle TLS.
+	(print_operand_address): Handle TLS.
+	(microblaze_expand_prologue): Check TLS_NEEDS_GOT.
+	(microblaze_expand_move): Handle TLS.
+	(microblaze_legitimate_constant_p): Check
+	microblaze_cannot_force_const_mem and microblaze_tls_symbol_p.
+	(TARGET_CANNOT_FORCE_CONST_MEM): Define.
+	* config/microblaze/microblaze.h (TLS_NEEDS_GOT): Define
+	(PIC_OFFSET_TABLE_REGNUM): Set.
+	* config/microblaze/linux.h (TLS_NEEDS_GOT): Define.
+	* config/microblaze/microblaze.md (UNSPEC_TLS): Define.
+	(addsi3, movsi_internal2, movdf_internal): Update constraints
+	* config/microblaze/predicates.md (arith_plus_operand): Define
+	(move_operand): Redefine as move_src_operand, check
+	microblaze_tls_referenced_p.
+
+2013-03-14  Ian Bolton  <ian.bolton@arm.com>
+
+	* config/aarch64/aarch64.md: (*and<mode>3nr_compare0): Use CC_NZ.
+	(*and_<SHIFT:optab><mode>3nr_compare0): Likewise.
+
+2013-03-14  Ian Bolton  <ian.bolton@arm.com>
+
+	* config/aarch64/aarch64.c (aarch64_select_cc_mode): Return correct
+	CC mode for AND.
+
+2013-03-14  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/53265
+	* common.opt (Waggressive-loop-optimizations): New option.
+	* tree-ssa-loop-niter.c: Include tree-pass.h.
+	(do_warn_aggressive_loop_optimizations): New function.
+	(record_estimate): Call it.  Don't add !is_exit bounds to loop->bounds
+	if number_of_latch_executions returned constant.
+	(estimate_numbers_of_iterations_loop): Call number_of_latch_executions
+	early.  If number_of_latch_executions returned constant, set
+	nb_iterations_upper_bound back to it.
+	* cfgloop.h (struct loop): Add warned_aggressive_loop_optimizations
+	field.
+	* Makefile.in (tree-ssa-loop-niter.o): Depend on $(TREE_PASS_H).
+	* doc/invoke.texi (-Wno-aggressive-loop-optimizations): Document.
+
+	* config/aarch64/t-aarch64-linux (MULTARCH_DIRNAME): Remove.
+	(MULTILIB_OSDIRNAMES): Set.
+	* genmultilib: If defaultosdirname doesn't start with :: , set
+	defaultosdirname2 instead, clear it and emit two . multilib_raw
+	entries instead of just one.
+
+2013-03-14  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+	* config/sh/linux.h (TARGET_DEFAULT): Remove MASK_USERMODE.
+	(SUBTARGET_OVERRIDE_OPTIONS): Set TARGET_USERMODE as default.
+	* config/sh/netbsd-elf.h (TARGET_DEFAULT): Remove MASK_USERMODE.
+	(SUBTARGET_OVERRIDE_OPTIONS): New.
+
+2013-03-13  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	PR target/49880
+	* config/sh/sh.opt (FPU_SINGLE_ONLY): New mask.
+	(musermode): Convert to Var(TARGET_USERMODE).
+	* config/sh/sh.h (SELECT_SH2A_SINGLE_ONLY, SELECT_SH4_SINGLE_ONLY,
+	MASK_ARCH): Add MASK_FPU_SINGLE_ONLY.
+	* config/sh/sh.c (sh_option_override): Use
+	TARGET_FPU_DOUBLE || TARGET_FPU_SINGLE_ONLY for call-fp case.
+	* config/sh/sh.md (udivsi3_i1, divsi3_i1): Remove ! TARGET_SH4
+	condition.
+	(udivsi3_i4, divsi3_i4): Use TARGET_FPU_DOUBLE condition instead of
+	TARGET_SH4.
+	(udivsi3_i4_single, divsi3_i4_single): Use
+	TARGET_FPU_SINGLE_ONLY || TARGET_FPU_DOUBLE instead of TARGET_HARD_SH4.
+
+2013-03-13  Dave Korn  <dave.korn.cygwin@....>
+
+	* config/i386/cygwin.h (SHARED_LIBGCC_SPEC): Make shared libgcc the
+	default setting.
+
+2013-03-13  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56608
+	* tree-vect-slp.c (vect_schedule_slp): Do not remove scalar
+	calls when vectorizing basic-blocks.
+
+2013-03-13  Jakub Jelinek  <jakub@redhat.com>
+
+	PR plugins/45078
+	* config.gcc: On arm, mips, sh and sparc add vxworks-dummy.h to
+	tm_file.
+
+2013-03-12  Jakub Jelinek  <jakub@redhat.com>
+
+	* doc/invoke.texi (-Waddr-space-convert): Move into the table earlier.
+
+2013-03-11  Jan Hubicka  <jh@suse.cz>
+
+	PR lto/56557
+	* lto-streamer-out.c (output_symbol_p): Skip references from
+	constructors of external variables.
+
+2013-03-11  Jan Hubicka  <jh@suse.cz>
+
+	PR middle-end/56571
+	* valtrack.c (cleanup_auto_inc_dec): Unshare clobbers originating
+	from pseudos.
+	* emit-rtl.c (verify_rtx_sharing): Likewise.
+	(copy_insn_1): Likewise.
+	* rtl.c (copy_rtx): Likewise.
+
+2013-03-11  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR target/56591
+	* config/avr/avr.c (avr_print_operand): Add space after '%c' in
+	output_operand_lossage message.
+
+2013-03-11  Richard Earnshaw  <rearnsha@arm.com>
+
+	PR target/56470
+	* arm.c (shift_op): Validate RTL pattern on the fly.
+	(arm_print_operand, case 'S'): Don't use shift_operator to validate
+	the RTL.
+
+2013-03-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	PR target/56347
+	* config/pa/pa.md (call_value): Check for calls to powf and direct to
+	new call patterns that clobber %fr12.
+	(call_val_powf, call_val_powf_pic, call_val_powf_64bit): New insn,
+	split and postreload patterns.
+	* config/pa/pa.c (pa_conditional_register_usage): Revert marking
+	registers %fr12 and %fr12R as call used.
+
+2013-03-09  Steven Bosscher  <steven@gcc.gnu.org>
+
+	* dse.c (delete_dead_store_insn): Respect TDF_DETAILS.
+	(canon_address, record_store, replace_read, check_mem_read_rtx,
+	scan_insn, dse_step1, dse_step2_init, dse_step2_spill,
+	dse_step4, dse_step5_nospill, dse_step5_spill, dse_step6,
+	rest_of_handle_dse): Likewise.
+
+2013-03-09  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	PR middle-end/56524
+	* tree.h (tree_optimization_option): Rename target_optabs to optabs.
+	Add base_optabs.
+	(TREE_OPTIMIZATION_OPTABS): Update after previous field change.
+	(TREE_OPTIMIZATION_BASE_OPTABS): New macro.
+	(save_optabs_if_changed): Replace with...
+	(init_tree_optimization_optabs): ...this.
+	* optabs.c (save_optabs_if_changed): Rename to...
+	(init_tree_optimization_optabs): ...this.  Take the optimization node
+	as argument.  Do nothing if the base optabs are already correct.
+	Reuse the existing TREE_OPTIMIZATION_OPTABS memory if we need
+	to recompute optabs.
+	* function.h (function): Remove optabs field.
+	* function.c (invoke_set_current_function_hook): Call
+	init_tree_optimization_optabs.  Use the result to initialize
+	this_fn_optabs.
+
+2013-02-27  Aldy Hernandez  <aldyh@redhat.com>
+
+	* trans-mem.c (expand_transaction): Do not set PR_INSTRUMENTEDCODE
+	if GTMA_HAS_NO_INSTRUMENTATION.
+	(generate_tm_state): Keep GTMA_HAS_NO_INSTRUMENTATION bit.
+	(ipa_tm_transform_transaction): Set GTMA_HAS_NO_INSTRUMENTATION.
+	* gimple.h (GTMA_HAS_NO_INSTRUMENTATION): Define.
+	* gimple-pretty-print.c (dump_gimple_transaction): Handle
+	GTMA_HAS_NO_INSTRUMENTATION.
+
+2013-03-08  Jakub Jelinek  <jakub@redhat.com>
+
+	* config/gnu-user.h (LIBTSAN_EARLY_SPEC): Don't link against
+	libasan_preinit.o.
+
+2013-03-08  Marek Polacek  <polacek@redhat.com>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56478
+	* predict.c (is_comparison_with_loop_invariant_p): Change the
+	type of loop_step to tree.
+	(predict_loops): Adjust.
+	(predict_iv_comparison): Perform the computations on double_ints.
+
+2013-03-08  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56570
+	* tree-cfg.c (verify_expr_location_1): Verify locations for
+	DECL_DEBUG_EXPR.
+	* tree-sra.c (create_access_replacement): Strip locations
+	from DECL_DEBUG_EXPRs.
+
+2013-03-08  Richard Biener  <rguenther@suse.de>
+
+	* tree-inline.c (expand_call_inline): Do not associate
+	a BLOCK with the location in BLOCK_SOURCE_LOCATION.
+	* tree-cfg.c (verify_location): Verify BLOCK_SOURCE_LOCATION.
+
+2013-03-08  Richard Biener  <rguenther@suse.de>
+
+	* tree-ssa-ter.c (is_replaceable_p): Do not TER across location
+	or block changes with -Og.  Fix for location / block encoding
+	changes and PHI arguments with locations.
+
+2013-03-07  Steven Bosscher  <steven@gcc.gnu.org>
+
+	* bitmap.c (struct bitmap_descriptor_d): Use unsigned HOST_WIDEST_INT
+	for all counters.
+	(struct output_info): Likewise.
+	(register_overhead): Remove bad gcc_assert.
+	(bitmap_find_bit): If there is only a single bitmap element, do not
+	count a miss as a search.
+	(print_statistics): Update for counter type changes.
+	(dump_bitmap_statistics): Likewise.  Print headers such that they
+	are properly lined up with the printed counters.
+
+2013-03-07  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56559
+	* tree-ssa-reassoc.c (zero_one_operation): When looking at rhs2,
+	check that it has only a single use.
+
+2013-03-07  Richard Biener  <rguenther@suse.de>
+
+	* doc/invoke.texi (fwhole-program): Discourage use in combination
+	with -flto.
+
+2013-03-06  Jakub Jelinek  <jakub@redhat.com>
+
+	* config/arm/t-arm (TM_H, OPTIONS_H_EXTRA): Add arm-cores.def.
+
+	PR tree-optimization/56539
+	* tree-tailcall.c (adjust_return_value_with_ops): Use GSI_SAME_STMT
+	instead of GSI_CONTINUE_LINKING as last argument to
+	force_gimple_operand_gsi.  Adjust function comment.
+
+	* config/aarch64/t-aarch64 (TM_H, OPTIONS_H_EXTRA): Add
+	aarch64-cores.def.
+
+	PR middle-end/56548
+	* expr.c (expand_cond_expr_using_cmove): When expanding cmove in
+	promoted mode, convert the result back to the original mode.
+
+2013-03-06  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/56294
+	* tree-into-ssa.c (insert_phi_nodes_for): Add dumping.
+	(insert_updated_phi_nodes_compare_uids): New function.
+	(update_ssa): Sort symbols_to_rename after UID before
+	traversing it to insert PHI nodes.
+
+2013-03-06  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/50494
+	* tree-vect-data-refs.c (vect_can_force_dr_alignment_p):
+	Do not adjust alignment of DECL_IN_CONSTANT_POOL decls.
+
+	Revert
+	2013-02-13  Richard Biener  <rguenther@suse.de>
+
+	PR lto/50494
+	* varasm.c (output_constant_def_1): Get the decl representing
+	the constant as argument.
+	(output_constant_def): Wrap output_constant_def_1.
+	(make_decl_rtl): Use output_constant_def_1 with the decl
+	representing the constant.
+	(build_constant_desc): Optionally re-use a decl already
+	representing the constant.
+	(tree_output_constant_def): Adjust.
+
+2013-03-06  Joey Ye  <joey.ye@arm.com>
+
+	PR lto/50293
+	* gcc.c (convert_white_space): New function.
+	(main): Handles white space in function name.
+
+2013-03-06  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	PR target/56529
+	* config/sh/sh.c (sh_option_override): Check for TARGET_DYNSHIFT
+	instead of TARGET_SH2 for call-table case.  Do not set sh_div_strategy
+	to SH_DIV_CALL_TABLE for TARGET_SH2.
+	* config.gcc (sh_multilibs): Add m2 and m2a to sh*-*-linux* multilib
+	list.
+	* doc/invoke.texi (SH options): Document mdiv= call-div1, call-fp,
+	call-table options.
+
+2013-03-05  Sterling Augustine  <saugustine@google.com>
+	    Cary Coutant  <ccoutant@google.com>
+
+	PR debug/55364
+	* dwarf2out.c (resolve_addr): Don't call
+	remove_loc_list_addr_table_entries a second time for the same
+	expression.
+
+2013-03-05  Jakub Jelinek  <jakub@redhat.com>
+
+	PR debug/56510
+	* cfgexpand.c (expand_debug_parm_decl): Call copy_rtx on incoming.
+	(avoid_complex_debug_insns): New function.
+	(expand_debug_locations): Call it.
+
+	PR rtl-optimization/56484
+	* ifcvt.c (noce_process_if_block): If else_bb is NULL, avoid extending
+	lifetimes of hard registers on small register class machines.
+
+2013-03-05  David Holsgrove  <david.holsgrove@xilinx.com>
+
+	* config/microblaze/microblaze-protos.h: Rename
+	microblaze_is_interrupt_handler to microblaze_is_interrupt_variant.
+	* config/microblaze/microblaze.c (microblaze_attribute_table): Add
+	fast_interrupt.
+	(microblaze_fast_interrupt_function_p): New function.
+	(microblaze_is_interrupt_handler): Rename to
+	microblaze_is_interrupt_variant and add fast_interrupt check.
+	(microblaze_must_save_register): Use microblaze_is_interrupt_variant.
+	(save_restore_insns): Likewise.
+	(compute_frame_size): Likewise.
+	(microblaze_function_prologue): Add FAST_INTERRUPT_NAME.
+	(microblaze_globalize_label): Likewise.
+	* config/microblaze/microblaze.h: Define FAST_INTERRUPT_NAME.
+	* config/microblaze/microblaze.md: Use wrapper
+	microblaze_is_interrupt_variant.
+
+2013-03-05  Kai Tietz  <ktietz@redhat.com>
+
+	* sdbout.c (sdbout_one_type): Switch to current function's section
+	supporting cold/hot.
+
+2013-03-05  David Holsgrove  <david.holsgrove@xilinx.com>
+
+	* doc/invoke.texi (MicroBlaze): Add -mbig-endian, -mlittle-endian,
+	-mxl-reorder.
+
+2013-03-05  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56461
+	* ggc-common.c (gt_pch_save): For ENABLE_VALGRIND_CHECKING,
+	if VALGRIND_GET_VBITS is defined, temporarily make object
+	memory all defined, and restore previous valgrind addressability
+	and definability afterwards.  Free this_object at the end.
+
+	PR middle-end/56461
+	* lra.c (lra): Call lra_clear_live_ranges if live_p,
+	right before calling lra_create_live_ranges, also call it
+	when clearing live_p.  Only call lra_clear_live_ranges
+	at the end if live_p.
+
+	PR middle-end/56461
+	* sched-deps.c (delete_dep_node): Free DEP_REPLACE.
+
+2013-03-05  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56521
+	* tree-ssa-sccvn.c (set_value_id_for_result): Always initialize
+	value-id.
+
+2013-03-05  Steven Bosscher  <steven@gcc.gnu.org>
+
+	PR c++/55135
+	* except.h (remove_unreachable_eh_regions): New prototype.
+	* except.c (remove_eh_handler_splicer): New function, split out
+	of remove_eh_handler.
+	(remove_eh_handler): Use remove_eh_handler_splicer.  Add comment
+	warning about running it on many EH regions one at a time.
+	(remove_unreachable_eh_regions_worker): New function, walk the
+	EH tree in depth-first order and remove non-marked regions.
+	(remove_unreachable_eh_regions): New function.
+	* tree-eh.c (mark_reachable_handlers): New function, split out
+	from remove_unreachable_handlers.
+	(remove_unreachable_handlers): Use mark_reachable_handlers and
+	remove_unreachable_eh_regions.
+	(remove_unreachable_handlers_no_lp): Use mark_reachable_handlers
+	and remove_unreachable_eh_regions.
+
+2013-03-05  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/56525
+	* loop-init.c (fix_loop_structure): Remove loops in two stages,
+	not freeing them until the end.
+
+2013-03-05  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* config/s390/s390.h: Define DWARF2_ASM_LINE_DEBUG_INFO.
+
+2013-03-05  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56270
+	* tree-vect-slp.c (vect_schedule_slp): Clear vectorized stmts
+	of loads after scheduling an SLP instance.
+
+2013-03-05  Jakub Jelinek  <jakub@redhat.com>
+
+	* Makefile.in (dg_target_exps): Add aarch64.exp, epiphany.exp and
+	tic6x.exp.
+	(check_gcc_parallelize): Run guality.exp as a separate job from
+	vect.exp with unsorted.exp and $(dg_target_exps) separately from
+	struct-layout-1.exp with stackalign.exp.
+
+	* alias.c (init_alias_analysis): Clear reg_known_equiv_p bitmap.
+
+	PR middle-end/56461
+	* tree-vect-slp.c (vect_supported_load_permutation_p): Free
+	load_index sbitmap even if some bit in it isn't set.
+
+	PR middle-end/56461
+	* tree-ssa-loop-niter.c (bb_queue): Remove typedef.
+	(discover_iteration_bound_by_body_walk): Change queues to
+	vec<vec<basic_block> > and queue to vec<basic_block>.  Fix up
+	spelling in comment.  Call safe_push on queues[bound_index] directly.
+	Release queues[queue_index] in every iteration unconditionally.
+	Release bounds vector.
+
+	PR middle-end/56461
+	* tree-vect-stmts.c (free_stmt_vec_info_vec): Call
+	free_stmt_vec_info on any left-over stmt_vec_info in the vector.
+	* tree-vect-loop.c (vect_create_epilog_for_reduction): Release
+	inner_phis vector.
+
+2013-03-05  Richard Biener  <rguenther@suse.de>
+
+	PR lto/56515
+	* tree-inline.c (remap_blocks_to_null): New function.
+	(expand_call_inline): When expanding a call stmt without
+	an associated block inline remap all callee blocks to NULL.
+
+2013-03-05  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/56494
+	* simplify-rtx.c (simplify_truncation): If C is narrower than A,
+	optimize (truncate:A (subreg:B (truncate:C X) 0)) into
+	(subreg:A (truncate:C X) 0) instead of (truncate:A X).
+
+	PR middle-end/56461
+	* sel-sched-ir.c (free_sched_pools): Release
+	succs_info_pool.stack[succs_info_pool.max_top] vectors too
+	if succs_info_pool.max_top isn't -1.
+
+	PR bootstrap/56509
+	* opts.c (opts_obstack, opts_concat): Moved to...
+	* opts-common.c (opts_obstack, opts_concat): ... here.
+
+2013-03-04  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56461
+	* diagnostic.c (diagnostic_append_note): Save and restore old prefix.
+
+2013-03-04  Martin Jambor  <mjambor@suse.cz>
+
+	* tree-dfa.c (get_or_create_ssa_default_def): Use parameter fn in
+	all appropriate places.
+
+2013-01-04  Eric Botcazou  <ebotcazou@adacore.com>
+
+	PR tree-optimization/56424
+	* ipa-split.c (split_function): Do not set the RSO flag if result is
+	not by reference and its type is a register type.
+
+2013-03-04  David Holsgrove  <david.holsgrove@xilinx.com>
+
+	* config/microblaze/microblaze.c (microblaze_valid_pic_const): New.
+	(microblaze_legitimate_pic_operand): Likewise.
+	* config/microblaze/microblaze.h (LEGITIMATE_PIC_OPERAND_P): Call
+	new function microblaze_legitimate_pic_operand.
+	* config/microblaze/microblaze-protos.h
+	(microblaze_legitimate_pic_operand): Declare.
+
+2013-03-04  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
+
+	* config/microblaze/predicates.md (call_insn_simple_operand):
+	New predicate for supported rtx code types.
+	* config/microblaze/microblaze.md (call_internal1): Use
+	call_insn_simple_operand predicate.
+
+2013-03-04  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56461
+	* tree-loop-distribution.c (ldist_gen): Call partition_free after each
+	partitions.ordered_remove.
+
+	PR middle-end/56461
+	* tree-vect-stmts.c (vectorizable_conversion): Don't call
+	vec_oprnds0.create (1) for modifier == NONE.
+
+	PR middle-end/56461
+	* tree-vect-stmts.c (vectorizable_shift): Don't call create methods
+	on vec_oprnds0 or vec_oprnds1 before loop, only call it on
+	vec_oprnds1 right before pushing anything to it for
+	scalar_shift_arg.
+
+	PR middle-end/56461
+	* tree-vect-loop.c (destroy_loop_vec_info): For !clean_stmts, just
+	set nbbs to 0 instead of having separate code path.
+	(vect_analyze_loop_form): Call destroy_loop_vec_info with true
+	instead of false as last argument if returning NULL.
+
+2013-03-03  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* target.def (TARGET_OPTION_VALID_ATTRIBUTE_P): Update comments;
+	the attribute is now called "target" instead of "option".
+	(TARGET_OPTION_PRAGMA_PARSE): Likewise, for the pragma.
+	* doc/tm.texi.in (Target Attributes):  Likewise document the correct
+	attribute/pragma name for TARGET_OPTION_VALID_P and
+	TARGET_OPTION_PRAGMA_PARSE.  Also copy-edit and correct markup.
+	* doc/tm.texi: Regenerated.
+
+2013-03-02  David Holsgrove  <david.holsgrove@xilinx.com>
+
+	* config/microblaze/microblaze.c:
+	Check mcpu, pcmp requirement and set TARGET_REORDER to 0 if not met.
+	* config/microblaze/microblaze.h: Add -mxl-reorder to
+	DRIVER_SELF_SPECS.
+	* config/microblaze/microblaze.md: New bswapsi2 and bswaphi2.
+	instructions emitted if TARGET_REORDER.
+	* config/microblaze/microblaze.opt: New option -mxl-reorder set to 1
+	or 0 for -m/-mno case, but initialises as 2 to detect default use case
+	separately.
+
+2013-03-01  Xinliang David Li  <davidxl@google.com>
+
+	* tree-ssa-uninit.c (compute_control_dep_chain): Limit post-dom
+	walk length.
+
+2013-03-01  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56461
+	* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Release path
+	vector even when returning true.  Fix up function comment formatting.
+
+	PR middle-end/56461
+	* ira-build.c (ira_loop_nodes_count): New variable.
+	(create_loop_tree_nodes): Initialize it.
+	(finish_loop_tree_nodes): Use it instead of looking at current_loops.
+
+	PR middle-end/56461
+	* tree-vect-data-refs.c (vect_permute_store_chain): Avoid using copy
+	method on dr_chain and result_chain.
+	* tree-vect-stmts.c (vectorizable_store): Only call
+	result_chain.create if j == 0.
+
+	PR middle-end/56461
+	* tree-vect-stmts.c (vect_create_vectorized_promotion_stmts): Call
+	vec_oprnds0->release (); rather than vec_oprnds0->truncate (0)
+	before overwriting it.
+
+2013-03-01  Tobias Burnus  <burnus@net-b.de>
+
+	* doc/extended.texi (C Extensions): Change order in @menu
+	to match @node.
+	(Other MIPS Built-in Functions): Move last MIPS entry before
+	"picoChip Built-in Functions".
+	(SH Built-in Functions): Move after RX Built-in Functions.
+	* doc/gcc.texi (Introduction): Change order in @menu to match @node.
+	* doc/md.texi (Constraints): Ditto.
+	* gty.texi (Type Information): Ditto.
+	(User-provided marking routines for template types): Make subsection.
+	* doc/invoke.texi (AArch64 Options): Move before
+	"Adapteva Epiphany Options".
+
+2013-02-28  Konstantin Serebryany  <konstantin.s.serebryany@gmail.com>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/56454
+	* asan.c (gate_asan): Lookup no_sanitize_address instead of
+	no_address_safety_analysis attribute.
+	* doc/extend.texi (no_address_safety_attribute): Rename to
+	no_sanitize_address attribute, mention no_address_safety_analysis
+	attribute as deprecated alias.
+
+2013-02-28  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56461
+	* tree-vectorizer.h (vect_get_slp_defs): Change 3rd argument
+	type to vec<vec<tree> > *.
+	* tree-vect-slp.c (vect_get_slp_defs): Likewise.  Change vec_defs
+	to be vec<tree> instead of vec<tree> *, set vec_defs
+	to vNULL and call vec_defs.create (number_of_vects), adjust other
+	uses of vec_defs.
+	* tree-vect-stmts.c (vect_get_vec_defs, vectorizable_call,
+	vectorizable_condition): Adjust vect_get_slp_defs callers.
+
+2013-02-28  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* config/aarch64/aarch64.c
+	(aarch64_float_const_representable): Remove unused variable.
+
+2013-02-28  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* config/aarch64/aarch64.c (aarch64_mangle_type): Make static.
+
+2013-02-28  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* config/aarch64/aarch64-builtins.c
+	(aarch64_init_simd_builtins): Make static.
+
+2013-02-28  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* config/aarch64/aarch64.c
+	(aarch64_simd_make_constant): Make static.
+
+2013-02-28  Martin Jambor  <mjambor@suse.cz>
+
+	* tree-sra.c (load_assign_lhs_subreplacements): Do not put replacements
+	with no initialization to the RHS of debug statements.
+
+2013-02-28  Martin Jambor  <mjambor@suse.cz>
+
+	PR tree-optimization/56294
+	* tree-sra.c (analyze_access_subtree): Create replacement declarations.
+	Adjust dumping.
+	(get_access_replacement): Do not call create_access_replacement.
+	Assert a replacement exists.
+	(get_repl_default_def_ssa_name): Create the replacement declaration
+	itself.
+
+2013-02-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
+
+	* config/arm/arm.c (arm_output_mi_thunk): Call final_start_function and
+	final_end_function.
+
+2013-02-28  Marek Polacek  <polacek@redhat.com>
+
+	PR rtl-optimization/56466
+	* loop-unroll.c (unroll_and_peel_loops): Call fix_loop_structure
+	if we're changing a loop.
+	(peel_loops_completely): Likewise.
+
+2013-02-28  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/55813
+	* doc/invoke.texi ([-Wctor-dtor-privacy]): Complete.
+
+2013-02-28  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR target/56445
+	* config/avr/avr.c (avr_init_builtins): Use 'n' instead of empty
+	macro parameters with: FX_FTYPE_FX, FX_FTYPE_FX_INT, INT_FTYPE_FX,
+	INTX_FTYPE_FX, FX_FTYPE_INTX.
+	* config/avr/builtins.def: Adjust respective DEF_BUILTIN.
+
+2013-02-28  Georg-Johann Lay  <avr@gjlay.de>
+
+	* avr/avr-mcus.def (ata5272, ata5505, attiny1634, ata6285)
+	(ata6286, atmega8a, atmega48pa, ata5790, ata5790n, ata5795)
+	(atmega164pa, atmega165pa, atmega168pa, atmega16hva, atmega16hvb)
+	(atmega16hvbrevb, atmega16m1, atmega16u4, atmega26hvg, atmega32a)
+	(atmega32a, atmega3250pa, atmega3290pa, atmega32c1, atmega32m1)
+	(atmega32u4, atmega32u6, atmega64a, atmega6490a, atmega6490p)
+	(atmega64c1, atmega64m1, atmega64rfa2, atmega64rfr2, atmega32hvb)
+	(atmega32hvbrevb, atmega16hva2, atmega48hvf, at90pwm161)
+	(atmega128a, atmega1284, atmxt112sl, atmxt224, atmxt224e)
+	(atmxt336s, atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4)
+	(atxmega32e5, atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3)
+	(atxmega64c3, atxmega64d4, atxmega128a3u, atxmega128b1)
+	(atxmega128b3, atxmega128c3, atxmega128d4, atmxt540s, atmxt540sreva)
+	(atxmega192a3u, atxmega192c3, atxmega256a3u, atxmega256c3)
+	(atxmega384c3, atxmega384d3, atxmega128a4u): New AVR_MCU.
+	(avrxmega6): Increase max flash segments from 5 to 6.
+	* config/avr/t-multilib: Regenerate.
+	* config/avr/avr-tables.opt: Regenerate.
+	* doc/avr-mmcu.texi: Regenerate.
+
+2013-02-28  Georg-Johann Lay  <avr@gjlay.de>
+
+	* config/avr/avr.h (device_to_arch): Rename to device_to_ld.
+	(avr_device_to_arch): Rename to avr_device_to_ld.
+	(avr_device_to_as): New prototype.
+	(EXTRA_SPEC_FUNCTIONS): Add device_to_as.
+	(ASM_SPEC): Use device_to_as to get -mmcu= and -mno-skip-bug=.
+	* config/avr/driver-avr.c (avr_device_to_as): New.
+	(avr_device_to_arch): Rename to avr_device_to_ld.
+
+2013-02-27  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56461
+	* tree-vect-data-refs.c (vect_permute_load_chain): Avoid using copy
+	method on dr_chain and result_chain.
+
+	PR middle-end/56461
+	* tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Call
+	pointer_set_destroy on not_executed_last_iteration.
+
+	PR middle-end/56461
+	* tree-vect-loop.c (vectorizable_reduction): Release vect_defs vector.
+
+	PR middle-end/56461
+	* ipa-pure-const.c (propagate): Use FOR_EACH_FUNCTION instead of
+	FOR_EACH_DEFINED_FUNCTION when freeing state.
+
+	PR middle-end/56461
+	* df-scan.c (df_insn_delete): Use df_scan_free_mws_vec before
+	pool_free.
+	(df_insn_rescan_debug_internal): Use df_scan_free_mws_vec before
+	overwriting it.
+
+	PR middle-end/56461
+	* ipa-cp.c (decide_whether_version_node): Call vec_free on
+	known_aggs[i].items and release known_aggs vector.
+
+	PR middle-end/56461
+	* ipa-reference.c (propagate): Free node_info even for alias nodes.
+
+2013-02-27  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
+
+	* config/microblaze/microblaze.c (microblaze_emit_compare):
+	Use xor for EQ/NE comparisions.
+	* config/microblaze/microblaze.md (cstoresf4): Add constraints
+	(cbranchsf4): Adjust operator to comparison_operator.
+
+2013-02-27  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56461
+	* tree-flow.h (edge_var_map_vector): Change into va_heap, vl_embed
+	vector.
+	* tree-ssa.c (redirect_edge_var_map_add): Use vec_safe_reserve and
+	vec_safe_push, always update *slot.
+	(redirect_edge_var_map_clear): Use vec_free.
+	(redirect_edge_var_map_dup): Use vec_safe_copy and vec_safe_reserve.
+	(free_var_map_entry): Use vec_free.
+	* tree-cfgcleanup.c (remove_forwarder_block_with_phi): Use
+	FOR_EACH_VEC_SAFE_ELT instead of FOR_EACH_VEC_ELT.
+
+2013-02-27  Andrey Belevantsev  <abel@ispras.ru>
+
+	PR middle-end/45472
+	* sel-sched-ir.c (merge_expr): Also change vinsn of merged expr
+	when the may_trap_p bit of the exprs being merged differs.
+	Reorder tests for speculativeness in the logical and operator.
+
+2013-02-27  Jakub Jelinek  <jakub@redhat.com>
+
+	* incpath.c (add_standard_paths): Use reconcat instead of concat
+	where appropriate and avoid leaking memory.
+
+	* opts.h: Include obstack.h.
+	(opts_concat): New prototype.
+	(opts_obstack): New declaration.
+	* opts.c (opts_concat): New function.
+	(opts_obstack): New variable.
+	(init_options_struct): Call gcc_init_obstack on opts_obstack.
+	(finish_options): Use opts_concat instead of concat
+	and XOBNEWVEC instead of XNEWVEC.
+	* opts-common.c (generate_canonical_option, decode_cmdline_option,
+	generate_option): Likewise.
+	* Makefile.in (OPTS_H): Depend on $(OBSTACK_H).
+	* lto-wrapper.c (main): Call gcc_init_obstack on opts_obstack.
+
+	PR target/56455
+	* stmt.c (expand_switch_as_decision_tree_p): If flag_pic
+	and ASM_OUTPUT_ADDR_DIFF_ELT isn't defined, return true.
+
+2013-02-26  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56461
+	* lra-spills.c (lra_spill): Free spill_hard_reg at the end.
+
+2013-02-26  Joern Rennecke  <joern.rennecke@embecosm.com>
+
+	* config/arm/arm.c (const_ok_for_dimode_op): Back out last change.
+	(arm_block_move_unaligned_straight): Likewise.
+	(arm_adjust_block_mem): Likewise.
+
+2013-02-26  Joern Rennecke  <joern.rennecke@embecosm.com>
+
+	PR target/48901
+	* config/lm32/lm32.c (gen_int_relational): Remove unused variables
+	temp, cond and label.
+	* config/lm32/lm32.md (ashlsi3): Remove unused variable one.
+
+	PR target/52500
+	* config/c6x/c6x.c (dbx_register_map): Change to unsigned.
+	* config/c6x/c6x.h (dbx_register_map): Update declaration.
+
+	PR target/52501
+	* config/cr16/cr16-protos.h: Move end of RTX_CODE guard below end
+	of prologue/epilogue functions.
+
+	PR target/52550
+	* config/tilegx/tilegx.c (tilegx_expand_prologue):
+	Remove unused variable cfa_offset.
+	* config/tilepro/tilepro.c (tilepro_expand_prologue): Likewise.
+
+	PR target/54639
+	* config/mn10300/mn10300.c (mn10300_expand_epilogue): Avoid offset
+	type promotion to unsigned.
+
+	PR target/54640
+	* config/arm/arm.c (const_ok_for_dimode_op): Make code consistent
+	for HOST_WIDE_INT of 32 bit / same size as int.
+	(arm_block_move_unaligned_straight): Likewise.
+	(arm_adjust_block_mem): Likewise.
+
+	PR target/54662
+	* config/mep/t-mep (mep-pragma.o): Use ALL_COMPILERFLAGS instead of
+	ALL_CFLAGS.
+
+2013-02-26  Marek Polacek  <polacek@redhat.com>
+
+	PR tree-optimization/56426
+	* tree-ssa-loop.c (tree_ssa_loop_init): Always call
+	scev_initialize.
+
+2013-02-26  Richard Biener  <rguenther@suse.de>
+
+	PR target/56444
+	* config/mn10300/mn10300.c (mn10300_scan_for_setlb_lcc): Remove
+	unused variable loops.
+
+2013-02-26  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56448
+	* fold-const.c (operand_equal_p) <case tcc_reference>: Don't look at
+	TREE_SIDE_EFFECTS if flags contain OEP_CONSTANT_ADDRESS_OF.
+	Clear OEP_CONSTANT_ADDRESS_OF from flags before recursing on second or
+	later operands of the references, or even first operand for
+	INDIRECT_REF, TARGET_MEM_REF or MEM_REF.
+
+	PR tree-optimization/56443
+	* tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): For
+	overaligned types, pass TYPE_UNSIGNED (scalar_type) as second argument
+	to type_for_mode langhook.
+
+2013-02-25  Matt Turner  <mattst88@gmail.com>
+
+	* doc/invoke.texi: Document r4700.
+
+2013-02-25  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56175
+	* tree-ssa-forwprop.c (hoist_conversion_for_bitop_p): New predicate,
+	split out from ...
+	(simplify_bitwise_binary): ... here.  Also guard the conversion
+	of (type) X op CST to (type) (X op ((type-x) CST)) with it.
+
+2013-02-25  Catherine Moore  <clm@codesourcery.com>
+
+	Revert:
+	2013-02-24  Catherine Moore  <clm@codesourcery.com>
+	    Maciej W. Rozycki  <macro@codesourcery.com>
+	    Tom de Vries  <tom@codesourcery.com>
+	    Nathan Sidwell  <nathan@codesourcery.com>
+	    Iain Sandoe  <iain@codesourcery.com>
+	    Nathan Froyd  <froydnj@codesourcery.com>
+	    Chao-ying Fu  <fu@mips.com>
+
+	* doc/extend.texi (micromips, nomicromips, nocompression):
+	Document new function attributes.
+	* doc/invoke.texi (minterlink-compressed, mmicromips,
+	m14k, m14ke, m14kec): Document new options.
+	(minterlink-mips16): Update documentation.
+	* doc/md.texi (ZC, ZD): Document new constraints.
+	* configure.ac (gcc_cv_as_micromips): Check if linker
+	supports the .set micromips directive.
+	* configure: Regenerate.
+	* config.in: Regenerate.
+	* config/mips/mips-tables.opt: Regenerate.
+	* config/mips/micromips.md: New file.
+	* constraints.md (ZC, AD): New constraints.
+	* config/mips/predicates.md (movep_src_register): New predicate.
+	(movep_src_operand): New predicate.
+	(non_volatile_mem_operand): New predicate.
+	* config/mips/mips.md (multimem): New type.
+	(length): Differentiate between 17-bit and 18-bit branch offsets.
+	(MOVEP1, MOVEP2): New mode iterator.
+	(mov_<load>l): Use ZC constraint.
+	(mov_<load>r): Likewise.
+	(mov_<store>l): Likewise.
+	(mov_<store>r): Likewise.
+	(*branch_equality<mode>_inverted): Add microMIPS support.
+	(*branch_equality<mode>): Likewise.
+	(*jump_absolute): Likewise.
+	(indirect_jump_<mode>): Likewise.
+	(tablejump_<mode>): Likewise.
+	(<optab>_internal): Likewise.
+	(sibcall_internal): Likewise.
+	(sibcall_value_internal): Likewise.
+	(prefetch): Use constraint ZD.
+	* config/mips/mips.opt (minterlink-compressed): New option.
+	(minterlink-mips16): Now an alias for minterlink-compressed.
+	(mmicromips): New option.
+	* config/mips/sync.md (sync_compare_and_swap<mode>): Use ZR constraint.
+	(compare_and_swap_12): Likewise.
+	(sync_add<mode>): Likewise.
+	(sync_<optab>_12): Likewise.
+	(sync_old_<optab>_12): Likewise.
+	(sync_new_<optab>_12): Likewise.
+	(sync_nand_12): Likewise.
+	(sync_old_nand_12): Likewise.
+	(sync_new_nand_12): Likewise.
+	(sync_sub<mode>): Likewise.
+	(sync_old_add<mode>): Likewise.
+	(sync_old_sub<mode>): Likewise.
+	(sync_new_add<mode>): Likewise.
+	(sync_new_sub<mode>): Likewise.
+	(sync_<optab><mode>): Likewise.
+	(sync_old_<optab><mode>): Likewise.
+	(sync_new_<optab><mode>): Likewise.
+	(sync_nand<mode>): Likewise.
+	(sync_old_nand<mode>): Likewise.
+	(sync_new_nand<mode>): Likewise.
+	(sync_lock_test_and_set<mode>): Likewise.
+	(test_and_set_12): Likewise.
+	(atomic_compare_and_swap<mode>): Likewise.
+	(atomic_exchange<mode>_llsc): Likewise.
+	(atomic_fetch_add<mode>_llsc): Likewise.
+	* config/mips/mips-cpus.def (m14kc, m14k): New processors.
+	* config/mips/mips-protos.h (umips_output_save_restore): New prototype.
+	(umips_save_restore_pattern_p): Likewise.
+	(umips_load_store_pair_p): Likewise.
+	(umips_output_load_store_pair): Likewise.
+	(umips_movep_target_p): Likewise.
+	(umips_12bit_offset_address_p): Likewise.
+	* config/mips/mips.c (MIPS_MAX_FIRST_STEP): Update for microMIPS.
+	(mips_base_mips16): Rename this...
+	(mips_base_compression_flags): ...to this. Update all uses.
+	(mips_attribute_table): Add micromips, nomicromips and nocompression.
+	(mips_mips16_decl_p): Delete.
+	(mips_nomips16_decl_p): Delete.
+	(mips_get_compress_on_flags): New function.
+	(mips_get_compress_off_flags): New function.
+	(mips_get_compress_mode): New function.
+	(mips_get_compress_on_name): New function.
+	(mips_get_compress_off_name): New function.
+	(mips_insert_attributes): Support multiple compression types.
+	(mips_merge_decl_attributes): Likewise.
+	(umips_12bit_offset_address_p): New function.
+	(mips_start_function_definition): Emit .set micromips directive.
+	(mips_call_may_need_jalx_p): New function.
+	(mips_function_ok_for_sibcall): Add microMIPS support.
+	(mips_print_operand_punctuation): Support short delay slots and
+	compact jumps.
+	(umips_swm_mask, umips_swm_encoding): New.
+	(umips_build_save_restore): New function.
+	(mips_for_each_saved_gpr_and_fpr): Add microMIPS support.
+	(was_mips16_p): Remove.
+	(old_compression_mode): New.
+	(mips_set_compression_mode): New function.
+	(mips_set_current_function): Add microMIPS support.
+	(mips_option_override): Likewise.
+	(umips_save_restore_pattern_p): New function.
+	(umips_output_save_restore): New function.
+	(umips_load_store_pair_p_1): New function.
+	(umips_load_store_pair_p): New function.
+	(umips_output_load_store_pair_1): New function.
+	(umips_output_load_store_pair): New function.
+	(umips_movep_target_p) New function.
+	(mips_prepare_pch_save): Add microMIPS support.
+	* config/mips/mips.h (TARGET_COMPRESSION): New.
+	(TARGET_CPU_CPP_BUILTINS): Update macro
+	to use new compression flags and to support microMIPS.
+	(MIPS_ISA_LEVEL_SPEC): Add m14k processors.
+	(MIPS_ARCH_FLOAT_SPEC): Likewise.
+	(ISA_HAS_LWXS): Include TARGET_MICROMIPS.
+	(ISA_HAS_LOAD_DELAY): Exclude TARGET_MICROMIPS.
+	(ASM_SPEC): Support mmicromips and mno-micromips.
+	(M16STORE_REG_P): New macro.
+	(MIPS_CALL): Support TARGET_MICROMIPS.
+	(MICROMIPS_J): New macro.
+	(mips_base_mips16): Rename this...
+	(mips_base_compression_flags): ...to this.
+	(UMIPS_12BIT_OFFSET_P): New macro.
+	* config/mips/t-sde: (MULTILIB_OPTIONS): Add microMIPS.
+	(MULTILIB_DIRNAMES): Likewise.
+
+2013-02-25  Tom de Vries  <tom@codesourcery.com>
+
+	PR rtl-optimization/56131
+	* insn-notes.def (INSN_NOTE_BASIC_BLOCK): Update comment.
+	* cfgrtl.c (delete_insn): Don't reorder NOTE_INSN_DELETED_LABEL and
+	NOTE_INSN_BASIC_BLOCK if BLOCK_FOR_INSN == NULL.
+
+2013-02-25  Tobias Burnus  <burnus@net-b.de>
+
+	* doc/invoke.texi (-fsanitize=): Move from optimization
+	to debugging options.
+
+2013-02-25  Andrey Belevantsev  <abel@ispras.ru>
+
+	* sched-deps.c (sched_analyze_insn): Fix typo in comment.
+
+2013-02-25  Andrey Belevantsev  <abel@ispras.ru>
+	    Alexander Monakov  <amonakov@ispras.ru>
+
+	PR middle-end/56077
+	* sched-deps.c (sched_analyze_insn): When reg_pending_barrier,
+	flush pending lists also on non-jumps.  Adjust comment.
+
+2013-02-24  Catherine Moore  <clm@codesourcery.com>
+	    Maciej W. Rozycki  <macro@codesourcery.com>
+	    Tom de Vries  <tom@codesourcery.com>
+	    Nathan Sidwell  <nathan@codesourcery.com>
+	    Iain Sandoe  <iain@codesourcery.com>
+	    Nathan Froyd  <froydnj@codesourcery.com>
+	    Chao-ying Fu  <fu@mips.com>
+
+	* doc/extend.texi (micromips, nomicromips, nocompression):
+	Document new function attributes.
+	* doc/invoke.texi (minterlink-compressed, mmicromips,
+	m14k, m14ke, m14kec): Document new options.
+	(minterlink-mips16): Update documentation.
+	* doc/md.texi (ZC, ZD): Document new constraints.
+	* configure.ac (gcc_cv_as_micromips): Check if linker
+	supports the .set micromips directive.
+	* configure: Regenerate.
+	* config.in: Regenerate.
+	* config/mips/mips-tables.opt: Regenerate.
+	* config/mips/micromips.md: New file.
+	* constraints.md (ZC, AD): New constraints.
+	* config/mips/predicates.md (movep_src_register): New predicate.
+	(movep_src_operand): New predicate.
+	(non_volatile_mem_operand): New predicate.
+	* config/mips/mips.md (multimem): New type.
+	(length): Differentiate between 17-bit and 18-bit branch offsets.
+	(MOVEP1, MOVEP2): New mode iterator.
+	(mov_<load>l): Use ZC constraint.
+	(mov_<load>r): Likewise.
+	(mov_<store>l): Likewise.
+	(mov_<store>r): Likewise.
+	(*branch_equality<mode>_inverted): Add microMIPS support.
+	(*branch_equality<mode>): Likewise.
+	(*jump_absolute): Likewise.
+	(indirect_jump_<mode>): Likewise.
+	(tablejump_<mode>): Likewise.
+	(<optab>_internal): Likewise.
+	(sibcall_internal): Likewise.
+	(sibcall_value_internal): Likewise.
+	(prefetch): Use constraint ZD.
+	* config/mips/mips.opt (minterlink-compressed): New option.
+	(minterlink-mips16): Now an alias for minterlink-compressed.
+	(mmicromips): New option.
+	* config/mips/sync.md (sync_compare_and_swap<mode>): Use ZR constraint.
+	(compare_and_swap_12): Likewise.
+	(sync_add<mode>): Likewise.
+	(sync_<optab>_12): Likewise.
+	(sync_old_<optab>_12): Likewise.
+	(sync_new_<optab>_12): Likewise.
+	(sync_nand_12): Likewise.
+	(sync_old_nand_12): Likewise.
+	(sync_new_nand_12): Likewise.
+	(sync_sub<mode>): Likewise.
+	(sync_old_add<mode>): Likewise.
+	(sync_old_sub<mode>): Likewise.
+	(sync_new_add<mode>): Likewise.
+	(sync_new_sub<mode>): Likewise.
+	(sync_<optab><mode>): Likewise.
+	(sync_old_<optab><mode>): Likewise.
+	(sync_new_<optab><mode>): Likewise.
+	(sync_nand<mode>): Likewise.
+	(sync_old_nand<mode>): Likewise.
+	(sync_new_nand<mode>): Likewise.
+	(sync_lock_test_and_set<mode>): Likewise.
+	(test_and_set_12): Likewise.
+	(atomic_compare_and_swap<mode>): Likewise.
+	(atomic_exchange<mode>_llsc): Likewise.
+	(atomic_fetch_add<mode>_llsc): Likewise.
+	* config/mips/mips-cpus.def (m14kc, m14k): New processors.
+	* config/mips/mips-protos.h (umips_output_save_restore): New prototype.
+	(umips_save_restore_pattern_p): Likewise.
+	(umips_load_store_pair_p): Likewise.
+	(umips_output_load_store_pair): Likewise.
+	(umips_movep_target_p): Likewise.
+	(umips_12bit_offset_address_p): Likewise.
+	* config/mips/mips.c (MIPS_MAX_FIRST_STEP): Update for microMIPS.
+	(mips_base_mips16): Rename this...
+	(mips_base_compression_flags): ...to this. Update all uses.
+	(mips_attribute_table): Add micromips, nomicromips and nocompression.
+	(mips_mips16_decl_p): Delete.
+	(mips_nomips16_decl_p): Delete.
+	(mips_get_compress_on_flags): New function.
+	(mips_get_compress_off_flags): New function.
+	(mips_get_compress_mode): New function.
+	(mips_get_compress_on_name): New function.
+	(mips_get_compress_off_name): New function.
+	(mips_insert_attributes): Support multiple compression types.
+	(mips_merge_decl_attributes): Likewise.
+	(umips_12bit_offset_address_p): New function.
+	(mips_start_function_definition): Emit .set micromips directive.
+	(mips_call_may_need_jalx_p): New function.
+	(mips_function_ok_for_sibcall): Add microMIPS support.
+	(mips_print_operand_punctuation): Support short delay slots and
+	compact jumps.
+	(umips_swm_mask, umips_swm_encoding): New.
+	(umips_build_save_restore): New function.
+	(mips_for_each_saved_gpr_and_fpr): Add microMIPS support.
+	(was_mips16_p): Remove.
+	(old_compression_mode): New.
+	(mips_set_compression_mode): New function.
+	(mips_set_current_function): Add microMIPS support.
+	(mips_option_override): Likewise.
+	(umips_save_restore_pattern_p): New function.
+	(umips_output_save_restore): New function.
+	(umips_load_store_pair_p_1): New function.
+	(umips_load_store_pair_p): New function.
+	(umips_output_load_store_pair_1): New function.
+	(umips_output_load_store_pair): New function.
+	(umips_movep_target_p) New function.
+	(mips_prepare_pch_save): Add microMIPS support.
+	* config/mips/mips.h (TARGET_COMPRESSION): New.
+	(TARGET_CPU_CPP_BUILTINS): Update macro
+	to use new compression flags and to support microMIPS.
+	(MIPS_ISA_LEVEL_SPEC): Add m14k processors.
+	(MIPS_ARCH_FLOAT_SPEC): Likewise.
+	(ISA_HAS_LWXS): Include TARGET_MICROMIPS.
+	(ISA_HAS_LOAD_DELAY): Exclude TARGET_MICROMIPS.
+	(ASM_SPEC): Support mmicromips and mno-micromips.
+	(M16STORE_REG_P): New macro.
+	(MIPS_CALL): Support TARGET_MICROMIPS.
+	(MICROMIPS_J): New macro.
+	(mips_base_mips16): Rename this...
+	(mips_base_compression_flags): ...to this.
+	(UMIPS_12BIT_OFFSET_P): New macro.
+	* config/mips/t-sde: (MULTILIB_OPTIONS): Add microMIPS.
+	(MULTILIB_DIRNAMES): Likewise.
+
+2013-02-24  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/52555
+	* target-globals.c (save_target_globals): For init_reg_sets and
+	target_reinit remporarily set this_fn_optabs to this_target_optabs.
+
+2013-02-22  James Grennahlgh  <james.greenhalgh@arm.com>
+
+	* config/aarch64/aarch64-simd-builtins.def: Add copyright header.
+	* config/aarch64/t-aarch64
+	(aarch64-builtins.o): Depend on aarch64-simd-builtins.def.
+
+2013-02-22  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR inline-asm/56148
+	* lra-constraints.c (process_alt_operands): Reload operand
+	conflicting with earlier clobber only if no more other conflicting
+	operands.
+
+2013-02-22  Jakub Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/56393
+	* config/gnu-user.h (LIBASAN_EARLY_SPEC): Link in libasan_preinit.o
+	if not linking a shared library.
+
+2013-02-22  Seth LaForge  <sethml@google.com>
+
+	* config.gcc (arm*-*-eabi*): Treat arm*eb as big-endian.
+
+2013-02-22  Greta Yorsh  <Greta.Yorsh@arm.com>
+
+	* config/arm/arm.md (split for extendsidi): Update condition.
+	(zero_extend<mode>di2,extend<mode>di2): Add an alternative.
+	* config/arm/iterators.md (qhs_extenddi_cstr): Likewise.
+	(qhs_zextenddi_cstr): Likewise.
+
+2013-02-21  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56420
+	* expmed.c (EXACT_POWER_OF_2_OR_ZERO_P): Do subtraction in uhwi, to
+	avoid signed wrapping.
+	(expand_mult): Handle properly multiplication by
+	((dword_type) -1) << (BITS_PER_WORD - 1).  Improve multiplication by
+	((dword_type) 1) << (BITS_PER_WORD - 1).  Avoid undefined behavior
+	in the compiler if coeff is HOST_WIDE_INT_MIN.
+	(expand_divmod): Don't make ext_op1 static, change it's type to uhwi.
+	Avoid undefined behavior in -INTVAL (op1).
+
+	PR rtl-optimization/50339
+	* lower-subreg.h (struct lower_subreg_choices): Add splitting_ashiftrt
+	field.
+	* lower-subreg.c (compute_splitting_shift): Handle ASHIFTRT.
+	(compute_costs): Call compute_splitting_shift also for ASHIFTRT
+	into splitting_ashiftrt field.
+	(find_decomposable_shift_zext, resolve_shift_zext): Handle also
+	ASHIFTRT.
+	(dump_choices): Fix up printing LSHIFTRT choices, print ASHIFTRT
+	choices.
+
+2013-02-20  Aldy Hernandez  <aldyh@redhat.com>
+
+	PR middle-end/56108
+	* trans-mem.c (execute_tm_mark): Do not expand transactions that
+	are sure to go irrevocable.
+
+2013-02-21  Hans-Peter Nilsson  <hp@axis.com>
+
+	* doc/rtl.texi (vec_concat, vec_duplicate): Mention that
+	scalars are valid operands.
+
+2013-02-21  Martin Jambor  <mjambor@suse.cz>
+
+	PR tree-optimization/56310
+	* ipa-cp.c (agg_replacements_to_vector): New parameter index, copy
+	only matching indices and non-negative final offsets.
+	(intersect_aggregates_with_edge): Pass src_idx to
+	agg_replacements_to_vector.  Pass src_idx insstead of index to
+	intersect_with_agg_replacements.
+
+2013-02-21  Martin Jambor  <mjambor@suse.cz>
+
+	* ipa-cp.c (good_cloning_opportunity_p): Dump the real threshold
+	instead of hard-wired defaults.
+
+2013-02-21  Maciej W. Rozycki  <macro@codesourcery.com>
+
+	* doc/invoke.texi (MIPS Options): Update documentation of the
+	floating-point multiply-accumulate instruction restrictions.
+
+2013-02-21  Kostya Serebryany  <kcc@google.com>
+
+	* config/i386/i386.c (ix86_asan_shadow_offset): Use 0x7fff8000 as
+	asan_shadow_offset on x86_64 linux.
+
+2013-02-21  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56415
+	Revert
+	2013-02-11  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56273
+	* tree-vrp.c (simplify_cond_using_ranges): Disable for the
+	first VRP run.
+
+2013-02-21  Jakub Jelinek  <jakub@redhat.com>
+
+	PR bootstrap/56258
+	* doc/invoke.texi (-fdump-rtl-pro_and_epilogue): Use @item
+	instead of @itemx.
+
+	PR inline-asm/56405
+	* expr.c (expand_expr_real_1) <case TARGET_MEM_REF, MEM_REF>: Don't
+	use movmisalign or extract_bit_field for EXPAND_MEMORY modifier.
+
+2013-02-20  Jan Hubicka  <jh@suse.cz>
+
+	PR tree-optimization/56265
+	* ipa-prop.c (ipa_make_edge_direct_to_target): Fixup callgraph when
+	target is referenced for first time.
+
+2013-02-20  Richard Biener  <rguenther@suse.de>
+
+	* tree-call-cdce.c (tree_call_cdce): Do not remove unused locals.
+	* tree-ssa-forwprop.c (ssa_forward_propagate_and_combine): Likewise.
+	* tree-ssa-dce.c (perform_tree_ssa_dce): Likewise.
+	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Do
+	not return anything.
+	(rename_ssa_copies): Do not remove unused locals.
+	* tree-ssa-ccp.c (do_ssa_ccp): Likewise.
+	* tree-ssanames.c (pass_release_ssa_names): Remove unused locals first.
+	* passes.c (execute_function_todo): Do not schedule unused locals
+	removal if cleanup_tree_cfg did something.
+	* tree-ssa-live.c (remove_unused_locals): Dump statistics
+	about the number of removed locals.
+
+2013-02-20  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56398
+	* tree-vect-loop-manip.c (adjust_debug_stmts): Skip
+	SSA default defs.
+
+2013-02-20  Martin Jambor  <mjambor@suse.cz>
+
+	PR tree-optimization/55334
+	* ipa-cp.c (initialize_node_lattices): Disable IPA-CP through and to
+	restricted pointers to arrays.
+
+2013-02-20  Richard Biener  <rguenther@suse.de>
+	Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56396
+	* tree-ssa-ccp.c (n_const_val): New static variable.
+	(get_value): Return NULL for SSA names we don't have a lattice
+	entry for.
+	(ccp_initialize): Initialize n_const_val.
+	* tree-ssa-copy.c (n_copy_of): New static variable.
+	(init_copy_prop): Initialize n_copy_of.
+	(get_value): Return NULL_TREE for SSA names we don't have a
+	lattice entry for.
+
+2013-02-20  Martin Jambor  <mjambor@suse.cz>
+
+	* ipa-cp.c (initialize_node_lattices): Fix dumping condition.
+
+2013-02-20  Richard Biener  <rguenther@suse.de>
+
+	* genpreds.c (write_lookup_constraint): Do not compare first
+	letter of the constraint again.
+
+2013-02-20  Richard Biener  <rguenther@suse.de>
+
+	* tree-ssa-loop-ivopts.c (alloc_use_cost_map): Use bitmap_count_bits
+	and ceil_log2.
+	(get_use_iv_cost): Terminate hashtable walk when coming across
+	an empty entry.
+
+2013-02-20  Igor Zamyatin  <igor.zamyatin@intel.com>
+
+	* config/i386/i386.c (initial_ix86_tune_features): Turn on fp
+	reassociation for avx2 targets.
+
+2012-02-19  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
+
+	* config/microblaze/microblaze.c: microblaze_has_clz = 0
+	Add version check for v8.10.a to enable microblaze_has_clz
+	* config/microblaze/microblaze.h: Add TARGET_HAS_CLZ as combined
+	version and TARGET_PATTERN_COMPARE check
+	* config/microblaze/microblaze.md: New clzsi2 instruction
+
+2012-02-19  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
+
+	* config/microblaze/microblaze.md (call_value_intern): Check symbol is
+	function before branching.
+
+2012-02-19  Andrey Belevantsev  <abel@ispras.ru>
+
+	* sel-sched-dump.c (dump_insn_rtx_flags): Explicitly set
+	DUMP_INSN_RTX_UID.
+	(dump_insn_rtx_1): Pass PATTERN (insn) to str_pattern_slim.
+
+2012-02-19  Andrey Belevantsev  <abel@ispras.ru>
+
+	PR middle-end/55889
+	* sel-sched.c: Include ira.h.
+	(implicit_clobber_conflict_p): New function.
+	(moveup_expr): Use it.
+	* Makefile.in (sel-sched.o): Depend on ira.h.
+
+2013-02-19  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56384
+	* tree-ssa-sccvn.h (struct vn_phi_s): Add type member.
+	(vn_hash_type): Split out from ...
+	(vn_hash_constant_with_type): ... here.
+	* tree-ssa-sccvn.c (vn_phi_compute_hash): Use vn_hash_type.
+	(vn_phi_eq): Compare types from vn_phi_s structure.
+	(vn_phi_lookup): Populate vn_phi_s type.
+	(vn_phi_insert): Likewise.
+
+2013-02-19  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56350
+	* tree-vect-loop.c (vectorizable_reduction): If orig_stmt, return false
+	if haven't found reduction or nested cycle operand, rather than
+	asserting we must find it.
+
+	PR tree-optimization/56381
+	* tree-ssa-pre.c (create_expression_by_pieces): Fix up last argument
+	to fold_build3.
+
+2013-02-18  Aldy Hernandez  <aldyh@redhat.com>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/52555
+	* genopinit.c (raw_optab_handler): Use this_fn_optabs.
+	(swap_optab_enable): Same.
+	(init_all_optabs): Use argument instead of global.
+	* tree.h (struct tree_optimization_option): New field target_optabs.
+	* expr.h (init_all_optabs): Add argument to prototype.
+	(TREE_OPTIMIZATION_OPTABS): New.
+	(save_optabs_if_changed): Protoize.
+	* optabs.h: Declare this_fn_optabs.
+	* optabs.c (save_optabs_if_changed): New.
+	Declare this_fn_optabs.
+	(init_optabs): Add argument to init_all_optabs() call.
+	* function.c (invoke_set_current_function_hook): Handle per
+	function optabs.
+	* function.h (struct function): New field optabs.
+	* config/mips/mips.c (mips_set_mips16_mode): Handle when
+	optimization_current_node has changed.
+	* target-globals.h (save_target_globals_default_opts): Protoize.
+	* target-globals.c (save_target_globals_default_opts): New.
+
+2013-02-18  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	PR target/56347
+	* config/pa/pa.c (pa_conditional_register_usage): On HP-UX, mark
+	registers %fr12 and %fr12R as call used.
+
+	PR target/56214
+	* config/pa/predicates.md (base14_operand): Except for BLKmode, QImode
+	and HImode, require all displacements to be an integer multiple of
+	their mode size.
+	* config/pa/pa.c (pa_legitimate_address_p): For REG+BASE addresses,
+	only allow QImode and HImode when reload is in progress and strict is
+	true.  Likewise for symbolic addresses.  Use base14_operand to check
+	displacements in REG+BASE addresses.
+
+2013-02-18  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56366
+	* tree-vect-loop.c (get_initial_def_for_induction): Properly
+	handle sign-conversion of outer-loop initial induction value.
+
+2013-02-18  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/56349
+	* cfghooks.c (merge_blocks): If we merge a latch into another
+	block adjust references to it.
+	* cfgloop.c (flow_loops_find): Reset latch before recomputing it.
+	(verify_loop_structure): Verify that a recorded latch is in fact
+	a latch.
+
+2013-02-18  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56321
+	* tree-ssa-reassoc.c (propagate_op_to_single_use): Properly
+	order SSA name release and virtual operand unlinking.
+
+2013-02-17  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
+
+	* config/microblaze/microblaze.md (save_stack_block): Define.
+	(restore_stack_block): Likewise.
+
+2013-02-16  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
+
+	* config/microblaze/linux.h (TARGET_SUPPORTS_PIC): Define as 1.
+	* config/microblaze/microblaze.h (TARGET_SUPPORTS_PIC): Define as 1.
+	* config/microblaze/microblaze.c (microblaze_option_override):
+	Bail out early for PIC modes when target does not support PIC.
+
+2013-02-16  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
+
+	* config/microblaze/microblaze.c (microblaze_asm_trampoline_template):
+	Replace with a microblaze version.
+	(microblaze_trampoline_init): Adapt for microblaze.
+	* config/microblaze/microblaze.h (TRAMPOLINE_SIZE): Adapt for
+	microblaze.
+
+2013-02-16  Jakub Jelinek  <jakub@redhat.com>
+	    Dodji Seketeli  <dodji@redhat.com>
+
+	PR asan/56330
+	* asan.c (get_mem_refs_of_builtin_call): White space and style
+	cleanup.
+	(instrument_mem_region_access): Do not forget to always put
+	instrumentation of the of 'base' and 'base + len' in a "if (len !=
+	0) statement, even for cases where either 'base' or 'base + len'
+	are not instrumented -- because they have been previously
+	instrumented.  Simplify the logic by putting all the statements
+	instrument 'base + len' inside a sequence, and then insert that
+	sequence right before the current insertion point.  Then, to
+	instrument 'base + len', just get an iterator on that statement.
+	And do not forget to update the pointer to iterator the function
+	received as argument.
+
+2013-02-15  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/56348
+	* lra-assigns.c (reload_pseudo_compare_func): Prefer bigger pseudos.
+
+2013-02-15  Steven Bosscher  <steven@gcc.gnu.org>
+
+	* graph.c (start_graph_dump): Print dumpfile base as digraph label.
+	(clean_graph_dump_file): Pass base to start_graph_dump.
+
+2013-02-14  Richard Henderson  <rth@redhat.com>
+
+	PR target/55941
+	* lower-subreg.c (simple_move): Check dest mode instead of src mode.
+
+2013-02-14  Steven Bosscher  <steven@gcc.gnu.org>
+
+	* collect2-aix.h: Define F_LOADONLY.
+
+2013-02-14  Richard Biener  <rguenther@suse.de>
+
+	PR lto/50494
+	* varasm.c (output_constant_def_1): Get the decl representing
+	the constant as argument.
+	(output_constant_def): Wrap output_constant_def_1.
+	(make_decl_rtl): Use output_constant_def_1 with the decl
+	representing the constant.
+	(build_constant_desc): Optionally re-use a decl already
+	representing the constant.
+	(tree_output_constant_def): Adjust.
+
+2013-02-14  Dodji Seketeli  <dodji@redhat.com>
+
+	Fix an asan crash
+	* asan.c (instrument_builtin_call):  Really put the length of the
+	second source argument into src1_len.
+
+2013-02-13  Jakub Jelinek  <jakub@redhat.com>
+
+	* asan.c (create_cond_insert_point): Add create_then_fallthru_edge
+	argument.  If it is false, don't create edge from then_bb to
+	fallthru_bb.
+	(insert_if_then_before_iter): Pass true to it.
+	(build_check_stmt): Pass false to it.
+	(transform_statements): Flush hash table only on extended basic
+	block boundaries, rather than at the beginning of every bb.
+	Don't flush hash table on nonfreeing_call_p calls.
+	* tree-flow.h (nonfreeing_call_p): New prototype.
+	* tree-ssa-phiopt.c (nonfreeing_call_p): No longer static.
+
+2013-02-13  David S. Miller  <davem@davemloft.net>
+
+	* expmed.c (expand_shift_1): Only strip scalar integer subregs.
+
+2013-02-13  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR target/56184
+	* ira.c (max_regno_before_ira): Move from ...
+	(ira): ... here.
+	(fix_reg_equiv_init): Use max_regno_before_ira instead of
+	vec_safe_length.
+
+2013-02-13  Jakub Jelinek  <jakub@redhat.com>
+
+	* config/i386/i386.c (ix86_asan_shadow_offset): Revert last change.
+
+2013-02-13  Richard Biener  <rguenther@suse.de>
+
+	PR lto/56295
+	* gimple-streamer-out.c (output_gimple_stmt): Undo wrapping
+	globals in MEM_REFs.
+
+2013-02-13  Richard Biener  <rguenther@suse.de>
+
+	* loop-init.c (loop_optimizer_init): Clear loop state when
+	re-initializing preserved loops.
+	* loop-unswitch.c (unswitch_single_loop): Return whether
+	we unswitched the loop.  Do not verify loop state here.
+	(unswitch_loops): When we unswitched a loop discover new
+	loops.
+
+2013-02-13  Kostya Serebryany  <kcc@google.com>
+
+	* config/i386/i386.c: Use 0x7fff8000 as asan_shadow_offset on x86_64
+	linux.
+	* sanitizer.def: Rename __asan_init to __asan_init_v1.
+
+2013-02-12  Dodji Seketeli  <dodji@redhat.com>
+
+	Avoid instrumenting duplicated memory access in the same basic block
+	* Makefile.in (asan.o): Add new dependency on hash-table.h
+	* asan.c (struct asan_mem_ref, struct mem_ref_hasher): New types.
+	(asan_mem_ref_init, asan_mem_ref_get_end, get_mem_ref_hash_table)
+	(has_stmt_been_instrumented_p, empty_mem_ref_hash_table)
+	(free_mem_ref_resources, has_mem_ref_been_instrumented)
+	(has_stmt_been_instrumented_p, update_mem_ref_hash_table)
+	(get_mem_ref_of_assignment): New functions.
+	(get_mem_refs_of_builtin_call): Extract from
+	instrument_builtin_call and tweak a little bit to make it fit with
+	the new signature.
+	(instrument_builtin_call): Use the new
+	get_mem_refs_of_builtin_call.  Use gimple_call_builtin_p instead
+	of is_gimple_builtin_call.
+	(instrument_derefs, instrument_mem_region_access): Insert the
+	instrumented memory reference into the hash table.
+	(maybe_instrument_assignment): Renamed instrument_assignment into
+	this, and change it to advance the iterator when instrumentation
+	actually happened and return true in that case.  This makes it
+	homogeneous with maybe_instrument_assignment, and thus give a
+	chance to callers to be more 'regular'.
+	(transform_statements): Clear the memory reference hash table
+	whenever we enter a new BB, when we cross a function call, or when
+	we are done transforming statements.  Use
+	maybe_instrument_assignment instead of instrumentation.  No more
+	need to special case maybe_instrument_assignment and advance the
+	iterator after calling it; it's now handled just like
+	maybe_instrument_call.  Update comment.
+
+2013-02-13  Richard Biener  <rguenther@suse.de>
+
+	* config/mn10300/mn10300.c (mn10300_scan_for_setlb_lcc):
+	Fix loop discovery code.
+
+2013-02-12  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR inline-asm/56148
+	* lra-constraints.c (process_alt_operands): Match early clobber
+	operand with itself.  Check conflicts with earlyclobber only if
+	the operand is not reloaded.  Prefer to reload conflicting operand
+	if earlyclobber and matching operands are the same.
+
+2013-02-12  Richard Biener  <rguenther@suse.de>
+
+	PR lto/56297
+	* lto-streamer-out.c (write_symbol): Do not output symbols
+	for hard register variables.
+
+2013-02-12  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR target/54222
+	* config/avr/avr-dimode.md (umulsidi3, mulsidi3): New expanders.
+	(umulsidi3_insn, mulsidi3_insn): New insns.
+
+2013-02-12  Christophe Lyon  <christophe.lyon@linaro.org>
+
+	* config/arm/arm-protos.h (struct cpu_vec_costs): New struct type.
+	(struct tune_params): Add vec_costs field.
+	* config/arm/arm.c (arm_builtin_vectorization_cost)
+	(arm_add_stmt_cost): New functions.
+	(TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST)
+	(TARGET_VECTORIZE_ADD_STMT_COST): Define.
+	(arm_default_vec_cost): New struct of type cpu_vec_costs.
+	(arm_slowmul_tune, arm_fastmul_tune, arm_strongarm_tune)
+	(arm_xscale_tune, arm_9e_tune, arm_v6t2_tune, arm_cortex_tune)
+	(arm_cortex_a15_tune, arm_cortex_a5_tune, arm_cortex_a9_tune)
+	(arm_v6m_tune, arm_fa726te_tune): Define new vec_costs field.
+
+2013-02-12  Richard Biener  <rguenther@suse.de>
+
+	PR lto/56295
+	* gimple-streamer-in.c (input_gimple_stmt): Strip MEM_REFs off
+	decls again if possible.
+
+2013-02-12  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/56288
+	* tree-ssa.c (verify_ssa_name): Fix check, move
+	SSA_NAME_IN_FREE_LIST check up.
+
+2013-02-12  Jakub Jelinek  <jakub@redhat.com>
+	    Steven Bosscher   <steven@gcc.gnu.org>
+
+	PR rtl-optimization/56151
+	* optabs.c (add_equal_note): Don't return 0 if target is a MEM,
+	equal to op0 or op1, and last_insn pattern is CODE operation
+	with MEM dest and one of the operands matches that MEM.
+
+2013-02-11  Sriraman Tallam  <tmsriramgoogle.com>
+
+	* doc/extend.texi: Document Function Multiversioning and "default"
+	parameter string to target attribute.
+	* config/i386/i386.c (get_builtin_code_for_version): Return 0 if
+	target attribute parameter is "default".
+	(ix86_compare_version_priority): Remove checks for target attribute.
+	(ix86_mangle_function_version_assembler_name): Change error to sorry.
+	Remove check for target attribute equal to NULL. Add assert.
+	(ix86_generate_version_dispatcher_body): Change error to sorry.
+
+2013-02-11  Iain Sandoe  <iain@codesourcery.com>
+	    Jack Howarth  <howarth@bromo.med.uc.edu>
+	    Patrick Marlier  <patrick.marlier@gmail.com>
+
+	PR libitm/55693
+	* config/darwin.h: Replace ENDFILE_SPEC with TM_DESTRUCTOR and
+	define ENDFILE_SPEC as TM_DESTRUCTOR.
+	* config/i386/darwin.h (ENDFILE_SPEC): Use TM_DESTRUCTOR.
+
+2013-02-11  Alexander Potapenko  <glider@google.com>
+	    Jack Howarth  <howarth@bromo.med.uc.edu>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/55617
+	* config/darwin.c (cdtor_record): Rename ctor_record.
+	(sort_cdtor_records): Rename sort_ctor_records.
+	(finalize_dtors): New routine to sort destructors by
+	priority before use in assemble_integer.
+	(machopic_asm_out_destructor): Use finalize_dtors if needed.
+
+2013-02-11  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR rtl-optimization/56275
+	* simplify-rtx.c (avoid_constant_pool_reference): Check that
+	offset is non-negative and less than cmode size before
+	calling simplify_subreg.
+
+2013-02-11  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56264
+	* cfgloop.h (fix_loop_structure): Adjust prototype.
+	* loop-init.c (fix_loop_structure): Return the number of
+	newly discovered loops.
+	* tree-cfgcleanup.c (repair_loop_structures): When new loops
+	are discovered, do a full loop-closed SSA rewrite.
+
+2013-02-11  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56273
+	* tree-vrp.c (simplify_cond_using_ranges): Disable for the
+	first VRP run.
+	(check_array_ref): Fix missing newline in dumps.
+	(search_for_addr_array): Likewise.
+
+2013-02-09  David Edelsohn  <dje.gcc@gmail.com>
+
+	* config/rs6000/aix61.h (OS_MISSING_ALTIVEC): Undefine.
+
+2013-02-09  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/56256
+	* config/rs6000/rs6000.h (ASSEMBLER_DIALECT): Define.
+
+2013-02-08  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/56246
+	* lra-constraints.c (simplify_operand_subreg): Try to reuse
+	reload pseudo.
+	* lra.c (lra): Clear lra_optional_reload_pseudos only when all
+	constraints are satisfied.
+
+2013-02-08  Jeff Law  <law@redhat.com>
+
+	PR debug/53948
+	* emit-rtl.c (reg_is_parm_p): New function.
+	* regs.h (reg_is_parm_p): New prototype.
+	* ira-conflicts.c (ira_build_conflicts): Allow parameters in
+	callee-clobbered registers.
+
+2013-02-08  Michael Meissner  <meissner@linux.vnet.ibm.com>
+
+	PR target/56043
+	* config/rs6000/rs6000.c (rs6000_builtin_vectorized_libmass):
+	If there is no implicit builtin declaration, just return NULL.
+
+2013-02-08  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/sse.md (FMAMODEM): New mode iterator.
+	(fma<mode>4, fms<mode>4, fnma<mode>4, fnms<mode>4): Use FMAMODEM
+	mode iterator. Do not use TARGET_SSE_MATH in insn constraint.
+
+2013-02-08  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/gnu-user.h (TARGET_CAN_SPLIT_STACK): Define only
+	when HAVE_GAS_CFI_PERSONALITY_DIRECTIVE is set.
+	* config/i386/gnu-user64.h (TARGET_CAN_SPLIT_STACK): Ditto.
+
+2013-02-08  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
+
+	* config.gcc (microblaze*-linux*): Add TARGET_BIG_ENDIAN_DEFAULT.
+	(microblaze*-*-elf): Likewise.
+	* config/microblaze/linux.h: Add -mbig-endian / -mlittle-endian to
+	LINK_SPEC.
+	* config/microblaze/microblaze-c.c: Add builtin defines for
+	_LITTLE_ENDIAN and _BIG_ENDIAN.
+	* config/microblaze/microblaze.h: Add TARGET_ENDIAN_DEFAULT and
+	add to TARGET_DEFAULT flags.
+	Expand ASM_SPEC and LINK_SPEC.
+	Update BYTES_BIG_ENDIAN and WORDS_BIG_ENDIAN.
+	* config/microblaze/microblaze.md: Update extendsidi2 and
+	movdi_internal instructions to use low-order / high-order reg
+	print_operands.
+	* config/microblaze/microblaze.opt: Add mbig-endian and mlittle-endian
+	options and inversemask / mask of LITTLE_ENDIAN.
+	* config/microblaze/t-microblaze: Expand multilib options to
+	include mlittle-endian (le) and update exceptions patterns.
+
+2013-02-08  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/56195
+	* lra-constraints.c (get_reload_reg): Don't reuse regs
+	if they have smaller mode than requested, if they have
+	wider mode than requested, try to return a SUBREG.
+
+	PR tree-optimization/56250
+	* fold-const.c (extract_muldiv_1) <case NEGATE_EXPR>: Don't optimize
+	if type is unsigned and code isn't MULT_EXPR.
+
+2013-02-08  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR tree-optimization/56064
+	* fixed-value.c (fixed_from_double_int): Sign/zero extend payload
+	bits according to mode.
+	* fixed-value.h (fixed_from_double_int)
+	(const_fixed_from_double_int): Adjust comments.
+
+2013-02-08  Richard Biener  <rguenther@suse.de>
+
+	PR lto/56231
+	* lto-streamer.h (struct data_in): Remove current_file, current_line
+	and current_col members.
+	* lto-streamer-out.c (lto_output_location): Stream changed bits
+	en-block for efficiency.
+	* lto-streamer-in.c (clear_line_info): Remove.
+	(lto_input_location): Cache current file, line and column
+	globally via local statics.  Read changed bits en-block.
+	(input_function): Do not call clear_line_info.
+	(lto_read_body): Likewise.
+	(lto_input_toplevel_asms): Likewise.
+
+2013-02-08  Michael Matz  <matz@suse.de>
+
+	PR tree-optimization/52448
+	* tree-ssa-phiopt.c (struct name_to_bb): Add phase member.
+	(nt_call_phase): New static.
+	(add_or_mark_expr): Only mark accesses with newer phase than any
+	call seen.
+	(nonfreeing_call_p): New.
+	(nt_init_block): Update nt_call_phase, mark blocks as visited.
+	(nt_fini_block): Keep blocks marked as visited.
+	(get_non_trapping): Initialize nt_call_phase, and reset aux pointer.
+
+2013-02-08  Richard Biener  <rguenther@suse.de>
+
+	* ira.c (ira): Free broken dominator information.
+
+2013-02-08  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/i386.c (ix86_spill_class): Use INTEGER_CLASS_P macro.
+
+2013-02-08  Marek Polacek  <polacek@redhat.com>
+
+	* cfgloop.c (verify_loop_structure): Add more checking of headers.
+
+2013-02-08  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/56181
+	* cfgloop.h (flow_loops_find): Adjust.
+	(bb_loop_header_p): Declare.
+	* cfgloop.c (bb_loop_header_p): New function split out from ...
+	(flow_loops_find): ... here.  Adjust function signature,
+	support incremental loop structure update.
+	(verify_loop_structure): Cleanup.  Verify a loop is a loop.
+	* cfgloopmanip.c (fix_loop_structure): Move ...
+	* loop-init.c (fix_loop_structure): ... here.
+	(apply_loop_flags): Split out from ...
+	(loop_optimizer_init): ... here.
+	(fix_loop_structure): Use apply_loop_flags.  Use flow_loops_find
+	in incremental mode, only remove dead loops here.
+
+2013-02-08  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR target/54222
+	* config/avr/avr.md (unspec) <UNSPEC_ROUND>: Add.
+	* config/avr/avr-fixed.md (ALL4QA, ALL124QA): New mode iterators.
+	(round<mode>3, round<mode>3_const): New expanders for fixed-mode.
+	(*round<mode>3.libgcc): New insns for fixed-modes.
+	* config/avr/builtins.def (ABSxx): Use a non-NULL LIBNAME.
+	(ROUNDxx, COUNTLSxx, BITSxx, xxBITS): New DEF_BUILTINs.
+	(ROUNDFX, COUNTLSFX, ABSFX): New DEF_BUILTINs.
+	* config/avr/stdfix.h (absFX, bitsFX, FXbits): Remove inline
+	implementations.  Define to __builtin_avr_absFX,
+	__builtin_avr_bitsFX, __builtin_avr_FXbits, respectively.
+	(roundFX, countlsFX): Define to __builtin_avr_roundFX,
+	__builtin_avr_countlsFX, respectively.
+	* config/avr/avr-c.c (target.h): Include it.
+	(enum avr_builtin_id): New enum.
+	(avr_resolve_overloaded_builtin): New static function.
+	(avr_register_target_pragmas): Use it to set
+	targetm.resolve_overloaded_builtin.
+	* config/avr/avr.c (avr_init_builtins): Supply myriads of local
+	tree nodes used by DEF_BUILTIN.
+	(avr_expand_builtin) <AVR_BUILTIN_ROUNDxx>: Sanity-check them.
+	(avr_fold_builtin) <AVR_BUILTIN_BITSxx>: Fold to VIEW_COVERT_EXPR.
+	<AVR_BUILTIN_xxBITS>: Same.
+
+2013-02-08  Richard Biener  <rguenther@suse.de>
+
+	* cfgloop.c (verify_loop_structure): Properly handle
+	a loop exiting to another loop header.
+	* ira-int.h (ira_loops): Remove.
+	* ira.c (ira_loops): Remove.
+	(ira): Use loop_optimizer_init and loop_optimizer_finalize.
+	(do_reload): Use loop_optimizer_finalize.
+	* ira-build.c (create_loop_tree_nodes): Use get_loops and
+	number_of_loops to access the loop tree.
+	(more_one_region_p): Likewise.
+	(finish_loop_tree_nodes): Likewise.
+	(rebuild_regno_allocno_maps): Likewise.
+	(mark_loops_for_removal): Likewise.
+	(mark_all_loops_for_removal): Likewise.
+	(remove_unnecessary_regions): Likewise.
+	(ira_build): Likewise.
+	* ira-emit.c (setup_entered_from_non_parent_p): Likewise.
+
+2013-02-08  Richard Biener  <rguenther@suse.de>
+
+	* Makefile.in (tree-tailcall.o): Add $(CFGLOOP_H) dependency.
+	* ipa-pure-const.c (analyze_function): Avoid calling
+	mark_irreducible_loops twice.
+	* tree-tailcall.c (tree_optimize_tail_calls_1): Mark loops for fixup.
+
+2013-02-07  David S. Miller  <davem@davemloft.net>
+
+	* dwarf2out.c (based_loc_descr): Perform leaf register remapping
+	on 'reg'.
+	* var-tracking.c (vt_add_function_parameter): Test the presence of
+	HAVE_window_save properly and do not remap argument registers when
+	we have a leaf function.
+
+2013-02-07  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR bootstrap/56227
+	* ggc-page.c (ggc_print_statistics): Use HOST_LONG_LONG_FORMAT
+	instead of "ll".
+	* config/i386/i386.c (ix86_print_operand): Ditto.
+
+2013-02-07  Vladimir Makarov  <vmakarov@redhat.com>
+
+	* lra-constraints.c (process_alt_operands): Fix recently added comment.
+
+2013-02-07  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/56225
+	* lra-constraints.c (process_alt_operands): Check that reload hard
+	reg can hold value for strict_low_part.
+
+2013-02-07  Jakub Jelinek  <jakub@redhat.com>
+
+	PR debug/56154
+	* dwarf2out.c (dwarf2_debug_hooks): Set end_function hook to
+	dwarf2out_end_function.
+	(in_first_function_p, maybe_at_text_label_p,
+	first_loclabel_num_not_at_text_label): New variables.
+	(dwarf2out_var_location): In the first function find out
+	lowest loclabel_num N where .LVLN is known not to be equal to .Ltext0.
+	(find_empty_loc_ranges_at_text_label, dwarf2out_end_function): New
+	functions.
+
+2013-02-07  Eric Botcazou  <ebotcazou@adacore.com>
+
+	PR rtl-optimization/56178
+	* cse.c (cse_insn): Do not create a REG_EQUAL note if the source is a
+	SUBREG of a register.  Tidy up related block of code.
+	* fwprop.c (forward_propagate_and_simplify): Do not create a REG_EQUAL
+	note if the source is a register or a SUBREG of a register.
+
+2013-02-07  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/56228
+	* config/rs6000/rs6000.md (ptrm): New mode attr.
+	(call_indirect_aix<ptrsize>, call_indirect_aix<ptrsize>_nor11,
+	call_value_indirect_aix<pttrsize>,
+	call_value_indirect_aix<pttrsize>_nor11): Use <ptrm> instead of
+	m in constraints.
+
+2013-02-07  Michael Haubenwallner  <michael.haubenwallner@salomon.at>
+
+	* collect2.c (main): Set aix64_flag for -G and -bsvr4 too, disable
+	if -bnortl. Convert to strcmp and strncmp.
+
+2013-02-07  Alan Modra  <amodra@gmail.com>
+
+	PR target/54009
+	* config/rs6000/rs6000.c (mem_operand_gpr): Check that LO_SUM
+	addresses won't wrap when offsetting.
+	(rs6000_secondary_reload): Provide secondary reloads needed for
+	wrapping LO_SUM addresses.
+
+2013-02-06  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* config/gnu.h (GNU_USER_TARGET_OS_CPP_BUILTINS): Never define
+	MACH, just __MACH__.
+
+2013-02-06  Richard Biener  <rguenther@suse.de>
+
+	* tracer.c (tracer): Mark loops with LOOPS_NEED_FIXUP
+	instead of calling fix_loop_structure.
+
+2013-02-06  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56217
+	* omp-low.c (use_pointer_for_field): Return false if
+	lower_send_shared_vars doesn't generate any copy-out code.
+
+2013-02-06  Tom de Vries  <tom@codesourcery.com>
+
+	PR rtl-optimization/56131
+	* cfgrtl.c (delete_insn): Use NOTE_BASIC_BLOCK instead of BLOCK_FOR_INSN
+	to get the bb of a NOTE_INSN_BASIC_BLOCK.  Handle the case that the bb
+	of the label is NULL.  Add comment.
+
+2013-02-05  Jakub Jelinek  <jakub@redhat.com>
+
+	* tree.h (struct tree_decl_with_vis): Remove thread_local field.
+
+	PR sanitizer/55374
+	* config/gnu-user.h (LIBTSAN_EARLY_SPEC): Define.
+	(STATIC_LIBTSAN_LIBS): Likewise.
+	* gcc.c (ADD_STATIC_LIBTSAN_LIBS, LIBTSAN_EARLY_SPEC): Define.
+	(LIBTSAN_SPEC): Add ADD_STATIC_LIBTSAN_LIBS, if LIBTSAN_EARLY_SPEC
+	is defined, don't add anything else beyond that.
+	(SANITIZER_EARLY_SPEC, SANITIZER_SPEC): Define.
+	(LINK_COMMAND_SPEC): Use them.
+
+	PR tree-optimization/56205
+	* tree-stdarg.c (check_all_va_list_escapes): Return true if
+	there are any PHI nodes that set non-va_list_escape_vars SSA_NAME
+	and some va_list_escape_vars SSA_NAME appears in some PHI argument.
+
+2013-02-05  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/53342
+	PR tree-optimization/53185
+	* tree-vectorizer.h (vect_check_strided_load): Remove.
+	* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Do
+	not disallow peeling for vectorized strided loads.
+	(vect_check_strided_load): Make static and simplify.
+	(vect_analyze_data_refs): Adjust.
+	* tree-vect-stmts.c (vectorizable_load): Handle peeled loops
+	correctly when vectorizing strided loads.
+
+2013-02-05  Richard Biener  <rguenther@suse.de>
+
+	* doc/install.texi: Refer to ISL, not PPL.
+
+2013-02-05  Jan Hubicka  <jh@suse.cz>
+
+	PR tree-optimization/55789
+	* params.def (PARAM_EARLY_INLINER_MAX_ITERATIONS): Drop to 1.
+
+2013-02-05  Jan Hubicka  <jh@suse.cz>
+
+	PR tree-optimization/55789
+	* cgraphclones.c (cgraph_remove_node_and_inline_clones): Remove
+	the dead call anyway.
+
+2013-02-05  Eric Botcazou  <ebotcazou@adacore.com>
+
+	PR sanitizer/55374
+	* config/gnu-user.h (LIBASAN_EARLY_SPEC): Add missing guard.
+
+2013-02-04  Alexander Potapenko  <glider@google.com>
+	    Jack Howarth  <howarth@bromo.med.uc.edu>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/55617
+	* config/darwin.c (sort_ctor_records): Stabilized qsort
+	on constructor priority by using original position.
+	(finalize_ctors): New routine to sort constructors by
+	priority before use in assemble_integer.
+	(machopic_asm_out_constructor): Use finalize_ctors if needed.
+
+2013-02-04  Jakub Jelinek  <jakub@redhat.com>
+
+	PR libstdc++/54314
+	* config/i386/winnt.c (i386_pe_assemble_visibility): Don't warn
+	about visibility on artificial decls.
+	* config/sol2.c (solaris_assemble_visibility): Likewise.
+
+2013-02-04  Kai Tietz  <ktietz@redhat.com>
+
+	PR target/56186
+	* config/i386/i386.c (function_value_ms_64): Add additional valtype
+	argument and improve checking of return-argument types for 16-byte
+	modes.
+	(ix86_function_value_1): Add additional valtype argument on call
+	of function_value_64.
+	(return_in_memory_ms_64): Sync 16-byte sized mode handling with
+	handling infunction_value_64 function.
+
+2013-02-04  Matthew Gretton-Dann  <matthew.gretton-dann@linaro.org>
+
+	* reload.c (subst_reloads): Fix DEBUG_RELOAD build issue.
+
+2013-02-04  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56188
+	* tree-ssa-structalias.c (label_visit): Consider case with
+	initially non-empty points-to set.
+	(perform_var_substitution): Dump node mapping and clean up.
+
+2013-02-04  Richard Guenther  <rguenther@suse.de>
+
+	PR lto/56168
+	* lto-symtab.c (lto_symtab_merge_decls_1): Make non-builtin
+	node prevail as last resort.
+	(lto_symtab_merge_decls): Remove guard on LTRANS here.
+	(lto_symtab_prevailing_decl): Builtins are their own prevailing decl.
+
+2013-02-04  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56113
+	* tree-ssa-structalias.c (equiv_class_lookup, equiv_class_add):
+	Merge into ...
+	(equiv_class_lookup_or_add): ... this.
+	(label_visit): Adjust and fix error in previous patch.
+	(perform_var_substitution): Adjust.
+
+2013-02-03  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	* config/sh/divtab.c: Fix formatting and comments throughout the file.
+	* config/sh/sh4-300.md: Likewise.
+	* config/sh/sh4a.md: Likewise.
+	* config/sh/constraints.md: Likewise.
+	* config/sh/sh.md: Likewise.
+	* config/sh/netbsd-elf.h: Likewise.
+	* config/sh/predicates.md: Likewise.
+	* config/sh/sh-protos.h: Likewise.
+	* config/sh/ushmedia.h: Likewise.
+	* config/sh/linux.h: Likewise.
+	* config/sh/sh.c: Likewise.
+	* config/sh/superh.h: Likewise.
+	* config/sh/elf.h: Likewise.
+	* config/sh/sh4.md: Likewise.
+	* config/sh/sh.h: Likewise.
+
+2013-02-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	* config/pa/constraints.md: Adjust unused letters.  Change "T"
+	constraint to match_test floating_point_store_memory_operand().
+	* config/pa/predicates.md (reg_plus_base_memory_operand): New.
+	(base14_operand): New.
+	(floating_point_store_memory_operand): New.
+	(integer_store_memory_operand): Revise to use base14_operand and
+	reg_plus_base_memory_operand.
+	(move_dest_operand): Allow symbolic_memory_operands.
+	(symbolic_memory_operand): Check for LO_SOM.
+	(symbolic_operand): Change default case to break.
+	* config/pa/pa.md: Remove unamed DFmode and SFmode patterns to force
+	CONST_DOUBLE values to be reloaded by putting them into memory when
+	the destination is a floating point register.
+	(movdf): Remove code to handle CONST_DOUBLE.
+	(movsf): Likewise.
+	(reload_indf_r1): New.
+	(reload_insf_r1): New.
+	Consistently use "Q" and "T" constraints with integer and floating
+	point move instructions, respectively.
+	(movdi): Remove FAIL.
+	Change predicate for source operand unamed DImode move from
+	general_operand to move_src_operand.
+	(umulsidi3): Change predicate for destination operand to
+	register_operand.
+	Likewise for similar unamed patterns.
+	* config/pa/pa-protos.h (pa_legitimize_reload_address): Declare.
+	* config/pa/pa.c (pa_symbolic_expression_p): Remove extra parenthesis.
+	(hppa_legitimize_address): Simplify mask calculation.
+	(pa_emit_move_sequence): Revised handling of secondary reloads from
+	REG+D addresses for floating point loads and stores.  Directly handle
+	loading CONST0_RTX (mode) to a floating point register.
+	(pa_secondary_reload): Handle reloading DF and SFmode constant values
+	to floating point registers.  Don't restrict secondary reloads to
+	floating point registers to integer modes.  Revise some comments and
+	cleanup some code.
+	(TARGET_LEGITIMATE_ADDRESS_P): Define.
+	(pa_legitimate_address_p): New.
+	(pa_legitimize_reload_address): New.
+	* config/pa/pa.h (STRICT_REG_OK_FOR_INDEX_P): New.
+	(STRICT_REG_OK_FOR_BASE_P): New.
+	(GO_IF_LEGITIMATE_ADDRESS): Delete.  Update some related comments.
+	(LEGITIMIZE_RELOAD_ADDRESS): Revise to use pa_legitimize_reload_address.
+
+2013-02-03  David Edelsohn  <dje.gcc@gmail.com>
+	    Andrew Dixie  <andrewd@gentrack.com>
+
+	* collect2.c (GCC_CHECK_HDR): Do not scan objects with F_LOADONLY
+	flag set.
+
+2013-02-03  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* expmed.c (extract_bit_field_1): Pass the full width of the
+	structure to get_best_reg_extraction_insn.
+
+2013-02-01  David Edelsohn  <dje.gcc@gmail.com>
+
+	PR target/54601
+	* configure.ac (use_cxa_atexit): Add AIX.
+	* configure: Regenerate.
+
+	* config/rs6000/aix61.h (STARTFILE_SPEC): Add crtcxa.o.
+
+2013-02-01  Jakub Jelinek  <jakub@redhat.com>
+
+	PR debug/54793
+	* final.c (need_profile_function): New variable.
+	(final_start_function): Drop ATTRIBUTE_UNUSED from first argument.
+	If first of NOTE_INSN_BASIC_BLOCK or NOTE_INSN_FUNCTION_BEG
+	is only preceeded by NOTE_INSN_VAR_LOCATION or NOTE_INSN_DELETED
+	notes, targetm.asm_out.function_prologue doesn't emit anything,
+	HAVE_prologue and profiler should be emitted before prologue,
+	set need_profile_function instead of emitting it.
+	(final_scan_insn): If need_profile_function, emit
+	profile_function on the first NOTE_INSN_BASIC_BLOCK or
+	NOTE_INSN_FUNCTION_BEG note.
+
+2013-02-01  Richard Henderson  <rth@redhat.com>
+
+	* config/rs6000/rs6000.md (smulditi3): New.
+	(umulditi3): New.
+
+	* config/alpha/alpha.md (umulditi3): New.
+
+2013-02-01  David Edelsohn  <dje.gcc@gmail.com>
+
+	* config/rs6000/xcoff.h (ASM_OUTPUT_ALIGNED_COMMON): Use floor_log2.
+	(ASM_OUTPUT_ALIGNED_LOCAL): New.
+
+2013-02-01  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56113
+	* tree-ssa-structalias.c (label_visit): Reduce work for
+	single-predecessor nodes.
+
+2013-02-01  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* fold-const.c (make_range_step) <TRUTH_NOT_EXPR>: Bail out if the
+	range isn't testing for zero.
+
+2013-01-31  Steven Bosscher  <steven@gcc.gnu.org>
+
+	PR middle-end/56113
+	* fwprop.c (fwprop_init): Set up loops without CFG modifications.
+
+2013-01-31  Hiroyuki Ono  <hiroyuki.ono.jc@renesas.com>
+	    Nick Clifton  <nickc@redhat.com>
+
+	* config/v850/constraints.md (Q): Define as a memory constraint.
+	* config/v850/predicates.md (label_ref_operand): New predicate.
+	(e3v5_shift_operand): New predicate.
+	(ior_operator): New predicate.
+	* config/v850/t-v850: Add e3v5 multilib.
+	* config/v850/v850-protos.h (v850_adjust_insn_length): Prototype.
+	(v850_gen_movdi): Prototype.
+	* config/v850/v850.c: Add support for e3v5 architecture.
+	Rename all uses of TARGET_V850E || TARGET_V850E2_ALL to
+	TARGET_V850E_UP.
+	(construct_save_jarl): Add e3v5 long JARL support.
+	(v850_adjust_insn_length): New function.  Adjust length of call
+	insns when using e3v5 instructions.
+	(v850_gen_movdi): New function: Generate instructions to move a
+	DImode value.
+	* config/v850/v850.h (TARGET_CPU_v850e3v5): Define.
+	(CPP_SPEC): Define __v850e3v5__ as appropriate.
+	(TARGET_USE_FPU): Enable for e3v5.
+	(CONST_OK_FOR_W): New macro.
+	(ADJUST_INSN_LENGTH): Define.
+	* config/v850/v850.md (UNSPEC_LOOP): Define.
+	(attr cpu): Add v850e3v5.
+	Rename all uses of TARGET_V850E2 to TARGET_V850E2V3_UP.
+	(movdi): New pattern.
+	(movdi_internal): New pattern.
+	(cbranchsf4): Conditionalize on TARGET_USE_FPU.
+	(cbranchdf4): Conditionalize on TARGET_USE_FPU.
+	(cstoresf4): Likewise.
+	(cstoredf4): Likewise.
+	(insv): New pattern.
+	(rotlso3_a): New pattern.
+	(rotlsi3_b): New pattern
+	(rotlsi3_v850e3v5): New pattern.
+	(doloop_begin): New pattern.
+	(fix_loop_counter): New pattern.
+	(doloop_end): New pattern.
+	(branch_normal): Add e3v5 long branch support.
+	(branch_invert): Likewise.
+	(branch_z_normal): Likewise.
+	(branch_z_invert): Likewise.
+	(branch_nz_normal): Likewise.
+	(branch_nz_invert): Likewise.
+	(call_internal_short): Add e3v5 register-indirect JARL support.
+	(call_internal_long): Likewise.
+	(call_value_internal_short): Likewise.
+	(call_value_internal_long): Likewise.
+	* config/v850/v850.opt (mv850e3v5, mv850e2v4): New options.
+	(mloop): New option.
+	* config.gcc: Add support for configuring v840e3v5 target.
+	* doc/invoke.texi: Document new v850 specific command line options.
+
+2013-01-31  Paul Koning  <ni1d@arrl.net>
+
+	PR debug/55059
+	PR debug/54508
+	* dwarf2out.c (prune_unused_types_mark): Mark all of parent's
+	children if parent is a class.
+	(prune_unused_types_prune): Don't add DW_AT_declaration.
+
+2013-01-31  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56157
+	* tree-vect-slp.c (vect_get_slp_defs): More thoroughly try to
+	match up operand with SLP child.
+
+2013-01-31  Jason Merrill  <jason@redhat.com>
+
+	PR debug/54410
+	* dwarf2out.c (gen_struct_or_union_type_die): Always schedule template
+	parameters the first time.
+	(gen_scheduled_generic_parms_dies): Check completeness here.
+
+2013-01-31  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/53073
+	* common.opt (faggressive-loop-optimizations): New flag,
+	enabled by default.
+	* doc/invoke.texi (faggressive-loop-optimizations): Document.
+	* tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Guard
+	infer_loop_bounds_from_undefined by it.
+
+2013-01-31  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56150
+	* tree-ssa-loop-manip.c (find_uses_to_rename_stmt): Do not
+	visit virtual operands.
+	(find_uses_to_rename_bb): Likewise.
+
+2013-01-31  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56150
+	* tree-ssa-tail-merge.c (gimple_equal_p): Properly handle
+	mixed store non-store stmts.
+
+2013-01-30  Jakub Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/55374
+	* gcc.c (LIBASAN_SPEC): Define just to ADD_STATIC_LIBASAN_LIBS if
+	LIBASAN_EARLY_SPEC is defined.
+	(LIBASAN_EARLY_SPEC): Define to empty string if not already defined.
+	(LINK_COMMAND_SPEC): Add LIBASAN_EARLY_SPEC for -fsanitize=address,
+	before %o.
+	* config/gnu-user.h (LIBASAN_EARLY_SPEC): Define.
+
+	PR c++/55742
+	* config/i386/i386.c (ix86_valid_target_attribute_inner_p): Diagnose
+	invalid args instead of ICEing on it.
+	(ix86_valid_target_attribute_tree): Return error_mark_node if
+	ix86_valid_target_attribute_inner_p failed.
+	(ix86_valid_target_attribute_p): Return false only if
+	ix86_valid_target_attribute_tree returned error_mark_node.  Allow
+	target("default") attribute.
+	(sorted_attr_string): Change argument from const char * to tree,
+	merge in all target attribute arguments rather than just one.
+	Formatting fix.  Use XNEWVEC instead of xmalloc and XDELETEVEC
+	instead of free.  Avoid using strcat.
+	(ix86_mangle_function_version_assembler_name): Mangle
+	target("default") as if no target attribute is present.  Adjust
+	sorted_attr_string caller.  Avoid leaking memory.  Use XNEWVEC
+	instead of xmalloc and XDELETEVEC instead of free.
+	(ix86_function_versions): Don't return true if one of the decls
+	doesn't have target attribute.  If they don't and one of the decls
+	is DECL_FUNCTION_VERSIONED, report an error.  Adjust
+	sorted_attr_string caller.  Use XDELETEVEC instead of free.
+	(ix86_supports_function_versions): Remove.
+	(make_name): Fix up formatting.
+	(make_dispatcher_decl): Remove resolver_name and its initialization.
+	Avoid leaking memory.
+	(is_function_default_version): Return true if there is
+	target("default") attribute rather than no target attribute at all.
+	(make_resolver_func): Avoid leaking memory.
+	(ix86_generate_version_dispatcher_body): Likewise.
+	(TARGET_OPTION_SUPPORTS_FUNCTION_VERSIONS): Remove.
+	* target.def (supports_function_versions): Remove.
+	* doc/tm.texi.in (SUPPORTS_FUNCTION_VERSIONS): Remove.
+	* doc/tm.texi: Regenerated.
+
+2013-01-30  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/56144
+	* lra-constraints.c (get_reload_reg): Don't reuse reload pseudo
+	for values with side effects.
+
+2013-01-30  Richard Biener  <rguenther@suse.de>
+
+	* sparseset.h (sparseset_bit_p): Use gcc_checking_assert.
+	(sparseset_pop): Likewise.
+	* cfganal.c (compute_idf): Likewise.  Increase work-stack size
+	to be able to use quick_push in the worker loop.
+
+2013-01-30  Marek Polacek  <polacek@redhat.com>
+
+	* cfgcleanup.c (cleanup_cfg): Don't mark affected BBs.
+
+2013-01-30  Richard Biener  <rguenther@suse.de>
+
+	PR lto/56147
+	* lto-symtab.c (lto_symtab_merge_decls_1): Guard DECL_BUILT_IN check.
+
+2013-01-30  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR tree-optimization/56064
+	* fixed-value.c (fixed_from_double_int): New function.
+	* fixed-value.h (fixed_from_double_int): New prototype.
+	(const_fixed_from_double_int): New static inline function.
+	* fold-const.c (native_interpret_fixed): New static function.
+	(native_interpret_expr) <FIXED_POINT_TYPE>: Use it.
+	(can_native_interpret_type_p) <FIXED_POINT_TYPE>: Return true.
+	(native_encode_fixed): New static function.
+	(native_encode_expr) <FIXED_CST>: Use it.
+	(native_interpret_int): Move double_int worker code to...
+	* double-int.c (double_int::from_buffer): ...this new static method.
+	* double-int.h (double_int::from_buffer): Prototype it.
+
+2013-01-30  Richard Biener  <rguenther@suse.de>
+
+	* tree-ssa-structalias.c (final_solutions, final_solutions_obstack):
+	New pointer-map and obstack.
+	(init_alias_vars): Allocate pointer-map and obstack.
+	(delete_points_to_sets): Free them.
+	(find_what_var_points_to): Cache result.
+	(find_what_p_points_to): Adjust for changed interface of
+	find_what_var_points_to.
+	(compute_points_to_sets): Likewise.
+	(ipa_pta_execute): Likewise.
+
+2013-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	* configure.ac (HAVE_AS_SPARC_NOBITS): New test.
+	* configure: Regenerate.
+	* config.in: Regenerate.
+	* config/sparc/sparc.c (sparc_solaris_elf_asm_named_section): Emit
+	#nobits/#progbits if supported.
+
+2013-01-29  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	PR target/56121
+	* config/sh/sh.md (bclr_m2a, bset_m2a, bst_m2a, bld_m2a, bldsign_m2a,
+	bld_reg, *bld_regqi, band_m2a, bandreg_m2a, bor_m2a, borreg_m2a,
+	bxor_m2a, bxorreg_m2a): Add satisfies_constraint_K03 condition.
+
+2013-01-29  Greta Yorsh  <Greta.Yorsh@arm.com>
+
+	* config/arm/cortex-a7.md (cortex_a7_neon, cortex_a7_all): Remove.
+	(cortex_a7_idiv): Use cortex_a7_both instead of cortex_a7_all.
+
+2013-01-29  Greta Yorsh  <Greta.Yorsh@arm.com>
+
+	* config/arm/arm.c (cortexa7_younger): Return true for TYPE_CALL.
+	* config/arm/cortex-a7.md (cortex_a7_call): Update required units.
+
+2013-01-29  Greta Yorsh  <Greta.Yorsh@arm.com>
+
+	* config/arm/arm-protos.h (arm_mac_accumulator_is_result): New
+	declaration.
+	* config/arm/arm.c (arm_mac_accumulator_is_result): New function.
+	* config/arm/cortex-a7.md: New bypasses using
+	arm_mac_accumulator_is_result.
+
+2013-01-29  Greta Yorsh  <Greta.Yorsh@arm.com>
+
+	* config/arm/cortex-a7.md (cortex_a7_neon_mul):  New reservation.
+	(cortex_a7_neon_mla): Likewise.
+	(cortex_a7_fpfmad): New reservation.
+	(cortex_a7_fpmacs): Use ffmas and update required units.
+	(cortex_a7_fpmuld): Update required units and latency.
+	(cortex_a7_fpmacd): Likewise.
+	(cortex_a7_fdivs, cortex_a7_fdivd): Likewise.
+	(cortex_a7_neon). Likewise.
+	(bypass) Update participating units.
+
+2013-01-29  Greta Yorsh  <Greta.Yorsh@arm.com>
+
+	* config/arm/arm.md (type): Add ffmas and ffmad to "type" attribute.
+	* config/arm/vfp.md (fma,fmsub,fnmsub,fnmadd): Change type
+	from fmac to ffma.
+	* config/arm/vfp11.md (vfp_farith): Use ffmas.
+	(vfp_fmul): Use ffmad.
+	* config/arm/cortex-r4f.md (cortex_r4_fmacs): Use ffmas.
+	(cortex_r4_fmacd): Use ffmad.
+	* config/arm/cortex-m4-fpu.md (cortex_m4_fmacs): Use ffmas.
+	* config/arm/cortex-a9.md (cortex_a9_fmacs):  Use ffmas.
+	(cortex_a9_fmacd): Use ffmad.
+	* config/arm/cortex-a8-neon.md (cortex_a8_vfp_macs): Use ffmas.
+	(cortex_a8_vfp_macd): Use ffmad.
+	* config/arm/cortex-a5.md (cortex_a5_fpmacs): Use ffmas.
+	(cortex_a5_fpmacd): Use ffmad.
+	* config/arm/cortex-a15-neon.md (cortex_a15_vfp_macs) Use ffmas.
+	(cortex_a15_vfp_macd): Use ffmad.
+	* config/arm/arm1020e.md (v10_fmul): Use ffmas and ffmad.
+
+2013-01-29  Jason Merrill  <jason@redhat.com>
+
+	PR libstdc++/54314
+	* varasm.c (default_assemble_visibility): Don't warn about
+	visibility on artificial decls.
+
+2013-01-29  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56113
+	* tree-ssa-structalias.c (equiv_class_lookup): Also return
+	the bitmap leader.
+	(label_visit): Free duplicate bitmaps and record the leader instead.
+	(perform_var_substitution): Adjust.
+
+2013-01-29  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/55270
+	* tree-ssa-dom.c (eliminate_degenerate_phis): If we changed
+	the CFG, schedule loops for fixup.
+
+2013-01-29  Nick Clifton  <nickc@redhat.com>
+
+	* config/rl78/rl78.c (rl78_regno_mode_code_ok_for_base_p): Allow
+	SP_REG.
+
+2013-01-28  Leif Ekblad  <leif@rdos.net>
+
+	* config.gcc (i[34567]86-*-rdos*, x86_64-*-rdos*): New targets.
+	* config/i386/i386.h (TARGET_RDOS): New macro.
+	(DEFAULT_LARGE_SECTION_THRESHOLD): New macro.
+	* config/i386/i386.c (ix86_option_override_internal): For 64bit
+	TARGET_RDOS, set ix86_cmodel to CM_MEDIUM_PIC and flag_pic to 1.
+	* config/i386/i386.opt (mlarge-data-threshold): Initialize to
+	DEFAULT_LARGE_SECTION_THRESHOLD.
+	* config/i386/i386.md (R14_REG, R15_REG): New constants.
+	* config/i386/rdos.h: New file.
+	* config/i386/rdos64.h: New file.
+
+2013-01-28  Bernd Schmidt  <bernds@codesourcery.com>
+
+	PR other/54814
+	* reload.c (find_valid_class_1): Use in_hard_reg_set_p instead of
+	TEST_HARD_REG_BIT.
+
+2013-01-28  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/56117
+	* sched-deps.c (sched_analyze_2) <case PREFETCH>: For use_cselib
+	call cselib_lookup_from_insn on the MEM before calling
+	add_insn_mem_dependence.
+
+2013-01-28  Richard Biener  <rguenther@suse.de>
+
+	* tree-inline.c (remap_gimple_stmt): Do not assing a BLOCK
+	to a stmt that didn't have one.
+	(copy_phis_for_bb): Likewise for PHI arguments.
+	(copy_debug_stmt): Likewise for debug stmts.
+
+2013-01-28  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56034
+	* tree-loop-distribution.c (enum partition_kind): Add PKIND_REDUCTION.
+	(partition_builtin_p): Adjust.
+	(generate_code_for_partition): Handle PKIND_REDUCTION.  Assert
+	it is the last partition.
+	(rdg_flag_uses): Check SSA_NAME_IS_DEFAULT_DEF before looking
+	up the vertex for the definition.
+	(classify_partition): Classify whether a partition is a
+	PKIND_REDUCTION, thus has uses outside of the loop.
+	(ldist_gen): Inherit PKIND_REDUCTION when merging partitions.
+	Merge all PKIND_REDUCTION partitions into the last partition.
+	(tree_loop_distribution): Seed partitions from reductions as well.
+
+2013-01-28  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56125
+	* tree-ssa-math-opts.c (gimple_expand_builtin_pow): Don't optimize
+	pow(x,c) into sqrt(x) * powi(x, n/2) or
+	1.0 / (sqrt(x) * powi(x, abs(n/2))) if c is an integer or when
+	optimizing for size.
+	Don't optimize pow(x,c) into powi(x, n/3) * powi(cbrt(x), n%3) or
+	1.0 / (powi(x, abs(n)/3) * powi(cbrt(x), abs(n)%3)) if 2c is an
+	integer.
+
+	PR tree-optimization/56094
+	* gimplify.c (force_gimple_operand_1): Temporarily set input_location
+	to UNKNOWN_LOCATION while gimplifying expr.
+
+2013-01-27  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/56114
+	* config/i386/i386.md (*movabs<mode>_1): Add square brackets around
+	operand 0 in movabs insn template for -masm=intel asm alternative.
+	(*movabs<mode>_2): Ditto for operand 1.
+
+2013-01-26  David Holsgrove  <david.holsgrove@xilinx.com>
+
+	PR target/54663
+	* config.gcc (microblaze*-linux*): Add tmake_file to allow building
+	of microblaze-c.o
+
+2013-01-26  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
+
+	* config.gcc (microblaze*-*-*): Rename microblaze*-*-elf, update
+	tm_file.
+
+2013-01-25  Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>
+
+	* config/aarch64/aarch64.c (TARGET_FIXED_CONDITION_CODE_REGS):
+	Undef to avoid warning.
+
+2013-01-25  Michael Haubenwallner  <michael.haubenwallner@salomon.at>
+
+	* configure.ac (gcc_cv_ld_static_dynamic): Define for AIX native ld.
+	* configure: Regenerate.
+
+2013-01-25  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56098
+	* tree-ssa-phiopt.c (nt_init_block): Don't call add_or_mark_expr
+	for stmts with volatile ops.
+	(cond_store_replacement): Don't optimize if assign has volatile ops.
+	(cond_if_else_store_replacement_1): Don't optimize if either
+	then_assign or else_assign have volatile ops.
+	(hoist_adjacent_loads): Don't optimize if either def1 or def2 have
+	volatile ops.
+
+2013-01-25  Georg-Johann Lay  <avr@gjlay.de>
+
+	* doc/invoke.texi (AVR Built-in Macros): Document __XMEGA__.
+
+2013-01-25  Georg-Johann Lay  <avr@gjlay.de>
+
+	* doc/extend.texi (Example of asm with clobbered asm reg): Fix
+	missing ':' in asm example.
+
+2013-01-25  Tejas Belagod  <tejas.belagod@arm.com>
+
+	* config/aarch64/aarch64-simd-builtins.def: Separate sq<r>dmulh_lane
+	entries into lane and laneq entries.
+	* config/aarch64/aarch64-simd.md (aarch64_sq<r>dmulh_lane<mode>):
+	Remove AdvSIMD scalar modes.
+	(aarch64_sq<r>dmulh_laneq<mode>): New.
+	(aarch64_sq<r>dmulh_lane<mode>): New RTL pattern for Scalar AdvSIMD
+	modes.
+	* config/aarch64/arm_neon.h: Fix all the vq<r>dmulh_lane* intrinsics'
+	builtin implementations to relfect changes in RTL in aarch64-simd.md.
+	* config/aarch64/iterators.md (VCOND): New.
+	(VCONQ): New.
+
+2013-01-25  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR target/54222
+	* config/avr/builtins.def (DEF_BUILTIN): Add LIBNAME argument.
+	Add NULL LIBNAME argument to existing definitions.
+	(ABSHR, ABSR, ABSLR, ABSLLR, ABSHK, ABSK, ABSLK, ABSLLK): New.
+	* config/avr/avr-c.c (DEF_BUILTIN): Add LIBNAME argument.
+	* config/avr/avr.c (DEF_BUILTIN): Same.
+	(avr_init_builtins): Pass down LIBNAME to add_builtin_function.
+	(avr_expand_builtin): Expand to a vanilla call if a libgcc
+	implementation is available (DECL_ASSEMBLER_NAME is set).
+	(avr_fold_absfx): New static function.
+	(avr_fold_builtin): Use it to handle: AVR_BUILTIN_ABSHR,
+	AVR_BUILTIN_ABSR, AVR_BUILTIN_ABSLR, AVR_BUILTIN_ABSLLR,
+	AVR_BUILTIN_ABSHK, AVR_BUILTIN_ABSK, AVR_BUILTIN_ABSLK,
+	AVR_BUILTIN_ABSLLK.
+	* config/avr/stdfix.h (abshr, absr, abslr, absllr)
+	(abshk, absk, abslk, absllk): Provide as static inline functions.
+
+2013-01-25  Marek Polacek  <polacek@redhat.com>
+
+	PR tree-optimization/56035
+	* cfgloopmanip.c (fix_loop_structure): Remove redundant condition.
+
+2012-01-24  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/i386.md (*movti_internal_rex64): Add (o,e) alternative.
+	(*movtf_internal_rex64): Add (!o,C) alternative
+	(*movxf_internal_rex64): Ditto.
+	(*movdf_internal_rex64): Add (?r,C) and (?m,C) alternatives.
+
+2013-01-24  Shenghou Ma  <minux.ma@gmail.com>
+
+	* doc/invoke.texi: fix typo.
+	* doc/objc.texi: fix typo.
+
+2013-01-24  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* config/mips/mips.md (*and<mode>3_mips16): Use the "W" constraint
+	for the first two alternatives.
+
+2013-01-24  Diego Novillo  <dnovillo@google.com>
+
+	* Makefile.in (GGC): Remove.  Replace all instances with ggc-page.o.
+	(ggc-zone.o): Remove.
+	* configure.ac: Remove option --with-gc.
+	* configure: Re-generate.
+	* doc/install.texi: Remove documentation for --with-gc.
+	* gengtype.c (write_enum_defn): Remove.  Update all users.
+	(write_Types_process_field): Remove generation of gt_e_* argument.
+	(output_type_enum): Remove.  Update all users.
+	(write_enum_defn): Remove.  Update all users.
+	(enum alloc_zone): Remove.  Update all users.
+	(write_splay_tree_allocator_def): Remove generation of gt_e_* argument.
+	* ggc-common.c (ggc_splay_alloc): Remove first argument.
+	Update all callers.
+	(struct ptr_data): Remove field TYPE.  Update all users.
+	(gt_pch_note_object): Remove argument TYPE.  Update all users.
+	* ggc-internal.h (ggc_pch_alloc_object): Remove last argument.
+	Update all users.
+	* ggc-none.c (ggc_alloc_typed_stat): Remove.
+	(struct alloc_zone): Remove.
+	(ggc_internal_alloc_zone_stat): Remove.
+	(ggc_internal_cleared_alloc_zone_stat): Remove.
+	* ggc-page.c (ggc_alloc_typed_stat): Remove.
+	(ggc_pch_count_object): Remove last argument.  Update all users.
+	(ggc_pch_alloc_object): Remove last argument.  Update all users.
+	(struct alloc_zone): Remove.
+	* ggc-zone.c: Remove.
+	* ggc.h (gt_pch_note_object): Remove last argument.  Update all users.
+	(struct alloc_zone): Remove.
+	(ggc_alloc_typed_stat): Remove.
+	(ggc_alloc_typed): Remove.
+	(ggc_splay_alloc): Remove first argument.
+	(rtl_zone): Remove.  Update all users.
+	(tree_zone): Remove.  Update all users.
+	(tree_id_zone): Remove.  Update all users.
+	(ggc_internal_zone_alloc_stat): Remove.  Update all users.
+	(ggc_internal_zone_cleared_alloc_stat): Remove.  Update all users.
+	(ggc_internal_zone_vec_alloc_stat): Remove.  Update all users.
+	* tree-ssanames.c: Remove references to zone allocator in comments.
+
+2013-01-24  Georg-Johann Lay  <avr@gjlay.de>
+
+	* config/avr/avr.c (avr_out_fract): Make register numbers that
+	might be outside of source operand signed.
+
+2013-01-24  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/constraints.md (Yf): New constraint.
+	* config/i386/i386.md (*movdf_internal_rex64): Use Yf*f instead
+	of f constraint to conditionaly disable x87 register preferences.
+	(*movdf_internal): Ditto.
+	(*movsf_internal): Ditto.
+
+2013-01-24  Steven Bosscher  <steven@gcc.gnu.org>
+
+	PR inline-asm/55934
+	* lra-assigns.c (assign_by_spills): Throw away the pattern of asms
+	that have operands with impossible constraints.
+	Add a FIXME for a speed-up opportunity.
+	* lra-constraints.c (process_alt_operands): Verify that a class
+	selected from constraints on asms is valid for the operand mode.
+	(curr_insn_transform): Remove incorrect comment.
+
+2013-01-23  David Edelsohn  <dje.gcc@gmail.com>
+
+	* config/rs6000/rs6000.c (rs6000_delegitimize_address): Check that
+	TOC operand is a valid symbol ref in the constant pool.
+
+2013-01-23  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
+
+	* config/microblaze/linux.h: Add TARGET_OS_CPP_BUILTINS
+
+2013-01-23  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR target/54222
+	* config/avr/stdfix.h: New file.
+	* t-avr (stdfix-gcc.h): New rule to build it.
+	(EXTRA_HEADERS): Set it to install stdfix.h, stdfix-gcc.h.
+
+2013-01-23  Kostya Serebryany  <kcc@google.com>
+
+	* config/darwin.h: remove dependency on
+	CoreFoundation (asan on Mac OS).
+
+2013-01-23  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/49069
+	* config/arm/arm.md (cbranchdi4, cstoredi4): Use s_register_operand
+	instead of cmpdi_operand for first comparison operand.
+	Don't assert that comparison operands aren't both constants.
+
+2013-01-22  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+	* doc/install.texi (Downloading the Source): Update references to
+	downloading separate components.
+
+2013-01-22  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+	* doc/extend.texi (__int128): Improve grammar.
+
+2013-01-22  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/56028
+	* config/i386/i386.md (*movti_internal_rex64): Change (o,riF)
+	alternative to (o,r).
+	(*movdi_internal_rex64): Remove (!o,n) alternative.
+	(DImode immediate->memory splitter): Remove.
+	(DImode immediate->memory peephole2): Remove.
+	(movtf): Enable for TARGET_64BIT || TARGET_SSE.
+	(*movtf_internal_rex64): Rename from *movtf_internal. Change (!o,F*r)
+	alternative to (!o,*r).
+	(*movtf_internal_sse): New pattern.
+	(*movxf_internal_rex64): New pattern.
+	(*movxf_internal): Disable for TARGET_64BIT.
+	(*movdf_internal_rex64): Remove (!o,F) alternative.
+
+2013-01-22  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56074
+	* dumpfile.c (dump_loc): Only print loc if LOCATION_LOCUS (loc)
+	isn't UNKNOWN_LOCATION nor BUILTINS_LOCATION.
+	* tree-vect-loop-manip.c (find_loop_location): Also ignore
+	stmt locations where LOCATION_LOCUS of the stmt location is
+	UNKNOWN_LOCATION or BUILTINS_LOCATION.
+
+	PR target/55686
+	* config/i386/i386.md (UNSPEC_STOS): New.
+	(strset_singleop, *strsetdi_rex_1, *strsetsi_1, *strsethi_1,
+	*strsetqi_1): Add UNSPEC_STOS.
+
+2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/56067
+	* doc/invoke.texi: Remove left over -Wsynth example.
+
+2013-01-21  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56051
+	* fold-const.c (fold_binary_loc): Don't fold
+	X < (cast) (1 << Y) into (X >> Y) != 0 if cast is either
+	a narrowing conversion, or widening conversion from signed
+	to unsigned.
+
+2013-01-21  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR rtl-optimization/56023
+	* haifa-sched.c (fix_inter_tick): Do not update ticks of instructions,
+	dependent on debug instruction.
+
+2013-01-21  Martin Jambor  <mjambor@suse.cz>
+
+	PR middle-end/56022
+	* function.c (allocate_struct_function): Call
+	invoke_set_current_function_hook earlier.
+
+2013-01-21  Jakub Jelinek  <jakub@redhat.com>
+
+	* reload1.c (init_reload): Only initialize reload_obstack
+	during the first call.
+
+2013-01-21  Marek Polacek  <polacek@redhat.com>
+
+	* cfgloop.c (verify_loop_structure): Fix up grammar.
+
+2013-01-21  Yi-Hsiu Hsu  <ahsu@marvell.com>
+
+	* config/arm/marvell-pj4.md (pj4_shift_conds, pj4_alu_shift,
+	pj4_alu_shift_conds, pj4_shift): Handle simple_alu_shift.
+
+2013-01-21  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
+
+	PR target/56058
+	* config/arm/marvell-pj4.md: Update copyright year.
+	Fix up use of alu to alu_reg and simple_alu_imm.
+
+2013-01-21  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/i386.md (enabled): Do not disable fma4 for TARGET_FMA.
+
+2013-01-20  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR target/55433
+	* lra-constraints.c (curr_insn_transform): Don't reuse original
+	insn for secondary memory move when memory mode should be different.
+
+2013-01-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	* config/pa/pa.md (atomic_loaddi, atomic_loaddi_1, atomic_storedi,
+	atomic_storedi_1): New patterns.
+
+2013-01-20  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>
+
+	btver2 pipeline descriptions.
+	* config/i386/i386.c: Enable CPU_BTVER2 to use btver2 pipeline
+	descriptions.
+	* config/i386/i386.md (btver2_decode): New type attributes.
+	* config/i386/sse.md (btver2_decode, btver2_sse_attr): New
+	type attributes.
+	* config/i386/btver2.md: New file describing btver2 pipelines.
+
+2013-01-19  Andrew Pinski  <apinski@cavium.com>
+
+	PR tree-optimization/52631
+	* tree-ssa-sccvn (visit_use): Before looking up the original
+	statement, try looking up the simplified expression.
+
+2013-01-19  Anthony Green  <green@moxielogic.com>
+
+	* config/moxie/moxie.c (moxie_expand_prologue): Set
+	current_function_static_stack_size.
+
+2013-01-18  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56029
+	* tree-phinodes.c (reserve_phi_args_for_new_edge): Set
+	gimple_phi_arg_location for the new arg to UNKNOWN_LOCATION.
+
+2013-01-18  Sharad Singhai  <singhai@google.com>
+
+	PR tree-optimization/55995
+	* dumpfile.c (dump_loc): Print location only if available.
+	* tree-vectorizer.c (increase_alignment): Intialize vect_location.
+
+2013-01-18  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR target/55433
+	* lra-constraints.c (curr_insn_transform): Reuse original insn for
+	secondary memory move.
+	(inherit_reload_reg): Use rclass instead of cl for
+	check_secondary_memory_needed_p.
+
+2013-01-18  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56015
+	* expr.c (expand_expr_real_2) <case COMPLEX_EXPR>: Handle
+	the case where writing real complex part of target modifies op1.
+
+2013-01-18  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* config/aarch64/aarch64-simd.md
+	(aarch64_vcond_internal<mode>): Handle unordered cases.
+	* config/aarch64/iterators.md (v_cmp_result): New.
+
+2013-01-18  Yi-Hsiu Hsu  <ahsu@marvell.com>
+	    Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
+
+	* config/arm/marvell-pj4.md: New file.
+	* config/arm/arm.c (arm_issue_rate): Add marvell_pj4.
+	* config/arm/arm.md (generic_sched): Add marvell_pj4.
+	(generic_vfp): Likewise.
+	* config/arm/arm-cores.def: Add marvell-pj4.
+	* config/arm/arm-tune.md: Regenerate.
+	* config/arm/arm-tables.opt: Regenerate.
+	* config/arm/bpabi.h (BE8_LINK_SPEC): Add marvell_pj4.
+	* doc/invoke.texi: Document marvell-pj4.
+
+2013-01-18  Tejas Belagod  <tejas.belagod@arm.com>
+
+	* config/aarch64/arm_neon.h: Map scalar types to standard types.
+
+2013-01-18  Alexandre Oliva  <aoliva@redhat.com>
+
+	PR debug/54114
+	PR debug/54402
+	PR debug/49888
+	* var-tracking.c (negative_power_of_two_p): New.
+	(global_get_addr_cache, local_get_addr_cache): New.
+	(get_addr_from_global_cache, get_addr_from_local_cache): New.
+	(vt_canonicalize_addr): Rewrite using the above.  Adjust the
+	heading comment.
+	(vt_stack_offset_p): Remove.
+	(vt_canon_true_dep): Always canonicalize loc's address.
+	(clobber_overlapping_mems): Make sure we have a MEM.
+	(local_get_addr_clear_given_value): New.
+	(val_reset): Clear local cached entries.
+	(compute_bb_dataflow): Create and release the local cache.
+	Disable duplicate MEMs clobbering.
+	(emit_notes_in_bb): Clobber MEMs likewise.
+	(vt_emit_notes): Create and release the local cache.
+	(vt_initialize, vt_finalize): Create and release the global
+	cache, respectively.
+	* alias.c (rtx_equal_for_memref_p): Compare operands of ENTRY_VALUEs.
+
+2013-01-18  Alexandre Oliva  <aoliva@redhat.com>
+
+	PR libmudflap/53359
+	* tree-mudflap.c (mudflap_finish_file): Skip deferred decls
+	not found in the symtab.
+
+2013-01-18  Alexandre Oliva  <aoliva@redhat.com>
+
+	PR debug/56006
+	PR rtl-optimization/55547
+	PR rtl-optimization/53827
+	PR debug/53671
+	PR debug/49888
+	* alias.c (offset_overlap_p): New, factored out of...
+	(memrefs_conflict_p): ... this.  Use absolute sizes.  Retain
+	the conservative special case for symbolic constants.  Don't
+	adjust zero sizes on alignment.
+
+2013-01-18  Bernd Schmidt  <bernds@codesourcery.com>
+
+	PR rtl-optimization/52573
+	* regrename.c (build_def_use): Ignore REG_DEAD notes if there is a
+	REG_UNUSED for the same register.
+
+2013-01-17  Richard Biener  <rguenther@suse.de>
+	    Marek Polacek  <polacek@redhat.com>
+
+	PR rtl-optimization/55833
+	* loop-unswitch.c (unswitch_loops): Move loop verification...
+	(unswitch_single_loop): ...here.  Call mark_irreducible_loops.
+	* cfgloopmanip.c (fix_loop_placement): Add IRRED_INVALIDATED parameter.
+	Set it to true when we're removing a loop from hierarchy tree in
+	an irreducible region.
+	(fix_bb_placements): Adjust caller.
+	(fix_loop_placements): Likewise.
+
+2013-01-17  Georg-Johann Lay  <avr@gjlay.de>
+
+	* config/avr/builtins.def (DEF_BUILTIN): Factor out
+	"__builtin_avr_" from NAME, turn NAME to an uppercase identifier.
+	Factor out 'CODE_FOR_' from ICODE, use 'nothing' instead of '-1'.
+	Remove ID.  Adjust comments.
+	* config/avr/avr-c.c (avr_builtin_name): Remove.
+	(avr_cpu_cpp_builtins): Use DEF_BUILTIN instead of for-loop.
+	* config/avr/avr.c (avr_tolower): New static function.
+	(DEF_BUILTIN): Remove parameter ID.  Prefix ICODE by 'CODE_FOR_'.
+	Stringify NAME, prefix it with "__builtin_avr_" and lowercase it.
+	(avr_expand_builtin): Assert insn_code != CODE_FOR_nothing for
+	default expansion.
+
+2013-01-17  Jan Hubicka  <jh@suse.cz>
+
+	PR tree-optimization/55273
+	* loop-iv.c (iv_number_of_iterations): Consider zero iteration case.
+
+2013-01-17  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/55981
+	* config/i386/sync.md (atomic_store<mode>): Always generate SWImode
+	store through atomic_store<mode>_1.
+	(atomic_store<mode>_1): Macroize insn using SWI mode iterator.
+
+2013-01-17  Martin Jambor  <mjambor@suse.cz>
+
+	PR tree-optimizations/55264
+	* ipa-inline-transform.c (can_remove_node_now_p_1): Never return true
+	for virtual methods.
+	* ipa.c (symtab_remove_unreachable_nodes): Never return true for
+	virtual methods before inlining is over.
+	* cgraph.h (cgraph_only_called_directly_or_aliased_p): Return false for
+	virtual functions.
+	* cgraphclones.c (cgraph_create_virtual_clone): Mark clones as
+	non-virtual.
+
+2013-01-16  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/56005
+	* sched-deps.c (sched_analyze_2): Check deps->readonly for adding
+	pending reads for prefetch.
+
+2013-01-16  Ian Bolton  <ian.bolton@arm.com>
+
+	* config/aarch64/aarch64.md
+	(*cstoresi_neg_uxtw): New pattern.
+	(*cmovsi_insn_uxtw): New pattern.
+	(*<optab>si3_uxtw): New pattern.
+	(*<LOGICAL:optab>_<SHIFT:optab>si3_uxtw): New pattern.
+	(*<optab>si3_insn_uxtw): New pattern.
+	(*bswapsi2_uxtw): New pattern.
+
+2013-01-16  Richard Biener  <rguenther@suse.de>
+
+	* tree-inline.c (tree_function_versioning): Remove set but
+	never used variable.
+
+2013-01-16  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/55964
+	* tree-flow.h (rename_variables_in_loop): Remove.
+	(rename_variables_in_bb): Likewise.
+	* tree-loop-distribution.c (update_phis_for_loop_copy): Remove.
+	(copy_loop_before): Adjust and delete update-ssa status.
+	* tree-vect-loop-manip.c (rename_variables_in_bb): Make static.
+	(rename_variables_in_bb): Likewise.  Properly walk over predecessors.
+	(rename_variables_in_loop): Remove.
+	(slpeel_update_phis_for_duplicate_loop): Likewise.
+	(slpeel_tree_duplicate_loop_to_edge_cfg): Handle nested loops,
+	use available cfg machinery instead of duplicating it.
+	Update PHI nodes and perform poor-mans SSA update here.
+	(slpeel_tree_peel_loop_to_edge): Adjust.
+
+2013-01-16  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/54767
+	PR tree-optimization/53465
+	* tree-vrp.c (vrp_meet_1): Revert original fix for PR53465.
+	(vrp_visit_phi_node): For PHI arguments coming via backedges
+	drop all symbolical range information.
+	(execute_vrp): Compute backedges.
+
+2013-01-16  Richard Biener  <rguenther@suse.de>
+
+	* doc/install.texi: Update CLooG and ISL requirements to
+	0.18.0 and 0.11.1.
+
+2013-01-16  Christian Bruel  <christian.bruel@st.com>
+
+	PR target/55301
+	* config/sh/sh.c (sh_expand_prologue): Postpone new_stack mem symbol.
+	(broken_move): Handle UNSPECV_SP_SWITCH_B.
+	* config/sh/sh.md (sp_switch_1): Use set (reg:SI SP_REG).
+
+2013-01-16  DJ Delorie  <dj@redhat.com>
+
+	* config/sh/sh.md (UNSPECV_SP_SWITCH_B): New.
+	(UNSPECV_SP_SWITCH_E): New.
+	(sp_switch_1): Change to an unspec.
+	(sp_switch_2): Change to an unspec.  Don't use post-inc when we
+	replace $r15.
+
+2013-01-16  Uros Bizjak  <ubizjak@gmail.com>
+
+	* emit-rtl.c (need_atomic_barrier_p): Mask memory model argument
+	with MEMMODEL_MASK before comparing with MEMMODEL_* memory types.
+	* optabs.c (maybe_emit_sync_lock_test_and_set): Ditto.
+	(expand_mem_thread_fence): Ditto.
+	(expand_mem_signal_fence): Ditto.
+	(expand_atomic_load): Ditto.
+	(expand_atomic_store): Ditto.
+
+2013-01-16  Alexandre Oliva  <aoliva@redhat.com>
+
+	PR rtl-optimization/55547
+	PR rtl-optimization/53827
+	PR debug/53671
+	PR debug/49888
+	* alias.c (memrefs_conflict_p): Set sizes to negative after
+	AND adjustments.
+
+2013-01-15  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/55940
+	* function.c (thread_prologue_and_epilogue_insns): Always
+	add crtl->drap_reg to set_up_by_prologue.set, even if
+	stack_realign_drap is false.
+
+2013-01-15  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
+
+	* config/vax/vax.md (add<mode>3, sub<mode>3, mul<mode>3, div<mode>3,
+	and<mode>3, *and<mode>_const_int, ior<mode>3, xor<mode>3, ashrsi3,
+	*call): Fix indention.
+
+2013-01-15  Tom de Vries  <tom@codesourcery.com>
+
+	PR target/55876
+	* optabs.c (widen_operand): Use gen_lowpart instead of gen_rtx_SUBREG.
+	Update comment.
+
+2013-01-15  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/55153
+	* sched-deps.c (sched_analyze_2): Add pending reads for prefetch.
+
+2013-01-15  Martin Jambor  <mjambor@suse.cz>
+
+	PR tree-optimization/55920
+	* tree-sra.c (analyze_access_subtree): Do not mark non-removable
+	accesses as grp_to_be_debug_replaced.
+
+2013-01-15  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/55920
+	* tree-sra.c (sra_modify_assign): If for lacc->grp_to_be_debug_replaced
+	there is non-useless type conversion needed from debug rhs to lhs,
+	use build_debug_ref_for_model and/or VIEW_CONVERT_EXPR.
+
+2013-01-15  Joseph Myers  <joseph@codesourcery.com>
+	    Mikael Pettersson  <mikpe@it.uu.se>
+
+	PR target/43961
+	* config/arm/arm.h (ADDR_VEC_ALIGN): Align SImode jump tables for
+	Thumb.
+	(ASM_OUTPUT_CASE_LABEL): Remove.
+	(ASM_OUTPUT_BEFORE_CASE_LABEL): Define to empty.
+	* final.c (shorten_branches): Update alignment of labels before
+	jump tables if CASE_VECTOR_SHORTEN_MODE.
+
+2013-01-15  Richard Biener  <rguenther@suse.de>
+
+	PR bootstrap/55961
+	* system.h: Do not include gmp.h for building host tools.
+
+2013-01-15  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/55882
+	* emit-rtl.c (set_mem_attributes_minus_bitpos): Correctly
+	account for bitpos when computing alignment.
+
+2013-01-15  Vladimir Yakovlev  <vladimir.b.yakovlev@intel.com>
+
+	* config/i386/i386-c.c (ix86_target_macros_internal): New case.
+	(ix86_target_macros_internal): Likewise.
+
+	* config/i386/i386.c (m_CORE2I7): Removed.
+	(m_CORE_HASWELL): New macro.
+	(m_CORE_ALL): Likewise.
+	(initial_ix86_tune_features): m_CORE2I7 is replaced by m_CORE_ALL.
+	(initial_ix86_arch_features): Likewise.
+	(processor_target_table): Initializations for Core avx2.
+	(cpu_names): New names "core-avx2".
+	(ix86_option_override_internal): Changed PROCESSOR_COREI7 by
+	PROCESSOR_CORE_HASWELL.
+	(ix86_issue_rate): New case.
+	(ia32_multipass_dfa_lookahead): Likewise.
+	(ix86_sched_init_global): Likewise.
+
+	* config/i386/i386.h (TARGET_HASWELL): New macro.
+	(target_cpu_default): New TARGET_CPU_DEFAULT_haswell.
+	(processor_type): New PROCESSOR_HASWELL.
+
+2013-01-15  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/55955
+	* tree-vect-loop.c (vectorizable_reduction): Give up early on
+	*SHIFT_EXPR and *ROTATE_EXPR codes.
+
+	PR tree-optimization/48766
+	* opts.c (common_handle_option): For -fwrapv disable -ftrapv, for
+	-ftrapv disable -fwrapv.
+
+2013-01-14  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR target/55974
+	* config/avr/avr-c.c (avr_cpu_cpp_builtins): Define __FLASH
+	etc. to 1 and not to __flash.
+	Use LL suffix for __INT24_MAX__ with -mint8.
+	Use ULL suffix for __UINT24_MAX__ with -mint8.
+
+2013-01-14  Georg-Johann Lay  <avr@gjlay.de>
+
+	* config/avr/avr-arch.h
+	(struct base_arch_s): Use typedef avr_arch_t instead.
+	(struct arch_info_s): Use typedef avr_arch_info_t instead.
+	(struct mcu_type_s): Use typedef avr_mcu_t instead.
+	* config/avr/avr.c: Same.
+	* config/avr/avr-devices.c: Same.
+	* config/avr/driver-avr.c: Same.
+	* config/avr/gen-avr-mmcu-texi.c: Same.
+	* config/avr/avr-mcus.def: Adjust comment.
+
+2013-01-14  Tejas Belagod  <tejas.belagod@arm.com>
+
+	* config/aarch64/aarch64-simd.md (*aarch64_simd_ld1r<mode>): New.
+	* config/aarch64/iterators.md (VALLDI): New.
+
+2013-01-14  Uros Bizjak  <ubizjak@gmail.com>
+	    Andi Kleen  <ak@linux.intel.com>
+
+	PR target/55948
+	* config/i386/sync.md (atomic_store<mode>_1): New pattern.
+	(atomic_store<mode>): Call atomic_store<mode>_1 for IX86_HLE_RELEASE
+	memmodel flag.
+
+2013-01-14  Georg-Johann Lay  <avr@gjlay.de>
+
+	* config/avr/avr-stdint.h: Remove trailing blanks.
+	* config/avr/avr-log.h: Same.
+	* config/avr/avr-arch.h: Same.
+	* config/avr/avr-devices.c: Same.
+	* config/avr/avr-dimode.md: Same.
+	* config/avr/predicates.md: Same.
+	* config/avr/avr-c.c: Same.  And fix typo.
+
+	* config/avr/avr-protos.h: Same.  And:
+	(function_arg_regno_p): Rename to avr_function_arg_regno_p.
+	(init_cumulative_args): Rename to avr_init_cumulative_args.
+	(expand_prologue): Rename to avr_expand_prologue.
+	(expand_epilogue): Rename to avr_expand_epilogue.
+	(adjust_insn_length): Rename to avr_adjust_insn_length.
+	(notice_update_cc): Rename to avr_notice_update_cc.
+	(final_prescan_insn): Rename to avr_final_prescan_insn.
+	* config/avr/avr.c: Same.
+	* config/avr/avr.h: Same.
+	* config/avr/avr.md: Remove trailing blanks.
+	(prologue): Use avr_expand_prologue.
+	(epilogue, sibcall_epilogue): Use avr_expand_epilogue.
+
+2013-01-14  Richard Biener  <rguenther@suse.de>
+
+	* tree-cfg.c (verify_expr_location, verify_expr_location_1,
+	verify_location, collect_subblocks): New functions.
+	(verify_gimple_in_cfg): Verify that locations only reference
+	BLOCKs in the functions BLOCK tree.
+
+2013-01-14  Richard Biener  <rguenther@suse.de>
+
+	* tree-cfgcleanup.c (remove_forwarder_block): Unshare propagated
+	PHI argument.
+	* graphite-sese-to-poly.c (insert_out_of_ssa_copy): Properly
+	unshare reference.
+	(insert_out_of_ssa_copy_on_edge): Likewise.
+	(rewrite_close_phi_out_of_ssa): Likewise.
+	* tree-ssa.c (insert_debug_temp_for_var_def): Properly unshare
+	debug expressions.
+	* tree-ssa-pre.c (insert_into_preds_of_block): Properly unshare
+	propagated constants.
+	* tree-cfg.c (tree_node_can_be_shared): Handled component-refs
+	can not be shared.
+
+2013-01-14  Georg-Johann Lay  <avr@gjlay.de>
+
+	* config/avr/avr-modes.def: Add GPL copyright notice.
+
+2013-01-13  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/sync.md (mem_thread_fence): Mask operands[0] with
+	MEMMODEL_MASK to determine memory model.
+	(atomic_store<mode>): Ditto from operands[2].
+	* config/i386/i386.c (ix86_memmodel_check): Declare "strong" as bool.
+
+2013-01-13  Jakub Jelinek  <jakub@redhat.com>
+
+	PR fortran/55935
+	* gimple-fold.c (get_symbol_constant_value): Call unshare_expr.
+	(fold_gimple_assign): Don't call unshare_expr here.
+	(fold_ctor_reference): Call unshare_expr.
+
+2013-01-13  Terry Guo  <terry.guo@arm.com>
+
+	* Makefile.in (s-mlib): New argument MULTILIB_REUSE.
+	* doc/fragments.texi: Document MULTILIB_REUSE.
+	* gcc.c (multilib_reuse): New internal spec.
+	(set_multilib_dir): Also search multilib from multilib_reuse.
+	* genmultilib (tmpmultilib3): Refactor code.
+	(tmpmultilib4): Ditto.
+	(multilib_reuse): New multilib argument.
+
+2013-01-13  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* Makefile.in: Update copyright.
+
+2013-01-12  Tom de Vries  <tom@codesourcery.com>
+
+	PR middle-end/55890
+	* calls.c (expand_call): Check if arg_nr is valid.
+
+2013-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
+
+	* doc/extend.texi (X86 Built-in Functions): Add whitespace in
+	__builtin_ia32_paddb256 and __builtin_ia32_pavgb256
+	documentation.  Add missing '__' in front of
+	__builtin_ia32_packssdw256.
+
+2013-01-11  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	PR target/55719
+	* config/s390/s390.c (s390_preferred_reload_class): Do not return
+	NO_REGS for larl operands.
+	(s390_reload_larl_operand): Use s390_load_address instead of
+	emit_move_insn.
+
+2013-01-11  Richard Biener  <rguenther@suse.de>
+
+	* tree-cfg.c (verify_node_sharing_1): Split out from ...
+	(verify_node_sharing): ... here.
+	(verify_gimple_in_cfg): Use verify_node_sharing_1 for walk_tree.
+
+2013-01-11  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* configure.ac (Tree checking): Set TREECHECKING to yes if enabled.
+	Substitute TREECHECKING.
+	* configure: Regenerate.
+	* Makefile.in (TREECHECKING): New.
+
+2013-01-11  Richard Guenther  <rguenther@suse.de>
+
+	PR tree-optimization/44061
+	* tree-vrp.c (extract_range_basic): Compute zero as
+	value-range for __builtin_constant_p of function parameters.
+
+2013-01-10  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	Update copyright years.
+
+2013-01-10  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/55672
+	* lra-eliminations.c (mark_not_eliminable): Permit addition with
+	const to be eliminable.
+
+2013-01-10  David Edelsohn  <dje.gcc@gmail.com>
+
+	* configure.ac (HAVE_AS_TLS): Add check for powerpc-ibm-aix.
+	* configure: Regenerate.
+
+2013-01-10  Richard Biener  <rguenther@suse.de>
+
+	* builtins.c (expand_builtin_init_trampoline): Use set_mem_attributes.
+
+2013-01-10  Richard Biener  <rguenther@suse.de>
+
+	PR bootstrap/55792
+	* tree-into-ssa.c (rewrite_add_phi_arguments): Do not set
+	locations for virtual PHI arguments.
+	(rewrite_update_phi_arguments): Likewise.
+
+2013-01-10  Joel Sherrill  <joel.sherrill@OARcorp.com>
+
+	* config/v850/rtems.h (ASM_SPEC): Pass -m8byte-align and -mgcc-abi
+	on to assembler.
+
+2013-01-10  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/55921
+	* tree-complex.c (expand_complex_asm): New function.
+	(expand_complex_operations_1): Call it for GIMPLE_ASM.
+
+2013-01-10  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	PR target/55718
+	* config/s390/s390.c (s390_symref_operand_p)
+	(s390_loadrelative_operand_p): Merge the two functions.
+	(s390_check_qrst_address, print_operand_address): Add parameters
+	to s390_loadrelative_operand_p invokation.
+	(s390_check_symref_alignment): Use s390_loadrelative_operand_p.
+	(s390_reload_larl_operand, s390_secondary_reload): Use
+	s390_loadrelative_operand_p instead of s390_symref_operand_p.
+	(legitimize_pic_address): Handle @GOTENT and @PLT + addend.
+
+2013-01-09  Mike Stump  <mikestump@comcast.net>
+
+	* dse.c (record_store): Remove unnecessary assert.
+
+2013-01-09  Jan Hubicka  <jh@suse.cz>
+
+	PR tree-optimization/55569
+	* cfgloopmanip.c (scale_loop_profile): Make ITERATION_BOUND gcov_type.
+	* cfgloop.h (scale_loop_profile): Likewise.
+
+2013-01-09  Jan Hubicka  <jh@suse.cz>
+
+	PR lto/45375
+	* ipa-inline.c (ipa_inline): Remove extern inlines and virtual
+	functions.
+	* cgraphclones.c (cgraph_clone_node): Cpoy also LTO file data.
+
+2013-01-09  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	PR middle-end/55114
+	* expr.h (maybe_emit_group_store): Declare.
+	* expr.c (maybe_emit_group_store): New function.
+	* builtins.c (expand_builtin_int_roundingfn): Call it.
+	(expand_builtin_int_roundingfn_2): Likewise.
+
+2013-01-09  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/55829
+	* lra-constraints.c (match_reload): Add code for absent output.
+	(curr_insn_transform): Add code for reloads of matched inputs
+	without output.
+
+2013-01-09  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/sse.md (*vec_interleave_highv2df): Change mode
+	attribute of movddup insn to DF.
+	(*vec_interleave_lowv2df): Ditto.
+	(vec_dupv2df): Ditto.
+
+2013-01-09  Jan Hubicka  <jh@suse.cz>
+
+	PR tree-optimiation/55875
+	* tree-ssa-loop-niter.c (number_of_iterations_cond): Add
+	EVERY_ITERATION parameter.
+	(number_of_iterations_exit): Check if exit is executed every iteration.
+	(idx_infer_loop_bounds): Similarly here.
+	(n_of_executions_at_most): Simplify
+	to only test for cases where statement is dominated by the
+	particular bound; handle correctly the "postdominance" test.
+	(scev_probably_wraps_p): Use max loop iterations info
+	as a global bound first.
+
+2013-01-09  Nguyen Duy Dat  <dat.nguyen.yn@rvc.renesas.com>
+	    Nick Clifton  <nickc@redhat.com>
+
+	* config/v850/v850.md (cbranchsf4): New pattern.
+	(cstoresf4): New pattern.
+	(cbranchdf4): New pattern.
+	(cstoredf4): New pattern.
+	(movsicc): Disallow floating point comparisons.
+	(cmpsf_le_insn): Fix order of operators.
+	(cmpsf_lt_insn): Likewise.
+	(cmpsf_eq_insn): Likewise.
+	(cmpdf_le_insn): Likewise.
+	(cmpdf_lt_insn): Likewise.
+	(cmpdf_eq_insn): Likewise.
+	(cmpsf_ge_insn): Use LE comparison.
+	(cmpdf_ge_insn): Likewise.
+	(cmpsf_gt_insn): Use LT comparison.
+	(cmpdf_gt_insn): Likewise.
+	(cmpsf_ne_insn): Delete pattern.
+	(cmpdf_ne_insn): Delete pattern.
+	* config/v850/v850.c (v850_gen_float_compare): Use
+	gen_cmpdf_eq_insn for NE comparison.
+	(v850_float_z_comparison_operator)
+	(v850_float_nz_comparison_operator): Move from here ...
+	* config/v850/predicates.md: ... to here.  Move GT and GE
+	comparisons into v850_float_z_comparison_operator.
+	* config/v850/v850-protos.h (v850_float_z_comparison_operator):
+	Delete prototype.
+	(v850_float_nz_comparison_operator): Likewise.
+
+2013-01-09  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	* config/pa/pa.c (pa_emit_move_sequence): Replace calls to gen_insv
+	with calls to gen_insvsi/gen_insvdi.
+
+2013-01-09  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>
+
+	* config/i386/i386.c (initial_ix86_tune_features): Set up
+	X86_TUNE_AVX128_OPTIMAL for m_BTVER2.
+
+2013-01-09  Steven Bosscher  <steven@gcc.gnu.org>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/48189
+	* predict.c (predict_loops): If max is 0, don't call compare_tree_int.
+	If nitercst is 0, don't predict the exit edge.
+
+2013-01-08  Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>
+
+	* config/aarch64/aarch64.c (aarch64_print_operand): Replace %r
+	in asm_fprintf with reg_names.
+	(aarch64_print_operand_address): Likewise.
+	(aarch64_return_addr): Likewise.
+	* config/aarch64/aarch64.h (ASM_FPRINTF_EXTENSIONS): Remove.
+
+2013-01-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	* config/pa/pa.h (VAL_U6_BITS_P): Define.
+	(INT_U6_BITS): Likewise.
+	* config/pa/predicates.md (uint6_operand): New predicate.
+	(shift5_operand, shift6_operand): Likewise.
+	* config/pa/pa.md (lshrsi3, rotrsi3): Use shift5_operand instead of
+	arith32_operand.
+	(lshrdi3): Use shift6_operand.
+	(shrpsi4, shrpdi4): New insn patterns.
+	(extzv): Delete expander.
+	(extzvsi, extzvdi): New expanders.  Use uint5_operand and uint6_operand
+	predicates in unamed zero extract patterns.  Tighten common constraint.
+	(extv): Delete expander.
+	(extvsi, extvdi): New expanders.  Use uint5_operand and uint6_operand
+	predicates in unamed sign extract patterns.  Tighten common constraint.
+	(insv): Delete expander.
+	(insvsi, insvdi): New expanders.  Use uint5_operand and uint6_operand
+	predicates in unamed insert patterns.  Tighten common constraint.
+	Change uint32_operand predicate to uint6_operand predicate in unamed
+	DImode pattern to insert constant values of type 1...1xxxx.
+
+2013-01-04  Jan Hubicka  <jh@suse.cz>
+
+	PR tree-optimization/55823
+	* ipa-prop.c (update_indirect_edges_after_inlining): Fix ordering
+	issue.
+
+2013-01-08  Jakub Jelinek  <jakub@redhat.com>
+	    Uros Bizjak  <ubizjak@gmail.com>
+
+	PR rtl-optimization/55845
+	* df-problems.c (can_move_insns_across): Stop scanning at
+	volatile_insn_p source instruction or give up if
+	across_from .. across_to range contains any volatile_insn_p
+	instructions.
+
+2013-01-08  Tejas Belagod  <tejas.belagod@arm.com>
+
+	* config/aarch64/aarch64-simd.md (vec_init<mode>): New.
+	* config/aarch64/aarch64-protos.h (aarch64_expand_vector_init):
+	Declare.
+	* config/aarch64/aarch64.c (aarch64_simd_dup_constant,
+	aarch64_simd_make_constant, aarch64_expand_vector_init): New.
+
+2013-01-08  Jakub Jelinek  <jakub@redhat.com>
+
+	PR fortran/55341
+	* asan.c (asan_clear_shadow): New function.
+	(asan_emit_stack_protection): Use it.
+
+2013-01-08  Tejas Belagod  <tejas.belagod@arm.com>
+
+	* config/aarch64/aarch64-simd.md (aarch64_simd_vec_<su>mult_lo_<mode>,
+	aarch64_simd_vec_<su>mult_hi_<mode>): Separate instruction and operand
+	with tab instead of space.
+
+2013-01-08  Nick Clifton  <nickc@redhat.com>
+
+	* config/rl78/rl78.c (rl78_expand_prologue): Always select
+	register bank 0 at the start of an interrupt handler.
+	* config/rl78/rl78.md (mulsi3_g13): Correct values for MDBL and
+	MDBH registers.
+
+2013-01-08  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* config/aarch64/aarch64-simd.md
+	(aarch64_simd_bsl<mode>_internal): Add floating-point modes.
+	(aarch64_simd_bsl): Likewise.
+	(aarch64_vcond_internal<mode>): Likewise.
+	(vcond<mode><mode>): Likewise.
+	(aarch64_cm<cmp><mode>): Fix constraints, add new modes.
+	* config/aarch64/iterators.md (V_cmp_result): Add V2DF.
+
+2013-01-08  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* config/aarch64/aarch64-builtins.c
+	(aarch64_builtin_vectorized_function): Handle sqrt, sqrtf.
+
+2013-01-08  Martin Jambor  <mjambor@suse.cz>
+
+	PR debug/55579
+	* tree-sra.c (analyze_access_subtree): Return true also after
+	potentially creating a debug-only replacement.
+
+2013-01-08  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/55890
+	* tree-ssa-ccp.c (evaluate_stmt): Use gimple_call_builtin_p.
+
+	PR tree-optimization/54120
+	* tree-vrp.c (range_fits_type_p): Don't allow
+	src_precision < precision from signed vr to unsigned_p
+	if vr->min or vr->max is negative.
+	(simplify_float_conversion_using_ranges): Test can_float_p
+	against CODE_FOR_nothing.
+
+2013-01-08  Jakub Jelinek  <jakub@redhat.com>
+	    Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/55851
+	* fold-const.c (int_binop_types_match_p): Allow all INTEGRAL_TYPE_P
+	types instead of just INTEGER_TYPE types.
+
+2013-01-07  Mark Kettenis  <kettenis@openbsd.org>
+
+	* config/i386/openbsdelf.h (LIBGCC2_HAS_TF_MODE, LIBGCC2_TF_CEXT,
+	TF_SIZE): Define.
+
+2013-01-07  Steve Ellcey  <sellcey@mips.com>
+
+	PR target/42661
+	* config/mips/mips.opt: Change mad to mmad to match documentation.
+
+2013-01-07  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR target/55897
+	* doc/extend.texi (AVR Named Address Spaces): __memx goes into
+	.progmemx.data now.
+
+2013-01-07  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR target/55897
+	* config/avr/avr.h (ADDR_SPACE_COUNT): New enum.
+	(avr_addrspace_t): Add .section_name field.
+	* config/avr/avr.c (progmem_section): Use ADDR_SPACE_COUNT as
+	array size.
+	(avr_addrspace): Same.  Initialize .section_name.  Remove last
+	NULL entry.  Put __memx into .progmemx.data.
+	(progmem_section_prefix): Remove.
+	(avr_asm_init_sections): No need to initialize progmem_section.
+	(avr_asm_named_section): Use avr_addrspace[].section_name to get
+	section name prefix.
+	(avr_asm_select_section): Ditto.  And use get_unnamed_section to
+	retrieve the progmem section.
+	* avr-c.c (avr_cpu_cpp_builtins): Use ADDR_SPACE_COUNT as loop
+	boundary to run over avr_addrspace[].
+	(avr_register_target_pragmas): Ditto.
+
+2013-01-06  Jakub Jelinek  <jakub@redhat.com>
+
+	* varasm.c (output_constant_def_contents): For asan_protect_global
+	protected strings, adjust DECL_ALIGN if needed, before testing for
+	anchored symbols.
+	(place_block_symbol): Adjust size for asan protected STRING_CSTs if
+	TREE_CONSTANT_POOL_ADDRESS_P.  Increase alignment for asan protected
+	normal decls.
+	(output_object_block): For asan protected decls, emit asan padding
+	after their contents.
+	* asan.c (asan_protect_global): Don't check TREE_ASM_WRITTEN here.
+	(asan_finish_file): Test it here instead.
+
+2013-01-07  Nick Clifton  <nickc@redhat.com>
+	    Matthias Klose  <doko@debian.org>
+	    Doug Kwan  <dougkwan@google.com>
+	    H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR driver/55470
+	* collect2.c (main): Support -fuse-ld=bfd and -fuse-ld=gold.
+
+	* common.opt: Add fuse-ld=bfd and fuse-ld=gold.
+
+	* gcc.c (LINK_COMMAND_SPEC): Pass -fuse-ld=* to collect2.
+
+	* opts.c (comman_handle_option): Ignore -fuse-ld=bfd and -fuse-ld=gold.
+
+	* doc/invoke.texi: Document -fuse-ld=bfd and -fuse-ld=gold.
+
+2013-01-07  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR target/54461
+	* doc/install.texi (Cross-Compiler-Specific Options): Document
+	--with-avrlibc.
+
+2013-01-07  Tejas Belagod  <tejas.belagod@arm.com>
+
+	* config/aarch64/arm_neon.h (vmovn_high_is16, vmovn_high_s32,
+	vmovn_high_s64, vmovn_high_u16, vmovn_high_u32, vmovn_high_u64,
+	vqmovn_high_s16, vqmovn_high_s32, vqmovn_high_s64, vqmovn_high_u16,
+	vqmovn_high_u32, vqmovn_high_u64, vqmovun_high_s16, vqmovun_high_s32,
+	vqmovun_high_s64): Fix source operand number and update copyright.
+
+2013-01-07  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/55890
+	* gimple.h (gimple_call_builtin_p): New overload.
+	* gimple.c (validate_call): New function.
+	(gimple_call_builtin_p): Likewise.
+	* tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
+	Use gimple_call_builtin_p.
+	(find_func_clobbers): Likewise.
+	* tree-ssa-strlen.c (adjust_last_stmt): Likewise.
+	(strlen_optimize_stmt): Likewise.
+
+2013-01-07  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* config/aarch64/arm_neon.h (vld1_dup_*): Make argument const.
+	(vld1q_dup_*): Likewise.
+	(vld1_*): Likewise.
+	(vld1q_*): Likewise.
+	(vld1_lane_*): Likewise.
+	(vld1q_lane_*): Likewise.
+
+2013-01-07  Richard Biener  <rguenther@suse.de>
+
+	* lto-streamer.h (LTO_minor_version): Bump to 2.
+
+2013-01-07  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* config/aarch64/aarch64-protos.h
+	(aarch64_const_double_zero_rtx_p): Rename to...
+	(aarch64_float_const_zero_rtx_p): ...this.
+	(aarch64_float_const_representable_p): New.
+	(aarch64_output_simd_mov_immediate): Likewise.
+	* config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>): Refactor
+	move immediate case.
+	* config/aarch64/aarch64.c
+	(aarch64_const_double_zero_rtx_p): Rename to...
+	(aarch64_float_const_zero_rtx_p): ...this.
+	(aarch64_print_operand): Allow printing of new constants.
+	(aarch64_valid_floating_const): New.
+	(aarch64_legitimate_constant_p): Check for valid floating-point
+	constants.
+	(aarch64_simd_valid_immediate): Likewise.
+	(aarch64_vect_float_const_representable_p): New.
+	(aarch64_float_const_representable_p): Likewise.
+	(aarch64_simd_imm_zero_p): Also allow for floating-point 0.0.
+	(aarch64_output_simd_mov_immediate): New.
+	* config/aarch64/aarch64.md (*movsf_aarch64): Add new alternative.
+	(*movdf_aarch64): Likewise.
+	* config/aarch64/constraints.md (Ufc): New.
+	(Y): call aarch64_float_const_zero_rtx.
+	* config/aarch64/predicates.md (aarch64_fp_compare_operand): New.
+
+2013-01-07  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/55888
+	PR tree-optimization/55862
+	* tree-ssa-pre.c (phi_translate_1): Revert previous change.
+	(valid_in_sets): Check if a NAME has a leader in AVAIL_OUT,
+	not if it is contained therein.
+
+2013-01-07  Georg-Johann Lay  <avr@gjlay.de>
+
+	* config/avr/t-avr: Typo.
+
+2013-01-07  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR55243
+	* config/avr/t-avr: Don't automatically rebuild
+	$(srcdir)/config/avr/t-multilib
+	$(srcdir)/config/avr/avr-tables.opt
+	$(srcdir)/doc/avr-mmcu.texi
+	(avr-mcus): New phony target to build them on request.
+	(s-avr-mlib, s-avr-mmcu-texi): Remove.
+	* avr/avr-mcus.def: Adjust comments.
+
+2013-01-07  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/i386.c (DEFAULT_PCC_STRUCT_RETURN): Remove.
+
+2013-01-06  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* file-find.c, file-find.h, realmpfr.c: Add FSF as copyright holder.
+
+2013-01-06  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* config/tilepro/gen-mul-tables.cc: Put copyright on one line.
+
+2013-01-05  David Edelsohn  <dje.gcc@gmail.com>
+
+	* config/rs6000/aix53.h (LIB_SPEC): Add -lpthreads when compiling
+	to generate profiling.
+	* config/rs6000/aix64.h (LIB_SPEC): Same.
+
+2013-01-04  Andrew Pinski  <apinski@cavium.com>
+
+	* config/aarch64/aarch64.c (aarch64_fixed_condition_code_regs):
+	New function.
+	(TARGET_FIXED_CONDITION_CODE_REGS): Define.
+
+2013-01-04  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/i386.c (ix86_legitimize_address): Call convert_to_mode
+	unconditionally.
+	(ix86_expand_move): Ditto.
+	(ix86_zero_extend_to_Pmode): Ditto.
+	(ix86_expand_call): Ditto.
+	(ix86_expand_special_args_builtin): Ditto.
+	(ix86_expand_builtin): Ditto.
+
+2013-01-04  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/55862
+	* tree-ssa-pre.c (phi_translate_1): Valueize SSA names after
+	translating them through PHI nodes.
+
+2013-01-04  Martin Jambor  <mjambor@suse.cz>
+
+	PR tree-optimization/55755
+	* tree-sra.c (sra_modify_assign): Do not check that an access has no
+	children when trying to avoid producing a VIEW_CONVERT_EXPR.
+
+2013-01-04  Marek Polacek  <polacek@redhat.com>
+
+	PR middle-end/55859
+	* opts.c (default_options_optimization): Clarify error message.
+
+2013-01-04  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/55863
+	* fold-const.c (split_tree): Undo -X - 1 to ~X folding for
+	reassociation.
+
+2013-01-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	PR target/53789
+	* config/pa/pa.md (movsi): Revert previous change.
+	* config/pa/pa.c (pa_legitimate_constant_p): Reject all TLS symbol
+	references.
+
+2013-01-03  Richard Henderson  <rth@redhat.com>
+
+	* config/i386/i386.c (ix86_expand_move): Always assign to op1
+	after eliminating TLS symbols.
+
+2013-01-03  Marc Glisse  <marc.glisse@inria.fr>
+
+	PR bootstrap/50167
+	* graphite-interchange.c (pdr_stride_in_loop): Use gmp_fprintf.
+	* graphite-poly.c (debug_gmp_value): Likewise.
+
+2013-01-03  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/55712
+	* config/i386/i386-c.c (ix86_target_macros_internal): Depending on
+	selected code model, define __code_mode_small__, __code_model_medium__,
+	__code_model_large__, __code_model_32__ or __code_model_kernel__.
+	* config/i386/cpuid.h (__cpuid, __cpuid_count) [__i386__]: Prefix
+	xchg temporary register with %k.  Declare temporary register as
+	early clobbered.
+	[__x86_64__]: For medium and large code models, preserve %rbx register.
+
+2013-01-03  Richard Biener  <rguenther@suse.de>
+
+	* tree-data-ref.c (dump_conflict_function): Use less vertical spacing.
+	(dump_subscript): Adjust.
+	(finalize_ddr_dependent): Do not dump redundant info.
+	(analyze_siv_subscript): Adjust.
+	(subscript_dependence_tester): Likewise.
+	(compute_affine_dependence): Likewise.
+
+2013-01-03  Richard Biener  <rguenther@suse.de>
+
+	Revert
+	2013-01-03  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/55857
+	* tree-vect-stmts.c (vectorizable_load): Do not setup
+	re-alignment for invariant loads.
+
+	2013-01-02  Richard Biener  <rguenther@suse.de>
+
+	* tree-vect-stmts.c (vectorizable_load): When vectorizing an
+	invariant load do not generate a vector load from the scalar location.
+
+2013-01-03  Richard Biener  <rguenther@suse.de>
+
+	* tree-vect-loop.c (vect_analyze_loop_form): Clarify reason
+	for not vectorizing.
+	* tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref): Do
+	not build INDIRECT_REFs, call get_name once only.
+	(vect_create_data_ref_ptr): Likewise.  Dump base object kind
+	based on DR_BASE_OBJECT, not DR_BASE_ADDRESS.
+
+2013-01-03  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/55857
+	* tree-vect-stmts.c (vectorizable_load): Do not setup
+	re-alignment for invariant loads.
+
+2013-01-03  Richard Biener  <rguenther@suse.de>
+
+	PR lto/55848
+	* lto-symtab.c (lto_symtab_merge_decls_1): As last resort, always
+	prefer a built-in decl.
+
+2013-01-03  Jakub Jelinek  <jakub@redhat.com>
+
+	* gcc.c (process_command): Update copyright notice dates.
+	* gcov.c (print_version): Likewise.
+	* gcov-dump.c (print_version): Likewise.
+
+	PR rtl-optimization/55838
+	* loop-iv.c (iv_number_of_iterations): Call lowpart_subreg on
+	iv0.step, iv1.step and step.
+
+2013-01-03  Jakub Jelinek  <jakub@redhat.com>
+	    Marc Glisse  <marc.glisse@inria.fr>
+
+	PR tree-optimization/55832
+	* fold-const.c (fold_binary_loc): For ABS_EXPR<x> >= 0 and
+	ABS_EXPR<x> < 0 folding use constant_boolean_node instead of
+	integer_{one,zero}_node.
+
+2013-01-03  Jakub Jelinek  <jakub@redhat.com>
+
+	PR debug/54402
+	* params.def (PARAM_MAX_VARTRACK_REVERSE_OP_SIZE): New param.
+	* var-tracking.c (reverse_op): Don't add reverse ops to
+	VALUEs that have already
+	PARAM_VALUE (PARAM_MAX_VARTRACK_REVERSE_OP_SIZE) or longer locs list.
+
+2013-01-02  Gerald Pfeifer  <gerald@pfeifer.com>
+
+	* doc/contrib.texi: Note years as release manager for Mark Mitchell.
+
+2013-01-02  Teresa Johnson  <tejohnson@google.com>
+
+	* dumpfile.c (dump_loc): Print filename with location.
+	* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Use
+	new location_t parameter to emit complete unroll message with
+	new dump framework.
+	(canonicalize_loop_induction_variables): Compute loops location
+	and pass to try_unroll_loop_completely.
+	* loop-unroll.c (report_unroll_peel): New function.
+	(peel_loops_completely): Use new dump format with location
+	for main dumpfile message, and invoke report_unroll_peel on success.
+	(decide_unrolling_and_peeling): Ditto.
+	(decide_peel_once_rolling): Remove old dumpfile message subsumed
+	by report_unroll_peel.
+	(decide_peel_completely): Ditto.
+	(decide_unroll_constant_iterations): Ditto.
+	(decide_unroll_runtime_iterations): Ditto.
+	(decide_peel_simple): Ditto.
+	(decide_unroll_stupid): Ditto.
+	* cfgloop.c (get_loop_location): New function.
+	* cfgloop.h (get_loop_location): Declare.
+
+2013-01-02  Sriraman Tallam  <tmsriram@google.com>
+
+	* config/i386/i386.c (fold_builtin_cpu): Remove unnecessary checks for
+	NULL.
+
+2013-01-02  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	PR middle-end/55198
+	* expr.c (expand_expr_real_1): Don't use bitfield extraction for non
+	BLKmode objects when EXPAND_MEMORY is specified.
+
+2013-01-02  Sriraman Tallam  <tmsriram@google.com>
+
+	* config/i386/i386.c (ix86_get_function_versions_dispatcher): Fix bug
+	in loop predicate.
+	(fold_builtin_cpu): Do not share cpu model decls across statements.
+
+2013-01-02  Jason Merrill  <jason@redhat.com>
+
+	PR c++/55804
+	* tree.c (build_array_type_1): Revert earlier change.
+
+2013-01-02  Yufeng Zhang  <yufeng.zhang@arm.com>
+
+	* config/aarch64/aarch64-cores.def: Add entries for "cortex-a53" and
+	"cortex-a57".
+	* config/aarch64/aarch64-tune.md: Re-generate.
+
+2013-01-02  Richard Biener  <rguenther@suse.de>
+
+	* tree-vect-stmts.c (vectorizable_load): When vectorizing an
+	invariant load do not generate a vector load from the scalar location.
+
+2013-01-02  Richard Biener  <rguenther@suse.de>
+
+	PR bootstrap/55784
+	* configure.ac: Add $GMPINC to CFLAGS/CXXFLAGS.
+	* configure: Regenerate.
+
+2013-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* builtins.c (expand_builtin_mathfn, expand_builtin_mathfn_2)
+	(expand_builtin_mathfn_ternary, expand_builtin_mathfn_3)
+	(expand_builtin_int_roundingfn_2): Keep the original target around
+	for the fallback case.
+
+2013-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* tree-vrp.c (range_fits_type_p): Require the MSB of the double_int
+	to be clear for sign changes.
+
+2013-01-01  Jan Hubicka  <jh@suse.cz>
+
+	* ipa-inline-analysis.c: Fix formatting.
+
+2013-01-01  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/55831
+	* tree-vect-loop.c (get_initial_def_for_induction): Use
+	gsi_after_labels instead of gsi_start_bb.
+
+Copyright (C) 2013 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index a892548..8ef6dd1 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20130905
+20131105
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index fa5a67a..ff4efc7 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -123,7 +123,8 @@
 
 # Selection of languages to be made.
 CONFIG_LANGUAGES = @all_selected_languages@
-LANGUAGES = c gcov$(exeext) gcov-dump$(exeext) $(CONFIG_LANGUAGES)
+LANGUAGES = c gcov$(exeext) gcov-dump$(exeext) gcov-tool$(exeext) \
+            $(CONFIG_LANGUAGES)
 
 # Default values for variables overridden in Makefile fragments.
 # CFLAGS is for the user to override to, e.g., do a cross build with -O2.
@@ -194,6 +195,7 @@
 build/gengtype-lex.o-warn = -Wno-error
 gengtype-lex.o-warn = -Wno-error
 expmed.o-warn = -Wno-error
+libgcov-util.o-warn = -Wno-error
 
 # All warnings have to be shut off in stage1 if the compiler used then
 # isn't gcc; configure determines that.  WARN_CFLAGS will be either
@@ -755,6 +757,7 @@
 CPP_INSTALL_NAME := $(shell echo cpp|sed '$(program_transform_name)')
 GCOV_INSTALL_NAME := $(shell echo gcov|sed '$(program_transform_name)')
 PROFILE_TOOL_INSTALL_NAME := $(shell echo profile_tool|sed '$(program_transform_name)')
+GCOV_TOOL_INSTALL_NAME := $(shell echo gcov-tool|sed '$(program_transform_name)')
 
 # Setup the testing framework, if you have one
 EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
@@ -1481,7 +1484,8 @@
 
 ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \
   $(OBJS-libcommon-target) @TREEBROWSER@ main.o c-family/cppspec.o \
-  $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS)
+  $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \
+  $(GCOV_TOOL_OBJS)
 
 # This lists all host object files, whether they are included in this
 # compilation or not.
@@ -1506,6 +1510,7 @@
  $(SPECS) collect2$(exeext) gcc-ar$(exeext) gcc-nm$(exeext) \
  gcc-ranlib$(exeext) \
  gcov-iov$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \
+ gcov-tool$(exeect) \
  gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a \
  libcommon-target.a libcommon.a libgcc.mk
 
@@ -2381,7 +2386,7 @@
    $(SYSTEM_H) coretypes.h $(TREE_H) $(GIMPLE_H) $(BASIC_BLOCK_H) \
    $(TREE_PASS_H) $(CFGLOOP_H) $(TREE_PRETTY_PRINT_H) \
    $(GIMPLE_PRETTY_PRINT_H) alloc-pool.h $(TREE_FLOW_H) domwalk.h \
-   pointer-set.h expmed.h
+   pointer-set.h expmed.h $(PARAMS_H)
 tree-vrp.o : tree-vrp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
    $(TREE_FLOW_H) $(TREE_PASS_H) $(DIAGNOSTIC_CORE_H) $(GGC_H) \
    $(BASIC_BLOCK_H) tree-ssa-propagate.h $(FLAGS_H) $(TREE_DUMP_H) \
@@ -2409,7 +2414,7 @@
    $(TM_H) coretypes.h $(TREE_PASS_H) $(FLAGS_H) alloc-pool.h \
    $(BASIC_BLOCK_H) $(BITMAP_H) $(CFGLOOP_H) $(HASHTAB_H) \
    $(GIMPLE_H) $(TREE_INLINE_H) tree-iterator.h \
-   $(GIMPLE_PRETTY_PRINT_H)
+   $(GIMPLE_PRETTY_PRINT_H) $(PARAMS_H)
 tree-nested.o: tree-nested.c $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TREE_H) \
    $(TM_P_H) $(FUNCTION_H) $(TREE_DUMP_H) $(TREE_INLINE_H) \
    tree-iterator.h $(GIMPLE_H) $(CGRAPH_H) $(EXPR_H) langhooks.h \
@@ -2593,7 +2598,7 @@
    $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) dumpfile.h \
    $(CFGLOOP_H) $(EXPR_H) $(RECOG_H) $(OPTABS_H) \
    $(DIAGNOSTIC_CORE_H) $(SCEV_H) $(TREE_VECTORIZER_H) \
-   $(GIMPLE_PRETTY_PRINT_H) $(TARGET_H) $(TREE_DATA_REF_H)
+   $(GIMPLE_PRETTY_PRINT_H) $(TARGET_H) $(TREE_DATA_REF_H) $(PARAMS_H)
 tree-vect-loop-manip.o: tree-vect-loop-manip.c $(CONFIG_H) $(SYSTEM_H) \
    coretypes.h dumpfile.h $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) \
    $(TREE_FLOW_H) $(CFGLOOP_H) $(DIAGNOSTIC_CORE_H) \
@@ -2753,7 +2758,7 @@
    output.h $(DIAGNOSTIC_CORE_H) xcoffout.h debug.h $(GGC_H) $(TM_P_H) \
    $(HASHTAB_H) $(TARGET_H) langhooks.h gt-varasm.h $(BASIC_BLOCK_H) \
    $(CGRAPH_H) $(TARGET_DEF_H) tree-mudflap.h \
-   pointer-set.h $(COMMON_TARGET_H) asan.h l-ipo.h
+   pointer-set.h $(COMMON_TARGET_H) asan.h l-ipo.h $(PARAMS_H)
 function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \
    $(TREE_H) $(GIMPLE_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) \
    $(OPTABS_H) $(LIBFUNCS_H) $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \
@@ -2937,7 +2942,7 @@
    $(TREE_H) langhooks.h $(TREE_INLINE_H) $(FLAGS_H) $(CGRAPH_H) intl.h \
    $(TREE_PASS_H) \
    $(HASHTAB_H) $(COVERAGE_H) $(GGC_H) $(TREE_FLOW_H) $(IPA_PROP_H) \
-   $(TREE_PASS_H) l-ipo.h
+   $(TREE_PASS_H) l-ipo.h $(PARAMS_H)
 ipa-utils.o : ipa-utils.c $(IPA_UTILS_H) $(CONFIG_H) $(SYSTEM_H) \
    coretypes.h dumpfile.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) \
    langhooks.h pointer-set.h $(GGC_H) $(GIMPLE_H) $(SPLAY_TREE_H) \
@@ -2959,7 +2964,7 @@
    $(FUNCTION_H) $(BASIC_BLOCK_H) toplev.h $(DIAGNOSTIC_CORE_H) $(GGC_H) langhooks.h $(COVERAGE_H) \
    tree-iterator.h $(CGRAPH_H) gcov-io.c $(TM_P_H) \
    $(DIAGNOSTIC_CORE_H) intl.h gt-coverage.h $(TARGET_H) $(HASH_TABLE_H) l-ipo.h \
-   $(AUTO_PROFILE_H)
+   $(AUTO_PROFILE_H) $(PARAMS_H)
 auto-profile.o : auto-profile.c $(CONFIG_H) $(SYSTEM_H) $(FLAGS_H) \
    $(BASIC_BLOCK_H) $(DIAGNOSTIC_CORE_H) $(GCOV_IO_H) $(INPUT_H) profile.h \
    $(LANGHOOKS_H) $(OPTS_H) $(TREE_PASS_H) $(CGRAPH_H) $(GIMPLE_H) value-prof.h \
@@ -3091,19 +3096,19 @@
 profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h $(TM_H) $(RTL_H) \
    $(TREE_H) $(FLAGS_H) $(REGS_H) $(EXPR_H) $(FUNCTION_H) $(BASIC_BLOCK_H) \
    $(DIAGNOSTIC_CORE_H) $(COVERAGE_H) $(TREE_FLOW_H) value-prof.h \
-   $(CFGLOOP_H) profile.h
+   $(CFGLOOP_H) profile.h $(PARAMS_H)
 mcf.o : mcf.c profile.h $(CONFIG_H) $(SYSTEM_H) $(TM_H) coretypes.h dumpfile.h \
-   $(BASIC_BLOCK_H) langhooks.h $(GCOV_IO_H) $(TREE_H) 
+   $(BASIC_BLOCK_H) langhooks.h $(GCOV_IO_H) $(TREE_H) $(PARAMS_H)
 tree-profile.o : tree-profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) $(TARGET_H) $(TREE_H) $(FLAGS_H) $(FUNCTION_H) \
    $(BASIC_BLOCK_H) $(DIAGNOSTIC_CORE_H) $(COVERAGE_H) $(TREE_H) value-prof.h \
-   $(TREE_PASS_H) $(TREE_FLOW_H) gt-tree-profile.h $(CGRAPH_H)
+   $(TREE_PASS_H) $(TREE_FLOW_H) gt-tree-profile.h $(CGRAPH_H) $(PARAMS_H)
 value-prof.o : value-prof.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h $(TM_H) \
    $(BASIC_BLOCK_H) hard-reg-set.h profile.h value-prof.h $(EXPR_H) $(FLAGS_H) \
    $(RECOG_H) insn-config.h $(OPTABS_H) $(REGS_H) $(GGC_H) $(DIAGNOSTIC_H) \
    $(TREE_H) $(COVERAGE_H) $(RTL_H) $(GCOV_IO_H) $(TREE_FLOW_H) \
    tree-flow-inline.h $(TIMEVAR_H) $(DIAGNOSTIC_CORE_H) pointer-set.h \
-   $(GIMPLE_PRETTY_PRINT_H) l-ipo.h
+   $(GIMPLE_PRETTY_PRINT_H) l-ipo.h $(PARAMS_H)
 loop-doloop.o : loop-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h $(TM_H) \
    $(RTL_H) $(FLAGS_H) $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) \
    $(DIAGNOSTIC_CORE_H) $(CFGLOOP_H) $(PARAMS_H) $(TARGET_H)
@@ -3129,7 +3134,7 @@
    $(FUNCTION_H) $(EXCEPT_H) $(TM_P_H) $(INSN_ATTR_H) \
    insn-config.h $(EXPR_H) \
    $(CFGLOOP_H) $(OBSTACK_H) $(TARGET_H) $(TREE_H) \
-   $(TREE_PASS_H) $(DF_H) $(GGC_H) $(COMMON_TARGET_H) gt-cfgrtl.h
+   $(TREE_PASS_H) $(DF_H) $(GGC_H) $(COMMON_TARGET_H) gt-cfgrtl.h bb-reorder.h
 cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(BASIC_BLOCK_H) \
    $(TIMEVAR_H) sbitmap.h $(BITMAP_H)
 cfgbuild.o : cfgbuild.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
@@ -3422,7 +3427,7 @@
    $(TREE_PASS_H) $(DF_H) $(DBGCNT_H)
 l-ipo.o : l-ipo.c l-ipo.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
     toplev.h $(LANGHOOKS_DEF_H) $(DIAGNOSTIC_H) debug.h $(GIMPLE_H) \
-    $(CGRAPH_H) $(GGC_H)
+    $(CGRAPH_H) $(GGC_H) $(PARAMS_H)
 params.o : params.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(COMMON_TARGET_H) \
    $(PARAMS_H) $(DIAGNOSTIC_CORE_H)
 pointer-set.o: pointer-set.c pointer-set.h $(CONFIG_H) $(SYSTEM_H)
@@ -4073,6 +4078,31 @@
 gcov-dump$(exeext): $(GCOV_DUMP_OBJS) $(LIBDEPS)
 	+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GCOV_DUMP_OBJS) \
 		$(LIBS) -o $@
+
+libgcov-util.o: $(srcdir)/../libgcc/libgcov-util.c gcov-io.c $(GCOV_IO_H) \
+  $(srcdir)/../libgcc/libgcov-driver.c $(srcdir)/../libgcc/libgcov-driver-system.c \
+  $(srcdir)/../libgcc/libgcov-merge.c $(srcdir)/../libgcc/libgcov.h \
+  $(SYSTEM_H) coretypes.h $(TM_H) $(CONFIG_H) version.h intl.h $(DIAGNOSTIC_H)
+	+$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -o $@ $<
+dyn-ipa.o: $(srcdir)/../libgcc/dyn-ipa.c gcov-io.c $(srcdir)/../libgcc/libgcov.h \
+   $(GCOV_IO_H) $(SYSTEM_H) coretypes.h \
+   $(TM_H) $(CONFIG_H) version.h intl.h $(DIAGNOSTIC_H)
+	+$(COMPILER) -DIN_GCOV_TOOL -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
+	  $(INCLUDES) -o $@ $<
+
+GCOV_TOOL_OBJS = gcov-tool.o libgcov-util.o dyn-ipa.o gcov-params.o
+gcov-tool.o: gcov-tool.c $(GCOV_IO_H) intl.h $(SYSTEM_H) coretypes.h $(TM_H) \
+   $(CONFIG_H) version.h $(DIAGNOSTIC_H)
+	+$(COMPILER) -c $(ALL_CPPFLAGS) \
+	  $(filter-out -fprofile-generate -fprofile-use,$(ALL_COMPILERFLAGS)) \
+	  $(INCLUDES) -o $@ $<
+gcov-params.o: params.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(COMMON_TARGET_H) \
+   $(PARAMS_H) $(DIAGNOSTIC_CORE_H)
+	+$(COMPILER) -DIN_GCOV_TOOL -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
+	  $(INCLUDES) -o $@ $<
+gcov-tool$(exeext): $(GCOV_TOOL_OBJS) $(LIBDEPS)
+	+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GCOV_TOOL_OBJS) \
+	  $(LIBS) -o $@
 #
 # Build the include directories.  The stamp files are stmp-* rather than
 # s-* so that mostlyclean does not force the include directory to
@@ -4700,6 +4730,13 @@
 	    $(INSTALL_PROGRAM) $(srcdir)/../contrib/profile_tool \
 	    $(DESTDIR)$(bindir)/$(PROFILE_TOOL_INSTALL_NAME)$(exeext); \
 	fi
+# Install gcov-tool if it was compiled.
+	-if [ -f gcov-tool$(exeext) ]; \
+	then \
+	    rm -f $(DESTDIR)$(bindir)/$(GCOV_TOOL_INSTALL_NAME)$(exeext); \
+	    $(INSTALL_PROGRAM) \
+	    gcov-tool$(exeext) $(DESTDIR)$(bindir)/$(GCOV_TOOL_INSTALL_NAME)$(exeext); \
+	fi
 
 # Install the driver program as $(target_noncanonical)-gcc,
 # $(target_noncanonical)-gcc-$(version)
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index edecddf..24479a3 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,41 @@
+2013-10-19  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gcc-interface/utils.c (scale_by_factor_of): New function.
+	(rest_of_record_type_compilation): Use scale_by_factor_of in order to
+	scale the original offset for both rounding cases; in the second case,
+	take into accout the addend to compute the alignment.  Tidy up.
+
+2013-10-19  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gcc-interface/utils.c (gnat_set_type_context): New function.
+	(gnat_pushdecl): Use it to set the context of the type.
+
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
+2013-10-13  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gcc-interface/decl.c (gnat_to_gnu_param): Remove obsolete comment.
+
+2013-09-18  Eric Botcazou  <ebotcazou@adacore.com>
+
+	PR ada/58264
+	* gcc-interface/trans.c (Attribute_to_gnu): Define GNAT_PREFIX local
+	variable and use it throughout.
+	<Attr_Length>: Note whether the prefix is the dereference of a pointer
+	to unconstrained array and, in this case, capture the result for both
+	Attr_First and Attr_Last.
+
+2013-09-18  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gcc-interface/trans.c (gigi): Remove dead code.
+
+2013-09-18  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gcc-interface/trans.c (Subprogram_Body_to_gnu): Pop the stack of
+	return variables for subprograms using the CICO mechanism.
+
 2013-08-13  Eric Botcazou  <ebotcazou@adacore.com>
 
 	* gcc-interface/trans.c (can_equal_min_or_max_val_p): Be prepared for
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 5bdab9d..5a68e8e 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -5763,12 +5763,8 @@
 				 ro_param || by_ref || by_component_ptr);
   DECL_BY_REF_P (gnu_param) = by_ref;
   DECL_BY_COMPONENT_PTR_P (gnu_param) = by_component_ptr;
-  DECL_BY_DESCRIPTOR_P (gnu_param) = (mech == By_Descriptor ||
-                                      mech == By_Short_Descriptor);
-  /* Note that, in case of a parameter passed by double reference, the
-     DECL_POINTS_TO_READONLY_P flag is meant for the second reference.
-     The first reference always points to read-only, as it points to
-     the second reference, i.e. the reference to the actual parameter.  */
+  DECL_BY_DESCRIPTOR_P (gnu_param)
+    = (mech == By_Descriptor || mech == By_Short_Descriptor);
   DECL_POINTS_TO_READONLY_P (gnu_param)
     = (ro_param && (by_ref || by_component_ptr));
   DECL_CAN_NEVER_BE_NULL_P (gnu_param) = Can_Never_Be_Null (gnat_param);
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 256827d..779174a 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -286,9 +286,6 @@
   tree int64_type = gnat_type_for_size (64, 0);
   struct elab_info *info;
   int i;
-#ifdef ORDINARY_MAP_INSTANCE
-  struct line_map *map;
-#endif
 
   max_gnat_nodes = max_gnat_node;
 
@@ -303,10 +300,6 @@
 
   type_annotate_only = (gigi_operating_mode == 1);
 
-  /* ??? Disable the generation of the SCO instance table until after the
-     back-end supports instance based debug info discriminators.  */
-  Generate_SCO_Instance_Table = False;
-
   for (i = 0; i < number_file; i++)
     {
       /* Use the identifier table to make a permanent copy of the filename as
@@ -326,11 +319,6 @@
       /* We create the line map for a source file at once, with a fixed number
 	 of columns chosen to avoid jumping over the next power of 2.  */
       linemap_add (line_table, LC_ENTER, 0, filename, 1);
-#ifdef ORDINARY_MAP_INSTANCE
-      map = LINEMAPS_ORDINARY_MAP_AT (line_table, i);
-      if (flag_debug_instances)
-	ORDINARY_MAP_INSTANCE (map) = file_info_ptr[i].Instance;
-#endif
       linemap_line_start (line_table, file_info_ptr[i].Num_Source_Lines, 252);
       linemap_position_for_column (line_table, 252 - 1);
       linemap_add (line_table, LC_LEAVE, 0, NULL, 0);
@@ -1277,6 +1265,7 @@
 static tree
 Attribute_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, int attribute)
 {
+  const Node_Id gnat_prefix = Prefix (gnat_node);
   tree gnu_prefix, gnu_type, gnu_expr;
   tree gnu_result_type, gnu_result = error_mark_node;
   bool prefix_unused = false;
@@ -1286,13 +1275,13 @@
      parameter types might be incomplete types coming from a limited with.  */
   if (Ekind (Etype (gnat_node)) == E_Access_Subprogram_Type
       && Is_Dispatch_Table_Entity (Etype (gnat_node))
-      && Nkind (Prefix (gnat_node)) == N_Identifier
-      && Is_Subprogram (Entity (Prefix (gnat_node)))
-      && Is_Public (Entity (Prefix (gnat_node)))
-      && !present_gnu_tree (Entity (Prefix (gnat_node))))
-    gnu_prefix = get_minimal_subprog_decl (Entity (Prefix (gnat_node)));
+      && Nkind (gnat_prefix) == N_Identifier
+      && Is_Subprogram (Entity (gnat_prefix))
+      && Is_Public (Entity (gnat_prefix))
+      && !present_gnu_tree (Entity (gnat_prefix)))
+    gnu_prefix = get_minimal_subprog_decl (Entity (gnat_prefix));
   else
-    gnu_prefix = gnat_to_gnu (Prefix (gnat_node));
+    gnu_prefix = gnat_to_gnu (gnat_prefix);
   gnu_type = TREE_TYPE (gnu_prefix);
 
   /* If the input is a NULL_EXPR, make a new one.  */
@@ -1435,8 +1424,8 @@
 	 since it can use a special calling convention on some platforms,
 	 which cannot be propagated to the access type.  */
       else if (attribute == Attr_Access
-	       && Nkind (Prefix (gnat_node)) == N_Identifier
-	       && is_cplusplus_method (Entity (Prefix (gnat_node))))
+	       && Nkind (gnat_prefix) == N_Identifier
+	       && is_cplusplus_method (Entity (gnat_prefix)))
 	post_error ("access to C++ constructor or member function not allowed",
 		    gnat_node);
 
@@ -1547,13 +1536,12 @@
 	  /* If this is a dereference and we have a special dynamic constrained
 	     subtype on the prefix, use it to compute the size; otherwise, use
 	     the designated subtype.  */
-	  if (Nkind (Prefix (gnat_node)) == N_Explicit_Dereference)
+	  if (Nkind (gnat_prefix) == N_Explicit_Dereference)
 	    {
-	      Node_Id gnat_deref = Prefix (gnat_node);
 	      Node_Id gnat_actual_subtype
-		= Actual_Designated_Subtype (gnat_deref);
+		= Actual_Designated_Subtype (gnat_prefix);
 	      tree gnu_ptr_type
-		= TREE_TYPE (gnat_to_gnu (Prefix (gnat_deref)));
+		= TREE_TYPE (gnat_to_gnu (Prefix (gnat_prefix)));
 
 	      if (TYPE_IS_FAT_OR_THIN_POINTER_P (gnu_ptr_type)
 		  && Present (gnat_actual_subtype))
@@ -1614,7 +1602,6 @@
 	  align = DECL_ALIGN (TREE_OPERAND (gnu_prefix, 1)) / BITS_PER_UNIT;
 	else
 	  {
-	    Node_Id gnat_prefix = Prefix (gnat_node);
 	    Entity_Id gnat_type = Etype (gnat_prefix);
 	    unsigned int double_align;
 	    bool is_capped_double, align_clause;
@@ -1686,28 +1673,38 @@
 			 : 1), i;
 	struct parm_attr_d *pa = NULL;
 	Entity_Id gnat_param = Empty;
+	bool unconstrained_ptr_deref = false;
 
 	/* Make sure any implicit dereference gets done.  */
 	gnu_prefix = maybe_implicit_deref (gnu_prefix);
 	gnu_prefix = maybe_unconstrained_array (gnu_prefix);
 
-	/* We treat unconstrained array In parameters specially.  */
-	if (!Is_Constrained (Etype (Prefix (gnat_node))))
-	  {
-	    Node_Id gnat_prefix = Prefix (gnat_node);
+	/* We treat unconstrained array In parameters specially.  We also note
+	   whether we are dereferencing a pointer to unconstrained array.  */
+	if (!Is_Constrained (Etype (gnat_prefix)))
+	  switch (Nkind (gnat_prefix))
+	    {
+	    case N_Identifier:
+	      /* This is the direct case.  */
+	      if (Ekind (Entity (gnat_prefix)) == E_In_Parameter)
+		gnat_param = Entity (gnat_prefix);
+	      break;
 
-	    /* This is the direct case.  */
-	    if (Nkind (gnat_prefix) == N_Identifier
-		&& Ekind (Entity (gnat_prefix)) == E_In_Parameter)
-	      gnat_param = Entity (gnat_prefix);
+	    case N_Explicit_Dereference:
+	      /* This is the indirect case.  Note that we need to be sure that
+		 the access value cannot be null as we'll hoist the load.  */
+	      if (Nkind (Prefix (gnat_prefix)) == N_Identifier
+		  && Ekind (Entity (Prefix (gnat_prefix))) == E_In_Parameter)
+		{
+		  if (Can_Never_Be_Null (Entity (Prefix (gnat_prefix))))
+		    gnat_param = Entity (Prefix (gnat_prefix));
+		}
+	      else
+		unconstrained_ptr_deref = true;
+	      break;
 
-	    /* This is the indirect case.  Note that we need to be sure that
-	       the access value cannot be null as we'll hoist the load.  */
-	    if (Nkind (gnat_prefix) == N_Explicit_Dereference
-		&& Nkind (Prefix (gnat_prefix)) == N_Identifier
-		&& Ekind (Entity (Prefix (gnat_prefix))) == E_In_Parameter
-		&& Can_Never_Be_Null (Entity (Prefix (gnat_prefix))))
-	      gnat_param = Entity (Prefix (gnat_prefix));
+	    default:
+	      break;
 	  }
 
 	/* If the prefix is the view conversion of a constrained array to an
@@ -1842,22 +1839,54 @@
 	  {
 	    gnu_result
 	      = build1 (SAVE_EXPR, TREE_TYPE (gnu_result), gnu_result);
-	    if (attribute == Attr_First)
-	      pa->first = gnu_result;
-	    else if (attribute == Attr_Last)
-	      pa->last = gnu_result;
-	    else
-	      pa->length = gnu_result;
+	    switch (attribute)
+	      {
+	      case Attr_First:
+		pa->first = gnu_result;
+		break;
+
+	      case Attr_Last:
+		pa->last = gnu_result;
+		break;
+
+	      case Attr_Length:
+	      case Attr_Range_Length:
+		pa->length = gnu_result;
+		break;
+
+	      default:
+		gcc_unreachable ();
+	      }
 	  }
 
-	/* Set the source location onto the predicate of the condition in the
-	   'Length case but do not do it if the expression is cached to avoid
-	   messing up the debug info.  */
-	else if ((attribute == Attr_Range_Length || attribute == Attr_Length)
-		 && TREE_CODE (gnu_result) == COND_EXPR
-		 && EXPR_P (TREE_OPERAND (gnu_result, 0)))
-	  set_expr_location_from_node (TREE_OPERAND (gnu_result, 0),
-				       gnat_node);
+	/* Otherwise, evaluate it each time it is referenced.  */
+	else
+	  switch (attribute)
+	    {
+	    case Attr_First:
+	    case Attr_Last:
+	      /* If we are dereferencing a pointer to unconstrained array, we
+		 need to capture the value because the pointed-to bounds may
+		 subsequently be released.  */
+	      if (unconstrained_ptr_deref)
+		gnu_result
+		  = build1 (SAVE_EXPR, TREE_TYPE (gnu_result), gnu_result);
+	      break;
+
+	    case Attr_Length:
+	    case Attr_Range_Length:
+	      /* Set the source location onto the predicate of the condition
+		 but not if the expression is cached to avoid messing up the
+		 debug info.  */
+	      if (TREE_CODE (gnu_result) == COND_EXPR
+		  && EXPR_P (TREE_OPERAND (gnu_result, 0)))
+		set_expr_location_from_node (TREE_OPERAND (gnu_result, 0),
+					     gnat_node);
+	      break;
+
+	    default:
+	      gcc_unreachable ();
+	    }
 
 	break;
       }
@@ -2030,8 +2059,8 @@
 
     case Attr_Mechanism_Code:
       {
+	Entity_Id gnat_obj = Entity (gnat_prefix);
 	int code;
-	Entity_Id gnat_obj = Entity (Prefix (gnat_node));
 
 	prefix_unused = true;
 	gnu_result_type = get_unpadded_type (Etype (gnat_node));
@@ -2066,10 +2095,11 @@
      it has a side-effect.  But don't do it if the prefix is just an entity
      name.  However, if an access check is needed, we must do it.  See second
      example in AARM 11.6(5.e).  */
-  if (prefix_unused && TREE_SIDE_EFFECTS (gnu_prefix)
-      && !Is_Entity_Name (Prefix (gnat_node)))
-    gnu_result = build_compound_expr  (TREE_TYPE (gnu_result), gnu_prefix,
-				       gnu_result);
+  if (prefix_unused
+      && TREE_SIDE_EFFECTS (gnu_prefix)
+      && !Is_Entity_Name (gnat_prefix))
+    gnu_result
+      = build_compound_expr  (TREE_TYPE (gnu_result), gnu_prefix, gnu_result);
 
   *gnu_result_type_p = gnu_result_type;
   return gnu_result;
@@ -3479,6 +3509,8 @@
     {
       tree gnu_retval;
 
+      gnu_return_var_stack->pop ();
+
       add_stmt (gnu_result);
       add_stmt (build1 (LABEL_EXPR, void_type_node,
 			gnu_return_label_stack->last ()));
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index c5cee7a..ec25282 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -232,6 +232,7 @@
 static tree split_plus (tree, tree *);
 static tree float_type_for_precision (int, enum machine_mode);
 static tree convert_to_fat_pointer (tree, tree);
+static unsigned int scale_by_factor_of (tree, unsigned int);
 static bool potential_alignment_gap (tree, tree, tree);
 static void process_attributes (tree, struct attrib *);
 
@@ -532,6 +533,22 @@
   free_binding_level = level;
 }
 
+/* Set the context of TYPE and its parallel types (if any) to CONTEXT.  */
+
+static void
+gnat_set_type_context (tree type, tree context)
+{
+  tree decl = TYPE_STUB_DECL (type);
+
+  TYPE_CONTEXT (type) = context;
+
+  while (decl && DECL_PARALLEL_TYPE (decl))
+    {
+      TYPE_CONTEXT (DECL_PARALLEL_TYPE (decl)) = context;
+      decl = TYPE_STUB_DECL (DECL_PARALLEL_TYPE (decl));
+    }
+}
+
 /* Record DECL as belonging to the current lexical scope and use GNAT_NODE
    for location information and flag propagation.  */
 
@@ -613,7 +630,7 @@
 	      if (TREE_CODE (t) == POINTER_TYPE)
 		TYPE_NEXT_PTR_TO (t) = tt;
 	      TYPE_NAME (tt) = DECL_NAME (decl);
-	      TYPE_CONTEXT (tt) = DECL_CONTEXT (decl);
+	      gnat_set_type_context (tt, DECL_CONTEXT (decl));
 	      TYPE_STUB_DECL (tt) = TYPE_STUB_DECL (t);
 	      DECL_ORIGINAL_TYPE (decl) = tt;
 	    }
@@ -623,7 +640,7 @@
 	  /* We need a variant for the placeholder machinery to work.  */
 	  tree tt = build_variant_type_copy (t);
 	  TYPE_NAME (tt) = decl;
-	  TYPE_CONTEXT (tt) = DECL_CONTEXT (decl);
+	  gnat_set_type_context (tt, DECL_CONTEXT (decl));
 	  TREE_USED (tt) = TREE_USED (t);
 	  TREE_TYPE (decl) = tt;
 	  if (DECL_ORIGINAL_TYPE (TYPE_NAME (t)))
@@ -645,7 +662,7 @@
 	  if (!(TYPE_NAME (t) && TREE_CODE (TYPE_NAME (t)) == TYPE_DECL))
 	    {
 	      TYPE_NAME (t) = decl;
-	      TYPE_CONTEXT (t) = DECL_CONTEXT (decl);
+	      gnat_set_type_context (t, DECL_CONTEXT (decl));
 	    }
     }
 }
@@ -1692,93 +1709,74 @@
       TYPE_SIZE_UNIT (new_record_type)
 	= size_int (TYPE_ALIGN (record_type) / BITS_PER_UNIT);
 
-      /* Now scan all the fields, replacing each field with a new
-	 field corresponding to the new encoding.  */
+      /* Now scan all the fields, replacing each field with a new field
+	 corresponding to the new encoding.  */
       for (old_field = TYPE_FIELDS (record_type); old_field;
 	   old_field = DECL_CHAIN (old_field))
 	{
 	  tree field_type = TREE_TYPE (old_field);
 	  tree field_name = DECL_NAME (old_field);
-	  tree new_field;
 	  tree curpos = bit_position (old_field);
+	  tree pos, new_field;
 	  bool var = false;
 	  unsigned int align = 0;
-	  tree pos;
+
+	  /* We're going to do some pattern matching below so remove as many
+	     conversions as possible.  */
+	  curpos = remove_conversions (curpos, true);
 
 	  /* See how the position was modified from the last position.
 
-	  There are two basic cases we support: a value was added
-	  to the last position or the last position was rounded to
-	  a boundary and they something was added.  Check for the
-	  first case first.  If not, see if there is any evidence
-	  of rounding.  If so, round the last position and try
-	  again.
+	     There are two basic cases we support: a value was added
+	     to the last position or the last position was rounded to
+	     a boundary and they something was added.  Check for the
+	     first case first.  If not, see if there is any evidence
+	     of rounding.  If so, round the last position and retry.
 
-	  If this is a union, the position can be taken as zero. */
-
-	  /* Some computations depend on the shape of the position expression,
-	     so strip conversions to make sure it's exposed.  */
-	  curpos = remove_conversions (curpos, true);
-
+	     If this is a union, the position can be taken as zero.  */
 	  if (TREE_CODE (new_record_type) == UNION_TYPE)
-	    pos = bitsize_zero_node, align = 0;
+	    pos = bitsize_zero_node;
 	  else
 	    pos = compute_related_constant (curpos, last_pos);
 
-	  if (!pos && TREE_CODE (curpos) == MULT_EXPR
+	  if (!pos
+	      && TREE_CODE (curpos) == MULT_EXPR
 	      && host_integerp (TREE_OPERAND (curpos, 1), 1))
 	    {
 	      tree offset = TREE_OPERAND (curpos, 0);
 	      align = tree_low_cst (TREE_OPERAND (curpos, 1), 1);
-
-	      /* An offset which is a bitwise AND with a mask increases the
-		 alignment according to the number of trailing zeros.  */
-	      offset = remove_conversions (offset, true);
-	      if (TREE_CODE (offset) == BIT_AND_EXPR
-		  && TREE_CODE (TREE_OPERAND (offset, 1)) == INTEGER_CST)
-		{
-		  unsigned HOST_WIDE_INT mask
-		    = TREE_INT_CST_LOW (TREE_OPERAND (offset, 1));
-		  unsigned int i;
-
-		  for (i = 0; i < HOST_BITS_PER_WIDE_INT; i++)
-		    {
-		      if (mask & 1)
-			break;
-		      mask >>= 1;
-		      align *= 2;
-		    }
-		}
-
-	      pos = compute_related_constant (curpos,
-					      round_up (last_pos, align));
+	      align = scale_by_factor_of (offset, align);
+	      last_pos = round_up (last_pos, align);
+	      pos = compute_related_constant (curpos, last_pos);
 	    }
-	  else if (!pos && TREE_CODE (curpos) == PLUS_EXPR
-		   && TREE_CODE (TREE_OPERAND (curpos, 1)) == INTEGER_CST
+	  else if (!pos
+		   && TREE_CODE (curpos) == PLUS_EXPR
+		   && host_integerp (TREE_OPERAND (curpos, 1), 1)
 		   && TREE_CODE (TREE_OPERAND (curpos, 0)) == MULT_EXPR
-		   && host_integerp (TREE_OPERAND
-				     (TREE_OPERAND (curpos, 0), 1),
-				     1))
+		   && host_integerp
+		      (TREE_OPERAND (TREE_OPERAND (curpos, 0), 1), 1))
 	    {
+	      tree offset = TREE_OPERAND (TREE_OPERAND (curpos, 0), 0);
+	      unsigned HOST_WIDE_INT addend
+	        = tree_low_cst (TREE_OPERAND (curpos, 1), 1);
 	      align
-		= tree_low_cst
-		(TREE_OPERAND (TREE_OPERAND (curpos, 0), 1), 1);
-	      pos = compute_related_constant (curpos,
-					      round_up (last_pos, align));
+		= tree_low_cst (TREE_OPERAND (TREE_OPERAND (curpos, 0), 1), 1);
+	      align = scale_by_factor_of (offset, align);
+	      align = MIN (align, addend & -addend);
+	      last_pos = round_up (last_pos, align);
+	      pos = compute_related_constant (curpos, last_pos);
 	    }
-	  else if (potential_alignment_gap (prev_old_field, old_field,
-					    pos))
+	  else if (potential_alignment_gap (prev_old_field, old_field, pos))
 	    {
 	      align = TYPE_ALIGN (field_type);
-	      pos = compute_related_constant (curpos,
-					      round_up (last_pos, align));
+	      last_pos = round_up (last_pos, align);
+	      pos = compute_related_constant (curpos, last_pos);
 	    }
 
 	  /* If we can't compute a position, set it to zero.
 
-	  ??? We really should abort here, but it's too much work
-	  to get this correct for all cases.  */
-
+	     ??? We really should abort here, but it's too much work
+	     to get this correct for all cases.  */
 	  if (!pos)
 	    pos = bitsize_zero_node;
 
@@ -2553,6 +2551,32 @@
   return false;
 }
 
+/* Return VALUE scaled by the biggest power-of-2 factor of EXPR.  */
+
+static unsigned int
+scale_by_factor_of (tree expr, unsigned int value)
+{
+  expr = remove_conversions (expr, true);
+
+  /* An expression which is a bitwise AND with a mask has a power-of-2 factor
+     corresponding to the number of trailing zeros of the mask.  */
+  if (TREE_CODE (expr) == BIT_AND_EXPR
+      && TREE_CODE (TREE_OPERAND (expr, 1)) == INTEGER_CST)
+    {
+      unsigned HOST_WIDE_INT mask = TREE_INT_CST_LOW (TREE_OPERAND (expr, 1));
+      unsigned int i = 0;
+
+      while ((mask & 1) == 0 && i < HOST_BITS_PER_WIDE_INT)
+	{
+	  mask >>= 1;
+	  value *= 2;
+	  i++;
+	}
+    }
+
+  return value;
+}
+
 /* Given two consecutive field decls PREV_FIELD and CURR_FIELD, return true
    unless we can prove these 2 fields are laid out in such a way that no gap
    exist between the end of PREV_FIELD and the beginning of CURR_FIELD.  OFFSET
diff --git a/gcc/alias.c b/gcc/alias.c
index 90994e7..54dd666 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -2936,16 +2936,13 @@
       /* Wipe the reg_seen array clean.  */
       bitmap_clear (reg_seen);
 
-      /* Mark all hard registers which may contain an address.
-	 The stack, frame and argument pointers may contain an address.
-	 An argument register which can hold a Pmode value may contain
-	 an address even if it is not in BASE_REGS.
-
-	 The address expression is VOIDmode for an argument and
-	 Pmode for other registers.  */
-
-      memcpy (new_reg_base_value, static_reg_base_value,
-	      FIRST_PSEUDO_REGISTER * sizeof (rtx));
+      /* Initialize the alias information for this pass.  */
+      for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
+	if (static_reg_base_value[i])
+	  {
+	    new_reg_base_value[i] = static_reg_base_value[i];
+	    bitmap_set_bit (reg_seen, i);
+	  }
 
       /* Walk the insns adding values to the new_reg_base_value array.  */
       for (i = 0; i < rpo_cnt; i++)
diff --git a/gcc/auto-profile.c b/gcc/auto-profile.c
index af73721..9cb0aa3 100644
--- a/gcc/auto-profile.c
+++ b/gcc/auto-profile.c
@@ -47,6 +47,8 @@
 #include "coverage.h"
 #include "params.h"
 #include "l-ipo.h"
+#include "ipa-utils.h"
+#include "ipa-inline.h"
 #include "auto-profile.h"
 
 /* The following routines implements AutoFDO optimization.
@@ -106,6 +108,10 @@
    annotate the program.  */
 typedef std::set<inline_stack> location_set;
 
+/* Set of gimple stmts. Used to track if the stmt has already been promoted
+   to direct call.  */
+typedef std::set<gimple> stmt_set;
+
 struct string_compare
 {
   bool operator() (const char *a, const char *b) const
@@ -168,16 +174,22 @@
      is found.  */
   bool get_count_info (location_t loc, count_info *info) const;
 
+  /* Read the inlinied indirect call target profile for STMT and store it in
+  MAP, return the total count for all inlined indirect calls.  */
+  gcov_type find_icall_target_map (gimple stmt, icall_target_map *map) const;
+
 private:
   function_instance (unsigned name, gcov_type head_count)
       : name_(name), total_count_(0), head_count_(head_count) {}
+
+  /* Traverse callsites of the current function_instance to find one at the
+     location of LINENO and callee name represented in DECL.  */
   const function_instance *get_function_instance_by_decl (unsigned lineno,
 							  tree decl) const;
 
-  /* Callsite, represented as (decl_lineno, callee_function_name_index).  */
-  typedef std::pair<unsigned, unsigned> callsite;
-  /* Map from callsite to callee function_instance.  */
-  typedef std::map<callsite, const function_instance *> callsite_map;
+  /* Map from callsite decl_lineno (lineno in higher 16 bits, discriminator
+     in lower 16 bits) to callee function_instance.  */
+  typedef std::map<unsigned, const function_instance *> callsite_map;
   /* Map from source location (decl_lineno) to profile (count_info).  */
   typedef std::map<unsigned, count_info> position_count_map;
 
@@ -215,6 +227,10 @@
   /* Find total count of the callee of EDGE.  */
   gcov_type get_callsite_total_count (struct cgraph_edge *edge) const;
 
+  /* Update value profile INFO for STMT from the inlined indirect callsite.
+  Return true if INFO is updated.  */
+  bool update_inlined_ind_target (gimple stmt, count_info *info);
+
 private:
   /* Map from function_instance name index (in function_name_map) to
      function_instance.  */
@@ -353,6 +369,42 @@
       get_combined_location (locus, current_function_decl)));
 }
 
+/* Return STMT's combined location, which is a 32bit integer in which
+   higher 16 bits stores the line offset of LOC to the start lineno
+   of DECL, The lower 16 bits stores the discrimnator.  */
+
+static unsigned
+get_relative_location_for_stmt (gimple stmt)
+{
+  location_t locus = gimple_location (stmt);
+  if (LOCATION_LOCUS (locus) == UNKNOWN_LOCATION)
+    return UNKNOWN_LOCATION;
+
+  for (tree block = gimple_block (stmt);
+       block && (TREE_CODE (block) == BLOCK);
+       block = BLOCK_SUPERCONTEXT (block))
+    if (LOCATION_LOCUS (BLOCK_SOURCE_LOCATION (block)) != UNKNOWN_LOCATION)
+      return get_combined_location (
+	  locus, get_function_decl_from_block (block));
+  return get_combined_location (locus, current_function_decl);
+}
+
+/* Return true if BB contains indirect call.  */
+
+static bool
+has_indirect_call (basic_block bb)
+{
+  gimple_stmt_iterator gsi;
+
+  for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+    {
+      gimple stmt = gsi_stmt (gsi);
+      if (gimple_code (stmt) == GIMPLE_CALL
+	  && TREE_CODE (gimple_call_fn (stmt)) != FUNCTION_DECL)
+	return true;
+    }
+  return false;
+}
 
 /* Member functions for function_name_map.  */
 
@@ -424,14 +476,16 @@
     delete iter->second;
 }
 
+/* Traverse callsites of the current function_instance to find one at the
+   location of LINENO and callee name represented in DECL.  */
+
 const function_instance *function_instance::get_function_instance_by_decl (
     unsigned lineno, tree decl) const
 {
   int func_name_idx = afdo_function_name_map->get_index_by_decl (decl);
   if (func_name_idx != -1)
     {
-      callsite_map::const_iterator ret = callsites.find (
-	  std::make_pair (lineno, func_name_idx));
+      callsite_map::const_iterator ret = callsites.find (lineno);
       if (ret != callsites.end ())
 	return ret->second;
     }
@@ -439,8 +493,7 @@
       lang_hooks.dwarf_name (decl, 0));
   if (func_name_idx != -1)
     {
-      callsite_map::const_iterator ret = callsites.find (
-	  std::make_pair (lineno, func_name_idx));
+      callsite_map::const_iterator ret = callsites.find (lineno);
       if (ret != callsites.end ())
 	return ret->second;
     }
@@ -450,6 +503,9 @@
     return NULL;
 }
 
+/* Recursively traverse STACK starting from LEVEL to find the corresponding
+   function_instance.  */
+
 const function_instance *function_instance::get_function_instance (
     const inline_stack &stack, unsigned level) const
 {
@@ -463,6 +519,9 @@
     return NULL;
 }
 
+/* Store the profile info for LOC in INFO. Return TRUE if profile info
+   is found.  */
+
 bool function_instance::get_count_info (location_t loc, count_info *info) const
 {
   position_count_map::const_iterator iter = pos_counts.find (loc);
@@ -472,6 +531,39 @@
   return true;
 }
 
+/* Read the inlinied indirect call target profile for STMT and store it in
+   MAP, return the total count for all inlined indirect calls.  */
+
+gcov_type
+function_instance::find_icall_target_map (
+    gimple stmt, icall_target_map *map) const
+{
+  gcov_type ret = 0;
+  unsigned stmt_offset = get_relative_location_for_stmt (stmt);
+
+  for (callsite_map::const_iterator iter = callsites.begin();
+       iter != callsites.end(); ++iter)
+    {
+      unsigned callee = iter->second->name();
+      /* Check if callsite location match the stmt.  */
+      if (iter->first != stmt_offset)
+	continue;
+      struct cgraph_node *node = find_func_by_global_id (
+	  (unsigned long long) afdo_function_name_map->get_name (callee), true);
+      if (node == NULL)
+	continue;
+      if (!check_ic_target (stmt, node))
+	continue;
+      (*map)[callee] = iter->second->total_count ();
+      ret += iter->second->total_count ();
+    }
+  return ret;
+}
+
+/* Read the profile and create a function_instance with head count as
+   HEAD_COUNT. Recursively read callsites to create nested function_instances
+   too. STACK is used to track the recursive creation process.  */
+
 const function_instance *function_instance::read_function_instance (
     function_instance_stack *stack, gcov_type head_count)
 {
@@ -500,10 +592,7 @@
     }
   for (unsigned i = 0; i < num_callsites; i++) {
     unsigned offset = gcov_read_unsigned ();
-    const function_instance *callee_function_instance =
-	read_function_instance (stack, 0);
-    s->callsites[std::make_pair (offset, callee_function_instance->name ())] =
-	callee_function_instance;
+    s->callsites[offset] = read_function_instance (stack, 0);
   }
   stack->pop_back();
   return s;
@@ -519,6 +608,8 @@
     delete iter->second;
 }
 
+/* For a given DECL, returns the top-level function_instance.  */
+
 const function_instance *autofdo_source_profile::get_function_instance_by_decl (
     tree decl) const
 {
@@ -529,6 +620,10 @@
   return ret == map_.end() ? NULL : ret->second;
 }
 
+/* Find profile info for a given gimple STMT. If found, and if the location
+   of STMT does not exist in ANNOTATED, store the profile info in INFO, and
+   return true; otherwise return false.  */
+
 bool autofdo_source_profile::get_count_info (
     gimple stmt, count_info *info, const location_set *annotated) const
 {
@@ -547,6 +642,51 @@
   return s->get_count_info (stack[0].second, info);
 }
 
+/* Update value profile INFO for STMT from the inlined indirect callsite.
+   Return true if INFO is updated.  */
+
+bool
+autofdo_source_profile::update_inlined_ind_target (
+    gimple stmt, count_info *info)
+{
+  if (LOCATION_LOCUS (gimple_location (stmt)) == cfun->function_end_locus)
+    return false;
+
+  count_info old_info;
+  get_count_info (stmt, &old_info, NULL);
+  gcov_type total = 0;
+  for (icall_target_map::const_iterator iter = old_info.second.begin();
+       iter != old_info.second.end(); ++iter)
+    total += iter->second;
+
+  /* Program behavior changed, original promoted (and inlined) target is not
+     hot any more. Will avoid promote the original target.
+
+     To check if original promoted target is still hot, we check the total
+     count of the unpromoted targets (stored in old_info). If it is no less
+     than half of the callsite count (stored in INFO), the original promoted
+     target is considered not hot any more.  */
+  if (total >= info->first * 0.5)
+    return false;
+
+  inline_stack stack;
+  get_inline_stack (stmt, &stack);
+  if (stack.size () == 0)
+    return false;
+  const function_instance *s = get_function_instance_by_inline_stack (stack);
+  if (s == NULL)
+    return false;
+  icall_target_map map;
+  if (s->find_icall_target_map (stmt, &map) == 0)
+    return false;
+  for (icall_target_map::const_iterator iter = map.begin();
+       iter != map.end(); ++iter)
+    info->second[iter->first] = iter->second;
+  return true;
+}
+
+/* Find total count of the callee of EDGE.  */
+
 gcov_type autofdo_source_profile::get_callsite_total_count (
     struct cgraph_edge *edge) const
 {
@@ -561,6 +701,8 @@
     return s->total_count ();
 }
 
+/* Read source profile.  */
+
 bool autofdo_source_profile::read ()
 {
   if (gcov_read_unsigned () != GCOV_TAG_AFDO_FUNCTION)
@@ -586,6 +728,9 @@
   return true;
 }
 
+/* Return the function_instance in the profile that correspond to the
+   inline STACK.  */
+
 const function_instance *
 autofdo_source_profile::get_function_instance_by_inline_stack (
     const inline_stack &stack) const
@@ -654,6 +799,8 @@
   return true;
 }
 
+/* Read the profile from the profile file.  */
+
 static void
 read_profile (void)
 {
@@ -750,6 +897,7 @@
 	{
 	  if (flag_opt_info)
 	    inform (0, "Not importing %s: maximum group size reached", *iter);
+	  continue;
 	}
       if (incompatible_cl_args (module, aux_module))
 	{
@@ -826,11 +974,13 @@
   afdo_indirect_call (stmt, map);
 }
 
-/* For a given BB, return its execution count, and annotate value profile
-   on statements. Add the location of annotated stmt to ANNOTATED.  */
+/* For a given BB, return its execution count. Add the location of annotated
+   stmt to ANNOTATED. Attach value profile if a stmt is not in PROMOTED,
+   because we only want to promot an indirect call once.  */
 
 static gcov_type
-afdo_get_bb_count (basic_block bb, location_set *annotated)
+afdo_get_bb_count (basic_block bb, location_set *annotated,
+		   const stmt_set &promoted)
 {
   gimple_stmt_iterator gsi;
   gcov_type max_count = 0;
@@ -845,7 +995,7 @@
 	  if (info.first > max_count)
 	    max_count = info.first;
 	  has_annotated = true;
-	  if (info.second.size() > 0)
+	  if (info.second.size() > 0 && promoted.find (stmt) == promoted.end ())
 	    afdo_vpt (stmt, info.second);
 	}
     }
@@ -891,7 +1041,7 @@
       if (bb->aux != NULL)
 	continue;
       bb->aux = bb;
-      dom_bbs = get_dominated_by (CDI_DOMINATORS, bb);
+      dom_bbs = get_all_dominated_blocks (CDI_DOMINATORS, bb);
       FOR_EACH_VEC_ELT (dom_bbs, i, bb1)
 	if (bb1->aux == NULL
 	    && dominated_by_p (CDI_POST_DOMINATORS, bb, bb1)
@@ -904,7 +1054,7 @@
 		bb->flags |= BB_ANNOTATED;
 	      }
 	  }
-      dom_bbs = get_dominated_by (CDI_POST_DOMINATORS, bb);
+      dom_bbs = get_all_dominated_blocks (CDI_POST_DOMINATORS, bb);
       FOR_EACH_VEC_ELT (dom_bbs, i, bb1)
 	if (bb1->aux == NULL
 	    && dominated_by_p (CDI_DOMINATORS, bb, bb1)
@@ -920,44 +1070,6 @@
     }
 }
 
-/* If a baisk block only has one in/out edge, then the bb count and he
-   edge count should be the same.
-   IS_SUCC is true if the out edge of the basic block is examined.
-   Return TRUE if any basic block/edge count is changed.  */
-
-static bool
-afdo_propagate_single_edge (bool is_succ)
-{
-  basic_block bb;
-  bool changed = false;
-
-  FOR_EACH_BB (bb)
-    if (is_succ ? single_succ_p (bb) : single_pred_p (bb))
-      {
-	edge e = is_succ ? single_succ_edge (bb) : single_pred_edge (bb);
-	if (((e->flags & EDGE_ANNOTATED) == 0)
-	    && ((bb->flags & BB_ANNOTATED) != 0))
-	  {
-	    e->count = bb->count;
-	    e->flags |= EDGE_ANNOTATED;
-	    changed = true;
-	  }
-	else if (((e->flags & EDGE_ANNOTATED) != 0)
-	    && ((bb->flags & BB_ANNOTATED) == 0))
-	  {
-	    bb->count = e->count;
-	    bb->flags |= BB_ANNOTATED;
-	    changed = true;
-	  }
-	else if (bb->count != e->count)
-	  {
-	    e->count = bb->count = MAX (bb->count, e->count);
-	    changed = true;
-	  }
-      }
-  return changed;
-}
-
 /* If a basic block's count is known, and only one of its in/out edges' count
    is unknown, its count can be calculated.
    Meanwhile, if all of the in/out edges' counts are known, then the basic
@@ -966,36 +1078,23 @@
    Return TRUE if any basic block/edge count is changed.  */
 
 static bool
-afdo_propagate_multi_edge (bool is_succ)
+afdo_propagate_edge (bool is_succ)
 {
   basic_block bb;
   bool changed = false;
 
   FOR_EACH_BB (bb)
     {
-      edge e, unknown_edge = NULL, zero_edge = NULL;
+      edge e, unknown_edge = NULL;
       edge_iterator ei;
       int num_unknown_edge = 0;
       gcov_type total_known_count = 0;
 
-      if (is_succ)
-	{
-	  FOR_EACH_EDGE (e, ei, bb->succs)
-	    if ((e->flags & EDGE_ANNOTATED) == 0)
-	      num_unknown_edge ++, unknown_edge = e;
-	    else if (e->count == 0)
-	      zero_edge = e;
-	    else
-	      total_known_count += e->count;
-	}
-      else
-	{
-	  FOR_EACH_EDGE (e, ei, bb->preds)
-	    if ((e->flags & EDGE_ANNOTATED) == 0)
-	      num_unknown_edge ++, unknown_edge = e;
-	    else
-	      total_known_count += e->count;
-	}
+      FOR_EACH_EDGE (e, ei, is_succ ? bb->succs : bb->preds)
+	if ((e->flags & EDGE_ANNOTATED) == 0)
+	  num_unknown_edge ++, unknown_edge = e;
+	else
+	  total_known_count += e->count;
 
       if (num_unknown_edge == 0)
 	{
@@ -1004,12 +1103,6 @@
 	      bb->count = total_known_count;
 	      changed = true;
 	    }
-	  else if (zero_edge != NULL && total_known_count < bb->count
-		   && bb->loop_father && bb->loop_father->header == bb)
-	    {
-	      zero_edge->count = bb->count - total_known_count;
-	      changed = true;
-	    }
 	  if ((bb->flags & BB_ANNOTATED) == 0)
 	    {
 	      bb->flags |= BB_ANNOTATED;
@@ -1138,6 +1231,7 @@
 {
   basic_block bb;
   bool changed = true;
+  int i = 0;
 
   FOR_ALL_BB (bb)
     {
@@ -1146,17 +1240,13 @@
 	bb->flags |= BB_ANNOTATED;
     }
 
-  while (changed)
+  while (changed && i++ < PARAM_VALUE (PARAM_AUTOFDO_MAX_PROPAGATE_ITERATIONS))
     {
       changed = false;
 
-      if (afdo_propagate_single_edge (true))
+      if (afdo_propagate_edge (true))
 	changed = true;
-      if (afdo_propagate_single_edge (false))
-	changed = true;
-      if (afdo_propagate_multi_edge (true))
-	changed = true;
-      if (afdo_propagate_multi_edge (false))
+      if (afdo_propagate_edge (false))
 	changed = true;
       afdo_propagate_circuit ();
     }
@@ -1222,10 +1312,78 @@
   free_dominance_info (CDI_POST_DOMINATORS);
 }
 
-/* Annotate auto profile to the control flow graph.  */
+/* Perform value profile transformation using AutoFDO profile. Add the
+   promoted stmts to PROMOTED_STMTS. Return TRUE if there is any
+   indirect call promoted.  */
+
+static bool
+afdo_vpt_for_early_inline (stmt_set *promoted_stmts)
+{
+  basic_block bb;
+  if (afdo_source_profile->get_function_instance_by_decl (
+      current_function_decl) == NULL)
+    return false;
+
+  bool has_vpt = false;
+  FOR_EACH_BB (bb)
+    {
+      if (!has_indirect_call (bb))
+	continue;
+      gimple_stmt_iterator gsi;
+
+      gcov_type bb_count = 0;
+      for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+	{
+	  count_info info;
+	  gimple stmt = gsi_stmt (gsi);
+	  if (afdo_source_profile->get_count_info (stmt, &info, NULL))
+	    bb_count = MAX (bb_count, info.first);
+	}
+
+      for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+	{
+	  gimple stmt = gsi_stmt (gsi);
+	  /* IC_promotion and early_inline_2 is done in multiple iterations.
+	     No need to promoted the stmt if its in promoted_stmts (means
+	     it is already been promoted in the previous iterations).  */
+	  if (gimple_code (stmt) != GIMPLE_CALL
+	      || TREE_CODE (gimple_call_fn (stmt)) == FUNCTION_DECL
+	      || promoted_stmts->find (stmt) != promoted_stmts->end ())
+	    continue;
+
+	  count_info info;
+	  afdo_source_profile->get_count_info (stmt, &info, NULL);
+	  info.first = bb_count;
+	  if (afdo_source_profile->update_inlined_ind_target (stmt, &info))
+	    {
+	      /* Promote the indirect call and update the promoted_stmts.  */
+	      promoted_stmts->insert (stmt);
+	      afdo_vpt (stmt, info.second);
+	      has_vpt = true;
+	    }
+	}
+    }
+  if (has_vpt && gimple_value_profile_transformations ())
+    {
+      free_dominance_info (CDI_DOMINATORS);
+      free_dominance_info (CDI_POST_DOMINATORS);
+      calculate_dominance_info (CDI_POST_DOMINATORS);
+      calculate_dominance_info (CDI_DOMINATORS);
+      rebuild_cgraph_edges ();
+      update_ssa (TODO_update_ssa);
+      compute_inline_parameters (cgraph_get_node (current_function_decl),
+				 false);
+      return true;
+    }
+  else
+    return false;
+}
+
+/* Annotate auto profile to the control flow graph. Do not annotate value
+   profile for stmts in PROMOTED_STMTS.  */
 
 static void
-afdo_annotate_cfg (void)
+afdo_annotate_cfg (const stmt_set &promoted_stmts)
 {
   basic_block bb;
   const function_instance *s =
@@ -1238,7 +1396,7 @@
   ENTRY_BLOCK_PTR->count = s->head_count ();
   gcov_type max_count = ENTRY_BLOCK_PTR->count;
 
-  location_set annotated_loc_set;
+  location_set annotated_locs;
 
   FOR_EACH_BB (bb)
     {
@@ -1253,7 +1411,7 @@
 	  e->flags &= (~EDGE_ANNOTATED);
 	}
 
-      bb->count = afdo_get_bb_count (bb, &annotated_loc_set);
+      bb->count = afdo_get_bb_count (bb, &annotated_locs, promoted_stmts);
       if (bb->count > max_count)
 	max_count = bb->count;
     }
@@ -1292,22 +1450,6 @@
   init_node_map ();
   profile_info = autofdo::afdo_profile_info;
 
-  FOR_EACH_FUNCTION (node)
-    {
-      if (!gimple_has_body_p (node->symbol.decl))
-	continue;
-
-      /* Don't profile functions produced for builtin stuff.  */
-      if (DECL_SOURCE_LOCATION (node->symbol.decl) == BUILTINS_LOCATION)
-	continue;
-
-      push_cfun (DECL_STRUCT_FUNCTION (node->symbol.decl));
-      autofdo::afdo_annotate_cfg ();
-      compute_function_frequency ();
-      update_ssa (TODO_update_ssa);
-      pop_cfun ();
-    }
-
   cgraph_pre_profiling_inlining_done = true;
   cgraph_process_module_scope_statics ();
   /* Now perform link to allow cross module inlining.  */
@@ -1327,7 +1469,7 @@
       push_cfun (DECL_STRUCT_FUNCTION (node->symbol.decl));
 
       if (L_IPO_COMP_MODE)
-        {
+	{
 	  basic_block bb;
 	  FOR_EACH_BB (bb)
 	    {
@@ -1340,13 +1482,72 @@
 		}
 	    }
 	}
+      rebuild_cgraph_edges ();
+      pop_cfun ();
+    }
+
+  FOR_EACH_FUNCTION (node)
+    {
+      if (!gimple_has_body_p (node->symbol.decl))
+	continue;
+
+      /* Don't profile functions produced for builtin stuff.  */
+      if (DECL_SOURCE_LOCATION (node->symbol.decl) == BUILTINS_LOCATION)
+	continue;
+
+      push_cfun (DECL_STRUCT_FUNCTION (node->symbol.decl));
+
+      /* First do indirect call promotion and early inline to make the
+	 IR match the profiled binary before actual annotation.
+
+	 This is needed because an indirect call might have been promoted
+	 and inlined in the profiled binary. If we do not promote and
+	 inline these indirect calls before annotation, the profile for
+	 these promoted functions will be lost.
+
+	 e.g. foo() --indirect_call--> bar()
+	 In profiled binary, the callsite is promoted and inlined, making
+	 the profile look like:
+
+	 foo: {
+	   loc_foo_1: count_1
+	   bar@loc_foo_2: {
+	     loc_bar_1: count_2
+	     loc_bar_2: count_3
+	   }
+	 }
+
+	 Before AutoFDO pass, loc_foo_2 is not promoted thus not inlined.
+	 If we perform annotation on it, the profile inside bar@loc_foo2
+	 will be wasted.
+
+	 To avoid this, we promote loc_foo_2 and inline the promoted bar
+	 function before annotation, so the profile inside bar@loc_foo2
+	 will be useful.  */
+      autofdo::stmt_set promoted_stmts;
+      for (int i = 0; i < PARAM_VALUE (PARAM_EARLY_INLINER_MAX_ITERATIONS); i++)
+	{
+	  if (!flag_value_profile_transformations
+	      || !autofdo::afdo_vpt_for_early_inline (&promoted_stmts))
+	    break;
+	  early_inliner ();
+	}
+
+      early_inliner ();
+      autofdo::afdo_annotate_cfg (promoted_stmts);
+      compute_function_frequency ();
+      update_ssa (TODO_update_ssa);
+
       /* Local pure-const may imply need to fixup the cfg.  */
       if (execute_fixup_cfg () & TODO_cleanup_cfg)
 	cleanup_tree_cfg ();
 
+      free_dominance_info (CDI_DOMINATORS);
+      free_dominance_info (CDI_POST_DOMINATORS);
+      rebuild_cgraph_edges ();
       pop_cfun ();
     }
-  return TODO_rebuild_cgraph_edges;
+  return 0;
 }
 
 static bool
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index bd93b8a..3e8e786 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -492,6 +492,11 @@
 #define EDGE_FREQUENCY(e)		RDIV ((e)->src->frequency * (e)->probability, \
 					      REG_BR_PROB_BASE)
 
+/* Compute a scale factor (or probability) suitable for scaling of
+   gcov_type values via apply_probability() and apply_scale().  */
+#define GCOV_COMPUTE_SCALE(num,den) \
+  ((den) ? RDIV ((num) * REG_BR_PROB_BASE, (den)) : REG_BR_PROB_BASE)
+
 /* Return nonzero if edge is critical.  */
 #define EDGE_CRITICAL_P(e)		(EDGE_COUNT ((e)->src->succs) >= 2 \
 					 && EDGE_COUNT ((e)->dest->preds) >= 2)
@@ -715,6 +720,7 @@
 extern bool maybe_hot_bb_p (struct function *, const_basic_block);
 extern bool maybe_hot_edge_p (edge);
 extern bool probably_never_executed_bb_p (struct function *, const_basic_block);
+extern bool probably_never_executed_edge_p (struct function *, edge);
 extern bool optimize_bb_for_size_p (const_basic_block);
 extern bool optimize_bb_for_speed_p (const_basic_block);
 extern bool optimize_edge_for_size_p (edge);
@@ -785,6 +791,8 @@
 extern bool contains_no_active_insn_p (const_basic_block);
 extern bool forwarder_block_p (const_basic_block);
 extern bool can_fallthru (basic_block, basic_block);
+extern void emit_barrier_after_bb (basic_block bb);
+extern void fixup_partitions (void);
 
 /* In cfgbuild.c.  */
 extern void find_many_sub_basic_blocks (sbitmap);
@@ -941,13 +949,23 @@
   return RDIV (prob1 * prob2, REG_BR_PROB_BASE);
 }
 
+/* Apply scale factor SCALE on frequency or count FREQ. Use this
+   interface when potentially scaling up, so that SCALE is not
+   constrained to be < REG_BR_PROB_BASE.  */
+
+static inline gcov_type
+apply_scale (gcov_type freq, gcov_type scale)
+{
+  return RDIV (freq * scale, REG_BR_PROB_BASE);
+}
+
 /* Apply probability PROB on frequency or count FREQ.  */
 
 static inline gcov_type
 apply_probability (gcov_type freq, int prob)
 {
   check_probability (prob);
-  return RDIV (freq * prob, REG_BR_PROB_BASE);
+  return apply_scale (freq, prob);
 }
 
 /* Return inverse probability for PROB.  */
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index 20c25bd..6537d9c 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -1053,7 +1053,7 @@
   current_partition = BB_PARTITION (traces[0].first);
   two_passes = false;
 
-  if (flag_reorder_blocks_and_partition)
+  if (crtl->has_bb_partition)
     for (i = 0; i < n_traces && !two_passes; i++)
       if (BB_PARTITION (traces[0].first)
 	  != BB_PARTITION (traces[i].first))
@@ -1262,7 +1262,7 @@
 		      }
 		  }
 
-	      if (flag_reorder_blocks_and_partition)
+	      if (crtl->has_bb_partition)
 		try_copy = false;
 
 	      /* Copy tiny blocks always; copy larger blocks only when the
@@ -1380,15 +1380,6 @@
   return length;
 }
 
-/* Emit a barrier into the footer of BB.  */
-
-static void
-emit_barrier_after_bb (basic_block bb)
-{
-  rtx barrier = emit_barrier_after (BB_END (bb));
-  BB_FOOTER (bb) = unlink_insn_chain (barrier, barrier);
-}
-
 /* The landing pad OLD_LP, in block OLD_BB, has edges from both partitions.
    Duplicate the landing pad and split the edges so that no EH edge
    crosses partitions.  */
@@ -1453,25 +1444,170 @@
       ei_next (&ei);
 }
 
+
+/* Ensure that all hot bbs are included in a hot path through the
+   procedure. This is done by calling this function twice, once
+   with WALK_UP true (to look for paths from the entry to hot bbs) and
+   once with WALK_UP false (to look for paths from hot bbs to the exit).
+   Returns the updated value of COLD_BB_COUNT and adds newly-hot bbs
+   to BBS_IN_HOT_PARTITION.  */
+
+static unsigned int
+sanitize_hot_paths (bool walk_up, unsigned int cold_bb_count,
+                    vec<basic_block> *bbs_in_hot_partition)
+{
+  /* Callers check this.  */
+  gcc_checking_assert (cold_bb_count);
+
+  /* Keep examining hot bbs while we still have some left to check
+     and there are remaining cold bbs.  */
+  vec<basic_block> hot_bbs_to_check = bbs_in_hot_partition->copy ();
+  while (! hot_bbs_to_check.is_empty ()
+         && cold_bb_count)
+    {
+      basic_block bb = hot_bbs_to_check.pop ();
+      vec<edge, va_gc> *edges = walk_up ? bb->preds : bb->succs;
+      edge e;
+      edge_iterator ei;
+      int highest_probability = 0;
+      int highest_freq = 0;
+      gcov_type highest_count = 0;
+      bool found = false;
+
+      /* Walk the preds/succs and check if there is at least one already
+         marked hot. Keep track of the most frequent pred/succ so that we
+         can mark it hot if we don't find one.  */
+      FOR_EACH_EDGE (e, ei, edges)
+        {
+          basic_block reach_bb = walk_up ? e->src : e->dest;
+
+          if (e->flags & EDGE_DFS_BACK)
+            continue;
+
+          if (BB_PARTITION (reach_bb) != BB_COLD_PARTITION)
+          {
+            found = true;
+            break;
+          }
+          /* The following loop will look for the hottest edge via
+             the edge count, if it is non-zero, then fallback to the edge
+             frequency and finally the edge probability.  */
+          if (e->count > highest_count)
+            highest_count = e->count;
+          int edge_freq = EDGE_FREQUENCY (e);
+          if (edge_freq > highest_freq)
+            highest_freq = edge_freq;
+          if (e->probability > highest_probability)
+            highest_probability = e->probability;
+        }
+
+      /* If bb is reached by (or reaches, in the case of !WALK_UP) another hot
+         block (or unpartitioned, e.g. the entry block) then it is ok. If not,
+         then the most frequent pred (or succ) needs to be adjusted.  In the
+         case where multiple preds/succs have the same frequency (e.g. a
+         50-50 branch), then both will be adjusted.  */
+      if (found)
+        continue;
+
+      FOR_EACH_EDGE (e, ei, edges)
+        {
+          if (e->flags & EDGE_DFS_BACK)
+            continue;
+          /* Select the hottest edge using the edge count, if it is non-zero,
+             then fallback to the edge frequency and finally the edge
+             probability.  */
+          if (highest_count)
+            {
+              if (e->count < highest_count)
+                continue;
+            }
+          else if (highest_freq)
+            {
+              if (EDGE_FREQUENCY (e) < highest_freq)
+                continue;
+            }
+          else if (e->probability < highest_probability)
+            continue;
+
+          basic_block reach_bb = walk_up ? e->src : e->dest;
+
+          /* We have a hot bb with an immediate dominator that is cold.
+             The dominator needs to be re-marked hot.  */
+          BB_SET_PARTITION (reach_bb, BB_HOT_PARTITION);
+          cold_bb_count--;
+
+          /* Now we need to examine newly-hot reach_bb to see if it is also
+             dominated by a cold bb.  */
+          bbs_in_hot_partition->safe_push (reach_bb);
+          hot_bbs_to_check.safe_push (reach_bb);
+        }
+    }
+
+  return cold_bb_count;
+}
+
+
 /* Find the basic blocks that are rarely executed and need to be moved to
    a separate section of the .o file (to cut down on paging and improve
    cache locality).  Return a vector of all edges that cross.  */
 
-static vec<edge> 
+static vec<edge>
 find_rarely_executed_basic_blocks_and_crossing_edges (void)
 {
   vec<edge> crossing_edges = vNULL;
   basic_block bb;
   edge e;
   edge_iterator ei;
+  unsigned int cold_bb_count = 0;
+  vec<basic_block> bbs_in_hot_partition = vNULL;
 
   /* Mark which partition (hot/cold) each basic block belongs in.  */
   FOR_EACH_BB (bb)
     {
-      if (probably_never_executed_bb_p (cfun, bb))
-	BB_SET_PARTITION (bb, BB_COLD_PARTITION);
+      bool cold_bb = probably_never_executed_bb_p (cfun, bb);
+
+      if (!flag_auto_profile && cold_bb)
+        {
+          /* Handle profile insanities created by upstream optimizations
+             by also checking the incoming edge weights. If there is a non-cold
+             incoming edge, conservatively prevent this block from being split
+             into the cold section.  */
+          FOR_EACH_EDGE (e, ei, bb->preds)
+            if (!probably_never_executed_edge_p (cfun, e))
+              {
+                cold_bb = false;
+                break;
+              }
+        }
+      if (cold_bb)
+        {
+          BB_SET_PARTITION (bb, BB_COLD_PARTITION);
+          cold_bb_count++;
+        }
       else
-	BB_SET_PARTITION (bb, BB_HOT_PARTITION);
+        {
+          BB_SET_PARTITION (bb, BB_HOT_PARTITION);
+          bbs_in_hot_partition.safe_push (bb);
+        }
+    }
+
+  /* Ensure that hot bbs are included along a hot path from the entry to exit.
+     Several different possibilities may include cold bbs along all paths
+     to/from a hot bb. One is that there are edge weight insanities
+     due to optimization phases that do not properly update basic block profile
+     counts. The second is that the entry of the function may not be hot, because
+     it is entered fewer times than the number of profile training runs, but there
+     is a loop inside the function that causes blocks within the function to be
+     above the threshold for hotness. This is fixed by walking up from hot bbs
+     to the entry block, and then down from hot bbs to the exit, performing
+     partitioning fixups as necessary.  */
+  if (cold_bb_count)
+    {
+      mark_dfs_back_edges ();
+      cold_bb_count = sanitize_hot_paths (true, cold_bb_count,
+                                          &bbs_in_hot_partition);
+      if (cold_bb_count)
+        sanitize_hot_paths (false, cold_bb_count, &bbs_in_hot_partition);
     }
 
   /* The format of .gcc_except_table does not allow landing pads to
@@ -1720,8 +1856,7 @@
 		     (i.e. fix it so the fall through does not cross and
 		     the cond jump does).  */
 
-		  if (!cond_jump_crosses
-		      && cur_bb->aux == cond_jump->dest)
+		  if (!cond_jump_crosses)
 		    {
 		      /* Find label in fall_thru block. We've already added
 			 any missing labels, so there must be one.  */
@@ -1765,10 +1900,10 @@
 		      new_bb->aux = cur_bb->aux;
 		      cur_bb->aux = new_bb;
 
-		      /* Make sure new fall-through bb is in same
-			 partition as bb it's falling through from.  */
+                      /* This is done by force_nonfallthru_and_redirect.  */
+		      gcc_assert (BB_PARTITION (new_bb)
+                                  == BB_PARTITION (cur_bb));
 
-		      BB_COPY_PARTITION (new_bb, cur_bb);
 		      single_succ_edge (new_bb)->flags |= EDGE_CROSSING;
 		    }
 		  else
@@ -2066,47 +2201,13 @@
   FOR_EACH_BB (bb)
     FOR_EACH_EDGE (e, ei, bb->succs)
       if ((e->flags & EDGE_CROSSING)
-	  && JUMP_P (BB_END (e->src)))
+	  && JUMP_P (BB_END (e->src))
+          /* Some notes were added during fix_up_fall_thru_edges, via
+             force_nonfallthru_and_redirect.  */
+          && !find_reg_note (BB_END (e->src), REG_CROSSING_JUMP, NULL_RTX))
 	add_reg_note (BB_END (e->src), REG_CROSSING_JUMP, NULL_RTX);
 }
 
-/* Verify, in the basic block chain, that there is at most one switch
-   between hot/cold partitions. This is modelled on
-   rtl_verify_flow_info_1, but it cannot go inside that function
-   because this condition will not be true until after
-   reorder_basic_blocks is called.  */
-
-static void
-verify_hot_cold_block_grouping (void)
-{
-  basic_block bb;
-  int err = 0;
-  bool switched_sections = false;
-  int current_partition = 0;
-
-  FOR_EACH_BB (bb)
-    {
-      if (!current_partition)
-	current_partition = BB_PARTITION (bb);
-      if (BB_PARTITION (bb) != current_partition)
-	{
-	  if (switched_sections)
-	    {
-	      error ("multiple hot/cold transitions found (bb %i)",
-		     bb->index);
-	      err = 1;
-	    }
-	  else
-	    {
-	      switched_sections = true;
-	      current_partition = BB_PARTITION (bb);
-	    }
-	}
-    }
-
-  gcc_assert(!err);
-}
-
 /* Reorder basic blocks.  The main entry point to this file.  FLAGS is
    the set of flags to pass to cfg_layout_initialize().  */
 
@@ -2159,8 +2260,9 @@
       dump_flow_info (dump_file, dump_flags);
     }
 
-  if (flag_reorder_blocks_and_partition)
-    verify_hot_cold_block_grouping ();
+  /* Signal that rtl_verify_flow_info_1 can now verify that there
+     is at most one switch between hot/cold sections.  */
+  crtl->bb_reorder_complete = true;
 }
 
 /* Determine which partition the first basic block in the function
@@ -2171,28 +2273,26 @@
    encountering this note will make the compiler switch between the
    hot and cold text sections.  */
 
-static void
+void
 insert_section_boundary_note (void)
 {
   basic_block bb;
-  rtx new_note;
-  int first_partition = 0;
+  bool switched_sections = false;
+  int current_partition = 0;
 
-  if (!flag_reorder_blocks_and_partition)
+  if (!crtl->has_bb_partition)
     return;
 
   FOR_EACH_BB (bb)
     {
-      if (!first_partition)
-	first_partition = BB_PARTITION (bb);
-      if (BB_PARTITION (bb) != first_partition)
+      if (!current_partition)
+	current_partition = BB_PARTITION (bb);
+      if (BB_PARTITION (bb) != current_partition)
 	{
-	  new_note = emit_note_before (NOTE_INSN_SWITCH_TEXT_SECTIONS,
-				       BB_HEAD (bb));
-	  /* ??? This kind of note always lives between basic blocks,
-	     but add_insn_before will set BLOCK_FOR_INSN anyway.  */
-	  BLOCK_FOR_INSN (new_note) = NULL;
-	  break;
+	  gcc_assert (!switched_sections);
+          switched_sections = true;
+          emit_note_before (NOTE_INSN_SWITCH_TEXT_SECTIONS, BB_HEAD (bb));
+          current_partition = BB_PARTITION (bb);
 	}
     }
 }
@@ -2223,8 +2323,6 @@
       bb->aux = bb->next_bb;
   cfg_layout_finalize ();
 
-  /* Add NOTE_INSN_SWITCH_TEXT_SECTIONS notes.  */
-  insert_section_boundary_note ();
   return 0;
 }
 
@@ -2358,6 +2456,11 @@
       if (!bitmap_bit_p (candidates, single_succ (bb)->index))
 	continue;
 
+      /* Don't duplicate a partition crossing edge, which requires difficult
+         fixup.  */
+      if (find_reg_note (BB_END (bb), REG_CROSSING_JUMP, NULL_RTX))
+	continue;
+
       new_bb = duplicate_block (single_succ (bb), single_succ_edge (bb), bb);
       new_bb->aux = bb->aux;
       bb->aux = new_bb;
@@ -2510,6 +2613,8 @@
   if (!crossing_edges.exists ())
     return 0;
 
+  crtl->has_bb_partition = true;
+
   /* Make sure the source of any crossing edge ends in a jump and the
      destination of any crossing edge has a label.  */
   add_labels_and_missing_jumps (crossing_edges);
diff --git a/gcc/bb-reorder.h b/gcc/bb-reorder.h
index 5c68e3d..025300c 100644
--- a/gcc/bb-reorder.h
+++ b/gcc/bb-reorder.h
@@ -35,4 +35,6 @@
 
 extern int get_uncond_jump_length (void);
 
+extern void insert_section_boundary_note (void);
+
 #endif
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index dd917ae..f2d18bc 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,15 @@
+2013-11-04  Marek Polacek  <polacek@redhat.com>
+
+	Backport from mainline
+	2013-11-04  Marek Polacek  <polacek@redhat.com>
+
+	PR c++/58979
+	* c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
+
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-08-09  Arnaud Charlet  <charlet@adacore.com>
 
 	* c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 2f23297..2b26fe1 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -9829,6 +9829,11 @@
 		"invalid type argument of %<->%> (have %qT)",
 		type);
       break;
+    case RO_ARROW_STAR:
+      error_at (loc,
+		"invalid type argument of %<->*%> (have %qT)",
+		type);
+      break;
     case RO_IMPLICIT_CONVERSION:
       error_at (loc,
 		"invalid type argument of implicit conversion (have %qT)",
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index b5477dc..f45346a 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -204,8 +204,10 @@
   opts->x_warn_write_strings = c_dialect_cxx ();
   opts->x_flag_warn_unused_result = true;
 
-  /* By default, C99-like requirements for complex multiply and divide.  */
-  opts->x_flag_complex_method = 2;
+  /* By default, C99-like requirements for complex multiply and divide.
+     But for C++ this should not be required.  */
+  if (c_language != clk_cxx)
+    opts->x_flag_complex_method = 2;
 }
 
 /* Common initialization before calling option handlers.  */
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 32410a3..e9449ee 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/gcc/cfg.c b/gcc/cfg.c
index e3af0bac2..3a749e6 100644
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -446,6 +446,21 @@
 		 (flags & TDF_COMMENT) ? ";; " : "", s_indent,
 		 (int) lsum, (int) bb->count);
     }
+  if (BB_PARTITION (bb) == BB_COLD_PARTITION)
+    {
+      /* Warn about inconsistencies in the partitioning that are
+         currently caused by profile insanities created via optimization.  */
+      if (!probably_never_executed_bb_p (fun, bb))
+        fprintf (file, "%s%sBlock in cold partition with hot count\n",
+                 (flags & TDF_COMMENT) ? ";; " : "", s_indent);
+      FOR_EACH_EDGE (e, ei, bb->preds)
+        {
+          if (!probably_never_executed_edge_p (fun, e))
+            fprintf (file,
+                     "%s%sBlock in cold partition with incoming hot edge\n",
+                     (flags & TDF_COMMENT) ? ";; " : "", s_indent);
+        }
+    }
 }
 
 void
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 471d293..9952a88 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -456,7 +456,7 @@
 
       if (first != EXIT_BLOCK_PTR
 	  && find_reg_note (BB_END (first), REG_CROSSING_JUMP, NULL_RTX))
-	return false;
+	return changed;
 
       while (counter < n_basic_blocks)
 	{
@@ -927,6 +927,24 @@
 	  set_mem_align (y, MEM_ALIGN (x));
 	}
     }
+  if (code == MEM)
+    {
+      if (MEM_READONLY_P (x) != MEM_READONLY_P (y))
+	{
+	  MEM_READONLY_P (x) = 0;
+	  MEM_READONLY_P (y) = 0;
+	}
+      if (MEM_NOTRAP_P (x) != MEM_NOTRAP_P (y))
+	{
+	  MEM_NOTRAP_P (x) = 0;
+	  MEM_NOTRAP_P (y) = 0;
+	}
+      if (MEM_VOLATILE_P (x) != MEM_VOLATILE_P (y))
+	{
+	  MEM_VOLATILE_P (x) = 1;
+	  MEM_VOLATILE_P (y) = 1;
+	}
+    }
 
   fmt = GET_RTX_FORMAT (code);
   for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
@@ -1722,12 +1740,20 @@
 	}
     }
 
+  /* Find the last non-debug non-note instruction in each bb, except
+     stop when we see the NOTE_INSN_BASIC_BLOCK, as old_insns_match_p
+     handles that case specially. old_insns_match_p does not handle
+     other types of instruction notes.  */
   rtx last1 = BB_END (bb1);
   rtx last2 = BB_END (bb2);
-  if (DEBUG_INSN_P (last1))
-    last1 = prev_nondebug_insn (last1);
-  if (DEBUG_INSN_P (last2))
-    last2 = prev_nondebug_insn (last2);
+  while (!NOTE_INSN_BASIC_BLOCK_P (last1) &&
+         (DEBUG_INSN_P (last1) || NOTE_P (last1)))
+    last1 = PREV_INSN (last1);
+  while (!NOTE_INSN_BASIC_BLOCK_P (last2) &&
+         (DEBUG_INSN_P (last2) || NOTE_P (last2)))
+    last2 = PREV_INSN (last2);
+  gcc_assert (last1 && last2);
+
   /* First ensure that the instructions match.  There may be many outgoing
      edges so this test is generally cheaper.  */
   if (old_insns_match_p (mode, last1, last2) != dir_both)
@@ -1866,7 +1892,7 @@
      partition boundaries).  See the comments at the top of
      bb-reorder.c:partition_hot_cold_basic_blocks for complete details.  */
 
-  if (flag_reorder_blocks_and_partition && reload_completed)
+  if (crtl->has_bb_partition && reload_completed)
     return false;
 
   /* Search backward through forwarder blocks.  We don't need to worry
@@ -2809,10 +2835,21 @@
 	      df_analyze ();
 	    }
 
-#ifdef ENABLE_CHECKING
 	  if (changed)
-	    verify_flow_info ();
+            {
+              /* Edge forwarding in particular can cause hot blocks previously
+                 reached by both hot and cold blocks to become dominated only
+                 by cold blocks. This will cause the verification below to fail,
+                 and lead to now cold code in the hot section. This is not easy
+                 to detect and fix during edge forwarding, and in some cases
+                 is only visible after newly unreachable blocks are deleted,
+                 which will be done in fixup_partitions.  */
+              fixup_partitions ();
+
+#ifdef ENABLE_CHECKING
+              verify_flow_info ();
 #endif
+            }
 
 	  changed_overall |= changed;
 	  first_pass = false;
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index eed3b98..f773ab9 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -4754,14 +4754,18 @@
 	  if (e->insns.r)
 	    {
 	      rebuild_jump_labels_chain (e->insns.r);
-	      /* Avoid putting insns before parm_birth_insn.  */
+	      /* Put insns after parm birth, but before
+		 NOTE_INSNS_FUNCTION_BEG.  */
 	      if (e->src == ENTRY_BLOCK_PTR
-		  && single_succ_p (ENTRY_BLOCK_PTR)
-		  && parm_birth_insn)
+		  && single_succ_p (ENTRY_BLOCK_PTR))
 		{
 		  rtx insns = e->insns.r;
 		  e->insns.r = NULL_RTX;
-		  emit_insn_after_noloc (insns, parm_birth_insn, e->dest);
+		  if (NOTE_P (parm_birth_insn)
+		      && NOTE_KIND (parm_birth_insn) == NOTE_INSN_FUNCTION_BEG)
+		    emit_insn_before_noloc (insns, parm_birth_insn, e->dest);
+		  else
+		    emit_insn_after_noloc (insns, parm_birth_insn, e->dest);
 		}
 	      else
 		commit_one_edge_insertion (e);
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c
index 3e53aa0..de1580f 100644
--- a/gcc/cfgloopmanip.c
+++ b/gcc/cfgloopmanip.c
@@ -1262,6 +1262,8 @@
 	}
       for (i = 0; i < ndupl; i++)
 	gcc_assert (scale_step[i] >= 0 && scale_step[i] <= REG_BR_PROB_BASE);
+      if (flag_auto_profile && scale_main == 0)
+	scale_main = REG_BR_PROB_BASE;
       gcc_assert (scale_main >= 0 && scale_main <= REG_BR_PROB_BASE
 		  && scale_act >= 0  && scale_act <= REG_BR_PROB_BASE);
     }
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index ec1ba9a..7766591 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -44,6 +44,7 @@
 #include "tree.h"
 #include "hard-reg-set.h"
 #include "basic-block.h"
+#include "bb-reorder.h"
 #include "regs.h"
 #include "flags.h"
 #include "function.h"
@@ -449,6 +450,9 @@
     }
 #endif
 
+  if (crtl->has_bb_partition)
+    insert_section_boundary_note ();
+
   free_bb_for_insn ();
   return 0;
 }
@@ -979,8 +983,7 @@
      partition boundaries).  See  the comments at the top of
      bb-reorder.c:partition_hot_cold_basic_blocks for complete details.  */
 
-  if (find_reg_note (insn, REG_CROSSING_JUMP, NULL_RTX)
-      || BB_PARTITION (src) != BB_PARTITION (target))
+  if (BB_PARTITION (src) != BB_PARTITION (target))
     return NULL;
 
   /* We can replace or remove a complex jump only when we have exactly
@@ -1289,6 +1292,90 @@
   return e;
 }
 
+/* Called when edge E has been redirected to a new destination,
+   in order to update the region crossing flag on the edge and
+   jump.  */
+
+static void
+fixup_partition_crossing (edge e)
+{
+  rtx note;
+
+  if (e->src == ENTRY_BLOCK_PTR || e->dest == EXIT_BLOCK_PTR)
+    return;
+  /* If we redirected an existing edge, it may already be marked
+     crossing, even though the new src is missing a reg crossing note.
+     But make sure reg crossing note doesn't already exist before
+     inserting.  */
+  if (BB_PARTITION (e->src) != BB_PARTITION (e->dest))
+    {
+      e->flags |= EDGE_CROSSING;
+      note = find_reg_note (BB_END (e->src), REG_CROSSING_JUMP, NULL_RTX);
+      if (JUMP_P (BB_END (e->src))
+          && !note)
+        add_reg_note (BB_END (e->src), REG_CROSSING_JUMP, NULL_RTX);
+    }
+  else if (BB_PARTITION (e->src) == BB_PARTITION (e->dest))
+    {
+      e->flags &= ~EDGE_CROSSING;
+      /* Remove the section crossing note from jump at end of
+         src if it exists, and if no other successors are
+         still crossing.  */
+      note = find_reg_note (BB_END (e->src), REG_CROSSING_JUMP, NULL_RTX);
+      if (note)
+        {
+          bool has_crossing_succ = false;
+          edge e2;
+          edge_iterator ei;
+          FOR_EACH_EDGE (e2, ei, e->src->succs)
+            {
+              has_crossing_succ |= (e2->flags & EDGE_CROSSING);
+              if (has_crossing_succ)
+                break;
+            }
+          if (!has_crossing_succ)
+            remove_note (BB_END (e->src), note);
+        }
+    }
+}
+
+/* Called when block BB has been reassigned to the cold partition,
+   because it is now dominated by another cold block,
+   to ensure that the region crossing attributes are updated.  */
+
+static void
+fixup_new_cold_bb (basic_block bb)
+{
+  edge e;
+  edge_iterator ei;
+
+  /* This is called when a hot bb is found to now be dominated
+     by a cold bb and therefore needs to become cold. Therefore,
+     its preds will no longer be region crossing. Any non-dominating
+     preds that were previously hot would also have become cold
+     in the caller for the same region. Any preds that were previously
+     region-crossing will be adjusted in fixup_partition_crossing.  */
+  FOR_EACH_EDGE (e, ei, bb->preds)
+    {
+      fixup_partition_crossing (e);
+    }
+
+  /* Possibly need to make bb's successor edges region crossing,
+     or remove stale region crossing.  */
+  FOR_EACH_EDGE (e, ei, bb->succs)
+    {
+      /* We can't have fall-through edges across partition boundaries.
+         Note that force_nonfallthru will do any necessary partition
+         boundary fixup by calling fixup_partition_crossing itself.  */
+      if ((e->flags & EDGE_FALLTHRU)
+          && BB_PARTITION (bb) != BB_PARTITION (e->dest)
+          && e->dest != EXIT_BLOCK_PTR)
+        force_nonfallthru (e);
+      else
+        fixup_partition_crossing (e);
+    }
+}
+
 /* Attempt to change code to redirect edge E to TARGET.  Don't do that on
    expense of adding new instructions or reordering basic blocks.
 
@@ -1305,16 +1392,18 @@
 {
   edge ret;
   basic_block src = e->src;
+  basic_block dest = e->dest;
 
   if (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))
     return NULL;
 
-  if (e->dest == target)
+  if (dest == target)
     return e;
 
   if ((ret = try_redirect_by_replacing_jump (e, target, false)) != NULL)
     {
       df_set_bb_dirty (src);
+      fixup_partition_crossing (ret);
       return ret;
     }
 
@@ -1323,9 +1412,22 @@
     return NULL;
 
   df_set_bb_dirty (src);
+  fixup_partition_crossing (ret);
   return ret;
 }
 
+/* Emit a barrier after BB, into the footer if we are in CFGLAYOUT mode.  */
+
+void
+emit_barrier_after_bb (basic_block bb)
+{
+  rtx barrier = emit_barrier_after (BB_END (bb));
+  gcc_assert (current_ir_type() == IR_RTL_CFGRTL
+              || current_ir_type () == IR_RTL_CFGLAYOUT);
+  if (current_ir_type () == IR_RTL_CFGLAYOUT)
+    BB_FOOTER (bb) = unlink_insn_chain (barrier, barrier);
+}
+
 /* Like force_nonfallthru below, but additionally performs redirection
    Used by redirect_edge_and_branch_force.  JUMP_LABEL is used only
    when redirecting to the EXIT_BLOCK, it is either ret_rtx or
@@ -1489,12 +1591,6 @@
       /* Make sure new block ends up in correct hot/cold section.  */
 
       BB_COPY_PARTITION (jump_block, e->src);
-      if (flag_reorder_blocks_and_partition
-	  && targetm_common.have_named_sections
-	  && JUMP_P (BB_END (jump_block))
-	  && !any_condjump_p (BB_END (jump_block))
-	  && (EDGE_SUCC (jump_block, 0)->flags & EDGE_CROSSING))
-	add_reg_note (BB_END (jump_block), REG_CROSSING_JUMP, NULL_RTX);
 
       /* Wire edge in.  */
       new_edge = make_edge (e->src, jump_block, EDGE_FALLTHRU);
@@ -1505,6 +1601,10 @@
       redirect_edge_pred (e, jump_block);
       e->probability = REG_BR_PROB_BASE;
 
+      /* If e->src was previously region crossing, it no longer is
+         and the reg crossing note should be removed.  */
+      fixup_partition_crossing (new_edge);
+
       /* If asm goto has any label refs to target's label,
 	 add also edge from asm goto bb to target.  */
       if (asm_goto_edge)
@@ -1556,13 +1656,16 @@
       LABEL_NUSES (label)++;
     }
 
-  emit_barrier_after (BB_END (jump_block));
+  /* We might be in cfg layout mode, and if so, the following routine will
+     insert the barrier correctly.  */
+  emit_barrier_after_bb (jump_block);
   redirect_edge_succ_nodup (e, target);
 
   if (abnormal_edge_flags)
     make_edge (src, target, abnormal_edge_flags);
 
   df_mark_solutions_dirty ();
+  fixup_partition_crossing (e);
   return new_bb;
 }
 
@@ -1651,6 +1754,21 @@
   return false;
 }
 
+/* Locate the last bb in the same partition as START_BB.  */
+
+static basic_block
+last_bb_in_partition (basic_block start_bb)
+{
+  basic_block bb;
+  FOR_BB_BETWEEN (bb, start_bb, EXIT_BLOCK_PTR, next_bb)
+    {
+      if (BB_PARTITION (start_bb) != BB_PARTITION (bb->next_bb))
+        return bb;
+    }
+  /* Return bb before EXIT_BLOCK_PTR.  */
+  return bb->prev_bb;
+}
+
 /* Split a (typically critical) edge.  Return the new block.
    The edge must not be abnormal.
 
@@ -1661,7 +1779,7 @@
 static basic_block
 rtl_split_edge (edge edge_in)
 {
-  basic_block bb;
+  basic_block bb, new_bb;
   rtx before;
 
   /* Abnormal edges cannot be split.  */
@@ -1693,13 +1811,50 @@
     }
   else
     {
-      bb = create_basic_block (before, NULL, edge_in->dest->prev_bb);
-      /* ??? Why not edge_in->dest->prev_bb here?  */
-      BB_COPY_PARTITION (bb, edge_in->dest);
+      if (edge_in->src == ENTRY_BLOCK_PTR)
+        {
+          bb = create_basic_block (before, NULL, edge_in->dest->prev_bb);
+          BB_COPY_PARTITION (bb, edge_in->dest);
+        }
+      else
+        {
+          basic_block after = edge_in->dest->prev_bb;
+          /* If this is post-bb reordering, and the edge crosses a partition
+             boundary, the new block needs to be inserted in the bb chain
+             at the end of the src partition (since we put the new bb into
+             that partition, see below). Otherwise we may end up creating
+             an extra partition crossing in the chain, which is illegal.
+             It can't go after the src, because src may have a fall-through
+             to a different block.  */
+          if (crtl->bb_reorder_complete
+              && (edge_in->flags & EDGE_CROSSING))
+            {
+              after = last_bb_in_partition (edge_in->src);
+              before = NEXT_INSN (BB_END (after));
+              /* The instruction following the last bb in partition should
+                 be a barrier, since it cannot end in a fall-through.  */
+              gcc_checking_assert (BARRIER_P (before));
+              before = NEXT_INSN (before);
+            }
+          bb = create_basic_block (before, NULL, after);
+          /* Put the split bb into the src partition, to avoid creating
+             a situation where a cold bb dominates a hot bb, in the case
+             where src is cold and dest is hot. The src will dominate
+             the new bb (whereas it might not have dominated dest).  */
+          BB_COPY_PARTITION (bb, edge_in->src);
+        }
     }
 
   make_single_succ_edge (bb, edge_in->dest, EDGE_FALLTHRU);
 
+  /* Can't allow a region crossing edge to be fallthrough.  */
+  if (BB_PARTITION (bb) != BB_PARTITION (edge_in->dest)
+      && edge_in->dest != EXIT_BLOCK_PTR)
+    {
+      new_bb = force_nonfallthru (single_succ_edge (bb));
+      gcc_assert (!new_bb);
+    }
+
   /* For non-fallthru edges, we must adjust the predecessor's
      jump instruction to target our new block.  */
   if ((edge_in->flags & EDGE_FALLTHRU) == 0)
@@ -1784,10 +1939,18 @@
     }
 
   /* If the source has one successor and the edge is not abnormal,
-     insert there.  Except for the entry block.  */
+     insert there.  Except for the entry block.
+     Don't do this if the predecessor ends in a jump other than
+     unconditional simple jump.  E.g. for asm goto that points all
+     its labels at the fallthru basic block, we can't insert instructions
+     before the asm goto, as the asm goto can have various of side effects,
+     and can't emit instructions after the asm goto, as it must end
+     the basic block.  */
   else if ((e->flags & EDGE_ABNORMAL) == 0
 	   && single_succ_p (e->src)
-	   && e->src != ENTRY_BLOCK_PTR)
+	   && e->src != ENTRY_BLOCK_PTR
+	   && (!JUMP_P (BB_END (e->src))
+	       || simplejump_p (BB_END (e->src))))
     {
       bb = e->src;
 
@@ -1812,17 +1975,13 @@
   else
     {
       bb = split_edge (e);
-      after = BB_END (bb);
 
-      if (flag_reorder_blocks_and_partition
-	  && targetm_common.have_named_sections
-	  && e->src != ENTRY_BLOCK_PTR
-	  && BB_PARTITION (e->src) == BB_COLD_PARTITION
-	  && !(e->flags & EDGE_CROSSING)
-	  && JUMP_P (after)
-	  && !any_condjump_p (after)
-	  && (single_succ_edge (bb)->flags & EDGE_CROSSING))
-	add_reg_note (after, REG_CROSSING_JUMP, NULL_RTX);
+      /* If E crossed a partition boundary, we needed to make bb end in
+         a region-crossing jump, even though it was originally fallthru.  */
+      if (JUMP_P (BB_END (bb)))
+	before = BB_END (bb);
+      else
+        after = BB_END (bb);
     }
 
   /* Now that we've found the spot, do the insertion.  */
@@ -1862,6 +2021,14 @@
 {
   basic_block bb;
 
+  /* Optimization passes that invoke this routine can cause hot blocks
+     previously reached by both hot and cold blocks to become dominated only
+     by cold blocks. This will cause the verification below to fail,
+     and lead to now cold code in the hot section. In some cases this
+     may only be visible after newly unreachable blocks are deleted,
+     which will be done by fixup_partitions.  */
+  fixup_partitions ();
+
 #ifdef ENABLE_CHECKING
   verify_flow_info ();
 #endif
@@ -2055,78 +2222,165 @@
 
   return end;
 }
-
-/* Verify the CFG and RTL consistency common for both underlying RTL and
-   cfglayout RTL.
 
-   Currently it does following checks:
+/* Sanity check partition hotness to ensure that basic blocks in
+   the cold partition don't dominate basic blocks in the hot partition.
+   If FLAG_ONLY is true, report violations as errors. Otherwise
+   re-mark the dominated blocks as cold, since this is run after
+   cfg optimizations that may make hot blocks previously reached
+   by both hot and cold blocks now only reachable along cold paths.  */
 
-   - overlapping of basic blocks
-   - insns with wrong BLOCK_FOR_INSN pointers
-   - headers of basic blocks (the NOTE_INSN_BASIC_BLOCK note)
-   - tails of basic blocks (ensure that boundary is necessary)
-   - scans body of the basic block for JUMP_INSN, CODE_LABEL
-     and NOTE_INSN_BASIC_BLOCK
-   - verify that no fall_thru edge crosses hot/cold partition boundaries
-   - verify that there are no pending RTL branch predictions
+static vec<basic_block>
+find_partition_fixes (bool flag_only)
+{
+  basic_block bb;
+  vec<basic_block> bbs_in_cold_partition = vNULL;
+  vec<basic_block> bbs_to_fix = vNULL;
 
-   In future it can be extended check a lot of other stuff as well
-   (reachability of basic blocks, life information, etc. etc.).  */
+  /* Callers check this.  */
+  gcc_checking_assert (crtl->has_bb_partition);
+
+  FOR_EACH_BB (bb)
+    if ((BB_PARTITION (bb) == BB_COLD_PARTITION))
+      bbs_in_cold_partition.safe_push (bb);
+
+  if (bbs_in_cold_partition.is_empty ())
+    return vNULL;
+
+  bool dom_calculated_here = !dom_info_available_p (CDI_DOMINATORS);
+
+  if (dom_calculated_here)
+    calculate_dominance_info (CDI_DOMINATORS);
+
+  while (! bbs_in_cold_partition.is_empty  ())
+    {
+      bb = bbs_in_cold_partition.pop ();
+      /* Any blocks dominated by a block in the cold section
+         must also be cold.  */
+      basic_block son;
+      for (son = first_dom_son (CDI_DOMINATORS, bb);
+           son;
+           son = next_dom_son (CDI_DOMINATORS, son))
+        {
+          /* If son is not yet cold, then mark it cold here and
+             enqueue it for further processing.  */
+          if ((BB_PARTITION (son) != BB_COLD_PARTITION))
+            {
+              if (flag_only)
+                error ("non-cold basic block %d dominated "
+                       "by a block in the cold partition (%d)", son->index, bb->index);
+              else
+                BB_SET_PARTITION (son, BB_COLD_PARTITION);
+              bbs_to_fix.safe_push (son);
+              bbs_in_cold_partition.safe_push (son);
+            }
+        }
+    }
+
+  if (dom_calculated_here)
+    free_dominance_info (CDI_DOMINATORS);
+
+  return bbs_to_fix;
+}
+
+/* Perform cleanup on the hot/cold bb partitioning after optimization
+   passes that modify the cfg.  */
+
+void
+fixup_partitions (void)
+{
+  basic_block bb;
+
+  if (!crtl->has_bb_partition)
+    return;
+
+  /* Delete any blocks that became unreachable and weren't
+     already cleaned up, for example during edge forwarding
+     and convert_jumps_to_returns. This will expose more
+     opportunities for fixing the partition boundaries here.
+     Also, the calculation of the dominance graph during verification
+     will assert if there are unreachable nodes.  */
+  delete_unreachable_blocks ();
+
+  /* If there are partitions, do a sanity check on them: A basic block in
+     a cold partition cannot dominate a basic block in a hot partition.
+     Fixup any that now violate this requirement, as a result of edge
+     forwarding and unreachable block deletion.  */
+  vec<basic_block> bbs_to_fix = find_partition_fixes (false);
+
+  /* Do the partition fixup after all necessary blocks have been converted to
+     cold, so that we only update the region crossings the minimum number of
+     places, which can require forcing edges to be non fallthru.  */
+  while (! bbs_to_fix.is_empty ())
+    {
+      bb = bbs_to_fix.pop ();
+      fixup_new_cold_bb (bb);
+    }
+}
+
+/* Verify, in the basic block chain, that there is at most one switch
+   between hot/cold partitions. This condition will not be true until
+   after reorder_basic_blocks is called.  */
 
 static int
-rtl_verify_flow_info_1 (void)
+verify_hot_cold_block_grouping (void)
 {
-  rtx x;
+  basic_block bb;
+  int err = 0;
+  bool switched_sections = false;
+  int current_partition = BB_UNPARTITIONED;
+
+  /* Even after bb reordering is complete, we go into cfglayout mode
+     again (in compgoto). Ensure we don't call this before going back
+     into linearized RTL when any layout fixes would have been committed.  */
+  if (!crtl->bb_reorder_complete
+      || current_ir_type() != IR_RTL_CFGRTL)
+    return err;
+
+  FOR_EACH_BB (bb)
+    {
+      if (current_partition != BB_UNPARTITIONED
+          && BB_PARTITION (bb) != current_partition)
+	{
+	  if (switched_sections)
+	    {
+	      error ("multiple hot/cold transitions found (bb %i)",
+		     bb->index);
+	      err = 1;
+	    }
+	  else
+            switched_sections = true;
+
+          if (!crtl->has_bb_partition)
+            error ("partition found but function partition flag not set");
+	}
+      current_partition = BB_PARTITION (bb);
+    }
+
+  return err;
+}
+
+
+/* Perform several checks on the edges out of each block, such as
+   the consistency of the branch probabilities, the correctness
+   of hot/cold partition crossing edges, and the number of expected
+   successor edges.  Also verify that the dominance relationship
+   between hot/cold blocks is sane.  */
+
+static int
+rtl_verify_edges (void)
+{
   int err = 0;
   basic_block bb;
 
-  /* Check the general integrity of the basic blocks.  */
-  FOR_EACH_BB_REVERSE (bb)
-    {
-      rtx insn;
-
-      if (!(bb->flags & BB_RTL))
-	{
-	  error ("BB_RTL flag not set for block %d", bb->index);
-	  err = 1;
-	}
-
-      FOR_BB_INSNS (bb, insn)
-	if (BLOCK_FOR_INSN (insn) != bb)
-	  {
-	    error ("insn %d basic block pointer is %d, should be %d",
-		   INSN_UID (insn),
-		   BLOCK_FOR_INSN (insn) ? BLOCK_FOR_INSN (insn)->index : 0,
-		   bb->index);
-	    err = 1;
-	  }
-
-      for (insn = BB_HEADER (bb); insn; insn = NEXT_INSN (insn))
-	if (!BARRIER_P (insn)
-	    && BLOCK_FOR_INSN (insn) != NULL)
-	  {
-	    error ("insn %d in header of bb %d has non-NULL basic block",
-		   INSN_UID (insn), bb->index);
-	    err = 1;
-	  }
-      for (insn = BB_FOOTER (bb); insn; insn = NEXT_INSN (insn))
-	if (!BARRIER_P (insn)
-	    && BLOCK_FOR_INSN (insn) != NULL)
-	  {
-	    error ("insn %d in footer of bb %d has non-NULL basic block",
-		   INSN_UID (insn), bb->index);
-	    err = 1;
-	  }
-    }
-
-  /* Now check the basic blocks (boundaries etc.) */
   FOR_EACH_BB_REVERSE (bb)
     {
       int n_fallthru = 0, n_branch = 0, n_abnormal_call = 0, n_sibcall = 0;
       int n_eh = 0, n_abnormal = 0;
       edge e, fallthru = NULL;
-      rtx note;
       edge_iterator ei;
+      rtx note;
+      bool has_crossing_edge = false;
 
       if (JUMP_P (BB_END (bb))
 	  && (note = find_reg_note (BB_END (bb), REG_BR_PROB, NULL_RTX))
@@ -2141,6 +2395,7 @@
 	      err = 1;
 	    }
 	}
+
       FOR_EACH_EDGE (e, ei, bb->succs)
 	{
 	  bool is_crossing;
@@ -2151,6 +2406,7 @@
 	  is_crossing = (BB_PARTITION (e->src) != BB_PARTITION (e->dest)
 			 && e->src != ENTRY_BLOCK_PTR
 			 && e->dest != EXIT_BLOCK_PTR);
+          has_crossing_edge |= is_crossing;
 	  if (e->flags & EDGE_CROSSING)
 	    {
 	      if (!is_crossing)
@@ -2170,6 +2426,13 @@
 			 e->src->index);
 		  err = 1;
 		}
+              if (JUMP_P (BB_END (bb))
+                  && !find_reg_note (BB_END (bb), REG_CROSSING_JUMP, NULL_RTX))
+		{
+		  error ("No region crossing jump at section boundary in bb %i",
+			 bb->index);
+		  err = 1;
+		}
 	    }
 	  else if (is_crossing)
 	    {
@@ -2198,6 +2461,15 @@
 	    n_abnormal++;
 	}
 
+        if (!has_crossing_edge
+            && find_reg_note (BB_END (bb), REG_CROSSING_JUMP, NULL_RTX))
+          {
+            print_rtl_with_bb (stderr, get_insns (), TDF_RTL | TDF_BLOCKS | TDF_DETAILS);
+            error ("Region crossing jump across same section in bb %i",
+                   bb->index);
+            err = 1;
+          }
+
       if (n_eh && !find_reg_note (BB_END (bb), REG_EH_REGION, NULL_RTX))
 	{
 	  error ("missing REG_EH_REGION note at the end of bb %i", bb->index);
@@ -2254,26 +2526,34 @@
 	  error ("abnormal edges for no purpose in bb %i", bb->index);
 	  err = 1;
 	}
+    }
 
-      for (x = BB_HEAD (bb); x != NEXT_INSN (BB_END (bb)); x = NEXT_INSN (x))
-	/* We may have a barrier inside a basic block before dead code
-	   elimination.  There is no BLOCK_FOR_INSN field in a barrier.  */
-	if (!BARRIER_P (x) && BLOCK_FOR_INSN (x) != bb)
-	  {
-	    debug_rtx (x);
-	    if (! BLOCK_FOR_INSN (x))
-	      error
-		("insn %d inside basic block %d but block_for_insn is NULL",
-		 INSN_UID (x), bb->index);
-	    else
-	      error
-		("insn %d inside basic block %d but block_for_insn is %i",
-		 INSN_UID (x), bb->index, BLOCK_FOR_INSN (x)->index);
+  /* If there are partitions, do a sanity check on them: A basic block in
+     a cold partition cannot dominate a basic block in a hot partition.  */
+  if (crtl->has_bb_partition && !err)
+    {
+      vec<basic_block> bbs_to_fix = find_partition_fixes (true);
+      err = !bbs_to_fix.is_empty ();
+    }
 
-	    err = 1;
-	  }
+  /* Clean up.  */
+  return err;
+}
 
-      /* OK pointers are correct.  Now check the header of basic
+/* Checks on the instructions within blocks. Currently checks that each
+   block starts with a basic block note, and that basic block notes and
+   control flow jumps are not found in the middle of the block.  */
+
+static int
+rtl_verify_bb_insns (void)
+{
+  rtx x;
+  int err = 0;
+  basic_block bb;
+
+  FOR_EACH_BB_REVERSE (bb)
+    {
+      /* Now check the header of basic
 	 block.  It ought to contain optional CODE_LABEL followed
 	 by NOTE_BASIC_BLOCK.  */
       x = BB_HEAD (bb);
@@ -2324,35 +2604,108 @@
   return err;
 }
 
+/* Verify that block pointers for instructions in basic blocks, headers and
+   footers are set appropriately.  */
+
+static int
+rtl_verify_bb_pointers (void)
+{
+  int err = 0;
+  basic_block bb;
+
+  /* Check the general integrity of the basic blocks.  */
+  FOR_EACH_BB_REVERSE (bb)
+    {
+      rtx insn;
+
+      if (!(bb->flags & BB_RTL))
+	{
+	  error ("BB_RTL flag not set for block %d", bb->index);
+	  err = 1;
+	}
+
+      FOR_BB_INSNS (bb, insn)
+	if (BLOCK_FOR_INSN (insn) != bb)
+	  {
+	    error ("insn %d basic block pointer is %d, should be %d",
+		   INSN_UID (insn),
+		   BLOCK_FOR_INSN (insn) ? BLOCK_FOR_INSN (insn)->index : 0,
+		   bb->index);
+	    err = 1;
+	  }
+
+      for (insn = BB_HEADER (bb); insn; insn = NEXT_INSN (insn))
+	if (!BARRIER_P (insn)
+	    && BLOCK_FOR_INSN (insn) != NULL)
+	  {
+	    error ("insn %d in header of bb %d has non-NULL basic block",
+		   INSN_UID (insn), bb->index);
+	    err = 1;
+	  }
+      for (insn = BB_FOOTER (bb); insn; insn = NEXT_INSN (insn))
+	if (!BARRIER_P (insn)
+	    && BLOCK_FOR_INSN (insn) != NULL)
+	  {
+	    error ("insn %d in footer of bb %d has non-NULL basic block",
+		   INSN_UID (insn), bb->index);
+	    err = 1;
+	  }
+    }
+
+  /* Clean up.  */
+  return err;
+}
+
 /* Verify the CFG and RTL consistency common for both underlying RTL and
    cfglayout RTL.
 
    Currently it does following checks:
-   - all checks of rtl_verify_flow_info_1
-   - test head/end pointers
-   - check that all insns are in the basic blocks
-     (except the switch handling code, barriers and notes)
-   - check that all returns are followed by barriers
-   - check that all fallthru edge points to the adjacent blocks.  */
+
+   - overlapping of basic blocks
+   - insns with wrong BLOCK_FOR_INSN pointers
+   - headers of basic blocks (the NOTE_INSN_BASIC_BLOCK note)
+   - tails of basic blocks (ensure that boundary is necessary)
+   - scans body of the basic block for JUMP_INSN, CODE_LABEL
+     and NOTE_INSN_BASIC_BLOCK
+   - verify that no fall_thru edge crosses hot/cold partition boundaries
+   - verify that there are no pending RTL branch predictions
+   - verify that hot blocks are not dominated by cold blocks
+
+   In future it can be extended check a lot of other stuff as well
+   (reachability of basic blocks, life information, etc. etc.).  */
 
 static int
-rtl_verify_flow_info (void)
+rtl_verify_flow_info_1 (void)
+{
+  int err = 0;
+
+  err |= rtl_verify_bb_pointers ();
+
+  err |= rtl_verify_bb_insns ();
+
+  err |= rtl_verify_edges ();
+
+  return err;
+}
+
+/* Walk the instruction chain and verify that bb head/end pointers
+  are correct, and that instructions are in exactly one bb and have
+  correct block pointers.  */
+
+static int
+rtl_verify_bb_insn_chain (void)
 {
   basic_block bb;
-  int err = rtl_verify_flow_info_1 ();
+  int err = 0;
   rtx x;
   rtx last_head = get_last_insn ();
   basic_block *bb_info;
-  int num_bb_notes;
-  const rtx rtx_first = get_insns ();
-  basic_block last_bb_seen = ENTRY_BLOCK_PTR, curr_bb = NULL;
   const int max_uid = get_max_uid ();
 
   bb_info = XCNEWVEC (basic_block, max_uid);
 
   FOR_EACH_BB_REVERSE (bb)
     {
-      edge e;
       rtx head = BB_HEAD (bb);
       rtx end = BB_END (bb);
 
@@ -2362,14 +2715,14 @@
 	  if (x == end)
 	    break;
 
-	  /* And that the code outside of basic blocks has NULL bb field.  */
-	if (!BARRIER_P (x)
-	    && BLOCK_FOR_INSN (x) != NULL)
-	  {
-	    error ("insn %d outside of basic blocks has non-NULL bb field",
-		   INSN_UID (x));
-	    err = 1;
-	  }
+            /* And that the code outside of basic blocks has NULL bb field.  */
+          if (!BARRIER_P (x)
+              && BLOCK_FOR_INSN (x) != NULL)
+            {
+              error ("insn %d outside of basic blocks has non-NULL bb field",
+                     INSN_UID (x));
+              err = 1;
+            }
 	}
 
       if (!x)
@@ -2405,6 +2758,37 @@
 	}
 
       last_head = PREV_INSN (x);
+    }
+
+  for (x = last_head; x != NULL_RTX; x = PREV_INSN (x))
+    {
+      /* Check that the code before the first basic block has NULL
+	 bb field.  */
+      if (!BARRIER_P (x)
+	  && BLOCK_FOR_INSN (x) != NULL)
+	{
+	  error ("insn %d outside of basic blocks has non-NULL bb field",
+		 INSN_UID (x));
+	  err = 1;
+	}
+    }
+  free (bb_info);
+
+  return err;
+}
+
+/* Verify that fallthru edges point to adjacent blocks in layout order and
+   that barriers exist after non-fallthru blocks.  */
+
+static int
+rtl_verify_fallthru (void)
+{
+  basic_block bb;
+  int err = 0;
+
+  FOR_EACH_BB_REVERSE (bb)
+    {
+      edge e;
 
       e = find_fallthru_edge (bb->succs);
       if (!e)
@@ -2449,19 +2833,22 @@
 	}
     }
 
-  for (x = last_head; x != NULL_RTX; x = PREV_INSN (x))
-    {
-      /* Check that the code before the first basic block has NULL
-	 bb field.  */
-      if (!BARRIER_P (x)
-	  && BLOCK_FOR_INSN (x) != NULL)
-	{
-	  error ("insn %d outside of basic blocks has non-NULL bb field",
-		 INSN_UID (x));
-	  err = 1;
-	}
-    }
-  free (bb_info);
+   return err;
+}
+
+/* Verify that blocks are laid out in consecutive order. While walking the
+   instructions, verify that all expected instructions are inside the basic
+   blocks, and that all returns are followed by barriers.  */
+
+static int
+rtl_verify_bb_layout (void)
+{
+  basic_block bb;
+  int err = 0;
+  rtx x;
+  int num_bb_notes;
+  const rtx rtx_first = get_insns ();
+  basic_block last_bb_seen = ENTRY_BLOCK_PTR, curr_bb = NULL;
 
   num_bb_notes = 0;
   last_bb_seen = ENTRY_BLOCK_PTR;
@@ -2505,6 +2892,7 @@
 	  && returnjump_p (x) && ! condjump_p (x)
 	  && ! (next_nonnote_insn (x) && BARRIER_P (next_nonnote_insn (x))))
 	    fatal_insn ("return not followed by barrier", x);
+
       if (curr_bb && x == BB_END (curr_bb))
 	curr_bb = NULL;
     }
@@ -2516,6 +2904,37 @@
 
    return err;
 }
+
+/* Verify the CFG and RTL consistency common for both underlying RTL and
+   cfglayout RTL, plus consistency checks specific to linearized RTL mode.
+
+   Currently it does following checks:
+   - all checks of rtl_verify_flow_info_1
+   - test head/end pointers
+   - check that blocks are laid out in consecutive order
+   - check that all insns are in the basic blocks
+     (except the switch handling code, barriers and notes)
+   - check that all returns are followed by barriers
+   - check that all fallthru edge points to the adjacent blocks
+   - verify that there is a single hot/cold partition boundary after bbro  */
+
+static int
+rtl_verify_flow_info (void)
+{
+  int err = 0;
+
+  err |= rtl_verify_flow_info_1 ();
+
+  err |= rtl_verify_bb_insn_chain ();
+
+  err |= rtl_verify_fallthru ();
+
+  err |= rtl_verify_bb_layout ();
+
+  err |= verify_hot_cold_block_grouping ();
+
+  return err;
+}
 
 /* Assume that the preceding pass has possibly eliminated jump instructions
    or converted the unconditional jumps.  Eliminate the edges from CFG.
@@ -3214,7 +3633,7 @@
       edge e_fall, e_taken, e;
       rtx bb_end_insn;
       rtx ret_label = NULL_RTX;
-      basic_block nb, src_bb;
+      basic_block nb;
       edge_iterator ei;
 
       if (EDGE_COUNT (bb->succs) == 0)
@@ -3349,7 +3768,6 @@
       /* We got here if we need to add a new jump insn. 
 	 Note force_nonfallthru can delete E_FALL and thus we have to
 	 save E_FALL->src prior to the call to force_nonfallthru.  */
-      src_bb = e_fall->src;
       nb = force_nonfallthru_and_redirect (e_fall, e_fall->dest, ret_label);
       if (nb)
 	{
@@ -3357,17 +3775,6 @@
 	  bb->aux = nb;
 	  /* Don't process this new block.  */
 	  bb = nb;
-
-	  /* Make sure new bb is tagged for correct section (same as
-	     fall-thru source, since you cannot fall-thru across
-	     section boundaries).  */
-	  BB_COPY_PARTITION (src_bb, single_pred (bb));
-	  if (flag_reorder_blocks_and_partition
-	      && targetm_common.have_named_sections
-	      && JUMP_P (BB_END (bb))
-	      && !any_condjump_p (BB_END (bb))
-	      && (EDGE_SUCC (bb, 0)->flags & EDGE_CROSSING))
-	    add_reg_note (BB_END (bb), REG_CROSSING_JUMP, NULL_RTX);
 	}
     }
 
@@ -3671,10 +4078,11 @@
 	    case NOTE_INSN_FUNCTION_BEG:
 	      /* There is always just single entry to function.  */
 	    case NOTE_INSN_BASIC_BLOCK:
+              /* We should only switch text sections once.  */
+	    case NOTE_INSN_SWITCH_TEXT_SECTIONS:
 	      break;
 
 	    case NOTE_INSN_EPILOGUE_BEG:
-	    case NOTE_INSN_SWITCH_TEXT_SECTIONS:
 	      emit_note_copy (insn);
 	      break;
 
@@ -3741,6 +4149,15 @@
   rtx x;
   basic_block bb;
 
+  /* Once bb reordering is complete, cfg layout mode should not be re-entered.
+     Entering cfg layout mode will perform optimizations on the cfg that
+     could affect the bb layout negatively or even require fixups. An
+     example of the latter is if edge forwarding performed when optimizing
+     the cfg layout required moving a block from the hot to the cold section
+     under -freorder-blocks-and-partition. This would create an illegal
+     partitioning unless some manual fixup was performed.  */
+  gcc_assert (!crtl->bb_reorder_complete);
+
   initialize_original_copy_tables ();
 
   cfg_layout_rtl_register_cfg_hooks ();
@@ -4481,8 +4898,7 @@
   if (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))
     return false;
 
-  if (find_reg_note (insn, REG_CROSSING_JUMP, NULL_RTX)
-      || BB_PARTITION (src) != BB_PARTITION (target))
+  if (BB_PARTITION (src) != BB_PARTITION (target))
     return false;
 
   if (!onlyjump_p (insn)
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 22233ec..3d3706a 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -137,7 +137,7 @@
    The cgraph_function_version_info has a THIS_NODE field that is the
    corresponding cgraph_node..  */
 
-static htab_t GTY((param_is (struct cgraph_function_version_info *)))
+static GTY((param_is (struct cgraph_function_version_info))) htab_t
   cgraph_fnver_htab = NULL;
 
 /* Hash function for cgraph_fnver_htab.  */
@@ -883,6 +883,7 @@
 {
   struct cgraph_edge *edge = cgraph_create_edge_1 (caller, NULL, call_stmt,
 						   count, freq);
+  tree target;
 
   edge->indirect_unknown_callee = 1;
   initialize_inline_failed (edge);
@@ -890,6 +891,23 @@
   edge->indirect_info = cgraph_allocate_init_indirect_info ();
   edge->indirect_info->ecf_flags = ecf_flags;
 
+  /* Record polymorphic call info.  */
+  if (call_stmt
+      && (target = gimple_call_fn (call_stmt))
+      && virtual_method_call_p (target))
+    {
+      tree type = obj_type_ref_class (target);
+
+
+      /* Only record types can have virtual calls.  */
+      gcc_assert (TREE_CODE (type) == RECORD_TYPE);
+      edge->indirect_info->param_index = -1;
+      edge->indirect_info->otr_token
+	 = tree_low_cst (OBJ_TYPE_REF_TOKEN (target), 1);
+      edge->indirect_info->otr_type = type;
+      edge->indirect_info->polymorphic = 1;
+    }
+
   edge->next_callee = caller->indirect_calls;
   if (caller->indirect_calls)
     caller->indirect_calls->prev_callee = edge;
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c
index f300590..86a8b73 100644
--- a/gcc/cgraphbuild.c
+++ b/gcc/cgraphbuild.c
@@ -383,7 +383,7 @@
   addr = get_base_address (addr);
   if (TREE_CODE (addr) == FUNCTION_DECL)
     {
-      struct cgraph_node *node = cgraph_get_create_node (addr);
+      struct cgraph_node *node = cgraph_get_create_real_symbol_node (addr);
       if (L_IPO_COMP_MODE && cgraph_pre_profiling_inlining_done)
         node = cgraph_lipo_get_resolved_node (addr);
 
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 0afe986..387b4a6 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -931,7 +931,7 @@
 		fprintf (cgraph_dump_file, "Trivially needed symbols:");
 	      changed = true;
 	      if (cgraph_dump_file)
-		fprintf (cgraph_dump_file, " %s", symtab_node_asm_name (node));
+		fprintf (cgraph_dump_file, " %s/%d", symtab_node_asm_name (node), node->symbol.order);
 	    }
 	  if (node == (symtab_node)first_analyzed
 	      || node == (symtab_node)first_analyzed_var)
@@ -1028,7 +1028,7 @@
       if (!node->symbol.aux && !referred_to_p (node))
 	{
 	  if (cgraph_dump_file)
-	    fprintf (cgraph_dump_file, " %s", symtab_node_name (node));
+	    fprintf (cgraph_dump_file, " %s/%d", symtab_node_name (node), node->symbol.order);
 	  symtab_remove_node (node);
 	  continue;
 	}
diff --git a/gcc/combine.c b/gcc/combine.c
index a589cfa..f65b7e4 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -5798,8 +5798,15 @@
 		return x;
 	    }
 
-	  /* If the code changed, return a whole new comparison.  */
-	  if (new_code != code)
+	  /* If the code changed, return a whole new comparison.
+	     We also need to avoid using SUBST in cases where
+	     simplify_comparison has widened a comparison with a CONST_INT,
+	     since in that case the wider CONST_INT may fail the sanity
+	     checks in do_SUBST.  */
+	  if (new_code != code
+	      || (CONST_INT_P (op1)
+		  && GET_MODE (op0) != GET_MODE (XEXP (x, 0))
+		  && GET_MODE (op0) != GET_MODE (XEXP (x, 1))))
 	    return gen_rtx_fmt_ee (new_code, mode, op0, op1);
 
 	  /* Otherwise, keep this operation, but maybe change its operands.
diff --git a/gcc/common.opt b/gcc/common.opt
index 2218107..ce4bf52 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -866,7 +866,7 @@
 ; Additional positive integers will be assigned as new versions of
 ; the ABI become the default version of the ABI.
 fabi-version=
-Common Joined RejectNegative UInteger Var(flag_abi_version) Init(2)
+Common Joined RejectNegative UInteger Var(flag_abi_version) Init(0)
 
 faggressive-loop-optimizations
 Common Report Var(flag_aggressive_loop_optimizations) Optimization Init(1) 
@@ -942,6 +942,10 @@
 Use sample profile information for call graph node weights. The profile
 file is specified in the argument.
 
+fauto-profile-accurate
+Common Report Var(flag_auto_profile_accurate) Optimization
+Whether to assume the sample profile is accurate.
+
 ; -fcheck-bounds causes gcc to generate array bounds checks.
 ; For C, C++ and ObjC: defaults off.
 ; For Java: defaults to on.
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 4696a4b..f04cb63 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1080,7 +1080,6 @@
 	tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h gnu-user.h linux.h \
 		 glibc-stdint.h pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h \
 		 pa/pa64-linux.h"
-	tmake_file="${tmake_file} pa/t-linux"
 	gas=yes gnu_ld=yes
 	need_64bit_hwint=yes
 	;;
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 5b87b3c..04a5e01 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -1313,7 +1313,7 @@
 )
 
 (define_insn "*add_<shift>_<mode>"
-  [(set (match_operand:GPI 0 "register_operand" "=rk")
+  [(set (match_operand:GPI 0 "register_operand" "=r")
 	(plus:GPI (ASHIFT:GPI (match_operand:GPI 1 "register_operand" "r")
 			      (match_operand:QI 2 "aarch64_shift_imm_<mode>" "n"))
 		  (match_operand:GPI 3 "register_operand" "r")))]
@@ -1325,7 +1325,7 @@
 
 ;; zero_extend version of above
 (define_insn "*add_<shift>_si_uxtw"
-  [(set (match_operand:DI 0 "register_operand" "=rk")
+  [(set (match_operand:DI 0 "register_operand" "=r")
 	(zero_extend:DI
 	 (plus:SI (ASHIFT:SI (match_operand:SI 1 "register_operand" "r")
 		             (match_operand:QI 2 "aarch64_shift_imm_si" "n"))
@@ -1337,7 +1337,7 @@
 )
 
 (define_insn "*add_mul_imm_<mode>"
-  [(set (match_operand:GPI 0 "register_operand" "=rk")
+  [(set (match_operand:GPI 0 "register_operand" "=r")
 	(plus:GPI (mult:GPI (match_operand:GPI 1 "register_operand" "r")
 			    (match_operand:QI 2 "aarch64_pwr_2_<mode>" "n"))
 		  (match_operand:GPI 3 "register_operand" "r")))]
@@ -1660,7 +1660,7 @@
 )
 
 (define_insn "*sub_<shift>_<mode>"
-  [(set (match_operand:GPI 0 "register_operand" "=rk")
+  [(set (match_operand:GPI 0 "register_operand" "=r")
 	(minus:GPI (match_operand:GPI 3 "register_operand" "r")
 		   (ASHIFT:GPI
 		    (match_operand:GPI 1 "register_operand" "r")
@@ -1673,7 +1673,7 @@
 
 ;; zero_extend version of above
 (define_insn "*sub_<shift>_si_uxtw"
-  [(set (match_operand:DI 0 "register_operand" "=rk")
+  [(set (match_operand:DI 0 "register_operand" "=r")
 	(zero_extend:DI
          (minus:SI (match_operand:SI 3 "register_operand" "r")
 		   (ASHIFT:SI
@@ -1686,7 +1686,7 @@
 )
 
 (define_insn "*sub_mul_imm_<mode>"
-  [(set (match_operand:GPI 0 "register_operand" "=rk")
+  [(set (match_operand:GPI 0 "register_operand" "=r")
 	(minus:GPI (match_operand:GPI 3 "register_operand" "r")
 		   (mult:GPI
 		    (match_operand:GPI 1 "register_operand" "r")
@@ -1699,7 +1699,7 @@
 
 ;; zero_extend version of above
 (define_insn "*sub_mul_imm_si_uxtw"
-  [(set (match_operand:DI 0 "register_operand" "=rk")
+  [(set (match_operand:DI 0 "register_operand" "=r")
 	(zero_extend:DI
          (minus:SI (match_operand:SI 3 "register_operand" "r")
 		   (mult:SI
diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h
index 60e1f7d..2bb42af 100644
--- a/gcc/config/aarch64/arm_neon.h
+++ b/gcc/config/aarch64/arm_neon.h
@@ -19190,7 +19190,7 @@
 	   "cmhs %0.8b, %3.8b, %0.8b\n\t"
 	   "tbl %1.8b, {%2.16b}, %3.8b\n\t"
 	   "bsl %0.8b, %4.8b, %1.8b\n\t"
-           : "+w"(result), "=w"(tmp1)
+           : "+w"(result), "=&w"(tmp1)
            : "w"(temp), "w"(idx), "w"(r)
            : /* No clobbers */);
   return result;
@@ -19206,7 +19206,7 @@
 	   "cmhs %0.8b, %3.8b, %0.8b\n\t"
 	   "tbl %1.8b, {%2.16b}, %3.8b\n\t"
 	   "bsl %0.8b, %4.8b, %1.8b\n\t"
-           : "+w"(result), "=w"(tmp1)
+           : "+w"(result), "=&w"(tmp1)
            : "w"(temp), "w"(idx), "w"(r)
            : /* No clobbers */);
   return result;
@@ -19222,7 +19222,7 @@
 	   "cmhs %0.8b, %3.8b, %0.8b\n\t"
 	   "tbl %1.8b, {%2.16b}, %3.8b\n\t"
 	   "bsl %0.8b, %4.8b, %1.8b\n\t"
-           : "+w"(result), "=w"(tmp1)
+           : "+w"(result), "=&w"(tmp1)
            : "w"(temp), "w"(idx), "w"(r)
            : /* No clobbers */);
   return result;
@@ -19277,7 +19277,7 @@
 	   "cmhs %0.8b, %3.8b, %0.8b\n\t"
 	   "tbl %1.8b, {v16.16b - v17.16b}, %3.8b\n\t"
 	   "bsl %0.8b, %4.8b, %1.8b\n\t"
-           : "+w"(result), "=w"(tmp1)
+           : "+w"(result), "=&w"(tmp1)
            : "Q"(temp), "w"(idx), "w"(r)
            : "v16", "v17", "memory");
   return result;
@@ -19296,7 +19296,7 @@
 	   "cmhs %0.8b, %3.8b, %0.8b\n\t"
 	   "tbl %1.8b, {v16.16b - v17.16b}, %3.8b\n\t"
 	   "bsl %0.8b, %4.8b, %1.8b\n\t"
-           : "+w"(result), "=w"(tmp1)
+           : "+w"(result), "=&w"(tmp1)
            : "Q"(temp), "w"(idx), "w"(r)
            : "v16", "v17", "memory");
   return result;
@@ -19315,7 +19315,7 @@
 	   "cmhs %0.8b, %3.8b, %0.8b\n\t"
 	   "tbl %1.8b, {v16.16b - v17.16b}, %3.8b\n\t"
 	   "bsl %0.8b, %4.8b, %1.8b\n\t"
-           : "+w"(result), "=w"(tmp1)
+           : "+w"(result), "=&w"(tmp1)
            : "Q"(temp), "w"(idx), "w"(r)
            : "v16", "v17", "memory");
   return result;
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index c67f56b..829b279 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -17496,7 +17496,8 @@
 	    }
 	}
 
-      if (current_tune->prefer_ldrd_strd
+      if (TARGET_LDRD
+	  && current_tune->prefer_ldrd_strd
           && !optimize_function_for_size_p (cfun))
         {
           if (TARGET_THUMB2)
@@ -23811,7 +23812,8 @@
         }
       else
         {
-          if (current_tune->prefer_ldrd_strd
+          if (TARGET_LDRD
+	      && current_tune->prefer_ldrd_strd
               && !optimize_function_for_size_p (cfun))
             {
               if (TARGET_THUMB2)
diff --git a/gcc/config/arm/vfp.md b/gcc/config/arm/vfp.md
index 923624f..10e271ae 100644
--- a/gcc/config/arm/vfp.md
+++ b/gcc/config/arm/vfp.md
@@ -1207,18 +1207,18 @@
    (set_attr "type" "fcmpd")]
 )
 
-;; Fixed point to floating point conversions. 
+;; Fixed point to floating point conversions.
 (define_code_iterator FCVT [unsigned_float float])
 (define_code_attr FCVTI32typename [(unsigned_float "u32") (float "s32")])
 
 (define_insn "*combine_vcvt_f32_<FCVTI32typename>"
   [(set (match_operand:SF 0 "s_register_operand" "=t")
 	(mult:SF (FCVT:SF (match_operand:SI 1 "s_register_operand" "0"))
-		 (match_operand 2 
+		 (match_operand 2
 			"const_double_vcvt_power_of_two_reciprocal" "Dt")))]
   "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !flag_rounding_math"
-  "vcvt.f32.<FCVTI32typename>\\t%0, %1, %v2"
- [(set_attr "predicable" "no")
+  "vcvt%?.f32.<FCVTI32typename>\\t%0, %1, %v2"
+ [(set_attr "predicable" "yes")
   (set_attr "type" "f_cvt")]
 )
 
@@ -1227,15 +1227,16 @@
 (define_insn "*combine_vcvt_f64_<FCVTI32typename>"
   [(set (match_operand:DF 0 "s_register_operand" "=x,x,w")
 	(mult:DF (FCVT:DF (match_operand:SI 1 "s_register_operand" "r,t,r"))
-		 (match_operand 2 
+		 (match_operand 2
 		     "const_double_vcvt_power_of_two_reciprocal" "Dt,Dt,Dt")))]
-  "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !flag_rounding_math 
+  "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !flag_rounding_math
   && !TARGET_VFP_SINGLE"
   "@
-  vmov.f32\\t%0, %1\;vcvt.f64.<FCVTI32typename>\\t%P0, %P0, %v2
-  vmov.f32\\t%0, %1\;vcvt.f64.<FCVTI32typename>\\t%P0, %P0, %v2
-  vmov.f64\\t%P0, %1, %1\;vcvt.f64.<FCVTI32typename>\\t%P0, %P0, %v2"
- [(set_attr "predicable" "no")
+  vmov%?.f32\\t%0, %1\;vcvt%?.f64.<FCVTI32typename>\\t%P0, %P0, %v2
+  vmov%?.f32\\t%0, %1\;vcvt%?.f64.<FCVTI32typename>\\t%P0, %P0, %v2
+  vmov%?.f64\\t%P0, %1, %1\;vcvt%?.f64.<FCVTI32typename>\\t%P0, %P0, %v2"
+ [(set_attr "predicable" "yes")
+  (set_attr "ce_count" "2")
   (set_attr "type" "f_cvt")
   (set_attr "length" "8")]
 )
diff --git a/gcc/config/i386/i386-c.c b/gcc/config/i386/i386-c.c
index bc3c60f..c53cf14 100644
--- a/gcc/config/i386/i386-c.c
+++ b/gcc/config/i386/i386-c.c
@@ -141,6 +141,10 @@
       def_or_undef (parse_in, "__corei7");
       def_or_undef (parse_in, "__corei7__");
       break;
+    case PROCESSOR_COREI7_AVX:
+      def_or_undef (parse_in, "__corei7_avx");
+      def_or_undef (parse_in, "__corei7_avx__");
+      break;
     case PROCESSOR_HASWELL:
       def_or_undef (parse_in, "__core_avx2");
       def_or_undef (parse_in, "__core_avx2__");
@@ -235,6 +239,9 @@
     case PROCESSOR_COREI7:
       def_or_undef (parse_in, "__tune_corei7__");
       break;
+    case PROCESSOR_COREI7_AVX:
+      def_or_undef (parse_in, "__tune_corei7_avx__");
+      break;
     case PROCESSOR_HASWELL:
       def_or_undef (parse_in, "__tune_core_avx2__");
       break;
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
index d06a95d..311f137 100644
--- a/gcc/config/i386/i386-protos.h
+++ b/gcc/config/i386/i386-protos.h
@@ -246,6 +246,7 @@
 extern void ix86_expand_mul_widen_hilo (rtx, rtx, rtx, bool, bool);
 extern void ix86_expand_sse2_mulv4si3 (rtx, rtx, rtx);
 extern void ix86_expand_sse2_mulvxdi3 (rtx, rtx, rtx);
+extern void ix86_expand_sse2_abs (rtx, rtx);
 
 /* In i386-c.c  */
 extern void ix86_target_macros (void);
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index e5499fc..8246edf 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -1731,8 +1731,9 @@
 #define m_P4_NOCONA (m_PENT4 | m_NOCONA)
 #define m_CORE2 (1<<PROCESSOR_CORE2)
 #define m_COREI7 (1<<PROCESSOR_COREI7)
+#define m_COREI7_AVX (1<<PROCESSOR_COREI7_AVX)
 #define m_HASWELL (1<<PROCESSOR_HASWELL)
-#define m_CORE_ALL (m_CORE2 | m_COREI7  | m_HASWELL)
+#define m_CORE_ALL (m_CORE2 | m_COREI7  | m_COREI7_AVX | m_HASWELL)
 #define m_ATOM (1<<PROCESSOR_ATOM)
 
 #define m_GEODE (1<<PROCESSOR_GEODE)
@@ -1902,10 +1903,10 @@
   m_PPRO | m_P4_NOCONA | m_CORE_ALL | m_ATOM  | m_AMDFAM10 | m_BDVER | m_GENERIC,
 
   /* X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL */
-  m_COREI7 | m_AMDFAM10 | m_BDVER | m_BTVER,
+  m_COREI7 | m_COREI7_AVX | m_AMDFAM10 | m_BDVER | m_BTVER | m_GENERIC,
 
   /* X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL */
-  m_COREI7 | m_BDVER,
+  m_COREI7 | m_COREI7_AVX | m_BDVER | m_GENERIC,
 
   /* X86_TUNE_SSE_PACKED_SINGLE_INSN_OPTIMAL */
   m_BDVER ,
@@ -2001,10 +2002,25 @@
      from integer to FP. */
   m_AMDFAM10,
 
-  /* X86_TUNE_FUSE_CMP_AND_BRANCH: Fuse a compare or test instruction
-     with a subsequent conditional jump instruction into a single
-     compare-and-branch uop.  */
-  m_BDVER,
+  /* X86_TUNE_FUSE_CMP_AND_BRANCH_32: Fuse compare with a subsequent
+     conditional jump instruction for 32 bit TARGET.
+     FIXME: revisit for generic.  */
+  m_GENERIC | m_CORE_ALL | m_BDVER,
+
+  /* X86_TUNE_FUSE_CMP_AND_BRANCH_64: Fuse compare with a subsequent
+     conditional jump instruction for TARGET_64BIT.
+     FIXME: revisit for generic.  */
+  m_GENERIC | m_COREI7 | m_COREI7_AVX | m_HASWELL | m_BDVER,
+
+  /* X86_TUNE_FUSE_CMP_AND_BRANCH_SOFLAGS: Fuse compare with a
+     subsequent conditional jump instruction when the condition jump
+     check sign flag (SF) or overflow flag (OF).  */
+  m_GENERIC | m_COREI7 | m_COREI7_AVX | m_HASWELL | m_BDVER,
+
+  /* X86_TUNE_FUSE_ALU_AND_BRANCH: Fuse alu with a subsequent conditional
+     jump instruction when the alu instruction produces the CCFLAG consumed by
+     the conditional jump instruction. */
+  m_GENERIC | m_COREI7_AVX | m_HASWELL,
 
   /* X86_TUNE_OPT_AGU: Optimize for Address Generation Unit. This flag
      will impact LEA instruction selection. */
@@ -2069,10 +2085,10 @@
   = m_PENT | m_PPRO | m_P4_NOCONA | m_CORE_ALL | m_ATOM | m_AMD_MULTIPLE | m_GENERIC;
 
 static const unsigned int x86_avx256_split_unaligned_load
-  = m_COREI7 | m_GENERIC;
+  = m_COREI7 | m_COREI7_AVX | m_GENERIC;
 
 static const unsigned int x86_avx256_split_unaligned_store
-  = m_COREI7 | m_BDVER | m_GENERIC;
+  = m_COREI7 | m_COREI7_AVX | m_BDVER | m_GENERIC;
 
 /* In case the average insn count for single function invocation is
    lower than this constant, emit fast (but longer) prologue and
@@ -2441,6 +2457,8 @@
   {&core_cost, 16, 10, 16, 10, 16},
   /* Core i7  */
   {&core_cost, 16, 10, 16, 10, 16},
+  /* Core i7 avx  */
+  {&core_cost, 16, 10, 16, 10, 16},
   /* Core avx2  */
   {&core_cost, 16, 10, 16, 10, 16},
   {&generic32_cost, 16, 7, 16, 7, 16},
@@ -2470,6 +2488,7 @@
   "nocona",
   "core2",
   "corei7",
+  "corei7-avx",
   "core-avx2",
   "atom",
   "geode",
@@ -3131,12 +3150,12 @@
       {"corei7", PROCESSOR_COREI7, CPU_COREI7,
 	PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3 | PTA_SSSE3
 	| PTA_SSE4_1 | PTA_SSE4_2 | PTA_CX16 | PTA_POPCNT | PTA_FXSR},
-      {"corei7-avx", PROCESSOR_COREI7, CPU_COREI7,
+      {"corei7-avx", PROCESSOR_COREI7_AVX, CPU_COREI7,
 	PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3
 	| PTA_SSSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_AVX
 	| PTA_CX16 | PTA_POPCNT | PTA_AES | PTA_PCLMUL
 	| PTA_FXSR | PTA_XSAVE | PTA_XSAVEOPT},
-      {"core-avx-i", PROCESSOR_COREI7, CPU_COREI7,
+      {"core-avx-i", PROCESSOR_COREI7_AVX, CPU_COREI7,
 	PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3
 	| PTA_SSSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_AVX
 	| PTA_CX16 | PTA_POPCNT | PTA_AES | PTA_PCLMUL | PTA_FSGSBASE
@@ -3209,7 +3228,7 @@
       {"bdver3", PROCESSOR_BDVER3, CPU_BDVER3,
 	PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3
 	| PTA_SSE4A | PTA_CX16 | PTA_ABM | PTA_SSSE3 | PTA_SSE4_1
-	| PTA_SSE4_2 | PTA_AES | PTA_PCLMUL | PTA_AVX
+	| PTA_SSE4_2 | PTA_AES | PTA_PCLMUL | PTA_AVX | PTA_FMA4
 	| PTA_XOP | PTA_LWP | PTA_BMI | PTA_TBM | PTA_F16C
 	| PTA_FMA | PTA_PRFCHW | PTA_FXSR | PTA_XSAVE 
 	| PTA_XSAVEOPT},
@@ -7471,9 +7490,15 @@
   switch (regno)
     {
     case AX_REG:
+    case DX_REG:
       return true;
+    case DI_REG:
+    case SI_REG:
+      return TARGET_64BIT && ix86_abi != MS_ABI;
 
-    case FIRST_FLOAT_REG:
+      /* Complex values are returned in %st(0)/%st(1) pair.  */
+    case ST0_REG:
+    case ST1_REG:
       /* TODO: The function should depend on current function ABI but
        builtins.c would need updating then. Therefore we use the
        default ABI.  */
@@ -7481,10 +7506,12 @@
 	return false;
       return TARGET_FLOAT_RETURNS_IN_80387;
 
-    case FIRST_SSE_REG:
+      /* Complex values are returned in %xmm0/%xmm1 pair.  */
+    case XMM0_REG:
+    case XMM1_REG:
       return TARGET_SSE;
 
-    case FIRST_MMX_REG:
+    case MM0_REG:
       if (TARGET_MACHO || TARGET_64BIT)
 	return false;
       return TARGET_MMX;
@@ -14293,8 +14320,6 @@
 	 Those same assemblers have the same but opposite lossage on cmov.  */
       if (mode == CCmode)
 	suffix = fp ? "nbe" : "a";
-      else if (mode == CCCmode)
-	suffix = "b";
       else
 	gcc_unreachable ();
       break;
@@ -14316,8 +14341,12 @@
 	}
       break;
     case LTU:
-      gcc_assert (mode == CCmode || mode == CCCmode);
-      suffix = "b";
+      if (mode == CCmode)
+	suffix = "b";
+      else if (mode == CCCmode)
+	suffix = "c";
+      else
+	gcc_unreachable ();
       break;
     case GE:
       switch (mode)
@@ -14337,20 +14366,20 @@
 	}
       break;
     case GEU:
-      /* ??? As above.  */
-      gcc_assert (mode == CCmode || mode == CCCmode);
-      suffix = fp ? "nb" : "ae";
+      if (mode == CCmode)
+	suffix = fp ? "nb" : "ae";
+      else if (mode == CCCmode)
+	suffix = "nc";
+      else
+	gcc_unreachable ();
       break;
     case LE:
       gcc_assert (mode == CCmode || mode == CCGCmode || mode == CCNOmode);
       suffix = "le";
       break;
     case LEU:
-      /* ??? As above.  */
       if (mode == CCmode)
 	suffix = "be";
-      else if (mode == CCCmode)
-	suffix = fp ? "nb" : "ae";
       else
 	gcc_unreachable ();
       break;
@@ -18962,12 +18991,7 @@
 	return CCmode;
     case GTU:			/* CF=0 & ZF=0 */
     case LEU:			/* CF=1 | ZF=1 */
-      /* Detect overflow checks.  They need just the carry flag.  */
-      if (GET_CODE (op0) == MINUS
-	  && rtx_equal_p (op1, XEXP (op0, 0)))
-	return CCCmode;
-      else
-	return CCmode;
+      return CCmode;
       /* Codes possibly doable only with sign flag when
          comparing against zero.  */
     case GE:			/* SF=OF   or   SF=0 */
@@ -22216,6 +22240,21 @@
   return SImode;
 }
 
+/* Copy the address to a Pmode register.  This is used for x32 to
+   truncate DImode TLS address to a SImode register. */
+
+static rtx
+ix86_copy_addr_to_reg (rtx addr)
+{
+  if (GET_MODE (addr) == Pmode)
+    return copy_addr_to_reg (addr);
+  else
+    {
+      gcc_assert (GET_MODE (addr) == DImode && Pmode == SImode);
+      return gen_rtx_SUBREG (SImode, copy_to_mode_reg (DImode, addr), 0);
+    }
+}
+
 /* When SRCPTR is non-NULL, output simple loop to move memory
    pointer to SRCPTR to DESTPTR via chunks of MODE unrolled UNROLL times,
    overall size is COUNT specified in bytes.  When SRCPTR is NULL, output the
@@ -23205,8 +23244,8 @@
   gcc_assert (alg != no_stringop);
   if (!count)
     count_exp = copy_to_mode_reg (GET_MODE (count_exp), count_exp);
-  destreg = copy_addr_to_reg (XEXP (dst, 0));
-  srcreg = copy_addr_to_reg (XEXP (src, 0));
+  destreg = ix86_copy_addr_to_reg (XEXP (dst, 0));
+  srcreg = ix86_copy_addr_to_reg (XEXP (src, 0));
   switch (alg)
     {
     case libcall:
@@ -23598,7 +23637,7 @@
   gcc_assert (alg != no_stringop);
   if (!count)
     count_exp = copy_to_mode_reg (counter_mode (count_exp), count_exp);
-  destreg = copy_addr_to_reg (XEXP (dst, 0));
+  destreg = ix86_copy_addr_to_reg (XEXP (dst, 0));
   switch (alg)
     {
     case libcall:
@@ -24328,6 +24367,42 @@
       instantiate_decl_rtl (s->rtl);
 }
 
+/* Check whether x86 address PARTS is a pc-relative address.  */
+
+static bool
+rip_relative_addr_p (struct ix86_address *parts)
+{
+  rtx base, index, disp;
+
+  base = parts->base;
+  index = parts->index;
+  disp = parts->disp;
+
+  if (disp && !base && !index)
+    {
+      if (TARGET_64BIT)
+	{
+	  rtx symbol = disp;
+
+	  if (GET_CODE (disp) == CONST)
+	    symbol = XEXP (disp, 0);
+	  if (GET_CODE (symbol) == PLUS
+	      && CONST_INT_P (XEXP (symbol, 1)))
+	    symbol = XEXP (symbol, 0);
+
+	  if (GET_CODE (symbol) == LABEL_REF
+	      || (GET_CODE (symbol) == SYMBOL_REF
+		  && SYMBOL_REF_TLS_MODEL (symbol) == 0)
+	      || (GET_CODE (symbol) == UNSPEC
+		  && (XINT (symbol, 1) == UNSPEC_GOTPCREL
+		      || XINT (symbol, 1) == UNSPEC_PCREL
+		      || XINT (symbol, 1) == UNSPEC_GOTNTPOFF)))
+	    return true;
+	}
+    }
+  return false;
+}
+
 /* Calculate the length of the memory address in the instruction encoding.
    Includes addr32 prefix, does not include the one-byte modrm, opcode,
    or other prefixes.  We never generate addr32 prefix for LEA insn.  */
@@ -24399,25 +24474,8 @@
   else if (disp && !base && !index)
     {
       len += 4;
-      if (TARGET_64BIT)
-	{
-	  rtx symbol = disp;
-
-	  if (GET_CODE (disp) == CONST)
-	    symbol = XEXP (disp, 0);
-	  if (GET_CODE (symbol) == PLUS
-	      && CONST_INT_P (XEXP (symbol, 1)))
-	    symbol = XEXP (symbol, 0);
-
-	  if (GET_CODE (symbol) != LABEL_REF
-	      && (GET_CODE (symbol) != SYMBOL_REF
-		  || SYMBOL_REF_TLS_MODEL (symbol) != 0)
-	      && (GET_CODE (symbol) != UNSPEC
-		  || (XINT (symbol, 1) != UNSPEC_GOTPCREL
-		      && XINT (symbol, 1) != UNSPEC_PCREL
-		      && XINT (symbol, 1) != UNSPEC_GOTNTPOFF)))
-	    len++;
-	}
+      if (rip_relative_addr_p (&parts))
+	len++;
     }
   else
     {
@@ -24604,6 +24662,7 @@
     case PROCESSOR_PENTIUM4:
     case PROCESSOR_CORE2:
     case PROCESSOR_COREI7:
+    case PROCESSOR_COREI7_AVX:
     case PROCESSOR_HASWELL:
     case PROCESSOR_ATHLON:
     case PROCESSOR_K8:
@@ -24861,6 +24920,7 @@
 
     case PROCESSOR_CORE2:
     case PROCESSOR_COREI7:
+    case PROCESSOR_COREI7_AVX:
     case PROCESSOR_HASWELL:
     case PROCESSOR_ATOM:
       /* Generally, we want haifa-sched:max_issue() to look ahead as far
@@ -24876,6 +24936,119 @@
     }
 }
 
+/* Return true if target platform supports macro-fusion.  */
+
+static bool
+ix86_macro_fusion_p ()
+{
+  return TARGET_FUSE_CMP_AND_BRANCH;
+}
+
+/* Check whether current microarchitecture support macro fusion
+   for insn pair "CONDGEN + CONDJMP". Refer to
+   "Intel Architectures Optimization Reference Manual". */
+
+static bool
+ix86_macro_fusion_pair_p (rtx condgen, rtx condjmp)
+{
+  rtx src, dest;
+  rtx single_set = single_set (condgen);
+  enum rtx_code ccode;
+  rtx compare_set = NULL_RTX, test_if, cond;
+  rtx alu_set = NULL_RTX, addr = NULL_RTX;
+
+  if (get_attr_type (condgen) != TYPE_TEST
+      && get_attr_type (condgen) != TYPE_ICMP
+      && get_attr_type (condgen) != TYPE_INCDEC
+      && get_attr_type (condgen) != TYPE_ALU)
+    return false;
+
+  if (single_set == NULL_RTX
+      && !TARGET_FUSE_ALU_AND_BRANCH)
+    return false;
+
+  if (single_set != NULL_RTX)
+    compare_set = single_set;
+  else
+    {
+      int i;
+      rtx pat = PATTERN (condgen);
+      for (i = 0; i < XVECLEN (pat, 0); i++)
+	if (GET_CODE (XVECEXP (pat, 0, i)) == SET)
+	  {
+	    rtx set_src = SET_SRC (XVECEXP (pat, 0, i));
+	    if (GET_CODE (set_src) == COMPARE)
+	      compare_set = XVECEXP (pat, 0, i);
+	    else
+	      alu_set = XVECEXP (pat, 0, i);
+	  }
+    }
+  if (compare_set == NULL_RTX)
+    return false;
+  src = SET_SRC (compare_set);
+  if (GET_CODE (src) != COMPARE)
+    return false;
+
+  /* Macro-fusion for cmp/test MEM-IMM + conditional jmp is not
+     supported.  */
+  if ((MEM_P (XEXP (src, 0))
+       && CONST_INT_P (XEXP (src, 1)))
+      || (MEM_P (XEXP (src, 1))
+	  && CONST_INT_P (XEXP (src, 0))))
+    return false;
+
+  /* No fusion for RIP-relative address.  */
+  if (MEM_P (XEXP (src, 0)))
+    addr = XEXP (XEXP (src, 0), 0);
+  else if (MEM_P (XEXP (src, 1)))
+    addr = XEXP (XEXP (src, 1), 0);
+
+  if (addr) {
+    ix86_address parts;
+    int ok = ix86_decompose_address (addr, &parts);
+    gcc_assert (ok);
+
+    if (rip_relative_addr_p (&parts))
+      return false;
+  }
+
+  test_if = SET_SRC (pc_set (condjmp));
+  cond = XEXP (test_if, 0);
+  ccode = GET_CODE (cond);
+  /* Check whether conditional jump use Sign or Overflow Flags.  */
+  if (!TARGET_FUSE_CMP_AND_BRANCH_SOFLAGS
+      && (ccode == GE
+          || ccode == GT
+	  || ccode == LE
+	  || ccode == LT))
+    return false;
+
+  /* Return true for TYPE_TEST and TYPE_ICMP.  */
+  if (get_attr_type (condgen) == TYPE_TEST
+      || get_attr_type (condgen) == TYPE_ICMP)
+    return true;
+
+  /* The following is the case that macro-fusion for alu + jmp.  */
+  if (!TARGET_FUSE_ALU_AND_BRANCH || !alu_set)
+    return false;
+
+  /* No fusion for alu op with memory destination operand.  */
+  dest = SET_DEST (alu_set);
+  if (MEM_P (dest))
+    return false;
+
+  /* Macro-fusion for inc/dec + unsigned conditional jump is not
+     supported.  */
+  if (get_attr_type (condgen) == TYPE_INCDEC
+      && (ccode == GEU
+	  || ccode == GTU
+	  || ccode == LEU
+	  || ccode == LTU))
+    return false;
+
+  return true;
+}
+
 /* Try to reorder ready list to take advantage of Atom pipelined IMUL
    execution. It is applied if
    (1) IMUL instruction is on the top of list;
@@ -25406,6 +25579,7 @@
     {
     case PROCESSOR_CORE2:
     case PROCESSOR_COREI7:
+    case PROCESSOR_COREI7_AVX:
     case PROCESSOR_HASWELL:
       /* Do not perform multipass scheduling for pre-reload schedule
          to save compile time.  */
@@ -29030,6 +29204,50 @@
     }
 }
 
+/* Return whether the Ith param of the BUILTIN_FUNCTION
+   is a memory reference. If I == -1, return whether the
+   BUILTIN_FUNCTION contains any memory reference param.  */
+
+static bool
+ix86_builtin_has_mem_ref_p (int builtin_function, int i)
+{
+  switch ((enum ix86_builtins) builtin_function)
+    {
+    /* LOAD.  */
+    case IX86_BUILTIN_LOADHPS:
+    case IX86_BUILTIN_LOADLPS:
+    case IX86_BUILTIN_LOADHPD:
+    case IX86_BUILTIN_LOADLPD:
+      if (i == -1 || i == 1)
+	return true;
+      break;
+    case IX86_BUILTIN_LOADUPS:
+    case IX86_BUILTIN_LOADUPD:
+    case IX86_BUILTIN_LOADDQU:
+    case IX86_BUILTIN_LOADUPD256:
+    case IX86_BUILTIN_LOADUPS256:
+    case IX86_BUILTIN_LOADDQU256:
+    case IX86_BUILTIN_LDDQU256:
+      if (i == -1 || i == 0)
+	return true;
+      break;
+    /* STORE.  */
+    case IX86_BUILTIN_STOREHPS:
+    case IX86_BUILTIN_STORELPS:
+    case IX86_BUILTIN_STOREUPS:
+    case IX86_BUILTIN_STOREUPD:
+    case IX86_BUILTIN_STOREDQU:
+    case IX86_BUILTIN_STOREUPD256:
+    case IX86_BUILTIN_STOREUPS256:
+    case IX86_BUILTIN_STOREDQU256:
+      if (i == -1 || i == 0)
+	return true;
+    default:
+      break;
+    }
+  return false;
+}
+
 /* This adds a condition to the basic_block NEW_BB in function FUNCTION_DECL
    to return a pointer to VERSION_DECL if the outcome of the expression
    formed by PREDICATE_CHAIN is true.  This function will be called during
@@ -29255,6 +29473,10 @@
 	      arg_str = "corei7";
 	      priority = P_PROC_SSE4_2;
 	      break;
+            case PROCESSOR_COREI7_AVX:
+              arg_str = "corei7-avx";
+              priority = P_PROC_SSE4_2;
+              break;
 	    case PROCESSOR_ATOM:
 	      arg_str = "atom";
 	      priority = P_PROC_SSSE3;
@@ -31902,7 +32124,13 @@
 	  if (i == memory)
 	    {
 	      /* This must be the memory operand.  */
-	      op = force_reg (Pmode, convert_to_mode (Pmode, op, 1));
+
+	      /* We expect the builtin could be expanded to rtl with memory
+		 operand and proper addressing mode will be kept as specified
+		 in TARGET_MEM_REF.  */
+	      if (!(TREE_CODE (arg) == ADDR_EXPR
+		    && TREE_CODE (TREE_OPERAND (arg, 0)) == TARGET_MEM_REF))
+		op = force_reg (Pmode, convert_to_mode (Pmode, op, 1));
 	      op = gen_rtx_MEM (mode, op);
 	      gcc_assert (GET_MODE (op) == mode
 			  || GET_MODE (op) == VOIDmode);
@@ -41570,6 +41798,53 @@
 		       gen_rtx_MULT (mode, op1, op2));
 }
 
+void
+ix86_expand_sse2_abs (rtx op0, rtx op1)
+{
+  enum machine_mode mode = GET_MODE (op0);
+  rtx tmp0, tmp1;
+
+  switch (mode)
+    {
+      /* For 32-bit signed integer X, the best way to calculate the absolute
+	 value of X is (((signed) X >> (W-1)) ^ X) - ((signed) X >> (W-1)).  */
+      case V4SImode:
+	tmp0 = expand_simple_binop (mode, ASHIFTRT, op1,
+				    GEN_INT (GET_MODE_BITSIZE
+						 (GET_MODE_INNER (mode)) - 1),
+				    NULL, 0, OPTAB_DIRECT);
+	if (tmp0)
+	  tmp1 = expand_simple_binop (mode, XOR, op1, tmp0,
+				      NULL, 0, OPTAB_DIRECT);
+	if (tmp0 && tmp1)
+	  expand_simple_binop (mode, MINUS, tmp1, tmp0,
+			       op0, 0, OPTAB_DIRECT);
+	break;
+
+      /* For 16-bit signed integer X, the best way to calculate the absolute
+	 value of X is max (X, -X), as SSE2 provides the PMAXSW insn.  */
+      case V8HImode:
+	tmp0 = expand_unop (mode, neg_optab, op1, NULL_RTX, 0);
+	if (tmp0)
+	  expand_simple_binop (mode, SMAX, op1, tmp0, op0, 0,
+			       OPTAB_DIRECT);
+	break;
+
+      /* For 8-bit signed integer X, the best way to calculate the absolute
+	 value of X is min ((unsigned char) X, (unsigned char) (-X)),
+	 as SSE2 provides the PMINUB insn.  */
+      case V16QImode:
+	tmp0 = expand_unop (mode, neg_optab, op1, NULL_RTX, 0);
+	if (tmp0)
+	  expand_simple_binop (V16QImode, UMIN, op1, tmp0, op0, 0,
+			       OPTAB_DIRECT);
+	break;
+
+      default:
+	break;
+    }
+}
+
 /* Expand an insert into a vector register through pinsr insn.
    Return true if successful.  */
 
@@ -42810,6 +43085,9 @@
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE ix86_output_function_prologue
 
+#undef TARGET_BUILTIN_HAS_MEM_REF_P
+#define TARGET_BUILTIN_HAS_MEM_REF_P ix86_builtin_has_mem_ref_p
+
 #undef TARGET_ASM_FUNCTION_EPILOGUE
 #define TARGET_ASM_FUNCTION_EPILOGUE ix86_output_function_epilogue
 
@@ -42871,6 +43149,10 @@
 #undef TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD
 #define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD \
   ia32_multipass_dfa_lookahead
+#undef TARGET_SCHED_MACRO_FUSION_P
+#define TARGET_SCHED_MACRO_FUSION_P ix86_macro_fusion_p
+#undef TARGET_SCHED_MACRO_FUSION_PAIR_P
+#define TARGET_SCHED_MACRO_FUSION_PAIR_P ix86_macro_fusion_pair_p
 
 #undef TARGET_FUNCTION_OK_FOR_SIBCALL
 #define TARGET_FUNCTION_OK_FOR_SIBCALL ix86_function_ok_for_sibcall
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index cdfe653..c546d94 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -246,6 +246,7 @@
 #define TARGET_NOCONA (ix86_tune == PROCESSOR_NOCONA)
 #define TARGET_CORE2 (ix86_tune == PROCESSOR_CORE2)
 #define TARGET_COREI7 (ix86_tune == PROCESSOR_COREI7)
+#define TARGET_COREI7_AVX (ix86_tune == PROCESSOR_COREI7_AVX)
 #define TARGET_HASWELL (ix86_tune == PROCESSOR_HASWELL)
 #define TARGET_GENERIC32 (ix86_tune == PROCESSOR_GENERIC32)
 #define TARGET_GENERIC64 (ix86_tune == PROCESSOR_GENERIC64)
@@ -353,8 +354,17 @@
 	ix86_tune_features[X86_TUNE_USE_VECTOR_FP_CONVERTS]
 #define TARGET_USE_VECTOR_CONVERTS \
 	ix86_tune_features[X86_TUNE_USE_VECTOR_CONVERTS]
+#define TARGET_FUSE_CMP_AND_BRANCH_32 \
+	ix86_tune_features[X86_TUNE_FUSE_CMP_AND_BRANCH_32]
+#define TARGET_FUSE_CMP_AND_BRANCH_64 \
+	ix86_tune_features[X86_TUNE_FUSE_CMP_AND_BRANCH_64]
 #define TARGET_FUSE_CMP_AND_BRANCH \
-	ix86_tune_features[X86_TUNE_FUSE_CMP_AND_BRANCH]
+	(TARGET_64BIT ? TARGET_FUSE_CMP_AND_BRANCH_64 \
+	 : TARGET_FUSE_CMP_AND_BRANCH_32)
+#define TARGET_FUSE_CMP_AND_BRANCH_SOFLAGS \
+	ix86_tune_features[X86_TUNE_FUSE_CMP_AND_BRANCH_SOFLAGS]
+#define TARGET_FUSE_ALU_AND_BRANCH \
+	ix86_tune_features[X86_TUNE_FUSE_ALU_AND_BRANCH]
 #define TARGET_OPT_AGU ix86_tune_features[X86_TUNE_OPT_AGU]
 #define TARGET_VECTORIZE_DOUBLE \
 	ix86_tune_features[X86_TUNE_VECTORIZE_DOUBLE]
@@ -540,6 +550,7 @@
   TARGET_CPU_DEFAULT_nocona,
   TARGET_CPU_DEFAULT_core2,
   TARGET_CPU_DEFAULT_corei7,
+  TARGET_CPU_DEFAULT_corei7_avx,
   TARGET_CPU_DEFAULT_haswell,
   TARGET_CPU_DEFAULT_atom,
 
@@ -2037,6 +2048,7 @@
   PROCESSOR_NOCONA,
   PROCESSOR_CORE2,
   PROCESSOR_COREI7,
+  PROCESSOR_COREI7_AVX,
   PROCESSOR_HASWELL,
   PROCESSOR_GENERIC32,
   PROCESSOR_GENERIC64,
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index d2545dc..6dd1026 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -6657,7 +6657,7 @@
    (set_attr "use_carry" "1")
    (set_attr "mode" "<MODE>")])
 
-;; Overflow setting add and subtract instructions
+;; Overflow setting add instructions
 
 (define_insn "*add<mode>3_cconly_overflow"
   [(set (reg:CCC FLAGS_REG)
@@ -6672,43 +6672,31 @@
   [(set_attr "type" "alu")
    (set_attr "mode" "<MODE>")])
 
-(define_insn "*sub<mode>3_cconly_overflow"
+(define_insn "*add<mode>3_cc_overflow"
   [(set (reg:CCC FLAGS_REG)
 	(compare:CCC
-	  (minus:SWI
-	    (match_operand:SWI 0 "nonimmediate_operand" "<r>m,<r>")
-	    (match_operand:SWI 1 "<general_operand>" "<r><i>,<r>m"))
-	  (match_dup 0)))]
-  ""
-  "cmp{<imodesuffix>}\t{%1, %0|%0, %1}"
-  [(set_attr "type" "icmp")
-   (set_attr "mode" "<MODE>")])
-
-(define_insn "*<plusminus_insn><mode>3_cc_overflow"
-  [(set (reg:CCC FLAGS_REG)
-	(compare:CCC
-	    (plusminus:SWI
-		(match_operand:SWI 1 "nonimmediate_operand" "<comm>0,0")
+	    (plus:SWI
+		(match_operand:SWI 1 "nonimmediate_operand" "%0,0")
 		(match_operand:SWI 2 "<general_operand>" "<r><i>,<r>m"))
 	    (match_dup 1)))
    (set (match_operand:SWI 0 "nonimmediate_operand" "=<r>m,<r>")
-	(plusminus:SWI (match_dup 1) (match_dup 2)))]
-  "ix86_binary_operator_ok (<CODE>, <MODE>mode, operands)"
-  "<plusminus_mnemonic>{<imodesuffix>}\t{%2, %0|%0, %2}"
+	(plus:SWI (match_dup 1) (match_dup 2)))]
+  "ix86_binary_operator_ok (PLUS, <MODE>mode, operands)"
+  "add{<imodesuffix>}\t{%2, %0|%0, %2}"
   [(set_attr "type" "alu")
    (set_attr "mode" "<MODE>")])
 
-(define_insn "*<plusminus_insn>si3_zext_cc_overflow"
+(define_insn "*addsi3_zext_cc_overflow"
   [(set (reg:CCC FLAGS_REG)
 	(compare:CCC
-	  (plusminus:SI
-	    (match_operand:SI 1 "nonimmediate_operand" "<comm>0")
+	  (plus:SI
+	    (match_operand:SI 1 "nonimmediate_operand" "%0")
 	    (match_operand:SI 2 "x86_64_general_operand" "rme"))
 	  (match_dup 1)))
    (set (match_operand:DI 0 "register_operand" "=r")
-	(zero_extend:DI (plusminus:SI (match_dup 1) (match_dup 2))))]
-  "TARGET_64BIT && ix86_binary_operator_ok (<CODE>, SImode, operands)"
-  "<plusminus_mnemonic>{l}\t{%2, %k0|%k0, %2}"
+	(zero_extend:DI (plus:SI (match_dup 1) (match_dup 2))))]
+  "TARGET_64BIT && ix86_binary_operator_ok (PLUS, SImode, operands)"
+  "add{l}\t{%2, %k0|%k0, %2}"
   [(set_attr "type" "alu")
    (set_attr "mode" "SI")])
 
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 05cf7f9..ed9e976 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -8394,7 +8394,7 @@
    (set (attr "prefix_rex") (symbol_ref "x86_extended_reg_mentioned_p (insn)"))
    (set_attr "mode" "DI")])
 
-(define_insn "abs<mode>2"
+(define_insn "*abs<mode>2"
   [(set (match_operand:VI124_AVX2 0 "register_operand" "=x")
 	(abs:VI124_AVX2
 	  (match_operand:VI124_AVX2 1 "nonimmediate_operand" "xm")))]
@@ -8406,6 +8406,19 @@
    (set_attr "prefix" "maybe_vex")
    (set_attr "mode" "<sseinsnmode>")])
 
+(define_expand "abs<mode>2"
+  [(set (match_operand:VI124_AVX2 0 "register_operand")
+	(abs:VI124_AVX2
+	  (match_operand:VI124_AVX2 1 "nonimmediate_operand")))]
+  "TARGET_SSE2"
+{
+  if (!TARGET_SSSE3)
+    {
+      ix86_expand_sse2_abs (operands[0], operands[1]);
+      DONE;
+    }
+})
+
 (define_insn "abs<mode>2"
   [(set (match_operand:MMXMODEI 0 "register_operand" "=y")
 	(abs:MMXMODEI
diff --git a/gcc/config/i386/x86-tune.def b/gcc/config/i386/x86-tune.def
index afd2da1..e8cdbf5 100644
--- a/gcc/config/i386/x86-tune.def
+++ b/gcc/config/i386/x86-tune.def
@@ -84,7 +84,10 @@
  DEF_TUNE (X86_TUNE_NOT_VECTORMODE, "not_vectormode")
  DEF_TUNE (X86_TUNE_USE_VECTOR_FP_CONVERTS, "use_vector_fp_converts")
  DEF_TUNE (X86_TUNE_USE_VECTOR_CONVERTS, "use_vector_converts")
- DEF_TUNE (X86_TUNE_FUSE_CMP_AND_BRANCH, "fuse_cmp_and_branch")
+ DEF_TUNE (X86_TUNE_FUSE_CMP_AND_BRANCH_32, "fuse_cmp_and_branch_32")
+ DEF_TUNE (X86_TUNE_FUSE_CMP_AND_BRANCH_64, "fuse_cmp_and_branch_64")
+ DEF_TUNE (X86_TUNE_FUSE_CMP_AND_BRANCH_SOFLAGS, "fuse_cmp_and_branch_soflags")
+ DEF_TUNE (X86_TUNE_FUSE_ALU_AND_BRANCH, "fuse_alu_and_branch")
  DEF_TUNE (X86_TUNE_OPT_AGU, "opt_agu")
  DEF_TUNE (X86_TUNE_VECTORIZE_DOUBLE, "vectorize_double")
  DEF_TUNE (X86_TUNE_SOFTWARE_PREFETCHING_BENEFICIAL, "software_prefetching_beneficial")
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index dc6f2e4..87ef8fb 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -513,6 +513,12 @@
       write_symbols = NO_DEBUG;
     }
 
+#ifdef AUTO_INC_DEC
+  /* FIXME: Disable auto increment and decrement processing until reload
+     is completed.  See PR middle-end 56791.  */
+  flag_auto_inc_dec = reload_completed;
+#endif
+
   /* We only support the "big PIC" model now.  And we always generate PIC
      code when in 64bit mode.  */
   if (flag_pic == 1 || TARGET_64BIT)
@@ -4038,7 +4044,8 @@
 	      || (! TARGET_64BIT && df_regs_ever_live_p (i + 1)))
 	    {
 	      rtx addr, insn, reg;
-	      addr = gen_rtx_MEM (DFmode, gen_rtx_POST_INC (DFmode, tmpreg));
+	      addr = gen_rtx_MEM (DFmode,
+				  gen_rtx_POST_INC (word_mode, tmpreg));
 	      reg = gen_rtx_REG (DFmode, i);
 	      insn = emit_move_insn (addr, reg);
 	      if (DO_FRAME_NOTES)
@@ -4331,7 +4338,8 @@
 	if (df_regs_ever_live_p (i)
 	    || (! TARGET_64BIT && df_regs_ever_live_p (i + 1)))
 	  {
-	    rtx src = gen_rtx_MEM (DFmode, gen_rtx_POST_INC (DFmode, tmpreg));
+	    rtx src = gen_rtx_MEM (DFmode,
+				   gen_rtx_POST_INC (word_mode, tmpreg));
 	    rtx dest = gen_rtx_REG (DFmode, i);
 	    emit_move_insn (dest, src);
 	  }
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md
index bcafc5c..af24886 100644
--- a/gcc/config/pa/pa.md
+++ b/gcc/config/pa/pa.md
@@ -836,7 +836,7 @@
 			   [(match_operand:SI 1 "reg_or_0_operand" "rM")
 			    (match_operand:SI 2 "arith11_operand" "rI")]))]
   ""
-  "{com%I2clr|cmp%I2clr},%B3 %2,%1,%0\;ldi 1,%0"
+  "{com%I2clr|cmp%I2clr},%B3 %2,%r1,%0\;ldi 1,%0"
   [(set_attr "type" "binary")
    (set_attr "length" "8")])
 
@@ -846,7 +846,7 @@
 			   [(match_operand:DI 1 "reg_or_0_operand" "rM")
 			    (match_operand:DI 2 "arith11_operand" "rI")]))]
   "TARGET_64BIT"
-  "cmp%I2clr,*%B3 %2,%1,%0\;ldi 1,%0"
+  "cmp%I2clr,*%B3 %2,%r1,%0\;ldi 1,%0"
   [(set_attr "type" "binary")
    (set_attr "length" "8")])
 
@@ -859,7 +859,7 @@
 				   [(match_operand:SI 4 "reg_or_0_operand" "rM")
 				    (match_operand:SI 5 "arith11_operand" "rI")])))]
   ""
-  "{com%I2clr|cmp%I2clr},%S3 %2,%1,%%r0\;{com%I5clr|cmp%I5clr},%B6 %5,%4,%0\;ldi 1,%0"
+  "{com%I2clr|cmp%I2clr},%S3 %2,%r1,%%r0\;{com%I5clr|cmp%I5clr},%B6 %5,%r4,%0\;ldi 1,%0"
   [(set_attr "type" "binary")
    (set_attr "length" "12")])
 
@@ -872,7 +872,7 @@
 				   [(match_operand:DI 4 "reg_or_0_operand" "rM")
 				    (match_operand:DI 5 "arith11_operand" "rI")])))]
   "TARGET_64BIT"
-  "cmp%I2clr,*%S3 %2,%1,%%r0\;cmp%I5clr,*%B6 %5,%4,%0\;ldi 1,%0"
+  "cmp%I2clr,*%S3 %2,%r1,%%r0\;cmp%I5clr,*%B6 %5,%r4,%0\;ldi 1,%0"
   [(set_attr "type" "binary")
    (set_attr "length" "12")])
 
@@ -884,7 +884,7 @@
 	       [(match_operand:SI 1 "reg_or_0_operand" "rM")
 		(match_operand:SI 2 "arith11_operand" "rI")])))]
   ""
-  "{com%I2clr|cmp%I2clr},%B3 %2,%1,%0\;ldi -1,%0"
+  "{com%I2clr|cmp%I2clr},%B3 %2,%r1,%0\;ldi -1,%0"
   [(set_attr "type" "binary")
    (set_attr "length" "8")])
 
@@ -894,7 +894,7 @@
 	       [(match_operand:DI 1 "reg_or_0_operand" "rM")
 		(match_operand:DI 2 "arith11_operand" "rI")])))]
   "TARGET_64BIT"
-  "cmp%I2clr,*%B3 %2,%1,%0\;ldi -1,%0"
+  "cmp%I2clr,*%B3 %2,%r1,%0\;ldi -1,%0"
   [(set_attr "type" "binary")
    (set_attr "length" "8")])
 
diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md
index baca878..07944db 100644
--- a/gcc/config/rs6000/predicates.md
+++ b/gcc/config/rs6000/predicates.md
@@ -275,14 +275,18 @@
   (ior (match_code "const_int")
        (match_operand 0 "gpc_reg_operand")))
 
+;; Return 1 if op is a constant integer valid for addition with addis, addi.
+(define_predicate "add_cint_operand"
+  (and (match_code "const_int")
+       (match_test "(unsigned HOST_WIDE_INT)
+		      (INTVAL (op) + (mode == SImode ? 0x80000000 : 0x80008000))
+		    < (unsigned HOST_WIDE_INT) 0x100000000ll")))
+
 ;; Return 1 if op is a constant integer valid for addition
 ;; or non-special register.
 (define_predicate "reg_or_add_cint_operand"
   (if_then_else (match_code "const_int")
-    (match_test "(HOST_BITS_PER_WIDE_INT == 32
-		  && (mode == SImode || INTVAL (op) < 0x7fff8000))
-		 || ((unsigned HOST_WIDE_INT) (INTVAL (op) + 0x80008000)
-		     < (unsigned HOST_WIDE_INT) 0x100000000ll)")
+    (match_operand 0 "add_cint_operand")
     (match_operand 0 "gpc_reg_operand")))
 
 ;; Return 1 if op is a constant integer valid for subtraction
@@ -1525,7 +1529,7 @@
 (define_predicate "small_toc_ref"
   (match_code "unspec,plus")
 {
-  if (GET_CODE (op) == PLUS && CONST_INT_P (XEXP (op, 1)))
+  if (GET_CODE (op) == PLUS && add_cint_operand (XEXP (op, 1), mode))
     op = XEXP (op, 0);
 
   return GET_CODE (op) == UNSPEC && XINT (op, 1) == UNSPEC_TOCREL;
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index e22c33d..f8579fd 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -5335,7 +5335,7 @@
 
   tocrel_base = op;
   tocrel_offset = const0_rtx;
-  if (GET_CODE (op) == PLUS && CONST_INT_P (XEXP (op, 1)))
+  if (GET_CODE (op) == PLUS && add_cint_operand (XEXP (op, 1), GET_MODE (op)))
     {
       tocrel_base = XEXP (op, 0);
       tocrel_offset = XEXP (op, 1);
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index d37a6ed..fe7d2fd 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -2110,7 +2110,9 @@
    (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]))"
+   && (REG_P (operands[0]) || REG_P (operands[1]))
+   && !(MEM_P (operands[0]) && MEM_VOLATILE_P (operands[0]))
+   && !(MEM_P (operands[1]) && MEM_VOLATILE_P (operands[1]))"
   "#"
   [(set_attr "length" "16,12,36")])
 
@@ -2410,7 +2412,7 @@
 			     (match_operand:SI 2 "gpc_reg_operand" "r,r"))
 		    (const_int 0)))
    (clobber (match_scratch:SI 3 "=r,r"))]
-  ""
+  "TARGET_32BIT"
   "@
    mullw. %3,%1,%2
    #"
@@ -2423,7 +2425,7 @@
 			     (match_operand:SI 2 "gpc_reg_operand" ""))
 		    (const_int 0)))
    (clobber (match_scratch:SI 3 ""))]
-  "reload_completed"
+  "TARGET_32BIT && reload_completed"
   [(set (match_dup 3)
 	(mult:SI (match_dup 1) (match_dup 2)))
    (set (match_dup 0)
@@ -2438,7 +2440,7 @@
 		    (const_int 0)))
    (set (match_operand:SI 0 "gpc_reg_operand" "=r,r")
 	(mult:SI (match_dup 1) (match_dup 2)))]
-  ""
+  "TARGET_32BIT"
   "@
    mullw. %0,%1,%2
    #"
@@ -2452,7 +2454,7 @@
 		    (const_int 0)))
    (set (match_operand:SI 0 "gpc_reg_operand" "")
 	(mult:SI (match_dup 1) (match_dup 2)))]
-  "reload_completed"
+  "TARGET_32BIT && reload_completed"
   [(set (match_dup 0)
 	(mult:SI (match_dup 1) (match_dup 2)))
    (set (match_dup 3)
@@ -10462,7 +10464,7 @@
 	    (unspec [(match_operand:DI 1 "" "")
 		     (match_operand:DI 2 "gpc_reg_operand" "b")]
 		    UNSPEC_TOCREL)
-	    (match_operand 3 "const_int_operand" "n"))))]
+	    (match_operand:DI 3 "add_cint_operand" "n"))))]
    "TARGET_ELF && TARGET_CMODEL != CMODEL_SMALL"
    "addis %0,%2,%1+%3@toc@ha")
 
@@ -10473,7 +10475,7 @@
 	    (unspec [(match_operand:P 1 "" "")
 		     (match_operand:P 2 "gpc_reg_operand" "b")]
 		    UNSPEC_TOCREL)
-	    (match_operand 3 "const_int_operand" "n"))))]
+	    (match_operand:P 3 "add_cint_operand" "n"))))]
    "TARGET_XCOFF && TARGET_CMODEL != CMODEL_SMALL"
    "addis %0,%1+%3@u(%2)")
 
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 43db96c..2730227 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -7064,25 +7064,12 @@
 	 or a casesi jump, check all potential targets.  */
       else if (GET_CODE (insn) == JUMP_INSN)
 	{
-          rtx pat = PATTERN (insn);
-	  if (GET_CODE (pat) == PARALLEL && XVECLEN (pat, 0) > 2)
-	    pat = XVECEXP (pat, 0, 0);
-
-          if (GET_CODE (pat) == SET)
-            {
-	      rtx label = JUMP_LABEL (insn);
-	      if (label)
-		{
-	          if (s390_find_pool (pool_list, label)
-		      != s390_find_pool (pool_list, insn))
-		    bitmap_set_bit (far_labels, CODE_LABEL_NUMBER (label));
-		}
-            }
-	  else if (GET_CODE (pat) == PARALLEL
-		   && XVECLEN (pat, 0) == 2
-		   && GET_CODE (XVECEXP (pat, 0, 0)) == SET
-		   && GET_CODE (XVECEXP (pat, 0, 1)) == USE
-		   && GET_CODE (XEXP (XVECEXP (pat, 0, 1), 0)) == LABEL_REF)
+	  rtx pat = PATTERN (insn);
+	  if (GET_CODE (pat) == PARALLEL
+	      && XVECLEN (pat, 0) == 2
+	      && GET_CODE (XVECEXP (pat, 0, 0)) == SET
+	      && GET_CODE (XVECEXP (pat, 0, 1)) == USE
+	      && GET_CODE (XEXP (XVECEXP (pat, 0, 1), 0)) == LABEL_REF)
 	    {
 	      /* Find the jump table used by this casesi jump.  */
 	      rtx vec_label = XEXP (XEXP (XVECEXP (pat, 0, 1), 0), 0);
@@ -7104,8 +7091,23 @@
 			bitmap_set_bit (far_labels, CODE_LABEL_NUMBER (label));
 		    }
 		}
+	      continue;
 	    }
-        }
+
+	  if (GET_CODE (pat) == PARALLEL)
+	    pat = XVECEXP (pat, 0, 0);
+
+	  if (GET_CODE (pat) == SET)
+	    {
+	      rtx label = JUMP_LABEL (insn);
+	      if (label)
+		{
+		  if (s390_find_pool (pool_list, label)
+		      != s390_find_pool (pool_list, insn))
+		    bitmap_set_bit (far_labels, CODE_LABEL_NUMBER (label));
+		}
+	    }
+	}
     }
 
   /* Insert base register reload insns before every pool.  */
@@ -7511,8 +7513,10 @@
     {
       cfun_frame_layout.fpr_bitmap = 0;
       cfun_frame_layout.high_fprs = 0;
-      if (TARGET_64BIT)
-	for (i = 24; i < 32; i++)
+      for (i = 16; i <= 31; i++)
+	{
+	  if (call_really_used_regs[i])
+	    continue;
 	  /* During reload we have to use the df_regs_ever_live infos
 	     since reload is marking FPRs used as spill slots there as
 	     live before actually making the code changes.  Without
@@ -7524,8 +7528,10 @@
 	      && !global_regs[i])
 	    {
 	      cfun_set_fpr_bit (i - 16);
-	      cfun_frame_layout.high_fprs++;
+	      if (i >= 24)
+		cfun_frame_layout.high_fprs++;
 	    }
+	}
     }
 
   for (i = 0; i < 16; i++)
@@ -7555,6 +7561,7 @@
 	|| TARGET_TPF_PROFILING
 	|| cfun_save_high_fprs_p
 	|| get_frame_size () > 0
+	|| (reload_completed && cfun_frame_layout.frame_size > 0)
 	|| cfun->calls_alloca
 	|| cfun->stdarg);
 
@@ -7653,11 +7660,6 @@
 	    cfun_set_fpr_bit (i);
 	}
     }
-
-  if (!TARGET_64BIT)
-    for (i = 2; i < 4; i++)
-      if (df_regs_ever_live_p (i + 16) && !global_regs[i + 16])
-	cfun_set_fpr_bit (i);
 }
 
 /* Fill cfun->machine with info about frame of current function.  */
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index da9d449..ad3ba27 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -9857,8 +9857,8 @@
 ; Non-constrained transaction begin
 
 (define_expand "tbegin"
-  [(match_operand:SI 0 "register_operand" "=d")
-   (match_operand:BLK 1 "memory_operand"  "=Q")]
+  [(match_operand:SI 0 "register_operand" "")
+   (match_operand:BLK 1 "memory_operand" "")]
   "TARGET_HTM"
 {
   s390_expand_tbegin (operands[0], operands[1], NULL_RTX, true);
@@ -9866,8 +9866,8 @@
 })
 
 (define_expand "tbegin_nofloat"
-  [(match_operand:SI 0 "register_operand" "=d")
-   (match_operand:BLK 1 "memory_operand"  "=Q")]
+  [(match_operand:SI 0 "register_operand" "")
+   (match_operand:BLK 1 "memory_operand" "")]
   "TARGET_HTM"
 {
   s390_expand_tbegin (operands[0], operands[1], NULL_RTX, false);
@@ -9875,9 +9875,9 @@
 })
 
 (define_expand "tbegin_retry"
-  [(match_operand:SI 0 "register_operand" "=d")
-   (match_operand:BLK 1 "memory_operand"  "=Q")
-   (match_operand 2 "const_int_operand")]
+  [(match_operand:SI 0 "register_operand" "")
+   (match_operand:BLK 1 "memory_operand" "")
+   (match_operand:SI 2 "general_operand" "")]
   "TARGET_HTM"
 {
   s390_expand_tbegin (operands[0], operands[1], operands[2], true);
@@ -9885,9 +9885,9 @@
 })
 
 (define_expand "tbegin_retry_nofloat"
-  [(match_operand:SI 0 "register_operand" "=d")
-   (match_operand:BLK 1 "memory_operand"  "=Q")
-   (match_operand 2 "const_int_operand")]
+  [(match_operand:SI 0 "register_operand" "")
+   (match_operand:BLK 1 "memory_operand" "")
+   (match_operand:SI 2 "general_operand" "")]
   "TARGET_HTM"
 {
   s390_expand_tbegin (operands[0], operands[1], operands[2], false);
@@ -9954,7 +9954,7 @@
 (define_expand "tend"
   [(set (reg:CCRAW CC_REGNUM)
 	(unspec_volatile:CCRAW [(const_int 0)] UNSPECV_TEND))
-   (set (match_operand:SI 0 "register_operand" "=d")
+   (set (match_operand:SI 0 "register_operand" "")
 	(unspec:SI [(reg:CCRAW CC_REGNUM)] UNSPEC_CC_TO_INT))]
   "TARGET_HTM"
   "")
@@ -9969,7 +9969,7 @@
 ; Transaction abort
 
 (define_expand "tabort"
-  [(unspec_volatile [(match_operand 0 "shift_count_or_setmem_operand" "")]
+  [(unspec_volatile [(match_operand:SI 0 "shift_count_or_setmem_operand" "")]
 		    UNSPECV_TABORT)]
   "TARGET_HTM && operands != NULL"
 {
@@ -9984,7 +9984,7 @@
 })
 
 (define_insn "*tabort_1"
-  [(unspec_volatile [(match_operand 0 "shift_count_or_setmem_operand" "")]
+  [(unspec_volatile [(match_operand:SI 0 "shift_count_or_setmem_operand" "Y")]
 		    UNSPECV_TABORT)]
   "TARGET_HTM && operands != NULL"
   "tabort\t%Y0"
@@ -10013,7 +10013,7 @@
 
 (define_expand "tx_assist"
   [(set (match_dup 1) (const_int 0))
-   (unspec_volatile [(match_operand:SI 0 "register_operand" "d")
+   (unspec_volatile [(match_operand:SI 0 "register_operand" "")
 		     (match_dup 1)
 		     (const_int 1)]
 		    UNSPECV_PPA)]
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 9a3836f..8ae9cea 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -6834,10 +6834,11 @@
 ;; If movqi_reg_reg is specified as an alternative of movqi, movqi will be
 ;; selected to copy QImode regs.  If one of them happens to be allocated
 ;; on the stack, reload will stick to movqi insn and generate wrong
-;; displacement addressing because of the generic m alternatives.  
-;; With the movqi_reg_reg being specified before movqi it will be initially 
-;; picked to load/store regs.  If the regs regs are on the stack reload will
-;; try other insns and not stick to movqi_reg_reg.
+;; displacement addressing because of the generic m alternatives.
+;; With the movqi_reg_reg being specified before movqi it will be initially
+;; picked to load/store regs.  If the regs regs are on the stack reload
+;; try other insns and not stick to movqi_reg_reg, unless there were spilled
+;; pseudos in which case 'm' constraints pertain.
 ;; The same applies to the movhi variants.
 ;;
 ;; Notice, that T bit is not allowed as a mov src operand here.  This is to
@@ -6849,11 +6850,14 @@
 ;; reloading MAC subregs otherwise.  For that probably special patterns
 ;; would be required.
 (define_insn "*mov<mode>_reg_reg"
-  [(set (match_operand:QIHI 0 "arith_reg_dest" "=r")
-	(match_operand:QIHI 1 "register_operand" "r"))]
+  [(set (match_operand:QIHI 0 "arith_reg_dest" "=r,m,*z")
+	(match_operand:QIHI 1 "register_operand" "r,*z,m"))]
   "TARGET_SH1 && !t_reg_operand (operands[1], VOIDmode)"
-  "mov	%1,%0"
-  [(set_attr "type" "move")])
+  "@
+    mov		%1,%0
+    mov.<bw>	%1,%0
+    mov.<bw>	%1,%0"
+  [(set_attr "type" "move,store,load")])
 
 ;; FIXME: The non-SH2A and SH2A variants should be combined by adding
 ;; "enabled" attribute as it is done in other targets.
diff --git a/gcc/config/sh/sh.opt b/gcc/config/sh/sh.opt
index c314e14..8a6788e 100644
--- a/gcc/config/sh/sh.opt
+++ b/gcc/config/sh/sh.opt
@@ -21,7 +21,7 @@
 ;; Used for various architecture options.
 Mask(SH_E)
 
-;; Set if the default precision of th FPU is single.
+;; Set if the default precision of the FPU is single.
 Mask(FPU_SINGLE)
 
 ;; Set if the a double-precision FPU is present but is restricted to
diff --git a/gcc/coretypes.h b/gcc/coretypes.h
index 320b4dd..0efb634 100644
--- a/gcc/coretypes.h
+++ b/gcc/coretypes.h
@@ -43,6 +43,9 @@
 
 #ifndef USED_FOR_TARGET
 
+typedef HOST_WIDEST_INT gcov_type;
+typedef unsigned HOST_WIDEST_INT gcov_type_unsigned;
+
 struct bitmap_head_def;
 typedef struct bitmap_head_def *bitmap;
 typedef const struct bitmap_head_def *const_bitmap;
diff --git a/gcc/coverage.c b/gcc/coverage.c
index 9fbb77a..a0586d4 100644
--- a/gcc/coverage.c
+++ b/gcc/coverage.c
@@ -615,37 +615,17 @@
   module_name_tab.dispose ();
 }
 
-typedef struct {
-  unsigned int mod_id;
-  const char *mod_name;
-} mod_id_to_name_t;
-
-static vec<mod_id_to_name_t> *mod_names;
-
-static void
-record_module_name (unsigned int mod_id, const char *name)
-{
-  mod_id_to_name_t t;
-
-  t.mod_id = mod_id;
-  t.mod_name = xstrdup (name);
-  if (!mod_names)
-    vec_alloc (mod_names, 10);
-  mod_names->safe_push (t);
-}
-
 /* Return the module name for module with MOD_ID.  */
 
 const char *
 get_module_name (unsigned int mod_id)
 {
   size_t i;
-  mod_id_to_name_t *elt;
 
-  for (i = 0; mod_names->iterate (i, &elt); i++)
+  for (i = 0; i < num_in_fnames; i++)
     {
-      if (elt->mod_id == mod_id)
-        return elt->mod_name;
+      if (module_infos[i]->ident == mod_id)
+        return lbasename (module_infos[i]->source_filename);
     }
 
   gcc_assert (0);
@@ -927,9 +907,6 @@
 		}
             }
 
-          record_module_name (mod_info->ident,
-                              lbasename (mod_info->source_filename));
-
           if (dump_enabled_p ())
             {
               dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, input_location,
@@ -1508,6 +1485,7 @@
   TREE_STATIC (var) = 1;
   TREE_ADDRESSABLE (var) = 1;
   DECL_ALIGN (var) = TYPE_ALIGN (type);
+  DECL_ARTIFICIAL (var) = 1;
 
   return var;
 }
diff --git a/gcc/coverage.h b/gcc/coverage.h
index 3fd252b..8d61092 100644
--- a/gcc/coverage.h
+++ b/gcc/coverage.h
@@ -58,6 +58,8 @@
 extern struct cgraph_node * find_func_by_global_id (unsigned HOST_WIDE_INT gid,
 						    bool);
 
+extern bool check_ic_target (gimple call_stmt, struct cgraph_node *target);
+
 /* All the coverage counters are supposed to be allocated by the time
    coverage_end_function is called. However, direct-call counters are
    allocated after coverage_end_function has been called. This function
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index b5dc49e..1e8579e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,59 @@
+2013-10-25  Tom de Vries  <tom@codesourcery.com>
+
+	PR c++/58282
+	* except.c (build_must_not_throw_expr): Handle
+	flag_exceptions.
+
+2013-10-17  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/58596
+	* semantics.c (lambda_expr_this_capture): Handle NSDMIs in the
+	cp_unevaluated_operand case.
+
+2013-10-16  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/58633
+	* parser.c (cp_parser_pseudo_destructor_name): Revert r174385 changes.
+
+2013-10-16  Jason Merrill  <jason@redhat.com>
+
+	PR c++/57850
+	* decl2.c (dump_tu): Split out from...
+	(cp_write_global_declarations): ...here.  Call it in PCH mode.
+
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
+2013-10-08  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/58568
+	* semantics.c (begin_lambda_type): Check return value of xref_tag
+	for error_mark_node; tidy.
+	* decl.c (grokdeclarator): Tweak error message.
+
+2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/58535
+	* parser.c (cp_parser_function_specifier_opt): Upon error about
+	virtual templates don't set ds_virtual.
+
+2013-09-18  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/58457
+	* class.c (instantiate_type): Loosen a bit the gcc_assert.
+
+2013-09-13  Jason Merrill  <jason@redhat.com>
+
+	PR c++/58273
+	* pt.c (any_type_dependent_elements_p): Actually check for
+	type-dependence, not value-dependence.
+
+2013-09-09  Jakub Jelinek  <jakub@redhat.com>
+
+	PR c++/58325
+	* init.c (build_vec_delete): Call mark_rvalue_use on base.
+
 2013-08-20  Jason Merrill  <jason@redhat.com>
 
 	PR c++/58119
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index d2d5f76..c95e7dd 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -7428,7 +7428,7 @@
   struct z_candidate *candidates = 0, *cand;
   tree explicit_targs = NULL_TREE;
   tree basetype = NULL_TREE;
-  tree access_binfo;
+  tree access_binfo, binfo;
   tree optype;
   tree first_mem_arg = NULL_TREE;
   tree instance_ptr;
@@ -7468,6 +7468,7 @@
   if (!conversion_path)
     conversion_path = BASELINK_BINFO (fns);
   access_binfo = BASELINK_ACCESS_BINFO (fns);
+  binfo = BASELINK_BINFO (fns);
   optype = BASELINK_OPTYPE (fns);
   fns = BASELINK_FUNCTIONS (fns);
   if (TREE_CODE (fns) == TEMPLATE_ID_EXPR)
@@ -7717,7 +7718,7 @@
 		 do not want to perform a non-virtual call.  */
 	      if (DECL_VINDEX (fn) && ! (flags & LOOKUP_NONVIRTUAL)
 		  && same_type_ignoring_top_level_qualifiers_p
-		  (DECL_CONTEXT (fn), TREE_TYPE (instance))
+		  (DECL_CONTEXT (fn), TREE_TYPE (binfo))
 		  && resolves_to_fixed_type_p (instance, 0))
 		flags |= LOOKUP_NONVIRTUAL;
               if (explicit_targs)
@@ -9047,6 +9048,9 @@
       tree name;
 
       TREE_STATIC (var) = TREE_STATIC (decl);
+      /* Capture the current module info for statics.  */
+      if (L_IPO_COMP_MODE && TREE_STATIC (var))
+        varpool_node_for_decl (var);
       DECL_TLS_MODEL (var) = DECL_TLS_MODEL (decl);
       name = mangle_ref_init_variable (decl);
       DECL_NAME (var) = name;
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index a38d784..1a9cdbc 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -6064,6 +6064,7 @@
 extern tree mangle_tls_wrapper_fn		(tree);
 extern bool decl_tls_wrapper_p			(tree);
 extern tree mangle_ref_init_variable		(tree);
+extern void reset_temp_count                    (void);
 
 /* in dump.c */
 extern bool cp_dump_tree			(void *, tree);
@@ -6111,6 +6112,7 @@
 /* in name-lookup.c */
 extern void suggest_alternatives_for            (location_t, tree);
 extern tree strip_using_decl                    (tree);
+extern void reset_anon_name                     (void);
 
 /* -- end of C++ */
 
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index d7ccdc5..64ff7de 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8823,8 +8823,8 @@
 			     && !uniquely_derived_from_p (ctype,
 							  current_class_type))
 		      {
-			error ("type %qT is not derived from type %qT",
-			       ctype, current_class_type);
+			error ("invalid use of qualified-name %<%T::%D%>",
+			       qualifying_scope, decl);
 			return error_mark_node;
 		      }
 		  }
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 94989cb..6d32e39 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -3886,6 +3886,7 @@
 }
 
 /* Clear the list of deferred functions.  */
+
 void
 cp_clear_deferred_fns (void)
 {
@@ -3896,6 +3897,8 @@
   no_linkage_decls = NULL;
   cp_clear_constexpr_hashtable ();
   clear_pending_templates ();
+  reset_anon_name ();
+  reset_temp_count ();
 }
 
 /* Collect declarations from all namespaces relevant to SOURCE_FILE.  */
@@ -3974,6 +3977,22 @@
   expand_or_defer_fn (finish_function (0));
 }
 
+/* The entire file is now complete.  If requested, dump everything
+   to a file.  */
+
+static void
+dump_tu (void)
+{
+  int flags;
+  FILE *stream = dump_begin (TDI_tu, &flags);
+
+  if (stream)
+    {
+      dump_node (global_namespace, flags & ~TDF_SLIM, stream);
+      dump_end (TDI_tu, stream);
+    }
+}
+
 /* This routine is called at the end of compilation.
    Its job is to create all the code needed to initialize and
    destroy the global aggregates.  We do the destruction
@@ -4333,9 +4352,12 @@
       || !vec_safe_is_empty (decl_namespace_list))
     return;
 
+  /* This is the point to write out a PCH if we're doing that.
+     In that case we do not want to do anything else.  */
   if (pch_file)
     {
       c_common_write_pch ();
+      dump_tu ();
       return;
     }
 
@@ -4380,7 +4402,6 @@
   /* Collect candidates for Java hidden aliases.  */
   candidates = collect_candidates_for_java_method_aliases ();
 
-
   timevar_start (TV_PHASE_OPT_GEN);
 
   finalize_compilation_unit ();
@@ -4412,16 +4433,7 @@
 
   /* The entire file is now complete.  If requested, dump everything
      to a file.  */
-  {
-    int flags;
-    FILE *stream = dump_begin (TDI_tu, &flags);
-
-    if (stream)
-      {
-	dump_node (global_namespace, flags & ~TDF_SLIM, stream);
-	dump_end (TDI_tu, stream);
-      }
-  }
+  dump_tu ();
 
   if (flag_detailed_statistics)
     {
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 216ec10..604f274 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -380,6 +380,9 @@
 {
   tree type = body ? TREE_TYPE (body) : void_type_node;
 
+  if (!flag_exceptions)
+    return body;
+
   if (cond && !value_dependent_expression_p (cond))
     {
       cond = cxx_constant_value (cond);
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index d58bb0c..b554e00 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -4069,6 +4069,7 @@
       tree cookie_addr;
       tree size_ptr_type = build_pointer_type (sizetype);
 
+      base = mark_rvalue_use (base);
       if (TREE_SIDE_EFFECTS (base))
 	{
 	  base_init = get_target_expr (base);
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 7b0566a..11acda3 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -687,13 +687,6 @@
     mangled_name:;
       write_string ("_Z");
       write_encoding (decl);
-      if (DECL_LANG_SPECIFIC (decl)
-	  && (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (decl)
-	      || DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl)))
-	/* We need a distinct mangled name for these entities, but
-	   we should never actually output it.  So, we append some
-	   characters the assembler won't like.  */
-	write_string (" *INTERNAL* ");
     }
 }
 
@@ -3850,6 +3843,14 @@
 
 static GTY(()) int temp_count;
 
+/* Reset static variable temp_count to 0.  */
+
+void
+reset_temp_count (void)
+{
+  temp_count = 0;
+}
+
 tree
 mangle_ref_init_variable (const tree variable)
 {
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 023f80e..2a3b06c 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -360,8 +360,10 @@
 	{
 	  resolve_unique_section (thunk_fndecl, 0, flag_function_sections);
 
-	  /* Output the thunk into the same section as function.  */
-	  DECL_SECTION_NAME (thunk_fndecl) = DECL_SECTION_NAME (function);
+	  /* Output the thunk into the same section as function if function reordering
+	     is not switched on.  */
+	  if (!flag_reorder_functions)
+	    DECL_SECTION_NAME (thunk_fndecl) = DECL_SECTION_NAME (function);
 	}
     }
 
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 73cbe95..4d8a44c 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -2009,6 +2009,14 @@
 
 static GTY(()) int anon_cnt;
 
+/* Reset static variable anon_cnt to 0.  */
+
+void
+reset_anon_name (void)
+{
+  anon_cnt = 0;
+}
+
 /* Return an IDENTIFIER which can be used as a name for
    anonymous structs and unions.  */
 
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 5ed2730..9bd14ea 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -6421,10 +6421,6 @@
   /* Look for the `~'.  */
   cp_parser_require (parser, CPP_COMPL, RT_COMPL);
 
-  /* Once we see the ~, this has to be a pseudo-destructor.  */
-  if (!processing_template_decl && !cp_parser_error_occurred (parser))
-    cp_parser_commit_to_tentative_parse (parser);
-
   /* Look for the type-name again.  We are not responsible for
      checking that it matches the first type-name.  */
   *type = cp_parser_nonclass_name (parser);
@@ -11159,7 +11155,8 @@
 	 A member function template shall not be virtual.  */
       if (PROCESSING_REAL_TEMPLATE_DECL_P ())
 	error_at (token->location, "templates may not be %<virtual%>");
-      set_and_check_decl_spec_loc (decl_specs, ds_virtual, token);
+      else
+	set_and_check_decl_spec_loc (decl_specs, ds_virtual, token);
       break;
 
     case RID_EXPLICIT:
@@ -22711,6 +22708,48 @@
   pop_unparsed_function_queues (parser);
 }
 
+/* Subroutine of cp_parser_sizeof_operand, for handling C++11
+
+     sizeof ... ( identifier )
+
+   where the 'sizeof' token has already been consumed.  */
+
+static tree
+cp_parser_sizeof_pack (cp_parser *parser)
+{
+  /* Consume the `...'.  */
+  cp_lexer_consume_token (parser->lexer);
+  maybe_warn_variadic_templates ();
+
+  bool paren = cp_lexer_next_token_is (parser->lexer, CPP_OPEN_PAREN);
+  if (paren)
+    cp_lexer_consume_token (parser->lexer);
+  else
+    permerror (cp_lexer_peek_token (parser->lexer)->location,
+	       "%<sizeof...%> argument must be surrounded by parentheses");
+
+  cp_token *token = cp_lexer_peek_token (parser->lexer);
+  tree name = cp_parser_identifier (parser);
+  /* The name is not qualified.  */
+  parser->scope = NULL_TREE;
+  parser->qualifying_scope = NULL_TREE;
+  parser->object_scope = NULL_TREE;
+  tree expr = cp_parser_lookup_name_simple (parser, name, token->location);
+  if (expr == error_mark_node)
+    cp_parser_name_lookup_error (parser, name, expr, NLE_NULL,
+				 token->location);
+  if (TREE_CODE (expr) == TYPE_DECL)
+    expr = TREE_TYPE (expr);
+  else if (TREE_CODE (expr) == CONST_DECL)
+    expr = DECL_INITIAL (expr);
+  expr = make_pack_expansion (expr);
+
+  if (paren)
+    cp_parser_require (parser, CPP_CLOSE_PAREN, RT_CLOSE_PAREN);
+
+  return expr;
+}
+
 /* Parse the operand of `sizeof' (or a similar operator).  Returns
    either a TYPE or an expression, depending on the form of the
    input.  The KEYWORD indicates which kind of expression we have
@@ -22724,7 +22763,12 @@
   char *tmp;
   bool saved_integral_constant_expression_p;
   bool saved_non_integral_constant_expression_p;
-  bool pack_expansion_p = false;
+
+  /* If it's a `...', then we are computing the length of a parameter
+     pack.  */
+  if (keyword == RID_SIZEOF
+      && cp_lexer_next_token_is (parser->lexer, CPP_ELLIPSIS))
+    return cp_parser_sizeof_pack (parser);
 
   /* Types cannot be defined in a `sizeof' expression.  Save away the
      old message.  */
@@ -22743,19 +22787,6 @@
     = parser->non_integral_constant_expression_p;
   parser->integral_constant_expression_p = false;
 
-  /* If it's a `...', then we are computing the length of a parameter
-     pack.  */
-  if (keyword == RID_SIZEOF
-      && cp_lexer_next_token_is (parser->lexer, CPP_ELLIPSIS))
-    {
-      /* Consume the `...'.  */
-      cp_lexer_consume_token (parser->lexer);
-      maybe_warn_variadic_templates ();
-
-      /* Note that this is an expansion.  */
-      pack_expansion_p = true;
-    }
-
   /* Do not actually evaluate the expression.  */
   ++cp_unevaluated_operand;
   ++c_inhibit_evaluation_warnings;
@@ -22795,9 +22826,6 @@
 				 /*attrlist=*/NULL);
 	}
     }
-  else if (pack_expansion_p)
-    permerror (cp_lexer_peek_token (parser->lexer)->location,
-	       "%<sizeof...%> argument must be surrounded by parentheses");
 
   /* If the type-id production did not work out, then we must be
      looking at the unary-expression production.  */
@@ -22805,10 +22833,6 @@
     expr = cp_parser_unary_expression (parser, /*address_p=*/false,
 				       /*cast_p=*/false, NULL);
 
-  if (pack_expansion_p)
-    /* Build a pack expansion. */
-    expr = make_pack_expansion (expr);
-
   /* Go back to evaluating expressions.  */
   --cp_unevaluated_operand;
   --c_inhibit_evaluation_warnings;
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 68e0022..d644fb6 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -20138,7 +20138,7 @@
 any_type_dependent_elements_p (const_tree list)
 {
   for (; list; list = TREE_CHAIN (list))
-    if (value_dependent_expression_p (TREE_VALUE (list)))
+    if (type_dependent_expression_p (TREE_VALUE (list)))
       return true;
 
   return false;
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 3d25476..06060af 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2486,6 +2486,10 @@
       decl = pushdecl_top_level (decl);
       DECL_NAME (decl) = make_anon_name ();
       SET_DECL_ASSEMBLER_NAME (decl, DECL_NAME (decl));
+      /* Capture the current module info for statics.  */
+      if (L_IPO_COMP_MODE)
+        varpool_node_for_decl (decl);
+
       return decl;
     }
   else
@@ -9028,6 +9032,8 @@
                      name,
                      /*scope=*/ts_lambda,
                      /*template_header_p=*/false);
+    if (type == error_mark_node)
+      return error_mark_node;
   }
 
   /* Designate it as a struct so that we can use aggregate initialization.  */
@@ -9042,8 +9048,6 @@
 
   /* Start the class.  */
   type = begin_class_definition (type);
-  if (type == error_mark_node)
-    return error_mark_node;
 
   return type;
 }
@@ -9502,7 +9506,14 @@
   /* In unevaluated context this isn't an odr-use, so just return the
      nearest 'this'.  */
   if (cp_unevaluated_operand)
-    return lookup_name (this_identifier);
+    {
+      /* In an NSDMI the fake 'this' pointer that we're using for
+	 parsing is in scope_chain.  */
+      if (LAMBDA_EXPR_EXTRA_SCOPE (lambda)
+	  && TREE_CODE (LAMBDA_EXPR_EXTRA_SCOPE (lambda)) == FIELD_DECL)
+	return scope_chain->x_current_class_ptr;
+      return lookup_name (this_identifier);
+    }
 
   /* Try to default capture 'this' if we can.  */
   if (!this_capture
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 9c8dd89..b6075b7 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -7412,6 +7412,8 @@
 the byte at @code{*@var{ptr}}.  The byte is set to some implementation
 defined nonzero ``set'' value and the return value is @code{true} if and only
 if the previous contents were ``set''.
+It should be only used for operands of type @code{bool} or @code{char}. For 
+other types only part of the value may be set.
 
 All memory models are valid.
 
@@ -7421,6 +7423,10 @@
 
 This built-in function performs an atomic clear operation on
 @code{*@var{ptr}}.  After the operation, @code{*@var{ptr}} contains 0.
+It should be only used for operands of type @code{bool} or @code{char} and 
+in conjunction with @code{__atomic_test_and_set}.
+For other types it may only clear partially. If the type is not @code{bool}
+prefer using @code{__atomic_store}.
 
 The valid memory model variants are
 @code{__ATOMIC_RELAXED}, @code{__ATOMIC_SEQ_CST}, and
@@ -7492,18 +7498,20 @@
 Memory model must be @code{__ATOMIC_RELEASE} or stronger.
 @end table
 
-When a lock acquire fails it's required for good performance to abort
+When a lock acquire fails it is required for good performance to abort
 the transaction quickly. This can be done with a @code{_mm_pause}
 
 @smallexample
 #include <immintrin.h> // For _mm_pause
 
+int lockvar;
+
 /* Acquire lock with lock elision */
 while (__atomic_exchange_n(&lockvar, 1, __ATOMIC_ACQUIRE|__ATOMIC_HLE_ACQUIRE))
     _mm_pause(); /* Abort failed transaction */
 ...
 /* Free lock with lock elision */
-__atomic_clear(&lockvar, __ATOMIC_RELEASE|__ATOMIC_HLE_RELEASE);
+__atomic_store_n(&lockvar, 0, __ATOMIC_RELEASE|__ATOMIC_HLE_RELEASE);
 @end smallexample
 
 @node Object Size Checking
@@ -14134,7 +14142,7 @@
 is not executed as part of an transaction.
 @end deftypefn
 
-@deftypefn {Built-in Function} void __builtin_non_tx_store (unsigned long long *, unsigned long long)
+@deftypefn {Built-in Function} void __builtin_non_tx_store (uint64_t *, uint64_t)
 
 Generates the @code{ntstg} machine instruction.  The second argument
 is written to the first arguments location.  The store operation will
diff --git a/gcc/doc/implement-cxx.texi b/gcc/doc/implement-cxx.texi
index e9236ca..43a8a59 100644
--- a/gcc/doc/implement-cxx.texi
+++ b/gcc/doc/implement-cxx.texi
@@ -9,8 +9,8 @@
 A conforming implementation of ISO C++ is required to document its
 choice of behavior in each of the areas that are designated
 ``implementation defined''.  The following lists all such areas,
-along with the section numbers from the ISO/IEC 14822:1998 and ISO/IEC
-14822:2003 standards.  Some areas are only implementation-defined in
+along with the section numbers from the ISO/IEC 14882:1998 and ISO/IEC
+14882:2003 standards.  Some areas are only implementation-defined in
 one version of the standard.
 
 Some choices depend on the externally determined ABI for the platform
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 48df7ce..8990425 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -708,6 +708,12 @@
 If a target implements string objects then this hook should should  provide a facility to check the function arguments in @var{args_list}  against the format specifiers in @var{format_arg} where the type of  @var{format_arg} is one recognized as a valid string reference type.
 @end deftypefn
 
+@deftypefn {Target Hook} bool TARGET_BUILTIN_HAS_MEM_REF_P (int @var{builtin_function}, int @var{i})
+This hook return whether the @var{i}th param of the @var{builtin_function}
+is a memory reference. If @var{i} is -1, return whether the @var{builtin_function}
+contains any memory reference type param.
+@end deftypefn
+
 @deftypefn {Target Hook} void TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE (void)
 This target function is similar to the hook @code{TARGET_OPTION_OVERRIDE}
 but is called when the optimize level is changed via an attribute or
@@ -6551,6 +6557,17 @@
 cycle.  These other insns can then be taken into account properly.
 @end deftypefn
 
+@deftypefn {Target Hook} bool TARGET_SCHED_MACRO_FUSION_P (void)
+This hook is used to check whether target platform supports macro fusion.
+@end deftypefn
+
+@deftypefn {Target Hook} bool TARGET_SCHED_MACRO_FUSION_PAIR_P (rtx @var{condgen}, rtx @var{condjmp})
+This hook is used to check whether two insns could be macro fused for
+target microarchitecture. If this hook returns true for the given insn pair
+(@var{condgen} and @var{condjmp}), scheduler will put them into a sched
+group, and they will not be scheduled apart.
+@end deftypefn
+
 @deftypefn {Target Hook} void TARGET_SCHED_DEPENDENCIES_EVALUATION_HOOK (rtx @var{head}, rtx @var{tail})
 This hook is called after evaluation forward dependencies of insns in
 chain given by two parameter values (@var{head} and @var{tail}
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 6b5c45b..4689f19 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -696,6 +696,8 @@
 
 @hook TARGET_CHECK_STRING_OBJECT_FORMAT_ARG
 
+@hook TARGET_BUILTIN_HAS_MEM_REF_P
+
 @hook TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE
 This target function is similar to the hook @code{TARGET_OPTION_OVERRIDE}
 but is called when the optimize level is changed via an attribute or
@@ -6455,6 +6457,10 @@
 cycle.  These other insns can then be taken into account properly.
 @end deftypefn
 
+@hook TARGET_SCHED_MACRO_FUSION_P
+
+@hook TARGET_SCHED_MACRO_FUSION_PAIR_P
+
 @hook TARGET_SCHED_DEPENDENCIES_EVALUATION_HOOK
 This hook is called after evaluation forward dependencies of insns in
 chain given by two parameter values (@var{head} and @var{tail}
diff --git a/gcc/dojump.c b/gcc/dojump.c
index 3f04eac..492748e 100644
--- a/gcc/dojump.c
+++ b/gcc/dojump.c
@@ -311,32 +311,66 @@
       break;
 
     case TRUTH_ANDIF_EXPR:
-      if (if_false_label == NULL_RTX)
-        {
-	  drop_through_label = gen_label_rtx ();
-	  do_jump (op0, drop_through_label, NULL_RTX, prob);
-	  do_jump (op1, NULL_RTX, if_true_label, prob);
-	}
-      else
-	{
-	  do_jump (op0, if_false_label, NULL_RTX, prob);
-	  do_jump (op1, if_false_label, if_true_label, prob);
-	}
-      break;
+      {
+        /* Spread the probability that the expression is false evenly between
+           the two conditions. So the first condition is false half the total
+           probability of being false. The second condition is false the other
+           half of the total probability of being false, so its jump has a false
+           probability of half the total, relative to the probability we
+           reached it (i.e. the first condition was true).  */
+        int op0_prob = -1;
+        int op1_prob = -1;
+        if (prob != -1)
+          {
+            int false_prob = inv (prob);
+            int op0_false_prob = false_prob / 2;
+            int op1_false_prob = GCOV_COMPUTE_SCALE ((false_prob / 2),
+                                                     inv (op0_false_prob));
+            /* Get the probability that each jump below is true.  */
+            op0_prob = inv (op0_false_prob);
+            op1_prob = inv (op1_false_prob);
+          }
+        if (if_false_label == NULL_RTX)
+          {
+            drop_through_label = gen_label_rtx ();
+            do_jump (op0, drop_through_label, NULL_RTX, op0_prob);
+            do_jump (op1, NULL_RTX, if_true_label, op1_prob);
+          }
+        else
+          {
+            do_jump (op0, if_false_label, NULL_RTX, op0_prob);
+            do_jump (op1, if_false_label, if_true_label, op1_prob);
+          }
+        break;
+      }
 
     case TRUTH_ORIF_EXPR:
-      if (if_true_label == NULL_RTX)
-	{
-          drop_through_label = gen_label_rtx ();
-	  do_jump (op0, NULL_RTX, drop_through_label, prob);
-	  do_jump (op1, if_false_label, NULL_RTX, prob);
-	}
-      else
-	{
-	  do_jump (op0, NULL_RTX, if_true_label, prob);
-	  do_jump (op1, if_false_label, if_true_label, prob);
-	}
-      break;
+      {
+        /* Spread the probability evenly between the two conditions. So
+           the first condition has half the total probability of being true.
+           The second condition has the other half of the total probability,
+           so its jump has a probability of half the total, relative to
+           the probability we reached it (i.e. the first condition was false).  */
+        int op0_prob = -1;
+        int op1_prob = -1;
+        if (prob != -1)
+          {
+            op0_prob = prob / 2;
+            op1_prob = GCOV_COMPUTE_SCALE ((prob / 2), inv (op0_prob));
+          }
+        if (if_true_label == NULL_RTX)
+          {
+            drop_through_label = gen_label_rtx ();
+            do_jump (op0, NULL_RTX, drop_through_label, op0_prob);
+            do_jump (op1, if_false_label, NULL_RTX, op1_prob);
+          }
+        else
+          {
+            do_jump (op0, NULL_RTX, if_true_label, op0_prob);
+            do_jump (op1, if_false_label, if_true_label, op1_prob);
+          }
+        break;
+      }
 
     default:
       gcc_unreachable ();
@@ -1045,6 +1079,11 @@
 
 	  else
 	    {
+	      int first_prob = prob;
+	      if (first_code == UNORDERED)
+		first_prob = REG_BR_PROB_BASE / 100;
+	      else if (first_code == ORDERED)
+		first_prob = REG_BR_PROB_BASE - REG_BR_PROB_BASE / 100;
 	      if (and_them)
 		{
 		  rtx dest_label;
@@ -1058,11 +1097,13 @@
 		  else
 		    dest_label = if_false_label;
                   do_compare_rtx_and_jump (op0, op1, first_code, unsignedp, mode,
-					   size, dest_label, NULL_RTX, prob);
+					   size, dest_label, NULL_RTX,
+					   first_prob);
 		}
               else
                 do_compare_rtx_and_jump (op0, op1, first_code, unsignedp, mode,
-					 size, NULL_RTX, if_true_label, prob);
+					 size, NULL_RTX, if_true_label,
+					 first_prob);
 	    }
 	}
 
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index cc94e71..5c0b183 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -7995,6 +7995,12 @@
 static bool
 include_pubname_in_output (vec<pubname_entry, va_gc> *table, pubname_entry *p)
 {
+  /* By limiting gnu pubnames to definitions only, gold can generate a
+     gdb index without entries for declarations, which don't include
+     enough information to be useful.  */
+  if (debug_generate_pub_sections == 2 && is_declaration_die (p->die))
+    return false;
+
   if (table == pubname_table)
     {
       /* Enumerator names are part of the pubname table, but the
@@ -8912,7 +8918,6 @@
   if (comp_dir != NULL)
     add_skeleton_AT_string (die, DW_AT_comp_dir, comp_dir);
   add_AT_pubnames (die);
-  add_AT_lineptr (die, DW_AT_GNU_addr_base, debug_addr_section_label);
 }
 
 /* Return the single type-unit die for skeleton type units.  */
@@ -9243,7 +9248,8 @@
 	    GDB_INDEX_SYMBOL_STATIC_SET_VALUE(flags, 1);
           break;
         default:
-          gcc_unreachable ();
+          /* An unusual tag.  Leave the flag-byte empty.  */
+          break;
       }
       dw2_asm_output_data (1, flags >> GDB_INDEX_CU_BITSIZE,
                            "GDB-index flags");
@@ -9303,7 +9309,7 @@
 	      if (type_node != NULL)
 	        die_offset = (type_node->skeleton_die != NULL
 			      ? type_node->skeleton_die->die_offset
-			      : 0);
+			      : comp_unit_die ()->die_offset);
 	    }
 
           output_pubname (die_offset, pub);
@@ -23922,6 +23928,8 @@
          skeleton die attrs are added when the skeleton type unit is
          created, so ensure it is created by this point.  */
       add_top_level_skeleton_die_attrs (main_comp_unit_die);
+      add_AT_lineptr (main_comp_unit_die, DW_AT_GNU_addr_base,
+                      debug_addr_section_label);
       (void) get_skeleton_type_unit ();
       htab_traverse_noresize (debug_str_hash, index_string, &index);
     }
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index b5278bf..4c965fb 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -3669,6 +3669,7 @@
 	  break;
 
 	case REG_NON_LOCAL_GOTO:
+	case REG_CROSSING_JUMP:
 	  for (insn = insn_last; insn != NULL_RTX; insn = PREV_INSN (insn))
 	    {
 	      if (JUMP_P (insn))
@@ -3826,62 +3827,135 @@
 
   return insn;
 }
+
+/* Like `make_insn_raw' but make a NOTE instead of an insn.  */
+
+static rtx
+make_note_raw (enum insn_note subtype)
+{
+  /* Some notes are never created this way at all.  These notes are
+     only created by patching out insns.  */
+  gcc_assert (subtype != NOTE_INSN_DELETED_LABEL
+	      && subtype != NOTE_INSN_DELETED_DEBUG_LABEL);
+
+  rtx note = rtx_alloc (NOTE);
+  INSN_UID (note) = cur_insn_uid++;
+  NOTE_KIND (note) = subtype;
+  BLOCK_FOR_INSN (note) = NULL;
+  memset (&NOTE_DATA (note), 0, sizeof (NOTE_DATA (note)));
+  return note;
+}
 
+/* Add INSN to the end of the doubly-linked list, between PREV and NEXT.
+   INSN may be any object that can appear in the chain: INSN_P and NOTE_P objects,
+   but also BARRIERs and JUMP_TABLE_DATAs.  PREV and NEXT may be NULL.  */
+
+static inline void
+link_insn_into_chain (rtx insn, rtx prev, rtx next)
+{
+  PREV_INSN (insn) = prev;
+  NEXT_INSN (insn) = next;
+  if (prev != NULL)
+    {
+      NEXT_INSN (prev) = insn;
+      if (NONJUMP_INSN_P (prev) && GET_CODE (PATTERN (prev)) == SEQUENCE)
+	{
+	  rtx sequence = PATTERN (prev);
+	  NEXT_INSN (XVECEXP (sequence, 0, XVECLEN (sequence, 0) - 1)) = insn;
+	}
+    }
+  if (next != NULL)
+    {
+      PREV_INSN (next) = insn;
+      if (NONJUMP_INSN_P (next) && GET_CODE (PATTERN (next)) == SEQUENCE)
+	PREV_INSN (XVECEXP (PATTERN (next), 0, 0)) = insn;
+    }
+}
+
 /* Add INSN to the end of the doubly-linked list.
    INSN may be an INSN, JUMP_INSN, CALL_INSN, CODE_LABEL, BARRIER or NOTE.  */
 
 void
 add_insn (rtx insn)
 {
-  PREV_INSN (insn) = get_last_insn();
-  NEXT_INSN (insn) = 0;
-
-  if (NULL != get_last_insn())
-    NEXT_INSN (get_last_insn ()) = insn;
-
+  rtx prev = get_last_insn ();
+  link_insn_into_chain (insn, prev, NULL);
   if (NULL == get_insns ())
     set_first_insn (insn);
-
   set_last_insn (insn);
 }
 
-/* Add INSN into the doubly-linked list after insn AFTER.  This and
-   the next should be the only functions called to insert an insn once
-   delay slots have been filled since only they know how to update a
-   SEQUENCE.  */
+/* Add INSN into the doubly-linked list after insn AFTER.  */
 
-void
-add_insn_after (rtx insn, rtx after, basic_block bb)
+static void
+add_insn_after_nobb (rtx insn, rtx after)
 {
   rtx next = NEXT_INSN (after);
 
   gcc_assert (!optimize || !INSN_DELETED_P (after));
 
-  NEXT_INSN (insn) = next;
-  PREV_INSN (insn) = after;
+  link_insn_into_chain (insn, after, next);
 
-  if (next)
+  if (next == NULL)
     {
-      PREV_INSN (next) = insn;
-      if (NONJUMP_INSN_P (next) && GET_CODE (PATTERN (next)) == SEQUENCE)
-	PREV_INSN (XVECEXP (PATTERN (next), 0, 0)) = insn;
+      if (get_last_insn () == after)
+	set_last_insn (insn);
+      else
+	{
+	  struct sequence_stack *stack = seq_stack;
+	  /* Scan all pending sequences too.  */
+	  for (; stack; stack = stack->next)
+	    if (after == stack->last)
+	      {
+		stack->last = insn;
+		break;
+	      }
+	}
     }
-  else if (get_last_insn () == after)
-    set_last_insn (insn);
-  else
+}
+
+/* Add INSN into the doubly-linked list before insn BEFORE.  */
+
+static void
+add_insn_before_nobb (rtx insn, rtx before)
+{
+  rtx prev = PREV_INSN (before);
+
+  gcc_assert (!optimize || !INSN_DELETED_P (before));
+
+  link_insn_into_chain (insn, prev, before);
+
+  if (prev == NULL)
     {
-      struct sequence_stack *stack = seq_stack;
-      /* Scan all pending sequences too.  */
-      for (; stack; stack = stack->next)
-	if (after == stack->last)
-	  {
-	    stack->last = insn;
-	    break;
-	  }
+      if (get_insns () == before)
+	set_first_insn (insn);
+      else
+	{
+	  struct sequence_stack *stack = seq_stack;
+	  /* Scan all pending sequences too.  */
+	  for (; stack; stack = stack->next)
+	    if (before == stack->first)
+	      {
+		stack->first = insn;
+		break;
+	      }
 
-      gcc_assert (stack);
+	  gcc_assert (stack);
+	}
     }
+}
 
+/* Like add_insn_after_nobb, but try to set BLOCK_FOR_INSN.
+   If BB is NULL, an attempt is made to infer the bb from before.
+
+   This and the next function should be the only functions called
+   to insert an insn once delay slots have been filled since only
+   they know how to update a SEQUENCE. */
+
+void
+add_insn_after (rtx insn, rtx after, basic_block bb)
+{
+  add_insn_after_nobb (insn, after);
   if (!BARRIER_P (after)
       && !BARRIER_P (insn)
       && (bb = BLOCK_FOR_INSN (after)))
@@ -3897,55 +3971,19 @@
 	  && !NOTE_INSN_BASIC_BLOCK_P (insn))
 	BB_END (bb) = insn;
     }
-
-  NEXT_INSN (after) = insn;
-  if (NONJUMP_INSN_P (after) && GET_CODE (PATTERN (after)) == SEQUENCE)
-    {
-      rtx sequence = PATTERN (after);
-      NEXT_INSN (XVECEXP (sequence, 0, XVECLEN (sequence, 0) - 1)) = insn;
-    }
 }
 
-/* Add INSN into the doubly-linked list before insn BEFORE.  This and
-   the previous should be the only functions called to insert an insn
-   once delay slots have been filled since only they know how to
-   update a SEQUENCE.  If BB is NULL, an attempt is made to infer the
-   bb from before.  */
+/* Like add_insn_before_nobb, but try to set BLOCK_FOR_INSN.
+   If BB is NULL, an attempt is made to infer the bb from before.
+
+   This and the previous function should be the only functions called
+   to insert an insn once delay slots have been filled since only
+   they know how to update a SEQUENCE. */
 
 void
 add_insn_before (rtx insn, rtx before, basic_block bb)
 {
-  rtx prev = PREV_INSN (before);
-
-  gcc_assert (!optimize || !INSN_DELETED_P (before));
-
-  PREV_INSN (insn) = prev;
-  NEXT_INSN (insn) = before;
-
-  if (prev)
-    {
-      NEXT_INSN (prev) = insn;
-      if (NONJUMP_INSN_P (prev) && GET_CODE (PATTERN (prev)) == SEQUENCE)
-	{
-	  rtx sequence = PATTERN (prev);
-	  NEXT_INSN (XVECEXP (sequence, 0, XVECLEN (sequence, 0) - 1)) = insn;
-	}
-    }
-  else if (get_insns () == before)
-    set_first_insn (insn);
-  else
-    {
-      struct sequence_stack *stack = seq_stack;
-      /* Scan all pending sequences too.  */
-      for (; stack; stack = stack->next)
-	if (before == stack->first)
-	  {
-	    stack->first = insn;
-	    break;
-	  }
-
-      gcc_assert (stack);
-    }
+  add_insn_before_nobb (insn, before);
 
   if (!bb
       && !BARRIER_P (before)
@@ -3964,13 +4002,8 @@
 		  || BARRIER_P (insn)
 		  || NOTE_INSN_BASIC_BLOCK_P (insn));
     }
-
-  PREV_INSN (before) = insn;
-  if (NONJUMP_INSN_P (before) && GET_CODE (PATTERN (before)) == SEQUENCE)
-    PREV_INSN (XVECEXP (PATTERN (before), 0, 0)) = insn;
 }
 
-
 /* Replace insn with an deleted instruction note.  */
 
 void
@@ -4303,21 +4336,6 @@
   add_insn_before (label, before, NULL);
   return label;
 }
-
-/* Emit a note of subtype SUBTYPE before the insn BEFORE.  */
-
-rtx
-emit_note_before (enum insn_note subtype, rtx before)
-{
-  rtx note = rtx_alloc (NOTE);
-  INSN_UID (note) = cur_insn_uid++;
-  NOTE_KIND (note) = subtype;
-  BLOCK_FOR_INSN (note) = NULL;
-  memset (&NOTE_DATA (note), 0, sizeof (NOTE_DATA (note)));
-
-  add_insn_before (note, before, NULL);
-  return note;
-}
 
 /* Helper for emit_insn_after, handles lists of instructions
    efficiently.  */
@@ -4464,18 +4482,68 @@
   add_insn_after (label, after, NULL);
   return label;
 }
+
+/* Notes require a bit of special handling: Some notes need to have their
+   BLOCK_FOR_INSN set, others should never have it set, and some should
+   have it set or clear depending on the context.   */
+
+/* Return true iff a note of kind SUBTYPE should be emitted with routines
+   that never set BLOCK_FOR_INSN on NOTE.  BB_BOUNDARY is true if the
+   caller is asked to emit a note before BB_HEAD, or after BB_END.  */
+
+static bool
+note_outside_basic_block_p (enum insn_note subtype, bool on_bb_boundary_p)
+{
+  switch (subtype)
+    {
+      /* NOTE_INSN_SWITCH_TEXT_SECTIONS only appears between basic blocks.  */
+      case NOTE_INSN_SWITCH_TEXT_SECTIONS:
+	return true;
+
+      /* Notes for var tracking and EH region markers can appear between or
+	 inside basic blocks.  If the caller is emitting on the basic block
+	 boundary, do not set BLOCK_FOR_INSN on the new note.  */
+      case NOTE_INSN_VAR_LOCATION:
+      case NOTE_INSN_CALL_ARG_LOCATION:
+      case NOTE_INSN_EH_REGION_BEG:
+      case NOTE_INSN_EH_REGION_END:
+	return on_bb_boundary_p;
+
+      /* Otherwise, BLOCK_FOR_INSN must be set.  */
+      default:
+	return false;
+    }
+}
 
 /* Emit a note of subtype SUBTYPE after the insn AFTER.  */
 
 rtx
 emit_note_after (enum insn_note subtype, rtx after)
 {
-  rtx note = rtx_alloc (NOTE);
-  INSN_UID (note) = cur_insn_uid++;
-  NOTE_KIND (note) = subtype;
-  BLOCK_FOR_INSN (note) = NULL;
-  memset (&NOTE_DATA (note), 0, sizeof (NOTE_DATA (note)));
-  add_insn_after (note, after, NULL);
+  rtx note = make_note_raw (subtype);
+  basic_block bb = BARRIER_P (after) ? NULL : BLOCK_FOR_INSN (after);
+  bool on_bb_boundary_p = (bb != NULL && BB_END (bb) == after);
+
+  if (note_outside_basic_block_p (subtype, on_bb_boundary_p))
+    add_insn_after_nobb (note, after);
+  else
+    add_insn_after (note, after, bb);
+  return note;
+}
+
+/* Emit a note of subtype SUBTYPE before the insn BEFORE.  */
+
+rtx
+emit_note_before (enum insn_note subtype, rtx before)
+{
+  rtx note = make_note_raw (subtype);
+  basic_block bb = BARRIER_P (before) ? NULL : BLOCK_FOR_INSN (before);
+  bool on_bb_boundary_p = (bb != NULL && BB_HEAD (bb) == before);
+
+  if (note_outside_basic_block_p (subtype, on_bb_boundary_p))
+    add_insn_before_nobb (note, before);
+  else
+    add_insn_before (note, before, bb);
   return note;
 }
 
@@ -4900,16 +4968,10 @@
 rtx
 emit_note_copy (rtx orig)
 {
-  rtx note;
-
-  note = rtx_alloc (NOTE);
-
-  INSN_UID (note) = cur_insn_uid++;
+  enum insn_note kind = (enum insn_note) NOTE_KIND (orig);
+  rtx note = make_note_raw (kind);
   NOTE_DATA (note) = NOTE_DATA (orig);
-  NOTE_KIND (note) = NOTE_KIND (orig);
-  BLOCK_FOR_INSN (note) = NULL;
   add_insn (note);
-
   return note;
 }
 
@@ -4919,13 +4981,7 @@
 rtx
 emit_note (enum insn_note kind)
 {
-  rtx note;
-
-  note = rtx_alloc (NOTE);
-  INSN_UID (note) = cur_insn_uid++;
-  NOTE_KIND (note) = kind;
-  memset (&NOTE_DATA (note), 0, sizeof (NOTE_DATA (note)));
-  BLOCK_FOR_INSN (note) = NULL;
+  rtx note = make_note_raw (kind);
   add_insn (note);
   return note;
 }
diff --git a/gcc/explow.c b/gcc/explow.c
index 08a6653..7da8bc7 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -106,10 +106,10 @@
 	  if (overflow)
 	    gcc_unreachable ();
 
-	  return immed_double_int_const (v, VOIDmode);
+	  return immed_double_int_const (v, mode);
 	}
 
-      return GEN_INT (INTVAL (x) + c);
+      return gen_int_mode (INTVAL (x) + c, mode);
 
     case CONST_DOUBLE:
       {
@@ -124,7 +124,7 @@
 	     To fix, add constant support wider than CONST_DOUBLE.  */
 	  gcc_assert (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_DOUBLE_INT);
 
-	return immed_double_int_const (v, VOIDmode);
+	return immed_double_int_const (v, mode);
       }
 
     case MEM:
diff --git a/gcc/expr.c b/gcc/expr.c
index 7e909bc..8a23130 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -7537,7 +7537,25 @@
 	  tem = fold_build_pointer_plus (tem, TREE_OPERAND (exp, 1));
 	return expand_expr (tem, target, tmode, modifier);
       }
+    case TARGET_MEM_REF:
+      {
+	/* For TARGET_MEM_REF node, it expects to keep the memory access mode
+	   instead of linearizing the addr expr during expand, so
+	   cse_not_expected will be set to 1 temporarily before expanding addr
+	   expr, and then set back after it.  */
+	struct mem_address addr;
+	int old_cse_not_expected;
+	addr_space_t as
+	  = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 0))));
 
+	get_address_description (exp, &addr);
+	result = addr_for_mem_ref (&addr, as, true);
+	old_cse_not_expected = cse_not_expected;
+	cse_not_expected = 1;
+	result = memory_address_addr_space (tmode, result, as);
+	cse_not_expected = old_cse_not_expected;
+	return result;
+      }
     case CONST_DECL:
       /* Expand the initializer like constants above.  */
       result = XEXP (expand_expr_constant (DECL_INITIAL (exp),
@@ -9579,10 +9597,18 @@
 	struct mem_address addr;
 	enum insn_code icode;
 	unsigned int align;
+	int old_cse_not_expected;
 
 	get_address_description (exp, &addr);
 	op0 = addr_for_mem_ref (&addr, as, true);
+	/* For TARGET_MEM_REF node, it expects to keep the memory access mode
+	   instead of linearizing the addr expr during expand, so
+	   cse_not_expected will be set to 1 temporarily before expanding addr
+	   expr, and then set back after it.  */
+	old_cse_not_expected = cse_not_expected;
+	cse_not_expected = 1;
 	op0 = memory_address_addr_space (mode, op0, as);
+	cse_not_expected = old_cse_not_expected;
 	temp = gen_rtx_MEM (mode, op0);
 	set_mem_attributes (temp, exp, 0);
 	set_mem_addr_space (temp, as);
diff --git a/gcc/final.c b/gcc/final.c
index 0bdd3ac..77d68a8 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -1615,12 +1615,26 @@
   rtx insn, note;
 
   insn = get_insns ();
-  if (!active_insn_p (insn))
-    insn = next_active_insn (insn);
-  for (; insn; insn = next_active_insn (insn))
+  for (; insn; insn = NEXT_INSN (insn))
     {
       tree this_block;
 
+      /* Prevent lexical blocks from straddling section boundaries.  */
+      if (NOTE_P (insn) && NOTE_KIND (insn) == NOTE_INSN_SWITCH_TEXT_SECTIONS)
+        {
+          for (tree s = cur_block; s != DECL_INITIAL (cfun->decl);
+               s = BLOCK_SUPERCONTEXT (s))
+            {
+              rtx note = emit_note_before (NOTE_INSN_BLOCK_END, insn);
+              NOTE_BLOCK (note) = s;
+              note = emit_note_after (NOTE_INSN_BLOCK_BEG, insn);
+              NOTE_BLOCK (note) = s;
+            }
+        }
+
+      if (!active_insn_p (insn))
+        continue;
+
       /* Avoid putting scope notes between jump table and its label.  */
       if (JUMP_TABLE_DATA_P (insn))
 	continue;
@@ -2116,6 +2130,15 @@
 	  targetm.asm_out.function_switched_text_sections (asm_out_file,
 							   current_function_decl,
 							   in_cold_section_p);
+	  /* Emit a label for the split cold section.  Form label name by
+	     suffixing "cold" to the original function's name.  */
+	  if (in_cold_section_p)
+	    {
+	      tree cold_function_name
+		= clone_function_name (current_function_decl, "cold");
+	      ASM_OUTPUT_LABEL (asm_out_file,
+				IDENTIFIER_POINTER (cold_function_name));
+	    }
 	  has_cold_section_p = true;
 	  break;
 
@@ -4457,7 +4480,7 @@
   /* With -fcallgraph-profiles-sections and -freorder-functions=,
      add ".gnu.callgraph.text" section for storing profiling information. */
   if ((flag_reorder_functions > 1)
-      && flag_profile_use
+      && (flag_profile_use || flag_auto_profile)
       && cgraph_get_node (current_function_decl) != NULL
       && ((cgraph_get_node (current_function_decl))->callees != NULL
 	  || (cgraph_get_node (current_function_decl))->count > 0))
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index bbae249..19e0ad4 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -469,11 +469,24 @@
 	 and actually traps on some architectures.  But if overflow is
 	 undefined, we can negate, because - (INT_MIN / 1) is an
 	 overflow.  */
-      if (INTEGRAL_TYPE_P (TREE_TYPE (t))
-	  && !TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (t)))
-        break;
-      return negate_expr_p (TREE_OPERAND (t, 1))
-             || negate_expr_p (TREE_OPERAND (t, 0));
+      if (INTEGRAL_TYPE_P (TREE_TYPE (t)))
+	{
+	  if (!TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (t)))
+	    break;
+	  /* If overflow is undefined then we have to be careful because
+	     we ask whether it's ok to associate the negate with the
+	     division which is not ok for example for
+	     -((a - b) / c) where (-(a - b)) / c may invoke undefined
+	     overflow because of negating INT_MIN.  So do not use
+	     negate_expr_p here but open-code the two important cases.  */
+	  if (TREE_CODE (TREE_OPERAND (t, 0)) == NEGATE_EXPR
+	      || (TREE_CODE (TREE_OPERAND (t, 0)) == INTEGER_CST
+		  && may_negate_without_overflow_p (TREE_OPERAND (t, 0))))
+	    return true;
+	}
+      else if (negate_expr_p (TREE_OPERAND (t, 0)))
+	return true;
+      return negate_expr_p (TREE_OPERAND (t, 1));
 
     case NOP_EXPR:
       /* Negate -((double)float) as (double)(-float).  */
@@ -653,16 +666,20 @@
 	      return fold_build2_loc (loc, TREE_CODE (t), type,
 				  TREE_OPERAND (t, 0), negate_expr (tem));
 	    }
+	  /* If overflow is undefined then we have to be careful because
+	     we ask whether it's ok to associate the negate with the
+	     division which is not ok for example for
+	     -((a - b) / c) where (-(a - b)) / c may invoke undefined
+	     overflow because of negating INT_MIN.  So do not use
+	     negate_expr_p here but open-code the two important cases.  */
           tem = TREE_OPERAND (t, 0);
-          if (negate_expr_p (tem))
-	    {
-	      if (INTEGRAL_TYPE_P (type)
-		  && (TREE_CODE (tem) != INTEGER_CST
-		      || tree_int_cst_equal (tem, TYPE_MIN_VALUE (type))))
-		fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_MISC);
-	      return fold_build2_loc (loc, TREE_CODE (t), type,
-				  negate_expr (tem), TREE_OPERAND (t, 1));
-	    }
+	  if ((INTEGRAL_TYPE_P (type)
+	       && (TREE_CODE (tem) == NEGATE_EXPR
+		   || (TREE_CODE (tem) == INTEGER_CST
+		       && may_negate_without_overflow_p (tem))))
+	      || !INTEGRAL_TYPE_P (type))
+	    return fold_build2_loc (loc, TREE_CODE (t), type,
+				    negate_expr (tem), TREE_OPERAND (t, 1));
         }
       break;
 
@@ -4254,7 +4271,7 @@
     }
 
   if (low == 0 && high == 0)
-    return build_int_cst (type, 1);
+    return omit_one_operand_loc (loc, type, build_int_cst (type, 1), exp);
 
   if (low == 0)
     return fold_build2_loc (loc, LE_EXPR, type, exp,
@@ -9928,6 +9945,24 @@
     }
 }
 
+/*  Mask out the tz least significant bits of X of type TYPE where
+    tz is the number of trailing zeroes in Y.  */
+static double_int
+mask_with_tz (tree type, double_int x, double_int y)
+{
+  int tz = y.trailing_zeros ();
+
+  if (tz > 0)
+    {
+      double_int mask;
+
+      mask = ~double_int::mask (tz);
+      mask = mask.ext (TYPE_PRECISION (type), TYPE_UNSIGNED (type));
+      return mask & x;
+    }
+  return x;
+}
+
 /* Fold a binary expression of code CODE and type TYPE with operands
    OP0 and OP1.  LOC is the location of the resulting expression.
    Return the folded expression if folding is successful.  Otherwise,
@@ -11252,6 +11287,8 @@
 	{
 	  double_int c1, c2, c3, msk;
 	  int width = TYPE_PRECISION (type), w;
+	  bool try_simplify = true;
+
 	  c1 = tree_to_double_int (TREE_OPERAND (arg0, 1));
 	  c2 = tree_to_double_int (arg1);
 
@@ -11286,7 +11323,21 @@
 		  break;
 		}
 	    }
-	  if (c3 != c1)
+
+	  /* If X is a tree of the form (Y * K1) & K2, this might conflict
+	     with that optimization from the BIT_AND_EXPR optimizations.
+	     This could end up in an infinite recursion.  */
+	  if (TREE_CODE (TREE_OPERAND (arg0, 0)) == MULT_EXPR
+	      && TREE_CODE (TREE_OPERAND (TREE_OPERAND (arg0, 0), 1))
+	                    == INTEGER_CST)
+	  {
+	    tree t = TREE_OPERAND (TREE_OPERAND (arg0, 0), 1);
+	    double_int masked = mask_with_tz (type, c3, tree_to_double_int (t));
+
+	    try_simplify = (masked != c1);
+	  }
+
+	  if (try_simplify && c3 != c1)
 	    return fold_build2_loc (loc, BIT_IOR_EXPR, type,
 				    fold_build2_loc (loc, BIT_AND_EXPR, type,
 						     TREE_OPERAND (arg0, 0),
@@ -11676,22 +11727,16 @@
 	  && TREE_CODE (arg0) == MULT_EXPR
 	  && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
 	{
-	  int arg1tz
-	    = tree_to_double_int (TREE_OPERAND (arg0, 1)).trailing_zeros ();
-	  if (arg1tz > 0)
-	    {
-	      double_int arg1mask, masked;
-	      arg1mask = ~double_int::mask (arg1tz);
-	      arg1mask = arg1mask.ext (TYPE_PRECISION (type),
-					 TYPE_UNSIGNED (type));
-	      masked = arg1mask & tree_to_double_int (arg1);
-	      if (masked.is_zero ())
-		return omit_two_operands_loc (loc, type, build_zero_cst (type),
-					      arg0, arg1);
-	      else if (masked != tree_to_double_int (arg1))
-		return fold_build2_loc (loc, code, type, op0,
-					double_int_to_tree (type, masked));
-	    }
+	  double_int masked
+	    = mask_with_tz (type, tree_to_double_int (arg1),
+	                    tree_to_double_int (TREE_OPERAND (arg0, 1)));
+
+	  if (masked.is_zero ())
+	    return omit_two_operands_loc (loc, type, build_zero_cst (type),
+	                                  arg0, arg1);
+	  else if (masked != tree_to_double_int (arg1))
+	    return fold_build2_loc (loc, code, type, op0,
+	                            double_int_to_tree (type, masked));
 	}
 
       /* For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,
@@ -14133,14 +14178,29 @@
 	  && integer_zerop (op2)
 	  && (tem = sign_bit_p (TREE_OPERAND (arg0, 0), arg1)))
 	{
+	  /* sign_bit_p looks through both zero and sign extensions,
+	     but for this optimization only sign extensions are
+	     usable.  */
+	  tree tem2 = TREE_OPERAND (arg0, 0);
+	  while (tem != tem2)
+	    {
+	      if (TREE_CODE (tem2) != NOP_EXPR
+		  || TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (tem2, 0))))
+		{
+		  tem = NULL_TREE;
+		  break;
+		}
+	      tem2 = TREE_OPERAND (tem2, 0);
+	    }
 	  /* sign_bit_p only checks ARG1 bits within A's precision.
 	     If <sign bit of A> has wider type than A, bits outside
 	     of A's precision in <sign bit of A> need to be checked.
 	     If they are all 0, this optimization needs to be done
 	     in unsigned A's type, if they are all 1 in signed A's type,
 	     otherwise this can't be done.  */
-	  if (TYPE_PRECISION (TREE_TYPE (tem))
-	      < TYPE_PRECISION (TREE_TYPE (arg1))
+	  if (tem
+	      && TYPE_PRECISION (TREE_TYPE (tem))
+		 < TYPE_PRECISION (TREE_TYPE (arg1))
 	      && TYPE_PRECISION (TREE_TYPE (tem))
 		 < TYPE_PRECISION (type))
 	    {
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index d3a136f..dd66a83 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,26 @@
+2013-11-02  Janus Weil  <janus@gcc.gnu.org>
+
+	Backport from mainline
+	2013-09-23  Janus Weil  <janus@gcc.gnu.org>
+
+	PR fortran/58355
+	* decl.c (check_extended_derived_type): Prevent segfault, modify error
+	message.
+
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
+2013-10-04  Tobias Burnus  <burnus@net-b.de>
+
+	Backport from mainline
+	2013-09-25  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/57697
+	PR fortran/58469
+	* resolve.c (generate_component_assignments): Avoid double free
+	at runtime and freeing a still-being used expr.
+
 2013-08-24  Mikael Morin  <mikael@gcc.gnu.org>
 
 	PR fortran/57798
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 72c511c..b748cfd 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -7384,6 +7384,7 @@
 
 
 /* Check a derived type that is being extended.  */
+
 static gfc_symbol*
 check_extended_derived_type (char *name)
 {
@@ -7395,14 +7396,15 @@
       return NULL;
     }
 
+  extended = gfc_find_dt_in_generic (extended);
+
+  /* F08:C428.  */
   if (!extended)
     {
-      gfc_error ("No such symbol in TYPE definition at %C");
+      gfc_error ("Symbol '%s' at %C has not been previously defined", name);
       return NULL;
     }
 
-  extended = gfc_find_dt_in_generic (extended);
-
   if (extended->attr.flavor != FL_DERIVED)
     {
       gfc_error ("'%s' in EXTENDS expression at %C is not a "
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index a5966b1..486a22c 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -9997,6 +9997,26 @@
 		  temp_code = build_assignment (EXEC_ASSIGN,
 						t1, (*code)->expr1,
 				NULL, NULL, (*code)->loc);
+
+		  /* For allocatable LHS, check whether it is allocated.  Note
+		     that allocatable components with defined assignment are
+		     not yet support.  See PR 57696.  */
+		  if ((*code)->expr1->symtree->n.sym->attr.allocatable)
+		    {
+		      gfc_code *block;
+		      gfc_expr *e =
+			gfc_lval_expr_from_sym ((*code)->expr1->symtree->n.sym);
+		      block = gfc_get_code ();
+		      block->op = EXEC_IF;
+		      block->block = gfc_get_code ();
+		      block->block->op = EXEC_IF;
+		      block->block->expr1
+			  = gfc_build_intrinsic_call (ns,
+				    GFC_ISYM_ALLOCATED, "allocated",
+				    (*code)->loc, 1, e);
+		      block->block->next = temp_code;
+		      temp_code = block;
+		    }
 		  add_code_to_chain (&temp_code, &tmp_head, &tmp_tail);
 		}
 
@@ -10005,8 +10025,37 @@
 	      gfc_free_expr (this_code->ext.actual->expr);
 	      this_code->ext.actual->expr = gfc_copy_expr (t1);
 	      add_comp_ref (this_code->ext.actual->expr, comp1);
+
+	      /* If the LHS variable is allocatable and wasn't allocated and
+                 the temporary is allocatable, pointer assign the address of
+                 the freshly allocated LHS to the temporary.  */
+	      if ((*code)->expr1->symtree->n.sym->attr.allocatable
+		  && gfc_expr_attr ((*code)->expr1).allocatable)
+		{
+		  gfc_code *block;
+		  gfc_expr *cond;
+
+		  cond = gfc_get_expr ();
+		  cond->ts.type = BT_LOGICAL;
+		  cond->ts.kind = gfc_default_logical_kind;
+		  cond->expr_type = EXPR_OP;
+		  cond->where = (*code)->loc;
+		  cond->value.op.op = INTRINSIC_NOT;
+		  cond->value.op.op1 = gfc_build_intrinsic_call (ns,
+					  GFC_ISYM_ALLOCATED, "allocated",
+					  (*code)->loc, 1, gfc_copy_expr (t1));
+		  block = gfc_get_code ();
+		  block->op = EXEC_IF;
+		  block->block = gfc_get_code ();
+		  block->block->op = EXEC_IF;
+		  block->block->expr1 = cond;
+		  block->block->next = build_assignment (EXEC_POINTER_ASSIGN,
+					t1, (*code)->expr1,
+					NULL, NULL, (*code)->loc);
+		  add_code_to_chain (&block, &head, &tail);
+		}
 	    }
-	  }
+	}
       else if (this_code->op == EXEC_ASSIGN && !this_code->next)
 	{
 	  /* Don't add intrinsic assignments since they are already
@@ -10028,13 +10077,6 @@
 	}
     }
 
-  /* This is probably not necessary.  */
-  if (this_code)
-    {
-      gfc_free_statements (this_code);
-      this_code = NULL;
-    }
-
   /* Put the temporary assignments at the top of the generated code.  */
   if (tmp_head && component_assignment_level == 1)
     {
@@ -10043,6 +10085,30 @@
       tmp_head = tmp_tail = NULL;
     }
 
+  // If we did a pointer assignment - thus, we need to ensure that the LHS is
+  // not accidentally deallocated. Hence, nullify t1.
+  if (t1 && (*code)->expr1->symtree->n.sym->attr.allocatable
+      && gfc_expr_attr ((*code)->expr1).allocatable)
+    {
+      gfc_code *block;
+      gfc_expr *cond;
+      gfc_expr *e;
+
+      e = gfc_lval_expr_from_sym ((*code)->expr1->symtree->n.sym);
+      cond = gfc_build_intrinsic_call (ns, GFC_ISYM_ASSOCIATED, "associated",
+				       (*code)->loc, 2, gfc_copy_expr (t1), e);
+      block = gfc_get_code ();
+      block->op = EXEC_IF;
+      block->block = gfc_get_code ();
+      block->block->op = EXEC_IF;
+      block->block->expr1 = cond;
+      block->block->next = build_assignment (EXEC_POINTER_ASSIGN,
+					t1, gfc_get_null_expr (&(*code)->loc),
+					NULL, NULL, (*code)->loc);
+      gfc_append_code (tail, block);
+      tail = block;
+    }
+
   /* Now attach the remaining code chain to the input code.  Step on
      to the end of the new code since resolution is complete.  */
   gcc_assert ((*code)->op == EXEC_ASSIGN);
@@ -10052,7 +10118,8 @@
   gfc_free_expr ((*code)->expr1);
   gfc_free_expr ((*code)->expr2);
   **code = *head;
-  free (head);
+  if (head != tail)
+    free (head);
   *code = tail;
 
   component_assignment_level--;
diff --git a/gcc/function.c b/gcc/function.c
index fdfb25a..ab89c4e 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6285,8 +6285,10 @@
 		    break;
 		if (e)
 		  {
-		    copy_bb = create_basic_block (NEXT_INSN (BB_END (e->src)),
-						  NULL_RTX, e->src);
+                    /* Make sure we insert after any barriers.  */
+                    rtx end = get_last_bb_insn (e->src);
+                    copy_bb = create_basic_block (NEXT_INSN (end),
+                                                  NULL_RTX, e->src);
 		    BB_COPY_PARTITION (copy_bb, e->src);
 		  }
 		else
@@ -6553,7 +6555,7 @@
       basic_block simple_return_block_cold = NULL;
       edge pending_edge_hot = NULL;
       edge pending_edge_cold = NULL;
-      basic_block exit_pred = EXIT_BLOCK_PTR->prev_bb;
+      basic_block exit_pred;
       int i;
 
       gcc_assert (entry_edge != orig_entry_edge);
@@ -6581,6 +6583,12 @@
 	    else
 	      pending_edge_cold = e;
 	  }
+      
+      /* Save a pointer to the exit's predecessor BB for use in
+         inserting new BBs at the end of the function. Do this
+         after the call to split_block above which may split
+         the original exit pred.  */
+      exit_pred = EXIT_BLOCK_PTR->prev_bb;
 
       FOR_EACH_VEC_ELT (unconverted_simple_returns, i, e)
 	{
diff --git a/gcc/function.h b/gcc/function.h
index 46fe95b..138798e 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -446,6 +446,15 @@
      sched2) and is useful only if the port defines LEAF_REGISTERS.  */
   bool uses_only_leaf_regs;
 
+  /* Nonzero if the function being compiled has undergone hot/cold partitioning
+     (under flag_reorder_blocks_and_partition) and has at least one cold
+     block.  */
+  bool has_bb_partition;
+
+  /* Nonzero if the function being compiled has completed the bb reordering
+     pass.  */
+  bool bb_reorder_complete;
+
   /* Like regs_ever_live, but 1 if a reg is set or clobbered from an
      asm.  Unlike regs_ever_live, elements of this array corresponding
      to eliminable regs (like the frame pointer) are set if an asm
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 12a3a23..c63526f 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -864,16 +864,12 @@
  %{fmudflap|fmudflapth:-fno-builtin -fno-merge-constants}\
  %{coverage:-fprofile-arcs -ftest-coverage -fno-early-inlining}";
 
-/* If an assembler wrapper is used to invoke post-assembly tools
-   like MAO, --save-temps need to be passed to save the output of
-   such post-processing tools. This is not compatible with vanilla
-   binutils gas which does not recognize --save-temps.  */
 static const char *asm_options =
 "%{-target-help:%:print-asm-header()} "
 #if HAVE_GNU_AS
 /* If GNU AS is used, then convert -w (no warnings), -I, and -v
    to the assembler equivalents.  */
-"%{v} %{w:-W} %{I*} %{save-temps*:--save-temps} "
+"%{v} %{w:-W} %{I*} "
 #endif
 "%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}";
 
diff --git a/gcc/gcov-io.c b/gcc/gcov-io.c
index c316e20..2a0fe78 100644
--- a/gcc/gcov-io.c
+++ b/gcc/gcov-io.c
@@ -36,6 +36,58 @@
 static void gcov_allocate (unsigned);
 #endif
 
+/* Optimum number of gcov_unsigned_t's read from or written to disk.  */
+#define GCOV_BLOCK_SIZE (1 << 10)
+
+GCOV_LINKAGE struct gcov_var
+{
+  FILE *file;
+  gcov_position_t start;        /* Position of first byte of block */
+  unsigned offset;              /* Read/write position within the block.  */
+  unsigned length;              /* Read limit in the block.  */
+  unsigned overread;            /* Number of words overread.  */
+  int error;                    /* < 0 overflow, > 0 disk error.  */
+  int mode;                     /* < 0 writing, > 0 reading */
+#if IN_LIBGCOV
+  /* Holds one block plus 4 bytes, thus all coverage reads & writes
+     fit within this buffer and we always can transfer GCOV_BLOCK_SIZE
+     to and from the disk. libgcov never backtracks and only writes 4
+     or 8 byte objects.  */
+  gcov_unsigned_t buffer[GCOV_BLOCK_SIZE + 1];
+#else
+  int endian;                   /* Swap endianness.  */
+  /* Holds a variable length block, as the compiler can write
+     strings and needs to backtrack.  */
+  size_t alloc;
+  gcov_unsigned_t *buffer;
+#endif
+} gcov_var;
+
+/* Save the current position in the gcov file.  */
+static inline gcov_position_t
+gcov_position (void)
+{
+  return gcov_var.start + gcov_var.offset;
+}
+
+/* Return nonzero if the error flag is set.  */
+static inline int
+gcov_is_error (void)
+{
+  return gcov_var.file ? gcov_var.error : 1;
+}
+
+/* Move to beginning of file and initialize for writing.  */
+static inline void
+gcov_rewrite (void)
+{
+  gcc_assert (gcov_var.mode > 0);
+  gcov_var.mode = -1;
+  gcov_var.start = 0;
+  gcov_var.offset = 0;
+  fseek (gcov_var.file, 0L, SEEK_SET);
+}
+
 static inline gcov_unsigned_t from_file (gcov_unsigned_t value)
 {
 #if !IN_LIBGCOV
@@ -503,7 +555,7 @@
    buffer, or NULL on empty string. You must copy the string before
    calling another gcov function.  */
 
-#if !IN_LIBGCOV
+#if !IN_LIBGCOV || IN_GCOV_TOOL
 GCOV_LINKAGE const char *
 gcov_read_string (void)
 {
@@ -580,7 +632,7 @@
     }
 }
 
-#if !IN_LIBGCOV && IN_GCOV != 1
+#if IN_GCOV_TOOL || !IN_LIBGCOV && IN_GCOV != 1
 /* Read LEN words (unsigned type) and construct MOD_INFO.  */
 
 GCOV_LINKAGE void
@@ -591,14 +643,15 @@
   mod_info->ident = gcov_read_unsigned ();
   mod_info->is_primary = gcov_read_unsigned ();
   mod_info->flags = gcov_read_unsigned ();
-  mod_info->lang  = gcov_read_unsigned ();
+  mod_info->lang = gcov_read_unsigned ();
+  mod_info->ggc_memory = gcov_read_unsigned ();
   mod_info->num_quote_paths = gcov_read_unsigned ();
   mod_info->num_bracket_paths = gcov_read_unsigned ();
   mod_info->num_system_paths = gcov_read_unsigned ();
   mod_info->num_cpp_defines = gcov_read_unsigned ();
   mod_info->num_cpp_includes = gcov_read_unsigned ();
   mod_info->num_cl_args = gcov_read_unsigned ();
-  len -= 10;
+  len -= 11;
 
   filename_len = gcov_read_unsigned ();
   mod_info->da_filename = (char *) xmalloc (filename_len *
@@ -632,7 +685,7 @@
 }
 #endif
 
-#if !IN_LIBGCOV
+#if !IN_LIBGCOV || IN_GCOV_TOOL
 /* Reset to a known position.  BASE should have been obtained from
    gcov_position, LENGTH should be a record length.  */
 
diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h
index a29a551..f94fd2f 100644
--- a/gcc/gcov-io.h
+++ b/gcc/gcov-io.h
@@ -164,84 +164,7 @@
 #ifndef GCC_GCOV_IO_H
 #define GCC_GCOV_IO_H
 
-#if IN_LIBGCOV
-
-#undef FUNC_ID_WIDTH
-#undef FUNC_ID_MASK
-/* About the target */
-
-#if BITS_PER_UNIT == 8
-typedef unsigned gcov_unsigned_t __attribute__ ((mode (SI)));
-typedef unsigned gcov_position_t __attribute__ ((mode (SI)));
-#if LONG_LONG_TYPE_SIZE > 32
-typedef signed gcov_type __attribute__ ((mode (DI)));
-#define FUNC_ID_WIDTH 32
-#define FUNC_ID_MASK ((1ll << FUNC_ID_WIDTH) - 1)
-typedef unsigned gcov_type_unsigned __attribute__ ((mode (DI)));
-#else
-typedef signed gcov_type __attribute__ ((mode (SI)));
-#define FUNC_ID_WIDTH 16
-#define FUNC_ID_MASK ((1 << FUNC_ID_WIDTH) - 1)
-typedef unsigned gcov_type_unsigned __attribute__ ((mode (SI)));
-#endif
-#else   /* BITS_PER_UNIT != 8  */
-#if BITS_PER_UNIT == 16
-typedef unsigned gcov_unsigned_t __attribute__ ((mode (HI)));
-typedef unsigned gcov_position_t __attribute__ ((mode (HI)));
-#if LONG_LONG_TYPE_SIZE > 32
-typedef signed gcov_type __attribute__ ((mode (SI)));
-#define FUNC_ID_WIDTH 32
-#define FUNC_ID_MASK ((1ll << FUNC_ID_WIDTH) - 1)
-typedef unsigned gcov_type_unsigned __attribute__ ((mode (SI)));
-#else
-typedef signed gcov_type __attribute__ ((mode (HI)));
-#define FUNC_ID_WIDTH 16
-#define FUNC_ID_MASK ((1 << FUNC_ID_WIDTH) - 1)
-typedef unsigned gcov_type_unsigned __attribute__ ((mode (HI)));
-#endif
-#else  /* BITS_PER_UNIT != 16  */
-typedef unsigned gcov_unsigned_t __attribute__ ((mode (QI)));
-typedef unsigned gcov_position_t __attribute__ ((mode (QI)));
-#if LONG_LONG_TYPE_SIZE > 32
-typedef signed gcov_type __attribute__ ((mode (HI)));
-#define FUNC_ID_WIDTH 32
-#define FUNC_ID_MASK ((1ll << FUNC_ID_WIDTH) - 1)
-typedef unsigned gcov_type_unsigned __attribute__ ((mode (HI)));
-#else
-typedef signed gcov_type __attribute__ ((mode (QI)));
-#define FUNC_ID_WIDTH 16
-#define FUNC_ID_MASK ((1 << FUNC_ID_WIDTH) - 1)
-typedef unsigned gcov_type_unsigned __attribute__ ((mode (QI)));
-#endif
-#endif /* BITS_PER_UNIT == 16  */ 
-
-#endif  /* BITS_PER_UNIT == 8  */
-
-#if LONG_LONG_TYPE_SIZE > 32
-#define GCOV_TYPE_ATOMIC_FETCH_ADD_FN __atomic_fetch_add_8
-#define GCOV_TYPE_ATOMIC_FETCH_ADD BUILT_IN_ATOMIC_FETCH_ADD_8
-#else
-#define GCOV_TYPE_ATOMIC_FETCH_ADD_FN __atomic_fetch_add_4
-#define GCOV_TYPE_ATOMIC_FETCH_ADD BUILT_IN_ATOMIC_FETCH_ADD_4
-#endif
-
-#undef EXTRACT_MODULE_ID_FROM_GLOBAL_ID
-#undef EXTRACT_FUNC_ID_FROM_GLOBAL_ID
-#undef GEN_FUNC_GLOBAL_ID
-#define EXTRACT_MODULE_ID_FROM_GLOBAL_ID(gid) \
-                (gcov_unsigned_t)(((gid) >> FUNC_ID_WIDTH) & FUNC_ID_MASK)
-#define EXTRACT_FUNC_ID_FROM_GLOBAL_ID(gid) \
-                (gcov_unsigned_t)((gid) & FUNC_ID_MASK)
-#define GEN_FUNC_GLOBAL_ID(m,f) ((((gcov_type) (m)) << FUNC_ID_WIDTH) | (f))
-
-
-#if defined (TARGET_POSIX_IO)
-#define GCOV_LOCKED 1
-#else
-#define GCOV_LOCKED 0
-#endif
-
-#else /* !IN_LIBGCOV */
+#ifndef IN_LIBGCOV
 /* About the host */
 
 typedef unsigned gcov_unsigned_t;
@@ -284,52 +207,10 @@
 #define GCOV_LOCKED 0
 #endif
 
+#define ATTRIBUTE_HIDDEN
+
 #endif /* !IN_LIBGCOV */
 
-/* In gcov we want function linkage to be static.  In the compiler we want
-   it extern, so that they can be accessed from elsewhere.  In libgcov we
-   need these functions to be extern, so prefix them with __gcov.  In
-   libgcov they must also be hidden so that the instance in the executable
-   is not also used in a DSO.  */
-#if IN_LIBGCOV
-
-#include "tconfig.h"
-
-#define gcov_var __gcov_var
-#define gcov_open __gcov_open
-#define gcov_close __gcov_close
-#define gcov_write_tag_length __gcov_write_tag_length
-#define gcov_position __gcov_position
-#define gcov_seek __gcov_seek
-#define gcov_rewrite __gcov_rewrite
-#define gcov_truncate __gcov_truncate
-#define gcov_is_error __gcov_is_error
-#define gcov_write_unsigned __gcov_write_unsigned
-#define gcov_write_counter __gcov_write_counter
-#define gcov_write_summary __gcov_write_summary
-#define gcov_write_module_info __gcov_write_module_info
-#define gcov_read_unsigned __gcov_read_unsigned
-#define gcov_read_counter __gcov_read_counter
-#define gcov_read_summary __gcov_read_summary
-#define gcov_read_module_info __gcov_read_module_info
-#define gcov_sort_n_vals __gcov_sort_n_vals
-
-/* Poison these, so they don't accidentally slip in.  */
-#pragma GCC poison gcov_write_string gcov_write_tag gcov_write_length
-#pragma GCC poison gcov_read_string gcov_sync gcov_time gcov_magic
-
-#ifdef HAVE_GAS_HIDDEN
-#define ATTRIBUTE_HIDDEN  __attribute__ ((__visibility__ ("hidden")))
-#else
-#define ATTRIBUTE_HIDDEN
-#endif
-
-#else
-
-#define ATTRIBUTE_HIDDEN
-
-#endif
-
 #ifndef GCOV_LINKAGE
 #define GCOV_LINKAGE extern
 #endif
@@ -527,7 +408,7 @@
 				 (2) means IS_PRIMARY in persistent file or
 				     memory copy used in profile-use.  */
   gcov_unsigned_t flags;      /* bit 0: is_exported,
-                                 bit 1: need to include all the auxiliary 
+                                 bit 1: need to include all the auxiliary
                                  modules in use compilation.  */
   gcov_unsigned_t lang; /* lower 16 bits encode the language, and the upper
 			   16 bits enocde other attributes, such as whether
@@ -555,147 +436,7 @@
    && !((module_infos[0]->lang & GCOV_MODULE_ASM_STMTS)			\
 	&& flag_ripa_disallow_asm_modules))
 
-/* Structures embedded in coveraged program.  The structures generated
-   by write_profile must match these.  */
-
-#if IN_LIBGCOV
-/* Information about counters for a single function.  */
-struct gcov_ctr_info
-{
-  gcov_unsigned_t num;		/* number of counters.  */
-  gcov_type *values;		/* their values.  */
-};
-
-/* Information about a single function.  This uses the trailing array
-   idiom. The number of counters is determined from the merge pointer
-   array in gcov_info.  The key is used to detect which of a set of
-   comdat functions was selected -- it points to the gcov_info object
-   of the object file containing the selected comdat function.  */
-
-struct gcov_fn_info
-{
-  const struct gcov_info *key;		/* comdat key */
-  gcov_unsigned_t ident;		/* unique ident of function */
-  gcov_unsigned_t lineno_checksum;	/* function lineo_checksum */
-  gcov_unsigned_t cfg_checksum;	/* function cfg checksum */
-  struct gcov_ctr_info ctrs[0];		/* instrumented counters */
-};
-
-/* Type of function used to merge counters.  */
-typedef void (*gcov_merge_fn) (gcov_type *, gcov_unsigned_t);
-
-/* Information about a single object file.  */
-struct gcov_info
-{
-  gcov_unsigned_t version;	/* expected version number */
-  struct gcov_module_info *mod_info; /* addtional module info.  */
-  struct gcov_info *next;	/* link to next, used by libgcov */
-
-  gcov_unsigned_t stamp;	/* uniquifying time stamp */
-  const char *filename;		/* output file name */
-  gcov_unsigned_t eof_pos;      /* end position of profile data */
-  gcov_merge_fn merge[GCOV_COUNTERS];  /* merge functions (null for
-					  unused) */
-  
-  unsigned n_functions;		/* number of functions */
-  const struct gcov_fn_info *const *functions; /* pointer to pointers
-					          to function information  */
-};
-
-/* Information about a single imported module.  */
-struct dyn_imp_mod
-{
-  const struct gcov_info *imp_mod;
-  double weight;
-};
-
-/* Register a new object file module.  */
-extern void __gcov_init (struct gcov_info *) ATTRIBUTE_HIDDEN;
-
-/* Set sampling rate to RATE.  */
-extern void __gcov_set_sampling_rate (unsigned int rate);
-
-/* Called before fork, to avoid double counting.  */
-extern void __gcov_flush (void) ATTRIBUTE_HIDDEN;
-
-/* Function to reset all counters to 0.  */
-extern void __gcov_reset (void);
-
-/* Function to enable early write of profile information so far.  */
-extern void __gcov_dump (void);
-
-/* The merge function that just sums the counters.  */
-extern void __gcov_merge_add (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
-
-/* The merge function to choose the most common value.  */
-extern void __gcov_merge_single (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
-
-/* The merge function to choose the most common difference between
-   consecutive values.  */
-extern void __gcov_merge_delta (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
-
-/* The merge function that just ors the counters together.  */
-extern void __gcov_merge_ior (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
-
-/* The merge function used for direct call counters.  */
-extern void __gcov_merge_dc (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
-
-/* The merge function used for indirect call counters.  */
-extern void __gcov_merge_icall_topn (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
-
-/* The profiler functions.  */
-extern void __gcov_interval_profiler (gcov_type *, gcov_type, int, unsigned);
-extern void __gcov_pow2_profiler (gcov_type *, gcov_type);
-extern void __gcov_one_value_profiler (gcov_type *, gcov_type);
-extern void __gcov_indirect_call_profiler (gcov_type *, gcov_type, void *, void *);
-extern void __gcov_indirect_call_topn_profiler (void *, void *, gcov_unsigned_t) ATTRIBUTE_HIDDEN;
-extern void __gcov_direct_call_profiler (void *, void *, gcov_unsigned_t) ATTRIBUTE_HIDDEN;
-extern void __gcov_average_profiler (gcov_type *, gcov_type);
-extern void __gcov_ior_profiler (gcov_type *, gcov_type);
-extern void __gcov_sort_n_vals (gcov_type *value_array, int n);
-
-#ifndef inhibit_libc
-/* The wrappers around some library functions..  */
-extern pid_t __gcov_fork (void) ATTRIBUTE_HIDDEN;
-extern int __gcov_execl (const char *, char *, ...) ATTRIBUTE_HIDDEN;
-extern int __gcov_execlp (const char *, char *, ...) ATTRIBUTE_HIDDEN;
-extern int __gcov_execle (const char *, char *, ...) ATTRIBUTE_HIDDEN;
-extern int __gcov_execv (const char *, char *const []) ATTRIBUTE_HIDDEN;
-extern int __gcov_execvp (const char *, char *const []) ATTRIBUTE_HIDDEN;
-extern int __gcov_execve (const char *, char  *const [], char *const [])
-  ATTRIBUTE_HIDDEN;
-#endif
-
-#endif /* IN_LIBGCOV */
-
-#if IN_LIBGCOV >= 0
-
-/* Optimum number of gcov_unsigned_t's read from or written to disk.  */
-#define GCOV_BLOCK_SIZE (1 << 10)
-
-GCOV_LINKAGE struct gcov_var
-{
-  FILE *file;
-  gcov_position_t start;	/* Position of first byte of block */
-  unsigned offset;		/* Read/write position within the block.  */
-  unsigned length;		/* Read limit in the block.  */
-  unsigned overread;		/* Number of words overread.  */
-  int error;			/* < 0 overflow, > 0 disk error.  */
-  int mode;	                /* < 0 writing, > 0 reading */
-#if IN_LIBGCOV
-  /* Holds one block plus 4 bytes, thus all coverage reads & writes
-     fit within this buffer and we always can transfer GCOV_BLOCK_SIZE
-     to and from the disk. libgcov never backtracks and only writes 4
-     or 8 byte objects.  */
-  gcov_unsigned_t buffer[GCOV_BLOCK_SIZE + 1];
-#else
-  int endian;			/* Swap endianness.  */
-  /* Holds a variable length block, as the compiler can write
-     strings and needs to backtrack.  */
-  size_t alloc;
-  gcov_unsigned_t *buffer;
-#endif
-} gcov_var ATTRIBUTE_HIDDEN;
+#if !defined(inhibit_libc)
 
 /* Functions for reading and writing gcov files. In libgcov you can
    open the file for reading then writing. Elsewhere you can open the
@@ -706,48 +447,23 @@
    you use the functions for reading, then gcov_rewrite then the
    functions for writing.  Your file may become corrupted if you break
    these invariants.  */
-#if IN_LIBGCOV
-GCOV_LINKAGE int gcov_open (const char */*name*/) ATTRIBUTE_HIDDEN;
-#else
+#if !IN_LIBGCOV
 GCOV_LINKAGE int gcov_open (const char */*name*/, int /*direction*/);
 GCOV_LINKAGE int gcov_magic (gcov_unsigned_t, gcov_unsigned_t);
 #endif
-GCOV_LINKAGE int gcov_close (void) ATTRIBUTE_HIDDEN;
 
 /* Available everywhere.  */
-static gcov_position_t gcov_position (void);
-static int gcov_is_error (void);
-
+GCOV_LINKAGE int gcov_close (void) ATTRIBUTE_HIDDEN;
 GCOV_LINKAGE gcov_unsigned_t gcov_read_unsigned (void) ATTRIBUTE_HIDDEN;
 GCOV_LINKAGE gcov_type gcov_read_counter (void) ATTRIBUTE_HIDDEN;
 GCOV_LINKAGE void gcov_read_summary (struct gcov_summary *) ATTRIBUTE_HIDDEN;
-#if !IN_LIBGCOV && IN_GCOV != 1
-GCOV_LINKAGE void gcov_read_module_info (struct gcov_module_info *mod_info,
-					 gcov_unsigned_t len) ATTRIBUTE_HIDDEN;
-#endif
-
-#if IN_LIBGCOV
-/* Available only in libgcov */
-GCOV_LINKAGE void gcov_write_counter (gcov_type) ATTRIBUTE_HIDDEN;
-GCOV_LINKAGE void gcov_write_tag_length (gcov_unsigned_t, gcov_unsigned_t)
-    ATTRIBUTE_HIDDEN;
-GCOV_LINKAGE void gcov_write_summary (gcov_unsigned_t /*tag*/,
-				      const struct gcov_summary *)
-    ATTRIBUTE_HIDDEN;
-
-GCOV_LINKAGE void gcov_write_module_infos (struct gcov_info *mod_info)
-    ATTRIBUTE_HIDDEN;
-GCOV_LINKAGE const struct dyn_imp_mod **
-gcov_get_sorted_import_module_array (struct gcov_info *mod_info, unsigned *len)
-    ATTRIBUTE_HIDDEN;
-static void gcov_rewrite (void);
-GCOV_LINKAGE void gcov_seek (gcov_position_t /*position*/) ATTRIBUTE_HIDDEN;
-GCOV_LINKAGE void gcov_truncate (void) ATTRIBUTE_HIDDEN;
-#else
-/* Available outside libgcov */
 GCOV_LINKAGE const char *gcov_read_string (void);
 GCOV_LINKAGE void gcov_sync (gcov_position_t /*base*/,
 			     gcov_unsigned_t /*length */);
+
+#if !IN_LIBGCOV && IN_GCOV != 1
+GCOV_LINKAGE void gcov_read_module_info (struct gcov_module_info *mod_info,
+					 gcov_unsigned_t len) ATTRIBUTE_HIDDEN;
 #endif
 
 #if !IN_GCOV
@@ -790,36 +506,6 @@
 GCOV_LINKAGE time_t gcov_time (void);
 #endif
 
-/* Save the current position in the gcov file.  */
-
-static inline gcov_position_t
-gcov_position (void)
-{
-  return gcov_var.start + gcov_var.offset;
-}
-
-/* Return nonzero if the error flag is set.  */
-
-static inline int
-gcov_is_error (void)
-{
-  return gcov_var.file ? gcov_var.error : 1;
-}
-
-#if IN_LIBGCOV
-/* Move to beginning of file and initialize for writing.  */
-
-static inline void
-gcov_rewrite (void)
-{
-  gcc_assert (gcov_var.mode > 0);
-  gcov_var.mode = -1;
-  gcov_var.start = 0;
-  gcov_var.offset = 0;
-  fseek (gcov_var.file, 0L, SEEK_SET);
-}
-#endif
-
-#endif /* IN_LIBGCOV >= 0 */
+#endif /* !inhibit_libc  */
 
 #endif /* GCC_GCOV_IO_H */
diff --git a/gcc/gcov-tool.c b/gcc/gcov-tool.c
new file mode 100644
index 0000000..07a8ef4
--- /dev/null
+++ b/gcc/gcov-tool.c
@@ -0,0 +1,783 @@
+/* Gcc offline profile processing tool support. */
+/* Compile this one with gcc.  */
+/* Copyright (C) 2014 Free Software Foundation, Inc.
+   Contributed by Rong Xu <xur@google.com>.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "intl.h"
+#include "hashtab.h"
+#include "diagnostic.h"
+#include "version.h"
+#include "gcov-io.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <ftw.h>
+#include <getopt.h>
+#include "params.h"
+#include <string.h>
+
+extern int gcov_profile_merge (struct gcov_info*, struct gcov_info*, int, int);
+extern int gcov_profile_normalize (struct gcov_info*, gcov_type);
+extern int gcov_profile_scale (struct gcov_info*, float, int, int);
+extern struct gcov_info* gcov_read_profile_dir (const char*, int);
+extern void gcov_exit (void);
+extern void set_gcov_list (struct gcov_info *);
+extern void gcov_set_verbose (void);
+extern void set_use_existing_grouping (void);
+extern void set_use_modu_list (void);
+extern void lipo_set_substitute_string (const char *);
+
+/* The following defines are needed by dyn-ipa.c.
+   They will also be emitted by the compiler with -fprofile-generate,
+   which means this file cannot be compiled with -fprofile-generate
+   -- otherwise we get duplicated defintions.
+   Make the defines weak to link with other objects/libraries
+   that potentially compiled with -fprofile-generate.  */
+
+__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_grouping_algorithm;
+__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_merge_modu_edges;
+__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_weak_inclusion;
+__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_max_mem;
+__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_random_group_size;
+__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_cutoff;
+__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_random_seed;
+__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_dump_cgraph;
+__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_propagate_scale;
+
+static int verbose;
+
+/* Remove file NAME if it has a gcda suffix. */
+
+static int
+unlink_gcda_file (const char *name,
+                  const struct stat *status ATTRIBUTE_UNUSED,
+                  int type ATTRIBUTE_UNUSED,
+                  struct FTW *ftwbuf ATTRIBUTE_UNUSED)
+{
+  int ret = 0;
+  int len = strlen (name);
+  int len1 = strlen (GCOV_DATA_SUFFIX);
+
+  if (len > len1 && !strncmp (len -len1 + name, GCOV_DATA_SUFFIX, len1))
+    remove (name);
+
+  if (ret)
+    {
+      fnotice (stderr, "error in removing %s\n", name);
+      exit (FATAL_EXIT_CODE);
+    }
+
+  return ret;
+}
+
+/* Remove the gcda files in PATH recursively.  */
+
+static int
+unlink_profile_dir (const char *path)
+{
+    return nftw(path, unlink_gcda_file, 64, FTW_DEPTH | FTW_PHYS);
+}
+
+/* Merging profile D1 and D2 with weight as W1 and W2, respectively.
+   The result profile is written to directory OUT.
+   Return 0 on success.  */
+
+static int
+profile_merge (const char *d1, const char *d2, const char *out, int w1, int w2)
+{
+  char *pwd;
+  int ret;
+  struct gcov_info * d1_profile;
+  struct gcov_info * d2_profile;
+
+
+  d1_profile = gcov_read_profile_dir (d1, 0);
+  if (!d1_profile)
+    return 1;
+
+  if (d2)
+    {
+      d2_profile = gcov_read_profile_dir (d2, 0);
+      if (!d2_profile)
+        return 1;
+
+      /* The actual merge: we overwrite to d1_profile.  */
+      ret = gcov_profile_merge (d1_profile, d2_profile, w1, w2);
+
+      if (ret)
+        return ret;
+    }
+
+  /* Output new profile.  */
+  unlink_profile_dir (out);
+  mkdir (out, 0755);
+  pwd = getcwd (NULL, 0);
+  gcc_assert (pwd);
+  ret = chdir (out);
+  gcc_assert (ret == 0);
+
+  set_gcov_list (d1_profile);
+  gcov_exit ();
+
+  ret = chdir (pwd);
+  free (pwd);
+  return 0;
+}
+
+/* Usage message for profile merge.  */
+
+static void
+print_merge_usage_message (int error_p)
+{
+  FILE *file = error_p ? stderr : stdout;
+
+  fnotice (file, "  merge [options] <dir1> <dir2>         Merge coverage file contents\n");
+  fnotice (file, "    -v, --verbose                       Verbose mode\n");
+  fnotice (file, "    -o, --output <dir>                  Output directory\n");
+  fnotice (file, "    -w, --weight <w1,w2>                Set weights (float point values)\n");
+}
+
+static const struct option merge_options[] =
+{
+  { "verbose",                no_argument,       NULL, 'v' },
+  { "output",                 required_argument, NULL, 'o' },
+  { "weight",                 required_argument, NULL, 'w' },
+  { 0, 0, 0, 0 }
+};
+
+/* Print merge usage and exit.  */
+
+static void
+merge_usage (void)
+{
+  fnotice (stderr, "Merge subcomand usage:");
+  print_merge_usage_message (true);
+  exit (FATAL_EXIT_CODE);
+}
+
+/* Driver for profile merge sub-command.  */
+
+static int
+do_merge (int argc, char **argv)
+{
+  int opt;
+  int ret;
+  const char *output_dir = 0;
+  int w1 = 1, w2 = 1;
+
+  optind = 0;
+  while ((opt = getopt_long (argc, argv, "vo:w:", merge_options, NULL)) != -1)
+    {
+      switch (opt)
+        {
+        case 'v':
+          verbose = 1;
+          gcov_set_verbose ();
+          break;
+        case 'o':
+          output_dir = optarg;
+          break;
+        case 'w':
+          sscanf (optarg, "%d,%d", &w1, &w2);
+          if (w1 < 0 || w2 < 0)
+            {
+              fnotice (stderr, "weights need to be non-negative\n");
+              exit (FATAL_EXIT_CODE);
+            }
+          break;
+        default:
+          merge_usage ();
+        }
+    }
+
+  if (output_dir == NULL)
+    output_dir = "merged_profile";
+
+  if (argc - optind == 2)
+    ret = profile_merge (argv[optind], argv[optind+1], output_dir, w1, w2);
+  else
+    merge_usage ();
+
+  return ret;
+}
+
+/* If N_VAL is no-zero, normalize the profile by setting the largest counter
+   counter value to N_VAL and scale others counters proportionally.
+   Otherwise, multiply the all counters by SCALE.  */
+
+static int
+profile_rewrite (const char *d1, const char *out, long long n_val,
+                 float scale, int n, int d)
+{
+  char *pwd;
+  int ret;
+  struct gcov_info * d1_profile;
+
+
+  d1_profile = gcov_read_profile_dir (d1, 0);
+  if (!d1_profile)
+    return 1;
+
+  /* Output new profile.  */
+  unlink_profile_dir (out);
+  mkdir (out, 0755);
+  pwd = getcwd (NULL, 0);
+  gcc_assert (pwd);
+  ret = chdir (out);
+  gcc_assert (ret == 0);
+
+  if (n_val)
+    gcov_profile_normalize (d1_profile, (gcov_type) n_val);
+  else
+    gcov_profile_scale (d1_profile, scale, n, d);
+
+  set_gcov_list (d1_profile);
+  gcov_exit ();
+
+  ret = chdir (pwd);
+  free (pwd);
+  return 0;
+}
+
+/* This is the hashtab entry to store a name and mod_id pair. */
+typedef struct {
+  const char *name;
+  unsigned id;
+} mod_name_id;
+
+/* Hash and comparison functions for strings.  */
+
+static unsigned
+mod_name_id_htab_hash (const void *s_p)
+{
+  const char *s = ((const mod_name_id *) s_p)->name;
+  return (*htab_hash_string) (s);
+}
+
+static int
+mod_name_id_hash_eq (const void *s1_p, const void *s2_p)
+{
+  return strcmp (((const mod_name_id *) s1_p)->name,
+                 ((const mod_name_id *) s2_p)->name) == 0;
+}
+
+static htab_t mod_name_id_hash_table;
+
+/* Look up an entry in the hash table. STRING is the module name.
+   CREATE controls to insert to htab or not.
+   If (*ID_P != 0), we write (*ID_P) to htab.
+   If (*ID_P == 0), we write module_id to (*ID_P).
+   return 1 if an entry is found and otherwise 0.  */
+
+static int
+module_name_hash_lookup (const char *string, unsigned *id_p, int create)
+{
+  void **e;
+  mod_name_id t;
+
+  t.name = string;
+  e = htab_find_slot (mod_name_id_hash_table, &t,
+                      create ? INSERT : NO_INSERT);
+  if (e == NULL)
+    return 0;
+  if (*e == NULL)
+    {
+      *e = XNEW (mod_name_id *);
+      (*(mod_name_id **)e)->name = xstrdup (string);
+    }
+  if (id_p)
+    {
+      if (*id_p != 0)
+        (*(mod_name_id **)e)->id = *id_p;
+      else
+        *id_p = (*(mod_name_id **)e)->id;
+    }
+  return 1;
+}
+
+/* Return 1 if NAME is of a source type that LIPO targets.
+   Return 0 otherwise.  */
+
+static int
+is_lipo_source_type (char *name)
+{
+  char *p;
+
+  if (strcasestr (name, ".c") ||
+      strcasestr (name, ".cc") ||
+      strcasestr (name, ".cpp") ||
+      strcasestr (name, ".c++"))
+    return 1;
+
+  /* Replace ".proto" with ".pb.cc". Since the two strings have the same
+     length, we simplfy do a strcpy.  */
+  if ((p = strcasestr (name, ".proto")) != NULL)
+    {
+      strcpy (p, ".pb.cc");
+      return 1;
+    }
+
+  return 0;
+}
+
+/* Convert/process the names from dependence query to a
+   stardard format. Return NULL if this is not a lipo
+   target source. */
+
+static char *
+lipo_process_name_string (char *name)
+{
+  char *p;
+
+  if (name == NULL)
+    return NULL;
+  if (strlen (name) == 0)
+    return NULL;
+
+  if (!is_lipo_source_type (name))
+    return NULL;
+
+  /* Overwrite ':' with '/'.  */
+  if ((p = strchr (name, ':')) != NULL)
+    *p = '/';
+
+  /* Remove "//".  */
+  if (name[0] == '/' && name[1] =='/')
+    name += 2;
+
+  return name;
+}
+
+/* Store the list of source modules in INPUT_FILE to internal hashtab.  */
+
+static int
+lipo_process_modu_list (const char *input_file)
+{
+  FILE *fd;
+  char *line = NULL;
+  size_t linecap = 0;
+  char *name;
+
+  set_use_modu_list ();
+
+  if ((fd = fopen (input_file, "r")) == NULL)
+    {
+      fnotice (stderr, "Cannot open %s\n", input_file);
+      return -1;
+    }
+
+  /* Read all the modules */
+  while (getline (&line, &linecap, fd) != -1)
+    {
+      name = strtok (line, " \t\n");
+      name = lipo_process_name_string (name);
+      if (name)
+        module_name_hash_lookup (name, 0, 1);
+
+      free (line);
+      line = NULL;
+    }
+
+  return 0;
+}
+
+#define GENFILE_PREFIX "/genfiles/"
+
+/* Return 1 if module NAME is available to be used in the target
+   profile.  CREATE controls to insert to htab or not.
+   If (*ID_P != 0), we write (*ID_P) to htab.
+   If (*ID_P == 0), we write module_id to (*ID_P).
+   return 1 if an entry is found and otherwise 0.  */
+
+int
+is_module_available (const char *name, unsigned *id_p, int create)
+{
+  char *buf, *p;
+  int ret;
+
+  if (mod_name_id_hash_table == NULL)
+    return 1;
+
+  buf = xstrdup (name);
+  /* Remove genfile string.  */
+  if ((p = strstr (buf, GENFILE_PREFIX)) != NULL)
+    p += strlen (GENFILE_PREFIX);
+  else
+    p = buf;
+
+   ret = module_name_hash_lookup (p, id_p, create);
+   free (buf);
+   return ret;
+}
+
+/* Return module_ident for module NAME.
+   return 0 if the module NAME is not available.  */
+
+int
+get_module_id_from_name (const char *name)
+{
+  unsigned mod_id = 0;
+  if (is_module_available (name, &mod_id, 0) == 1)
+    return mod_id;
+  return 0;
+}
+
+/* Usage function for profile rewrite.  */
+
+static void
+print_rewrite_usage_message (int error_p)
+{
+  FILE *file = error_p ? stderr : stdout;
+
+  fnotice (file, "  rewrite [options] <dir>               Rewrite coverage file contents\n");
+  fnotice (file, "    -v, --verbose                       Verbose mode\n");
+  fnotice (file, "    -o, --output <dir>                  Output directory\n");
+  fnotice (file, "    -l, --modu_list <file>              Only use the modules in this file\n");
+  fnotice (file, "    -r, --path_substr_replace <str>     Replace string in path\n");
+  fnotice (file, "    -s, --scale <float or simple-frac>  Scale the profile counters\n");
+  fnotice (file, "    -u, --use_imports_file <file>       Use the grouping in import files.\n");
+  fnotice (file, "    -n, --normalize <long long>         Normalize the profile\n");
+}
+
+static const struct option rewrite_options[] =
+{
+  { "verbose",                no_argument,       NULL, 'v' },
+  { "output",                 required_argument, NULL, 'o' },
+  { "modu_list",              required_argument, NULL, 'l' },
+  { "string",                 required_argument, NULL, 'r' },
+  { "scale",                  required_argument, NULL, 's' },
+  { "use_imports_file",       no_argument,       NULL, 'u' },
+  { "normalize",              required_argument, NULL, 'n' },
+  { 0, 0, 0, 0 }
+};
+
+/* Print profile rewrite usage and exit.  */
+
+static void
+rewrite_usage (void)
+{
+  fnotice (stderr, "Rewrite subcommand usage:");
+  print_rewrite_usage_message (true);
+  exit (FATAL_EXIT_CODE);
+}
+
+/* Driver for profile rewrite sub-command. */
+
+static int
+do_rewrite (int argc, char **argv)
+{
+  int opt;
+  int ret;
+  const char *output_dir = 0;
+  long long normalize_val = 0;
+  float scale = 1.0;
+  int numerator = -1;
+  int denominator = -1;
+
+  mod_name_id_hash_table = htab_create (500, mod_name_id_htab_hash,
+                                        mod_name_id_hash_eq, NULL);
+
+  optind = 0;
+  while ((opt = getopt_long (argc, argv, "vo:l:r:s:un:", rewrite_options, NULL)) != -1)
+    {
+      switch (opt)
+        {
+        case 'v':
+          verbose = 1;
+          gcov_set_verbose ();
+          break;
+        case 'o':
+          output_dir = optarg;
+          break;
+        case 'l':
+          lipo_process_modu_list (optarg);
+          break;
+        case 'r':
+          lipo_set_substitute_string (optarg);
+          break;
+        case 'u':
+          set_use_existing_grouping ();
+          break;
+        case 'n':
+          if (scale != 1.0)
+            {
+              fnotice (stderr, "scaling cannot co-exist with normalization\n");
+              scale = 1.0;
+            }
+          normalize_val = atoll (optarg);
+          break;
+        case 's':
+          ret = 0;
+          if (strstr (optarg, "/"))
+            {
+              ret = sscanf (optarg, "%d/%d", &numerator, &denominator);
+              if (ret == 2)
+                {
+                  gcc_assert (numerator >= 0);
+                  gcc_assert (denominator > 0);
+                  scale = 0.0;
+                }
+            }
+          if (ret != 2)
+            {
+              ret = sscanf (optarg, "%f", &scale);
+              gcc_assert (ret == 1);
+            }
+
+          if (scale < 0.0)
+            {
+              fnotice (stderr, "scale needs to be non-negative\n");
+              exit (FATAL_EXIT_CODE);
+            }
+          if (normalize_val != 0)
+            {
+              fnotice (stderr, "normalization cannot co-exist with scaling\n");
+              normalize_val = 0;
+            }
+          break;
+        default:
+          rewrite_usage ();
+        }
+    }
+
+  if (output_dir == NULL)
+    output_dir = "rewrite_profile";
+
+  if (argc - optind == 1)
+    {
+      if (denominator > 0)
+        ret = profile_rewrite (argv[optind],  output_dir, 0, 0.0, numerator, denominator);
+      else
+        ret = profile_rewrite (argv[optind],  output_dir, normalize_val, scale, 0, 0);
+    }
+  else
+    rewrite_usage ();
+
+  return ret;
+}
+
+/* Print a usage message and exit.  If ERROR_P is nonzero, this is an error,
+   otherwise the output of --help.  */
+
+static void
+print_usage (int error_p)
+{
+  FILE *file = error_p ? stderr : stdout;
+  int status = error_p ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE;
+
+  fnotice (file, "Usage: %s [OPTION]... SUB_COMMAND [OPTION]...\n\n", progname);
+  fnotice (file, "Offline tool to handle gcda counts.\n\n");
+  fnotice (file, "  -h, --help                            Print this help, then exit\n");
+  fnotice (file, "  -v, --version                         Print version number, then exit\n");
+  fnotice (file, "  -A, --lipo_algorithm <0|1>            Choose LIPO module grouping algorithm\n");
+  fnotice (file, "  -E, --lipo_merge_edge                 Merge module edges in LIPO module grouping\n");
+  fnotice (file, "  -W, --lipo_weak_inclusion             Don't force strict inclusion in grouping\n");
+  fnotice (file, "  -C, --lipo_cutoff <0..100>            Set LIPO module grouping cutoff\n");
+  fnotice (file, "  -M, --lipo_max_memory <int>           Set the max memory in LIPO module grouping\n");
+  fnotice (file, "  -R, --lipo_random_group_size <int>    Set LIPO random grouping size\n");
+  fnotice (file, "  -S, --lipo_random_group_seed <int>    Set LIPO random grouping seed\n");
+  fnotice (file, "  -D, --lipo_dump_cgraph                Dump dynamic call graph\n");
+  fnotice (file, "  -P, --lipo_propagate_scale            Set LIPO propagate scale to true\n");
+  fnotice (file, "\n");
+  print_merge_usage_message (error_p);
+  print_rewrite_usage_message (error_p);
+  fnotice (file, "\nFor bug reporting instructions, please see:\n%s.\n",
+           bug_report_url);
+  exit (status);
+}
+
+/* Print version information and exit.  */
+
+static void
+print_version (void)
+{
+  fnotice (stdout, "%s %s%s\n", progname, pkgversion_string, version_string);
+  fnotice (stdout, "Copyright %s 2014 Free Software Foundation, Inc.\n",
+           _("(C)"));
+  fnotice (stdout,
+           _("This is free software; see the source for copying conditions.\n"
+             "There is NO warranty; not even for MERCHANTABILITY or \n"
+             "FITNESS FOR A PARTICULAR PURPOSE.\n\n"));
+  exit (SUCCESS_EXIT_CODE);
+}
+
+static const struct option options[] =
+{
+  { "help",                   no_argument,       NULL, 'h' },
+  { "version",                no_argument,       NULL, 'v' },
+  { "lipo_algorithm",         required_argument, NULL, 'A' },
+  { "lipo_merge_edge",        no_argument,       NULL, 'E' },
+  { "lipo_weak_inclusion",    no_argument,       NULL, 'W' },
+  { "lipo_cutoff",            required_argument, NULL, 'C' },
+  { "lipo_max_memory",        required_argument, NULL, 'M' },
+  { "lipo_random_group_size", required_argument, NULL, 'R' },
+  { "lipo_random_group_seed", required_argument, NULL, 'S' },
+  { "lipo_dump_cgraph",       no_argument,       NULL, 'D' },
+  { "lipo_propagate_scale",   no_argument,       NULL, 'P' },
+  { 0, 0, 0, 0 }
+};
+
+/* Process args, return index to first non-arg.  */
+
+static int
+process_args (int argc, char **argv)
+{
+  int opt;
+  int ret;
+
+  while ((opt = getopt_long (argc, argv, "+hvA:EWC:M:R:S:DP", options, NULL)) != -1)
+    {
+      switch (opt)
+        {
+        case 'h':
+          print_usage (false);
+          /* Print_usage will exit.  */
+        case 'v':
+          print_version ();
+          /* Print_version will exit.  */
+        case 'E':
+          __gcov_lipo_merge_modu_edges = 1;
+          break;
+        case 'W':
+          __gcov_lipo_weak_inclusion = 1;
+          break;
+        case 'D':
+          __gcov_lipo_dump_cgraph = 1;
+          break;
+        case 'P':
+          __gcov_lipo_propagate_scale = 1;
+          break;
+        case 'A':
+          sscanf (optarg, "%d", &ret);
+          if (ret != 0 && ret != 1)
+            {
+              fnotice (stderr, "LIPO grouping algorithm can only be 0 or 1\n");
+              exit (-1);
+            }
+          __gcov_lipo_grouping_algorithm = ret;
+          break;
+        case 'R':
+          sscanf (optarg, "%d", &ret);
+          if (ret < 1)
+            {
+              fnotice (stderr, "LIPO random group size needs to be positive\n");
+              exit (-1);
+            }
+          __gcov_lipo_random_group_size = ret;
+          break;
+        case 'S':
+          sscanf (optarg, "%d", &ret);
+          __gcov_lipo_random_seed = ret;;
+          break;
+        case 'M':
+          sscanf (optarg, "%d", &ret);
+          if (ret < 0)
+            {
+              fnotice (stderr, "LIPO max-memory size needs to be positive\n");
+              exit (-1);
+            }
+          __gcov_lipo_max_mem = ret;
+          break;
+        case 'C':
+          sscanf (optarg, "%d", &ret);
+          if (ret < 0 || ret > 100)
+            {
+              fnotice (stderr, "LIPO cutoff value range is [0, 100]\n");
+              exit (-1);
+            }
+          __gcov_lipo_cutoff = ret;;
+          break;
+        default:
+          print_usage (true);
+          /* Print_usage will exit.  */
+        }
+    }
+
+  return optind;
+}
+
+/* Get the default param value from params.def.  */
+
+#define GET_DEFAULT_PARAM_VALUE(p) compiler_params[p].default_value
+static void
+set_lipo_default_params (void)
+{
+  __gcov_lipo_grouping_algorithm = GET_DEFAULT_PARAM_VALUE (PARAM_LIPO_GROUPING_ALGORITHM);
+  __gcov_lipo_merge_modu_edges   = GET_DEFAULT_PARAM_VALUE (PARAM_LIPO_MERGE_MODU_EDGES);
+  __gcov_lipo_weak_inclusion     = GET_DEFAULT_PARAM_VALUE (PARAM_LIPO_WEAK_INCLUSION);
+  __gcov_lipo_max_mem            = GET_DEFAULT_PARAM_VALUE (PARAM_MAX_LIPO_MEMORY);
+  __gcov_lipo_random_group_size  = GET_DEFAULT_PARAM_VALUE (PARAM_LIPO_RANDOM_GROUP_SIZE);
+  __gcov_lipo_cutoff             = GET_DEFAULT_PARAM_VALUE (PARAM_LIPO_CUTOFF);
+  __gcov_lipo_random_seed        = GET_DEFAULT_PARAM_VALUE (PARAM_LIPO_RANDOM_SEED);
+  __gcov_lipo_dump_cgraph        = GET_DEFAULT_PARAM_VALUE (PARAM_LIPO_DUMP_CGRAPH);
+  __gcov_lipo_propagate_scale    = GET_DEFAULT_PARAM_VALUE (PARAM_LIPO_PROPAGATE_SCALE);
+}
+
+/* Main function for gcov-tool.  */
+
+int
+main (int argc, char **argv)
+{
+  const char *p;
+  const char *sub_command;
+
+  p = argv[0] + strlen (argv[0]);
+  while (p != argv[0] && !IS_DIR_SEPARATOR (p[-1]))
+    --p;
+  progname = p;
+
+  xmalloc_set_program_name (progname);
+
+  /* Unlock the stdio streams.  */
+  unlock_std_streams ();
+
+  gcc_init_libintl ();
+
+  diagnostic_initialize (global_dc, 0);
+
+  /* Handle response files.  */
+  expandargv (&argc, &argv);
+
+  /* Register the language-independent parameters.  */
+  global_init_params ();
+  finish_params ();
+  set_lipo_default_params ();
+
+  process_args (argc, argv);
+  if (optind >= argc)
+    print_usage (true);
+
+  sub_command = argv[optind];
+
+  if (!strcmp (sub_command, "merge"))
+    return do_merge (argc - optind, argv + optind);
+  else if (!strcmp (sub_command, "rewrite"))
+    return do_rewrite (argc - optind, argv + optind);
+
+  print_usage (true);
+}
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index 06edced..5f5f742 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -1012,13 +1012,14 @@
    represented by a declaration (i.e. a global or automatically allocated one)
    or NULL if it cannot be found or is not safe.  CST is expected to be an
    ADDR_EXPR of such object or the function will return NULL.  Currently it is
-   safe to use such binfo only if it has no base binfo (i.e. no ancestors).  */
+   safe to use such binfo only if it has no base binfo (i.e. no ancestors)
+   EXPECTED_TYPE is type of the class virtual belongs to.  */
 
 tree
-gimple_extract_devirt_binfo_from_cst (tree cst)
+gimple_extract_devirt_binfo_from_cst (tree cst, tree expected_type)
 {
   HOST_WIDE_INT offset, size, max_size;
-  tree base, type, expected_type, binfo;
+  tree base, type, binfo;
   bool last_artificial = false;
 
   if (!flag_devirtualize
@@ -1027,7 +1028,6 @@
     return NULL_TREE;
 
   cst = TREE_OPERAND (cst, 0);
-  expected_type = TREE_TYPE (cst);
   base = get_ref_base_and_extent (cst, &offset, &size, &max_size);
   type = TREE_TYPE (base);
   if (!DECL_P (base)
@@ -1110,10 +1110,11 @@
 	  gimple_call_set_fn (stmt, OBJ_TYPE_REF_EXPR (callee));
 	  changed = true;
 	}
-      else
+      else if (virtual_method_call_p (callee))
 	{
 	  tree obj = OBJ_TYPE_REF_OBJECT (callee);
-	  tree binfo = gimple_extract_devirt_binfo_from_cst (obj);
+	  tree binfo = gimple_extract_devirt_binfo_from_cst
+		 (obj, obj_type_ref_class (callee));
 	  if (binfo)
 	    {
 	      HOST_WIDE_INT token
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 97a37e3..e5619d7 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -2574,7 +2574,8 @@
 is_gimple_addressable (tree t)
 {
   return (is_gimple_id (t) || handled_component_p (t)
-	  || TREE_CODE (t) == MEM_REF);
+	  || TREE_CODE (t) == MEM_REF
+	  || TREE_CODE (t) == TARGET_MEM_REF);
 }
 
 /* Return true if T is a valid gimple constant.  */
@@ -2625,7 +2626,8 @@
       op = TREE_OPERAND (op, 0);
     }
 
-  if (CONSTANT_CLASS_P (op) || TREE_CODE (op) == MEM_REF)
+  if (CONSTANT_CLASS_P (op) || TREE_CODE (op) == MEM_REF
+      || TREE_CODE (op) == TARGET_MEM_REF)
     return true;
 
   switch (TREE_CODE (op))
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 1bbd7d7..e044cb0 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -834,7 +834,7 @@
 gimple gimple_alloc_stat (enum gimple_code, unsigned MEM_STAT_DECL);
 const char *gimple_decl_printable_name (tree, int);
 tree gimple_get_virt_method_for_binfo (HOST_WIDE_INT, tree);
-tree gimple_extract_devirt_binfo_from_cst (tree);
+tree gimple_extract_devirt_binfo_from_cst (tree, tree);
 
 /* Returns true iff T is a scalar register variable.  */
 extern bool is_gimple_reg (tree);
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog
index 7edfb60..416d923 100644
--- a/gcc/go/ChangeLog
+++ b/gcc/go/ChangeLog
@@ -1,3 +1,38 @@
+2013-10-16  Ian Lance Taylor  <iant@google.com>
+
+	Bring in from mainline:
+
+	2013-10-11  Chris Manghane  <cmang@google.com>
+	* go-gcc.cc (Gcc_backend::function_code_expression): New
+	function.
+
+	2013-10-10  Chris Manghane  <cmang@google.com>
+	* go-gcc.cc (Backend::error_function): New function.
+	(Backend::function): New function.
+	(Backend::make_function): New function.
+	(function_to_tree): New function.
+
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
+2013-10-04  Chris Manghane  <cmang@google.com>
+
+	* go-gcc.cc (Backend::convert_expression): New function.
+
+2013-10-02  Chris Manghane  <cmang@google.com>
+
+	* go-gcc.cc: Include "real.h" and "realmpfr.h".
+	(Backend::integer_constant_expression): New function.
+	(Backend::float_constant_expression): New function.
+	(Backend::complex_constant_expression): New function.
+
+2013-09-30  Chris Manghane  <cmang@google.com>
+
+	* go-gcc.cc (Backend::error_expression): New function.
+	(Backend::var_expression): New function.
+	(Backend::indirect_expression): New function.
+
 2013-08-28  Ian Lance Taylor  <iant@google.com>
 
 	* go-gcc.cc (Gcc_backend::immutable_struct): Set TREE_PUBLIC if
diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc
index 025bb2b..81e9ad1 100644
--- a/gcc/go/go-gcc.cc
+++ b/gcc/go/go-gcc.cc
@@ -29,6 +29,8 @@
 #include "gimple.h"
 #include "toplev.h"
 #include "output.h"
+#include "real.h"
+#include "realmpfr.h"
 
 #include "go-c.h"
 
@@ -208,6 +210,31 @@
   Bexpression*
   zero_expression(Btype*);
 
+  Bexpression*
+  error_expression()
+  { return this->make_expression(error_mark_node); }
+
+  Bexpression*
+  var_expression(Bvariable* var, Location);
+
+  Bexpression*
+  indirect_expression(Bexpression* expr, bool known_valid, Location);
+
+  Bexpression*
+  integer_constant_expression(Btype* btype, mpz_t val);
+
+  Bexpression*
+  float_constant_expression(Btype* btype, mpfr_t val);
+
+  Bexpression*
+  complex_constant_expression(Btype* btype, mpfr_t real, mpfr_t imag);
+
+  Bexpression*
+  convert_expression(Btype* type, Bexpression* expr, Location);
+
+  Bexpression*
+  function_code_expression(Bfunction*, Location);
+
   // Statements.
 
   Bstatement*
@@ -310,6 +337,17 @@
   Bexpression*
   label_address(Blabel*, Location);
 
+  // Functions.
+
+  Bfunction*
+  error_function()
+  { return this->make_function(error_mark_node); }
+
+  Bfunction*
+  function(Btype* fntype, const std::string& name, const std::string& asm_name,
+           bool is_visible, bool is_declaration, bool is_inlinable,
+           bool disable_split_stack, bool in_unique_section, Location);
+
  private:
   // Make a Bexpression from a tree.
   Bexpression*
@@ -326,6 +364,10 @@
   make_type(tree t)
   { return new Btype(t); }
 
+  Bfunction*
+  make_function(tree t)
+  { return new Bfunction(t); }
+
   Btype*
   fill_in_struct(Btype*, const std::vector<Btyped_identifier>&);
 
@@ -848,6 +890,113 @@
   return tree_to_expr(ret);
 }
 
+// An expression that references a variable.
+
+Bexpression*
+Gcc_backend::var_expression(Bvariable* var, Location)
+{
+  tree ret = var->get_tree();
+  if (ret == error_mark_node)
+    return this->error_expression();
+  return tree_to_expr(ret);
+}
+
+// An expression that indirectly references an expression.
+
+Bexpression*
+Gcc_backend::indirect_expression(Bexpression* expr, bool known_valid,
+                                 Location location)
+{
+  tree ret = build_fold_indirect_ref_loc(location.gcc_location(),
+                                         expr->get_tree());
+  if (known_valid)
+    TREE_THIS_NOTRAP(ret) = 1;
+  return tree_to_expr(ret);
+}
+
+// Return a typed value as a constant integer.
+
+Bexpression*
+Gcc_backend::integer_constant_expression(Btype* btype, mpz_t val)
+{
+  tree t = btype->get_tree();
+  if (t == error_mark_node)
+    return this->error_expression();
+
+  tree ret = double_int_to_tree(t, mpz_get_double_int(t, val, true));
+  return tree_to_expr(ret);
+}
+
+// Return a typed value as a constant floating-point number.
+
+Bexpression*
+Gcc_backend::float_constant_expression(Btype* btype, mpfr_t val)
+{
+  tree t = btype->get_tree();
+  tree ret;
+  if (t == error_mark_node)
+    return this->error_expression();
+
+  REAL_VALUE_TYPE r1;
+  real_from_mpfr(&r1, val, t, GMP_RNDN);
+  REAL_VALUE_TYPE r2;
+  real_convert(&r2, TYPE_MODE(t), &r1);
+  ret = build_real(t, r2);
+  return tree_to_expr(ret);
+}
+
+// Return a typed real and imaginary value as a constant complex number.
+
+Bexpression*
+Gcc_backend::complex_constant_expression(Btype* btype, mpfr_t real, mpfr_t imag)
+{
+  tree t = btype->get_tree();
+  tree ret;
+  if (t == error_mark_node)
+    return this->error_expression();
+
+  REAL_VALUE_TYPE r1;
+  real_from_mpfr(&r1, real, TREE_TYPE(t), GMP_RNDN);
+  REAL_VALUE_TYPE r2;
+  real_convert(&r2, TYPE_MODE(TREE_TYPE(t)), &r1);
+
+  REAL_VALUE_TYPE r3;
+  real_from_mpfr(&r3, imag, TREE_TYPE(t), GMP_RNDN);
+  REAL_VALUE_TYPE r4;
+  real_convert(&r4, TYPE_MODE(TREE_TYPE(t)), &r3);
+
+  ret = build_complex(t, build_real(TREE_TYPE(t), r2),
+                      build_real(TREE_TYPE(t), r4));
+  return tree_to_expr(ret);
+}
+
+// An expression that converts an expression to a different type.
+
+Bexpression*
+Gcc_backend::convert_expression(Btype* type, Bexpression* expr, Location)
+{
+  tree type_tree = type->get_tree();
+  tree expr_tree = expr->get_tree();
+  if (type_tree == error_mark_node || expr_tree == error_mark_node)
+    return this->error_expression();
+
+  tree ret = fold_convert(type_tree, expr_tree);
+  return tree_to_expr(ret);
+}
+
+// Get the address of a function.
+
+Bexpression*
+Gcc_backend::function_code_expression(Bfunction* bfunc, Location location)
+{
+  tree func = bfunc->get_tree();
+  if (func == error_mark_node)
+    return this->error_expression();
+
+  tree ret = build_fold_addr_expr_loc(location.gcc_location(), func);
+  return this->make_expression(ret);
+}
+
 // An expression as a statement.
 
 Bstatement*
@@ -1606,6 +1755,56 @@
   return this->make_expression(ret);
 }
 
+// Declare or define a new function.
+
+Bfunction*
+Gcc_backend::function(Btype* fntype, const std::string& name,
+                      const std::string& asm_name, bool is_visible,
+                      bool is_declaration, bool is_inlinable,
+                      bool disable_split_stack, bool in_unique_section,
+                      Location location)
+{
+  tree functype = fntype->get_tree();
+  if (functype != error_mark_node)
+    {
+      gcc_assert(FUNCTION_POINTER_TYPE_P(functype));
+      functype = TREE_TYPE(functype);
+    }
+  tree id = get_identifier_from_string(name);
+  if (functype == error_mark_node || id == error_mark_node)
+    return this->error_function();
+
+  tree decl = build_decl(location.gcc_location(), FUNCTION_DECL, id, functype);
+  if (!asm_name.empty())
+    SET_DECL_ASSEMBLER_NAME(decl, get_identifier_from_string(asm_name));
+  if (is_visible)
+    TREE_PUBLIC(decl) = 1;
+  if (is_declaration)
+    DECL_EXTERNAL(decl) = 1;
+  else
+    {
+      tree restype = TREE_TYPE(functype);
+      tree resdecl =
+          build_decl(location.gcc_location(), RESULT_DECL, NULL_TREE, restype);
+      DECL_ARTIFICIAL(resdecl) = 1;
+      DECL_IGNORED_P(resdecl) = 1;
+      DECL_CONTEXT(resdecl) = decl;
+      DECL_RESULT(decl) = resdecl;
+    }
+  if (!is_inlinable)
+    DECL_UNINLINABLE(decl) = 1;
+  if (disable_split_stack)
+    {
+      tree attr = get_identifier("__no_split_stack__");
+      DECL_ATTRIBUTES(decl) = tree_cons(attr, NULL_TREE, NULL_TREE);
+    }
+  if (in_unique_section)
+    resolve_unique_section(decl, 0, 1);
+
+  go_preserve_from_gc(decl);
+  return new Bfunction(decl);
+}
+
 // The single backend.
 
 static Gcc_backend gcc_backend;
@@ -1681,3 +1880,9 @@
 {
   return bv->get_tree();
 }
+
+tree
+function_to_tree(Bfunction* bf)
+{
+  return bf->get_tree();
+}
diff --git a/gcc/go/gofrontend/backend.h b/gcc/go/gofrontend/backend.h
index ac29b03..ca997f0 100644
--- a/gcc/go/gofrontend/backend.h
+++ b/gcc/go/gofrontend/backend.h
@@ -7,6 +7,9 @@
 #ifndef GO_BACKEND_H
 #define GO_BACKEND_H
 
+#include <gmp.h>
+#include <mpfr.h>
+
 // Pointers to these types are created by the backend, passed to the
 // frontend, and passed back to the backend.  The types must be
 // defined by the backend using these names.
@@ -20,7 +23,7 @@
 // The backend representation of a statement.
 class Bstatement;
 
-// The backend representation of a function definition.
+// The backend representation of a function definition or declaration.
 class Bfunction;
 
 // The backend representation of a block.
@@ -231,6 +234,43 @@
   virtual Bexpression*
   zero_expression(Btype*) = 0;
 
+  // Create an error expression. This is used for cases which should
+  // not occur in a correct program, in order to keep the compilation
+  // going without crashing.
+  virtual Bexpression*
+  error_expression() = 0;
+
+  // Create a reference to a variable.
+  virtual Bexpression*
+  var_expression(Bvariable* var, Location) = 0;
+
+  // Create an expression that indirects through the pointer expression EXPR
+  // (i.e., return the expression for *EXPR). KNOWN_VALID is true if the pointer
+  // is known to point to a valid memory location.
+  virtual Bexpression*
+  indirect_expression(Bexpression* expr, bool known_valid, Location) = 0;
+
+  // Return an expression for the multi-precision integer VAL in BTYPE.
+  virtual Bexpression*
+  integer_constant_expression(Btype* btype, mpz_t val) = 0;
+
+  // Return an expression for the floating point value VAL in BTYPE.
+  virtual Bexpression*
+  float_constant_expression(Btype* btype, mpfr_t val) = 0;
+
+  // Return an expression for the complex value REAL/IMAG in BTYPE.
+  virtual Bexpression*
+  complex_constant_expression(Btype* btype, mpfr_t real, mpfr_t imag) = 0;
+
+  // Return an expression that converts EXPR to TYPE.
+  virtual Bexpression*
+  convert_expression(Btype* type, Bexpression* expr, Location) = 0;
+
+  // Create an expression for the address of a function.  This is used to
+  // get the address of the code for a function.
+  virtual Bexpression*
+  function_code_expression(Bfunction*, Location) = 0;
+
   // Statements.
 
   // Create an error statement.  This is used for cases which should
@@ -463,6 +503,32 @@
   // recover.
   virtual Bexpression*
   label_address(Blabel*, Location) = 0;
+
+  // Functions.
+
+  // Create an error function.  This is used for cases which should
+  // not occur in a correct program, in order to keep the compilation
+  // going without crashing.
+  virtual Bfunction*
+  error_function() = 0;
+
+  // Declare or define a function of FNTYPE.
+  // NAME is the Go name of the function. ASM_NAME, if not the empty string, is
+  // the name that should be used in the symbol table; this will be non-empty if
+  // a magic extern comment is used.
+  // IS_VISIBLE is true if this function should be visible outside of the
+  // current compilation unit. IS_DECLARATION is true if this is a function
+  // declaration rather than a definition; the function definition will be in
+  // another compilation unit.
+  // IS_INLINABLE is true if the function can be inlined.
+  // DISABLE_SPLIT_STACK is true if this function may not split the stack; this
+  // is used for the implementation of recover.
+  // IN_UNIQUE_SECTION is true if this function should be put into a unique
+  // location if possible; this is used for field tracking.
+  virtual Bfunction*
+  function(Btype* fntype, const std::string& name, const std::string& asm_name,
+           bool is_visible, bool is_declaration, bool is_inlinable,
+           bool disable_split_stack, bool in_unique_section, Location) = 0;
 };
 
 // The backend interface has to define this function.
@@ -482,5 +548,6 @@
 extern tree stat_to_tree(Bstatement*);
 extern tree block_to_tree(Bblock*);
 extern tree var_to_tree(Bvariable*);
+extern tree function_to_tree(Bfunction*);
 
 #endif // !defined(GO_BACKEND_H)
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc
index 0b01033..6ba351e 100644
--- a/gcc/go/gofrontend/expressions.cc
+++ b/gcc/go/gofrontend/expressions.cc
@@ -610,102 +610,57 @@
   return this->do_get_tree(context);
 }
 
-// Return a tree for VAL in TYPE.
-
-tree
-Expression::integer_constant_tree(mpz_t val, tree type)
+// Return a backend expression for VAL.
+Bexpression*
+Expression::backend_numeric_constant_expression(Translate_context* context,
+                                                Numeric_constant* val)
 {
-  if (type == error_mark_node)
-    return error_mark_node;
-  else if (TREE_CODE(type) == INTEGER_TYPE)
-    return double_int_to_tree(type,
-			      mpz_get_double_int(type, val, true));
-  else if (TREE_CODE(type) == REAL_TYPE)
-    {
-      mpfr_t fval;
-      mpfr_init_set_z(fval, val, GMP_RNDN);
-      tree ret = Expression::float_constant_tree(fval, type);
-      mpfr_clear(fval);
-      return ret;
-    }
-  else if (TREE_CODE(type) == COMPLEX_TYPE)
-    {
-      mpfr_t fval;
-      mpfr_init_set_z(fval, val, GMP_RNDN);
-      tree real = Expression::float_constant_tree(fval, TREE_TYPE(type));
-      mpfr_clear(fval);
-      tree imag = build_real_from_int_cst(TREE_TYPE(type),
-					  integer_zero_node);
-      return build_complex(type, real, imag);
-    }
-  else
-    go_unreachable();
-}
+  Gogo* gogo = context->gogo();
+  Type* type = val->type();
+  if (type == NULL)
+    return gogo->backend()->error_expression();
 
-// Return a tree for VAL in TYPE.
-
-tree
-Expression::float_constant_tree(mpfr_t val, tree type)
-{
-  if (type == error_mark_node)
-    return error_mark_node;
-  else if (TREE_CODE(type) == INTEGER_TYPE)
+  Btype* btype = type->get_backend(gogo);
+  Bexpression* ret;
+  if (type->integer_type() != NULL)
     {
       mpz_t ival;
-      mpz_init(ival);
-      mpfr_get_z(ival, val, GMP_RNDN);
-      tree ret = Expression::integer_constant_tree(ival, type);
+      if (!val->to_int(&ival))
+        {
+          go_assert(saw_errors());
+          return gogo->backend()->error_expression();
+        }
+      ret = gogo->backend()->integer_constant_expression(btype, ival);
       mpz_clear(ival);
-      return ret;
     }
-  else if (TREE_CODE(type) == REAL_TYPE)
+  else if (type->float_type() != NULL)
     {
-      REAL_VALUE_TYPE r1;
-      real_from_mpfr(&r1, val, type, GMP_RNDN);
-      REAL_VALUE_TYPE r2;
-      real_convert(&r2, TYPE_MODE(type), &r1);
-      return build_real(type, r2);
+      mpfr_t fval;
+      if (!val->to_float(&fval))
+        {
+          go_assert(saw_errors());
+          return gogo->backend()->error_expression();
+        }
+      ret = gogo->backend()->float_constant_expression(btype, fval);
+      mpfr_clear(fval);
     }
-  else if (TREE_CODE(type) == COMPLEX_TYPE)
+  else if (type->complex_type() != NULL)
     {
-      REAL_VALUE_TYPE r1;
-      real_from_mpfr(&r1, val, TREE_TYPE(type), GMP_RNDN);
-      REAL_VALUE_TYPE r2;
-      real_convert(&r2, TYPE_MODE(TREE_TYPE(type)), &r1);
-      tree imag = build_real_from_int_cst(TREE_TYPE(type),
-					  integer_zero_node);
-      return build_complex(type, build_real(TREE_TYPE(type), r2), imag);
+      mpfr_t real;
+      mpfr_t imag;
+      if (!val->to_complex(&real, &imag))
+        {
+          go_assert(saw_errors());
+          return gogo->backend()->error_expression();
+        }
+      ret = gogo->backend()->complex_constant_expression(btype, real, imag);
+      mpfr_clear(real);
+      mpfr_clear(imag);
     }
   else
     go_unreachable();
-}
 
-// Return a tree for REAL/IMAG in TYPE.
-
-tree
-Expression::complex_constant_tree(mpfr_t real, mpfr_t imag, tree type)
-{
-  if (type == error_mark_node)
-    return error_mark_node;
-  else if (TREE_CODE(type) == INTEGER_TYPE || TREE_CODE(type) == REAL_TYPE)
-    return Expression::float_constant_tree(real, type);
-  else if (TREE_CODE(type) == COMPLEX_TYPE)
-    {
-      REAL_VALUE_TYPE r1;
-      real_from_mpfr(&r1, real, TREE_TYPE(type), GMP_RNDN);
-      REAL_VALUE_TYPE r2;
-      real_convert(&r2, TYPE_MODE(TREE_TYPE(type)), &r1);
-
-      REAL_VALUE_TYPE r3;
-      real_from_mpfr(&r3, imag, TREE_TYPE(type), GMP_RNDN);
-      REAL_VALUE_TYPE r4;
-      real_convert(&r4, TYPE_MODE(TREE_TYPE(type)), &r3);
-
-      return build_complex(type, build_real(TREE_TYPE(type), r2),
-			   build_real(TREE_TYPE(type), r4));
-    }
-  else
-    go_unreachable();
+  return ret;
 }
 
 // Return a tree which evaluates to true if VAL, of arbitrary integer
@@ -978,22 +933,19 @@
 {
   Bvariable* bvar = this->variable_->get_backend_variable(context->gogo(),
 							  context->function());
-  tree ret = var_to_tree(bvar);
-  if (ret == error_mark_node)
-    return error_mark_node;
   bool is_in_heap;
+  Location loc = this->location();
   if (this->variable_->is_variable())
     is_in_heap = this->variable_->var_value()->is_in_heap();
   else if (this->variable_->is_result_variable())
     is_in_heap = this->variable_->result_var_value()->is_in_heap();
   else
     go_unreachable();
+
+  Bexpression* ret = context->backend()->var_expression(bvar, loc);
   if (is_in_heap)
-    {
-      ret = build_fold_indirect_ref_loc(this->location().gcc_location(), ret);
-      TREE_THIS_NOTRAP(ret) = 1;
-    }
-  return ret;
+    ret = context->backend()->indirect_expression(ret, true, loc);
+  return expr_to_tree(ret);
 }
 
 // Ast dump for variable expression.
@@ -1043,23 +995,24 @@
 tree
 Temporary_reference_expression::do_get_tree(Translate_context* context)
 {
+  Gogo* gogo = context->gogo();
   Bvariable* bvar = this->statement_->get_backend_variable(context);
+  Bexpression* ret = gogo->backend()->var_expression(bvar, this->location());
 
-  // The gcc backend can't represent the same set of recursive types
+  // The backend can't always represent the same set of recursive types
   // that the Go frontend can.  In some cases this means that a
   // temporary variable won't have the right backend type.  Correct
   // that here by adding a type cast.  We need to use base() to push
   // the circularity down one level.
-  tree ret = var_to_tree(bvar);
+  Type* stype = this->statement_->type();
   if (!this->is_lvalue_
-      && POINTER_TYPE_P(TREE_TYPE(ret))
-      && VOID_TYPE_P(TREE_TYPE(TREE_TYPE(ret))))
+      && stype->has_pointer()
+      && stype->deref()->is_void_type())
     {
-      Btype* type_btype = this->type()->base()->get_backend(context->gogo());
-      tree type_tree = type_to_tree(type_btype);
-      ret = fold_convert_loc(this->location().gcc_location(), type_tree, ret);
+      Btype* btype = this->type()->base()->get_backend(gogo);
+      ret = gogo->backend()->convert_expression(btype, ret, this->location());
     }
-  return ret;
+  return expr_to_tree(ret);
 }
 
 // Ast dump for temporary reference.
@@ -1266,7 +1219,7 @@
 
 // Get the tree for the code of a function expression.
 
-tree
+Bexpression*
 Func_expression::get_code_pointer(Gogo* gogo, Named_object* no, Location loc)
 {
   Function_type* fntype;
@@ -1284,25 +1237,18 @@
       error_at(loc,
 	       "invalid use of special builtin function %qs; must be called",
 	       no->message_name().c_str());
-      return error_mark_node;
+      return gogo->backend()->error_expression();
     }
 
-  tree id = no->get_id(gogo);
-  if (id == error_mark_node)
-    return error_mark_node;
-
-  tree fndecl;
+  Bfunction* fndecl;
   if (no->is_function())
-    fndecl = no->func_value()->get_or_make_decl(gogo, no, id);
+    fndecl = no->func_value()->get_or_make_decl(gogo, no);
   else if (no->is_function_declaration())
-    fndecl = no->func_declaration_value()->get_or_make_decl(gogo, no, id);
+    fndecl = no->func_declaration_value()->get_or_make_decl(gogo, no);
   else
     go_unreachable();
 
-  if (fndecl == error_mark_node)
-    return error_mark_node;
-
-  return build_fold_addr_expr_loc(loc.gcc_location(), fndecl);
+  return gogo->backend()->function_code_expression(fndecl, loc);
 }
 
 // Get the tree for a function expression.  This is used when we take
@@ -1539,8 +1485,10 @@
 tree
 Func_code_reference_expression::do_get_tree(Translate_context* context)
 {
-  return Func_expression::get_code_pointer(context->gogo(), this->function_,
-					   this->location());
+  Bexpression* ret =
+      Func_expression::get_code_pointer(context->gogo(), this->function_,
+                                        this->location());
+  return expr_to_tree(ret);
 }
 
 // Make a reference to the code of a function.
@@ -2001,21 +1949,18 @@
 tree
 Integer_expression::do_get_tree(Translate_context* context)
 {
-  Gogo* gogo = context->gogo();
-  tree type;
+  Type* resolved_type = NULL;
   if (this->type_ != NULL && !this->type_->is_abstract())
-    type = type_to_tree(this->type_->get_backend(gogo));
+    resolved_type = this->type_;
   else if (this->type_ != NULL && this->type_->float_type() != NULL)
     {
       // We are converting to an abstract floating point type.
-      Type* ftype = Type::lookup_float_type("float64");
-      type = type_to_tree(ftype->get_backend(gogo));
+      resolved_type = Type::lookup_float_type("float64");
     }
   else if (this->type_ != NULL && this->type_->complex_type() != NULL)
     {
       // We are converting to an abstract complex type.
-      Type* ctype = Type::lookup_complex_type("complex128");
-      type = type_to_tree(ctype->get_backend(gogo));
+      resolved_type = Type::lookup_complex_type("complex128");
     }
   else
     {
@@ -2026,16 +1971,23 @@
       int bits = mpz_sizeinbase(this->val_, 2);
       Type* int_type = Type::lookup_integer_type("int");
       if (bits < int_type->integer_type()->bits())
-	type = type_to_tree(int_type->get_backend(gogo));
+	resolved_type = int_type;
       else if (bits < 64)
-	{
-	  Type* t = Type::lookup_integer_type("int64");
-	  type = type_to_tree(t->get_backend(gogo));
-	}
+        resolved_type = Type::lookup_integer_type("int64");
       else
-	type = long_long_integer_type_node;
+        {
+          if (!saw_errors())
+            error_at(this->location(),
+                     "unknown type for large integer constant");
+          Bexpression* ret = context->gogo()->backend()->error_expression();
+          return expr_to_tree(ret);
+        }
     }
-  return Expression::integer_constant_tree(this->val_, type);
+  Numeric_constant nc;
+  nc.set_int(resolved_type, this->val_);
+  Bexpression* ret =
+      Expression::backend_numeric_constant_expression(context, &nc);
+  return expr_to_tree(ret);
 }
 
 // Write VAL to export data.
@@ -2289,24 +2241,32 @@
 tree
 Float_expression::do_get_tree(Translate_context* context)
 {
-  Gogo* gogo = context->gogo();
-  tree type;
+  Type* resolved_type;
   if (this->type_ != NULL && !this->type_->is_abstract())
-    type = type_to_tree(this->type_->get_backend(gogo));
+    resolved_type = this->type_;
   else if (this->type_ != NULL && this->type_->integer_type() != NULL)
     {
       // We have an abstract integer type.  We just hope for the best.
-      type = type_to_tree(Type::lookup_integer_type("int")->get_backend(gogo));
+      resolved_type = Type::lookup_integer_type("int");
+    }
+  else if (this->type_ != NULL && this->type_->complex_type() != NULL)
+    {
+      // We are converting to an abstract complex type.
+      resolved_type = Type::lookup_complex_type("complex128");
     }
   else
     {
       // If we still have an abstract type here, then this is being
       // used in a constant expression which didn't get reduced.  We
       // just use float64 and hope for the best.
-      Type* ft = Type::lookup_float_type("float64");
-      type = type_to_tree(ft->get_backend(gogo));
+      resolved_type = Type::lookup_float_type("float64");
     }
-  return Expression::float_constant_tree(this->val_, type);
+
+  Numeric_constant nc;
+  nc.set_float(resolved_type, this->val_);
+  Bexpression* ret =
+      Expression::backend_numeric_constant_expression(context, &nc);
+  return expr_to_tree(ret);
 }
 
 // Write a floating point number to a string dump.
@@ -2466,19 +2426,32 @@
 tree
 Complex_expression::do_get_tree(Translate_context* context)
 {
-  Gogo* gogo = context->gogo();
-  tree type;
+  Type* resolved_type;
   if (this->type_ != NULL && !this->type_->is_abstract())
-    type = type_to_tree(this->type_->get_backend(gogo));
+    resolved_type = this->type_;
+  else if (this->type_ != NULL && this->type_->integer_type() != NULL)
+    {
+      // We are converting to an abstract integer type.
+      resolved_type = Type::lookup_integer_type("int");
+    }
+  else if (this->type_ != NULL && this->type_->float_type() != NULL)
+    {
+      // We are converting to an abstract float type.
+      resolved_type = Type::lookup_float_type("float64");
+    }
   else
     {
       // If we still have an abstract type here, this this is being
       // used in a constant expression which didn't get reduced.  We
       // just use complex128 and hope for the best.
-      Type* ct = Type::lookup_complex_type("complex128");
-      type = type_to_tree(ct->get_backend(gogo));
+      resolved_type = Type::lookup_complex_type("complex128");
     }
-  return Expression::complex_constant_tree(this->real_, this->imag_, type);
+
+  Numeric_constant nc;
+  nc.set_complex(resolved_type, this->real_, this->imag_);
+  Bexpression* ret =
+      Expression::backend_numeric_constant_expression(context, &nc);
+  return expr_to_tree(ret);
 }
 
 // Write REAL/IMAG to export data.
@@ -3077,8 +3050,7 @@
   do_lower(Gogo*, Named_object*, Statement_inserter*, int);
 
   bool
-  do_is_constant() const
-  { return this->expr_->is_constant(); }
+  do_is_constant() const;
 
   bool
   do_numeric_constant_value(Numeric_constant*) const;
@@ -3220,6 +3192,27 @@
   return this;
 }
 
+// Return whether a type conversion is a constant.
+
+bool
+Type_conversion_expression::do_is_constant() const
+{
+  if (!this->expr_->is_constant())
+    return false;
+
+  // A conversion to a type that may not be used as a constant is not
+  // a constant.  For example, []byte(nil).
+  Type* type = this->type_;
+  if (type->integer_type() == NULL
+      && type->float_type() == NULL
+      && type->complex_type() == NULL
+      && !type->is_boolean_type()
+      && !type->is_string_type())
+    return false;
+
+  return true;
+}
+
 // Return the constant numeric value if there is one.
 
 bool
@@ -5608,6 +5601,15 @@
       subcontext.type = NULL;
     }
 
+  if (this->op_ == OPERATOR_ANDAND || this->op_ == OPERATOR_OROR)
+    {
+      // For a logical operation, the context does not determine the
+      // types of the operands.  The operands must be some boolean
+      // type but if the context has a boolean type they do not
+      // inherit it.  See http://golang.org/issue/3924.
+      subcontext.type = NULL;
+    }
+
   // Set the context for the left hand operand.
   if (is_shift_op)
     {
@@ -5989,6 +5991,43 @@
 				right);
     }
 
+  // For complex division Go wants slightly different results than the
+  // GCC library provides, so we have our own runtime routine.
+  if (this->op_ == OPERATOR_DIV && this->left_->type()->complex_type() != NULL)
+    {
+      const char *name;
+      tree *pdecl;
+      Type* ctype;
+      static tree complex64_div_decl;
+      static tree complex128_div_decl;
+      switch (this->left_->type()->complex_type()->bits())
+	{
+	case 64:
+	  name = "__go_complex64_div";
+	  pdecl = &complex64_div_decl;
+	  ctype = Type::lookup_complex_type("complex64");
+	  break;
+	case 128:
+	  name = "__go_complex128_div";
+	  pdecl = &complex128_div_decl;
+	  ctype = Type::lookup_complex_type("complex128");
+	  break;
+	default:
+	  go_unreachable();
+	}
+      Btype* cbtype = ctype->get_backend(gogo);
+      tree ctype_tree = type_to_tree(cbtype);
+      return Gogo::call_builtin(pdecl,
+				this->location(),
+				name,
+				2,
+				ctype_tree,
+				ctype_tree,
+				fold_convert_loc(gccloc, ctype_tree, left),
+				type,
+				fold_convert_loc(gccloc, ctype_tree, right));
+    }
+
   tree compute_type = excess_precision_type(type);
   if (compute_type != NULL_TREE)
     {
@@ -7213,6 +7252,15 @@
   if (this->code_ == BUILTIN_OFFSETOF)
     {
       Expression* arg = this->one_arg();
+
+      if (arg->bound_method_expression() != NULL
+	  || arg->interface_field_reference_expression() != NULL)
+	{
+	  this->report_error(_("invalid use of method value as argument "
+			       "of Offsetof"));
+	  return this;
+	}
+
       Field_reference_expression* farg = arg->field_reference_expression();
       while (farg != NULL)
 	{
@@ -7222,7 +7270,8 @@
 	  // it must not be reached through pointer indirections.
 	  if (farg->expr()->deref() != farg->expr())
 	    {
-	      this->report_error(_("argument of Offsetof implies indirection of an embedded field"));
+	      this->report_error(_("argument of Offsetof implies "
+				   "indirection of an embedded field"));
 	      return this;
 	    }
 	  // Go up until we reach the original base.
@@ -7498,7 +7547,7 @@
       switch (nc.to_unsigned_long(&v))
 	{
 	case Numeric_constant::NC_UL_VALID:
-	  return true;
+	  break;
 	case Numeric_constant::NC_UL_NOTINT:
 	  error_at(e->location(), "non-integer %s argument to make",
 		   is_length ? "len" : "cap");
@@ -7510,8 +7559,23 @@
 	case Numeric_constant::NC_UL_BIG:
 	  // We don't want to give a compile-time error for a 64-bit
 	  // value on a 32-bit target.
-	  return true;
+	  break;
 	}
+
+      mpz_t val;
+      if (!nc.to_int(&val))
+	go_unreachable();
+      int bits = mpz_sizeinbase(val, 2);
+      mpz_clear(val);
+      Type* int_type = Type::lookup_integer_type("int");
+      if (bits >= int_type->integer_type()->bits())
+	{
+	  error_at(e->location(), "%s argument too large for make",
+		   is_length ? "len" : "cap");
+	  return false;
+	}
+
+      return true;
     }
 
   if (e->type()->integer_type() != NULL)
@@ -7617,6 +7681,8 @@
 bool
 Builtin_call_expression::do_is_constant() const
 {
+  if (this->is_error_expression())
+    return true;
   switch (this->code_)
     {
     case BUILTIN_LEN:
@@ -7752,8 +7818,6 @@
 	return false;
       if (arg_type->is_abstract())
 	return false;
-      if (arg_type->named_type() != NULL)
-	arg_type->named_type()->convert(this->gogo_);
 
       unsigned int ret;
       if (this->code_ == BUILTIN_SIZEOF)
@@ -9768,14 +9832,8 @@
     }
 
   tree fntype_tree = type_to_tree(fntype->get_backend(gogo));
-  if (fntype_tree == error_mark_node)
-    return error_mark_node;
-  go_assert(POINTER_TYPE_P(fntype_tree));
-  if (TREE_TYPE(fntype_tree) == error_mark_node)
-    return error_mark_node;
-  go_assert(TREE_CODE(TREE_TYPE(fntype_tree)) == RECORD_TYPE);
-  tree fnfield_type = TREE_TYPE(TYPE_FIELDS(TREE_TYPE(fntype_tree)));
-  if (fnfield_type == error_mark_node)
+  tree fnfield_type = type_to_tree(fntype->get_backend_fntype(gogo));
+  if (fntype_tree == error_mark_node || fnfield_type == error_mark_node)
     return error_mark_node;
   go_assert(FUNCTION_POINTER_TYPE_P(fnfield_type));
   tree rettype = TREE_TYPE(TREE_TYPE(fnfield_type));
@@ -9787,7 +9845,7 @@
   if (func != NULL)
     {
       Named_object* no = func->named_object();
-      fn = Func_expression::get_code_pointer(gogo, no, location);
+      fn = expr_to_tree(Func_expression::get_code_pointer(gogo, no, location));
       if (!has_closure)
 	closure_tree = NULL_TREE;
       else
@@ -10841,11 +10899,20 @@
 void
 String_index_expression::do_check_types(Gogo*)
 {
-  if (this->start_->type()->integer_type() == NULL)
+  Numeric_constant nc;
+  unsigned long v;
+  if (this->start_->type()->integer_type() == NULL
+      && !this->start_->type()->is_error()
+      && (!this->start_->numeric_constant_value(&nc)
+	  || nc.to_unsigned_long(&v) == Numeric_constant::NC_UL_NOTINT))
     this->report_error(_("index must be integer"));
   if (this->end_ != NULL
       && this->end_->type()->integer_type() == NULL
-      && !this->end_->is_nil_expression())
+      && !this->end_->type()->is_error()
+      && !this->end_->is_nil_expression()
+      && !this->end_->is_error_expression()
+      && (!this->end_->numeric_constant_value(&nc)
+	  || nc.to_unsigned_long(&v) == Numeric_constant::NC_UL_NOTINT))
     this->report_error(_("slice end must be integer"));
 
   std::string sval;
@@ -11317,7 +11384,7 @@
     }
 
   Expression* e = Expression::make_composite_literal(array_type, 0, false,
-						     bytes, loc);
+						     bytes, false, loc);
 
   Variable* var = new Variable(array_type, e, true, false, false, loc);
 
@@ -13260,9 +13327,11 @@
 {
  public:
   Composite_literal_expression(Type* type, int depth, bool has_keys,
-			       Expression_list* vals, Location location)
+			       Expression_list* vals, bool all_are_names,
+			       Location location)
     : Parser_expression(EXPRESSION_COMPOSITE_LITERAL, location),
-      type_(type), depth_(depth), vals_(vals), has_keys_(has_keys)
+      type_(type), depth_(depth), vals_(vals), has_keys_(has_keys),
+      all_are_names_(all_are_names)
   { }
 
  protected:
@@ -13280,6 +13349,7 @@
 					    (this->vals_ == NULL
 					     ? NULL
 					     : this->vals_->copy()),
+					    this->all_are_names_,
 					    this->location());
   }
 
@@ -13309,6 +13379,9 @@
   // If this is true, then VALS_ is a list of pairs: a key and a
   // value.  In an array initializer, a missing key will be NULL.
   bool has_keys_;
+  // If this is true, then HAS_KEYS_ is true, and every key is a
+  // simple identifier.
+  bool all_are_names_;
 };
 
 // Traversal.
@@ -13411,6 +13484,8 @@
   std::vector<Expression*> vals(field_count);
   std::vector<int>* traverse_order = new(std::vector<int>);
   Expression_list::const_iterator p = this->vals_->begin();
+  Expression* external_expr = NULL;
+  const Named_object* external_no = NULL;
   while (p != this->vals_->end())
     {
       Expression* name_expr = *p;
@@ -13516,6 +13591,12 @@
 
       if (no != NULL)
 	{
+	  if (no->package() != NULL && external_expr == NULL)
+	    {
+	      external_expr = name_expr;
+	      external_no = no;
+	    }
+
 	  name = no->name();
 
 	  // A predefined name won't be packed.  If it starts with a
@@ -13565,6 +13646,23 @@
       traverse_order->push_back(index);
     }
 
+  if (!this->all_are_names_)
+    {
+      // This is a weird case like bug462 in the testsuite.
+      if (external_expr == NULL)
+	error_at(this->location(), "unknown field in %qs literal",
+		 (type->named_type() != NULL
+		  ? type->named_type()->message_name().c_str()
+		  : "unnamed struct"));
+      else
+	error_at(external_expr->location(), "unknown field %qs in %qs",
+		 external_no->message_name().c_str(),
+		 (type->named_type() != NULL
+		  ? type->named_type()->message_name().c_str()
+		  : "unnamed struct"));
+      return Expression::make_error(location);
+    }
+
   Expression_list* list = new Expression_list;
   list->reserve(field_count);
   for (size_t i = 0; i < field_count; ++i)
@@ -13854,11 +13952,11 @@
 
 Expression*
 Expression::make_composite_literal(Type* type, int depth, bool has_keys,
-				   Expression_list* vals,
+				   Expression_list* vals, bool all_are_names,
 				   Location location)
 {
   return new Composite_literal_expression(type, depth, has_keys, vals,
-					  location);
+					  all_are_names, location);
 }
 
 // Return whether this expression is a composite literal.
diff --git a/gcc/go/gofrontend/expressions.h b/gcc/go/gofrontend/expressions.h
index 95584f2..35bfcfe 100644
--- a/gcc/go/gofrontend/expressions.h
+++ b/gcc/go/gofrontend/expressions.h
@@ -291,10 +291,13 @@
   make_unsafe_cast(Type*, Expression*, Location);
 
   // Make a composite literal.  The DEPTH parameter is how far down we
-  // are in a list of composite literals with omitted types.
+  // are in a list of composite literals with omitted types.  HAS_KEYS
+  // is true if the expression list has keys alternating with values.
+  // ALL_ARE_NAMES is true if all the keys could be struct field
+  // names.
   static Expression*
   make_composite_literal(Type*, int depth, bool has_keys, Expression_list*,
-			 Location);
+			 bool all_are_names, Location);
 
   // Make a struct composite literal.
   static Expression*
@@ -652,17 +655,10 @@
 		  Type* left_type, tree left_tree, Type* right_type,
 		  tree right_tree, Location);
 
-  // Return a tree for the multi-precision integer VAL in TYPE.
-  static tree
-  integer_constant_tree(mpz_t val, tree type);
-
-  // Return a tree for the floating point value VAL in TYPE.
-  static tree
-  float_constant_tree(mpfr_t val, tree type);
-
-  // Return a tree for the complex value REAL/IMAG in TYPE.
-  static tree
-  complex_constant_tree(mpfr_t real, mpfr_t imag, tree type);
+  // Return the backend expression for the numeric constant VAL.
+  static Bexpression*
+  backend_numeric_constant_expression(Translate_context*,
+                                      Numeric_constant* val);
 
   // Export the expression.  This is only used for constants.  It will
   // be used for things like values of named constants and sizes of
@@ -1518,8 +1514,8 @@
   closure()
   { return this->closure_; }
 
-  // Return a tree for the code for a function.
-  static tree
+  // Return a backend expression for the code of a function.
+  static Bexpression*
   get_code_pointer(Gogo*, Named_object* function, Location loc);
 
  protected:
diff --git a/gcc/go/gofrontend/gogo-tree.cc b/gcc/go/gofrontend/gogo-tree.cc
index 69797f9..ca80869 100644
--- a/gcc/go/gofrontend/gogo-tree.cc
+++ b/gcc/go/gofrontend/gogo-tree.cc
@@ -985,64 +985,6 @@
   delete[] vec;
 }
 
-// Get a tree for the identifier for a named object.
-
-tree
-Named_object::get_id(Gogo* gogo)
-{
-  go_assert(!this->is_variable() && !this->is_result_variable());
-  std::string decl_name;
-  if (this->is_function_declaration()
-      && !this->func_declaration_value()->asm_name().empty())
-    decl_name = this->func_declaration_value()->asm_name();
-  else if (this->is_type()
-	   && Linemap::is_predeclared_location(this->type_value()->location()))
-    {
-      // We don't need the package name for builtin types.
-      decl_name = Gogo::unpack_hidden_name(this->name_);
-    }
-  else
-    {
-      std::string package_name;
-      if (this->package_ == NULL)
-	package_name = gogo->package_name();
-      else
-	package_name = this->package_->package_name();
-
-      decl_name = package_name + '.' + Gogo::unpack_hidden_name(this->name_);
-
-      Function_type* fntype;
-      if (this->is_function())
-	fntype = this->func_value()->type();
-      else if (this->is_function_declaration())
-	fntype = this->func_declaration_value()->type();
-      else
-	fntype = NULL;
-      if (fntype != NULL && fntype->is_method())
-	{
-	  decl_name.push_back('.');
-	  decl_name.append(fntype->receiver()->type()->mangled_name(gogo));
-	}
-    }
-  if (this->is_type())
-    {
-      unsigned int index;
-      const Named_object* in_function = this->type_value()->in_function(&index);
-      if (in_function != NULL)
-	{
-	  decl_name += '$' + Gogo::unpack_hidden_name(in_function->name());
-	  if (index > 0)
-	    {
-	      char buf[30];
-	      snprintf(buf, sizeof buf, "%u", index);
-	      decl_name += '$';
-	      decl_name += buf;
-	    }
-	}
-    }
-  return get_identifier_from_string(decl_name);
-}
-
 // Get a tree for a named object.
 
 tree
@@ -1051,11 +993,12 @@
   if (this->tree_ != NULL_TREE)
     return this->tree_;
 
-  tree name;
-  if (this->classification_ == NAMED_OBJECT_TYPE)
-    name = NULL_TREE;
-  else
-    name = this->get_id(gogo);
+  if (Gogo::is_erroneous_name(this->name_))
+    {
+      this->tree_ = error_mark_node;
+      return error_mark_node;
+    }
+
   tree decl;
   switch (this->classification_)
     {
@@ -1083,6 +1026,7 @@
 	      decl = error_mark_node;
 	    else if (INTEGRAL_TYPE_P(TREE_TYPE(expr_tree)))
 	      {
+                tree name = get_identifier_from_string(this->get_id(gogo));
 		decl = build_decl(named_constant->location().gcc_location(),
                                   CONST_DECL, name, TREE_TYPE(expr_tree));
 		DECL_INITIAL(decl) = expr_tree;
@@ -1145,7 +1089,7 @@
     case NAMED_OBJECT_FUNC:
       {
 	Function* func = this->u_.func_value;
-	decl = func->get_or_make_decl(gogo, this, name);
+	decl = function_to_tree(func->get_or_make_decl(gogo, this));
 	if (decl != error_mark_node)
 	  {
 	    if (func->block() != NULL)
@@ -1270,109 +1214,12 @@
   return block_tree;
 }
 
-// Get a tree for a function decl.
+// Get the backend representation.
 
-tree
-Function::get_or_make_decl(Gogo* gogo, Named_object* no, tree id)
+Bfunction*
+Function_declaration::get_or_make_decl(Gogo* gogo, Named_object* no)
 {
-  if (this->fndecl_ == NULL_TREE)
-    {
-      tree functype = type_to_tree(this->type_->get_backend(gogo));
-
-      if (functype != error_mark_node)
-	{
-	  // The type of a function comes back as a pointer to a
-	  // struct whose first field is the function, but we want the
-	  // real function type for a function declaration.
-	  go_assert(POINTER_TYPE_P(functype)
-		    && TREE_CODE(TREE_TYPE(functype)) == RECORD_TYPE);
-	  functype = TREE_TYPE(TYPE_FIELDS(TREE_TYPE(functype)));
-	  go_assert(FUNCTION_POINTER_TYPE_P(functype));
-	  functype = TREE_TYPE(functype);
-	}
-
-      if (functype == error_mark_node)
-	this->fndecl_ = error_mark_node;
-      else
-	{
-	  tree decl = build_decl(this->location().gcc_location(), FUNCTION_DECL,
-                                 id, functype);
-
-	  this->fndecl_ = decl;
-
-	  if (no->package() != NULL)
-	    ;
-	  else if (this->enclosing_ != NULL || Gogo::is_thunk(no))
-	    ;
-	  else if (Gogo::unpack_hidden_name(no->name()) == "init"
-		   && !this->type_->is_method())
-	    ;
-	  else if (Gogo::unpack_hidden_name(no->name()) == "main"
-		   && gogo->is_main_package())
-	    TREE_PUBLIC(decl) = 1;
-	  // Methods have to be public even if they are hidden because
-	  // they can be pulled into type descriptors when using
-	  // anonymous fields.
-	  else if (!Gogo::is_hidden_name(no->name())
-		   || this->type_->is_method())
-	    {
-	      TREE_PUBLIC(decl) = 1;
-	      std::string asm_name = gogo->pkgpath_symbol();
-	      asm_name.append(1, '.');
-	      asm_name.append(Gogo::unpack_hidden_name(no->name()));
-	      if (this->type_->is_method())
-		{
-		  asm_name.append(1, '.');
-		  Type* rtype = this->type_->receiver()->type();
-		  asm_name.append(rtype->mangled_name(gogo));
-		}
-	      SET_DECL_ASSEMBLER_NAME(decl,
-				      get_identifier_from_string(asm_name));
-	    }
-
-	  // Why do we have to do this in the frontend?
-	  tree restype = TREE_TYPE(functype);
-	  tree resdecl =
-            build_decl(this->location().gcc_location(), RESULT_DECL, NULL_TREE,
-                       restype);
-	  DECL_ARTIFICIAL(resdecl) = 1;
-	  DECL_IGNORED_P(resdecl) = 1;
-	  DECL_CONTEXT(resdecl) = decl;
-	  DECL_RESULT(decl) = resdecl;
-
-	  // If a function calls the predeclared recover function, we
-	  // can't inline it, because recover behaves differently in a
-	  // function passed directly to defer.  If this is a recover
-	  // thunk that we built to test whether a function can be
-	  // recovered, we can't inline it, because that will mess up
-	  // our return address comparison.
-	  if (this->calls_recover_ || this->is_recover_thunk_)
-	    DECL_UNINLINABLE(decl) = 1;
-
-	  // If this is a thunk created to call a function which calls
-	  // the predeclared recover function, we need to disable
-	  // stack splitting for the thunk.
-	  if (this->is_recover_thunk_)
-	    {
-	      tree attr = get_identifier("__no_split_stack__");
-	      DECL_ATTRIBUTES(decl) = tree_cons(attr, NULL_TREE, NULL_TREE);
-	    }
-
-	  if (this->in_unique_section_)
-	    resolve_unique_section (decl, 0, 1);
-
-	  go_preserve_from_gc(decl);
-	}
-    }
-  return this->fndecl_;
-}
-
-// Get a tree for a function declaration.
-
-tree
-Function_declaration::get_or_make_decl(Gogo* gogo, Named_object* no, tree id)
-{
-  if (this->fndecl_ == NULL_TREE)
+  if (this->fndecl_ == NULL)
     {
       // Let Go code use an asm declaration to pick up a builtin
       // function.
@@ -1382,58 +1229,46 @@
 	    builtin_functions.find(this->asm_name_);
 	  if (p != builtin_functions.end())
 	    {
-	      this->fndecl_ = p->second;
+	      this->fndecl_ = tree_to_function(p->second);
 	      return this->fndecl_;
 	    }
 	}
 
-      tree functype = type_to_tree(this->fntype_->get_backend(gogo));
+      std::string asm_name;
+      if (this->asm_name_.empty())
+        {
+          asm_name = (no->package() == NULL
+                                  ? gogo->pkgpath_symbol()
+                                  : no->package()->pkgpath_symbol());
+          asm_name.append(1, '.');
+          asm_name.append(Gogo::unpack_hidden_name(no->name()));
+          if (this->fntype_->is_method())
+            {
+              asm_name.append(1, '.');
+              Type* rtype = this->fntype_->receiver()->type();
+              asm_name.append(rtype->mangled_name(gogo));
+            }
+        }
 
-      if (functype != error_mark_node)
-	{
-	  // The type of a function comes back as a pointer to a
-	  // struct whose first field is the function, but we want the
-	  // real function type for a function declaration.
-	  go_assert(POINTER_TYPE_P(functype)
-		    && TREE_CODE(TREE_TYPE(functype)) == RECORD_TYPE);
-	  functype = TREE_TYPE(TYPE_FIELDS(TREE_TYPE(functype)));
-	  go_assert(FUNCTION_POINTER_TYPE_P(functype));
-	  functype = TREE_TYPE(functype);
-	}
-
-      tree decl;
-      if (functype == error_mark_node)
-	decl = error_mark_node;
-      else
-	{
-	  decl = build_decl(this->location().gcc_location(), FUNCTION_DECL, id,
-                            functype);
-	  TREE_PUBLIC(decl) = 1;
-	  DECL_EXTERNAL(decl) = 1;
-
-	  if (this->asm_name_.empty())
-	    {
-	      std::string asm_name = (no->package() == NULL
-				      ? gogo->pkgpath_symbol()
-				      : no->package()->pkgpath_symbol());
-	      asm_name.append(1, '.');
-	      asm_name.append(Gogo::unpack_hidden_name(no->name()));
-	      if (this->fntype_->is_method())
-		{
-		  asm_name.append(1, '.');
-		  Type* rtype = this->fntype_->receiver()->type();
-		  asm_name.append(rtype->mangled_name(gogo));
-		}
-	      SET_DECL_ASSEMBLER_NAME(decl,
-				      get_identifier_from_string(asm_name));
-	    }
-	}
-      this->fndecl_ = decl;
-      go_preserve_from_gc(decl);
+      Btype* functype = this->fntype_->get_backend_fntype(gogo);
+      this->fndecl_ =
+          gogo->backend()->function(functype, no->get_id(gogo), asm_name,
+                                    true, true, true, false, false,
+                                    this->location());
     }
+
   return this->fndecl_;
 }
 
+// Return the function's decl after it has been built.
+
+tree
+Function::get_decl() const
+{
+  go_assert(this->fndecl_ != NULL);
+  return function_to_tree(this->fndecl_);
+}
+
 // We always pass the receiver to a method as a pointer.  If the
 // receiver is actually declared as a non-pointer type, then we copy
 // the value into a local variable, so that it has the right type.  In
@@ -1528,7 +1363,7 @@
 void
 Function::build_tree(Gogo* gogo, Named_object* named_function)
 {
-  tree fndecl = this->fndecl_;
+  tree fndecl = this->get_decl();
   go_assert(fndecl != NULL_TREE);
 
   tree params = NULL_TREE;
@@ -1766,7 +1601,7 @@
     set = NULL_TREE;
   else
     set = fold_build2_loc(end_loc.gcc_location(), MODIFY_EXPR, void_type_node,
-			  DECL_RESULT(this->fndecl_), retval);
+			  DECL_RESULT(this->get_decl()), retval);
   tree ret_stmt = fold_build1_loc(end_loc.gcc_location(), RETURN_EXPR,
                                   void_type_node, set);
   append_to_statement_list(ret_stmt, &stmt_list);
@@ -1821,7 +1656,7 @@
       retval = this->return_value(gogo, named_function, end_loc,
 				  &stmt_list);
       set = fold_build2_loc(end_loc.gcc_location(), MODIFY_EXPR, void_type_node,
-			    DECL_RESULT(this->fndecl_), retval);
+			    DECL_RESULT(this->get_decl()), retval);
       ret_stmt = fold_build1_loc(end_loc.gcc_location(), RETURN_EXPR,
                                  void_type_node, set);
 
@@ -1839,7 +1674,7 @@
   *fini = stmt_list;
 }
 
-// Return the value to assign to DECL_RESULT(this->fndecl_).  This may
+// Return the value to assign to DECL_RESULT(this->get_decl()).  This may
 // also add statements to STMT_LIST, which need to be executed before
 // the assignment.  This is used for a return statement with no
 // explicit values.
@@ -1872,7 +1707,7 @@
     }
   else
     {
-      tree rettype = TREE_TYPE(DECL_RESULT(this->fndecl_));
+      tree rettype = TREE_TYPE(DECL_RESULT(this->get_decl()));
       retval = create_tmp_var(rettype, "RESULT");
       tree field = TYPE_FIELDS(rettype);
       int index = 0;
@@ -2293,18 +2128,14 @@
       go_assert(m != NULL);
 
       Named_object* no = m->named_object();
-
-      tree fnid = no->get_id(this);
-
-      tree fndecl;
+      Bfunction* bf;
       if (no->is_function())
-	fndecl = no->func_value()->get_or_make_decl(this, no, fnid);
+	bf = no->func_value()->get_or_make_decl(this, no);
       else if (no->is_function_declaration())
-	fndecl = no->func_declaration_value()->get_or_make_decl(this, no,
-								fnid);
+	bf = no->func_declaration_value()->get_or_make_decl(this, no);
       else
 	go_unreachable();
-      fndecl = build_fold_addr_expr(fndecl);
+      tree fndecl = build_fold_addr_expr(function_to_tree(bf));
 
       elt = pointers->quick_push(empty);
       elt->index = size_int(i);
@@ -2323,10 +2154,11 @@
   TREE_CONSTANT(decl) = 1;
   DECL_INITIAL(decl) = constructor;
 
-  // If the interface type has hidden methods, then this is the only
-  // definition of the table.  Otherwise it is a comdat table which
-  // may be defined in multiple packages.
-  if (has_hidden_methods)
+  // If the interface type has hidden methods, and the table is for a
+  // named type, then this is the only definition of the table.
+  // Otherwise it is a comdat table which may be defined in multiple
+  // packages.
+  if (has_hidden_methods && type->named_type() != NULL)
     TREE_PUBLIC(decl) = 1;
   else
     {
diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc
index be8ec59..eebb753 100644
--- a/gcc/go/gofrontend/gogo.cc
+++ b/gcc/go/gofrontend/gogo.cc
@@ -1192,6 +1192,27 @@
   this->interface_types_.push_back(itype);
 }
 
+// Return an erroneous name that indicates that an error has already
+// been reported.
+
+std::string
+Gogo::erroneous_name()
+{
+  static int erroneous_count;
+  char name[50];
+  snprintf(name, sizeof name, "$erroneous%d", erroneous_count);
+  ++erroneous_count;
+  return name;
+}
+
+// Return whether a name is an erroneous name.
+
+bool
+Gogo::is_erroneous_name(const std::string& name)
+{
+  return name.compare(0, 10, "$erroneous") == 0;
+}
+
 // Return a name for a thunk object.
 
 std::string
@@ -2367,7 +2388,7 @@
   Block* retblock = new Block(enclosing, loc);
   retblock->set_end_location(loc);
 
-  Temporary_statement* ts = Statement::make_temporary(Type::lookup_bool_type(),
+  Temporary_statement* ts = Statement::make_temporary(shortcut->type(),
 						      left, loc);
   retblock->add_statement(ts);
 
@@ -3299,7 +3320,8 @@
     closure_var_(NULL), block_(block), location_(location), labels_(),
     local_type_count_(0), descriptor_(NULL), fndecl_(NULL), defer_stack_(NULL),
     is_sink_(false), results_are_named_(false), nointerface_(false),
-    calls_recover_(false), is_recover_thunk_(false), has_recover_thunk_(false),
+    is_unnamed_type_stub_method_(false), calls_recover_(false),
+    is_recover_thunk_(false), has_recover_thunk_(false),
     in_unique_section_(false)
 {
 }
@@ -3798,6 +3820,81 @@
   *presults = results;
 }
 
+// Get the backend representation.
+
+Bfunction*
+Function::get_or_make_decl(Gogo* gogo, Named_object* no)
+{
+  if (this->fndecl_ == NULL)
+    {
+      std::string asm_name;
+      bool is_visible = false;
+      if (no->package() != NULL)
+        ;
+      else if (this->enclosing_ != NULL || Gogo::is_thunk(no))
+        ;
+      else if (Gogo::unpack_hidden_name(no->name()) == "init"
+               && !this->type_->is_method())
+        ;
+      else if (Gogo::unpack_hidden_name(no->name()) == "main"
+               && gogo->is_main_package())
+        is_visible = true;
+      // Methods have to be public even if they are hidden because
+      // they can be pulled into type descriptors when using
+      // anonymous fields.
+      else if (!Gogo::is_hidden_name(no->name())
+               || this->type_->is_method())
+        {
+	  if (!this->is_unnamed_type_stub_method_)
+	    is_visible = true;
+          std::string pkgpath = gogo->pkgpath_symbol();
+          if (this->type_->is_method()
+              && Gogo::is_hidden_name(no->name())
+              && Gogo::hidden_name_pkgpath(no->name()) != gogo->pkgpath())
+            {
+              // This is a method we created for an unexported
+              // method of an imported embedded type.  We need to
+              // use the pkgpath of the imported package to avoid
+              // a possible name collision.  See bug478 for a test
+              // case.
+              pkgpath = Gogo::hidden_name_pkgpath(no->name());
+              pkgpath = Gogo::pkgpath_for_symbol(pkgpath);
+            }
+
+          asm_name = pkgpath;
+          asm_name.append(1, '.');
+          asm_name.append(Gogo::unpack_hidden_name(no->name()));
+          if (this->type_->is_method())
+            {
+              asm_name.append(1, '.');
+              Type* rtype = this->type_->receiver()->type();
+              asm_name.append(rtype->mangled_name(gogo));
+            }
+        }
+
+      // If a function calls the predeclared recover function, we
+      // can't inline it, because recover behaves differently in a
+      // function passed directly to defer.  If this is a recover
+      // thunk that we built to test whether a function can be
+      // recovered, we can't inline it, because that will mess up
+      // our return address comparison.
+      bool is_inlinable = !(this->calls_recover_ || this->is_recover_thunk_);
+
+      // If this is a thunk created to call a function which calls
+      // the predeclared recover function, we need to disable
+      // stack splitting for the thunk.
+      bool disable_split_stack = this->is_recover_thunk_;
+
+      Btype* functype = this->type_->get_backend_fntype(gogo);
+      this->fndecl_ =
+          gogo->backend()->function(functype, no->get_id(gogo), asm_name,
+                                    is_visible, false, is_inlinable,
+                                    disable_split_stack,
+                                    this->in_unique_section_, this->location());
+    }
+  return this->fndecl_;
+}
+
 // Class Block.
 
 Block::Block(Block* enclosing, Location location)
@@ -5089,6 +5186,75 @@
     go_unreachable();
 }
 
+
+// Return the external identifier for this object.
+
+std::string
+Named_object::get_id(Gogo* gogo)
+{
+  go_assert(!this->is_variable() && !this->is_result_variable());
+  std::string decl_name;
+  if (this->is_function_declaration()
+      && !this->func_declaration_value()->asm_name().empty())
+    decl_name = this->func_declaration_value()->asm_name();
+  else if (this->is_type()
+	   && Linemap::is_predeclared_location(this->type_value()->location()))
+    {
+      // We don't need the package name for builtin types.
+      decl_name = Gogo::unpack_hidden_name(this->name_);
+    }
+  else
+    {
+      std::string package_name;
+      if (this->package_ == NULL)
+	package_name = gogo->package_name();
+      else
+	package_name = this->package_->package_name();
+
+      // Note that this will be misleading if this is an unexported
+      // method generated for an embedded imported type.  In that case
+      // the unexported method should have the package name of the
+      // package from which it is imported, but we are going to give
+      // it our package name.  Fixing this would require knowing the
+      // package name, but we only know the package path.  It might be
+      // better to use package paths here anyhow.  This doesn't affect
+      // the assembler code, because we always set that name in
+      // Function::get_or_make_decl anyhow.  FIXME.
+
+      decl_name = package_name + '.' + Gogo::unpack_hidden_name(this->name_);
+
+      Function_type* fntype;
+      if (this->is_function())
+	fntype = this->func_value()->type();
+      else if (this->is_function_declaration())
+	fntype = this->func_declaration_value()->type();
+      else
+	fntype = NULL;
+      if (fntype != NULL && fntype->is_method())
+	{
+	  decl_name.push_back('.');
+	  decl_name.append(fntype->receiver()->type()->mangled_name(gogo));
+	}
+    }
+  if (this->is_type())
+    {
+      unsigned int index;
+      const Named_object* in_function = this->type_value()->in_function(&index);
+      if (in_function != NULL)
+	{
+	  decl_name += '$' + Gogo::unpack_hidden_name(in_function->name());
+	  if (index > 0)
+	    {
+	      char buf[30];
+	      snprintf(buf, sizeof buf, "%u", index);
+	      decl_name += '$';
+	      decl_name += buf;
+	    }
+	}
+    }
+  return decl_name;
+}
+
 // Class Bindings.
 
 Bindings::Bindings(Bindings* enclosing)
diff --git a/gcc/go/gofrontend/gogo.h b/gcc/go/gofrontend/gogo.h
index 6a87f2d..31b258d 100644
--- a/gcc/go/gofrontend/gogo.h
+++ b/gcc/go/gofrontend/gogo.h
@@ -48,6 +48,7 @@
 class Bblock;
 class Bvariable;
 class Blabel;
+class Bfunction;
 
 // This file declares the basic classes used to hold the internal
 // representation of Go which is built by the parser.
@@ -387,6 +388,16 @@
   void
   mark_locals_used();
 
+  // Return a name to use for an error case.  This should only be used
+  // after reporting an error, and is used to avoid useless knockon
+  // errors.
+  static std::string
+  erroneous_name();
+
+  // Return whether the name indicates an error.
+  static bool
+  is_erroneous_name(const std::string&);
+
   // Return a name to use for a thunk function.  A thunk function is
   // one we create during the compilation, for a go statement or a
   // defer statement or a method expression.
@@ -942,6 +953,15 @@
     this->nointerface_ = true;
   }
 
+  // Record that this function is a stub method created for an unnamed
+  // type.
+  void
+  set_is_unnamed_type_stub_method()
+  {
+    go_assert(this->is_method());
+    this->is_unnamed_type_stub_method_ = true;
+  }
+
   // Add a new field to the closure variable.
   void
   add_closure_field(Named_object* var, Location loc)
@@ -1079,17 +1099,13 @@
     this->descriptor_ = descriptor;
   }
 
-  // Return the function's decl given an identifier.
-  tree
-  get_or_make_decl(Gogo*, Named_object*, tree id);
+  // Return the backend representation.
+  Bfunction*
+  get_or_make_decl(Gogo*, Named_object*);
 
   // Return the function's decl after it has been built.
   tree
-  get_decl() const
-  {
-    go_assert(this->fndecl_ != NULL);
-    return this->fndecl_;
-  }
+  get_decl() const;
 
   // Set the function decl to hold a tree of the function code.
   void
@@ -1160,7 +1176,7 @@
   // The function descriptor, if any.
   Expression* descriptor_;
   // The function decl.
-  tree fndecl_;
+  Bfunction* fndecl_;
   // The defer stack variable.  A pointer to this variable is used to
   // distinguish the defer stack for one function from another.  This
   // is NULL unless we actually need a defer stack.
@@ -1171,6 +1187,9 @@
   bool results_are_named_ : 1;
   // True if this method should not be included in the type descriptor.
   bool nointerface_ : 1;
+  // True if this function is a stub method created for an unnamed
+  // type.
+  bool is_unnamed_type_stub_method_ : 1;
   // True if this function calls the predeclared recover function.
   bool calls_recover_ : 1;
   // True if this a thunk built for a function which calls recover.
@@ -1255,9 +1274,9 @@
   has_descriptor() const
   { return this->descriptor_ != NULL; }
 
-  // Return a decl for the function given an identifier.
-  tree
-  get_or_make_decl(Gogo*, Named_object*, tree id);
+  // Return a backend representation.
+  Bfunction*
+  get_or_make_decl(Gogo*, Named_object*);
 
   // If there is a descriptor, build it into the backend
   // representation.
@@ -1280,7 +1299,7 @@
   // The function descriptor, if any.
   Expression* descriptor_;
   // The function decl if needed.
-  tree fndecl_;
+  Bfunction* fndecl_;
 };
 
 // A variable.
@@ -2171,8 +2190,8 @@
   Bvariable*
   get_backend_variable(Gogo*, Named_object* function);
 
-  // Return a tree for the external identifier for this object.
-  tree
+  // Return the external identifier for this object.
+  std::string
   get_id(Gogo*);
 
   // Return a tree representing this object.
diff --git a/gcc/go/gofrontend/import.h b/gcc/go/gofrontend/import.h
index c6844cd..9917937 100644
--- a/gcc/go/gofrontend/import.h
+++ b/gcc/go/gofrontend/import.h
@@ -149,6 +149,11 @@
   location() const
   { return this->location_; }
 
+  // Return the package we are importing.
+  Package*
+  package() const
+  { return this->package_; }
+
   // Return the next character.
   int
   peek_char()
diff --git a/gcc/go/gofrontend/lex.cc b/gcc/go/gofrontend/lex.cc
index 22a1f6e2..1616963 100644
--- a/gcc/go/gofrontend/lex.cc
+++ b/gcc/go/gofrontend/lex.cc
@@ -873,7 +873,28 @@
 	      && (cc < 'a' || cc > 'z')
 	      && cc != '_'
 	      && (cc < '0' || cc > '9'))
-	    break;
+	    {
+	      // Check for an invalid character here, as we get better
+	      // error behaviour if we swallow them as part of the
+	      // identifier we are building.
+	      if ((cc >= ' ' && cc < 0x7f)
+		  || cc == '\t'
+		  || cc == '\r'
+		  || cc == '\n')
+		break;
+
+	      this->lineoff_ = p - this->linebuf_;
+	      error_at(this->location(),
+		       "invalid character 0x%x in identifier",
+		       cc);
+	      if (!has_non_ascii_char)
+		{
+		  buf.assign(pstart, p - pstart);
+		  has_non_ascii_char = true;
+		}
+	      if (!Lex::is_invalid_identifier(buf))
+		buf.append("$INVALID$");
+	    }
 	  ++p;
 	  if (is_first)
 	    {
diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc
index 9d11285..9c7d827 100644
--- a/gcc/go/gofrontend/parse.cc
+++ b/gcc/go/gofrontend/parse.cc
@@ -213,7 +213,7 @@
   if (name == "_")
     {
       error_at(this->location(), "invalid use of %<_%>");
-      name = "blank";
+      name = Gogo::erroneous_name();
     }
 
   if (package->name() == this->gogo_->package_name())
@@ -744,6 +744,8 @@
     return NULL;
 
   Parse::Names names;
+  if (receiver != NULL)
+    names[receiver->name()] = receiver;
   if (params != NULL)
     this->check_signature_names(params, &names);
   if (results != NULL)
@@ -1940,12 +1942,9 @@
 	{
 	  if (this->gogo_->in_global_scope())
 	    return this->create_dummy_global(type, init, location);
-	  else if (type == NULL)
-	    this->gogo_->add_statement(Statement::make_statement(init, true));
 	  else
 	    {
-	      // With both a type and an initializer, create a dummy
-	      // variable so that we will check whether the
+	      // Create a dummy variable so that we will check whether the
 	      // initializer can be assigned to the type.
 	      Variable* var = new Variable(type, init, false, false, false,
 					   location);
@@ -2693,15 +2692,17 @@
     {
       this->advance_token();
       return Expression::make_composite_literal(type, depth, false, NULL,
-						location);
+						false, location);
     }
 
   bool has_keys = false;
+  bool all_are_names = true;
   Expression_list* vals = new Expression_list;
   while (true)
     {
       Expression* val;
       bool is_type_omitted = false;
+      bool is_name = false;
 
       const Token* token = this->peek_token();
 
@@ -2722,6 +2723,7 @@
 	      val = this->id_to_expression(gogo->pack_hidden_name(identifier,
 								  is_exported),
 					   location);
+	      is_name = true;
 	    }
 	  else
 	    {
@@ -2747,6 +2749,7 @@
 	{
 	  if (has_keys)
 	    vals->push_back(NULL);
+	  is_name = false;
 	}
       else
 	{
@@ -2793,6 +2796,9 @@
 
       vals->push_back(val);
 
+      if (!is_name)
+	all_are_names = false;
+
       if (token->is_op(OPERATOR_COMMA))
 	{
 	  if (this->advance_token()->is_op(OPERATOR_RCURLY))
@@ -2833,7 +2839,7 @@
     }
 
   return Expression::make_composite_literal(type, depth, has_keys, vals,
-					    location);
+					    all_are_names, location);
 }
 
 // FunctionLit = "func" Signature Block .
@@ -3107,7 +3113,7 @@
       if (token->identifier() == "_")
 	{
 	  error_at(this->location(), "invalid use of %<_%>");
-	  name = this->gogo_->pack_hidden_name("blank", false);
+	  name = Gogo::erroneous_name();
 	}
       this->advance_token();
       return Expression::make_selector(left, name, location);
@@ -4932,7 +4938,7 @@
 	    {
 	      error_at(recv_var_loc,
 		       "no new variables on left side of %<:=%>");
-	      recv_var = "blank";
+	      recv_var = Gogo::erroneous_name();
 	    }
 	  *is_send = false;
 	  *varname = gogo->pack_hidden_name(recv_var, is_rv_exported);
@@ -4968,7 +4974,7 @@
 		    {
 		      error_at(recv_var_loc,
 			       "no new variables on left side of %<:=%>");
-		      recv_var = "blank";
+		      recv_var = Gogo::erroneous_name();
 		    }
 		  *is_send = false;
 		  if (recv_var != "_")
@@ -5505,7 +5511,7 @@
 	  if (name == "_")
 	    {
 	      error_at(this->location(), "invalid package name _");
-	      name = "blank";
+	      name = Gogo::erroneous_name();
 	    }
 	  this->advance_token();
 	}
diff --git a/gcc/go/gofrontend/runtime.cc b/gcc/go/gofrontend/runtime.cc
index ecc508d..3b0f1880 100644
--- a/gcc/go/gofrontend/runtime.cc
+++ b/gcc/go/gofrontend/runtime.cc
@@ -42,6 +42,8 @@
   RFT_RUNE,
   // Go type float64, C type double.
   RFT_FLOAT64,
+  // Go type complex64, C type __complex float.
+  RFT_COMPLEX64,
   // Go type complex128, C type __complex double.
   RFT_COMPLEX128,
   // Go type string, C type struct __go_string.
@@ -126,6 +128,10 @@
 	  t = Type::lookup_float_type("float64");
 	  break;
 
+	case RFT_COMPLEX64:
+	  t = Type::lookup_complex_type("complex64");
+	  break;
+
 	case RFT_COMPLEX128:
 	  t = Type::lookup_complex_type("complex128");
 	  break;
@@ -216,6 +222,7 @@
     case RFT_UINTPTR:
     case RFT_RUNE:
     case RFT_FLOAT64:
+    case RFT_COMPLEX64:
     case RFT_COMPLEX128:
     case RFT_STRING:
     case RFT_POINTER:
diff --git a/gcc/go/gofrontend/runtime.def b/gcc/go/gofrontend/runtime.def
index 0d3fd3c..a303a50 100644
--- a/gcc/go/gofrontend/runtime.def
+++ b/gcc/go/gofrontend/runtime.def
@@ -68,6 +68,12 @@
 	       P1(STRING), R1(SLICE))
 
 
+// Complex division.
+DEF_GO_RUNTIME(COMPLEX64_DIV, "__go_complex64_div",
+	       P2(COMPLEX64, COMPLEX64), R1(COMPLEX64))
+DEF_GO_RUNTIME(COMPLEX128_DIV, "__go_complex128_div",
+	       P2(COMPLEX128, COMPLEX128), R1(COMPLEX128))
+
 // Make a slice.
 DEF_GO_RUNTIME(MAKESLICE1, "__go_make_slice1", P2(TYPE, UINTPTR), R1(SLICE))
 DEF_GO_RUNTIME(MAKESLICE2, "__go_make_slice2", P3(TYPE, UINTPTR, UINTPTR),
diff --git a/gcc/go/gofrontend/statements.cc b/gcc/go/gofrontend/statements.cc
index 0261f9d..a5102c0 100644
--- a/gcc/go/gofrontend/statements.cc
+++ b/gcc/go/gofrontend/statements.cc
@@ -594,6 +594,15 @@
 
   Type* lhs_type = this->lhs_->type();
   Type* rhs_type = this->rhs_->type();
+
+  // Invalid assignment of nil to the blank identifier.
+  if (lhs_type->is_sink_type()
+      && rhs_type->is_nil_type())
+    {
+      this->report_error(_("use of untyped nil"));
+      return;
+    }
+
   std::string reason;
   bool ok;
   if (this->are_hidden_fields_ok_)
@@ -975,7 +984,10 @@
 
       if ((*plhs)->is_sink_expression())
 	{
-	  b->add_statement(Statement::make_statement(*prhs, true));
+          if ((*prhs)->type()->is_nil_type())
+            this->report_error(_("use of untyped nil"));
+          else
+            b->add_statement(Statement::make_statement(*prhs, true));
 	  continue;
 	}
 
diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc
index 9ce329d..59247d6 100644
--- a/gcc/go/gofrontend/types.cc
+++ b/gcc/go/gofrontend/types.cc
@@ -2288,9 +2288,7 @@
       }
 
     case TYPE_NAMED:
-      // Begin converting this type to the backend representation.
-      // This will create a placeholder if necessary.
-      this->get_backend(gogo);
+      this->named_type()->convert(gogo);
       return this->named_type()->is_named_backend_type_size_known();
 
     case TYPE_FORWARD:
@@ -3385,6 +3383,68 @@
 // Get the backend representation for a function type.
 
 Btype*
+Function_type::get_backend_fntype(Gogo* gogo)
+{
+  if (this->fnbtype_ == NULL)
+    {
+      Backend::Btyped_identifier breceiver;
+      if (this->receiver_ != NULL)
+        {
+          breceiver.name = Gogo::unpack_hidden_name(this->receiver_->name());
+
+          // We always pass the address of the receiver parameter, in
+          // order to make interface calls work with unknown types.
+          Type* rtype = this->receiver_->type();
+          if (rtype->points_to() == NULL)
+            rtype = Type::make_pointer_type(rtype);
+          breceiver.btype = rtype->get_backend(gogo);
+          breceiver.location = this->receiver_->location();
+        }
+
+      std::vector<Backend::Btyped_identifier> bparameters;
+      if (this->parameters_ != NULL)
+        {
+          bparameters.resize(this->parameters_->size());
+          size_t i = 0;
+          for (Typed_identifier_list::const_iterator p =
+                   this->parameters_->begin(); p != this->parameters_->end();
+               ++p, ++i)
+	    {
+              bparameters[i].name = Gogo::unpack_hidden_name(p->name());
+              bparameters[i].btype = p->type()->get_backend(gogo);
+              bparameters[i].location = p->location();
+            }
+          go_assert(i == bparameters.size());
+        }
+
+      std::vector<Backend::Btyped_identifier> bresults;
+      if (this->results_ != NULL)
+        {
+          bresults.resize(this->results_->size());
+          size_t i = 0;
+          for (Typed_identifier_list::const_iterator p =
+                   this->results_->begin(); p != this->results_->end();
+               ++p, ++i)
+	    {
+              bresults[i].name = Gogo::unpack_hidden_name(p->name());
+              bresults[i].btype = p->type()->get_backend(gogo);
+              bresults[i].location = p->location();
+            }
+          go_assert(i == bresults.size());
+        }
+
+      this->fnbtype_ = gogo->backend()->function_type(breceiver, bparameters,
+                                                      bresults,
+                                                      this->location());
+
+    }
+
+  return this->fnbtype_;
+}
+
+// Get the backend representation for a Go function type.
+
+Btype*
 Function_type::do_get_backend(Gogo* gogo)
 {
   // When we do anything with a function value other than call it, it
@@ -3397,57 +3457,9 @@
     gogo->backend()->placeholder_struct_type("__go_descriptor", loc);
   Btype* ptr_struct_type = gogo->backend()->pointer_type(struct_type);
 
-  Backend::Btyped_identifier breceiver;
-  if (this->receiver_ != NULL)
-    {
-      breceiver.name = Gogo::unpack_hidden_name(this->receiver_->name());
-
-      // We always pass the address of the receiver parameter, in
-      // order to make interface calls work with unknown types.
-      Type* rtype = this->receiver_->type();
-      if (rtype->points_to() == NULL)
-	rtype = Type::make_pointer_type(rtype);
-      breceiver.btype = rtype->get_backend(gogo);
-      breceiver.location = this->receiver_->location();
-    }
-
-  std::vector<Backend::Btyped_identifier> bparameters;
-  if (this->parameters_ != NULL)
-    {
-      bparameters.resize(this->parameters_->size());
-      size_t i = 0;
-      for (Typed_identifier_list::const_iterator p = this->parameters_->begin();
-	   p != this->parameters_->end();
-	   ++p, ++i)
-	{
-	  bparameters[i].name = Gogo::unpack_hidden_name(p->name());
-	  bparameters[i].btype = p->type()->get_backend(gogo);
-	  bparameters[i].location = p->location();
-	}
-      go_assert(i == bparameters.size());
-    }
-
-  std::vector<Backend::Btyped_identifier> bresults;
-  if (this->results_ != NULL)
-    {
-      bresults.resize(this->results_->size());
-      size_t i = 0;
-      for (Typed_identifier_list::const_iterator p = this->results_->begin();
-	   p != this->results_->end();
-	   ++p, ++i)
-	{
-	  bresults[i].name = Gogo::unpack_hidden_name(p->name());
-	  bresults[i].btype = p->type()->get_backend(gogo);
-	  bresults[i].location = p->location();
-	}
-      go_assert(i == bresults.size());
-    }
-
-  Btype* fntype = gogo->backend()->function_type(breceiver, bparameters,
-						 bresults, loc);
   std::vector<Backend::Btyped_identifier> fields(1);
   fields[0].name = "code";
-  fields[0].btype = fntype;
+  fields[0].btype = this->get_backend_fntype(gogo);
   fields[0].location = loc;
   if (!gogo->backend()->set_placeholder_struct_type(struct_type, fields))
     return gogo->backend()->error_type();
@@ -4197,7 +4209,8 @@
 
       // This is a horrible hack caused by the fact that we don't pack
       // the names of builtin types.  FIXME.
-      if (nt != NULL
+      if (!this->is_imported_
+	  && nt != NULL
 	  && nt->is_builtin()
 	  && nt->name() == Gogo::unpack_hidden_name(name))
 	return true;
@@ -4206,6 +4219,36 @@
     }
 }
 
+// Return whether this field is an unexported field named NAME.
+
+bool
+Struct_field::is_unexported_field_name(Gogo* gogo,
+				       const std::string& name) const
+{
+  const std::string& field_name(this->field_name());
+  if (Gogo::is_hidden_name(field_name)
+      && name == Gogo::unpack_hidden_name(field_name)
+      && gogo->pack_hidden_name(name, false) != field_name)
+    return true;
+
+  // Check for the name of a builtin type.  This is like the test in
+  // is_field_name, only there we return false if this->is_imported_,
+  // and here we return true.
+  if (this->is_imported_ && this->is_anonymous())
+    {
+      Type* t = this->typed_identifier_.type();
+      if (t->points_to() != NULL)
+	t = t->points_to();
+      Named_type* nt = t->named_type();
+      if (nt != NULL
+	  && nt->is_builtin()
+	  && nt->name() == Gogo::unpack_hidden_name(name))
+	return true;
+    }
+
+  return false;
+}
+
 // Return whether this field is an embedded built-in type.
 
 bool
@@ -4229,6 +4272,11 @@
 
 Struct_type::Identical_structs Struct_type::identical_structs;
 
+// A hash table used to merge method sets for identical unnamed
+// structs.
+
+Struct_type::Struct_method_tables Struct_type::struct_method_tables;
+
 // Traversal.
 
 int
@@ -4261,12 +4309,7 @@
        ++p)
     {
       Type* t = p->type();
-      if (t->is_undefined())
-	{
-	  error_at(p->location(), "struct field type is incomplete");
-	  p->set_type(Type::make_error_type());
-	}
-      else if (p->is_anonymous())
+      if (p->is_anonymous())
 	{
 	  if (t->named_type() != NULL && t->points_to() != NULL)
 	    {
@@ -4638,13 +4681,8 @@
       for (Struct_field_list::const_iterator pf = fields->begin();
 	   pf != fields->end();
 	   ++pf)
-	{
-	  const std::string& field_name(pf->field_name());
-	  if (Gogo::is_hidden_name(field_name)
-	      && name == Gogo::unpack_hidden_name(field_name)
-	      && gogo->pack_hidden_name(name, false) != field_name)
-	    return true;
-	}
+	if (pf->is_unexported_field_name(gogo, name))
+	  return true;
     }
   return false;
 }
@@ -4693,9 +4731,24 @@
 				    const Interface_type* interface,
 				    bool is_pointer)
 {
+  std::pair<Struct_type*, Struct_type::Struct_method_table_pair*>
+    val(this, NULL);
+  std::pair<Struct_type::Struct_method_tables::iterator, bool> ins =
+    Struct_type::struct_method_tables.insert(val);
+
+  Struct_method_table_pair* smtp;
+  if (!ins.second)
+    smtp = ins.first->second;
+  else
+    {
+      smtp = new Struct_method_table_pair();
+      smtp->first = NULL;
+      smtp->second = NULL;
+      ins.first->second = smtp;
+    }
+
   return Type::interface_method_table(gogo, this, interface, is_pointer,
-				      &this->interface_method_tables_,
-				      &this->pointer_interface_method_tables_);
+				      &smtp->first, &smtp->second);
 }
 
 // Convert struct fields to the backend representation.  This is not
@@ -5232,6 +5285,7 @@
 	  Type* ftype = imp->read_type();
 
 	  Struct_field sf(Typed_identifier(name, ftype, imp->location()));
+	  sf.set_is_imported();
 
 	  if (imp->peek_char() == ' ')
 	    {
@@ -5647,8 +5701,10 @@
 	    t = Type::lookup_integer_type("int");
 	  else if (t->is_abstract())
 	    t = t->make_non_abstract_type();
-	  tree tt = type_to_tree(t->get_backend(gogo));
-	  this->length_tree_ = Expression::integer_constant_tree(val, tt);
+          Btype* btype = t->get_backend(gogo);
+          Bexpression* iexpr =
+              gogo->backend()->integer_constant_expression(btype, val);
+	  this->length_tree_ = expr_to_tree(iexpr);
 	  mpz_clear(val);
 	}
       else
@@ -9002,6 +9058,8 @@
 				      fntype->is_varargs(), location);
 	  gogo->finish_function(fntype->location());
 
+	  if (type->named_type() == NULL && stub->is_function())
+	    stub->func_value()->set_is_unnamed_type_stub_method();
 	  if (m->nointerface() && stub->is_function())
 	    stub->func_value()->set_nointerface();
 	}
@@ -9251,7 +9309,11 @@
     }
   else
     {
-      if (!ambig1.empty())
+      if (Gogo::is_erroneous_name(name))
+	{
+	  // An error was already reported.
+	}
+      else if (!ambig1.empty())
 	error_at(location, "%qs is ambiguous via %qs and %qs",
 		 Gogo::message_name(name).c_str(), ambig1.c_str(),
 		 ambig2.c_str());
@@ -9265,7 +9327,9 @@
       else
 	{
 	  bool is_unexported;
-	  if (!Gogo::is_hidden_name(name))
+	  // The test for 'a' and 'z' is to handle builtin names,
+	  // which are not hidden.
+	  if (!Gogo::is_hidden_name(name) && (name[0] < 'a' || name[0] > 'z'))
 	    is_unexported = false;
 	  else
 	    {
diff --git a/gcc/go/gofrontend/types.h b/gcc/go/gofrontend/types.h
index d207fe5..ed01d9c 100644
--- a/gcc/go/gofrontend/types.h
+++ b/gcc/go/gofrontend/types.h
@@ -1717,7 +1717,8 @@
 		Typed_identifier_list* results, Location location)
     : Type(TYPE_FUNCTION),
       receiver_(receiver), parameters_(parameters), results_(results),
-      location_(location), is_varargs_(false), is_builtin_(false)
+      location_(location), is_varargs_(false), is_builtin_(false),
+      fnbtype_(NULL)
   { }
 
   // Get the receiver.
@@ -1798,6 +1799,11 @@
   static Type*
   make_function_type_descriptor_type();
 
+  // Return the backend representation of this function type. This is used
+  // as the real type of a backend function declaration or defintion.
+  Btype*
+  get_backend_fntype(Gogo*);
+
  protected:
   int
   do_traverse(Traverse*);
@@ -1851,6 +1857,9 @@
   // Whether this is a special builtin function which can not simply
   // be called.  This is used for len, cap, etc.
   bool is_builtin_;
+  // The backend representation of this type for backend function
+  // declarations and definitions.
+  Btype* fnbtype_;
 };
 
 // The type of a pointer.
@@ -1915,7 +1924,7 @@
 {
  public:
   explicit Struct_field(const Typed_identifier& typed_identifier)
-    : typed_identifier_(typed_identifier), tag_(NULL)
+    : typed_identifier_(typed_identifier), tag_(NULL), is_imported_(false)
   { }
 
   // The field name.
@@ -1926,6 +1935,10 @@
   bool
   is_field_name(const std::string& name) const;
 
+  // Return whether this struct field is an unexported field named NAME.
+  bool
+  is_unexported_field_name(Gogo*, const std::string& name) const;
+
   // Return whether this struct field is an embedded built-in type.
   bool
   is_embedded_builtin(Gogo*) const;
@@ -1963,6 +1976,11 @@
   set_tag(const std::string& tag)
   { this->tag_ = new std::string(tag); }
 
+  // Record that this field is defined in an imported struct.
+  void
+  set_is_imported()
+  { this->is_imported_ = true; }
+
   // Set the type.  This is only used in error cases.
   void
   set_type(Type* type)
@@ -1973,6 +1991,8 @@
   Typed_identifier typed_identifier_;
   // The field tag.  This is NULL if the field has no tag.
   std::string* tag_;
+  // Whether this field is defined in an imported struct.
+  bool is_imported_;
 };
 
 // A list of struct fields.
@@ -2041,8 +2061,7 @@
  public:
   Struct_type(Struct_field_list* fields, Location location)
     : Type(TYPE_STRUCT),
-      fields_(fields), location_(location), all_methods_(NULL),
-      interface_method_tables_(NULL), pointer_interface_method_tables_(NULL)
+      fields_(fields), location_(location), all_methods_(NULL)
   { }
 
   // Return the field NAME.  This only looks at local fields, not at
@@ -2200,6 +2219,16 @@
 
   static Identical_structs identical_structs;
 
+  // Used to manage method tables for identical unnamed structs.
+  typedef std::pair<Interface_method_tables*, Interface_method_tables*>
+    Struct_method_table_pair;
+
+  typedef Unordered_map_hash(Struct_type*, Struct_method_table_pair*,
+			     Type_hash_identical, Type_identical)
+    Struct_method_tables;
+
+  static Struct_method_tables struct_method_tables;
+
   // Used to avoid infinite loops in field_reference_depth.
   struct Saw_named_type
   {
@@ -2218,13 +2247,6 @@
   Location location_;
   // If this struct is unnamed, a list of methods.
   Methods* all_methods_;
-  // A mapping from interfaces to the associated interface method
-  // tables for this type.  Only used if this struct is unnamed.
-  Interface_method_tables* interface_method_tables_;
-  // A mapping from interfaces to the associated interface method
-  // tables for pointers to this type.  Only used if this struct is
-  // unnamed.
-  Interface_method_tables* pointer_interface_method_tables_;
 };
 
 // The type of an array.
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index c4591bfe..4d15b60 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -6511,6 +6511,50 @@
 		? stderr : dump_file);
 }
 
+/* Try to group comparison and the following conditional jump INSN if
+   they're already adjacent. This is to prevent scheduler from scheduling
+   them apart.  */
+
+static void
+try_group_insn (rtx insn)
+{
+  unsigned int condreg1, condreg2;
+  rtx cc_reg_1;
+  rtx prev;
+
+  if (!any_condjump_p (insn))
+    return;
+
+  targetm.fixed_condition_code_regs (&condreg1, &condreg2);
+  cc_reg_1 = gen_rtx_REG (CCmode, condreg1);
+  prev = prev_nonnote_nondebug_insn (insn);
+  if (!reg_referenced_p (cc_reg_1, PATTERN (insn))
+      || !prev
+      || !modified_in_p (cc_reg_1, prev))
+    return;
+
+  /* Different microarchitectures support macro fusions for different
+     combinations of insn pairs.  */
+  if (!targetm.sched.macro_fusion_pair_p
+      || !targetm.sched.macro_fusion_pair_p (prev, insn))
+    return;
+
+  SCHED_GROUP_P (insn) = 1;
+}
+
+/* If the last cond jump and the cond register defining insn are consecutive
+   before scheduling, we want them to be in a schedule group. This is good
+   for performance on microarchitectures supporting macro-fusion.  */
+
+static void
+group_insns_for_macro_fusion ()
+{
+  basic_block bb;
+
+  FOR_EACH_BB (bb)
+    try_group_insn (BB_END (bb));
+}
+
 /* Initialize some global state for the scheduler.  This function works
    with the common data shared between all the schedulers.  It is called
    from the scheduler specific initialization routine.  */
@@ -6637,6 +6681,11 @@
     }
 
   curr_state = xmalloc (dfa_state_size);
+
+  /* Group compare and branch insns for macro-fusion.  */
+  if (targetm.sched.macro_fusion_p
+      && targetm.sched.macro_fusion_p ())
+    group_insns_for_macro_fusion ();
 }
 
 static void haifa_init_only_bb (basic_block, basic_block);
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 88967a6..367e51b 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -3905,10 +3905,9 @@
   if (new_bb)
     {
       df_bb_replace (then_bb_index, new_bb);
-      /* Since the fallthru edge was redirected from test_bb to new_bb,
-         we need to ensure that new_bb is in the same partition as
-         test bb (you can not fall through across section boundaries).  */
-      BB_COPY_PARTITION (new_bb, test_bb);
+      /* This should have been done above via force_nonfallthru_and_redirect
+         (possibly called from redirect_edge_and_branch_force).  */
+      gcc_checking_assert (BB_PARTITION (new_bb) == BB_PARTITION (test_bb));
     }
 
   num_true_changes++;
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 8763c9f..b3d7f04 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -750,7 +750,8 @@
       }
 
   for (ie = node->indirect_calls; ie; ie = ie->next_callee)
-    if (ie->indirect_info->polymorphic)
+    if (ie->indirect_info->polymorphic
+        && ie->indirect_info->param_index >= 0)
       {
 	gcc_checking_assert (ie->indirect_info->param_index >= 0);
 	ipa_get_parm_lattices (info,
@@ -1557,7 +1558,8 @@
   if (TREE_CODE (t) != TREE_BINFO)
     {
       tree binfo;
-      binfo = gimple_extract_devirt_binfo_from_cst (t);
+      binfo = gimple_extract_devirt_binfo_from_cst
+		 (t, ie->indirect_info->otr_type);
       if (!binfo)
 	return NULL_TREE;
       binfo = get_binfo_at_offset (binfo, anc_offset, otr_type);
@@ -3123,6 +3125,7 @@
 					  struct cgraph_node *node)
 {
   struct ipa_node_params *orig_caller_info = IPA_NODE_REF (cs->caller);
+  struct ipa_node_params *orig_node_info;
   struct ipa_agg_replacement_value *aggval;
   int i, ec, count;
 
@@ -3137,6 +3140,7 @@
       if (aggval->index >= ec)
 	return false;
 
+  orig_node_info = IPA_NODE_REF (IPA_NODE_REF (node)->ipcp_orig_node);
   if (orig_caller_info->ipcp_orig_node)
     orig_caller_info = IPA_NODE_REF (orig_caller_info->ipcp_orig_node);
 
@@ -3154,7 +3158,7 @@
       if (!interesting)
 	continue;
 
-      plats = ipa_get_parm_lattices (orig_caller_info, aggval->index);
+      plats = ipa_get_parm_lattices (orig_node_info, aggval->index);
       if (plats->aggs_bottom)
 	return false;
 
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c
index 62c6a23..5f6a55c 100644
--- a/gcc/ipa-inline-transform.c
+++ b/gcc/ipa-inline-transform.c
@@ -169,6 +169,15 @@
       else
 	{
 	  struct cgraph_node *n;
+	  if (flag_auto_profile && L_IPO_COMP_MODE
+	      && cgraph_pre_profiling_inlining_done)
+	    {
+	      struct cgraph_node *caller = e->caller;
+	      if (caller->global.inlined_to)
+		caller = caller->global.inlined_to;
+	      if (cgraph_lipo_get_resolved_node (caller->symbol.decl) != caller)
+		update_original = false;
+	    }
 	  n = cgraph_clone_node (e->callee, e->callee->symbol.decl,
 				 e->count, e->frequency,
 				 update_original, vNULL, true);
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index cdc58cf..4f812d7 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -2203,7 +2203,7 @@
 /* Do inlining of small functions.  Doing so early helps profiling and other
    passes to be somewhat more effective and avoids some code duplication in
    later real inlining pass for testcases with very many function calls.  */
-static unsigned int
+unsigned int
 early_inliner (void)
 {
   struct cgraph_node *node = cgraph_get_node (current_function_decl);
diff --git a/gcc/ipa-inline.h b/gcc/ipa-inline.h
index 3988b3b..49b5e27 100644
--- a/gcc/ipa-inline.h
+++ b/gcc/ipa-inline.h
@@ -201,6 +201,9 @@
 extern vec<int> node_growth_cache;
 extern vec<edge_growth_cache_entry> edge_growth_cache;
 
+/* In ipa-inline.c  */
+unsigned int early_inliner (void);
+
 /* In ipa-inline-analysis.c  */
 void debug_inline_summary (struct cgraph_node *);
 void dump_inline_summaries (FILE *f);
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 7b2792f..05374c0 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -1819,7 +1819,7 @@
   ii = cs->indirect_info;
   ii->offset = anc_offset;
   ii->otr_token = tree_low_cst (OBJ_TYPE_REF_TOKEN (target), 1);
-  ii->otr_type = TREE_TYPE (TREE_TYPE (OBJ_TYPE_REF_OBJECT (target)));
+  ii->otr_type = obj_type_ref_class (target);
   ii->polymorphic = 1;
 }
 
@@ -1838,7 +1838,7 @@
     return;
   if (TREE_CODE (target) == SSA_NAME)
     ipa_analyze_indirect_call_uses (node, info, parms_ainfo, call, target);
-  else if (TREE_CODE (target) == OBJ_TYPE_REF)
+  else if (virtual_method_call_p (target))
     ipa_analyze_virtual_call_uses (node, info, call, target);
 }
 
@@ -2255,7 +2255,8 @@
 
   if (TREE_CODE (binfo) != TREE_BINFO)
     {
-      binfo = gimple_extract_devirt_binfo_from_cst (binfo);
+      binfo = gimple_extract_devirt_binfo_from_cst
+		 (binfo, ie->indirect_info->otr_type);
       if (!binfo)
         return NULL;
     }
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index c0f24b8..d16146f 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/gcc/jump.c b/gcc/jump.c
index 54d9860..3fde2e1 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -133,7 +133,7 @@
 	  if (BARRIER_P (prev))
 	    delete_insn (insn);
 	  else if (prev != PREV_INSN (insn))
-	    reorder_insns (insn, insn, prev);
+	    reorder_insns_nobb (insn, insn, prev);
 	}
     }
   return 0;
diff --git a/gcc/l-ipo.c b/gcc/l-ipo.c
index 77ec708..a0f4826 100644
--- a/gcc/l-ipo.c
+++ b/gcc/l-ipo.c
@@ -35,6 +35,7 @@
 #include "gcov-io.h"
 #include "timevar.h"
 #include "vec.h"
+#include "params.h"
 
 unsigned ggc_total_memory; /* in KB */
 
@@ -1059,7 +1060,15 @@
   struct cgraph_node *node;
   struct varpool_node *pv;
 
-  if (!L_IPO_COMP_MODE)
+  /* Only need to do type unification when we are in LIPO mode
+     and have a non-trivial module group (size is >1). However,
+     override the size check under non-zero PARAM_LIPO_RANDOM_GROUP_SIZE,
+     which indicates that we are stress-testing LIPO. In that case
+     try to flush out problems with type unification by always
+     performing it.  */
+  if (!L_IPO_COMP_MODE
+      || (num_in_fnames == 1
+          && PARAM_VALUE (PARAM_LIPO_RANDOM_GROUP_SIZE) == 0))
     return;
 
   vec_alloc (pending_types, 100);
@@ -1612,6 +1621,7 @@
 struct promo_ent
 {
   char* assemb_name;
+  tree decl;
   int seq;
 };
 
@@ -1654,18 +1664,38 @@
 
 static htab_t promo_ent_hash_tab = NULL;
 
+/* Make the var decl for weak symbol as extern.  */
+ 
+static inline void
+externalize_weak_decl (tree decl)
+{
+  gcc_assert (TREE_CODE (decl) == VAR_DECL && DECL_WEAK (decl));
+
+  DECL_EXTERNAL (decl) = 1;
+  TREE_STATIC (decl) = 0;
+  DECL_INITIAL (decl) = NULL;
+  DECL_CONTEXT (decl) = NULL;
+}
+
 /* Return a unique sequence number for NAME. This is needed to avoid
    name conflict -- function scope statics may have identical names.
 
-   This function returns a zero sequence number if it is called with
+   When DECL is NULL, 
+   this function returns a zero sequence number if it is called with
    a particular NAME for the first time, and non-zero otherwise.
-   This fact is used to keep track of unseen weak variables.  */
+   This fact is used to keep track of unseen weak variables.  
+   
+   When DECL is not NULL, this function is supposed to be called by
+   varpool_remove_duplicate_weak_decls.  */
 
 static int
-get_name_seq_num (const char *name)
+get_name_seq_num (const char *name, tree decl)
 {
   struct promo_ent **slot;
   struct promo_ent ent;
+  int ret = 0;
+
+  gcc_assert (!decl || TREE_CODE (decl) == VAR_DECL);
   ent.assemb_name = xstrdup (name);
   ent.seq = 0;
 
@@ -1676,13 +1706,27 @@
     {
       *slot = XCNEW (struct promo_ent);
       (*slot)->assemb_name = ent.assemb_name;
+      (*slot)->decl = decl;
     }
   else
     {
-      (*slot)->seq++;
+      /* During output, the previously selected weak decl may not be
+         referenced by any function that is expanded thus they do not have
+         DECL_RTL_SET_P to be true and therefore can be eliminated by
+         varpool_remove_unreferenced_decls later. To avoid that, logic is
+         added to replace previously selected decl when needed.  */ 
+      if (decl && DECL_RTL_SET_P (decl)
+          && !DECL_RTL_SET_P ((*slot)->decl))
+        {
+          externalize_weak_decl ((*slot)->decl);
+          (*slot)->decl = decl;
+          ret = 0;
+        }
+      else 
+        ret = ++(*slot)->seq;
       free (ent.assemb_name);
     }
-  return (*slot)->seq;
+  return ret;
 }
 
 /* Returns a unique assembler name for DECL.  */
@@ -1737,7 +1781,7 @@
 
   assembler_name = (char*) alloca (strlen (name) + 30);
   sprintf (assembler_name, "%s.cmo.%u", name, module_id);
-  seq = get_name_seq_num (assembler_name);
+  seq = get_name_seq_num (assembler_name, NULL);
   if (seq)
     sprintf (assembler_name, "%s.%d", assembler_name, seq);
 
@@ -2007,15 +2051,8 @@
       tree decl = node->symbol.decl;
 
       if (TREE_PUBLIC (decl) && DECL_WEAK (decl) && !DECL_EXTERNAL (decl)
-          && ((DECL_ARTIFICIAL (decl) &&
-           get_name_seq_num (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))))
-          || (!DECL_ARTIFICIAL (decl) && real_varpool_node (decl) != node)))
-        {
-	  DECL_EXTERNAL (decl) = 1;
-	  TREE_STATIC (decl) = 0;
-	  DECL_INITIAL (decl) = NULL;
-	  DECL_CONTEXT (decl) = NULL;
-	}
+          && get_name_seq_num (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)), decl))
+        externalize_weak_decl (decl);
     }
 
   htab_delete (promo_ent_hash_tab);
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c
index f16a5cb..7a93066 100644
--- a/gcc/loop-unroll.c
+++ b/gcc/loop-unroll.c
@@ -315,6 +315,7 @@
   struct niter_desc *desc = get_simple_loop_desc (loop);
   gcov_type sum_to_header_ratio;
   int hotness_ratio_threshold;
+  gcov_type limit;
   int limit_factor;
   gcov_working_set_t *ws;
 
@@ -361,8 +362,12 @@
          factor to zero as the loop's hotness reduces.  */
       if (sum_to_header_ratio > hotness_ratio_threshold)
         {
-          limit_factor = sum_to_header_ratio / hotness_ratio_threshold;
-          gcc_assert (limit_factor >= 1);
+          limit = sum_to_header_ratio / hotness_ratio_threshold;
+          gcc_assert (limit >= 1);
+          if (limit > INT_MAX)
+            limit_factor = INT_MAX;
+          else
+            limit_factor = (int) limit;
         }
       else
         limit_factor = 1;
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index d4ae0f9..e179310 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index 5d784dd..508874c 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/gcc/objcp/ChangeLog b/gcc/objcp/ChangeLog
index 4d86a7d..51c37e4 100644
--- a/gcc/objcp/ChangeLog
+++ b/gcc/objcp/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 354d30a..95d1168 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -5010,8 +5010,7 @@
     {
       /* If we are not inside a combined parallel+sections region,
 	 call GOMP_sections_start.  */
-      t = build_int_cst (unsigned_type_node,
-			 exit_reachable ? len - 1 : len);
+      t = build_int_cst (unsigned_type_node, len - 1);
       u = builtin_decl_explicit (BUILT_IN_GOMP_SECTIONS_START);
       stmt = gimple_build_call (u, 1, t);
     }
diff --git a/gcc/optabs.c b/gcc/optabs.c
index a3051ad..fd7fe55 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -7035,8 +7035,7 @@
 
       create_output_operand (&ops[0], target, mode);
       create_fixed_operand (&ops[1], mem);
-      /* VAL may have been promoted to a wider mode.  Shrink it if so.  */
-      create_convert_operand_to (&ops[2], val, mode, true);
+      create_input_operand (&ops[2], val, mode);
       create_integer_operand (&ops[3], model);
       if (maybe_expand_insn (icode, 4, ops))
 	return ops[0].value;
@@ -7075,8 +7074,7 @@
       struct expand_operand ops[3];
       create_output_operand (&ops[0], target, mode);
       create_fixed_operand (&ops[1], mem);
-      /* VAL may have been promoted to a wider mode.  Shrink it if so.  */
-      create_convert_operand_to (&ops[2], val, mode, true);
+      create_input_operand (&ops[2], val, mode);
       if (maybe_expand_insn (icode, 3, ops))
 	return ops[0].value;
     }
@@ -7118,8 +7116,6 @@
     {
       if (!target || !register_operand (target, mode))
 	target = gen_reg_rtx (mode);
-      if (GET_MODE (val) != VOIDmode && GET_MODE (val) != mode)
-	val = convert_modes (mode, GET_MODE (val), val, 1);
       if (expand_compare_and_swap_loop (mem, target, val, NULL_RTX))
 	return target;
     }
@@ -7331,8 +7327,8 @@
       create_output_operand (&ops[0], target_bool, bool_mode);
       create_output_operand (&ops[1], target_oval, mode);
       create_fixed_operand (&ops[2], mem);
-      create_convert_operand_to (&ops[3], expected, mode, true);
-      create_convert_operand_to (&ops[4], desired, mode, true);
+      create_input_operand (&ops[3], expected, mode);
+      create_input_operand (&ops[4], desired, mode);
       create_integer_operand (&ops[5], is_weak);
       create_integer_operand (&ops[6], succ_model);
       create_integer_operand (&ops[7], fail_model);
@@ -7353,8 +7349,8 @@
 
       create_output_operand (&ops[0], target_oval, mode);
       create_fixed_operand (&ops[1], mem);
-      create_convert_operand_to (&ops[2], expected, mode, true);
-      create_convert_operand_to (&ops[3], desired, mode, true);
+      create_input_operand (&ops[2], expected, mode);
+      create_input_operand (&ops[3], desired, mode);
       if (!maybe_expand_insn (icode, 4, ops))
 	return false;
 
diff --git a/gcc/opts.c b/gcc/opts.c
index 7679a07..32139be 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -848,13 +848,25 @@
   if (opts->x_flag_vect_cost_model == VECT_COST_MODEL_CHEAP)
     {
       maybe_set_param_value (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS,
-            6, opts->x_param_values, opts_set->x_param_values);
+            8, opts->x_param_values, opts_set->x_param_values);
       maybe_set_param_value (PARAM_VECT_MAX_VERSION_FOR_ALIGNMENT_CHECKS,
             0, opts->x_param_values, opts_set->x_param_values);
       maybe_set_param_value (PARAM_VECT_MAX_PEELING_FOR_ALIGNMENT,
             0, opts->x_param_values, opts_set->x_param_values);
     }
 
+  /* Set PARAM_MAX_COMPLETELY_PEELED_INSNS to the default original value during
+     -O2 when -funroll-loops and -fpeel-loops are not set.   */
+  if (optimize == 2 && !opts->x_flag_unroll_loops && !opts->x_flag_peel_loops
+      && !opts->x_flag_unroll_all_loops)
+
+    {
+      maybe_set_param_value
+       (PARAM_MAX_COMPLETELY_PEELED_INSNS,
+        PARAM_VALUE (PARAM_MAX_DEFAULT_COMPLETELY_PEELED_INSNS),
+	opts->x_param_values, opts_set->x_param_values);
+    }
+
   /* Set PARAM_MAX_STORES_TO_SINK to 0 if either vectorization or if-conversion
      is disabled.  */
   if ((!opts->x_flag_tree_loop_vectorize && !opts->x_flag_tree_slp_vectorize)
@@ -1662,8 +1674,6 @@
       if (!opts_set->x_flag_tree_vectorize
           && !opts_set->x_flag_tree_loop_vectorize)
 	opts->x_flag_tree_loop_vectorize = value;
-      if (!opts_set->x_flag_vect_cost_model)
-	opts->x_flag_vect_cost_model = VECT_COST_MODEL_DYNAMIC;
       if (!opts_set->x_flag_tree_loop_distribute_patterns)
 	opts->x_flag_tree_loop_distribute_patterns = value;
       break;
@@ -1698,8 +1708,6 @@
       if (!opts_set->x_flag_tree_loop_vectorize
           && !opts_set->x_flag_tree_vectorize)
 	opts->x_flag_tree_loop_vectorize = value;
-      if (!opts_set->x_flag_vect_cost_model)
-	opts->x_flag_vect_cost_model = VECT_COST_MODEL_DYNAMIC;
       if (!opts_set->x_flag_tree_loop_distribute_patterns)
 	opts->x_flag_tree_loop_distribute_patterns = value;
       break;
diff --git a/gcc/params.c b/gcc/params.c
index 2fc1d15..aff5a14 100644
--- a/gcc/params.c
+++ b/gcc/params.c
@@ -70,7 +70,9 @@
 global_init_params (void)
 {
   add_params (lang_independent_params, LAST_PARAM);
+#ifndef IN_GCOV_TOOL
   targetm_common.option_default_params ();
+#endif
 }
 
 /* Note that all parameters have been added and all default values
diff --git a/gcc/params.def b/gcc/params.def
index fc62496..5bccea1 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -339,6 +339,11 @@
 	"max-completely-peeled-insns",
 	"The maximum number of insns of a completely peeled loop",
 	400, 0, 0)
+/* The default maximum number of insns of a peeled loop, with -O2.  */
+DEFPARAM(PARAM_MAX_DEFAULT_COMPLETELY_PEELED_INSNS,
+	"max-default-completely-peeled-insns",
+	"The maximum number of insns of a completely peeled loop",
+	200, 0, 0)
 /* The maximum number of peelings of a single loop that is peeled completely.  */
 DEFPARAM(PARAM_MAX_COMPLETELY_PEEL_TIMES,
 	"max-completely-peel-times",
@@ -434,6 +439,11 @@
 	 "Select fraction of the maximal frequency of executions of basic block in function given basic block needs to have to be considered hot",
 	 1000, 0, 0)
 
+DEFPARAM(UNLIKELY_BB_COUNT_FRACTION,
+	 "unlikely-bb-count-fraction",
+         "The minimum fraction of profile runs a given basic block execution count must be not to be considered unlikely",
+	 20, 1, 10000)
+
 DEFPARAM (PARAM_ALIGN_THRESHOLD,
 	  "align-threshold",
 	  "Select fraction of the maximal frequency of executions of basic block in function given basic block get alignment",
@@ -460,6 +470,14 @@
 	 "The maximum number of loop iterations we predict statically",
 	 100, 0, 0)
 
+/* This parameter controls the maximum iterations that AutoFDO profile
+   prpagation algorithm will run for a specific CFG.  */
+
+DEFPARAM(PARAM_AUTOFDO_MAX_PROPAGATE_ITERATIONS,
+         "max-autofdo-max-propagate-iterations",
+         "The maximum number of AutoFDO profile propagation iterations",
+         100, 0, 0)
+
 /* This parameter controls the probability of builtin_expect. The default
    value is 90%. This empirical value is obtained through the weighted
    probability of FDO counters (with the FDO count value as the weight)
@@ -964,7 +982,7 @@
 DEFPARAM (PARAM_MAX_LIPO_MEMORY,
 	  "max-lipo-mem",
 	  "don't import aux files if memory consumption exceeds this value",
-	  3000000, 0, 0)
+	  4000000, 0, 0)
 
 /* In LIPO profile-gen, use this parameter to record the cutoff value used at
    profile collection runtime.  */
@@ -1273,6 +1291,13 @@
           "with -mpatch-functions-for-instrumentation)",
           200, 0, 0)
 
+/* Static predefined average loop iteration num used in IVOPT.  */
+DEFPARAM (PARAM_IVOPT_AVG_LOOP_NITER,
+          "ivopt-avg-loop-niter",
+          "Static predefined average loop iteration num used in IVOPT, it is "
+          "used when loop iterations number estimation return -1",
+          50, 0, 0)
+
 /*
 Local variables:
 mode:c
diff --git a/gcc/passes.c b/gcc/passes.c
index aa7c9b3..43886aa 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -1366,8 +1366,8 @@
       NEXT_PASS (pass_rebuild_cgraph_edges);
       NEXT_PASS (pass_inline_parameters);
     }
-  NEXT_PASS (pass_ipa_free_inline_summary);
   NEXT_PASS (pass_ipa_auto_profile);
+  NEXT_PASS (pass_ipa_free_inline_summary);
   NEXT_PASS (pass_ipa_tree_profile);
     {
       struct opt_pass **p = &pass_ipa_tree_profile.pass.sub;
@@ -1564,6 +1564,9 @@
       /* ???  We do want some kind of loop invariant motion, but we possibly
          need to adjust LIM to be more friendly towards preserving accurate
 	 debug information here.  */
+      /* Split critical edges before late uninit warning to reduce the
+         number of false positives from it.  */
+      NEXT_PASS (pass_split_crit_edges);
       NEXT_PASS (pass_late_warn_uninitialized);
       NEXT_PASS (pass_uncprop);
       NEXT_PASS (pass_local_pure_const);
@@ -1661,6 +1664,7 @@
 	  NEXT_PASS (pass_regrename);
 	  NEXT_PASS (pass_cprop_hardreg);
 	  NEXT_PASS (pass_fast_rtl_dce);
+	  NEXT_PASS (pass_duplicate_computed_gotos);
 	  NEXT_PASS (pass_reorder_blocks);
 	  NEXT_PASS (pass_branch_target_load_optimize2);
 	  NEXT_PASS (pass_leaf_regs);
@@ -1673,7 +1677,6 @@
 	      NEXT_PASS (pass_stack_regs_run);
 	    }
 	  NEXT_PASS (pass_compute_alignments);
-	  NEXT_PASS (pass_duplicate_computed_gotos);
 	  NEXT_PASS (pass_variable_tracking);
 	  NEXT_PASS (pass_free_cfg);
 	  NEXT_PASS (pass_machine_reorg);
diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog
index 883bcc2..a01b6cb 100644
--- a/gcc/po/ChangeLog
+++ b/gcc/po/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-07-11  Joseph Myers  <joseph@codesourcery.com>
 
 	* fi.po: Update.
diff --git a/gcc/predict.c b/gcc/predict.c
index 287bddd..f27c58c 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -211,14 +211,52 @@
 }
 
 
-/* Return true in case BB is probably never executed.  */
 
-bool
-probably_never_executed_bb_p (struct function *fun, const_basic_block bb)
+/* Return true if profile COUNT and FREQUENCY, or function FUN static
+   node frequency reflects never being executed.  */
+   
+static bool
+probably_never_executed (struct function *fun,
+                         gcov_type count, int frequency)
 {
   gcc_checking_assert (fun);
-  if (profile_info && flag_branch_probabilities)
-    return ((bb->count + profile_info->runs / 2) / profile_info->runs) == 0;
+  if (profile_status_for_function (fun) == PROFILE_READ)
+    {
+      int unlikely_count_fraction = PARAM_VALUE (UNLIKELY_BB_COUNT_FRACTION);
+      if (count * unlikely_count_fraction >= profile_info->runs)
+	return false;
+      if (!frequency)
+	return true;
+      if (!ENTRY_BLOCK_PTR_FOR_FUNCTION (cfun)->frequency)
+	return false;
+      if (ENTRY_BLOCK_PTR_FOR_FUNCTION (cfun)->count)
+	{
+          gcov_type computed_count;
+          /* Check for possibility of overflow, in which case entry bb count
+             is large enough to do the division first without losing much
+             precision.  */
+	  if (ENTRY_BLOCK_PTR_FOR_FUNCTION (cfun)->count < REG_BR_PROB_BASE *
+	      REG_BR_PROB_BASE)
+            {
+              gcov_type scaled_count
+		  = frequency * ENTRY_BLOCK_PTR_FOR_FUNCTION (cfun)->count
+                  * unlikely_count_fraction;
+	      computed_count
+                  = RDIV (scaled_count,
+                          ENTRY_BLOCK_PTR_FOR_FUNCTION (cfun)->frequency);
+            }
+          else
+            {
+	      computed_count
+                  = RDIV (ENTRY_BLOCK_PTR_FOR_FUNCTION (cfun)->count,
+                          ENTRY_BLOCK_PTR_FOR_FUNCTION (cfun)->frequency);
+              computed_count *= frequency * unlikely_count_fraction;
+            }
+          if (computed_count >= profile_info->runs)
+            return false;
+	}
+      return true;
+    }
   if ((!profile_info || !flag_branch_probabilities)
       && (cgraph_get_node (fun->decl)->frequency
 	  == NODE_FREQUENCY_UNLIKELY_EXECUTED))
@@ -226,6 +264,24 @@
   return false;
 }
 
+
+/* Return true in case BB is probably never executed.  */
+
+bool
+probably_never_executed_bb_p (struct function *fun, const_basic_block bb)
+{
+  return probably_never_executed (fun, bb->count, bb->frequency);
+}
+
+
+/* Return true in case edge E is probably never executed.  */
+
+bool
+probably_never_executed_edge_p (struct function *fun, edge e)
+{
+  return probably_never_executed (fun, e->count, EDGE_FREQUENCY (e));
+}
+
 /* Return true if NODE should be optimized for size.  */
 
 bool
@@ -1951,11 +2007,39 @@
   if (val)
     {
       int percent = PARAM_VALUE (BUILTIN_EXPECT_PROBABILITY);
+      void **preds;
+      int hitrate;
 
       gcc_assert (percent >= 0 && percent <= 100);
+      /* This handles the cases like
+           while (__builtin_expect (exp, 1)) { ... }
+         W/o builtin_expect, the default HITRATE is 91%.
+         It does not make sense to estimate a lower probability of 90%
+         (current default for builtin_expect) with the annotation.
+         So here, we bump the probability by a small amount.  */
+      preds = pointer_map_contains (bb_predictions, bb);
+      hitrate = HITRATE (percent);
+      if (preds)
+        {
+          struct edge_prediction *pred;
+          int exit_hitrate = predictor_info [(int) PRED_LOOP_EXIT].hitrate;
+
+          for (pred = (struct edge_prediction *) *preds; pred;
+               pred = pred->ep_next)
+            {
+              if (pred->ep_predictor == PRED_LOOP_EXIT
+                  && exit_hitrate > hitrate)
+                {
+                  hitrate = exit_hitrate + HITRATE (4);
+                  if (hitrate > REG_BR_PROB_BASE)
+                    hitrate = REG_BR_PROB_BASE;
+                  break;
+                }
+            }
+        }
       if (integer_zerop (val))
-        percent = 100 - percent;
-      predict_edge (then_edge, PRED_BUILTIN_EXPECT, HITRATE (percent));
+        hitrate = REG_BR_PROB_BASE - hitrate;
+      predict_edge (then_edge, PRED_BUILTIN_EXPECT, hitrate);
     }
   /* Try "pointer heuristic."
      A comparison ptr == 0 is predicted as false.
@@ -2339,7 +2423,7 @@
   pointer_map_destroy (bb_predictions);
   bb_predictions = NULL;
 
-  estimate_bb_frequencies ();
+  estimate_bb_frequencies (false);
   free_dominance_info (CDI_POST_DOMINATORS);
   remove_fake_exit_edges ();
 }
@@ -2642,7 +2726,7 @@
     }
 }
 
-/* Estimate probabilities of loopback edges in loops at same nest level.  */
+/* Estimate frequencies in loops at same nest level.  */
 
 static void
 estimate_loops_at_level (struct loop *first_loop)
@@ -2692,6 +2776,120 @@
   BITMAP_FREE (tovisit);
 }
 
+/* Drop the profile for NODE to guessed, and update its frequency based on
+   whether it is expected to be hot given the CALL_COUNT.  */
+
+static void
+drop_profile (struct cgraph_node *node, gcov_type call_count)
+{
+  struct function *fn = DECL_STRUCT_FUNCTION (node->symbol.decl);
+  /* In the case where this was called by another function with a
+     dropped profile, call_count will be 0. Since there are no
+     non-zero call counts to this function, we don't know for sure
+     whether it is hot, and therefore it will be marked normal below.  */
+  bool hot = maybe_hot_count_p (NULL, call_count);
+
+  if (dump_file)
+    fprintf (dump_file,
+             "Dropping 0 profile for %s/%i. %s based on calls.\n",
+             cgraph_node_name (node), node->symbol.order,
+             hot ? "Function is hot" : "Function is normal");
+  /* We only expect to miss profiles for functions that are reached
+     via non-zero call edges in cases where the function may have
+     been linked from another module or library (COMDATs and extern
+     templates). See the comments below for handle_missing_profiles.
+     Also, only warn in cases where the missing counts exceed the
+     number of training runs. In certain cases with an execv followed
+     by a no-return call the profile for the no-return call is not
+     dumped and there can be a mismatch.  */
+  if (!DECL_COMDAT (node->symbol.decl) && !DECL_EXTERNAL (node->symbol.decl)
+      && call_count > profile_info->runs)
+    {
+      if (flag_profile_correction)
+        {
+          if (dump_file)
+            fprintf (dump_file,
+                     "Missing counts for called function %s/%i\n",
+                     cgraph_node_name (node), node->symbol.order);
+        }
+      else
+        warning (0, "Missing counts for called function %s/%i",
+                 cgraph_node_name (node), node->symbol.order);
+    }
+
+  profile_status_for_function (fn)
+      = (flag_guess_branch_prob ? PROFILE_GUESSED : PROFILE_ABSENT);
+  node->frequency
+      = hot ? NODE_FREQUENCY_HOT : NODE_FREQUENCY_NORMAL;
+}
+
+/* In the case of COMDAT routines, multiple object files will contain the same
+   function and the linker will select one for the binary. In that case
+   all the other copies from the profile instrument binary will be missing
+   profile counts. Look for cases where this happened, due to non-zero
+   call counts going to 0-count functions, and drop the profile to guessed
+   so that we can use the estimated probabilities and avoid optimizing only
+   for size.
+   
+   The other case where the profile may be missing is when the routine
+   is not going to be emitted to the object file, e.g. for "extern template"
+   class methods. Those will be marked DECL_EXTERNAL. Emit a warning in
+   all other cases of non-zero calls to 0-count functions.  */
+
+void
+handle_missing_profiles (void)
+{
+  struct cgraph_node *node;
+  int unlikely_count_fraction = PARAM_VALUE (UNLIKELY_BB_COUNT_FRACTION);
+  vec<struct cgraph_node *> worklist;
+  worklist.create (64);
+
+  /* See if 0 count function has non-0 count callers.  In this case we
+     lost some profile.  Drop its function profile to PROFILE_GUESSED.  */
+  FOR_EACH_DEFINED_FUNCTION (node)
+    {
+      struct cgraph_edge *e;
+      gcov_type call_count = 0;
+      struct function *fn = DECL_STRUCT_FUNCTION (node->symbol.decl);
+
+      if (node->count)
+        continue;
+      for (e = node->callers; e; e = e->next_caller)
+        call_count += e->count;
+      if (call_count
+          && fn && fn->cfg
+          && (call_count * unlikely_count_fraction >= profile_info->runs))
+        {
+          drop_profile (node, call_count);
+          worklist.safe_push (node);
+        }
+    }
+
+  /* Propagate the profile dropping to other 0-count COMDATs that are
+     potentially called by COMDATs we already dropped the profile on.  */
+  while (worklist.length () > 0)
+    {
+      struct cgraph_edge *e;
+
+      node = worklist.pop ();
+      for (e = node->callees; e; e = e->next_caller)
+        {
+          struct cgraph_node *callee = e->callee;
+          struct function *fn = DECL_STRUCT_FUNCTION (callee->symbol.decl);
+
+          if (callee->count > 0)
+            continue;
+          if (DECL_COMDAT (callee->symbol.decl) && fn && fn->cfg
+              && profile_status_for_function (fn) == PROFILE_READ)
+            {
+              drop_profile (node, 0);
+              worklist.safe_push (callee);
+            }
+        }
+    }
+  worklist.release ();
+}
+
 /* Convert counts measured by profile driven feedback to frequencies.
    Return nonzero iff there was any nonzero execution count.  */
 
@@ -2701,6 +2899,12 @@
   gcov_type count_max, true_count_max = 0;
   basic_block bb;
 
+  /* Don't overwrite the estimated frequencies when the profile for
+     the function is missing.  We may drop this function PROFILE_GUESSED
+     later in drop_profile ().  */
+  if (!flag_auto_profile && !ENTRY_BLOCK_PTR->count)
+    return 0;
+
   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
     true_count_max = MAX (bb->count, true_count_max);
 
@@ -2752,15 +2956,17 @@
   return false;
 }
 
-/* Estimate basic blocks frequency by given branch probabilities.  */
+/* Estimate and propagate basic block frequencies using the given branch
+   probabilities.  If FORCE is true, the frequencies are used to estimate
+   the counts even when there are already non-zero profile counts.  */
 
 void
-estimate_bb_frequencies (void)
+estimate_bb_frequencies (bool force)
 {
   basic_block bb;
   sreal freq_max;
 
-  if (profile_status != PROFILE_READ || !counts_to_freqs ())
+  if (force || profile_status != PROFILE_READ || !counts_to_freqs ())
     {
       static int real_values_initialized = 0;
 
@@ -2797,8 +3003,8 @@
 	    }
 	}
 
-      /* First compute probabilities locally for each loop from innermost
-         to outermost to examine probabilities for back edges.  */
+      /* First compute frequencies locally for each loop from innermost
+         to outermost to examine frequencies for back edges.  */
       estimate_loops ();
 
       memcpy (&freq_max, &real_zero, sizeof (real_zero));
@@ -2838,7 +3044,9 @@
       || (flag_auto_profile && profile_status == PROFILE_GUESSED))
     {
       int flags = flags_from_decl_or_type (current_function_decl);
-      if (lookup_attribute ("cold", DECL_ATTRIBUTES (current_function_decl))
+      if (profile_info && flag_auto_profile_accurate)
+	node->frequency = NODE_FREQUENCY_UNLIKELY_EXECUTED;
+      else if (lookup_attribute ("cold", DECL_ATTRIBUTES (current_function_decl))
 	  != NULL)
         node->frequency = NODE_FREQUENCY_UNLIKELY_EXECUTED;
       else if (lookup_attribute ("hot", DECL_ATTRIBUTES (current_function_decl))
@@ -2937,13 +3145,30 @@
 rebuild_frequencies (void)
 {
   timevar_push (TV_REBUILD_FREQUENCIES);
-  if (profile_status == PROFILE_GUESSED)
+
+  /* When the max bb count in the function is small, there is a higher
+     chance that there were truncation errors in the integer scaling
+     of counts by inlining and other optimizations. This could lead
+     to incorrect classification of code as being cold when it isn't.
+     In that case, force the estimation of bb counts/frequencies from the
+     branch probabilities, rather than computing frequencies from counts,
+     which may also lead to frequencies incorrectly reduced to 0. There
+     is less precision in the probabilities, so we only do this for small
+     max counts.  */
+  gcov_type count_max = 0;
+  basic_block bb;
+  FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
+    count_max = MAX (bb->count, count_max);
+
+  if (profile_status == PROFILE_GUESSED
+      || (!flag_auto_profile && profile_status == PROFILE_READ
+	  && count_max < REG_BR_PROB_BASE/10))
     {
       loop_optimizer_init (0);
       add_noreturn_fake_exit_edges ();
       mark_irreducible_loops ();
       connect_infinite_loops_to_exit ();
-      estimate_bb_frequencies ();
+      estimate_bb_frequencies (true);
       remove_fake_exit_edges ();
       loop_optimizer_finalize ();
     }
diff --git a/gcc/predict.h b/gcc/predict.h
index 559f803..83b1695 100644
--- a/gcc/predict.h
+++ b/gcc/predict.h
@@ -37,7 +37,8 @@
 
 extern void predict_insn_def (rtx, enum br_predictor, enum prediction);
 extern int counts_to_freqs (void);
-extern void estimate_bb_frequencies (void);
+extern void handle_missing_profiles (void);
+extern void estimate_bb_frequencies (bool);
 extern const char *predictor_name (enum br_predictor);
 extern tree build_predict_expr (enum br_predictor, enum prediction);
 extern void tree_estimate_probability (void);
diff --git a/gcc/recog.c b/gcc/recog.c
index f00859c..ad09630 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -3061,6 +3061,9 @@
   return 1;
 }
 
+/* Regno offset to be used in the register search.  */
+static int search_ofs;
+
 /* Try to find a hard register of mode MODE, matching the register class in
    CLASS_STR, which is available at the beginning of insn CURRENT_INSN and
    remains available until the end of LAST_INSN.  LAST_INSN may be NULL_RTX,
@@ -3076,7 +3079,6 @@
 peep2_find_free_register (int from, int to, const char *class_str,
 			  enum machine_mode mode, HARD_REG_SET *reg_set)
 {
-  static int search_ofs;
   enum reg_class cl;
   HARD_REG_SET live;
   df_ref *def_rec;
@@ -3541,6 +3543,7 @@
   /* Initialize the regsets we're going to use.  */
   for (i = 0; i < MAX_INSNS_PER_PEEP2 + 1; ++i)
     peep2_insn_data[i].live_before = BITMAP_ALLOC (&reg_obstack);
+  search_ofs = 0;
   live = BITMAP_ALLOC (&reg_obstack);
 
   FOR_EACH_BB_REVERSE (bb)
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index ae1bb36..fa62ab4 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -2437,6 +2437,8 @@
      cc0 setters remain at the end because they can't be moved away from
      their cc0 user.
 
+     Predecessors of SCHED_GROUP_P instructions at the end remain at the end.
+
      COND_EXEC insns cannot be moved past a branch (see e.g. PR17808).
 
      Insns setting TARGET_CLASS_LIKELY_SPILLED_P registers (usually return
@@ -2459,7 +2461,8 @@
 #endif
 		 || (!reload_completed
 		     && sets_likely_spilled (PATTERN (insn)))))
-	 || NOTE_P (insn))
+	 || NOTE_P (insn)
+	 || (last != 0 && SCHED_GROUP_P (last)))
     {
       if (!NOTE_P (insn))
 	{
diff --git a/gcc/stmt.c b/gcc/stmt.c
index e658ac6..319f47a 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -615,6 +615,9 @@
    CLOBBERS is a list of STRING_CST nodes each naming a hard register
    that is clobbered by this insn.
 
+   LABELS is a list of labels, and if LABELS is non-NULL, FALLTHRU_BB
+   should be the fallthru basic block of the asm goto.
+
    Not all kinds of lvalue that may appear in OUTPUTS can be stored directly.
    Some elements of OUTPUTS may be replaced with trees representing temporary
    values.  The caller should copy those temporary values to the originally
@@ -624,7 +627,8 @@
 
 static void
 expand_asm_operands (tree string, tree outputs, tree inputs,
-		     tree clobbers, tree labels, int vol, location_t locus)
+		     tree clobbers, tree labels, basic_block fallthru_bb,
+		     int vol, location_t locus)
 {
   rtvec argvec, constraintvec, labelvec;
   rtx body;
@@ -645,6 +649,7 @@
   enum machine_mode *inout_mode = XALLOCAVEC (enum machine_mode, noutputs);
   const char **constraints = XALLOCAVEC (const char *, noutputs + ninputs);
   int old_generating_concat_p = generating_concat_p;
+  rtx fallthru_label = NULL_RTX;
 
   /* An ASM with no outputs needs to be treated as volatile, for now.  */
   if (noutputs == 0)
@@ -944,8 +949,24 @@
 
   /* Copy labels to the vector.  */
   for (i = 0, tail = labels; i < nlabels; ++i, tail = TREE_CHAIN (tail))
-    ASM_OPERANDS_LABEL (body, i)
-      = gen_rtx_LABEL_REF (Pmode, label_rtx (TREE_VALUE (tail)));
+    {
+      rtx r;
+      /* If asm goto has any labels in the fallthru basic block, use
+	 a label that we emit immediately after the asm goto.  Expansion
+	 may insert further instructions into the same basic block after
+	 asm goto and if we don't do this, insertion of instructions on
+	 the fallthru edge might misbehave.  See PR58670.  */
+      if (fallthru_bb
+	  && label_to_block_fn (cfun, TREE_VALUE (tail)) == fallthru_bb)
+	{
+	  if (fallthru_label == NULL_RTX)
+	    fallthru_label = gen_label_rtx ();
+	  r = fallthru_label;
+	}
+      else
+	r = label_rtx (TREE_VALUE (tail));
+      ASM_OPERANDS_LABEL (body, i) = gen_rtx_LABEL_REF (Pmode, r);
+    }
 
   generating_concat_p = old_generating_concat_p;
 
@@ -1069,6 +1090,9 @@
 	emit_insn (body);
     }
 
+  if (fallthru_label)
+    emit_label (fallthru_label);
+
   /* For any outputs that needed reloading into registers, spill them
      back to where they belong.  */
   for (i = 0; i < noutputs; ++i)
@@ -1090,6 +1114,7 @@
   const char *s;
   tree str, out, in, cl, labels;
   location_t locus = gimple_location (stmt);
+  basic_block fallthru_bb = NULL;
 
   /* Meh... convert the gimple asm operands into real tree lists.
      Eventually we should make all routines work on the vectors instead
@@ -1125,6 +1150,9 @@
   n = gimple_asm_nlabels (stmt);
   if (n > 0)
     {
+      edge fallthru = find_fallthru_edge (gimple_bb (stmt)->succs);
+      if (fallthru)
+	fallthru_bb = fallthru->dest;
       t = labels = gimple_asm_label_op (stmt, 0);
       for (i = 1; i < n; i++)
 	t = TREE_CHAIN (t) = gimple_asm_label_op (stmt, i);
@@ -1150,7 +1178,7 @@
 
   /* Generate the ASM_OPERANDS insn; store into the TREE_VALUEs of
      OUTPUTS some trees for where the values were actually stored.  */
-  expand_asm_operands (str, outputs, in, cl, labels,
+  expand_asm_operands (str, outputs, in, cl, labels, fallthru_bb,
 		       gimple_asm_volatile_p (stmt), locus);
 
   /* Copy all the intermediate outputs into the specified outputs.  */
diff --git a/gcc/target.def b/gcc/target.def
index 7549e15..9705b6e 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -591,6 +591,19 @@
  "",
  int, (FILE *file, int verbose, rtx *ready, int *n_readyp, int clock), NULL)
 
+DEFHOOK
+(macro_fusion_p,
+ "This hook is used to check whether target platform supports macro fusion.",
+ bool, (void), NULL)
+
+DEFHOOK
+(macro_fusion_pair_p,
+ "This hook is used to check whether two insns could be macro fused for\n\
+target microarchitecture. If this hook returns true for the given insn pair\n\
+(@var{condgen} and @var{condjmp}), scheduler will put them into a sched\n\
+group, and they will not be scheduled apart.",
+ bool, (rtx condgen, rtx condjmp), NULL)
+
 /* The following member value is a pointer to a function called
    after evaluation forward dependencies of insns in chain given
    by two parameter values (head and tail correspondingly).  */
@@ -1106,6 +1119,14 @@
 #undef HOOK_PREFIX
 #define HOOK_PREFIX "TARGET_"
 
+DEFHOOK
+(builtin_has_mem_ref_p,
+ "This hook return whether the @var{i}th param of the @var{builtin_function}\n\
+is a memory reference. If @var{i} is -1, return whether the @var{builtin_function}\n\
+contains any memory reference type param.",
+ bool, (int builtin_function, int i),
+ default_builtin_has_mem_ref_p)
+
 /* Allow target specific overriding of option settings after options have
   been changed by an attribute or pragma or when it is reset at the
   end of the code affected by an attribute or pragma.  */
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 0142f72..6924352 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -543,6 +543,13 @@
 }
 
 bool
+default_builtin_has_mem_ref_p (int built_in_function ATTRIBUTE_UNUSED,
+			       int i ATTRIBUTE_UNUSED)
+{
+  return false;
+}
+
+bool
 hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false (
 	cumulative_args_t ca ATTRIBUTE_UNUSED,
 	enum machine_mode mode ATTRIBUTE_UNUSED,
diff --git a/gcc/targhooks.h b/gcc/targhooks.h
index d23b352..1ee73f4 100644
--- a/gcc/targhooks.h
+++ b/gcc/targhooks.h
@@ -82,6 +82,8 @@
 
 extern tree default_builtin_reciprocal (unsigned int, bool, bool);
 
+extern bool default_builtin_has_mem_ref_p (int, int);
+
 extern HOST_WIDE_INT default_vector_alignment (const_tree);
 
 extern bool default_builtin_vector_alignment_reachable (const_tree, bool);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9480a1b..4026f79 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,2946 +1,50 @@
-2013-09-24  Cong Hou  <congh@google.com>
-
-	Backport from mainline:
-	2013-09-24  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/58513
-	* g++.dg/vect/pr58513.cc: New testcase.
-
-2013-09-20  Cong Hou  <congh@google.com>
-
-	Backport from mainline:
-	2013-09-13  Cong Hou  <congh@google.com>
-
-	* gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product
-	on two arrays with short and int types. This should not be recognized
-	as a dot product pattern.
-
-2013-09-03  Richard Biener  <rguenther@suse.de>
+2014-02-03  Cong Hou  <congh@google.com>
 
 	Backport from mainline
-	2013-08-29  Richard Biener  <rguenther@suse.de>
+	2014-02-03  Cong Hou  <congh@google.com>
 
-	PR tree-optimization/58246
-	* gcc.dg/torture/pr58246.c: New testcase.
+	PR tree-optimization/60000
+	* g++.dg/vect/pr60000.cc: New test.
 
-2013-09-03  Richard Biener  <rguenther@suse.de>
+2014-01-13  Cong Hou  <congh@google.com>
 
-	Backport from mainline
-	2013-08-30  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/58228
-	* gcc.dg/torture/pr58228.c: New testcase.
-
-2013-09-03  Richard Biener  <rguenther@suse.de>
-
-	Backport from mainline
-	2013-08-30  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/58010
-	* gcc.dg/pr58010.c: New testcase.
-
-2013-08-30  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/58277
-	* gcc.c-torture/execute/pr58277-1.c: New test.
-	* gcc.c-torture/execute/pr58277-2.c: New test.
-
-2013-08-29  Jakub Jelinek  <jakub@redhat.com>
-
-	Backported from mainline
-	2013-07-22  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR testsuite/52641
-	* gcc.dg/torture/pr57381.c: Add dg-require-effective-target int32plus.
-
-	2013-05-27  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/57417
-	* gcc.dg/torture/pr57417.c: New testcase.
-
-	PR tree-optimization/57396
-	* gfortran.fortran-torture/execute/pr57396.f90: New testcase.
-
-	PR tree-optimization/57343
-	* gcc.dg/torture/pr57343.c: New testcase.
-
-	2013-05-23  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/57381
-	* gcc.dg/torture/pr57381.c: New testcase.
-
-2013-08-28  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/58257
-	* c-c++-common/gomp/pr58257.c: New test.
-
-2013-08-28  Richard Biener  <rguenther@suse.de>
-
-	Backport from mainline
-	2013-06-24  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/56977
-	* gcc.dg/pr56977.c: New testcase.
-
-2013-08-24  Mikael Morin  <mikael@gcc.gnu.org>
-
-	PR fortran/57798
-	* gfortran.dg/inline_sum_5.f90: New.
-
-2013-08-24  Janus Weil  <janus@gcc.gnu.org>
-
-	Backport from trunk:
-	2013-08-22  Janus Weil  <janus@gcc.gnu.org>
-
-	PR fortran/58185
-	* gfortran.dg/select_type_34.f90: New.
-
-2013-08-23  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/58218
-	* gcc.target/i386/pr58218.c: New test.
-
-	PR tree-optimization/58209
-	* gcc.c-torture/execute/pr58209.c: New test.
-
-2013-08-20  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/58190
-	* g++.dg/pr57878.C: Use __SIZE_TYPE__.
-
-2013-08-18  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/58006
-	* g++.dg/opt/pr58006.C: New test.
-
-2013-08-16  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/58164
-	* gcc.c-torture/compile/pr58164.c: New test.
-
-	PR tree-optimization/58165
-	* g++.dg/opt/pr58165.C: New test.
-
-2013-08-14  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/58145
-	* gcc.dg/pr58145-1.c: New test.
-	* gcc.dg/pr58145-2.c: New test.
-
-2013-08-13  Jakub Jelinek  <jakub@redhat.com>
-
-	PR sanitizer/56417
-	* gcc.dg/asan/pr56417.c: New test.
-
-2013-08-13  Vladimir Makarov  <vmakarov@redhat.com>
-
-	Backport from mainline
-	2013-06-06  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/57459
-	* gcc.target/i386/pr57459.c: New test.
-
-2013-08-13  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* gnat.dg/loop_optimization16.adb: New test.
-	* gnat.dg/loop_optimization16_pkg.ad[sb]: New helper.
-
-2013-08-13  Marek Polacek  <polacek@redhat.com>
-
-	PR tree-optimization/57980
-	* gcc.dg/pr57980.c: New test.
-
-2013-08-13  Uros Bizjak  <ubizjak@gmail.com>
-
-	Backport from mainline
-	2013-08-12  Perez Read  <netfirewall@gmail.com>
-
-        PR target/58132
-        * gcc.target/i386/movabs-1.c: New test.
-
-2013-08-11  Janus Weil  <janus@gcc.gnu.org>
-
-	Backport from trunk:
-	2013-08-09  Janus Weil  <janus@gcc.gnu.org>
-
-	PR fortran/58058
-	* gfortran.dg/transfer_intrinsic_6.f90: New.
-
-2013-08-09  Zhenqiang Chen  <zhenqiang.chen@linaro.org>
-
-	Backport from mainline:
-	2013-08-09  Zhenqiang Chen  <zhenqiang.chen@linaro.org>
-
-	* gcc.target/arm/lp1189445.c: New testcase.
-
-2013-08-06  Martin Jambor  <mjambor@suse.cz>
-	    Bernd Edlinger <bernd.edlinger@hotmail.de>
-
-	* gcc.dg/torture/pr58041.c (foo): Accept z by reference.
-	(a): Fix constructor.
-
-2013-08-06  Martin Jambor  <mjambor@suse.cz>
-
-	PR middle-end/58041
-	* gcc.dg/torture/pr58041.c: New test.
-	* gcc.target/arm/pr58041.c: Likewise.
-
-2013-08-02  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	Backport from mainline
-	2013-06-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-        * gcc.target/s390/htm-1.c: New file.
-        * gcc.target/s390/htm-nofloat-1.c: New file.
-        * gcc.target/s390/htm-xl-intrin-1.c: New file.
-
-2013-07-28  Tobias Burnus  <burnus@net-b.de>
-
-	Backport from mainline
-	2013-05-28  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/57435
-	* gfortran.dg/use_29.f90: New.
-
-2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/57981
-	* g++.dg/cpp0x/pr57981.C: New.
-
-2013-07-25  Terry Guo  <terry.guo@arm.com>
-
-	Backport from mainline:
-	2013-07-25  Terry Guo  <terry.guo@arm.com>
-
-	* gcc.target/arm/thumb1-Os-mult.c: New test case.
-
-2013-07-19  Wei Mi  <wmi@google.com>
-
-	Backport from mainline:
-	2013-07-18  Wei Mi  <wmi@google.com>
-
-	PR rtl-optimization/57878
-	* g++.dg/pr57878.C: New test.
-
-2013-07-19  Georg-Johann Lay  <avr@gjlay.de>
-
-	Backport from 2013-07-19 trunk r201051.
-
-	PR target/57516
-	* gcc.target/avr/torture/builtins-4-roundfx.c (test2hr, test2k):
-	Adjust to corrected rounding.
-
-2013-07-19  Kirill Yukhin  <kirill.yukhin@intel.com>
-
-	* gcc.target/i386/bmi-1.c: Extend with new instrinsics.
-	Fix scan patterns.
-	* gcc.target/i386/bmi-2.c: Ditto.
-	* gcc.target/i386/bmi-bextr-4.c: New.
-	* gcc.target/i386/bmi-bextr-5.c: Ditto.
-
-2013-07-16  Iain Sandoe  <iain@codesourcery.com>
-
-	PR target/55656
-	PR target/55657
-	* obj-c++.dg/cxx-ivars-3.mm: Use NSObject instead of Object.
-	* obj-c++.dg/strings/const-cfstring-5.mm: Likewise.
-	* obj-c++.dg/torture/strings/const-str-10.mm: Likewise.
-	* obj-c++.dg/torture/strings/const-str-9.mm: Likewise.
-	* objc.dg/image-info.m: Likewise.
-	* objc.dg/symtab-1.m: Likewise.
-	* objc.dg/torture/strings/const-str-10.m: Likewise.
-	* objc.dg/torture/strings/const-str-11.m: Likewise.
-	* objc.dg/torture/strings/const-str-9.m: Likewise.
-	* objc.dg/zero-link-1.m: Likewise.
-	* objc.dg/zero-link-2.m: Likewise.
-	* objc.dg/no-extra-load.m: Avoid Foundation.h.
-	* objc.dg/objc-foreach-4.m: Likewise.
-	* objc.dg/objc-foreach-5.m: Likewise.
-	* obj-c++.dg/proto-lossage-7.mm: Use NSObject instead of Object
-	(for Darwin).
-	* obj-c++.dg/strings/const-str-12.mm: Likewise.
-	* obj-c++.dg/syntax-error-1.mm: Likewise.
-	* objc.dg/method-6.m: Likewise.
-	* objc.dg/pr23214.m: Likewise.
-	* objc.dg/proto-lossage-7.m: Likewise.
-	* objc.dg/strings/const-str-12b.m: Likewise.
-	* objc.dg/zero-link-3.m: Likewise.
-	* obj-c++.dg/method-12.mm: Skip on Darwin versions without 'Object'.
-	* objc.dg/encode-7-next-64bit.m: Use NSObject instead of Object,
-	adjust headers, interfaces and encoded types to reflect current system
-	versions.  Add FIXME and outputs from current system compiler for
-	reference.
-
-2013-07-10  Janis Johnson  <janisjo@codesourcery.com>
-
-	* gcc.target/powerpc/20020118-1.c: Force 128-bit stack alignment
-	for EABI targets.
-	* gcc.c-torture/execute/nest-align-1.x: New.
-
-2013-07-08  Janis Johnson  <janisjo@codesourcery.com>
-
-	* gcc.target/powerpc/tfmode_off.c: Skip for EABI targets.
-
-	* gcc.target/powerpc/ppc-spe64-1.c: Update expected error message.
-
-	* gcc.target/powerpc/pr47197.c: Require powerpc_altivec_ok.
-
-2013-07-08  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/57785
-	* gfortran.dg/dot_product_2.f90: New.
-
-2013-07-08  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/57829
-	* gcc.c-torture/execute/pr57829.c: New test.
-
-2013-07-05  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/57645
-	* g++.dg/cpp0x/noexcept21.C: New.
-
-2013-07-03  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/57777
-	* gcc.target/i386/pr57777.c: New test.
-
-	PR c++/57771
-	* g++.dg/template/arg9.C: New test.
-
-2013-06-28  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/57736
-	* gcc.target/i386/pr57736.c: New test.
-
-2013-06-27  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/57623
-	* gcc.target/i386/bmi-bextr-3.c: New test.
-
-	PR target/57623
-	* gcc.target/i386/bmi2-bzhi-1.c: New test.
-
-2013-06-24  Martin Jambor  <mjambor@suse.cz>
-
-	PR tree-optimization/57358
-	* gcc.dg/ipa/pr57358.c: New test.
-
-2013-06-24  Alan Modra  <amodra@gmail.com>
-
-	* gcc.target/powerpc/altivec-consts.c: Correct for little-endian.
-	Add scan-assembler-not "lvx".
-	* gcc.target/powerpc/le-altivec-consts.c: New.
-
-2013-06-21  Uros Bizjak  <ubizjak@gmail.com>
-
-	Backport from mainline
-	2013-06-20  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/57655
-	* gcc.target/i386/pr57655.c: New test.
-
-2013-06-21  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/53211
-	* g++.dg/cpp0x/decltype55.C: New.
-
-2013-06-20  Wei Mi  <wmi@google.com>
-
-	Backport from mainline
-	2013-06-19  Wei Mi  <wmi@google.com>
-
-	PR rtl-optimization/57518
-	* testsuite/gcc.dg/pr57518.c: New test.
-
-2013-06-11  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/57508
-	* gfortran.dg/defined_assignment_7.f90: New.
-
-2013-06-10  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	Backport from mainline
-	2013-05-20  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	PR target/56547
-	* gcc.target/sh/pr56547-1.c: New.
-	* gcc.target/sh/pr56547-2.c: New.
-
-2013-06-09  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/57568
-	* gcc.c-torture/execute/pr57568.c: New test.
-
-2013-06-04  Tobias Burnus  <burnus@net-b.de>
-
-	Backport from mainline
-	2013-05-22  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/57364
-	* gfortran.dg/defined_assignment_6.f90: New.
-
-2013-05-31  Janus Weil  <janus@gcc.gnu.org>
-	    Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/57217
-	* gfortran.dg/typebound_override_4.f90: New.
-
-2013-05-31  Release Manager
-
-	* GCC 4.8.1 released.
-
-2013-05-26  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* gnat.dg/specs/last_bit.ads: New test.
-
-2013-05-24  Greta Yorsh  <Greta.Yorsh@arm.com>
-
-	Backport from mainline
-	2013-05-02  Greta Yorsh  <Greta.Yorsh@arm.com>
-
-	PR target/56732
-	* gcc.target/arm/pr56732-1.c: New test.
-
-2013-05-24  Alexander Ivchenko  <alexander.ivchenko@intel.com>
-
-	PR tree-ssa/57385
-	* gcc.dg/tree-ssa/pr57385.c: New test.
-
-2013-05-23  Martin Jambor  <mjambor@suse.cz>
-
-	PR middle-end/57347
-	* gcc.dg/ipa/pr57347.c: New test.
-
-2013-05-23  Richard Biener  <rguenther@suse.de>
-
-	PR rtl-optimization/57341
-	* gcc.dg/torture/pr57341.c: New testcase.
-
-2013-05-23  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/57344
-	* gcc.c-torture/execute/pr57344-1.c: New test.
-	* gcc.c-torture/execute/pr57344-2.c: New test.
-	* gcc.c-torture/execute/pr57344-3.c: New test.
-	* gcc.c-torture/execute/pr57344-4.c: New test.
-
-2013-05-22  Richard Biener  <rguenther@suse.de>
-
-	Backport from mainline
-	2013-05-21  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/57330
-	* gcc.dg/torture/pr57330.c: New testcase.
-
-	2013-05-21  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/57303
-	* gcc.dg/torture/pr57303.c: New testcase.
-
-2013-05-21  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/57321
-	* gcc.c-torture/execute/pr57321.c: New test.
-
-2013-05-17  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/57281
-	PR rtl-optimization/57300
-	* gcc.dg/pr57300.c: New test.
-	* gcc.c-torture/execute/pr57281.c: New test.
-
-2013-05-16  Dodji Seketeli  <dodji@redhat.com>
-
-	PR c++/56782 - Regression with empty pack expansions
-	* g++.dg/cpp0x/variadic142.C: New test file.
-
-2013-05-14  Jakub Jelinek  <jakub@redhat.com>
-
-	PR c++/57274
-	* c-c++-common/Wsequence-point-1.c: New test.
-
-	PR middle-end/57251
-	* gcc.dg/torture/pr57251.c: New test.
-
-2013-05-13  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/57264
-	* gcc.target/i386/pr57264.c: New test.
-
-2013-05-13  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/57230
-	* gcc.dg/strlenopt-23.c: New test.
-
-2013-05-10  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/57214
-	* gcc.dg/torture/pr57214.c: New testcase.
-
-2013-05-09  Martin Jambor  <mjambor@suse.cz>
-
-        PR middle-end/56988
-        * gcc.dg/ipa/pr56988.c: New test.
-
-2013-05-08  Marc Glisse  <marc.glisse@inria.fr>
-
-	* c-c++-common/vector-scalar-2.c: New testcase.
-
-2013-05-07  Tobias Burnus  <burnus@net-b.de>
-
-	Backport from mainline
-	2013-05-02  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/57142
-	* gfortran.dg/size_kind_2.f90: New.
-	* gfortran.dg/size_kind_3.f90: New.
-
-2013-05-07  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/57149
-	* gcc.dg/pr57149.c: New test.
-
-	PR debug/57184
-	* gcc.dg/pr57184.c: New test.
-
-2013-05-07  Richard Biener  <rguenther@suse.de>
-
-	Backport from mainline
-	2013-05-06  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/57185
-	* gcc.dg/autopar/pr57185.c: New testcase.
-
-	2013-04-19  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/57000
-	* gcc.dg/tree-ssa/reassoc-27.c: New testcase.
-
-2013-05-07  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* gnat.dg/specs/array3.ads: New test.
-
-2013-05-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
-
-	Backport from trunk
-	2013-05-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
-
-	PR target/57150
-	* gcc.target/powerpc/pr57150.c: New file.
-
-2013-05-06  Uros Bizjak  <ubizjak@gmail.com>
-
-	Backport from mainline
-	2013-05-06  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/57106
-	* gcc.target/i386/pr57106.c: New test.
-
-2013-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/57183
-	* g++.dg/cpp0x/auto38.C: New.
-
-2013-05-04  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56205
-	* gcc.dg/tree-ssa/stdarg-6.c: Add cleanup-tree-dump "stdarg".
-
-2013-05-03  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/57130
-	* gcc.c-torture/execute/pr57130.c: New test.
-
-2013-05-03  Marek Polacek  <polacek@redhat.com>
-
-	Backport from mainline
-	2013-04-25  Marek Polacek  <polacek@redhat.com>
-
-	PR tree-optimization/57066
-        * gcc.dg/torture/builtin-logb-1.c: Adjust testcase.
-
-2013-05-02  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/57131
-	* gcc.c-torture/execute/pr57131.c: New test.
-
-2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
-
-	Backport from mainline
-	PR target/57091
-	* gcc.target/i386/pr57091.c: New test.
-
-2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
-
-	Backport from mainline
-	2013-04-29  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR target/57097
-	* gcc.target/i386/pr57097.c: New test.
-
-2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
-
-	Backport from mainline
-	2013-04-24  Vladimir Makarov  <vmakarov@redhat.com>
-
-        PR rtl-optimizations/57046
-        * gcc.target/i386/pr57046.c: New test.
-
-2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
-
-	Backport from mainline
-	2013-04-22  Vladimir Makarov  <vmakarov@redhat.com>
-
-        PR target/57018
-        * gcc.target/i386/pr57018.c: New test.
-
-2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
-
-	Backport from mainline
-	2013-04-18  Jakub Jelinek  <jakub@redhat.com>
-
-        PR rtl-optimization/56999
-        * g++.dg/opt/pr56999.C: New test.
-
-2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
-
-	Backport from mainline
-	2013-04-19  Vladimir Makarov  <vmakarov@redhat.com>
-
-        PR rtl-optimization/56847
-        * gcc.dg/pr56847.c: New test.
-
-2013-05-02  Ian Bolton  <ian.bolton@arm.com>
-
-	Backport from mainline (fix to botched commit)
-	2013-04-04  Tejas Belagod  <tejas.belagod@arm.com>
-
-	* gcc.target/aarch64/inc/asm-adder-clobber-lr.c: Remove duplication.
-	* gcc.target/aarch64/inc/asm-adder-no-clobber-lr.c: Likewise.
-	* gcc.target/aarch64/test-framepointer-1.c: Likewise.
-	* gcc.target/aarch64/test-framepointer-2.c: Likewise.
-	* gcc.target/aarch64/test-framepointer-3.c: Likewise.
-	* gcc.target/aarch64/test-framepointer-4.c: Likewise.
-	* gcc.target/aarch64/test-framepointer-5.c: Likewise.
-	* gcc.target/aarch64/test-framepointer-6.c: Likewise.
-	* gcc.target/aarch64/test-framepointer-7.c: Likewise.
-	* gcc.target/aarch64/test-framepointer-8.c: Likewise.
-
-	Backport from mainline
-	2013-03-28  Ian Bolton  <ian.bolton@arm.com>
-
-	* gcc.target/aarch64/inc/asm-adder-clobber-lr.c: New test.
-	* gcc.target/aarch64/inc/asm-adder-no-clobber-lr.c: Likewise.
-	* gcc.target/aarch64/test-framepointer-1.c: Likewise.
-	* gcc.target/aarch64/test-framepointer-2.c: Likewise.
-	* gcc.target/aarch64/test-framepointer-3.c: Likewise.
-	* gcc.target/aarch64/test-framepointer-4.c: Likewise.
-	* gcc.target/aarch64/test-framepointer-5.c: Likewise.
-	* gcc.target/aarch64/test-framepointer-6.c: Likewise.
-	* gcc.target/aarch64/test-framepointer-7.c: Likewise.
-	* gcc.target/aarch64/test-framepointer-8.c: Likewise.
-
-2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/57092
-	* g++.dg/cpp0x/decltype53.C: New.
-
-2013-04-30  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/57104
-	* gcc.dg/pr57104.c: New test.
-
-2013-04-30  Uros Bizjak  <ubizjak@gmail.com>
-
-	Backport from mainline
-	2013-04-29  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/44578
-	* gcc.target/i386/pr44578.c: New test.
-
-	Backport from mainline
-	2013-04-29  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/57098
-	* gcc.target/i386/pr57098.c: New test.
-
-2013-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/56450
-	* g++.dg/cpp0x/decltype52.C: New.
-
-2013-04-29  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/57103
-	* gcc.dg/autopar/pr57103.c: New testcase.
-
-2013-04-29  Christian Bruel  <christian.bruel@st.com>
-
-	PR target/57108
-	* gcc.target/sh/pr57108.c: New test.
-
-2013-04-29  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/57083
-	* gcc.dg/torture/pr57083.c: New test.
-
-2013-04-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
-
-	Backport from trunk:
-
-	PR fortran/51825
-	* gfortran.dg/namelist_77.f90: New test.
-	* gfortran.dg/namelist_78.f90: New test.
-
-2013-04-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
-
-	PR fortran/56786
-	* gfortran.dg/namelist_81.f90:  New test.
-
-2013-04-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
-
-	Backport from trunk:
-
-	PR fortran/52512
-	* gfortran.dg/namelist_79.f90: New test.
-
-2013-04-27  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/56866
-	* gcc.c-torture/execute/pr56866.c: New test.
-	* gcc.target/i386/pr56866.c: New test.
-
-2013-04-26  Janus Weil  <janus@gcc.gnu.org>
-
-	Backports from trunk:
-
-	PR fortran/56968
-	* gfortran.dg/proc_ptr_41.f90: New.
-
-	PR fortran/56814
-	* gfortran.dg/proc_ptr_42.f90: New.
-
-	PR fortran/53685
-	PR fortran/57022
-	* gfortran.dg/transfer_check_4.f90: New.
-
-2013-04-25  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/57003
-	* gcc.target/i386/pr57003.c: New test.
-
-2013-04-25  Ian Bolton  <ian.bolton@arm.com>
-
-	Backported from mainline.
-	2013-03-22  Ian Bolton  <ian.bolton@arm.com>
-
-	* gcc.target/aarch64/movk.c: New test.
-
-2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/56970
-	* g++.dg/cpp0x/sfinae45.C: New.
-
-2013-04-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
-
-	Backported from mainline.
-	PR rtl-optimization/56605
-	* gcc.target/powerpc/pr56605.c: New.
-
-2013-04-22  Marek Polacek  <polacek@redhat.com>
-
-	Backport from mainline
-	2013-04-22  Marek Polacek  <polacek@redhat.com>
-
-	PR sanitizer/56990
-	* gcc.dg/pr56990.c: New test.
-
-2013-04-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
-	    Mikael Morin  <mikael@gcc.gnu.org>
-
-	PR fortran/56872
-	* gfortran.dg/array_constructor_45.f90:  New test.
-	* gfortran.dg/array_constructor_46.f90:  New test.
-	* gfortran.dg/array_constructor_47.f90:  New test.
-	* gfortran.dg/array_constructor_40.f90:  Adjust number of
-	while loops.
-
-2013-04-18  Mikael Morin  <mikael@gcc.gnu.org>
-
-	PR fortran/56816
-	* gfortran.dg/select_type_33.f03: New test.
-
-2013-04-18  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56984
-	* gcc.c-torture/compile/pr56984.c: New test.
-
-	PR rtl-optimization/56992
-	* gcc.dg/pr56992.c: New test.
-
-2013-04-16  Uros Bizjak  <ubizjak@gmail.com>
-
-	Backport from mainline
-	2013-04-16  Uros Bizjak  <ubizjak@gmail.com>
-
-	* g++.dg/ipa/devirt-c-7.C: Require nonpic effective target.
-	* gcc.c-torture/execute/pr33992.x: Remove.
-	* gcc.c-torture/execute/pr33992.c (foo): Declare as static.
-	* gcc.dg/uninit-pred-5_a.c (foo): Ditto.
-	* gcc.dg/uninit-pred-5_b.c (foo): Ditto.
-
-	Backport from mainline
-	2013-03-27  Alexander Ivchenko  <alexander.ivchenko@intel.com>
-
-	* g++.dg/ipa/ivinline-1.C: Add target nonpic.
-	* g++.dg/ipa/ivinline-2.C: Likewise.
-	* g++.dg/ipa/ivinline-3.C: Likewise.
-	* g++.dg/ipa/ivinline-4.C: Likewise.
-	* g++.dg/ipa/ivinline-5.C: Likewise.
-	* g++.dg/ipa/ivinline-7.C: Likewise.
-	* g++.dg/ipa/ivinline-8.C: Likewise.
-	* g++.dg/ipa/ivinline-9.C: Likewise.
-	* g++.dg/cpp0x/noexcept03.C: Likewise.
-	* gcc.dg/const-1.c: Likewise.
-	* gcc.dg/ipa/pure-const-1.c: Likewise.
-	* gcc.dg/noreturn-8.c: Likewise.
-	* gcc.target/i386/mmx-1.c: Likewise.
-	* gcc.dg/tree-ssa/ipa-split-5.c: Likewise.
-	* gcc.dg/tree-ssa/loadpre6.c: Likewise.
-	* gcc.c-torture/execute/pr33992.x: New file.
-
-2013-04-15  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56962
-	* gcc.c-torture/execute/pr56962.c: New test.
-
-2013-04-15  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* gcc.dg/pr56890-1.c: New test.
-	* gcc.dg/pr56890-2.c: Likewise.
-
-2013-04-12  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR target/56903
-	* gcc.target/i386/pr56903.c: New test.
-
-2013-04-12  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56918
-	PR tree-optimization/56920
-	* gcc.dg/vect/pr56918.c: New test.
-	* gcc.dg/vect/pr56920.c: New test.
-
-2013-04-11  Jakub Jelinek  <jakub@redhat.com>
-
-	PR c++/56895
-	* g++.dg/template/arrow4.C: New test.
-
-2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/56913
-	* g++.dg/cpp0x/sfinae44.C: New.
-
-2013-04-11  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	Backported from mainline.
-	2013-04-11  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* gcc.target/aarch64/vect-fcm.x: Add check for zero forms of
-	inverse operands.
-	* gcc.target/aarch64/vect-fcm-eq-d.c: Check that new zero form
-	loop is vectorized.
-	* gcc.target/aarch64/vect-fcm-eq-f.c: Likewise.
-	* gcc.target/aarch64/vect-fcm-ge-d.c: Check that new zero form
-	loop is vectorized and that the correct instruction is generated.
-	* gcc.target/aarch64/vect-fcm-ge-f.c: Likewise.
-	* gcc.target/aarch64/vect-fcm-gt-d.c: Likewise.
-	* gcc.target/aarch64/vect-fcm-gt-f.c: Likewise.
-
-2013-04-11  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56899
-	* gcc.c-torture/execute/pr56899.c: New test.
-
-2013-04-10  Jakub Jelinek  <jakub@redhat.com>
-
-	PR c++/56895
-	* g++.dg/template/arrow3.C: New test.
-
-	Backported from mainline
-	2013-04-09  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56883
-	* c-c++-common/gomp/pr56883.c: New test.
-
-2013-04-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
-
-	PR fortran/56782
-	Backport from trunk.
-	* gfortran.dg/array_constructor_44.f90:  New test.
-
-2013-04-08  Jakub Jelinek  <jakub@redhat.com>
-
-	* gcc.c-torture/execute/pr56837.c: New test.
-
-2013-04-04  Marek Polacek  <polacek@redhat.com>
-
-	Backport from mainline:
-	2013-04-04  Marek Polacek  <polacek@redhat.com>
-
-	PR tree-optimization/48186
-	* gcc.dg/pr48186.c: New test.
-
-2013-04-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
-
-	Backport from mainline:
-	2013-03-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
-
-	PR target/56720
-	* gcc.target/arm/neon-vcond-gt.c: New test.
-	* gcc.target/arm/neon-vcond-ltgt.c: Likewise.
-	* gcc.target/arm/neon-vcond-unordered.c: Likewise.
-
-2013-04-04  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56837
-	* g++.dg/torture/pr56837.C: New testcase.
-
-2013-04-03  Marek Polacek  <polacek@redhat.com>
-
-	Backport from mainline:
-	2013-04-03  Marek Polacek  <polacek@redhat.com>
-
-	PR sanitizer/55702
-	* gcc.dg/pr55702.c: New test.
-
-2013-04-03  Jakub Jelinek  <jakub@redhat.com>
-
-	PR debug/56819
-	* g++.dg/debug/pr56819.C: New test.
-
-2013-04-03  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56817
-	* g++.dg/torture/pr56817.C: New testcase.
-
-2013-04-03  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/55964
-	* gcc.dg/torture/pr55964-2.c: New testcase.
-
-2013-04-03  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56501
-	* gcc.dg/torture/pr56501.c: New testcase.
-
-2013-04-03  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56407
-	* gcc.dg/torture/pr56407.c: New testcase.
-
-2013-04-02  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/56745
-	* gcc.c-torture/compile/pr56745.c: New test.
-
-2013-04-02  Tobias Burnus  <burnus@net-b.de>
-
-	Backport from mainline:
-	2013-03-28  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/56735
-	* gfortran.dg/namelist_80.f90: New.
-
-2013-04-02  Tobias Burnus  <burnus@net-b.de>
-
-	Backport from mainline:
-	2013-03-29  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/56737
-	* testsuite/gfortran.dg/fmt_cache_3.f90: New.
-
-2013-04-02  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/56768
-	* g++.dg/torture/pr56768.C: New testcase.
-
-2013-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/55951
-	* g++.dg/ext/desig5.C: New.
-
-2013-03-29  Kirill Yukhin  <kirill.yukhin@intel.com>
-
-	* gcc.target/i386/avx2-vbroadcastsi128-1.c: Fix intrinsic name.
-	* gcc.target/i386/avx2-vbroadcastsi128-1.c: Ditto.
-
-2013-03-28  Tejas Belagod  <tejas.belagod@arm.com>
-
-	PR middle-end/56694
-	* g++.dg/torture/pr56694.C: Fix test case to build on bare-metal
-	targets.
-
-2013-03-25  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/56722
-	* g++.dg/cpp0x/range-for23.C: New.
-
-2013-03-25  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/56694
-	* g++.dg/torture/pr56694.C: New testcase.
-
-2013-03-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
-
-	Backport from mainline:
-	2013-03-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
-
-	PR fortran/54932
-	* gfortran.dg/do_1.f90: Don't xfail.
-
-2013-03-24  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/56696
-	* gfortran.dg/eof_5.f90: New.
-
-2013-03-22  Sebastian Huber  <sebastian.huber@embedded-brains.de>
-
-	* gcc.c-torture/execute/builtins/builtins.exp: Sort targets
-	alphabetically.
-
-2013-03-22  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/56582
-	* g++.dg/cpp0x/constexpr-array5.C: New.
-
-2013-03-22  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR target/56560
-	* gcc.target/i386/pr56560.c: New file.
-
-2013-03-22  Sebastian Huber  <sebastian.huber@embedded-brains.de>
-
-	PR testsuite/55994
-	* gcc.c-torture/execute/builtins/builtins.exp: Add
-	-Wl,--allow-multiple-definition for RTEMS targets.
-
-2013-03-22  Jakub Jelinek  <jakub@redhat.com>
-
-	Backported from mainline
-	2013-03-16  Jakub Jelinek  <jakub@redhat.com>
-
-	PR c++/56607
-	* g++.dg/warn/Wdiv-by-zero-2.C: New test.
-	* c-c++-common/pr56607.c: New test.
-
-2013-03-22  Release Manager
-
-	* GCC 4.8.0 released.
-
-2013-03-20  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56661
-	* gcc.dg/torture/pr56661.c: New testcase.
-
-2013-03-20  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56635
-	* g++.dg/torture/pr56635.C: New test.
-
-2013-03-15  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/56615
-	* gfortran.dg/transfer_intrinsic_5.f90: New.
-
-2013-03-15  Kai Tietz  <ktietz@redhat.com>
-
-	* gcc.target/i386/movti.c: Don't test for x64 mingw.
-	* gcc.target/i386/pr20020-1.c: Likewise.
-	* gcc.target/i386/pr20020-2.c: Likewise.
-	* gcc.target/i386/pr20020-3.c: Likewise.
-	* gcc.target/i386/pr53425-1.c: Likewise.
-	* gcc.target/i386/pr53425-2.c: Likewise.
-	* gcc.target/i386/pr55093.c: Likewise.
-	* gcc.target/i386/pr53907.c: Adjust test for LLP64 targets.
-
-2013-03-15  Jakub Jelinek  <jakub@redhat.com>
-
-	PR debug/56307
-	* gcc.dg/tree-ssa/pr55579.c: Add -fvar-tracking-assignments to
-	dg-options.  Remove 32-bit hppa*-*-hpux* xfail.
-
-2013-03-14  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/53265
-	* gcc.dg/graphite/scop-3.c (toto): Increase array size to avoid
-	undefined behavior.
-	* gcc.dg/graphite/id-6.c (test): Likewise.
-	* gcc.dg/graphite/pr35356-2.c: Adjust regexp patterns to only look for
-	MIN_EXPR and MAX_EXPR in GIMPLE stmts.
-
-	PR tree-optimization/53265
-	* gcc.dg/pr53265.c: New test.
-	* gcc.dg/torture/pr49518.c: Add -Wno-aggressive-loop-optimizations
-	to dg-options.
-	* g++.dg/opt/longbranch2.C (EBCOTLut): Double sizes of a2 and a3
-	arrays.
-	* gcc.dg/tree-ssa/cunroll-10.c (main): Rename to foo.  Add argument
-	n, use it as high bound instead of 4.
-
-2013-03-13  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	PR target/49880
-	* gcc.target/sh/pr49880-1.c: New.
-	* gcc.target/sh/pr49880-2.c: New.
-	* gcc.target/sh/pr49880-3.c: New.
-	* gcc.target/sh/pr49880-4.c: New.
-	* gcc.target/sh/pr49880-5.c: New.
-
-2013-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	* g++.dg/cpp0x/alias-decl-32.C: Remove redundant bits.
-
-2013-03-13  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56608
-	* gcc.dg/vect/fast-math-bb-slp-call-3.c: New testcase.
-
-2013-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/56611
-	* g++.dg/cpp0x/alias-decl-32.C: New.
-
-2013-03-11  Jan Hubicka  <jh@suse.cz>
-
-	PR middle-end/56571
-	* gcc.c-torture/compile/pr56571.c: New testcase.
-
-2013-03-11  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
-
-	* gcc.dg/tree-ssa/vector-4.c: Add comment regarding xfail.
-	* gcc.dg/tree-ssa/pr55579.c: Likewise.
-
-2013-03-11  Dominique d'Humieres  <dominiq@lps.ens.fr>
-
-	* gcc.dg/inline_3.c: Remove target and dg-excess-errors.
-	* gcc.dg/inline_4.c: Likewise.
-	* gcc.dg/unroll_2.c: Likewise.
-	* gcc.dg/unroll_3.c: Likewise.
-	* gcc.dg/unroll_4.c: Likewise.
-
-2013-03-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
-
-	PR testsuite/54119
-	* gcc.dg/tree-ssa/vector-4.c: xfail on 32-bit hppa*-*-*.
-
-	PR debug/56307
-	* gcc.dg/tree-ssa/pr55579.c: xfail 32-bit hppa*-*-hpux*.
-
-2013-03-11  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	PR target/40797
-	* gcc.c-torture/compile/pr40797.c: New.
-
-2013-03-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
-
-	* gcc.dg/pr44194-1.c: Skip compilation on hppa*64*-*-*.
-
-2013-03-10  Paul Thomas  <pault@gcc.gnu.org>
-
-	PR fortran/56575
-	* gfortran.dg/class_56.f90: New test.
-
-2013-03-09  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	PR middle-end/56524
-	* gcc.target/mips/pr56524.c: New test.
-
-2013-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/56565
-	* g++.dg/cpp0x/lambda/lambda-nsdmi2.C: New.
-
-2013-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/51412
-	* g++.dg/cpp0x/lambda/lambda-err3.C: New.
-
-2013-03-08  Marek Polacek  <polacek@redhat.com>
-
-	PR tree-optimization/56478
-	* gcc.dg/torture/pr56478.c: New test.
-
-2013-03-08  Kai Tietz  <ktietz@redhat.com>
-
-	* gcc.c-torture/execute/builtins/builtins.exp: Add for mingw
-	targets linker option --allow-multiple-definition.
-
-	* gcc.dg/pr14092-1.c: Mark intptr_t typedef to use extension.
-	* gcc.dg/pr24683.c: Avoid warning about casting constant string.
-	* gcc.dg/pr52549.c: Add LLP64 case.
-	* gcc.dg/pr53701.c: Use for uintptr_t typedef __UINTPTR_TYPE__.
-	* gcc.dg/pr56510.c: Adjust for LLP64 targets.
-	* gcc.dg/torture/pr51071-2.c: Likewise.
-	* gcc.dg/tree-ssa/vrp72.c: Likewise.
-	* gcc.dg/tree-ssa/vrp73.c: Likewise.
-	* gcc.dg/tree-ssa/vrp75.c: Likewise.
-	* gcc.dg/torture/pr53922.c: Skip test for mingw-targets.
-	* gcc.dg/weak/weak-1.c: Likewise.
-	* gcc.dg/weak/weak-2.c: Likewise.
-	* gcc.dg/weak/weak-3.c: Likewise.
-	* gcc.dg/weak/weak-4.c: Likewise.
-	* gcc.dg/weak/weak-5.c: Likewise.
-	* gcc.dg/weak/weak-15.c: Likewise.
-	* gcc.dg/weak/weak-16.c: Likewise.
-
-	* c-c++-common/pr54486.c: Skip test for mingw-targets.
-
-2013-03-07  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56559
-	* gcc.dg/tree-ssa/reassoc-26.c: New test.
-
-2013-03-07  Andreas Schwab  <schwab@suse.de>
-
-	* gcc.dg/pr31490.c: Fix last change.
-
-2013-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/56534
-	* g++.dg/template/crash115.C: New.
-
-2013-03-06  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56539
-	* gcc.c-torture/compile/pr56539.c: New test.
-
-2013-03-06  Kai Tietz  <ktietz@redhat.com>
-
-	* gcc.dg/lto/20090914-2_0.c: Skip for mingw and cygwin targets.
-	* gcc.dg/lto/20091013-1_1.c: Set x64-mingw as xfail.
-	* gcc.dg/lto/20091013-1_2.c: Likewise.
-	* gcc.dg/pr31490.c: Adjust for LLP64 targets.
-
-2013-03-06  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* gnat.dg/specs/aggr6.ads: New test.
-
-2013-03-06  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* gnat.dg/loop_optimization15.ad[sb]: New test.
-
-2013-03-06  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56548
-	* gcc.dg/pr56548.c: New test.
-
-2013-03-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
-
-	PR debug/53363
-	* g++.dg/debug/dwarf2/thunk1.C: Skip on darwin.
-
-2013-03-06  Jakub Jelinek  <jakub@redhat.com>
-
-	PR c++/56543
-	* g++.dg/template/typename20.C: New test.
-
-2013-03-05  Jakub Jelinek  <jakub@redhat.com>
-
-	PR debug/56510
-	* gcc.dg/pr56510.c: New test.
-
-	PR rtl-optimization/56484
-	* gcc.c-torture/compile/pr56484.c: New test.
-
-2013-03-05  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/56530
-	* g++.dg/warn/Wsign-conversion-2.C: New.
-
-2013-03-05  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56270
-	* gcc.dg/vect/slp-38.c: New testcase.
-
-2013-03-05  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/56494
-	* gcc.dg/pr56494.c: New test.
-
-2013-01-04  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* gcc.dg/pr56424.c: New test.
-
-2013-03-04  Georg-Johann Lay  <avr@gjlay.de>
-
-	* gcc.dg/pr55153.c: Add dg-require-effective-target scheduling.
-	* gcc.dg/pr56228.c <avr>: Skip.
-
-2013-03-04  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR testsuite/52641
-	PR tree-optimization/52631
-	* gcc.dg/tree-ssa/pr52631.c: Fix 16-bit int.
-
-2013-03-03  David Edelsohn  <dje.gcc@gmail.com>
-
-	* gcc.dg/vect/vect-82_64.c: Skip on AIX.
-	* gcc.dg/vect/vect-83_64.c: Same.
-
-2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
-
-	PR fortran/56477
-	* gfortran.dg/pointer_check_13.f90: New test.
-
-2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
-
-	PR fortran/54730
-	* gfortran.dg/array_constructor_42.f90: New test.
-
-2013-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/52688
-	* g++.dg/template/static33.C: New.
-	* g++.dg/template/static34.C: Likewise.
-
-	PR c++/10291
-	* g++.dg/template/static35.C: New.
-
-2013-03-01  Steve Ellcey  <sellcey@mips.com>
-
-	* gcc.dg/pr56396.c: Require pic support.
-
-2013-03-01  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/55481
-	* gcc.dg/torture/pr56488.c: New testcase.
-
-2013-02-28  Konstantin Serebryany  <konstantin.s.serebryany@gmail.com>
-	    Jakub Jelinek  <jakub@redhat.com>
-
-	PR sanitizer/56454
-	* g++.dg/asan/default-options-1.C (__asan_default_options): Use
-	no_sanitize_address attribute rather than no_address_safety_analysis.
-	* g++.dg/asan/sanitizer_test_utils.h
-	(ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS): Likewise.
-	* c-c++-common/asan/attrib-1.c: Test no_sanitize_address attribute
-	in addition to no_address_safety_analysis.
-
-2013-02-28  Jason Merrill  <jason@redhat.com>
-
-	PR c++/56481
-	* g++.dg/cpp0x/constexpr-and.C: New.
-
-2013-02-28  Martin Jambor  <mjambor@suse.cz>
-
-	PR tree-optimization/56294
-	* g++.dg/debug/pr56294.C: New test.
-
-2013-02-28  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* g++.old-deja/g++.pt/ptrmem6.C(main): Add xfail aarch64*-*-*.
-
-2013-02-27  Marek Polacek  <polacek@redhat.com>
-
-	PR rtl-optimization/56466
-	* gcc.dg/pr56466.c: New test.
-
-2013-02-28  Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>
-
-	* gcc.dg/tree-ssa/slsr-1.c: Allow widening multiplications.
-	* gcc.dg/tree-ssa/slsr-2.c: Likewise.
-	* gcc.dg/tree-ssa/slsr-3.c: Likewise.
-
-2013-02-27  Andrey Belevantsev  <abel@ispras.ru>
-
-	PR middle-end/45472
-	* gcc.dg/pr45472.c: New test.
-
-2013-02-26  Marek Polacek  <polacek@redhat.com>
-
-	PR tree-optimization/56426
-	* gcc.dg/pr56436.c: New test.
-
-2013-02-26  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56448
-	* gcc.c-torture/compile/pr56448.c: New test.
-
-	PR tree-optimization/56443
-	* gcc.dg/torture/pr56443.c: New test.
-
-2013-02-25  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56175
-	* gcc.dg/tree-ssa/forwprop-24.c: New testcase.
-
-2013-02-24  Jakub Jelinek  <jakub@redhat.com>
-
-	PR c++/56403
-	* g++.dg/torture/pr56403.C: New test.
-
-2013-02-25  Catherine Moore  <clm@codesourcery.com>
-
-	Revert:
-	2013-02-24  Catherine Moore  <clm@codesourcery.com>
-	Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* gcc.target/mips/mips.exp: Add microMIPS support.
-	* gcc.target/mips/umips-movep-2.c: New test.
-	* gcc.target/mips/umips-lwp-2.c: New test.
-	* gcc.target/mips/umips-swp-5.c: New test.
-	* gcc.target/mips/umips-constraints-1.c: New test.
-	* gcc.target/mips/umips-lwp-3.c: New test.
-	* gcc.target/mips/umips-swp-6.c: New test.
-	* gcc.target/mips/umips-constraints-2.c: New test.
-	* gcc.target/mips/umips-save-restore-1.c: New test.
-	* gcc.target/mips/umips-lwp-4.c: New test.
-	* gcc.target/mips/umips-swp-7.c: New test.
-	* gcc.target/mips/umips-save-restore-2.c: New test.
-	* gcc.target/mips/umips-lwp-swp-volatile.c: New test.
-	* gcc.target/mips/umips-lwp-5.c: New test.
-	* gcc.target/mips/umips-save-restore-3.c: New test.
-	* gcc.target/mips/umips-lwp-6.c: New test.
-	* gcc.target/mips/umips-swp-1.c: New test.
-	* gcc.target/mips/umips-lwp-7.c: New test.
-	* gcc.target/mips/umips-swp-2.c: New test.
-	* gcc.target/mips/umips-lwp-8.c: New test.
-	* gcc.target/mips/umips-swp-3.c: New test.
-	* gcc.target/mips/umips-movep-1.c: New test.
-	* gcc.target/mips/umips-lwp-1.c: New test.
-	* gcc.target/mips/umips-swp-4.c: New test.
-
-2013-02-24  Catherine Moore  <clm@codesourcery.com>
-	    Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* gcc.target/mips/mips.exp: Add microMIPS support.
-	* gcc.target/mips/umips-movep-2.c: New test.
-	* gcc.target/mips/umips-lwp-2.c: New test.
-	* gcc.target/mips/umips-swp-5.c: New test.
-	* gcc.target/mips/umips-constraints-1.c: New test.
-	* gcc.target/mips/umips-lwp-3.c: New test.
-	* gcc.target/mips/umips-swp-6.c: New test.
-	* gcc.target/mips/umips-constraints-2.c: New test.
-	* gcc.target/mips/umips-save-restore-1.c: New test.
-	* gcc.target/mips/umips-lwp-4.c: New test.
-	* gcc.target/mips/umips-swp-7.c: New test.
-	* gcc.target/mips/umips-save-restore-2.c: New test.
-	* gcc.target/mips/umips-lwp-swp-volatile.c: New test.
-	* gcc.target/mips/umips-lwp-5.c: New test.
-	* gcc.target/mips/umips-save-restore-3.c: New test.
-	* gcc.target/mips/umips-lwp-6.c: New test.
-	* gcc.target/mips/umips-swp-1.c: New test.
-	* gcc.target/mips/umips-lwp-7.c: New test.
-	* gcc.target/mips/umips-swp-2.c: New test.
-	* gcc.target/mips/umips-lwp-8.c: New test.
-	* gcc.target/mips/umips-swp-3.c: New test.
-	* gcc.target/mips/umips-movep-1.c: New test.
-	* gcc.target/mips/umips-lwp-1.c: New test.
-	* gcc.target/mips/umips-swp-4.c: New test.
-
-2013-02-22  Jakub Jelinek  <jakub@redhat.com>
-
-	PR sanitizer/56393
-	* lib/asan-dg.exp (asan_link_flags): Add
-	-B${gccpath}/libsanitizer/asan/ to flags.
-
-2013-02-21  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56420
-	* gcc.dg/torture/pr56420.c: New test.
-
-2013-02-20  Aldy Hernandez  <aldyh@redhat.com>
-
-	PR middle-end/56108
-	* gcc.dg/tm/memopt-1.c: Declare functions transaction_safe.
-
-2013-02-21  Martin Jambor  <mjambor@suse.cz>
-
-	PR tree-optimization/56310
-	* g++.dg/ipa/pr56310.C: New test.
-
-2013-02-21  Janus Weil  <janus@gcc.gnu.org>
-
-	PR fortran/56385
-	* gfortran.dg/proc_ptr_comp_37.f90: New.
-
-2013-02-21  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56415
-	Revert
-	2013-02-11  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56273
-	* g++.dg/warn/Warray-bounds-6.C: New testcase.
-	* gcc.dg/tree-ssa/pr21559.c: Adjust.
-	* gcc.dg/tree-ssa/vrp17.c: Likewise.
-	* gcc.dg/tree-ssa/vrp18.c: Likewise.
-	* gcc.dg/tree-ssa/vrp23.c: Likewise.
-	* gcc.dg/tree-ssa/vrp24.c: Likewise.
-
-2013-02-21  Marek Polacek  <polacek@redhat.com>
-
-	PR tree-optimization/56398
-	* g++.dg/torture/pr56398.C: New test.
-
-2013-02-21  Jakub Jelinek  <jakub@redhat.com>
-
-	PR inline-asm/56405
-	* gcc.c-torture/compile/pr56405.c: New test.
-
-2013-02-20  Jan Hubicka  <jh@suse.cz>
-
-	PR tree-optimization/56265
-	* testsuite/g++.dg/ipa/devirt-11.C: New testcase.
-
-2013-02-20  Richard Biener  <rguenther@suse.de>
-
-	* gcc.dg/tree-ssa/forwprop-8.c: Adjust.
-
-2013-02-20  Richard Biener  <rguenther@suse.de>
-	Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56396
-	* gcc.dg/pr56396.c: New testcase.
-
-2013-02-20  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/56373
-	* g++.dg/cpp0x/Wzero-as-null-pointer-constant-2.C: New.
-
-2013-02-19  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56384
-	* gcc.dg/torture/pr56384.c: New testcase.
-
-2013-02-19  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56350
-	* gcc.dg/pr56350.c: New test.
-
-	PR tree-optimization/56381
-	* g++.dg/opt/pr56381.C: New test.
-
-2013-02-18  Jakub Jelinek  <jakub@redhat.com>
-
-	PR pch/54117
-	* lib/dg-pch.exp (pch-init, pch-finish,
-	check_effective_target_pch_supported_debug): New procs.
-	(dg-flags-pch): If $pch_unsupported, make tests UNSUPPORTED.
-	Likewise if $pch_unsupported_debug and $flags include -g.
-	Skip FAILs about missing *.gch file if $pch_unsupported_debug
-	and dg-require-effective-target pch_unsupported_debug.
-	* g++.dg/pch/pch.exp: Call pch-init and pch-finish.
-	* objc.dg/pch/pch.exp: Likewise.
-	* gcc.dg/pch/pch.exp: Likewise.
-	* gcc.dg/pch/valid-1.c: Add dg-require-effective-target
-	pch_unsupported_debug.
-	* gcc.dg/pch/valid-1.hs: Likewise.
-	* gcc.dg/pch/valid-1b.c: Likewise.
-	* gcc.dg/pch/valid-1b.hs: Likewise.
-
-2013-02-18  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56366
-	* gcc.dg/torture/pr56366.c: New testcase.
-
-2013-02-18  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/56349
-	* gcc.dg/torture/pr56349.c: New testcase.
-
-2013-02-18  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56321
-	* gcc.dg/torture/pr56321.c: New testcase.
-
-2013-02-16  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
-
-	* gcc.dg/20020312-2.c: Define MicroBlaze PIC register
-
-2013-02-16  Jakub Jelinek  <jakub@redhat.com>
-	    Dodji Seketeli  <dodji@redhat.com>
-
-	PR asan/56330
-	* c-c++-common/asan/no-redundant-instrumentation-4.c: New test file.
-	* c-c++-common/asan/no-redundant-instrumentation-5.c: Likewise.
-	* c-c++-common/asan/no-redundant-instrumentation-6.c: Likewise.
-	* c-c++-common/asan/no-redundant-instrumentation-7.c: Likewise.
-	* c-c++-common/asan/no-redundant-instrumentation-8.c: Likewise.
-	* c-c++-common/asan/pr56330.c: Likewise.
-	* c-c++-common/asan/no-redundant-instrumentation-1.c (test1):
-	Ensure the size argument of __builtin_memcpy is a constant.
-
-2013-02-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
-	    Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/51242
-	* g++.dg/cpp0x/enum23.C: New.
-
-2013-02-15  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	PR target/54685
-	* gcc.target/sh/pr54685.c: Fix scanning of not insn.
-
-2013-02-15  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/56348
-	* gcc.target/i386/pr56348.c: New test.
-
-2013-02-15  Greta Yorsh  <Greta.Yorsh@arm.com>
-
-	* gcc.target/arm/interrupt-1.c: Fix for thumb mode.
-	* gcc.target/arm/interrupt-2.c: Likewise.
-
-2013-02-15  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/56318
-	* gcc/testsuite/gfortran.dg/matmul_9.f90: New.
-
-2013-02-15  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/53818
-	* gfortran.dg/init_flag_11.f90: New.
-
-2013-02-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
-
-	* gcc.dg/debug/dwarf2/pr53948.c: Allow for more whitespace.
-
-2013-02-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
-
-	* gcc.dg/debug/dwarf2/pr53948.c: Allow for / and ! as comment
-	characters.
-
-2013-02-14  Dominique d'Humieres  <dominiq@lps.ens.fr>
-	    Tobias Burnus  <burnus@net-b.de>
-
-	PR testsuite/56138
-	* gfortran.dg/allocatable_function_7.f90: New.
-
-2013-02-14  Jakub Jelinek  <jakub@redhat.com>
-
-	* g++.dg/asan/dejagnu-gtest.h: Add multiple inclusion guards.
-	* asan_globals_test-wrapper.cc: New file.
-	* g++.dg/asan/asan_test.C: Use asan_globals_test-wrapper.cc
-	instead of asan_globals_test.cc as dg-additional-sources.
-	Include asan_mem_test.cc, asan_str_test.cc and asan_oob_test.cc.
-	* g++.dg/asan/asan_test_utils.h: Synced from upstream.  Include
-	"sanitizer_test_utils.h" instead of
-	"sanitizer_common/tests/sanitizer_test_utils.h".
-	* g++.dg/asan/asan_str_test.cc: New file, synced from upstream.
-	* g++.dg/asan/asan_mem_test.cc: New file, synced from upstream.
-	* g++.dg/asan/asan_oob_test.cc: New file, synced from upstream.
-	* g++.dg/asan/asan_globals_test.cc: Synced from upstream.
-	* g++.dg/asan/asan_test.cc: Synced from upstream.
-	* g++.dg/asan/sanitizer_test_utils.h: New file, synced from upstream.
-
-2013-02-14  Dodji Seketeli  <dodji@redhat.com>
-
-	Fix an asan crash
-	* c-c++-common/asan/memcmp-2.c: New test.
-
-2013-02-13  Ed Smith-Rowland  <3dw4rd@verizon.net>
-
-	PR c++/55582
-	* g++.dg/cpp0x/udlit-string-literal.h: New.
-	* g++.dg/cpp0x/udlit-string-literal.C: New.
-
-2013-02-13  Sriraman Tallam  <tmsriram@google.com>
-
-	* g++.dg/ext/mv12-aux.C: Add directives to match mv12.C.
-
-2013-02-13  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR target/56184
-	* gcc.target/arm/pr56184.C: New test.
-
-2013-02-13  Jakub Jelinek  <jakub@redhat.com>
-
-	PR c++/56302
-	* g++.dg/torture/pr56302.C: New test.
-	* g++.dg/cpp0x/constexpr-56302.C: New test.
-	* c-c++-common/pr56302.c: New test.
-
-2013-02-13  Tobias Burnus  <burnus@net-b.de>
-	    Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
-
-	PR fortran/56204
-	* gfortran.dg/quad_2.f90: Use "< epsilon" instead of "==".
-	* gfortran.dg/quad_3.f90: Ditto.
-
-2013-02-13  Kostya Serebryany  <kcc@google.com>
-
-	* c-c++-common/asan/strncpy-overflow-1.c: Update the test
-	to match the fresh asan run-time.
-	* c-c++-common/asan/rlimit-mmap-test-1.c: Ditto.
-
-2013-02-12  Dodji Seketeli  <dodji@redhat.com>
-
-	Avoid instrumenting duplicated memory access in the same basic block
-	* c-c++-common/asan/no-redundant-instrumentation-1.c: New test.
-	* testsuite/c-c++-common/asan/no-redundant-instrumentation-2.c:
-	Likewise.
-	* testsuite/c-c++-common/asan/no-redundant-instrumentation-3.c:
-	Likewise.
-	* testsuite/c-c++-common/asan/inc.c: Likewise.
-
-2013-02-12  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR inline-asm/56148
-	* gcc.target/i386/pr56148.c: New test.
-
-2013-02-12  Dominique d'Humieres  <dominiq@lps.ens.fr>
-	    Tobias Burnus  <burnus@net-b.de>
-
-	PR testsuite/56082
-	* gfortran.dg/bind_c_bool_1.f90 (sub): Change kind=4 to kind=2.
-
-2013-02-12  Richard Biener  <rguenther@suse.de>
-
-	PR lto/56297
-	* gcc.dg/lto/pr56297_0.c: New testcase.
-	* gcc.dg/lto/pr56297_0.c: Likewise.
-
-2013-02-12  Janus Weil  <janus@gcc.gnu.org>
-
-	PR fortran/46952
-	* gfortran.dg/typebound_deferred_1.f90: New.
-
-2013-02-12  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/56151
-	* gcc.target/i386/pr56151.c: New test.
-
-2013-02-11  Sriraman Tallam  <tmsriramgoogle.com>
-
-	* g++.dg/ext/mv12.C: New test.
-	* g++.dg/ext/mv12.h: New file.
-	* g++.dg/ext/mv12-aux.C: New file.
-	* g++.dg/ext/mv13.C: New test.
-
-2013-02-11  Sebastian Huber  <sebastian.huber@embedded-brains.de>
-
-	* lib/target-supports.exp
-	(check_effective_target_powerpc_eabi_ok): New.
-	* gcc.target/powerpc/ppc-eabi.c: Use require effective target
-	powerpc_eabi_ok.
-	* gcc.target/powerpc/ppc-sdata-1.c: Likewise.
-	* gcc.target/powerpc/spe-small-data-2.c: Likewise. Do not run, compile
-	only.
-	* gcc.target/powerpc/ppc-sdata-2.c: Add powerpc-*-rtems*.
-	* gcc.target/powerpc/pr51623.c: Likewise.
-	* gcc.target/powerpc/ppc-stackalign-1.c: Likewise.
-	* gcc.target/powerpc/ppc-ldstruct.c: Likewise.
-
-2013-02-11  Alexander Potapenko  <glider@google.com>
-	    Jack Howarth  <howarth@bromo.med.uc.edu>
-	    Jakub Jelinek  <jakub@redhat.com>
-
-	PR sanitizer/55617
-	* g++.dg/asan/pr55617.C: Run on all targets.
-
-2013-02-11  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR rtl-optimization/56275
-	* gcc.dg/pr56275.c: New test.
-
-2013-02-11  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56273
-	* gcc.dg/tree-ssa/vrp17.c: Disable tail-merging.
-
-2013-02-11  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56264
-	* gcc.dg/torture/pr56264.c: New testcase.
-
-2013-02-11  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56273
-	* g++.dg/warn/Warray-bounds-6.C: New testcase.
-	* gcc.dg/tree-ssa/pr21559.c: Adjust.
-	* gcc.dg/tree-ssa/vrp17.c: Likewise.
-	* gcc.dg/tree-ssa/vrp18.c: Likewise.
-	* gcc.dg/tree-ssa/vrp23.c: Likewise.
-	* gcc.dg/tree-ssa/vrp24.c: Likewise.
-
-2013-02-09  Uros Bizjak  <ubizjak@gmail.com>
-
-	* g++.dg/asan/asan_test.C: Compile with -D__NO_INLINE__
-	for *-*-linux-gnu targets.
-	* g++.dg/asan/interception-test-1.c: Ditto.
-	* g++.dg/asan/interception-failure-test-1.C: Ditto.
-	* g++.dg/asan/interception-malloc-test-1.C: Ditto.
-
-2013-02-09  Paul Thomas  <pault@gcc.gnu.org>
-
-	PR fortran/55362
-	* gfortran.dg/intrinsic_size_4.f90 : New test.
-
-2013-02-09  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/56256
-	* gcc.target/powerpc/pr56256.c: New test.
-
-2013-02-08  Ian Lance Taylor  <iant@google.com>
-
-	* lib/go.exp: Load timeout.exp.
-
-2013-02-08  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/56246
-	* gcc.target/i386/pr56246.c: New test.
-
-2013-02-08  Jeff Law  <law@redhat.com>
-
-	PR debug/53948
-	* gcc.dg/debug/dwarf2/pr53948.c: New test.
-
-2013-02-08  Michael Meissner  <meissner@linux.vnet.ibm.com>
-
-	PR target/56043
-	* gcc.target/powerpc/vsx-mass-1.c: Only run this test on
-	powerpc*-*-linux*.
-
-2013-02-08  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
-
-	* 20101011-1.c: Add __MICROBLAZE__ exception to set DO_TEST 0
-
-2013-02-08  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/56195
-	* gcc.dg/torture/pr56195.c: New test.
-
-2013-02-08  Mikael Morin  <mikael@gcc.gnu.org>
-
-	PR fortran/54107
-	* gfortran.dg/recursive_interface_2.f90: New test.
-
-2013-02-08  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56250
-	* gcc.c-torture/execute/pr56250.c: New test.
-
-2013-02-08  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR tree-optimization/56064
-	* gcc.dg/fixed-point/view-convert-2.c: New test.
-
-2013-02-08  Michael Matz  <matz@suse.de>
-
-	PR tree-optimization/52448
-	* gcc.dg/pr52448.c: New test.
-
-2013-02-08  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/56181
-	* gcc.dg/torture/pr56181.c: New testcase.
-
-2013-02-08  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR target/54222
-	* gcc.target/avr/torture/builtins-4-roundfx.c: New test.
-	* gcc.target/avr/torture/builtins-5-countlsfx.c: New test.
-
-2013-02-07  Jakub Jelinek  <jakub@redhat.com>
-
-	PR c++/56241
-	* g++.dg/parse/crash61.C: New test.
-
-	PR c++/56239
-	* g++.dg/parse/pr56239.C: New test.
-
-	PR c++/56237
-	* g++.dg/abi/mangle61.C: New test.
-
-2013-02-07  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/56225
-	* gcc.target/i386/pr56225.c: New test.
-
-2013-02-07  Jakub Jelinek  <jakub@redhat.com>
-
-	PR debug/56154
-	* gcc.dg/guality/pr56154-1.c: New test.
-	* gcc.dg/guality/pr56154-2.c: New test.
-	* gcc.dg/guality/pr56154-3.c: New test.
-	* gcc.dg/guality/pr56154-4.c: New test.
-	* gcc.dg/guality/pr56154-aux.c: New file.
-
-	PR tree-optimization/55789
-	* g++.dg/ipa/inline-3.C: Use cleanup-ipa-dump instead of
-	cleanup-tree-dump.
-	* gcc.dg/tree-ssa/inline-3.c: Add
-	--param max-early-inliner-iterations=2 option.
-
-2013-02-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
-
-	PR debug/53363
-	* g++.dg/debug/dwarf2/thunk1.C: Restrict to 32-bit x86.
-	Add -fno-dwarf2-cfi-asm to dg-options.
-	Adapt match count.
-
-2013-02-07  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/56228
-	* gcc.dg/pr56228.c: New test.
-
-2013-02-07  Alan Modra  <amodra@gmail.com>
-
-	PR target/54009
-	* gcc.target/powerpc/pr54009.c: New test.
-	PR target/54131
-	* gfortran.dg/pr54131.f: New test.
-
-2013-02-06 Paul Thomas  <pault@gcc.gnu.org>
-
-	PR fortran/55789
-	* gfortran.dg/array_constructor_41.f90: New test.
-
-2013-02-06  Janus Weil  <janus@gcc.gnu.org>
-
-	PR fortran/55978
-	* gfortran.dg/class_optional_2.f90: Uncomment some cases
-	which work now.
-
-2013-02-06  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56217
-	* g++.dg/gomp/pr56217.C: New test.
-
-2013-02-05  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56205
-	* gcc.dg/tree-ssa/stdarg-6.c: New test.
-	* gcc.c-torture/execute/pr56205.c: New test.
-
-2013-02-05  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/53342
-	PR tree-optimization/53185
-	* gcc.dg/vect/pr53185-2.c: New testcase.
-
-2013-02-05  Jan Hubicka  <jh@suse.cz>
-
-	PR tree-optimization/55789
-	* g++.dg/tree-ssa/inline-1.C: Update max-inliner-iterations.
-	* g++.dg/tree-ssa/inline-2.C: Update max-inliner-iterations.
-	* g++.dg/tree-ssa/inline-3.C: Update max-inliner-iterations.
-	* g++.dg/ipa/inline-1.C: New testcase.
-	* g++.dg/ipa/inline-2.C: New testcase.
-	* g++.dg/ipa/inline-3.C: New testcase.
-
-2013-02-05  Jan Hubicka  <jh@suse.cz>
-
-	PR tree-optimization/55789
-	* g++.dg/torture/pr55789.C: New testcase.
-
-2013-02-05  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56167
-	* gcc.dg/pr56167.c: New test.
-
-2013-02-04  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	PR target/55146
-	* gcc.target/sh/pr55146.c: New.
-
-2013-02-04  Oleg Endo  <olegendo@gcc.gnu.org>
-
-	PR tree-optimization/54386
-	* gcc.target/sh/pr54386.c: New.
-
-2013-02-04  Paul Thomas  <pault@gcc.gnu.org>
-
-	PR fortran/56008
-	* gfortran.dg/realloc_on _assign_16.f90 : New test.
-
-	PR fortran/47517
-	* gfortran.dg/realloc_on _assign_17.f90 : New test.
-
-2013-02-04  Alexander Potapenko  <glider@google.com>
-	    Jack Howarth  <howarth@bromo.med.uc.edu>
-	    Jakub Jelinek  <jakub@redhat.com>
-
-	PR sanitizer/55617
-	* g++.dg/asan/pr55617.C: New test.
-
-2013-02-04  Mikael Morin  <mikael@gcc.gnu.org>
-
-	PR fortran/54195
-	* gfortran.dg/typebound_operator_19.f90: New test.
-	* gfortran.dg/typebound_assignment_4.f90: New test.
-
-2013-02-04  Mikael Morin  <mikael@gcc.gnu.org>
-
-	PR fortran/54107
-	* gfortran.dg/recursive_interface_1.f90: New test.
-
-2013-02-04  Richard Guenther  <rguenther@suse.de>
-
-	PR lto/56168
-	* gcc.dg/lto/pr56168_0.c: New testcase.
-	* gcc.dg/lto/pr56168_1.c: Likewise.
-
-2013-02-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
-
-	PR fortran/50627
-	PR fortran/56054
-	* gfortran.dg/block_12.f90:  New test.
-	* gfortran.dg/module_error_1.f90:  New test.
-
-2013-02-02  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* lib/target-supports.exp (check_effective_target_vect_float)
-	(check_effective_target_vect_no_align): Add mips-sde-elf.
-
-2013-02-01  Jakub Jelinek  <jakub@redhat.com>
-
-	* lib/gcc-dg.exp (restore-target-env-var): Avoid using lreverse.
-
-2013-02-01  David Edelsohn  <dje.gcc@gmail.com>
-
-	* gcc.dg/pr56023.c: XFAIL on AIX.
-	* gcc.dg/vect/pr49352.c: Same.
-
-2013-02-01  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* gnat.dg/opt26.adb: New test.
-
-2013-01-31  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
-
-	Revert.
-	2013-01-27  Amol Pise  <amolpise15@gmail.com>
-
-	* gcc.target/arm/neon-vfnms-1.c: New test.
-	* gcc.target/arm/neon-vfnma-1.c: New test.
-
-2013-01-31  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56157
-	* gcc.dg/torture/pr56157.c: New testcase.
-
-2013-01-30  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56150
-	* gcc.dg/torture/pr56150.c: New testcase.
-
-2013-01-30  Jakub Jelinek  <jakub@redhat.com>
-
-	PR sanitizer/55374
-	* g++.dg/asan/large-func-test-1.C: Allow both _Zna[jm] in addition
-	to _Znw[jm] in the backtrace.  Allow _Zna[jm] to be the first frame
-	printed in backtrace.
-	* g++.dg/asan/deep-stack-uaf-1.C: Use malloc instead of operator new
-	to avoid errors about mismatched allocation vs. deallocation.
-
-	PR c++/55742
-	* g++.dg/mv1.C: Moved to...
-	* g++.dg/ext/mv1.C: ... here.  Adjust test.
-	* g++.dg/mv2.C: Moved to...
-	* g++.dg/ext/mv2.C: ... here.  Adjust test.
-	* g++.dg/mv3.C: Moved to...
-	* g++.dg/ext/mv3.C: ... here.
-	* g++.dg/mv4.C: Moved to...
-	* g++.dg/ext/mv4.C: ... here.
-	* g++.dg/mv5.C: Moved to...
-	* g++.dg/ext/mv5.C: ... here.  Adjust test.
-	* g++.dg/mv6.C: Moved to...
-	* g++.dg/ext/mv6.C: ... here.  Adjust test.
-	* g++.dg/ext/mv7.C: New test.
-	* g++.dg/ext/mv8.C: New test.
-	* g++.dg/ext/mv9.C: New test.
-	* g++.dg/ext/mv10.C: New test.
-	* g++.dg/ext/mv11.C: New test.
-
-2013-01-30  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/56144
-	* gcc.dg/pr56144.c: New.
-
-2013-01-30  David Edelsohn  <dje.gcc@gmail.com>
-
-	* g++.dg/cpp0x/constexpr-53094-2.C: Ignore non-standard ABI
-	message.
-	* g++.dg/cpp0x/constexpr-53094-3.C: Same.
-	* g++.dg/cpp0x/constexpr-55573.C: Same
-
-2013-01-30  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR tree-optimization/56064
-	* gcc.dg/fixed-point/view-convert.c: New test.
-
-2013-01-30  Andreas Schwab  <schwab@suse.de>
-
-	* lib/target-supports-dg.exp (dg-process-target): Use expr to
-	evaluate the end index in string range.
-
-2013-01-30  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/56138
-	* gfortran.dg/allocatable_function_6.f90: New.
-
-2013-01-29  Janus Weil  <janus@gcc.gnu.org>
-	    Mikael Morin  <mikael@gcc.gnu.org>
-
-	PR fortran/54107
-	* gfortran.dg/proc_ptr_comp_36.f90: New.
-
-2013-01-29  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/55270
-	* gcc.dg/torture/pr55270.c: New testcase.
-
-2013-01-28  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/56117
-	* gcc.dg/pr56117.c: New test.
-
-2013-01-28  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/56034
-	* gcc.dg/torture/pr56034.c: New testcase.
-
-2013-01-28  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56125
-	* gcc.dg/pr56125.c: New test.
-
-2013-01-28  Tobias Burnus  <burnus@net-b.de>
-	    Mikael Morin  <mikael@gcc.gnu.org>
-
-	PR fortran/53537
-	* gfortran.dg/import2.f90: Adjust undeclared type error messages.
-	* gfortran.dg/import8.f90: Likewise.
-	* gfortran.dg/interface_derived_type_1.f90: Likewise.
-	* gfortran.dg/import10.f90: New test.
-	* gfortran.dg/import11.f90: Likewise
-
-2013-01-28  Jakub Jelinek  <jakub@redhat.com>
-
-	PR testsuite/56053
-	* c-c++-common/asan/heap-overflow-1.c: Don't include stdlib.h and
-	string.h.  Provide memset, malloc and free prototypes, adjust line
-	numbers in dg-output.
-	* c-c++-common/asan/stack-overflow-1.c: Don't include string.h.
-	Provide memset prototype and adjust line numbers in dg-output.
-	* c-c++-common/asan/global-overflow-1.c: Likewise.
-
-	PR tree-optimization/56094
-	* gcc.dg/pr56094.c: New test.
-
-2013-01-27  Amol Pise  <amolpise15@gmail.com>
-
-	* gcc.target/arm/neon-vfnms-1.c: New test.
-	* gcc.target/arm/neon-vfnma-1.c: New test.
-
-2013-01-27  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/56114
-	* gcc.target/i386/pr56114.c: New test.
-
-2013-01-27  Paul Thomas  <pault@gcc.gnu.org>
-
-	PR fortran/55984
-	* gfortran.dg/associate_14.f90: New test.
-
-	PR fortran/56047
-	* gfortran.dg/associate_13.f90: New test.
-
-2013-01-25  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56098
-	* gcc.dg/pr56098-1.c: New test.
-	* gcc.dg/pr56098-2.c: New test.
-
-2013-01-25  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR target/54222
-	* gcc.target/avr/torture/builtins-3-absfx.c: New test.
-
-2013-01-22  Marek Polacek  <polacek@redhat.com>
-
-	PR tree-optimization/56035
-	* gcc.dg/pr56035.c: New test.
-
-2013-01-24  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* gfortran.dg/bind_c_array_params_2.f90: Require -mno-relax-pic-calls
-	for MIPS.
-
-2013-01-24  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* gcc.target/mips/octeon-pipe-1.c: Add -ffat-lto-objects
-
-2013-01-24  Jakub Jelinek  <jakub@redhat.com>
-
-	PR c/56078
-	* gcc.dg/pr56078.c: New test.
-	* gcc.c-torture/compile/20030305-1.c: Add dg-error lines.
-
-2013-01-24  Martin Jambor  <mjambor@suse.cz>
-
-	PR tree-optimization/55927
-	* g++.dg/ipa/devirt-10.C: Disable early inlining.
-
-2013-01-24  Uros Bizjak  <ubizjak@gmail.com>
-
-	* gcc.target/i386/movsd.c: New test.
-
-2013-01-24  Steven Bosscher  <steven@gcc.gnu.org>
-
-	PR inline-asm/55934
-	* gcc.target/i386/pr55934.c: New test.
-
-2013-01-23  Janus Weil  <janus@gcc.gnu.org>
-
-	PR fortran/56081
-	* gfortran.dg/select_8.f90: New.
-
-2013-01-23  David Holsgrove  <david.holsgrove@xilinx.com>
-
-	* gcc.target/microblaze/microblaze.exp: Remove
-	target_config_cflags check.
-
-2013-01-23  Jakub Jelinek  <jakub@redhat.com>
-
-	PR fortran/56052
-	* gfortran.dg/gomp/pr56052.f90: New test.
-
-	PR target/49069
-	* gcc.dg/pr49069.c: New test.
-
-2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/55944
-	* g++.dg/cpp0x/constexpr-static10.C: New.
-
-2013-01-22  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/56028
-	* gcc.target/i386/pr56028.c: New test.
-
-2013-01-22  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/55686
-	* gcc.target/i386/pr55686.c: New test.
-
-2013-01-22  Dodji Seketeli  <dodji@redhat.com>
-
-	PR c++/53609
-	* g++.dg/cpp0x/variadic139.C: New test.
-	* g++.dg/cpp0x/variadic140.C: Likewise.
-	* g++.dg/cpp0x/variadic141.C: Likewise.
-
-2013-01-22  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* gnat.dg/warn8.adb: New test.
-
-2013-01-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
-
-	PR fortran/55919
-	* gfortran.dg/include_8.f90: New test.
-
-2013-01-21  Uros Bizjak  <ubizjak@gmail.com>
-
-	* gcc.dg/tree-ssa/pr55579.c: Cleanup esra tree dump.
-	* gfortran.dg/unlimited_polymorphic_8.f90: Cleanup original tree dump.
-
-2013-01-21  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56051
-	* gcc.c-torture/execute/pr56051.c: New test.
-
-2013-01-21  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR rtl-optimization/56023
-	* gcc.dg/pr56023.c: New test.
-
-2013-01-21  Martin Jambor  <mjambor@suse.cz>
-
-	PR middle-end/56022
-	* gcc.target/i386/pr56022.c: New test.
-
-2013-01-21  Jason Merrill  <jason@redhat.com>
-
-	* lib/target-supports.exp (check_effective_target_alias): New.
-
-2013-01-20  Jack Howarth  <howarth@bromo.med.uc.edu>
-
-	PR debug/53235
-	* g++.dg/debug/dwarf2/nested-4.C: XFAIL on darwin.
-
-2013-01-20  Hans-Peter Nilsson  <hp@axis.com>
-
-	* gfortran.dg/inquire_10.f90: Run only for non-newlib targets.
-
-2013-01-19  Jeff Law  <law@redhat.com>
-
-	PR tree-optimization/52631
-	* tree-ssa/pr52631.c: New test.
-	* tree-ssa/ssa-fre-9: Update expected output.
-
-2013-01-19  Anthony Green  <green@moxielogic.com>
-
-	* gcc.dg/tree-ssa/asm-2.c (REGISTER): Pick an appropriate register
-	for moxie.
-
-2013-01-18  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/56029
-	* g++.dg/torture/pr56029.C: New test.
-
-2013-01-18  Sharad Singhai  <singhai@google.com>
-
-	PR tree-optimization/55995
-	* gcc.dg/vect/vect.exp: Use "details" flags for dump info.
-
-2013-01-18  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR target/55433
-	* gcc.target/i386/pr55433.c: New.
-
-2013-01-18  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/56015
-	* gfortran.dg/pr56015.f90: New test.
-
-2013-01-18  Janis Johnson  <janisjo@codesourcery.com>
-
-	* gcc.dg/vect/vect-multitypes-12.c: Refactor dg-final directive.
-
-2013-01-18  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* gcc.target/aarch64/vect-fcm-gt-f.c: Change expected output.
-	* gcc.target/aarch64/vect-fcm-gt-d.c: Likewise.
-	* gcc.target/aarch64/vect-fcm-ge-f.c: Likewise.
-	* gcc.target/aarch64/vect-fcm-ge-d.c: Likewise.
-	* gcc.target/aarch64/vect-fcm-eq-f.c: Likewise.
-
-2013-01-17  Jeff Law  <law@redhat.com>
-
-	* gcc.dg/pr52573.c: Move to...
-	* gcc.target/m68k/pr52573.c: Here.  Eliminate target selector.
-
-	PR rtl-optimization/52573
-	* gcc.dg/pr52573.c: New test.
-
-2013-01-17  Jack Howarth  <howarth@bromo.med.uc.edu>
-
-	PR sanitizer/55679
-	* g++.dg/asan/interception-test-1.C: Skip on darwin.
-	* lib/target-supports.exp (check_effective_target_swapcontext): Use
-	check_no_compiler_messages to test support in ucontext.h.
-	(check_effective_target_setrlimit): Return 0 for Darwin's non-posix
-	compliant RLIMIT_AS.
-
-2013-01-17  Marek Polacek  <polacek@redhat.com>
-
-	PR rtl-optimization/55833
-	* gcc.dg/pr55833.c: New test.
-
-2013-01-17  Jan Hubicka  <jh@suse.cz>
-
-	PR tree-optimization/55273
-	* gcc.c-torture/compile/pr55273.c: New testcase.
-
-2013-01-17  Uros Bizjak  <ubizjak@gmail.com>
-
-	PR target/55981
-	* gcc.target/pr55981.c: New test.
-
-2013-01-17  Janis Johnson  <janisjo@codesourcery.com>
-
-	* gcc.target/arm/pr40887.c: Require at least armv5.
-	* gcc.target/arm/pr51835.c: Avoid conflicts with multilib flags.
-	* gcc.target/arm/pr51915.c: Likewise.
-	* gcc.target/arm/pr52006.c: Likewise.
-	* gcc.target/arm/pr53187.c: Likewise.
-
-	* gcc.target/arm/ftest-support.h: Replace for compile-only tests.
-	* gcc.target/arm/ftest-support-arm.h: Delete.
-	* gcc.target/arm/ftest-support-thumb.h: Delete.
-	* gcc.target/arm/ftest-armv4-arm.c: Replace with compile-only test.
-	* gcc.target/arm/ftest-armv4t-arm.c: Likewise.
-	* gcc.target/arm/ftest-armv4t-thumb.c: Likewise.
-	* gcc.target/arm/ftest-armv5t-arm.c: Likewise.
-	* gcc.target/arm/ftest-armv5t-thumb.c: Likewise.
-	* gcc.target/arm/ftest-armv5te-arm.c: Likewise.
-	* gcc.target/arm/ftest-armv5te-thumb.c: Likewise.
-	* gcc.target/arm/ftest-armv6-arm.c: Likewise.
-	* gcc.target/arm/ftest-armv6-thumb.c: Likewise.
-	* gcc.target/arm/ftest-armv6k-arm.c: Likewise.
-	* gcc.target/arm/ftest-armv6k-thumb.c: Likewise.
-	* gcc.target/arm/ftest-armv6m-thumb.c: Likewise.
-	* gcc.target/arm/ftest-armv6t2-arm.c: Likewise.
-	* gcc.target/arm/ftest-armv6t2-thumb.c: Likewise.
-	* gcc.target/arm/ftest-armv6z-arm.c: Likewise.
-	* gcc.target/arm/ftest-armv6z-thumb.c: Likewise.
-	* gcc.target/arm/ftest-armv7a-arm.c: Likewise.
-	* gcc.target/arm/ftest-armv7a-thumb.c: Likewise.
-	* gcc.target/arm/ftest-armv7em-thumb.c: Likewise.
-	* gcc.target/arm/ftest-armv7m-thumb.c: Likewise.
-	* gcc.target/arm/ftest-armv7r-arm.c: Likewise.
-	* gcc.target/arm/ftest-armv7r-thumb.c: Likewise.
-	* gcc.target/arm/ftest-armv8a-arm.c: Likewise.
-	* gcc.target/arm/ftest-armv8a-thumb.c: Likewise.
-
-2013-01-17  Martin Jambor  <mjambor@suse.cz>
-
-	PR tree-optimizations/55264
-	* g++.dg/ipa/pr55264.C: New test.
-
-2013-01-16  Janus Weil  <janus@gcc.gnu.org>
-
-	PR fortran/55983
-	* gfortran.dg/class_55.f90: New.
-
-2013-01-16  Janis Johnson  <janisjo@codesourcery.com>
-
-	PR testsuite/55994
-	* gcc.c-torture/execute/builtins/builtins.exp: Add
-	-Wl,--allow-multiple-definition for eabi and elf targets.
-
-	PR testsuite/54622
-	* lib/target-supports.exp (check_effective_target_vect_perm_byte,
-	check_effective_target_vect_perm_short,
-	check_effective_target_vect_widen_mult_qi_to_hi_pattern,
-	check_effective_target_vect64): Return 0 for big-endian ARM.
-	(check_effective_target_vect_widen_sum_qi_to_hi): Return 1 for ARM.
-
-	* gcc.target/arm/neon-vld1_dupQ.c: Use types that match function
-	prototypes.
-
-2013-01-16  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/55964
-	* gcc.dg/torture/pr55964.c: New testcase.
-
-2013-01-16  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/54767
-	PR tree-optimization/53465
-	* gfortran.fortran-torture/execute/pr54767.f90: New testcase.
-
-2013-01-16  Christian Bruel  <christian.bruel@st.com>
-
-	PR target/55301
-	* gcc.target/sh/sh-switch.c: New testcase.
-
-2013-01-15  Janis Johnson  <janisjo@codesourcery.com>
-
-	* gcc.dg/webizer.c: Increase the array size.
-
-2013-01-15  Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/55940
-	* gcc.dg/pr55940.c: New test.
-
-2013-01-15  Manfred Schwarb  <manfred99@gmx.ch>
-	    Harald Anlauf  <anlauf@gmx.de>
-
-	* gfortran.dg/bounds_check_4.f90: Add dg-options "-fbounds-check".
-	* gfortran.dg/bounds_check_5.f90: Likewise.
-	* gfortran.dg/class_array_10.f03: Fix syntax of dg-directive.
-	* gfortran.dg/continuation_9.f90: Likewise.
-	* gfortran.dg/move_alloc_13.f90: Likewise.
-	* gfortran.dg/structure_constructor_11.f90: Likewise.
-	* gfortran.dg/tab_continuation.f: Likewise.
-	* gfortran.dg/warning-directive-2.F90: Likewise.
-	* gfortran.dg/coarray_lib_token_4.f90: Remove misspelled directive.
-
-2013-01-15  Janis Johnson  <janisjo@codesourcery.com>
-
-	* gcc.target/arm/fma.c: Skip for conflicting multilib options.
-	* gcc.target/arm/fma-sp.c: Likewise.
-
-2013-01-15  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/55153
-	* gcc.dg/pr55153.c: New.
-
-2013-01-15  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/55920
-	* gcc.c-torture/compile/pr55920.c: New test.
-
-2013-01-15  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/55882
-	* gcc.dg/torture/pr55882.c: New testcase.
-
-2013-01-15  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/55955
-	* gcc.c-torture/compile/pr55955.c: New test.
-
-2013-01-15  Dodji Seketeli  <dodji@redhat.com>
-
-	PR c++/55663
-	* g++.dg/cpp0x/alias-decl-31.C: New test.
-
-2013-01-15  Paul Thomas  <pault@gcc.gnu.org>
-
-	PR fortran/54286
-	* gfortran.dg/proc_ptr_result_8.f90 : Add module 'm' to check
-	case where interface is null.
-
-2013-01-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
-
-	PR fortran/55806
-	* gfortran.dg/array_constructor_40.f90:  New test.
-
-2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* gcc.dg/tree-ssa/slsr-8.c: Allow widening multiplications.
-
-2013-01-14  Tejas Belagod  <tejas.belagod@arm.com>
-
-	* gcc.target/aarch64/aarch64/vect-ld1r-compile-fp.c: New.
-	* gcc.target/aarch64/vect-ld1r-compile.c: New.
-	* gcc.target/aarch64/vect-ld1r-fp.c: New.
-	* gcc.target/aarch64/vect-ld1r.c: New.
-	* gcc.target/aarch64/vect-ld1r.x: New.
-
-2013-01-14  Andi Kleen  <ak@linux.intel.com>
-
-	PR target/55948
-	* gcc.target/i386/hle-clear-rel.c: New file
-	* gcc.target/i386/hle-store-rel.c: New file.
-
-2013-01-14  Harald Anlauf  <anlauf@gmx.de>
-
-	* gfortran.dg/aint_anint_1.f90: Add dg-do run.
-	* gfortran.dg/bounds_check_4.f90: Likewise.
-	* gfortran.dg/inquire_10.f90: Likewise.
-	* gfortran.dg/minloc_3.f90: Likewise.
-	* gfortran.dg/minlocval_3.f90: Likewise.
-	* gfortran.dg/module_double_reuse.f90: Likewise.
-	* gfortran.dg/mvbits_1.f90: Likewise.
-	* gfortran.dg/oldstyle_1.f90: Likewise.
-	* gfortran.dg/pr20163-2.f: Likewise.
-	* gfortran.dg/save_1.f90: Likewise.
-	* gfortran.dg/scan_1.f90: Likewise.
-	* gfortran.dg/select_char_1.f90: Likewise.
-	* gfortran.dg/shape_4.f90: Likewise.
-	* gfortran.dg/coarray_29_2.f90: Fix dg-do directive.
-	* gfortran.dg/function_optimize_10.f90: Likewise.
-	* gfortran.dg/gomp/appendix-a/a.11.2.f90: Likewise.
-	* gfortran.dg/used_types_17.f90: Likewise.
-	* gfortran.dg/used_types_18.f90: Likewise.
-
-2013-01-13  Paul Thomas  <pault@gcc.gnu.org>
-
-	PR fortran/54286
-	* gfortran.dg/proc_ptr_result_8.f90 : New test.
-
-2013-01-13  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* gcc.dg/unroll_5.c: Add nomips16 attributes.
-
-2013-01-13  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* gcc.dg/tree-ssa/ssa-dom-thread-4.c: Update expected results for MIPS.
-
-2013-01-12  Janus Weil  <janus@gcc.gnu.org>
-
-	PR fortran/55072
-	* gfortran.dg/assumed_type_2.f90: Fix test case.
-	* gfortran.dg/internal_pack_13.f90: New test.
-	* gfortran.dg/internal_pack_14.f90: New test.
-
-2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
-
-	PR fortran/55868
-	* gfortran.dg/unlimited_polymorphic_8.f90: Update
-	scan-tree-dump-times for foo.0.x._vptr to deal with change from
-	$tar to STAR.
-
-2013-01-11  Andreas Schwab  <schwab@linux-m68k.org>
-
-	* gcc.c-torture/compile/pr55921.c: Don't use matching constraints.
-
-2013-01-11  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	PR target/55719
-	* gcc.target/s390/pr55719.c: New testcase.
-
-2013-01-11  Richard Guenther  <rguenther@suse.de>
-
-	PR tree-optimization/44061
-	* gcc.dg/pr44061.c: New testcase.
-
-2013-01-10  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	Update copyright years.
-
-2013-01-10  Aldy Hernandez  <aldyh@redhat.com>
-	    Jakub Jelinek  <jakub@redhat.com>
-
-	PR target/55565
-	* gcc.target/powerpc/ppc-mov-1.c: Update scan-assembler-not regex.
-
-2013-01-10  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/55672
-	* gcc.target/i386/pr55672.c: New.
-
-2013-01-10  Jeff Law  <law@redhat.com>
-
-	* gcc/dg/tree-ssa/vrp06.c: Tighten expected output.  Make each
-	pass/fail message unique.
-
-
-2013-01-10  Jason Merrill  <jason@redhat.com>
-
-	* ada/.gitignore: New.
-
-2013-01-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
-
-	* g++.dg/tls/thread_local-cse.C: Don't xfail on *-*-solaris2.9.
-	Add tls options.
-	* g++.dg/tls/thread_local2.C: Likewise.
-	* g++.dg/tls/thread_local2g.C: Likewise.
-	* g++.dg/tls/thread_local6.C: Likewise.
-	* g++.dg/tls/thread_local-order1.C: Add tls options.
-	* g++.dg/tls/thread_local-order2.C: Likewise.
-	* g++.dg/tls/thread_local3.C: Likewise.
-	* g++.dg/tls/thread_local3g.C: Likewise.
-	* g++.dg/tls/thread_local4.C: Likewise.
-	* g++.dg/tls/thread_local4g.C: Likewise.
-	* g++.dg/tls/thread_local5.C: Likewise.
-	* g++.dg/tls/thread_local5g.C: Likewise.
-	* g++.dg/tls/thread_local6g.C: Likewise.
-
-2013-01-10  Kostya Serebryany  <kcc@google.com>
-
-	* g++.dg/asan/asan_test.cc: Sync from upstream.
-
-2013-01-10  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/55921
-	* gcc.c-torture/compile/pr55921.c: New test.
-
-2013-01-09  Jan Hubicka  <jh@suse.cz>
-
-	PR tree-optimization/55569
-	* gcc.c-torture/compile/pr55569.c: New testcase.
-
-2013-01-09  Mikael Morin  <mikael@gcc.gnu.org>
-
-	PR fortran/47203
-	* gfortran.dg/use_28.f90: New test.
-
-2013-01-09  Uros Bizjak  <ubizjak@gmail.com>
-
-	* gfortran.dg/intrinsic_size_3.f90: Make scan-tree-dump-times
-	number matching more robust.
-
-2013-01-09  Vladimir Makarov  <vmakarov@redhat.com>
-
-	PR rtl-optimization/55829
-	* gcc.target/i386/pr55829.c: New.
-
-2013-01-09  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/55758
-	* gfortran.dg/bind_c_bool_1.f90: New.
-	* gfortran.dg/do_5.f90: Add dg-warning.
-
-2013-01-09  Jan Hubicka  <jh@suse.cz>
-
-	PR tree-optimization/55875
-	* gcc.c-torture/execute/pr55875.c: New testcase.
-	* g++.dg/torture/pr55875.C: New testcase.
-
-2013-01-09  Jakub Jelinek  <jakub@redhat.com>
-
-	PR c/48418
-	* c-c++-common/pr48418.c: New test.
-
-2013-01-09  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/55801
-	* g++.dg/tls/thread_local-ice.C: New.
-
-2013-01-09  Andreas Schwab  <schwab@suse.de>
-
-	* gcc.dg/guality/pr54693.c: Null-terminate arr.
-
-2013-01-09  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/48189
-	* gcc.dg/pr48189.c: New test.
-
-2013-01-04  Jan Hubicka  <jh@suse.cz>
-
-	PR tree-optimization/55823
-	* g++.dg/ipa/devirt-10.C: New testcase.
-
-2013-01-08  Uros Bizjak  <ubizjak@gmail.com>
-	    Vladimir Yakovlev  <vladimir.b.yakovlev@intel.com>
-
-	PR rtl-optimization/55845
-	* gcc.target/i386/pr55845.c: New test.
-
-2013-01-08  Tejas Belagod  <tejas.belagod@arm.com>
-
-	* gcc.target/aarch64/vect-mull-compile.c: Explicitly scan for
-	instructions generated instead of number of occurances.
-
-2013-01-08  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* gcc.target/aarch64/vect-fcm-eq-d.c: New.
-	* gcc.target/aarch64/vect-fcm-eq-f.c: Likewise.
-	* gcc.target/aarch64/vect-fcm-ge-d.c: Likewise.
-	* gcc.target/aarch64/vect-fcm-ge-f.c: Likewise.
-	* gcc.target/aarch64/vect-fcm-gt-d.c: Likewise.
-	* gcc.target/aarch64/vect-fcm-gt-f.c: Likewise.
-	* gcc.target/aarch64/vect-fcm.x: Likewise.
-	* lib/target-supports.exp
-	(check_effective_target_vect_cond): Enable for AArch64.
-
-2013-01-08  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* gcc.target/aarch64/vsqrt.c (test_square_root_v2sf): Use
-	endian-safe float pool loading.
-	(test_square_root_v4sf): Likewise.
-	(test_square_root_v2df): Likewise.
-	* lib/target-supports.exp
-	(check_effective_target_vect_call_sqrtf): Add AArch64.
-
-2013-01-08  Martin Jambor  <mjambor@suse.cz>
-
-	PR debug/55579
-	* gcc.dg/tree-ssa/pr55579.c: New test.
-
-2013-01-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
-
-	* g++.dg/debug/dwarf2/pr54508.C: Allow for more whitespace after
-	asm comments.
-
-2013-01-08  Jakub Jelinek  <jakub@redhat.com>
-
-	PR middle-end/55890
-	* gcc.dg/torture/pr55890-3.c: New test.
-
-	PR middle-end/55851
-	* gcc.c-torture/compile/pr55851.c: New test.
-
-	PR sanitizer/55844
-	* c-c++-common/asan/null-deref-1.c: Add -fno-shrink-wrap to
-	dg-options.
-
-2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
-
-	PR fortran/55618
-	* gfortran.dg/elemental_scalar_args_2.f90: New test.
-
-2013-01-07  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/55763
-	* gfortran.dg/pointer_init_2.f90: Update dg-error.
-	* gfortran.dg/pointer_init_7.f90: New.
-
-2013-01-07  Richard Biener  <rguenther@suse.de>
-
-	* gcc.dg/lto/pr55525_0.c (s): Size like char *.
-
-2013-01-07  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/55890
-	* gcc.dg/torture/pr55890-1.c: New testcase.
-	* gcc.dg/torture/pr55890-2.c: Likewise.
-
-2013-01-07  James Greenhalgh  <james.greenhalgh@arm.com>
-
-	* gcc.target/aarch64/fmovd.c: New.
-	* gcc.target/aarch64/fmovf.c: Likewise.
-	* gcc.target/aarch64/fmovd-zero.c: Likewise.
-	* gcc.target/aarch64/fmovf-zero.c: Likewise.
-	* gcc.target/aarch64/vect-fmovd.c: Likewise.
-	* gcc.target/aarch64/vect-fmovf.c: Likewise.
-	* gcc.target/aarch64/vect-fmovd-zero.c: Likewise.
-	* gcc.target/aarch64/vect-fmovf-zero.c: Likewise.
-
-2013-01-07  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/55888
-	PR tree-optimization/55862
-	* gcc.dg/torture/pr55888.c: New testcase.
-
-2013-01-07  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/55852
-	* gfortran.dg/intrinsic_size_3.f90: New.
-
-2013-01-07  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/55763
-	* gfortran.dg/select_type_32.f90: New.
-
-2013-01-04  Dodji Seketeli  <dodji@redhat.com>
-
-	PR c++/52343
-	* g++.dg/cpp0x/alias-decl-29.C: New test.
-
-2013-01-06  Paul Thomas  <pault@gcc.gnu.org>
-
-	PR fortran/53876
-	PR fortran/54990
-	PR fortran/54992
-	* gfortran.dg/class_array_15.f03: New test.
-
-2013-01-06  Mikael Morin  <mikael@gcc.gnu.org>
-
-	PR fortran/42769
-	PR fortran/45836
-	PR fortran/45900
-	* gfortran.dg/use_23.f90: New test.
-	* gfortran.dg/use_24.f90: New test.
-	* gfortran.dg/use_25.f90: New test.
-	* gfortran.dg/use_26.f90: New test.
-	* gfortran.dg/use_27.f90: New test.
-
-2013-01-06  Olivier Hainque  <hainque@adacore.com>
-
-	* gnat.dg/specs/clause_on_volatile.ads: New test.
-
-2013-01-06  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* gnat.dg/alignment10.adb: New test.
-
-2013-01-05  Steven G. Kargl  <kargl@gcc.gnu.org>
-	    Mikael Morin  <mikael@gcc.gnu.org>
-
-	PR fortran/55827
-	* gfortran.dg/use_22.f90: New test.
-
-2013-01-04  Andrew Pinski  <apinski@cavium.com>
-
-	* gcc.target/aarch64/cmp-1.c: New testcase.
-
-2013-01-04  Paul Thomas  <pault@gcc.gnu.org>
-
-	PR fortran/55172
-	* gfortran.dg/select_type_31.f03: New test.
-
-2013-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
-
-	PR c++/54526 (again)
-	* g++.dg/cpp0x/parse2.C: Extend.
-	* g++.old-deja/g++.other/crash28.C: Adjust.
-
-2013-01-04  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/55862
-	* gcc.dg/torture/pr55862.c: New testcase.
-
-2013-01-04  Martin Jambor  <mjambor@suse.cz>
-
-	PR tree-optimization/55755
-	* gcc.dg/torture/pr55755.c: New test.
-	* gcc.dg/tree-ssa/sra-13.c: Likewise.
-	* gcc.dg/tree-ssa/pr45144.c: Update.
-
-2013-01-04  Richard Biener  <rguenther@suse.de>
-
-	PR middle-end/55863
-	* gcc.dg/fold-reassoc-2.c: New testcase.
-
-2013-01-04  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/55763
-	* gfortran.dg/null_7.f90: New.
-
-2013-01-04  Tobias Burnus  <burnus@net-b.de>
-
-	PR fortran/55854
-	PR fortran/55763
-	* gfortran.dg/unlimited_polymorphic_3.f03: Remove invalid code.
-	* gfortran.dg/unlimited_polymorphic_7.f90: New.
-	* gfortran.dg/unlimited_polymorphic_8.f90: New.
-
-2013-01-03  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* gcc.dg/torture/tls/tls-reload-1.c (main): Make testing more thorough.
-
-2013-01-03  Janus Weil  <janus@gcc.gnu.org>
-
-	PR fortran/55855
-	* gfortran.dg/assignment_1.f90: Modified.
-	* gfortran.dg/assignment_4.f90: New.
-
-2013-01-03  David Edelsohn  <dje.gcc@gmail.com>
-
-	* gcc.dg/torture/tls/tls-reload-1.c: Add tls options.
-
-2013-01-03  Richard Biener  <rguenther@suse.de>
-
-	PR tree-optimization/55857
-	* gcc.dg/vect/pr55857-1.c: New testcase.
-	* gcc.dg/vect/pr55857-2.c: Likewise.
-
-2013-01-03  Jakub Jelinek  <jakub@redhat.com>
-
-	PR rtl-optimization/55838
-	* gcc.dg/pr55838.c: New test.
-
-	PR tree-optimization/55832
-	* gcc.c-torture/compile/pr55832.c: New test.
-
-2013-01-02  Teresa Johnson  <tejohnson@google.com>
-
-	* gcc.dg/tree-ssa/loop-1.c: Update expected dump message.
-	* gcc.dg/tree-ssa/loop-23.c: Ditto.
-	* gcc.dg/tree-ssa/cunroll-1.c: Ditto.
-	* gcc.dg/tree-ssa/cunroll-2.c: Ditto.
-	* gcc.dg/tree-ssa/cunroll-3.c: Ditto.
-	* gcc.dg/tree-ssa/cunroll-4.c: Ditto.
-	* gcc.dg/tree-ssa/cunroll-5.c: Ditto.
-	* gcc.dg/unroll_1.c: Ditto.
-	* gcc.dg/unroll_2.c: Ditto.
-	* gcc.dg/unroll_3.c: Ditto.
-	* gcc.dg/unroll_4.c: Ditto.
-
-2013-01-02  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
-
-	* gcc.dg/pr55430.c: Define MAP_FAILED if not defined.
-
-2013-01-02  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
-
-	PR fortran/55818
-	* gfortran.dg/eof_4.f90: New test.
-
-2013-01-02  Jakub Jelinek  <jakub@redhat.com>
-
-	* lib/c-compat.exp (compat-use-alt-compiler): Remove
-	-fno-diagnostics-show-caret from TEST_ALWAYS_FLAGS if needed.
-	(compat-use-tst-compiler): Restore TEST_ALWAYS_FLAGS.
-	(compat_setup_dfp): Initialize compat_alt_caret and
-	compat_save_TEST_ALWAYS_FLAGS.
-
-2013-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* gcc.dg/torture/tls/tls-reload-1.c: New test.
-
-2013-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* gcc.dg/torture/fp-int-convert-2.c: New test.
-
-2013-01-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
-
-	* gfortran.dg/newunit_3.f90: Add dg-do run.
-	* gfortran.dg/inquire_15.f90: Add dg-do run.
-
-2013-01-01  Jakub Jelinek  <jakub@redhat.com>
-
-	PR tree-optimization/55831
-	* gcc.dg/pr55831.c: New test.
+	* gcc.dg/tree-ssa/predcom-1.c: Add -fno-tree-loop-vectorize.
+	* gcc.dg/tree-ssa/predcom-4.c: Likewise.
+	* gcc.dg/tree-ssa/predcom-5.c: Likewise.
+	* gcc.dg/tree-ssa/ivopt_1.c: Likewise.
+	* gcc.dg/tree-ssa/ivopt_2.c: Likewise.
+	* gcc.dg/tree-ssa/ivopt_4.c: Likewise.
+	* gcc.dg/tree-ssa/ivopts-lt.c: Likewise.
+	* gcc.dg/tree-ssa/prefetch-7.c: Likewise.
+	* gcc.dg/tree-ssa/prefetch-8.c: Likewise.
+	* gcc.dg/tree-ssa/prefetch-9.c: Likewise.
+	* gcc.dg/tree-ssa/loop-16.c: Likewise.
+	* gcc.dg/autopar/reduc-1.c: Likewise.
+	* gcc.dg/autopar/reduc-1char.c: Likewise.
+	* gcc.dg/autopar/reduc-1short.c: Likewise.
+	* gcc.dg/autopar/reduc-2.c: Likewise.
+	* gcc.dg/autopar/reduc-2char.c: Likewise.
+	* gcc.dg/autopar/reduc-2short.c: Likewise.
+	* gcc.dg/autopar/reduc-3.c: Likewise.
+	* gcc.dg/autopar/reduc-6.c: Likewise.
+	* gcc.dg/autopar/reduc-7.c: Likewise.
+	* gcc.dg/autopar/reduc-8.c: Likewise.
+	* gcc.dg/autopar/reduc-9.c: Likewise.
+	* gcc.dg/autopar/reduc-9.c: Likewise.
+	* gcc.dg/autopar/outer-1.c: Likewise.
+	* gcc.dg/autopar/outer-3.c: Likewise.
+	* gcc.dg/autopar/outer-4.c: Likewise.
+	* gcc.dg/autopar/outer-5.c: Likewise.
+	* gcc.dg/autopar/parallelization-1.c: Likewise.
+	* gcc.dg/pr53265.c: Likewise.
+	* gcc.dg/var-expand1.c: Likewise.
+	* gcc.target/i386/pr50038.c: Likewise.
+	* gcc.target/i386/wmul-1.c: Likewise.
+	* gcc.target/i386/cadd.c: Likewise.
+	* gcc.target/x86_64/abi/callabi/leaf-2.c: Likewise.
+	* gcc.misc-tests/help.exp: Set -ftree-loop-vectorize as enabled at -O2.
 
-Copyright (C) 2013 Free Software Foundation, Inc.
+Copyright (C) 2014 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/ChangeLog-2013 b/gcc/testsuite/ChangeLog-2013
new file mode 100644
index 0000000..1725101
--- /dev/null
+++ b/gcc/testsuite/ChangeLog-2013
@@ -0,0 +1,3197 @@
+2013-11-04  Marek Polacek  <polacek@redhat.com>
+
+	Backport from mainline
+	2013-11-04  Marek Polacek  <polacek@redhat.com>
+
+	PR c++/58979
+	* g++.dg/diagnostic/pr58979.C: New test.
+
+2013-11-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Backport from mainline
+	2013-10-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR target/58690
+	* gcc.target/i386/pr58690.c: New test
+
+2013-11-02  Janus Weil  <janus@gcc.gnu.org>
+
+	Backport from mainline
+	2013-09-23  Janus Weil  <janus@gcc.gnu.org>
+
+	PR fortran/58355
+	* gfortran.dg/extends_15.f90: New.
+
+2013-10-29  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	PR rtl-optimization/58079
+	* gcc.dg/torture/pr58079.c: New test.
+
+2013-10-28  Tom de Vries  <tom@codesourcery.com>
+
+	* gcc.target/arm/require-pic-register-loc.c: New test.
+
+2013-10-26  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-10-22  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/58779
+	* gcc.target/i386/pr30315.c: Remove MINUSCC, DECCC, MINUSCCONLY
+	and MINUSCCZEXT defines. Update scan-assembler dg directive.
+	* gcc.dg/torture/pr58779.c: New test.
+
+2013-10-25  Richard Henderson  <rth@redhat.com>
+
+	PR rtl/58542
+	* gcc.dg/atomic-store-6.c: New.
+
+2013-10-25  Tom de Vries  <tom@codesourcery.com>
+
+	PR c++/58282
+	* g++.dg/tm/noexcept-6.C: New test.
+
+2013-10-25  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gcc.c-torture/execute/pr58831.c: New test.
+
+2013-10-23  Tom de Vries  <tom@codesourcery.com>
+
+	PR tree-optimization/58805
+	* gcc.dg/pr58805.c: New test.
+
+2013-10-23  Richard Biener  <rguenther@suse.de>
+
+	* gcc.dg/torture/pr58830.c: New testcase.
+
+	Backport from mainline
+	2013-06-24  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57488
+	* gcc.dg/torture/pr57488.c: New testcase.
+
+2013-10-19  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	* gcc.target/sh/pr54089-3.c: Fix test for load of constant 31.
+
+2013-10-17  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/58596
+	* g++.dg/cpp0x/lambda/lambda-nsdmi5.C: New
+
+2013-10-16  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/58633
+	* g++.dg/cpp0x/decltype57.C: New.
+	* g++.dg/cpp0x/enum18.C: Revert r174385 changes.
+
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
+2013-10-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	* gcc.dg/torture/pr58670.c (ASM_STR) [__i386__ || __x86_64__]: Use
+	btsl.
+
+2013-10-10  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/58670
+	* gcc.dg/torture/pr58670.c: New test.
+
+2013-10-09  Jakub Jelinek  <jakub@redhat.com>
+
+	Backport from mainline
+	2013-09-26  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/58539
+	* gcc.dg/torture/pr58539.c: New testcase.
+
+2013-10-08  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/58568
+	* g++.dg/cpp0x/lambda/lambda-ice10.C: New.
+	* g++.old-deja/g++.mike/misc9.C: Adjust.
+
+2013-10-08  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* gcc.target/s390/htm-nofloat-2.c: Add -mzarch to asm options.
+
+2013-10-07  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* gcc.target/s390/htm-nofloat-2.c: New testcase.
+
+2013-10-07  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	Backport from mainline
+	2013-06-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* gcc.target/s390/htm-1.c: New file.
+	* gcc.target/s390/htm-nofloat-1.c: New file.
+	* gcc.target/s390/htm-xl-intrin-1.c: New file.
+
+2013-10-04  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/57697
+	PR fortran/58469
+	* gfortran.dg/defined_assignment_8.f90: New.
+	* gfortran.dg/defined_assignment_9.f90: New.
+	* gfortran.dg/defined_assignment_10.f90: New.
+	* gfortran.dg/defined_assignment_11.f90: New.
+
+2013-10-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	Backport from mainline.
+
+	PR target/58460
+	* gcc.target/aarch64/pr58460.c: New file.
+
+2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/58535
+	* g++.dg/parse/crash62.C: New.
+
+2013-10-01  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/58574
+	* gcc.c-torture/execute/pr58574.c: New test.
+
+2013-09-30  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/58564
+	* gcc.c-torture/execute/pr58564.c: New test.
+
+2013-09-24  Cong Hou  <congh@google.com>
+
+	Backport from mainline:
+	2013-09-24  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/58513
+	* g++.dg/vect/pr58513.cc: New testcase.
+
+2013-09-23  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gnat.dg/opt28.ad[sb]: New test.
+	* gnat.dg/opt28_pkg.ads: New helper.
+
+2013-09-23  Alan Modra  <amodra@gmail.com>
+
+	* gcc.target/powerpc/pr58330.c: New.
+
+2013-09-20  Cong Hou  <congh@google.com>
+
+	Backport from mainline:
+	2013-09-13  Cong Hou  <congh@google.com>
+
+	* gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product
+	on two arrays with short and int types. This should not be recognized
+	as a dot product pattern.
+
+2013-09-18  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/58457
+	* g++.dg/parse/using4.C: New.
+
+2013-09-18  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gnat.dg/array_bounds_test2.adb: New test.
+
+2013-09-18  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gnat.dg/in_out_parameter4.adb: New test.
+
+2013-09-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+	PR tree-optimization/58088
+	* gcc.c-torture/compile/pr58088.c: New test.
+
+2013-09-13  Christian Bruel  <christian.bruel@st.com>
+
+	PR target/58314
+	* gcc.target/sh/torture/pr58314.c: New test.
+
+2013-09-11  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/58377
+	* g++.dg/uninit-pred-4.C: New testcase.
+
+2013-09-11  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/58385
+	* gcc.c-torture/execute/pr58385.c: New test.
+
+2013-09-10  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/58365
+	* gcc.c-torture/execute/pr58365.c: New test.
+
+2013-09-09  Jakub Jelinek  <jakub@redhat.com>
+
+	PR c++/58325
+	* g++.dg/warn/Wunused-var-21.C: New test.
+
+	PR tree-optimization/58364
+	* gcc.c-torture/execute/pr58364.c: New test.
+
+2013-09-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+	PR target/57735
+	* g++.dg/ext/pr57735.C: New test.
+
+2013-09-09  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-08-27  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57521
+	* gcc.dg/torture/pr57521.c: New testcase.
+
+2013-09-09  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-09-03  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/57656
+	* gcc.dg/torture/pr57656.c: New testcase.
+
+2013-09-09  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-08-29  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57685
+	* gcc.dg/torture/pr57685.c: New testcase.
+
+2013-09-09  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-08-30  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/58223
+	* gcc.dg/torture/pr58223.c: New testcase.
+	* gcc.dg/tree-ssa/ldist-16.c: Flip expected behavior.
+
+2013-09-03  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-08-29  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/58246
+	* gcc.dg/torture/pr58246.c: New testcase.
+
+2013-09-03  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-08-30  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/58228
+	* gcc.dg/torture/pr58228.c: New testcase.
+
+2013-09-03  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-08-30  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/58010
+	* gcc.dg/pr58010.c: New testcase.
+
+2013-08-30  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/58277
+	* gcc.c-torture/execute/pr58277-1.c: New test.
+	* gcc.c-torture/execute/pr58277-2.c: New test.
+
+2013-08-29  Jakub Jelinek  <jakub@redhat.com>
+
+	Backported from mainline
+	2013-07-22  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR testsuite/52641
+	* gcc.dg/torture/pr57381.c: Add dg-require-effective-target int32plus.
+
+	2013-05-27  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57417
+	* gcc.dg/torture/pr57417.c: New testcase.
+
+	PR tree-optimization/57396
+	* gfortran.fortran-torture/execute/pr57396.f90: New testcase.
+
+	PR tree-optimization/57343
+	* gcc.dg/torture/pr57343.c: New testcase.
+
+	2013-05-23  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/57381
+	* gcc.dg/torture/pr57381.c: New testcase.
+
+2013-08-28  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/58257
+	* c-c++-common/gomp/pr58257.c: New test.
+
+2013-08-28  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-06-24  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/56977
+	* gcc.dg/pr56977.c: New testcase.
+
+2013-08-24  Mikael Morin  <mikael@gcc.gnu.org>
+
+	PR fortran/57798
+	* gfortran.dg/inline_sum_5.f90: New.
+
+2013-08-24  Janus Weil  <janus@gcc.gnu.org>
+
+	Backport from trunk:
+	2013-08-22  Janus Weil  <janus@gcc.gnu.org>
+
+	PR fortran/58185
+	* gfortran.dg/select_type_34.f90: New.
+
+2013-08-23  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/58218
+	* gcc.target/i386/pr58218.c: New test.
+
+	PR tree-optimization/58209
+	* gcc.c-torture/execute/pr58209.c: New test.
+
+2013-08-20  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/58190
+	* g++.dg/pr57878.C: Use __SIZE_TYPE__.
+
+2013-08-18  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/58006
+	* g++.dg/opt/pr58006.C: New test.
+
+2013-08-16  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/58164
+	* gcc.c-torture/compile/pr58164.c: New test.
+
+	PR tree-optimization/58165
+	* g++.dg/opt/pr58165.C: New test.
+
+2013-08-14  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/58145
+	* gcc.dg/pr58145-1.c: New test.
+	* gcc.dg/pr58145-2.c: New test.
+
+2013-08-13  Jakub Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/56417
+	* gcc.dg/asan/pr56417.c: New test.
+
+2013-08-13  Vladimir Makarov  <vmakarov@redhat.com>
+
+	Backport from mainline
+	2013-06-06  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/57459
+	* gcc.target/i386/pr57459.c: New test.
+
+2013-08-13  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gnat.dg/loop_optimization16.adb: New test.
+	* gnat.dg/loop_optimization16_pkg.ad[sb]: New helper.
+
+2013-08-13  Marek Polacek  <polacek@redhat.com>
+
+	PR tree-optimization/57980
+	* gcc.dg/pr57980.c: New test.
+
+2013-08-13  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-08-12  Perez Read  <netfirewall@gmail.com>
+
+	PR target/58132
+	* gcc.target/i386/movabs-1.c: New test.
+
+2013-08-11  Janus Weil  <janus@gcc.gnu.org>
+
+	Backport from trunk:
+	2013-08-09  Janus Weil  <janus@gcc.gnu.org>
+
+	PR fortran/58058
+	* gfortran.dg/transfer_intrinsic_6.f90: New.
+
+2013-08-09  Zhenqiang Chen  <zhenqiang.chen@linaro.org>
+
+	Backport from mainline:
+	2013-08-09  Zhenqiang Chen  <zhenqiang.chen@linaro.org>
+
+	* gcc.target/arm/lp1189445.c: New testcase.
+
+2013-08-06  Martin Jambor  <mjambor@suse.cz>
+	    Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+	* gcc.dg/torture/pr58041.c (foo): Accept z by reference.
+	(a): Fix constructor.
+
+2013-08-06  Martin Jambor  <mjambor@suse.cz>
+
+	PR middle-end/58041
+	* gcc.dg/torture/pr58041.c: New test.
+	* gcc.target/arm/pr58041.c: Likewise.
+
+2013-07-28  Tobias Burnus  <burnus@net-b.de>
+
+	Backport from mainline
+	2013-05-28  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/57435
+	* gfortran.dg/use_29.f90: New.
+
+2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/57981
+	* g++.dg/cpp0x/pr57981.C: New.
+
+2013-07-25  Terry Guo  <terry.guo@arm.com>
+
+	Backport from mainline:
+	2013-07-25  Terry Guo  <terry.guo@arm.com>
+
+	* gcc.target/arm/thumb1-Os-mult.c: New test case.
+
+2013-07-19  Wei Mi  <wmi@google.com>
+
+	Backport from mainline:
+	2013-07-18  Wei Mi  <wmi@google.com>
+
+	PR rtl-optimization/57878
+	* g++.dg/pr57878.C: New test.
+
+2013-07-19  Georg-Johann Lay  <avr@gjlay.de>
+
+	Backport from 2013-07-19 trunk r201051.
+
+	PR target/57516
+	* gcc.target/avr/torture/builtins-4-roundfx.c (test2hr, test2k):
+	Adjust to corrected rounding.
+
+2013-07-19  Kirill Yukhin  <kirill.yukhin@intel.com>
+
+	* gcc.target/i386/bmi-1.c: Extend with new instrinsics.
+	Fix scan patterns.
+	* gcc.target/i386/bmi-2.c: Ditto.
+	* gcc.target/i386/bmi-bextr-4.c: New.
+	* gcc.target/i386/bmi-bextr-5.c: Ditto.
+
+2013-07-16  Iain Sandoe  <iain@codesourcery.com>
+
+	PR target/55656
+	PR target/55657
+	* obj-c++.dg/cxx-ivars-3.mm: Use NSObject instead of Object.
+	* obj-c++.dg/strings/const-cfstring-5.mm: Likewise.
+	* obj-c++.dg/torture/strings/const-str-10.mm: Likewise.
+	* obj-c++.dg/torture/strings/const-str-9.mm: Likewise.
+	* objc.dg/image-info.m: Likewise.
+	* objc.dg/symtab-1.m: Likewise.
+	* objc.dg/torture/strings/const-str-10.m: Likewise.
+	* objc.dg/torture/strings/const-str-11.m: Likewise.
+	* objc.dg/torture/strings/const-str-9.m: Likewise.
+	* objc.dg/zero-link-1.m: Likewise.
+	* objc.dg/zero-link-2.m: Likewise.
+	* objc.dg/no-extra-load.m: Avoid Foundation.h.
+	* objc.dg/objc-foreach-4.m: Likewise.
+	* objc.dg/objc-foreach-5.m: Likewise.
+	* obj-c++.dg/proto-lossage-7.mm: Use NSObject instead of Object
+	(for Darwin).
+	* obj-c++.dg/strings/const-str-12.mm: Likewise.
+	* obj-c++.dg/syntax-error-1.mm: Likewise.
+	* objc.dg/method-6.m: Likewise.
+	* objc.dg/pr23214.m: Likewise.
+	* objc.dg/proto-lossage-7.m: Likewise.
+	* objc.dg/strings/const-str-12b.m: Likewise.
+	* objc.dg/zero-link-3.m: Likewise.
+	* obj-c++.dg/method-12.mm: Skip on Darwin versions without 'Object'.
+	* objc.dg/encode-7-next-64bit.m: Use NSObject instead of Object,
+	adjust headers, interfaces and encoded types to reflect current system
+	versions.  Add FIXME and outputs from current system compiler for
+	reference.
+
+2013-07-10  Janis Johnson  <janisjo@codesourcery.com>
+
+	* gcc.target/powerpc/20020118-1.c: Force 128-bit stack alignment
+	for EABI targets.
+	* gcc.c-torture/execute/nest-align-1.x: New.
+
+2013-07-08  Janis Johnson  <janisjo@codesourcery.com>
+
+	* gcc.target/powerpc/tfmode_off.c: Skip for EABI targets.
+
+	* gcc.target/powerpc/ppc-spe64-1.c: Update expected error message.
+
+	* gcc.target/powerpc/pr47197.c: Require powerpc_altivec_ok.
+
+2013-07-08  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/57785
+	* gfortran.dg/dot_product_2.f90: New.
+
+2013-07-08  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/57829
+	* gcc.c-torture/execute/pr57829.c: New test.
+
+2013-07-05  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/57645
+	* g++.dg/cpp0x/noexcept21.C: New.
+
+2013-07-03  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/57777
+	* gcc.target/i386/pr57777.c: New test.
+
+	PR c++/57771
+	* g++.dg/template/arg9.C: New test.
+
+2013-06-28  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/57736
+	* gcc.target/i386/pr57736.c: New test.
+
+2013-06-27  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/57623
+	* gcc.target/i386/bmi-bextr-3.c: New test.
+
+	PR target/57623
+	* gcc.target/i386/bmi2-bzhi-1.c: New test.
+
+2013-06-24  Martin Jambor  <mjambor@suse.cz>
+
+	PR tree-optimization/57358
+	* gcc.dg/ipa/pr57358.c: New test.
+
+2013-06-24  Alan Modra  <amodra@gmail.com>
+
+	* gcc.target/powerpc/altivec-consts.c: Correct for little-endian.
+	Add scan-assembler-not "lvx".
+	* gcc.target/powerpc/le-altivec-consts.c: New.
+
+2013-06-21  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-06-20  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/57655
+	* gcc.target/i386/pr57655.c: New test.
+
+2013-06-21  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/53211
+	* g++.dg/cpp0x/decltype55.C: New.
+
+2013-06-20  Wei Mi  <wmi@google.com>
+
+	Backport from mainline
+	2013-06-19  Wei Mi  <wmi@google.com>
+
+	PR rtl-optimization/57518
+	* testsuite/gcc.dg/pr57518.c: New test.
+
+2013-06-11  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/57508
+	* gfortran.dg/defined_assignment_7.f90: New.
+
+2013-06-10  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	Backport from mainline
+	2013-05-20  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	PR target/56547
+	* gcc.target/sh/pr56547-1.c: New.
+	* gcc.target/sh/pr56547-2.c: New.
+
+2013-06-09  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/57568
+	* gcc.c-torture/execute/pr57568.c: New test.
+
+2013-06-04  Tobias Burnus  <burnus@net-b.de>
+
+	Backport from mainline
+	2013-05-22  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/57364
+	* gfortran.dg/defined_assignment_6.f90: New.
+
+2013-05-31  Janus Weil  <janus@gcc.gnu.org>
+	    Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/57217
+	* gfortran.dg/typebound_override_4.f90: New.
+
+2013-05-31  Release Manager
+
+	* GCC 4.8.1 released.
+
+2013-05-26  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gnat.dg/specs/last_bit.ads: New test.
+
+2013-05-24  Greta Yorsh  <Greta.Yorsh@arm.com>
+
+	Backport from mainline
+	2013-05-02  Greta Yorsh  <Greta.Yorsh@arm.com>
+
+	PR target/56732
+	* gcc.target/arm/pr56732-1.c: New test.
+
+2013-05-24  Alexander Ivchenko  <alexander.ivchenko@intel.com>
+
+	PR tree-ssa/57385
+	* gcc.dg/tree-ssa/pr57385.c: New test.
+
+2013-05-23  Martin Jambor  <mjambor@suse.cz>
+
+	PR middle-end/57347
+	* gcc.dg/ipa/pr57347.c: New test.
+
+2013-05-23  Richard Biener  <rguenther@suse.de>
+
+	PR rtl-optimization/57341
+	* gcc.dg/torture/pr57341.c: New testcase.
+
+2013-05-23  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/57344
+	* gcc.c-torture/execute/pr57344-1.c: New test.
+	* gcc.c-torture/execute/pr57344-2.c: New test.
+	* gcc.c-torture/execute/pr57344-3.c: New test.
+	* gcc.c-torture/execute/pr57344-4.c: New test.
+
+2013-05-22  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-05-21  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57330
+	* gcc.dg/torture/pr57330.c: New testcase.
+
+	2013-05-21  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57303
+	* gcc.dg/torture/pr57303.c: New testcase.
+
+2013-05-21  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/57321
+	* gcc.c-torture/execute/pr57321.c: New test.
+
+2013-05-17  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/57281
+	PR rtl-optimization/57300
+	* gcc.dg/pr57300.c: New test.
+	* gcc.c-torture/execute/pr57281.c: New test.
+
+2013-05-16  Dodji Seketeli  <dodji@redhat.com>
+
+	PR c++/56782 - Regression with empty pack expansions
+	* g++.dg/cpp0x/variadic142.C: New test file.
+
+2013-05-14  Jakub Jelinek  <jakub@redhat.com>
+
+	PR c++/57274
+	* c-c++-common/Wsequence-point-1.c: New test.
+
+	PR middle-end/57251
+	* gcc.dg/torture/pr57251.c: New test.
+
+2013-05-13  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/57264
+	* gcc.target/i386/pr57264.c: New test.
+
+2013-05-13  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/57230
+	* gcc.dg/strlenopt-23.c: New test.
+
+2013-05-10  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57214
+	* gcc.dg/torture/pr57214.c: New testcase.
+
+2013-05-09  Martin Jambor  <mjambor@suse.cz>
+
+	PR middle-end/56988
+	* gcc.dg/ipa/pr56988.c: New test.
+
+2013-05-08  Marc Glisse  <marc.glisse@inria.fr>
+
+	* c-c++-common/vector-scalar-2.c: New testcase.
+
+2013-05-07  Tobias Burnus  <burnus@net-b.de>
+
+	Backport from mainline
+	2013-05-02  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/57142
+	* gfortran.dg/size_kind_2.f90: New.
+	* gfortran.dg/size_kind_3.f90: New.
+
+2013-05-07  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/57149
+	* gcc.dg/pr57149.c: New test.
+
+	PR debug/57184
+	* gcc.dg/pr57184.c: New test.
+
+2013-05-07  Richard Biener  <rguenther@suse.de>
+
+	Backport from mainline
+	2013-05-06  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57185
+	* gcc.dg/autopar/pr57185.c: New testcase.
+
+	2013-04-19  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/57000
+	* gcc.dg/tree-ssa/reassoc-27.c: New testcase.
+
+2013-05-07  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gnat.dg/specs/array3.ads: New test.
+
+2013-05-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
+
+	Backport from trunk
+	2013-05-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
+
+	PR target/57150
+	* gcc.target/powerpc/pr57150.c: New file.
+
+2013-05-06  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-05-06  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/57106
+	* gcc.target/i386/pr57106.c: New test.
+
+2013-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/57183
+	* g++.dg/cpp0x/auto38.C: New.
+
+2013-05-04  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56205
+	* gcc.dg/tree-ssa/stdarg-6.c: Add cleanup-tree-dump "stdarg".
+
+2013-05-03  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/57130
+	* gcc.c-torture/execute/pr57130.c: New test.
+
+2013-05-03  Marek Polacek  <polacek@redhat.com>
+
+	Backport from mainline
+	2013-04-25  Marek Polacek  <polacek@redhat.com>
+
+	PR tree-optimization/57066
+	* gcc.dg/torture/builtin-logb-1.c: Adjust testcase.
+
+2013-05-02  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/57131
+	* gcc.c-torture/execute/pr57131.c: New test.
+
+2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
+
+	Backport from mainline
+	PR target/57091
+	* gcc.target/i386/pr57091.c: New test.
+
+2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
+
+	Backport from mainline
+	2013-04-29  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR target/57097
+	* gcc.target/i386/pr57097.c: New test.
+
+2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
+
+	Backport from mainline
+	2013-04-24  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimizations/57046
+	* gcc.target/i386/pr57046.c: New test.
+
+2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
+
+	Backport from mainline
+	2013-04-22  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR target/57018
+	* gcc.target/i386/pr57018.c: New test.
+
+2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
+
+	Backport from mainline
+	2013-04-18  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/56999
+	* g++.dg/opt/pr56999.C: New test.
+
+2013-05-02  Vladimir Makarov  <vmakarov@redhat.com>
+
+	Backport from mainline
+	2013-04-19  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/56847
+	* gcc.dg/pr56847.c: New test.
+
+2013-05-02  Ian Bolton  <ian.bolton@arm.com>
+
+	Backport from mainline (fix to botched commit)
+	2013-04-04  Tejas Belagod  <tejas.belagod@arm.com>
+
+	* gcc.target/aarch64/inc/asm-adder-clobber-lr.c: Remove duplication.
+	* gcc.target/aarch64/inc/asm-adder-no-clobber-lr.c: Likewise.
+	* gcc.target/aarch64/test-framepointer-1.c: Likewise.
+	* gcc.target/aarch64/test-framepointer-2.c: Likewise.
+	* gcc.target/aarch64/test-framepointer-3.c: Likewise.
+	* gcc.target/aarch64/test-framepointer-4.c: Likewise.
+	* gcc.target/aarch64/test-framepointer-5.c: Likewise.
+	* gcc.target/aarch64/test-framepointer-6.c: Likewise.
+	* gcc.target/aarch64/test-framepointer-7.c: Likewise.
+	* gcc.target/aarch64/test-framepointer-8.c: Likewise.
+
+	Backport from mainline
+	2013-03-28  Ian Bolton  <ian.bolton@arm.com>
+
+	* gcc.target/aarch64/inc/asm-adder-clobber-lr.c: New test.
+	* gcc.target/aarch64/inc/asm-adder-no-clobber-lr.c: Likewise.
+	* gcc.target/aarch64/test-framepointer-1.c: Likewise.
+	* gcc.target/aarch64/test-framepointer-2.c: Likewise.
+	* gcc.target/aarch64/test-framepointer-3.c: Likewise.
+	* gcc.target/aarch64/test-framepointer-4.c: Likewise.
+	* gcc.target/aarch64/test-framepointer-5.c: Likewise.
+	* gcc.target/aarch64/test-framepointer-6.c: Likewise.
+	* gcc.target/aarch64/test-framepointer-7.c: Likewise.
+	* gcc.target/aarch64/test-framepointer-8.c: Likewise.
+
+2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/57092
+	* g++.dg/cpp0x/decltype53.C: New.
+
+2013-04-30  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/57104
+	* gcc.dg/pr57104.c: New test.
+
+2013-04-30  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-04-29  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/44578
+	* gcc.target/i386/pr44578.c: New test.
+
+	Backport from mainline
+	2013-04-29  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/57098
+	* gcc.target/i386/pr57098.c: New test.
+
+2013-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/56450
+	* g++.dg/cpp0x/decltype52.C: New.
+
+2013-04-29  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/57103
+	* gcc.dg/autopar/pr57103.c: New testcase.
+
+2013-04-29  Christian Bruel  <christian.bruel@st.com>
+
+	PR target/57108
+	* gcc.target/sh/pr57108.c: New test.
+
+2013-04-29  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/57083
+	* gcc.dg/torture/pr57083.c: New test.
+
+2013-04-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+	Backport from trunk:
+
+	PR fortran/51825
+	* gfortran.dg/namelist_77.f90: New test.
+	* gfortran.dg/namelist_78.f90: New test.
+
+2013-04-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+	PR fortran/56786
+	* gfortran.dg/namelist_81.f90:  New test.
+
+2013-04-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+	Backport from trunk:
+
+	PR fortran/52512
+	* gfortran.dg/namelist_79.f90: New test.
+
+2013-04-27  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/56866
+	* gcc.c-torture/execute/pr56866.c: New test.
+	* gcc.target/i386/pr56866.c: New test.
+
+2013-04-26  Janus Weil  <janus@gcc.gnu.org>
+
+	Backports from trunk:
+
+	PR fortran/56968
+	* gfortran.dg/proc_ptr_41.f90: New.
+
+	PR fortran/56814
+	* gfortran.dg/proc_ptr_42.f90: New.
+
+	PR fortran/53685
+	PR fortran/57022
+	* gfortran.dg/transfer_check_4.f90: New.
+
+2013-04-25  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/57003
+	* gcc.target/i386/pr57003.c: New test.
+
+2013-04-25  Ian Bolton  <ian.bolton@arm.com>
+
+	Backported from mainline.
+	2013-03-22  Ian Bolton  <ian.bolton@arm.com>
+
+	* gcc.target/aarch64/movk.c: New test.
+
+2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/56970
+	* g++.dg/cpp0x/sfinae45.C: New.
+
+2013-04-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+	Backported from mainline.
+	PR rtl-optimization/56605
+	* gcc.target/powerpc/pr56605.c: New.
+
+2013-04-22  Marek Polacek  <polacek@redhat.com>
+
+	Backport from mainline
+	2013-04-22  Marek Polacek  <polacek@redhat.com>
+
+	PR sanitizer/56990
+	* gcc.dg/pr56990.c: New test.
+
+2013-04-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
+	    Mikael Morin  <mikael@gcc.gnu.org>
+
+	PR fortran/56872
+	* gfortran.dg/array_constructor_45.f90:  New test.
+	* gfortran.dg/array_constructor_46.f90:  New test.
+	* gfortran.dg/array_constructor_47.f90:  New test.
+	* gfortran.dg/array_constructor_40.f90:  Adjust number of
+	while loops.
+
+2013-04-18  Mikael Morin  <mikael@gcc.gnu.org>
+
+	PR fortran/56816
+	* gfortran.dg/select_type_33.f03: New test.
+
+2013-04-18  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56984
+	* gcc.c-torture/compile/pr56984.c: New test.
+
+	PR rtl-optimization/56992
+	* gcc.dg/pr56992.c: New test.
+
+2013-04-16  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-04-16  Uros Bizjak  <ubizjak@gmail.com>
+
+	* g++.dg/ipa/devirt-c-7.C: Require nonpic effective target.
+	* gcc.c-torture/execute/pr33992.x: Remove.
+	* gcc.c-torture/execute/pr33992.c (foo): Declare as static.
+	* gcc.dg/uninit-pred-5_a.c (foo): Ditto.
+	* gcc.dg/uninit-pred-5_b.c (foo): Ditto.
+
+	Backport from mainline
+	2013-03-27  Alexander Ivchenko  <alexander.ivchenko@intel.com>
+
+	* g++.dg/ipa/ivinline-1.C: Add target nonpic.
+	* g++.dg/ipa/ivinline-2.C: Likewise.
+	* g++.dg/ipa/ivinline-3.C: Likewise.
+	* g++.dg/ipa/ivinline-4.C: Likewise.
+	* g++.dg/ipa/ivinline-5.C: Likewise.
+	* g++.dg/ipa/ivinline-7.C: Likewise.
+	* g++.dg/ipa/ivinline-8.C: Likewise.
+	* g++.dg/ipa/ivinline-9.C: Likewise.
+	* g++.dg/cpp0x/noexcept03.C: Likewise.
+	* gcc.dg/const-1.c: Likewise.
+	* gcc.dg/ipa/pure-const-1.c: Likewise.
+	* gcc.dg/noreturn-8.c: Likewise.
+	* gcc.target/i386/mmx-1.c: Likewise.
+	* gcc.dg/tree-ssa/ipa-split-5.c: Likewise.
+	* gcc.dg/tree-ssa/loadpre6.c: Likewise.
+	* gcc.c-torture/execute/pr33992.x: New file.
+
+2013-04-15  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56962
+	* gcc.c-torture/execute/pr56962.c: New test.
+
+2013-04-15  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gcc.dg/pr56890-1.c: New test.
+	* gcc.dg/pr56890-2.c: Likewise.
+
+2013-04-12  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR target/56903
+	* gcc.target/i386/pr56903.c: New test.
+
+2013-04-12  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56918
+	PR tree-optimization/56920
+	* gcc.dg/vect/pr56918.c: New test.
+	* gcc.dg/vect/pr56920.c: New test.
+
+2013-04-11  Jakub Jelinek  <jakub@redhat.com>
+
+	PR c++/56895
+	* g++.dg/template/arrow4.C: New test.
+
+2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/56913
+	* g++.dg/cpp0x/sfinae44.C: New.
+
+2013-04-11  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	Backported from mainline.
+	2013-04-11  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* gcc.target/aarch64/vect-fcm.x: Add check for zero forms of
+	inverse operands.
+	* gcc.target/aarch64/vect-fcm-eq-d.c: Check that new zero form
+	loop is vectorized.
+	* gcc.target/aarch64/vect-fcm-eq-f.c: Likewise.
+	* gcc.target/aarch64/vect-fcm-ge-d.c: Check that new zero form
+	loop is vectorized and that the correct instruction is generated.
+	* gcc.target/aarch64/vect-fcm-ge-f.c: Likewise.
+	* gcc.target/aarch64/vect-fcm-gt-d.c: Likewise.
+	* gcc.target/aarch64/vect-fcm-gt-f.c: Likewise.
+
+2013-04-11  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56899
+	* gcc.c-torture/execute/pr56899.c: New test.
+
+2013-04-10  Jakub Jelinek  <jakub@redhat.com>
+
+	PR c++/56895
+	* g++.dg/template/arrow3.C: New test.
+
+	Backported from mainline
+	2013-04-09  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56883
+	* c-c++-common/gomp/pr56883.c: New test.
+
+2013-04-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+	PR fortran/56782
+	Backport from trunk.
+	* gfortran.dg/array_constructor_44.f90:  New test.
+
+2013-04-08  Jakub Jelinek  <jakub@redhat.com>
+
+	* gcc.c-torture/execute/pr56837.c: New test.
+
+2013-04-04  Marek Polacek  <polacek@redhat.com>
+
+	Backport from mainline:
+	2013-04-04  Marek Polacek  <polacek@redhat.com>
+
+	PR tree-optimization/48186
+	* gcc.dg/pr48186.c: New test.
+
+2013-04-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+	Backport from mainline:
+	2013-03-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+	PR target/56720
+	* gcc.target/arm/neon-vcond-gt.c: New test.
+	* gcc.target/arm/neon-vcond-ltgt.c: Likewise.
+	* gcc.target/arm/neon-vcond-unordered.c: Likewise.
+
+2013-04-04  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56837
+	* g++.dg/torture/pr56837.C: New testcase.
+
+2013-04-03  Marek Polacek  <polacek@redhat.com>
+
+	Backport from mainline:
+	2013-04-03  Marek Polacek  <polacek@redhat.com>
+
+	PR sanitizer/55702
+	* gcc.dg/pr55702.c: New test.
+
+2013-04-03  Jakub Jelinek  <jakub@redhat.com>
+
+	PR debug/56819
+	* g++.dg/debug/pr56819.C: New test.
+
+2013-04-03  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56817
+	* g++.dg/torture/pr56817.C: New testcase.
+
+2013-04-03  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/55964
+	* gcc.dg/torture/pr55964-2.c: New testcase.
+
+2013-04-03  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56501
+	* gcc.dg/torture/pr56501.c: New testcase.
+
+2013-04-03  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56407
+	* gcc.dg/torture/pr56407.c: New testcase.
+
+2013-04-02  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/56745
+	* gcc.c-torture/compile/pr56745.c: New test.
+
+2013-04-02  Tobias Burnus  <burnus@net-b.de>
+
+	Backport from mainline:
+	2013-03-28  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/56735
+	* gfortran.dg/namelist_80.f90: New.
+
+2013-04-02  Tobias Burnus  <burnus@net-b.de>
+
+	Backport from mainline:
+	2013-03-29  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/56737
+	* testsuite/gfortran.dg/fmt_cache_3.f90: New.
+
+2013-04-02  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/56768
+	* g++.dg/torture/pr56768.C: New testcase.
+
+2013-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/55951
+	* g++.dg/ext/desig5.C: New.
+
+2013-03-29  Kirill Yukhin  <kirill.yukhin@intel.com>
+
+	* gcc.target/i386/avx2-vbroadcastsi128-1.c: Fix intrinsic name.
+	* gcc.target/i386/avx2-vbroadcastsi128-1.c: Ditto.
+
+2013-03-28  Tejas Belagod  <tejas.belagod@arm.com>
+
+	PR middle-end/56694
+	* g++.dg/torture/pr56694.C: Fix test case to build on bare-metal
+	targets.
+
+2013-03-25  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/56722
+	* g++.dg/cpp0x/range-for23.C: New.
+
+2013-03-25  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/56694
+	* g++.dg/torture/pr56694.C: New testcase.
+
+2013-03-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	Backport from mainline:
+	2013-03-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	PR fortran/54932
+	* gfortran.dg/do_1.f90: Don't xfail.
+
+2013-03-24  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/56696
+	* gfortran.dg/eof_5.f90: New.
+
+2013-03-22  Sebastian Huber  <sebastian.huber@embedded-brains.de>
+
+	* gcc.c-torture/execute/builtins/builtins.exp: Sort targets
+	alphabetically.
+
+2013-03-22  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/56582
+	* g++.dg/cpp0x/constexpr-array5.C: New.
+
+2013-03-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR target/56560
+	* gcc.target/i386/pr56560.c: New file.
+
+2013-03-22  Sebastian Huber  <sebastian.huber@embedded-brains.de>
+
+	PR testsuite/55994
+	* gcc.c-torture/execute/builtins/builtins.exp: Add
+	-Wl,--allow-multiple-definition for RTEMS targets.
+
+2013-03-22  Jakub Jelinek  <jakub@redhat.com>
+
+	Backported from mainline
+	2013-03-16  Jakub Jelinek  <jakub@redhat.com>
+
+	PR c++/56607
+	* g++.dg/warn/Wdiv-by-zero-2.C: New test.
+	* c-c++-common/pr56607.c: New test.
+
+2013-03-22  Release Manager
+
+	* GCC 4.8.0 released.
+
+2013-03-20  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56661
+	* gcc.dg/torture/pr56661.c: New testcase.
+
+2013-03-20  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56635
+	* g++.dg/torture/pr56635.C: New test.
+
+2013-03-15  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/56615
+	* gfortran.dg/transfer_intrinsic_5.f90: New.
+
+2013-03-15  Kai Tietz  <ktietz@redhat.com>
+
+	* gcc.target/i386/movti.c: Don't test for x64 mingw.
+	* gcc.target/i386/pr20020-1.c: Likewise.
+	* gcc.target/i386/pr20020-2.c: Likewise.
+	* gcc.target/i386/pr20020-3.c: Likewise.
+	* gcc.target/i386/pr53425-1.c: Likewise.
+	* gcc.target/i386/pr53425-2.c: Likewise.
+	* gcc.target/i386/pr55093.c: Likewise.
+	* gcc.target/i386/pr53907.c: Adjust test for LLP64 targets.
+
+2013-03-15  Jakub Jelinek  <jakub@redhat.com>
+
+	PR debug/56307
+	* gcc.dg/tree-ssa/pr55579.c: Add -fvar-tracking-assignments to
+	dg-options.  Remove 32-bit hppa*-*-hpux* xfail.
+
+2013-03-14  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/53265
+	* gcc.dg/graphite/scop-3.c (toto): Increase array size to avoid
+	undefined behavior.
+	* gcc.dg/graphite/id-6.c (test): Likewise.
+	* gcc.dg/graphite/pr35356-2.c: Adjust regexp patterns to only look for
+	MIN_EXPR and MAX_EXPR in GIMPLE stmts.
+
+	PR tree-optimization/53265
+	* gcc.dg/pr53265.c: New test.
+	* gcc.dg/torture/pr49518.c: Add -Wno-aggressive-loop-optimizations
+	to dg-options.
+	* g++.dg/opt/longbranch2.C (EBCOTLut): Double sizes of a2 and a3
+	arrays.
+	* gcc.dg/tree-ssa/cunroll-10.c (main): Rename to foo.  Add argument
+	n, use it as high bound instead of 4.
+
+2013-03-13  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	PR target/49880
+	* gcc.target/sh/pr49880-1.c: New.
+	* gcc.target/sh/pr49880-2.c: New.
+	* gcc.target/sh/pr49880-3.c: New.
+	* gcc.target/sh/pr49880-4.c: New.
+	* gcc.target/sh/pr49880-5.c: New.
+
+2013-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	* g++.dg/cpp0x/alias-decl-32.C: Remove redundant bits.
+
+2013-03-13  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56608
+	* gcc.dg/vect/fast-math-bb-slp-call-3.c: New testcase.
+
+2013-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/56611
+	* g++.dg/cpp0x/alias-decl-32.C: New.
+
+2013-03-11  Jan Hubicka  <jh@suse.cz>
+
+	PR middle-end/56571
+	* gcc.c-torture/compile/pr56571.c: New testcase.
+
+2013-03-11  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	* gcc.dg/tree-ssa/vector-4.c: Add comment regarding xfail.
+	* gcc.dg/tree-ssa/pr55579.c: Likewise.
+
+2013-03-11  Dominique d'Humieres  <dominiq@lps.ens.fr>
+
+	* gcc.dg/inline_3.c: Remove target and dg-excess-errors.
+	* gcc.dg/inline_4.c: Likewise.
+	* gcc.dg/unroll_2.c: Likewise.
+	* gcc.dg/unroll_3.c: Likewise.
+	* gcc.dg/unroll_4.c: Likewise.
+
+2013-03-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	PR testsuite/54119
+	* gcc.dg/tree-ssa/vector-4.c: xfail on 32-bit hppa*-*-*.
+
+	PR debug/56307
+	* gcc.dg/tree-ssa/pr55579.c: xfail 32-bit hppa*-*-hpux*.
+
+2013-03-11  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	PR target/40797
+	* gcc.c-torture/compile/pr40797.c: New.
+
+2013-03-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	* gcc.dg/pr44194-1.c: Skip compilation on hppa*64*-*-*.
+
+2013-03-10  Paul Thomas  <pault@gcc.gnu.org>
+
+	PR fortran/56575
+	* gfortran.dg/class_56.f90: New test.
+
+2013-03-09  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	PR middle-end/56524
+	* gcc.target/mips/pr56524.c: New test.
+
+2013-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/56565
+	* g++.dg/cpp0x/lambda/lambda-nsdmi2.C: New.
+
+2013-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/51412
+	* g++.dg/cpp0x/lambda/lambda-err3.C: New.
+
+2013-03-08  Marek Polacek  <polacek@redhat.com>
+
+	PR tree-optimization/56478
+	* gcc.dg/torture/pr56478.c: New test.
+
+2013-03-08  Kai Tietz  <ktietz@redhat.com>
+
+	* gcc.c-torture/execute/builtins/builtins.exp: Add for mingw
+	targets linker option --allow-multiple-definition.
+
+	* gcc.dg/pr14092-1.c: Mark intptr_t typedef to use extension.
+	* gcc.dg/pr24683.c: Avoid warning about casting constant string.
+	* gcc.dg/pr52549.c: Add LLP64 case.
+	* gcc.dg/pr53701.c: Use for uintptr_t typedef __UINTPTR_TYPE__.
+	* gcc.dg/pr56510.c: Adjust for LLP64 targets.
+	* gcc.dg/torture/pr51071-2.c: Likewise.
+	* gcc.dg/tree-ssa/vrp72.c: Likewise.
+	* gcc.dg/tree-ssa/vrp73.c: Likewise.
+	* gcc.dg/tree-ssa/vrp75.c: Likewise.
+	* gcc.dg/torture/pr53922.c: Skip test for mingw-targets.
+	* gcc.dg/weak/weak-1.c: Likewise.
+	* gcc.dg/weak/weak-2.c: Likewise.
+	* gcc.dg/weak/weak-3.c: Likewise.
+	* gcc.dg/weak/weak-4.c: Likewise.
+	* gcc.dg/weak/weak-5.c: Likewise.
+	* gcc.dg/weak/weak-15.c: Likewise.
+	* gcc.dg/weak/weak-16.c: Likewise.
+
+	* c-c++-common/pr54486.c: Skip test for mingw-targets.
+
+2013-03-07  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56559
+	* gcc.dg/tree-ssa/reassoc-26.c: New test.
+
+2013-03-07  Andreas Schwab  <schwab@suse.de>
+
+	* gcc.dg/pr31490.c: Fix last change.
+
+2013-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/56534
+	* g++.dg/template/crash115.C: New.
+
+2013-03-06  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56539
+	* gcc.c-torture/compile/pr56539.c: New test.
+
+2013-03-06  Kai Tietz  <ktietz@redhat.com>
+
+	* gcc.dg/lto/20090914-2_0.c: Skip for mingw and cygwin targets.
+	* gcc.dg/lto/20091013-1_1.c: Set x64-mingw as xfail.
+	* gcc.dg/lto/20091013-1_2.c: Likewise.
+	* gcc.dg/pr31490.c: Adjust for LLP64 targets.
+
+2013-03-06  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gnat.dg/specs/aggr6.ads: New test.
+
+2013-03-06  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gnat.dg/loop_optimization15.ad[sb]: New test.
+
+2013-03-06  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56548
+	* gcc.dg/pr56548.c: New test.
+
+2013-03-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	PR debug/53363
+	* g++.dg/debug/dwarf2/thunk1.C: Skip on darwin.
+
+2013-03-06  Jakub Jelinek  <jakub@redhat.com>
+
+	PR c++/56543
+	* g++.dg/template/typename20.C: New test.
+
+2013-03-05  Jakub Jelinek  <jakub@redhat.com>
+
+	PR debug/56510
+	* gcc.dg/pr56510.c: New test.
+
+	PR rtl-optimization/56484
+	* gcc.c-torture/compile/pr56484.c: New test.
+
+2013-03-05  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/56530
+	* g++.dg/warn/Wsign-conversion-2.C: New.
+
+2013-03-05  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56270
+	* gcc.dg/vect/slp-38.c: New testcase.
+
+2013-03-05  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/56494
+	* gcc.dg/pr56494.c: New test.
+
+2013-01-04  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gcc.dg/pr56424.c: New test.
+
+2013-03-04  Georg-Johann Lay  <avr@gjlay.de>
+
+	* gcc.dg/pr55153.c: Add dg-require-effective-target scheduling.
+	* gcc.dg/pr56228.c <avr>: Skip.
+
+2013-03-04  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR testsuite/52641
+	PR tree-optimization/52631
+	* gcc.dg/tree-ssa/pr52631.c: Fix 16-bit int.
+
+2013-03-03  David Edelsohn  <dje.gcc@gmail.com>
+
+	* gcc.dg/vect/vect-82_64.c: Skip on AIX.
+	* gcc.dg/vect/vect-83_64.c: Same.
+
+2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
+
+	PR fortran/56477
+	* gfortran.dg/pointer_check_13.f90: New test.
+
+2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
+
+	PR fortran/54730
+	* gfortran.dg/array_constructor_42.f90: New test.
+
+2013-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/52688
+	* g++.dg/template/static33.C: New.
+	* g++.dg/template/static34.C: Likewise.
+
+	PR c++/10291
+	* g++.dg/template/static35.C: New.
+
+2013-03-01  Steve Ellcey  <sellcey@mips.com>
+
+	* gcc.dg/pr56396.c: Require pic support.
+
+2013-03-01  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/55481
+	* gcc.dg/torture/pr56488.c: New testcase.
+
+2013-02-28  Konstantin Serebryany  <konstantin.s.serebryany@gmail.com>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/56454
+	* g++.dg/asan/default-options-1.C (__asan_default_options): Use
+	no_sanitize_address attribute rather than no_address_safety_analysis.
+	* g++.dg/asan/sanitizer_test_utils.h
+	(ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS): Likewise.
+	* c-c++-common/asan/attrib-1.c: Test no_sanitize_address attribute
+	in addition to no_address_safety_analysis.
+
+2013-02-28  Jason Merrill  <jason@redhat.com>
+
+	PR c++/56481
+	* g++.dg/cpp0x/constexpr-and.C: New.
+
+2013-02-28  Martin Jambor  <mjambor@suse.cz>
+
+	PR tree-optimization/56294
+	* g++.dg/debug/pr56294.C: New test.
+
+2013-02-28  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* g++.old-deja/g++.pt/ptrmem6.C(main): Add xfail aarch64*-*-*.
+
+2013-02-27  Marek Polacek  <polacek@redhat.com>
+
+	PR rtl-optimization/56466
+	* gcc.dg/pr56466.c: New test.
+
+2013-02-28  Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>
+
+	* gcc.dg/tree-ssa/slsr-1.c: Allow widening multiplications.
+	* gcc.dg/tree-ssa/slsr-2.c: Likewise.
+	* gcc.dg/tree-ssa/slsr-3.c: Likewise.
+
+2013-02-27  Andrey Belevantsev  <abel@ispras.ru>
+
+	PR middle-end/45472
+	* gcc.dg/pr45472.c: New test.
+
+2013-02-26  Marek Polacek  <polacek@redhat.com>
+
+	PR tree-optimization/56426
+	* gcc.dg/pr56436.c: New test.
+
+2013-02-26  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56448
+	* gcc.c-torture/compile/pr56448.c: New test.
+
+	PR tree-optimization/56443
+	* gcc.dg/torture/pr56443.c: New test.
+
+2013-02-25  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56175
+	* gcc.dg/tree-ssa/forwprop-24.c: New testcase.
+
+2013-02-24  Jakub Jelinek  <jakub@redhat.com>
+
+	PR c++/56403
+	* g++.dg/torture/pr56403.C: New test.
+
+2013-02-25  Catherine Moore  <clm@codesourcery.com>
+
+	Revert:
+	2013-02-24  Catherine Moore  <clm@codesourcery.com>
+	Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* gcc.target/mips/mips.exp: Add microMIPS support.
+	* gcc.target/mips/umips-movep-2.c: New test.
+	* gcc.target/mips/umips-lwp-2.c: New test.
+	* gcc.target/mips/umips-swp-5.c: New test.
+	* gcc.target/mips/umips-constraints-1.c: New test.
+	* gcc.target/mips/umips-lwp-3.c: New test.
+	* gcc.target/mips/umips-swp-6.c: New test.
+	* gcc.target/mips/umips-constraints-2.c: New test.
+	* gcc.target/mips/umips-save-restore-1.c: New test.
+	* gcc.target/mips/umips-lwp-4.c: New test.
+	* gcc.target/mips/umips-swp-7.c: New test.
+	* gcc.target/mips/umips-save-restore-2.c: New test.
+	* gcc.target/mips/umips-lwp-swp-volatile.c: New test.
+	* gcc.target/mips/umips-lwp-5.c: New test.
+	* gcc.target/mips/umips-save-restore-3.c: New test.
+	* gcc.target/mips/umips-lwp-6.c: New test.
+	* gcc.target/mips/umips-swp-1.c: New test.
+	* gcc.target/mips/umips-lwp-7.c: New test.
+	* gcc.target/mips/umips-swp-2.c: New test.
+	* gcc.target/mips/umips-lwp-8.c: New test.
+	* gcc.target/mips/umips-swp-3.c: New test.
+	* gcc.target/mips/umips-movep-1.c: New test.
+	* gcc.target/mips/umips-lwp-1.c: New test.
+	* gcc.target/mips/umips-swp-4.c: New test.
+
+2013-02-24  Catherine Moore  <clm@codesourcery.com>
+	    Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* gcc.target/mips/mips.exp: Add microMIPS support.
+	* gcc.target/mips/umips-movep-2.c: New test.
+	* gcc.target/mips/umips-lwp-2.c: New test.
+	* gcc.target/mips/umips-swp-5.c: New test.
+	* gcc.target/mips/umips-constraints-1.c: New test.
+	* gcc.target/mips/umips-lwp-3.c: New test.
+	* gcc.target/mips/umips-swp-6.c: New test.
+	* gcc.target/mips/umips-constraints-2.c: New test.
+	* gcc.target/mips/umips-save-restore-1.c: New test.
+	* gcc.target/mips/umips-lwp-4.c: New test.
+	* gcc.target/mips/umips-swp-7.c: New test.
+	* gcc.target/mips/umips-save-restore-2.c: New test.
+	* gcc.target/mips/umips-lwp-swp-volatile.c: New test.
+	* gcc.target/mips/umips-lwp-5.c: New test.
+	* gcc.target/mips/umips-save-restore-3.c: New test.
+	* gcc.target/mips/umips-lwp-6.c: New test.
+	* gcc.target/mips/umips-swp-1.c: New test.
+	* gcc.target/mips/umips-lwp-7.c: New test.
+	* gcc.target/mips/umips-swp-2.c: New test.
+	* gcc.target/mips/umips-lwp-8.c: New test.
+	* gcc.target/mips/umips-swp-3.c: New test.
+	* gcc.target/mips/umips-movep-1.c: New test.
+	* gcc.target/mips/umips-lwp-1.c: New test.
+	* gcc.target/mips/umips-swp-4.c: New test.
+
+2013-02-22  Jakub Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/56393
+	* lib/asan-dg.exp (asan_link_flags): Add
+	-B${gccpath}/libsanitizer/asan/ to flags.
+
+2013-02-21  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56420
+	* gcc.dg/torture/pr56420.c: New test.
+
+2013-02-20  Aldy Hernandez  <aldyh@redhat.com>
+
+	PR middle-end/56108
+	* gcc.dg/tm/memopt-1.c: Declare functions transaction_safe.
+
+2013-02-21  Martin Jambor  <mjambor@suse.cz>
+
+	PR tree-optimization/56310
+	* g++.dg/ipa/pr56310.C: New test.
+
+2013-02-21  Janus Weil  <janus@gcc.gnu.org>
+
+	PR fortran/56385
+	* gfortran.dg/proc_ptr_comp_37.f90: New.
+
+2013-02-21  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56415
+	Revert
+	2013-02-11  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56273
+	* g++.dg/warn/Warray-bounds-6.C: New testcase.
+	* gcc.dg/tree-ssa/pr21559.c: Adjust.
+	* gcc.dg/tree-ssa/vrp17.c: Likewise.
+	* gcc.dg/tree-ssa/vrp18.c: Likewise.
+	* gcc.dg/tree-ssa/vrp23.c: Likewise.
+	* gcc.dg/tree-ssa/vrp24.c: Likewise.
+
+2013-02-21  Marek Polacek  <polacek@redhat.com>
+
+	PR tree-optimization/56398
+	* g++.dg/torture/pr56398.C: New test.
+
+2013-02-21  Jakub Jelinek  <jakub@redhat.com>
+
+	PR inline-asm/56405
+	* gcc.c-torture/compile/pr56405.c: New test.
+
+2013-02-20  Jan Hubicka  <jh@suse.cz>
+
+	PR tree-optimization/56265
+	* testsuite/g++.dg/ipa/devirt-11.C: New testcase.
+
+2013-02-20  Richard Biener  <rguenther@suse.de>
+
+	* gcc.dg/tree-ssa/forwprop-8.c: Adjust.
+
+2013-02-20  Richard Biener  <rguenther@suse.de>
+	Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56396
+	* gcc.dg/pr56396.c: New testcase.
+
+2013-02-20  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/56373
+	* g++.dg/cpp0x/Wzero-as-null-pointer-constant-2.C: New.
+
+2013-02-19  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56384
+	* gcc.dg/torture/pr56384.c: New testcase.
+
+2013-02-19  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56350
+	* gcc.dg/pr56350.c: New test.
+
+	PR tree-optimization/56381
+	* g++.dg/opt/pr56381.C: New test.
+
+2013-02-18  Jakub Jelinek  <jakub@redhat.com>
+
+	PR pch/54117
+	* lib/dg-pch.exp (pch-init, pch-finish,
+	check_effective_target_pch_supported_debug): New procs.
+	(dg-flags-pch): If $pch_unsupported, make tests UNSUPPORTED.
+	Likewise if $pch_unsupported_debug and $flags include -g.
+	Skip FAILs about missing *.gch file if $pch_unsupported_debug
+	and dg-require-effective-target pch_unsupported_debug.
+	* g++.dg/pch/pch.exp: Call pch-init and pch-finish.
+	* objc.dg/pch/pch.exp: Likewise.
+	* gcc.dg/pch/pch.exp: Likewise.
+	* gcc.dg/pch/valid-1.c: Add dg-require-effective-target
+	pch_unsupported_debug.
+	* gcc.dg/pch/valid-1.hs: Likewise.
+	* gcc.dg/pch/valid-1b.c: Likewise.
+	* gcc.dg/pch/valid-1b.hs: Likewise.
+
+2013-02-18  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56366
+	* gcc.dg/torture/pr56366.c: New testcase.
+
+2013-02-18  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/56349
+	* gcc.dg/torture/pr56349.c: New testcase.
+
+2013-02-18  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56321
+	* gcc.dg/torture/pr56321.c: New testcase.
+
+2013-02-16  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
+
+	* gcc.dg/20020312-2.c: Define MicroBlaze PIC register
+
+2013-02-16  Jakub Jelinek  <jakub@redhat.com>
+	    Dodji Seketeli  <dodji@redhat.com>
+
+	PR asan/56330
+	* c-c++-common/asan/no-redundant-instrumentation-4.c: New test file.
+	* c-c++-common/asan/no-redundant-instrumentation-5.c: Likewise.
+	* c-c++-common/asan/no-redundant-instrumentation-6.c: Likewise.
+	* c-c++-common/asan/no-redundant-instrumentation-7.c: Likewise.
+	* c-c++-common/asan/no-redundant-instrumentation-8.c: Likewise.
+	* c-c++-common/asan/pr56330.c: Likewise.
+	* c-c++-common/asan/no-redundant-instrumentation-1.c (test1):
+	Ensure the size argument of __builtin_memcpy is a constant.
+
+2013-02-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
+	    Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/51242
+	* g++.dg/cpp0x/enum23.C: New.
+
+2013-02-15  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	PR target/54685
+	* gcc.target/sh/pr54685.c: Fix scanning of not insn.
+
+2013-02-15  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/56348
+	* gcc.target/i386/pr56348.c: New test.
+
+2013-02-15  Greta Yorsh  <Greta.Yorsh@arm.com>
+
+	* gcc.target/arm/interrupt-1.c: Fix for thumb mode.
+	* gcc.target/arm/interrupt-2.c: Likewise.
+
+2013-02-15  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/56318
+	* gcc/testsuite/gfortran.dg/matmul_9.f90: New.
+
+2013-02-15  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/53818
+	* gfortran.dg/init_flag_11.f90: New.
+
+2013-02-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	* gcc.dg/debug/dwarf2/pr53948.c: Allow for more whitespace.
+
+2013-02-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	* gcc.dg/debug/dwarf2/pr53948.c: Allow for / and ! as comment
+	characters.
+
+2013-02-14  Dominique d'Humieres  <dominiq@lps.ens.fr>
+	    Tobias Burnus  <burnus@net-b.de>
+
+	PR testsuite/56138
+	* gfortran.dg/allocatable_function_7.f90: New.
+
+2013-02-14  Jakub Jelinek  <jakub@redhat.com>
+
+	* g++.dg/asan/dejagnu-gtest.h: Add multiple inclusion guards.
+	* asan_globals_test-wrapper.cc: New file.
+	* g++.dg/asan/asan_test.C: Use asan_globals_test-wrapper.cc
+	instead of asan_globals_test.cc as dg-additional-sources.
+	Include asan_mem_test.cc, asan_str_test.cc and asan_oob_test.cc.
+	* g++.dg/asan/asan_test_utils.h: Synced from upstream.  Include
+	"sanitizer_test_utils.h" instead of
+	"sanitizer_common/tests/sanitizer_test_utils.h".
+	* g++.dg/asan/asan_str_test.cc: New file, synced from upstream.
+	* g++.dg/asan/asan_mem_test.cc: New file, synced from upstream.
+	* g++.dg/asan/asan_oob_test.cc: New file, synced from upstream.
+	* g++.dg/asan/asan_globals_test.cc: Synced from upstream.
+	* g++.dg/asan/asan_test.cc: Synced from upstream.
+	* g++.dg/asan/sanitizer_test_utils.h: New file, synced from upstream.
+
+2013-02-14  Dodji Seketeli  <dodji@redhat.com>
+
+	Fix an asan crash
+	* c-c++-common/asan/memcmp-2.c: New test.
+
+2013-02-13  Ed Smith-Rowland  <3dw4rd@verizon.net>
+
+	PR c++/55582
+	* g++.dg/cpp0x/udlit-string-literal.h: New.
+	* g++.dg/cpp0x/udlit-string-literal.C: New.
+
+2013-02-13  Sriraman Tallam  <tmsriram@google.com>
+
+	* g++.dg/ext/mv12-aux.C: Add directives to match mv12.C.
+
+2013-02-13  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR target/56184
+	* gcc.target/arm/pr56184.C: New test.
+
+2013-02-13  Jakub Jelinek  <jakub@redhat.com>
+
+	PR c++/56302
+	* g++.dg/torture/pr56302.C: New test.
+	* g++.dg/cpp0x/constexpr-56302.C: New test.
+	* c-c++-common/pr56302.c: New test.
+
+2013-02-13  Tobias Burnus  <burnus@net-b.de>
+	    Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	PR fortran/56204
+	* gfortran.dg/quad_2.f90: Use "< epsilon" instead of "==".
+	* gfortran.dg/quad_3.f90: Ditto.
+
+2013-02-13  Kostya Serebryany  <kcc@google.com>
+
+	* c-c++-common/asan/strncpy-overflow-1.c: Update the test
+	to match the fresh asan run-time.
+	* c-c++-common/asan/rlimit-mmap-test-1.c: Ditto.
+
+2013-02-12  Dodji Seketeli  <dodji@redhat.com>
+
+	Avoid instrumenting duplicated memory access in the same basic block
+	* c-c++-common/asan/no-redundant-instrumentation-1.c: New test.
+	* testsuite/c-c++-common/asan/no-redundant-instrumentation-2.c:
+	Likewise.
+	* testsuite/c-c++-common/asan/no-redundant-instrumentation-3.c:
+	Likewise.
+	* testsuite/c-c++-common/asan/inc.c: Likewise.
+
+2013-02-12  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR inline-asm/56148
+	* gcc.target/i386/pr56148.c: New test.
+
+2013-02-12  Dominique d'Humieres  <dominiq@lps.ens.fr>
+	    Tobias Burnus  <burnus@net-b.de>
+
+	PR testsuite/56082
+	* gfortran.dg/bind_c_bool_1.f90 (sub): Change kind=4 to kind=2.
+
+2013-02-12  Richard Biener  <rguenther@suse.de>
+
+	PR lto/56297
+	* gcc.dg/lto/pr56297_0.c: New testcase.
+	* gcc.dg/lto/pr56297_0.c: Likewise.
+
+2013-02-12  Janus Weil  <janus@gcc.gnu.org>
+
+	PR fortran/46952
+	* gfortran.dg/typebound_deferred_1.f90: New.
+
+2013-02-12  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/56151
+	* gcc.target/i386/pr56151.c: New test.
+
+2013-02-11  Sriraman Tallam  <tmsriramgoogle.com>
+
+	* g++.dg/ext/mv12.C: New test.
+	* g++.dg/ext/mv12.h: New file.
+	* g++.dg/ext/mv12-aux.C: New file.
+	* g++.dg/ext/mv13.C: New test.
+
+2013-02-11  Sebastian Huber  <sebastian.huber@embedded-brains.de>
+
+	* lib/target-supports.exp
+	(check_effective_target_powerpc_eabi_ok): New.
+	* gcc.target/powerpc/ppc-eabi.c: Use require effective target
+	powerpc_eabi_ok.
+	* gcc.target/powerpc/ppc-sdata-1.c: Likewise.
+	* gcc.target/powerpc/spe-small-data-2.c: Likewise. Do not run, compile
+	only.
+	* gcc.target/powerpc/ppc-sdata-2.c: Add powerpc-*-rtems*.
+	* gcc.target/powerpc/pr51623.c: Likewise.
+	* gcc.target/powerpc/ppc-stackalign-1.c: Likewise.
+	* gcc.target/powerpc/ppc-ldstruct.c: Likewise.
+
+2013-02-11  Alexander Potapenko  <glider@google.com>
+	    Jack Howarth  <howarth@bromo.med.uc.edu>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/55617
+	* g++.dg/asan/pr55617.C: Run on all targets.
+
+2013-02-11  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR rtl-optimization/56275
+	* gcc.dg/pr56275.c: New test.
+
+2013-02-11  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56273
+	* gcc.dg/tree-ssa/vrp17.c: Disable tail-merging.
+
+2013-02-11  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56264
+	* gcc.dg/torture/pr56264.c: New testcase.
+
+2013-02-11  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56273
+	* g++.dg/warn/Warray-bounds-6.C: New testcase.
+	* gcc.dg/tree-ssa/pr21559.c: Adjust.
+	* gcc.dg/tree-ssa/vrp17.c: Likewise.
+	* gcc.dg/tree-ssa/vrp18.c: Likewise.
+	* gcc.dg/tree-ssa/vrp23.c: Likewise.
+	* gcc.dg/tree-ssa/vrp24.c: Likewise.
+
+2013-02-09  Uros Bizjak  <ubizjak@gmail.com>
+
+	* g++.dg/asan/asan_test.C: Compile with -D__NO_INLINE__
+	for *-*-linux-gnu targets.
+	* g++.dg/asan/interception-test-1.c: Ditto.
+	* g++.dg/asan/interception-failure-test-1.C: Ditto.
+	* g++.dg/asan/interception-malloc-test-1.C: Ditto.
+
+2013-02-09  Paul Thomas  <pault@gcc.gnu.org>
+
+	PR fortran/55362
+	* gfortran.dg/intrinsic_size_4.f90 : New test.
+
+2013-02-09  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/56256
+	* gcc.target/powerpc/pr56256.c: New test.
+
+2013-02-08  Ian Lance Taylor  <iant@google.com>
+
+	* lib/go.exp: Load timeout.exp.
+
+2013-02-08  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/56246
+	* gcc.target/i386/pr56246.c: New test.
+
+2013-02-08  Jeff Law  <law@redhat.com>
+
+	PR debug/53948
+	* gcc.dg/debug/dwarf2/pr53948.c: New test.
+
+2013-02-08  Michael Meissner  <meissner@linux.vnet.ibm.com>
+
+	PR target/56043
+	* gcc.target/powerpc/vsx-mass-1.c: Only run this test on
+	powerpc*-*-linux*.
+
+2013-02-08  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
+
+	* 20101011-1.c: Add __MICROBLAZE__ exception to set DO_TEST 0
+
+2013-02-08  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/56195
+	* gcc.dg/torture/pr56195.c: New test.
+
+2013-02-08  Mikael Morin  <mikael@gcc.gnu.org>
+
+	PR fortran/54107
+	* gfortran.dg/recursive_interface_2.f90: New test.
+
+2013-02-08  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56250
+	* gcc.c-torture/execute/pr56250.c: New test.
+
+2013-02-08  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR tree-optimization/56064
+	* gcc.dg/fixed-point/view-convert-2.c: New test.
+
+2013-02-08  Michael Matz  <matz@suse.de>
+
+	PR tree-optimization/52448
+	* gcc.dg/pr52448.c: New test.
+
+2013-02-08  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/56181
+	* gcc.dg/torture/pr56181.c: New testcase.
+
+2013-02-08  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR target/54222
+	* gcc.target/avr/torture/builtins-4-roundfx.c: New test.
+	* gcc.target/avr/torture/builtins-5-countlsfx.c: New test.
+
+2013-02-07  Jakub Jelinek  <jakub@redhat.com>
+
+	PR c++/56241
+	* g++.dg/parse/crash61.C: New test.
+
+	PR c++/56239
+	* g++.dg/parse/pr56239.C: New test.
+
+	PR c++/56237
+	* g++.dg/abi/mangle61.C: New test.
+
+2013-02-07  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/56225
+	* gcc.target/i386/pr56225.c: New test.
+
+2013-02-07  Jakub Jelinek  <jakub@redhat.com>
+
+	PR debug/56154
+	* gcc.dg/guality/pr56154-1.c: New test.
+	* gcc.dg/guality/pr56154-2.c: New test.
+	* gcc.dg/guality/pr56154-3.c: New test.
+	* gcc.dg/guality/pr56154-4.c: New test.
+	* gcc.dg/guality/pr56154-aux.c: New file.
+
+	PR tree-optimization/55789
+	* g++.dg/ipa/inline-3.C: Use cleanup-ipa-dump instead of
+	cleanup-tree-dump.
+	* gcc.dg/tree-ssa/inline-3.c: Add
+	--param max-early-inliner-iterations=2 option.
+
+2013-02-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	PR debug/53363
+	* g++.dg/debug/dwarf2/thunk1.C: Restrict to 32-bit x86.
+	Add -fno-dwarf2-cfi-asm to dg-options.
+	Adapt match count.
+
+2013-02-07  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/56228
+	* gcc.dg/pr56228.c: New test.
+
+2013-02-07  Alan Modra  <amodra@gmail.com>
+
+	PR target/54009
+	* gcc.target/powerpc/pr54009.c: New test.
+	PR target/54131
+	* gfortran.dg/pr54131.f: New test.
+
+2013-02-06 Paul Thomas  <pault@gcc.gnu.org>
+
+	PR fortran/55789
+	* gfortran.dg/array_constructor_41.f90: New test.
+
+2013-02-06  Janus Weil  <janus@gcc.gnu.org>
+
+	PR fortran/55978
+	* gfortran.dg/class_optional_2.f90: Uncomment some cases
+	which work now.
+
+2013-02-06  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56217
+	* g++.dg/gomp/pr56217.C: New test.
+
+2013-02-05  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56205
+	* gcc.dg/tree-ssa/stdarg-6.c: New test.
+	* gcc.c-torture/execute/pr56205.c: New test.
+
+2013-02-05  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/53342
+	PR tree-optimization/53185
+	* gcc.dg/vect/pr53185-2.c: New testcase.
+
+2013-02-05  Jan Hubicka  <jh@suse.cz>
+
+	PR tree-optimization/55789
+	* g++.dg/tree-ssa/inline-1.C: Update max-inliner-iterations.
+	* g++.dg/tree-ssa/inline-2.C: Update max-inliner-iterations.
+	* g++.dg/tree-ssa/inline-3.C: Update max-inliner-iterations.
+	* g++.dg/ipa/inline-1.C: New testcase.
+	* g++.dg/ipa/inline-2.C: New testcase.
+	* g++.dg/ipa/inline-3.C: New testcase.
+
+2013-02-05  Jan Hubicka  <jh@suse.cz>
+
+	PR tree-optimization/55789
+	* g++.dg/torture/pr55789.C: New testcase.
+
+2013-02-05  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56167
+	* gcc.dg/pr56167.c: New test.
+
+2013-02-04  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	PR target/55146
+	* gcc.target/sh/pr55146.c: New.
+
+2013-02-04  Oleg Endo  <olegendo@gcc.gnu.org>
+
+	PR tree-optimization/54386
+	* gcc.target/sh/pr54386.c: New.
+
+2013-02-04  Paul Thomas  <pault@gcc.gnu.org>
+
+	PR fortran/56008
+	* gfortran.dg/realloc_on _assign_16.f90 : New test.
+
+	PR fortran/47517
+	* gfortran.dg/realloc_on _assign_17.f90 : New test.
+
+2013-02-04  Alexander Potapenko  <glider@google.com>
+	    Jack Howarth  <howarth@bromo.med.uc.edu>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/55617
+	* g++.dg/asan/pr55617.C: New test.
+
+2013-02-04  Mikael Morin  <mikael@gcc.gnu.org>
+
+	PR fortran/54195
+	* gfortran.dg/typebound_operator_19.f90: New test.
+	* gfortran.dg/typebound_assignment_4.f90: New test.
+
+2013-02-04  Mikael Morin  <mikael@gcc.gnu.org>
+
+	PR fortran/54107
+	* gfortran.dg/recursive_interface_1.f90: New test.
+
+2013-02-04  Richard Guenther  <rguenther@suse.de>
+
+	PR lto/56168
+	* gcc.dg/lto/pr56168_0.c: New testcase.
+	* gcc.dg/lto/pr56168_1.c: Likewise.
+
+2013-02-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+	PR fortran/50627
+	PR fortran/56054
+	* gfortran.dg/block_12.f90:  New test.
+	* gfortran.dg/module_error_1.f90:  New test.
+
+2013-02-02  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* lib/target-supports.exp (check_effective_target_vect_float)
+	(check_effective_target_vect_no_align): Add mips-sde-elf.
+
+2013-02-01  Jakub Jelinek  <jakub@redhat.com>
+
+	* lib/gcc-dg.exp (restore-target-env-var): Avoid using lreverse.
+
+2013-02-01  David Edelsohn  <dje.gcc@gmail.com>
+
+	* gcc.dg/pr56023.c: XFAIL on AIX.
+	* gcc.dg/vect/pr49352.c: Same.
+
+2013-02-01  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gnat.dg/opt26.adb: New test.
+
+2013-01-31  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
+
+	Revert.
+	2013-01-27  Amol Pise  <amolpise15@gmail.com>
+
+	* gcc.target/arm/neon-vfnms-1.c: New test.
+	* gcc.target/arm/neon-vfnma-1.c: New test.
+
+2013-01-31  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56157
+	* gcc.dg/torture/pr56157.c: New testcase.
+
+2013-01-30  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56150
+	* gcc.dg/torture/pr56150.c: New testcase.
+
+2013-01-30  Jakub Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/55374
+	* g++.dg/asan/large-func-test-1.C: Allow both _Zna[jm] in addition
+	to _Znw[jm] in the backtrace.  Allow _Zna[jm] to be the first frame
+	printed in backtrace.
+	* g++.dg/asan/deep-stack-uaf-1.C: Use malloc instead of operator new
+	to avoid errors about mismatched allocation vs. deallocation.
+
+	PR c++/55742
+	* g++.dg/mv1.C: Moved to...
+	* g++.dg/ext/mv1.C: ... here.  Adjust test.
+	* g++.dg/mv2.C: Moved to...
+	* g++.dg/ext/mv2.C: ... here.  Adjust test.
+	* g++.dg/mv3.C: Moved to...
+	* g++.dg/ext/mv3.C: ... here.
+	* g++.dg/mv4.C: Moved to...
+	* g++.dg/ext/mv4.C: ... here.
+	* g++.dg/mv5.C: Moved to...
+	* g++.dg/ext/mv5.C: ... here.  Adjust test.
+	* g++.dg/mv6.C: Moved to...
+	* g++.dg/ext/mv6.C: ... here.  Adjust test.
+	* g++.dg/ext/mv7.C: New test.
+	* g++.dg/ext/mv8.C: New test.
+	* g++.dg/ext/mv9.C: New test.
+	* g++.dg/ext/mv10.C: New test.
+	* g++.dg/ext/mv11.C: New test.
+
+2013-01-30  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/56144
+	* gcc.dg/pr56144.c: New.
+
+2013-01-30  David Edelsohn  <dje.gcc@gmail.com>
+
+	* g++.dg/cpp0x/constexpr-53094-2.C: Ignore non-standard ABI
+	message.
+	* g++.dg/cpp0x/constexpr-53094-3.C: Same.
+	* g++.dg/cpp0x/constexpr-55573.C: Same
+
+2013-01-30  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR tree-optimization/56064
+	* gcc.dg/fixed-point/view-convert.c: New test.
+
+2013-01-30  Andreas Schwab  <schwab@suse.de>
+
+	* lib/target-supports-dg.exp (dg-process-target): Use expr to
+	evaluate the end index in string range.
+
+2013-01-30  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/56138
+	* gfortran.dg/allocatable_function_6.f90: New.
+
+2013-01-29  Janus Weil  <janus@gcc.gnu.org>
+	    Mikael Morin  <mikael@gcc.gnu.org>
+
+	PR fortran/54107
+	* gfortran.dg/proc_ptr_comp_36.f90: New.
+
+2013-01-29  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/55270
+	* gcc.dg/torture/pr55270.c: New testcase.
+
+2013-01-28  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/56117
+	* gcc.dg/pr56117.c: New test.
+
+2013-01-28  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/56034
+	* gcc.dg/torture/pr56034.c: New testcase.
+
+2013-01-28  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56125
+	* gcc.dg/pr56125.c: New test.
+
+2013-01-28  Tobias Burnus  <burnus@net-b.de>
+	    Mikael Morin  <mikael@gcc.gnu.org>
+
+	PR fortran/53537
+	* gfortran.dg/import2.f90: Adjust undeclared type error messages.
+	* gfortran.dg/import8.f90: Likewise.
+	* gfortran.dg/interface_derived_type_1.f90: Likewise.
+	* gfortran.dg/import10.f90: New test.
+	* gfortran.dg/import11.f90: Likewise
+
+2013-01-28  Jakub Jelinek  <jakub@redhat.com>
+
+	PR testsuite/56053
+	* c-c++-common/asan/heap-overflow-1.c: Don't include stdlib.h and
+	string.h.  Provide memset, malloc and free prototypes, adjust line
+	numbers in dg-output.
+	* c-c++-common/asan/stack-overflow-1.c: Don't include string.h.
+	Provide memset prototype and adjust line numbers in dg-output.
+	* c-c++-common/asan/global-overflow-1.c: Likewise.
+
+	PR tree-optimization/56094
+	* gcc.dg/pr56094.c: New test.
+
+2013-01-27  Amol Pise  <amolpise15@gmail.com>
+
+	* gcc.target/arm/neon-vfnms-1.c: New test.
+	* gcc.target/arm/neon-vfnma-1.c: New test.
+
+2013-01-27  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/56114
+	* gcc.target/i386/pr56114.c: New test.
+
+2013-01-27  Paul Thomas  <pault@gcc.gnu.org>
+
+	PR fortran/55984
+	* gfortran.dg/associate_14.f90: New test.
+
+	PR fortran/56047
+	* gfortran.dg/associate_13.f90: New test.
+
+2013-01-25  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56098
+	* gcc.dg/pr56098-1.c: New test.
+	* gcc.dg/pr56098-2.c: New test.
+
+2013-01-25  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR target/54222
+	* gcc.target/avr/torture/builtins-3-absfx.c: New test.
+
+2013-01-22  Marek Polacek  <polacek@redhat.com>
+
+	PR tree-optimization/56035
+	* gcc.dg/pr56035.c: New test.
+
+2013-01-24  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* gfortran.dg/bind_c_array_params_2.f90: Require -mno-relax-pic-calls
+	for MIPS.
+
+2013-01-24  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* gcc.target/mips/octeon-pipe-1.c: Add -ffat-lto-objects
+
+2013-01-24  Jakub Jelinek  <jakub@redhat.com>
+
+	PR c/56078
+	* gcc.dg/pr56078.c: New test.
+	* gcc.c-torture/compile/20030305-1.c: Add dg-error lines.
+
+2013-01-24  Martin Jambor  <mjambor@suse.cz>
+
+	PR tree-optimization/55927
+	* g++.dg/ipa/devirt-10.C: Disable early inlining.
+
+2013-01-24  Uros Bizjak  <ubizjak@gmail.com>
+
+	* gcc.target/i386/movsd.c: New test.
+
+2013-01-24  Steven Bosscher  <steven@gcc.gnu.org>
+
+	PR inline-asm/55934
+	* gcc.target/i386/pr55934.c: New test.
+
+2013-01-23  Janus Weil  <janus@gcc.gnu.org>
+
+	PR fortran/56081
+	* gfortran.dg/select_8.f90: New.
+
+2013-01-23  David Holsgrove  <david.holsgrove@xilinx.com>
+
+	* gcc.target/microblaze/microblaze.exp: Remove
+	target_config_cflags check.
+
+2013-01-23  Jakub Jelinek  <jakub@redhat.com>
+
+	PR fortran/56052
+	* gfortran.dg/gomp/pr56052.f90: New test.
+
+	PR target/49069
+	* gcc.dg/pr49069.c: New test.
+
+2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/55944
+	* g++.dg/cpp0x/constexpr-static10.C: New.
+
+2013-01-22  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/56028
+	* gcc.target/i386/pr56028.c: New test.
+
+2013-01-22  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/55686
+	* gcc.target/i386/pr55686.c: New test.
+
+2013-01-22  Dodji Seketeli  <dodji@redhat.com>
+
+	PR c++/53609
+	* g++.dg/cpp0x/variadic139.C: New test.
+	* g++.dg/cpp0x/variadic140.C: Likewise.
+	* g++.dg/cpp0x/variadic141.C: Likewise.
+
+2013-01-22  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gnat.dg/warn8.adb: New test.
+
+2013-01-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+	PR fortran/55919
+	* gfortran.dg/include_8.f90: New test.
+
+2013-01-21  Uros Bizjak  <ubizjak@gmail.com>
+
+	* gcc.dg/tree-ssa/pr55579.c: Cleanup esra tree dump.
+	* gfortran.dg/unlimited_polymorphic_8.f90: Cleanup original tree dump.
+
+2013-01-21  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56051
+	* gcc.c-torture/execute/pr56051.c: New test.
+
+2013-01-21  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR rtl-optimization/56023
+	* gcc.dg/pr56023.c: New test.
+
+2013-01-21  Martin Jambor  <mjambor@suse.cz>
+
+	PR middle-end/56022
+	* gcc.target/i386/pr56022.c: New test.
+
+2013-01-21  Jason Merrill  <jason@redhat.com>
+
+	* lib/target-supports.exp (check_effective_target_alias): New.
+
+2013-01-20  Jack Howarth  <howarth@bromo.med.uc.edu>
+
+	PR debug/53235
+	* g++.dg/debug/dwarf2/nested-4.C: XFAIL on darwin.
+
+2013-01-20  Hans-Peter Nilsson  <hp@axis.com>
+
+	* gfortran.dg/inquire_10.f90: Run only for non-newlib targets.
+
+2013-01-19  Jeff Law  <law@redhat.com>
+
+	PR tree-optimization/52631
+	* tree-ssa/pr52631.c: New test.
+	* tree-ssa/ssa-fre-9: Update expected output.
+
+2013-01-19  Anthony Green  <green@moxielogic.com>
+
+	* gcc.dg/tree-ssa/asm-2.c (REGISTER): Pick an appropriate register
+	for moxie.
+
+2013-01-18  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/56029
+	* g++.dg/torture/pr56029.C: New test.
+
+2013-01-18  Sharad Singhai  <singhai@google.com>
+
+	PR tree-optimization/55995
+	* gcc.dg/vect/vect.exp: Use "details" flags for dump info.
+
+2013-01-18  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR target/55433
+	* gcc.target/i386/pr55433.c: New.
+
+2013-01-18  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/56015
+	* gfortran.dg/pr56015.f90: New test.
+
+2013-01-18  Janis Johnson  <janisjo@codesourcery.com>
+
+	* gcc.dg/vect/vect-multitypes-12.c: Refactor dg-final directive.
+
+2013-01-18  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* gcc.target/aarch64/vect-fcm-gt-f.c: Change expected output.
+	* gcc.target/aarch64/vect-fcm-gt-d.c: Likewise.
+	* gcc.target/aarch64/vect-fcm-ge-f.c: Likewise.
+	* gcc.target/aarch64/vect-fcm-ge-d.c: Likewise.
+	* gcc.target/aarch64/vect-fcm-eq-f.c: Likewise.
+
+2013-01-17  Jeff Law  <law@redhat.com>
+
+	* gcc.dg/pr52573.c: Move to...
+	* gcc.target/m68k/pr52573.c: Here.  Eliminate target selector.
+
+	PR rtl-optimization/52573
+	* gcc.dg/pr52573.c: New test.
+
+2013-01-17  Jack Howarth  <howarth@bromo.med.uc.edu>
+
+	PR sanitizer/55679
+	* g++.dg/asan/interception-test-1.C: Skip on darwin.
+	* lib/target-supports.exp (check_effective_target_swapcontext): Use
+	check_no_compiler_messages to test support in ucontext.h.
+	(check_effective_target_setrlimit): Return 0 for Darwin's non-posix
+	compliant RLIMIT_AS.
+
+2013-01-17  Marek Polacek  <polacek@redhat.com>
+
+	PR rtl-optimization/55833
+	* gcc.dg/pr55833.c: New test.
+
+2013-01-17  Jan Hubicka  <jh@suse.cz>
+
+	PR tree-optimization/55273
+	* gcc.c-torture/compile/pr55273.c: New testcase.
+
+2013-01-17  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/55981
+	* gcc.target/pr55981.c: New test.
+
+2013-01-17  Janis Johnson  <janisjo@codesourcery.com>
+
+	* gcc.target/arm/pr40887.c: Require at least armv5.
+	* gcc.target/arm/pr51835.c: Avoid conflicts with multilib flags.
+	* gcc.target/arm/pr51915.c: Likewise.
+	* gcc.target/arm/pr52006.c: Likewise.
+	* gcc.target/arm/pr53187.c: Likewise.
+
+	* gcc.target/arm/ftest-support.h: Replace for compile-only tests.
+	* gcc.target/arm/ftest-support-arm.h: Delete.
+	* gcc.target/arm/ftest-support-thumb.h: Delete.
+	* gcc.target/arm/ftest-armv4-arm.c: Replace with compile-only test.
+	* gcc.target/arm/ftest-armv4t-arm.c: Likewise.
+	* gcc.target/arm/ftest-armv4t-thumb.c: Likewise.
+	* gcc.target/arm/ftest-armv5t-arm.c: Likewise.
+	* gcc.target/arm/ftest-armv5t-thumb.c: Likewise.
+	* gcc.target/arm/ftest-armv5te-arm.c: Likewise.
+	* gcc.target/arm/ftest-armv5te-thumb.c: Likewise.
+	* gcc.target/arm/ftest-armv6-arm.c: Likewise.
+	* gcc.target/arm/ftest-armv6-thumb.c: Likewise.
+	* gcc.target/arm/ftest-armv6k-arm.c: Likewise.
+	* gcc.target/arm/ftest-armv6k-thumb.c: Likewise.
+	* gcc.target/arm/ftest-armv6m-thumb.c: Likewise.
+	* gcc.target/arm/ftest-armv6t2-arm.c: Likewise.
+	* gcc.target/arm/ftest-armv6t2-thumb.c: Likewise.
+	* gcc.target/arm/ftest-armv6z-arm.c: Likewise.
+	* gcc.target/arm/ftest-armv6z-thumb.c: Likewise.
+	* gcc.target/arm/ftest-armv7a-arm.c: Likewise.
+	* gcc.target/arm/ftest-armv7a-thumb.c: Likewise.
+	* gcc.target/arm/ftest-armv7em-thumb.c: Likewise.
+	* gcc.target/arm/ftest-armv7m-thumb.c: Likewise.
+	* gcc.target/arm/ftest-armv7r-arm.c: Likewise.
+	* gcc.target/arm/ftest-armv7r-thumb.c: Likewise.
+	* gcc.target/arm/ftest-armv8a-arm.c: Likewise.
+	* gcc.target/arm/ftest-armv8a-thumb.c: Likewise.
+
+2013-01-17  Martin Jambor  <mjambor@suse.cz>
+
+	PR tree-optimizations/55264
+	* g++.dg/ipa/pr55264.C: New test.
+
+2013-01-16  Janus Weil  <janus@gcc.gnu.org>
+
+	PR fortran/55983
+	* gfortran.dg/class_55.f90: New.
+
+2013-01-16  Janis Johnson  <janisjo@codesourcery.com>
+
+	PR testsuite/55994
+	* gcc.c-torture/execute/builtins/builtins.exp: Add
+	-Wl,--allow-multiple-definition for eabi and elf targets.
+
+	PR testsuite/54622
+	* lib/target-supports.exp (check_effective_target_vect_perm_byte,
+	check_effective_target_vect_perm_short,
+	check_effective_target_vect_widen_mult_qi_to_hi_pattern,
+	check_effective_target_vect64): Return 0 for big-endian ARM.
+	(check_effective_target_vect_widen_sum_qi_to_hi): Return 1 for ARM.
+
+	* gcc.target/arm/neon-vld1_dupQ.c: Use types that match function
+	prototypes.
+
+2013-01-16  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/55964
+	* gcc.dg/torture/pr55964.c: New testcase.
+
+2013-01-16  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/54767
+	PR tree-optimization/53465
+	* gfortran.fortran-torture/execute/pr54767.f90: New testcase.
+
+2013-01-16  Christian Bruel  <christian.bruel@st.com>
+
+	PR target/55301
+	* gcc.target/sh/sh-switch.c: New testcase.
+
+2013-01-15  Janis Johnson  <janisjo@codesourcery.com>
+
+	* gcc.dg/webizer.c: Increase the array size.
+
+2013-01-15  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/55940
+	* gcc.dg/pr55940.c: New test.
+
+2013-01-15  Manfred Schwarb  <manfred99@gmx.ch>
+	    Harald Anlauf  <anlauf@gmx.de>
+
+	* gfortran.dg/bounds_check_4.f90: Add dg-options "-fbounds-check".
+	* gfortran.dg/bounds_check_5.f90: Likewise.
+	* gfortran.dg/class_array_10.f03: Fix syntax of dg-directive.
+	* gfortran.dg/continuation_9.f90: Likewise.
+	* gfortran.dg/move_alloc_13.f90: Likewise.
+	* gfortran.dg/structure_constructor_11.f90: Likewise.
+	* gfortran.dg/tab_continuation.f: Likewise.
+	* gfortran.dg/warning-directive-2.F90: Likewise.
+	* gfortran.dg/coarray_lib_token_4.f90: Remove misspelled directive.
+
+2013-01-15  Janis Johnson  <janisjo@codesourcery.com>
+
+	* gcc.target/arm/fma.c: Skip for conflicting multilib options.
+	* gcc.target/arm/fma-sp.c: Likewise.
+
+2013-01-15  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/55153
+	* gcc.dg/pr55153.c: New.
+
+2013-01-15  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/55920
+	* gcc.c-torture/compile/pr55920.c: New test.
+
+2013-01-15  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/55882
+	* gcc.dg/torture/pr55882.c: New testcase.
+
+2013-01-15  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/55955
+	* gcc.c-torture/compile/pr55955.c: New test.
+
+2013-01-15  Dodji Seketeli  <dodji@redhat.com>
+
+	PR c++/55663
+	* g++.dg/cpp0x/alias-decl-31.C: New test.
+
+2013-01-15  Paul Thomas  <pault@gcc.gnu.org>
+
+	PR fortran/54286
+	* gfortran.dg/proc_ptr_result_8.f90 : Add module 'm' to check
+	case where interface is null.
+
+2013-01-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+	PR fortran/55806
+	* gfortran.dg/array_constructor_40.f90:  New test.
+
+2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* gcc.dg/tree-ssa/slsr-8.c: Allow widening multiplications.
+
+2013-01-14  Tejas Belagod  <tejas.belagod@arm.com>
+
+	* gcc.target/aarch64/aarch64/vect-ld1r-compile-fp.c: New.
+	* gcc.target/aarch64/vect-ld1r-compile.c: New.
+	* gcc.target/aarch64/vect-ld1r-fp.c: New.
+	* gcc.target/aarch64/vect-ld1r.c: New.
+	* gcc.target/aarch64/vect-ld1r.x: New.
+
+2013-01-14  Andi Kleen  <ak@linux.intel.com>
+
+	PR target/55948
+	* gcc.target/i386/hle-clear-rel.c: New file
+	* gcc.target/i386/hle-store-rel.c: New file.
+
+2013-01-14  Harald Anlauf  <anlauf@gmx.de>
+
+	* gfortran.dg/aint_anint_1.f90: Add dg-do run.
+	* gfortran.dg/bounds_check_4.f90: Likewise.
+	* gfortran.dg/inquire_10.f90: Likewise.
+	* gfortran.dg/minloc_3.f90: Likewise.
+	* gfortran.dg/minlocval_3.f90: Likewise.
+	* gfortran.dg/module_double_reuse.f90: Likewise.
+	* gfortran.dg/mvbits_1.f90: Likewise.
+	* gfortran.dg/oldstyle_1.f90: Likewise.
+	* gfortran.dg/pr20163-2.f: Likewise.
+	* gfortran.dg/save_1.f90: Likewise.
+	* gfortran.dg/scan_1.f90: Likewise.
+	* gfortran.dg/select_char_1.f90: Likewise.
+	* gfortran.dg/shape_4.f90: Likewise.
+	* gfortran.dg/coarray_29_2.f90: Fix dg-do directive.
+	* gfortran.dg/function_optimize_10.f90: Likewise.
+	* gfortran.dg/gomp/appendix-a/a.11.2.f90: Likewise.
+	* gfortran.dg/used_types_17.f90: Likewise.
+	* gfortran.dg/used_types_18.f90: Likewise.
+
+2013-01-13  Paul Thomas  <pault@gcc.gnu.org>
+
+	PR fortran/54286
+	* gfortran.dg/proc_ptr_result_8.f90 : New test.
+
+2013-01-13  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* gcc.dg/unroll_5.c: Add nomips16 attributes.
+
+2013-01-13  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* gcc.dg/tree-ssa/ssa-dom-thread-4.c: Update expected results for MIPS.
+
+2013-01-12  Janus Weil  <janus@gcc.gnu.org>
+
+	PR fortran/55072
+	* gfortran.dg/assumed_type_2.f90: Fix test case.
+	* gfortran.dg/internal_pack_13.f90: New test.
+	* gfortran.dg/internal_pack_14.f90: New test.
+
+2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
+
+	PR fortran/55868
+	* gfortran.dg/unlimited_polymorphic_8.f90: Update
+	scan-tree-dump-times for foo.0.x._vptr to deal with change from
+	$tar to STAR.
+
+2013-01-11  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* gcc.c-torture/compile/pr55921.c: Don't use matching constraints.
+
+2013-01-11  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	PR target/55719
+	* gcc.target/s390/pr55719.c: New testcase.
+
+2013-01-11  Richard Guenther  <rguenther@suse.de>
+
+	PR tree-optimization/44061
+	* gcc.dg/pr44061.c: New testcase.
+
+2013-01-10  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	Update copyright years.
+
+2013-01-10  Aldy Hernandez  <aldyh@redhat.com>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/55565
+	* gcc.target/powerpc/ppc-mov-1.c: Update scan-assembler-not regex.
+
+2013-01-10  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/55672
+	* gcc.target/i386/pr55672.c: New.
+
+2013-01-10  Jeff Law  <law@redhat.com>
+
+	* gcc/dg/tree-ssa/vrp06.c: Tighten expected output.  Make each
+	pass/fail message unique.
+
+
+2013-01-10  Jason Merrill  <jason@redhat.com>
+
+	* ada/.gitignore: New.
+
+2013-01-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	* g++.dg/tls/thread_local-cse.C: Don't xfail on *-*-solaris2.9.
+	Add tls options.
+	* g++.dg/tls/thread_local2.C: Likewise.
+	* g++.dg/tls/thread_local2g.C: Likewise.
+	* g++.dg/tls/thread_local6.C: Likewise.
+	* g++.dg/tls/thread_local-order1.C: Add tls options.
+	* g++.dg/tls/thread_local-order2.C: Likewise.
+	* g++.dg/tls/thread_local3.C: Likewise.
+	* g++.dg/tls/thread_local3g.C: Likewise.
+	* g++.dg/tls/thread_local4.C: Likewise.
+	* g++.dg/tls/thread_local4g.C: Likewise.
+	* g++.dg/tls/thread_local5.C: Likewise.
+	* g++.dg/tls/thread_local5g.C: Likewise.
+	* g++.dg/tls/thread_local6g.C: Likewise.
+
+2013-01-10  Kostya Serebryany  <kcc@google.com>
+
+	* g++.dg/asan/asan_test.cc: Sync from upstream.
+
+2013-01-10  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/55921
+	* gcc.c-torture/compile/pr55921.c: New test.
+
+2013-01-09  Jan Hubicka  <jh@suse.cz>
+
+	PR tree-optimization/55569
+	* gcc.c-torture/compile/pr55569.c: New testcase.
+
+2013-01-09  Mikael Morin  <mikael@gcc.gnu.org>
+
+	PR fortran/47203
+	* gfortran.dg/use_28.f90: New test.
+
+2013-01-09  Uros Bizjak  <ubizjak@gmail.com>
+
+	* gfortran.dg/intrinsic_size_3.f90: Make scan-tree-dump-times
+	number matching more robust.
+
+2013-01-09  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/55829
+	* gcc.target/i386/pr55829.c: New.
+
+2013-01-09  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/55758
+	* gfortran.dg/bind_c_bool_1.f90: New.
+	* gfortran.dg/do_5.f90: Add dg-warning.
+
+2013-01-09  Jan Hubicka  <jh@suse.cz>
+
+	PR tree-optimization/55875
+	* gcc.c-torture/execute/pr55875.c: New testcase.
+	* g++.dg/torture/pr55875.C: New testcase.
+
+2013-01-09  Jakub Jelinek  <jakub@redhat.com>
+
+	PR c/48418
+	* c-c++-common/pr48418.c: New test.
+
+2013-01-09  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/55801
+	* g++.dg/tls/thread_local-ice.C: New.
+
+2013-01-09  Andreas Schwab  <schwab@suse.de>
+
+	* gcc.dg/guality/pr54693.c: Null-terminate arr.
+
+2013-01-09  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/48189
+	* gcc.dg/pr48189.c: New test.
+
+2013-01-04  Jan Hubicka  <jh@suse.cz>
+
+	PR tree-optimization/55823
+	* g++.dg/ipa/devirt-10.C: New testcase.
+
+2013-01-08  Uros Bizjak  <ubizjak@gmail.com>
+	    Vladimir Yakovlev  <vladimir.b.yakovlev@intel.com>
+
+	PR rtl-optimization/55845
+	* gcc.target/i386/pr55845.c: New test.
+
+2013-01-08  Tejas Belagod  <tejas.belagod@arm.com>
+
+	* gcc.target/aarch64/vect-mull-compile.c: Explicitly scan for
+	instructions generated instead of number of occurances.
+
+2013-01-08  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* gcc.target/aarch64/vect-fcm-eq-d.c: New.
+	* gcc.target/aarch64/vect-fcm-eq-f.c: Likewise.
+	* gcc.target/aarch64/vect-fcm-ge-d.c: Likewise.
+	* gcc.target/aarch64/vect-fcm-ge-f.c: Likewise.
+	* gcc.target/aarch64/vect-fcm-gt-d.c: Likewise.
+	* gcc.target/aarch64/vect-fcm-gt-f.c: Likewise.
+	* gcc.target/aarch64/vect-fcm.x: Likewise.
+	* lib/target-supports.exp
+	(check_effective_target_vect_cond): Enable for AArch64.
+
+2013-01-08  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* gcc.target/aarch64/vsqrt.c (test_square_root_v2sf): Use
+	endian-safe float pool loading.
+	(test_square_root_v4sf): Likewise.
+	(test_square_root_v2df): Likewise.
+	* lib/target-supports.exp
+	(check_effective_target_vect_call_sqrtf): Add AArch64.
+
+2013-01-08  Martin Jambor  <mjambor@suse.cz>
+
+	PR debug/55579
+	* gcc.dg/tree-ssa/pr55579.c: New test.
+
+2013-01-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	* g++.dg/debug/dwarf2/pr54508.C: Allow for more whitespace after
+	asm comments.
+
+2013-01-08  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/55890
+	* gcc.dg/torture/pr55890-3.c: New test.
+
+	PR middle-end/55851
+	* gcc.c-torture/compile/pr55851.c: New test.
+
+	PR sanitizer/55844
+	* c-c++-common/asan/null-deref-1.c: Add -fno-shrink-wrap to
+	dg-options.
+
+2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
+
+	PR fortran/55618
+	* gfortran.dg/elemental_scalar_args_2.f90: New test.
+
+2013-01-07  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/55763
+	* gfortran.dg/pointer_init_2.f90: Update dg-error.
+	* gfortran.dg/pointer_init_7.f90: New.
+
+2013-01-07  Richard Biener  <rguenther@suse.de>
+
+	* gcc.dg/lto/pr55525_0.c (s): Size like char *.
+
+2013-01-07  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/55890
+	* gcc.dg/torture/pr55890-1.c: New testcase.
+	* gcc.dg/torture/pr55890-2.c: Likewise.
+
+2013-01-07  James Greenhalgh  <james.greenhalgh@arm.com>
+
+	* gcc.target/aarch64/fmovd.c: New.
+	* gcc.target/aarch64/fmovf.c: Likewise.
+	* gcc.target/aarch64/fmovd-zero.c: Likewise.
+	* gcc.target/aarch64/fmovf-zero.c: Likewise.
+	* gcc.target/aarch64/vect-fmovd.c: Likewise.
+	* gcc.target/aarch64/vect-fmovf.c: Likewise.
+	* gcc.target/aarch64/vect-fmovd-zero.c: Likewise.
+	* gcc.target/aarch64/vect-fmovf-zero.c: Likewise.
+
+2013-01-07  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/55888
+	PR tree-optimization/55862
+	* gcc.dg/torture/pr55888.c: New testcase.
+
+2013-01-07  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/55852
+	* gfortran.dg/intrinsic_size_3.f90: New.
+
+2013-01-07  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/55763
+	* gfortran.dg/select_type_32.f90: New.
+
+2013-01-04  Dodji Seketeli  <dodji@redhat.com>
+
+	PR c++/52343
+	* g++.dg/cpp0x/alias-decl-29.C: New test.
+
+2013-01-06  Paul Thomas  <pault@gcc.gnu.org>
+
+	PR fortran/53876
+	PR fortran/54990
+	PR fortran/54992
+	* gfortran.dg/class_array_15.f03: New test.
+
+2013-01-06  Mikael Morin  <mikael@gcc.gnu.org>
+
+	PR fortran/42769
+	PR fortran/45836
+	PR fortran/45900
+	* gfortran.dg/use_23.f90: New test.
+	* gfortran.dg/use_24.f90: New test.
+	* gfortran.dg/use_25.f90: New test.
+	* gfortran.dg/use_26.f90: New test.
+	* gfortran.dg/use_27.f90: New test.
+
+2013-01-06  Olivier Hainque  <hainque@adacore.com>
+
+	* gnat.dg/specs/clause_on_volatile.ads: New test.
+
+2013-01-06  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* gnat.dg/alignment10.adb: New test.
+
+2013-01-05  Steven G. Kargl  <kargl@gcc.gnu.org>
+	    Mikael Morin  <mikael@gcc.gnu.org>
+
+	PR fortran/55827
+	* gfortran.dg/use_22.f90: New test.
+
+2013-01-04  Andrew Pinski  <apinski@cavium.com>
+
+	* gcc.target/aarch64/cmp-1.c: New testcase.
+
+2013-01-04  Paul Thomas  <pault@gcc.gnu.org>
+
+	PR fortran/55172
+	* gfortran.dg/select_type_31.f03: New test.
+
+2013-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/54526 (again)
+	* g++.dg/cpp0x/parse2.C: Extend.
+	* g++.old-deja/g++.other/crash28.C: Adjust.
+
+2013-01-04  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/55862
+	* gcc.dg/torture/pr55862.c: New testcase.
+
+2013-01-04  Martin Jambor  <mjambor@suse.cz>
+
+	PR tree-optimization/55755
+	* gcc.dg/torture/pr55755.c: New test.
+	* gcc.dg/tree-ssa/sra-13.c: Likewise.
+	* gcc.dg/tree-ssa/pr45144.c: Update.
+
+2013-01-04  Richard Biener  <rguenther@suse.de>
+
+	PR middle-end/55863
+	* gcc.dg/fold-reassoc-2.c: New testcase.
+
+2013-01-04  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/55763
+	* gfortran.dg/null_7.f90: New.
+
+2013-01-04  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/55854
+	PR fortran/55763
+	* gfortran.dg/unlimited_polymorphic_3.f03: Remove invalid code.
+	* gfortran.dg/unlimited_polymorphic_7.f90: New.
+	* gfortran.dg/unlimited_polymorphic_8.f90: New.
+
+2013-01-03  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* gcc.dg/torture/tls/tls-reload-1.c (main): Make testing more thorough.
+
+2013-01-03  Janus Weil  <janus@gcc.gnu.org>
+
+	PR fortran/55855
+	* gfortran.dg/assignment_1.f90: Modified.
+	* gfortran.dg/assignment_4.f90: New.
+
+2013-01-03  David Edelsohn  <dje.gcc@gmail.com>
+
+	* gcc.dg/torture/tls/tls-reload-1.c: Add tls options.
+
+2013-01-03  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/55857
+	* gcc.dg/vect/pr55857-1.c: New testcase.
+	* gcc.dg/vect/pr55857-2.c: Likewise.
+
+2013-01-03  Jakub Jelinek  <jakub@redhat.com>
+
+	PR rtl-optimization/55838
+	* gcc.dg/pr55838.c: New test.
+
+	PR tree-optimization/55832
+	* gcc.c-torture/compile/pr55832.c: New test.
+
+2013-01-02  Teresa Johnson  <tejohnson@google.com>
+
+	* gcc.dg/tree-ssa/loop-1.c: Update expected dump message.
+	* gcc.dg/tree-ssa/loop-23.c: Ditto.
+	* gcc.dg/tree-ssa/cunroll-1.c: Ditto.
+	* gcc.dg/tree-ssa/cunroll-2.c: Ditto.
+	* gcc.dg/tree-ssa/cunroll-3.c: Ditto.
+	* gcc.dg/tree-ssa/cunroll-4.c: Ditto.
+	* gcc.dg/tree-ssa/cunroll-5.c: Ditto.
+	* gcc.dg/unroll_1.c: Ditto.
+	* gcc.dg/unroll_2.c: Ditto.
+	* gcc.dg/unroll_3.c: Ditto.
+	* gcc.dg/unroll_4.c: Ditto.
+
+2013-01-02  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	* gcc.dg/pr55430.c: Define MAP_FAILED if not defined.
+
+2013-01-02  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+	PR fortran/55818
+	* gfortran.dg/eof_4.f90: New test.
+
+2013-01-02  Jakub Jelinek  <jakub@redhat.com>
+
+	* lib/c-compat.exp (compat-use-alt-compiler): Remove
+	-fno-diagnostics-show-caret from TEST_ALWAYS_FLAGS if needed.
+	(compat-use-tst-compiler): Restore TEST_ALWAYS_FLAGS.
+	(compat_setup_dfp): Initialize compat_alt_caret and
+	compat_save_TEST_ALWAYS_FLAGS.
+
+2013-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* gcc.dg/torture/tls/tls-reload-1.c: New test.
+
+2013-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* gcc.dg/torture/fp-int-convert-2.c: New test.
+
+2013-01-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+	* gfortran.dg/newunit_3.f90: Add dg-do run.
+	* gfortran.dg/inquire_15.f90: Add dg-do run.
+
+2013-01-01  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/55831
+	* gcc.dg/pr55831.c: New test.
+
+Copyright (C) 2013 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype57.C b/gcc/testsuite/g++.dg/cpp0x/decltype57.C
new file mode 100644
index 0000000..353cc72
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype57.C
@@ -0,0 +1,8 @@
+// PR c++/58633
+// { dg-do compile { target c++11 } }
+
+void foo(int i)
+{
+  typedef int I;
+  decltype(i.I::~I())* p;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum18.C b/gcc/testsuite/g++.dg/cpp0x/enum18.C
index 306ed82..7361595 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum18.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum18.C
@@ -4,5 +4,5 @@
 int main(void) {
   enum e {};
   e ev;
-  ev.e::~e_u();	// { dg-error "e_u. has not been declared" }
+  ev.e::~e_u();	// { dg-error "" }
 }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice10.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice10.C
new file mode 100644
index 0000000..1ea59c2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice10.C
@@ -0,0 +1,8 @@
+// PR c++/58568
+// { dg-do compile { target c++11 } }
+
+template<int> struct A
+{
+  static const int i;
+  template<int N> const int A<N>::i = []{ return 0; }(); // { dg-error "invalid use" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi5.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi5.C
new file mode 100644
index 0000000..1d2778f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi5.C
@@ -0,0 +1,7 @@
+// PR c++/58596
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+  int i = [] { return decltype(i)(); }();
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof1.C b/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof1.C
new file mode 100644
index 0000000..2837c85
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof1.C
@@ -0,0 +1,11 @@
+// PR c++/56679
+// { dg-require-effective-target c++11 }
+
+template <template <typename> class... Args>
+struct Foo {
+  static const int value = sizeof...(Args);
+};
+
+template <typename> struct Bar { };
+
+const int test = Foo<Bar>::value;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof2.C b/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof2.C
new file mode 100644
index 0000000..dfc245d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof2.C
@@ -0,0 +1,14 @@
+// PR c++/57471
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+  static constexpr bool value = true;
+};
+
+template<typename... Types>
+struct B
+{
+  static_assert(A::value, "");
+  static_assert(sizeof...(Types) == 0, "");
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic76.C b/gcc/testsuite/g++.dg/cpp0x/variadic76.C
index fb80244..ff0211d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic76.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic76.C
@@ -4,8 +4,8 @@
 
 template<int... N> int foo ()
 {
-  return sizeof... (N ());	// { dg-error "cannot be used as a function" }
-  return sizeof... (N) ();	// { dg-error "cannot be used as a function" }
+  return sizeof... (N ());	// { dg-error "" }
+  return sizeof... (N) ();	// { dg-error "" }
 }
 
 int bar ()
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic77.C b/gcc/testsuite/g++.dg/cpp0x/variadic77.C
index 43f2d1e..8c6119f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic77.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic77.C
@@ -12,7 +12,7 @@
 {
   template<int... N> static int foo ()
   {
-    return sizeof... (pair<M, N>);	// { dg-error "mismatched argument pack lengths" }
+    return sizeof... (pair<M, N>);	// { dg-error "" }
   }
 };
 
diff --git a/gcc/testsuite/g++.dg/diagnostic/pr58979.C b/gcc/testsuite/g++.dg/diagnostic/pr58979.C
new file mode 100644
index 0000000..6be3f14
--- /dev/null
+++ b/gcc/testsuite/g++.dg/diagnostic/pr58979.C
@@ -0,0 +1,4 @@
+// PR c++/58979
+// { dg-do compile }
+
+int i = 0->*0; // { dg-error "invalid type argument of" }
diff --git a/gcc/testsuite/g++.dg/ext/altivec-7.C b/gcc/testsuite/g++.dg/ext/altivec-7.C
index 7c458fb..0383354 100644
--- a/gcc/testsuite/g++.dg/ext/altivec-7.C
+++ b/gcc/testsuite/g++.dg/ext/altivec-7.C
@@ -20,17 +20,17 @@
 void foo(unsigned int) { }
 void foo(float) { }
 
-/* { dg-final { scan-assembler "_Z3fooU8__vectorh" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectora" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectorU6__boolc" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectort" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectors" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectorU6__bools" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectorj" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectori" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectorU6__booli" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectorf" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectoru7__pixel" } } */
+/* { dg-final { scan-assembler "_Z3fooDv16_h" } } */
+/* { dg-final { scan-assembler "_Z3fooDv16_a" } } */
+/* { dg-final { scan-assembler "_Z3fooDv16_U6__boolc" } } */
+/* { dg-final { scan-assembler "_Z3fooDv8_t" } } */
+/* { dg-final { scan-assembler "_Z3fooDv8_s" } } */
+/* { dg-final { scan-assembler "_Z3fooDv8_U6__bools" } } */
+/* { dg-final { scan-assembler "_Z3fooDv4_j" } } */
+/* { dg-final { scan-assembler "_Z3fooDv4_i" } } */
+/* { dg-final { scan-assembler "_Z3fooDv4_U6__booli" } } */
+/* { dg-final { scan-assembler "_Z3fooDv4_f" } } */
+/* { dg-final { scan-assembler "_Z3fooDv8_u7__pixel" } } */
 /* { dg-final { scan-assembler "_Z3fooi" } } */
 /* { dg-final { scan-assembler "_Z3fooj" } } */
 /* { dg-final { scan-assembler "_Z3foof" } } */
diff --git a/gcc/testsuite/g++.dg/ext/pr57735.C b/gcc/testsuite/g++.dg/ext/pr57735.C
new file mode 100644
index 0000000..0eb9500
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/pr57735.C
@@ -0,0 +1,145 @@
+/* { dg-do compile { target arm*-*-* } } */
+/* { dg-options "-march=armv5te -marm  -mtune=xscale -mfloat-abi=soft -O1" } */
+
+typedef unsigned int size_t;
+__extension__
+typedef long long int int64_t;
+namespace WTF {
+    template<typename T> class RefPtr {
+    public:
+        inline T* operator->() const { return m_ptr; }
+        T* m_ptr;
+    };
+}
+using WTF::RefPtr;
+namespace JSC {
+    class ExecState;
+    class JSString;
+    typedef int64_t EncodedJSValue;
+    class JSValue {
+    public:
+        static EncodedJSValue encode(JSValue);
+        JSString* toString(ExecState*) const;
+    };
+}
+typedef unsigned char LChar;
+    typedef short unsigned int UChar;
+namespace WTF {
+    template<typename T, size_t inlineCapacity = 0>
+    class Vector {
+    public:
+        template<typename U> bool tryAppend(const U*, size_t);
+    };
+}
+using WTF::Vector;
+namespace WTF {
+template<typename CharType> inline bool isASCIIDigit(CharType c)
+{
+}
+template<typename CharType> inline bool isASCIIHexDigit(CharType c)
+{
+    return isASCIIDigit(c) || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f');
+}
+    class StringImpl;
+}
+using WTF::StringImpl;
+namespace WTF {
+class StringImpl {
+public:
+    unsigned length() const { return m_length; }
+    unsigned m_length;
+};
+}
+namespace JSC {
+    class Register {
+    };
+class UString {
+public:
+    unsigned length() const
+    {
+        return m_impl->length();
+    }
+    const LChar* characters8() const
+    {
+    }
+    RefPtr<StringImpl> m_impl;
+};
+    class ExecState : private Register {
+    public:
+        JSValue argument(size_t argument)
+        {
+        }
+    };
+    class JSCell {
+    };
+    class JSString : public JSCell {
+    public:
+        const UString& value(ExecState*) const;
+    };
+class JSStringBuilder {
+public:
+    void append(const UChar u)
+    {
+        m_okay &= buffer16.tryAppend(&u, 1);
+    }
+    Vector<UChar, 64> buffer16;
+    bool m_okay;
+};
+template <typename T>
+class Lexer {
+public:
+    static unsigned char convertHex(int c1, int c2);
+};
+}
+namespace WTF {
+namespace Unicode {
+    int UTF8SequenceLength(char);
+    int decodeUTF8Sequence(const char*);
+}
+}
+using namespace WTF;
+using namespace Unicode;
+namespace JSC {
+template <typename CharType>
+static JSValue decode(ExecState* exec, const CharType* characters, int length, const char* doNotUnescape, bool strict)
+{
+    JSStringBuilder builder;
+    int k = 0;
+    UChar u = 0;
+    while (k < length) {
+        const CharType* p = characters + k;
+        CharType c = *p;
+        if (c == '%') {
+            int charLen = 0;
+            if (k <= length - 3 && isASCIIHexDigit(p[1]) && isASCIIHexDigit(p[2])) {
+                const char b0 = Lexer<CharType>::convertHex(p[1], p[2]);
+                const int sequenceLen = UTF8SequenceLength(b0);
+                if (sequenceLen && k <= length - sequenceLen * 3) {
+                    charLen = sequenceLen * 3;
+                    char sequence[5];
+                    if (charLen != 0) {
+                        const int character = decodeUTF8Sequence(sequence);
+                        if (character < 0 || character >= 0x110000)
+                            charLen = 0;
+                        else if (character >= 0x10000) {
+                            builder.append(static_cast<UChar>(0xD800 | ((character - 0x10000) >> 10)));
+                        } else
+                            u = static_cast<UChar>(character);
+                    }
+                }
+            }
+        }
+    }
+}
+static JSValue decode(ExecState* exec, const char* doNotUnescape, bool strict)
+{
+    UString str = exec->argument(0).toString(exec)->value(exec);
+        return decode(exec, str.characters8(), str.length(), doNotUnescape, strict);
+}
+EncodedJSValue globalFuncDecodeURI(ExecState* exec)
+{
+    static const char do_not_unescape_when_decoding_URI[] =
+        "#$&+,/:;=?@";
+    return JSValue::encode(decode(exec, do_not_unescape_when_decoding_URI, true));
+}
+}
diff --git a/gcc/testsuite/g++.dg/inherit/virtual11.C b/gcc/testsuite/g++.dg/inherit/virtual11.C
new file mode 100644
index 0000000..3ad8d5e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/inherit/virtual11.C
@@ -0,0 +1,17 @@
+// PR c++/59031 
+// { dg-do compile }
+// { dg-options "-fdump-tree-gimple " }
+class B {
+ public:
+  virtual int add (int a, int b) {return a+ b;}
+};
+
+class D : public B {
+};
+
+int foo (int a, int b) {
+  D d;
+  return d.add(a, b);
+}
+// { dg-final { scan-tree-dump-not "OBJ_TYPE_REF" "gimple" } }
+// { dg-final { cleanup-tree-dump "gimple" } }
diff --git a/gcc/testsuite/g++.dg/inherit/virtual12.C b/gcc/testsuite/g++.dg/inherit/virtual12.C
new file mode 100644
index 0000000..4f5b66f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/inherit/virtual12.C
@@ -0,0 +1,18 @@
+// { dg-do compile }
+// { dg-options "-fdump-tree-gimple " }
+class B {
+ public:
+  virtual int add (int a, int b) {return a+ b;}
+};
+
+class D : public B {
+ public:
+  virtual int add (int a, int b) {return a+ b;}
+};
+
+int foo (int a, int b) {
+  D d;
+  return d.add(a, b);
+}
+// { dg-final { scan-tree-dump-not "OBJ_TYPE_REF" "gimple" } }
+// { dg-final { cleanup-tree-dump "gimple" } }
diff --git a/gcc/testsuite/g++.dg/opt/devirt3.C b/gcc/testsuite/g++.dg/opt/devirt3.C
new file mode 100644
index 0000000..6738673
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/devirt3.C
@@ -0,0 +1,24 @@
+// { dg-do compile }
+// { dg-options "-O2" }
+
+class ert_RefCounter {
+ protected:
+  int refCounterE;
+  virtual ~ert_RefCounter() {}
+};
+
+class ebs_Object : virtual public ert_RefCounter {
+};
+
+class dpr_App : public ebs_Object {
+ public:
+  virtual void run();
+};
+
+class dpr_Job : public ebs_Object {};
+
+void dpr_run(ebs_Object& objectA) {
+  ((dpr_App&)objectA).run();
+  dpr_Job jobL;
+  dpr_run(jobL);
+}
diff --git a/gcc/testsuite/g++.dg/parse/crash62.C b/gcc/testsuite/g++.dg/parse/crash62.C
new file mode 100644
index 0000000..04154f4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/crash62.C
@@ -0,0 +1,6 @@
+// PR c++/58535
+
+struct A
+{
+  template<int> virtual void foo(); // { dg-error "templates" }
+};
diff --git a/gcc/testsuite/g++.dg/template/inherit9.C b/gcc/testsuite/g++.dg/template/inherit9.C
new file mode 100644
index 0000000..926343b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/inherit9.C
@@ -0,0 +1,15 @@
+// PR c++/58273
+
+class A {};
+class B
+{
+  int goo(A);
+};
+template<typename E>
+class D : public B
+{
+  void foo(A t)
+  {
+    int const i(B::goo(t));
+  }
+};
diff --git a/gcc/testsuite/g++.dg/template/non-deducible1.C b/gcc/testsuite/g++.dg/template/non-deducible1.C
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/non-deducible1.C
diff --git a/gcc/testsuite/g++.dg/thunk_section_name.C b/gcc/testsuite/g++.dg/thunk_section_name.C
new file mode 100644
index 0000000..12c25c9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/thunk_section_name.C
@@ -0,0 +1,30 @@
+/* { dg-require-named-sections "" } */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-reorder-blocks-and-partition -ffunction-sections" } */
+
+class base_class_1
+{
+public:
+  virtual void vfn () {}
+};
+
+class base_class_2
+{
+public:
+  virtual void vfn () {}
+};
+
+class need_thunk_class : public base_class_1, public base_class_2
+{
+public:
+  virtual void vfn () {} 
+};
+
+int main (int argc, char *argv[])
+{
+  base_class_1 *c = new need_thunk_class ();
+  c->vfn();
+  return 0;
+}
+
+/* { dg-final { scan-assembler "\.text\._ZThn\[4|8\]_N16need_thunk_class3vfnEv" } } */
diff --git a/gcc/testsuite/g++.dg/tm/noexcept-6.C b/gcc/testsuite/g++.dg/tm/noexcept-6.C
new file mode 100644
index 0000000..4391159
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tm/noexcept-6.C
@@ -0,0 +1,23 @@
+// { dg-do compile }
+// { dg-options "-fno-exceptions -fgnu-tm -O -std=c++0x -fdump-tree-tmlower" }
+
+struct TrueFalse
+{
+  static constexpr bool v() { return true; }
+};
+
+int global;
+
+template<typename T> int foo()
+{
+  return __transaction_atomic noexcept(T::v()) (global + 1);
+}
+
+int f1()
+{
+  return foo<TrueFalse>();
+}
+
+/* { dg-final { scan-tree-dump-times "eh_must_not_throw" 0 "tmlower" } } */
+/* { dg-final { scan-tree-dump-times "__transaction_atomic" 1 "tmlower" } } */
+/* { dg-final { cleanup-tree-dump "tmlower" } } */
diff --git a/gcc/testsuite/g++.dg/tree-prof/func_reorder_gold_plugin_8.C b/gcc/testsuite/g++.dg/tree-prof/func_reorder_gold_plugin_8.C
index 9beeffb..3f1a015 100644
--- a/gcc/testsuite/g++.dg/tree-prof/func_reorder_gold_plugin_8.C
+++ b/gcc/testsuite/g++.dg/tree-prof/func_reorder_gold_plugin_8.C
@@ -15,5 +15,5 @@
 }
 
 /* { dg-final-use { scan-file-not linker.dump "Callgraph group" } }  */
-/* { dg-final-use { scan-file linker.dump "=== Unlikely sections start ===\n.*\.text\.hot\._Z3foov.* entry count = 1 computed = 1 max count = 1\n.*=== Unlikely sections end ===" } }  */
+/* { dg-final-use { scan-file linker.dump "=== Unlikely sections start ===\n.*\.text\.hot\._Z3foov.* entry count = 1 computed = 1 max count = 1 split = 0\n.*=== Unlikely sections end ===" } }  */
 /* { dg-final-use { remove-build-file "linker.dump" } }  */
diff --git a/gcc/testsuite/g++.dg/tree-prof/func_reorder_gold_plugin_split_functions_1.C b/gcc/testsuite/g++.dg/tree-prof/func_reorder_gold_plugin_split_functions_1.C
new file mode 100644
index 0000000..1230848
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-prof/func_reorder_gold_plugin_split_functions_1.C
@@ -0,0 +1,58 @@
+/* Check if the gold function reordering plugin reorders split functions.
+   Check if foo is split and the cold section of foo is not next to its hot
+   section*/
+/* { dg-require-section-exclude "" } */
+/* { dg-require-linker-function-reordering-plugin "" } */
+/* { dg-require-effective-target freorder } */
+/* { dg-options "-O2 -freorder-functions=callgraph -ffunction-sections -freorder-blocks-and-partition --save-temps -Wl,-plugin-opt,file=linker.dump" } */
+
+
+#define SIZE 10000
+
+const char *sarr[SIZE];
+const char *buf_hot;
+const char *buf_cold;
+
+__attribute__ ((noinline))
+int bar (int *arg)
+{
+  (*arg)++;
+  return 0;
+}
+
+__attribute__((noinline))
+void 
+foo (int path)
+{
+  int i;
+  bar (&path);
+  if (path)
+    {
+      for (i = 0; i < SIZE; i++)
+	sarr[i] = buf_hot;
+    }
+  else
+    {
+      for (i = 0; i < SIZE; i++)
+	sarr[i] = buf_cold;
+    }
+}
+
+int
+main (int argc, char *argv[])
+{
+  buf_hot =  "hello";
+  buf_cold = "world";
+  foo (argc);
+  return 0;
+}
+
+/* { dg-final-use { scan-assembler "\.string \"ColdWeight 0\"" } } */
+/* { dg-final-use { scan-assembler "\.section.*\.text\.hot\._Z3fooi" } } */
+/* { dg-final-use { scan-assembler "\.section.*\.text\.unlikely\._Z3fooi" } } */
+/* { dg-final-use { cleanup-saved-temps } }  */
+/* { dg-final-use { scan-file linker.dump "Callgraph group : _Z3barPi _Z3fooi main\n" } }  */
+/* { dg-final-use { scan-file linker.dump "\.text\.unlikely\._Z3fooi .* split = 1" } } */
+/* { dg-final-use { scan-file linker.dump "\.text\.unlikely\._Z3fooi\[^\n\]*\n\.text\.unlikely\._Z3barPi\[^\n\]*\n" } }  */
+/* { dg-final-use { scan-file linker.dump "\.text\._Z3barPi\[^\n\]*\n\.text\.hot\._Z3fooi" } }  */
+/* { dg-final-use { remove-build-file "linker.dump" } } */
diff --git a/gcc/testsuite/g++.dg/tree-prof/partition2.C b/gcc/testsuite/g++.dg/tree-prof/partition2.C
index ca5671f..0bc50fa 100644
--- a/gcc/testsuite/g++.dg/tree-prof/partition2.C
+++ b/gcc/testsuite/g++.dg/tree-prof/partition2.C
@@ -1,6 +1,6 @@
 // PR middle-end/45458
 // { dg-require-effective-target freorder }
-// { dg-options "-fnon-call-exceptions -freorder-blocks-and-partition" }
+// { dg-options "-O2 -fnon-call-exceptions -freorder-blocks-and-partition" }
 
 int
 main ()
diff --git a/gcc/testsuite/g++.dg/tree-prof/partition3.C b/gcc/testsuite/g++.dg/tree-prof/partition3.C
index 7846983..c62174a 100644
--- a/gcc/testsuite/g++.dg/tree-prof/partition3.C
+++ b/gcc/testsuite/g++.dg/tree-prof/partition3.C
@@ -1,6 +1,6 @@
 // PR middle-end/45566
 // { dg-require-effective-target freorder }
-// { dg-options "-O -fnon-call-exceptions -freorder-blocks-and-partition" }
+// { dg-options "-O2 -fnon-call-exceptions -freorder-blocks-and-partition" }
 
 int k;
 
diff --git a/gcc/testsuite/g++.dg/tree-prof/pr57451.C b/gcc/testsuite/g++.dg/tree-prof/pr57451.C
new file mode 100644
index 0000000..db0fcc1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-prof/pr57451.C
@@ -0,0 +1,26 @@
+// { dg-require-effective-target freorder }
+// { dg-options "-O2 -freorder-blocks-and-partition -g" }
+
+extern "C" void abort (void);
+struct MyException {};
+struct Data {
+    int nr;
+    Data() : nr(66) {}
+};
+Data __attribute__((noinline,noclone)) getData(int i)
+{
+  if (i) throw MyException();
+  Data data;
+  data.nr = i;
+  return data;
+}
+int main(int, char **)
+{
+  Data data;
+  try {
+      data = getData(1);
+  } catch (MyException& e) {
+      if (data.nr != 66)
+	abort ();
+  }
+}
diff --git a/gcc/testsuite/g++.dg/uninit-pred-4.C b/gcc/testsuite/g++.dg/uninit-pred-4.C
new file mode 100644
index 0000000..94ab13c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/uninit-pred-4.C
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-Wuninitialized -Og" } */
+
+int pop ();
+int pop_first_bucket;
+
+int my_pop ()
+{
+  int out;  // { dg-bogus "uninitialized" "uninitialized variable warning" }
+
+  while (pop_first_bucket)
+    if (pop_first_bucket && (out = pop()))
+      return out;
+
+  return 0;
+}
diff --git a/gcc/testsuite/g++.dg/vect/pr60000.cc b/gcc/testsuite/g++.dg/vect/pr60000.cc
new file mode 100644
index 0000000..fe39d6a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/pr60000.cc
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-fno-tree-vrp" } */
+
+void foo (bool* a, int* b)
+{
+  for (int i = 0; i < 1000; ++i)
+    {
+      a[i] = i % 2;
+      b[i] = i % 3;
+    }
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/g++.dg/warn/Wunused-var-21.C b/gcc/testsuite/g++.dg/warn/Wunused-var-21.C
new file mode 100644
index 0000000..d279e59
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wunused-var-21.C
@@ -0,0 +1,31 @@
+// PR c++/58325
+// { dg-do compile }
+// { dg-options "-Wunused" }
+
+void
+f1 ()
+{
+  int *volatile a = new int[1];
+  delete[] a;
+}
+
+void
+f2 ()
+{
+  int *b = new int[1];
+  delete[] b;
+}
+
+void
+f3 ()
+{
+  int *volatile c = new int;
+  delete c;
+}
+
+void
+f4 ()
+{
+  int *d = new int;
+  delete d;
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/misc9.C b/gcc/testsuite/g++.old-deja/g++.mike/misc9.C
index 3d8858c..7b9a86c 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/misc9.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/misc9.C
@@ -8,6 +8,6 @@
 
 class foo {
  public:
-  int bee::bar;		// { dg-error "not derived" } you cannot do this
+  int bee::bar;		// { dg-error "invalid use" } you cannot do this
     int me();
 };
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr58088.c b/gcc/testsuite/gcc.c-torture/compile/pr58088.c
new file mode 100644
index 0000000..07a9c68
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr58088.c
@@ -0,0 +1,5 @@
+int
+bar (int i)
+{
+  return 1 | ((i * 2) & 254);
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58364.c b/gcc/testsuite/gcc.c-torture/execute/pr58364.c
new file mode 100644
index 0000000..59ad7b4
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58364.c
@@ -0,0 +1,17 @@
+/* PR tree-optimization/58364 */
+
+int a = 1, b, c;
+
+int
+foo (int x)
+{
+  return x < 0 ? 1 : x;
+}
+
+int
+main ()
+{
+  if (foo (a > c == (b = 0)))
+    __builtin_abort ();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58365.c b/gcc/testsuite/gcc.c-torture/execute/pr58365.c
new file mode 100644
index 0000000..1e6079d
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58365.c
@@ -0,0 +1,35 @@
+/* PR rtl-optimization/58365 */
+
+extern void abort (void);
+
+struct S
+{
+  volatile int a;
+  int b, c, d, e;
+} f;
+static struct S g, h;
+int i = 1;
+
+char
+foo (void)
+{
+  return i;
+}
+
+static struct S
+bar (void)
+{
+  if (foo ())
+    return f;
+  return g;
+}
+
+int
+main ()
+{
+  h = bar ();
+  f.b = 1;
+  if (h.b != 0)
+    abort ();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58385.c b/gcc/testsuite/gcc.c-torture/execute/pr58385.c
new file mode 100644
index 0000000..8d7da6f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58385.c
@@ -0,0 +1,21 @@
+/* PR tree-optimization/58385 */
+
+extern void abort (void);
+
+int a, b = 1;
+
+int
+foo ()
+{
+  b = 0;
+  return 0;
+}
+
+int
+main ()
+{
+  ((0 || a) & foo () >= 0) <= 1 && 1;
+  if (b)
+    abort ();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58564.c b/gcc/testsuite/gcc.c-torture/execute/pr58564.c
new file mode 100644
index 0000000..967ee95
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58564.c
@@ -0,0 +1,14 @@
+/* PR middle-end/58564 */
+
+extern void abort (void);
+int a, b;
+short *c, **d = &c;
+
+int
+main ()
+{
+  b = (0, 0 > ((&c == d) & (1 && (a ^ 1)))) | 0U;
+  if (b != 0)
+    abort ();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58574.c b/gcc/testsuite/gcc.c-torture/execute/pr58574.c
new file mode 100644
index 0000000..44827eb
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58574.c
@@ -0,0 +1,219 @@
+/* PR target/58574 */
+
+__attribute__((noinline, noclone)) double
+foo (double x)
+{
+  double t;
+  switch ((int) x)
+    {
+    case 0:
+      t = 2 * x - 1;
+      return 0.70878e-3 + (0.71234e-3 + (0.35779e-5 + (0.17403e-7 + (0.81710e-10 + (0.36885e-12 + 0.15917e-14 * t) * t) * t) * t) * t) * t;
+    case 1:
+      t = 2 * x - 3;
+      return 0.21479e-2 + (0.72686e-3 + (0.36843e-5 + (0.18071e-7 + (0.85496e-10 + (0.38852e-12 + 0.16868e-14 * t) * t) * t) * t) * t) * t;
+    case 2:
+      t = 2 * x - 5;
+      return 0.36165e-2 + (0.74182e-3 + (0.37948e-5 + (0.18771e-7 + (0.89484e-10 + (0.40935e-12 + 0.17872e-14 * t) * t) * t) * t) * t) * t;
+    case 3:
+      t = 2 * x - 7;
+      return 0.51154e-2 + (0.75722e-3 + (0.39096e-5 + (0.19504e-7 + (0.93687e-10 + (0.43143e-12 + 0.18939e-14 * t) * t) * t) * t) * t) * t;
+    case 4:
+      t = 2 * x - 9;
+      return 0.66457e-2 + (0.77310e-3 + (0.40289e-5 + (0.20271e-7 + (0.98117e-10 + (0.45484e-12 + 0.20076e-14 * t) * t) * t) * t) * t) * t;
+    case 5:
+      t = 2 * x - 11;
+      return 0.82082e-2 + (0.78946e-3 + (0.41529e-5 + (0.21074e-7 + (0.10278e-9 + (0.47965e-12 + 0.21285e-14 * t) * t) * t) * t) * t) * t;
+    case 6:
+      t = 2 * x - 13;
+      return 0.98039e-2 + (0.80633e-3 + (0.42819e-5 + (0.21916e-7 + (0.10771e-9 + (0.50595e-12 + 0.22573e-14 * t) * t) * t) * t) * t) * t;
+    case 7:
+      t = 2 * x - 15;
+      return 0.11433e-1 + (0.82372e-3 + (0.44160e-5 + (0.22798e-7 + (0.11291e-9 + (0.53386e-12 + 0.23944e-14 * t) * t) * t) * t) * t) * t;
+    case 8:
+      t = 2 * x - 17;
+      return 0.13099e-1 + (0.84167e-3 + (0.45555e-5 + (0.23723e-7 + (0.11839e-9 + (0.56346e-12 + 0.25403e-14 * t) * t) * t) * t) * t) * t;
+    case 9:
+      t = 2 * x - 19;
+      return 0.14800e-1 + (0.86018e-3 + (0.47008e-5 + (0.24694e-7 + (0.12418e-9 + (0.59486e-12 + 0.26957e-14 * t) * t) * t) * t) * t) * t;
+    case 10:
+      t = 2 * x - 21;
+      return 0.16540e-1 + (0.87928e-3 + (0.48520e-5 + (0.25711e-7 + (0.13030e-9 + (0.62820e-12 + 0.28612e-14 * t) * t) * t) * t) * t) * t;
+    case 11:
+      t = 2 * x - 23;
+      return 0.18318e-1 + (0.89900e-3 + (0.50094e-5 + (0.26779e-7 + (0.13675e-9 + (0.66358e-12 + 0.30375e-14 * t) * t) * t) * t) * t) * t;
+    case 12:
+      t = 2 * x - 25;
+      return 0.20136e-1 + (0.91936e-3 + (0.51734e-5 + (0.27900e-7 + (0.14357e-9 + (0.70114e-12 + 0.32252e-14 * t) * t) * t) * t) * t) * t;
+    case 13:
+      t = 2 * x - 27;
+      return 0.21996e-1 + (0.94040e-3 + (0.53443e-5 + (0.29078e-7 + (0.15078e-9 + (0.74103e-12 + 0.34251e-14 * t) * t) * t) * t) * t) * t;
+    case 14:
+      t = 2 * x - 29;
+      return 0.23898e-1 + (0.96213e-3 + (0.55225e-5 + (0.30314e-7 + (0.15840e-9 + (0.78340e-12 + 0.36381e-14 * t) * t) * t) * t) * t) * t;
+    case 15:
+      t = 2 * x - 31;
+      return 0.25845e-1 + (0.98459e-3 + (0.57082e-5 + (0.31613e-7 + (0.16646e-9 + (0.82840e-12 + 0.38649e-14 * t) * t) * t) * t) * t) * t;
+    case 16:
+      t = 2 * x - 33;
+      return 0.27837e-1 + (0.10078e-2 + (0.59020e-5 + (0.32979e-7 + (0.17498e-9 + (0.87622e-12 + 0.41066e-14 * t) * t) * t) * t) * t) * t;
+    case 17:
+      t = 2 * x - 35;
+      return 0.29877e-1 + (0.10318e-2 + (0.61041e-5 + (0.34414e-7 + (0.18399e-9 + (0.92703e-12 + 0.43639e-14 * t) * t) * t) * t) * t) * t;
+    case 18:
+      t = 2 * x - 37;
+      return 0.31965e-1 + (0.10566e-2 + (0.63151e-5 + (0.35924e-7 + (0.19353e-9 + (0.98102e-12 + 0.46381e-14 * t) * t) * t) * t) * t) * t;
+    case 19:
+      t = 2 * x - 39;
+      return 0.34104e-1 + (0.10823e-2 + (0.65354e-5 + (0.37512e-7 + (0.20362e-9 + (0.10384e-11 + 0.49300e-14 * t) * t) * t) * t) * t) * t;
+    case 20:
+      t = 2 * x - 41;
+      return 0.36295e-1 + (0.11089e-2 + (0.67654e-5 + (0.39184e-7 + (0.21431e-9 + (0.10994e-11 + 0.52409e-14 * t) * t) * t) * t) * t) * t;
+    case 21:
+      t = 2 * x - 43;
+      return 0.38540e-1 + (0.11364e-2 + (0.70058e-5 + (0.40943e-7 + (0.22563e-9 + (0.11642e-11 + 0.55721e-14 * t) * t) * t) * t) * t) * t;
+    case 22:
+      t = 2 * x - 45;
+      return 0.40842e-1 + (0.11650e-2 + (0.72569e-5 + (0.42796e-7 + (0.23761e-9 + (0.12332e-11 + 0.59246e-14 * t) * t) * t) * t) * t) * t;
+    case 23:
+      t = 2 * x - 47;
+      return 0.43201e-1 + (0.11945e-2 + (0.75195e-5 + (0.44747e-7 + (0.25030e-9 + (0.13065e-11 + 0.63000e-14 * t) * t) * t) * t) * t) * t;
+    case 24:
+      t = 2 * x - 49;
+      return 0.45621e-1 + (0.12251e-2 + (0.77941e-5 + (0.46803e-7 + (0.26375e-9 + (0.13845e-11 + 0.66996e-14 * t) * t) * t) * t) * t) * t;
+    case 25:
+      t = 2 * x - 51;
+      return 0.48103e-1 + (0.12569e-2 + (0.80814e-5 + (0.48969e-7 + (0.27801e-9 + (0.14674e-11 + 0.71249e-14 * t) * t) * t) * t) * t) * t;
+    case 26:
+      t = 2 * x - 59;
+      return 0.58702e-1 + (0.13962e-2 + (0.93714e-5 + (0.58882e-7 + (0.34414e-9 + (0.18552e-11 + 0.91160e-14 * t) * t) * t) * t) * t) * t;
+    case 30:
+      t = 2 * x - 79;
+      return 0.90908e-1 + (0.18544e-2 + (0.13903e-4 + (0.95549e-7 + (0.59752e-9 + (0.33656e-11 + 0.16815e-13 * t) * t) * t) * t) * t) * t;
+    case 40:
+      t = 2 * x - 99;
+      return 0.13443e0 + (0.25474e-2 + (0.21385e-4 + (0.15996e-6 + (0.10585e-8 + (0.61258e-11 + 0.30412e-13 * t) * t) * t) * t) * t) * t;
+    case 50:
+      t = 2 * x - 119;
+      return 0.19540e0 + (0.36342e-2 + (0.34096e-4 + (0.27479e-6 + (0.18934e-8 + (0.11021e-10 + 0.52931e-13 * t) * t) * t) * t) * t) * t;
+    case 60:
+      t = 2 * x - 121;
+      return 0.20281e0 + (0.37739e-2 + (0.35791e-4 + (0.29038e-6 + (0.20068e-8 + (0.11673e-10 + 0.55790e-13 * t) * t) * t) * t) * t) * t;
+    case 61:
+      t = 2 * x - 123;
+      return 0.21050e0 + (0.39206e-2 + (0.37582e-4 + (0.30691e-6 + (0.21270e-8 + (0.12361e-10 + 0.58770e-13 * t) * t) * t) * t) * t) * t;
+    case 62:
+      t = 2 * x - 125;
+      return 0.21849e0 + (0.40747e-2 + (0.39476e-4 + (0.32443e-6 + (0.22542e-8 + (0.13084e-10 + 0.61873e-13 * t) * t) * t) * t) * t) * t;
+    case 63:
+      t = 2 * x - 127;
+      return 0.22680e0 + (0.42366e-2 + (0.41477e-4 + (0.34300e-6 + (0.23888e-8 + (0.13846e-10 + 0.65100e-13 * t) * t) * t) * t) * t) * t;
+    case 64:
+      t = 2 * x - 129;
+      return 0.23545e0 + (0.44067e-2 + (0.43594e-4 + (0.36268e-6 + (0.25312e-8 + (0.14647e-10 + 0.68453e-13 * t) * t) * t) * t) * t) * t;
+    case 65:
+      t = 2 * x - 131;
+      return 0.24444e0 + (0.45855e-2 + (0.45832e-4 + (0.38352e-6 + (0.26819e-8 + (0.15489e-10 + 0.71933e-13 * t) * t) * t) * t) * t) * t;
+    case 66:
+      t = 2 * x - 133;
+      return 0.25379e0 + (0.47735e-2 + (0.48199e-4 + (0.40561e-6 + (0.28411e-8 + (0.16374e-10 + 0.75541e-13 * t) * t) * t) * t) * t) * t;
+    case 67:
+      t = 2 * x - 135;
+      return 0.26354e0 + (0.49713e-2 + (0.50702e-4 + (0.42901e-6 + (0.30095e-8 + (0.17303e-10 + 0.79278e-13 * t) * t) * t) * t) * t) * t;
+    case 68:
+      t = 2 * x - 137;
+      return 0.27369e0 + (0.51793e-2 + (0.53350e-4 + (0.45379e-6 + (0.31874e-8 + (0.18277e-10 + 0.83144e-13 * t) * t) * t) * t) * t) * t;
+    case 69:
+      t = 2 * x - 139;
+      return 0.28426e0 + (0.53983e-2 + (0.56150e-4 + (0.48003e-6 + (0.33752e-8 + (0.19299e-10 + 0.87139e-13 * t) * t) * t) * t) * t) * t;
+    case 70:
+      t = 2 * x - 141;
+      return 0.29529e0 + (0.56288e-2 + (0.59113e-4 + (0.50782e-6 + (0.35735e-8 + (0.20369e-10 + 0.91262e-13 * t) * t) * t) * t) * t) * t;
+    case 71:
+      t = 2 * x - 143;
+      return 0.30679e0 + (0.58714e-2 + (0.62248e-4 + (0.53724e-6 + (0.37827e-8 + (0.21490e-10 + 0.95513e-13 * t) * t) * t) * t) * t) * t;
+    case 72:
+      t = 2 * x - 145;
+      return 0.31878e0 + (0.61270e-2 + (0.65564e-4 + (0.56837e-6 + (0.40035e-8 + (0.22662e-10 + 0.99891e-13 * t) * t) * t) * t) * t) * t;
+    case 73:
+      t = 2 * x - 147;
+      return 0.33130e0 + (0.63962e-2 + (0.69072e-4 + (0.60133e-6 + (0.42362e-8 + (0.23888e-10 + 0.10439e-12 * t) * t) * t) * t) * t) * t;
+    case 74:
+      t = 2 * x - 149;
+      return 0.34438e0 + (0.66798e-2 + (0.72783e-4 + (0.63619e-6 + (0.44814e-8 + (0.25168e-10 + 0.10901e-12 * t) * t) * t) * t) * t) * t;
+    case 75:
+      t = 2 * x - 151;
+      return 0.35803e0 + (0.69787e-2 + (0.76710e-4 + (0.67306e-6 + (0.47397e-8 + (0.26505e-10 + 0.11376e-12 * t) * t) * t) * t) * t) * t;
+    case 76:
+      t = 2 * x - 153;
+      return 0.37230e0 + (0.72938e-2 + (0.80864e-4 + (0.71206e-6 + (0.50117e-8 + (0.27899e-10 + 0.11862e-12 * t) * t) * t) * t) * t) * t;
+    case 77:
+      t = 2 * x - 155;
+      return 0.38722e0 + (0.76260e-2 + (0.85259e-4 + (0.75329e-6 + (0.52979e-8 + (0.29352e-10 + 0.12360e-12 * t) * t) * t) * t) * t) * t;
+    case 78:
+      t = 2 * x - 157;
+      return 0.40282e0 + (0.79762e-2 + (0.89909e-4 + (0.79687e-6 + (0.55989e-8 + (0.30866e-10 + 0.12868e-12 * t) * t) * t) * t) * t) * t;
+    case 79:
+      t = 2 * x - 159;
+      return 0.41914e0 + (0.83456e-2 + (0.94827e-4 + (0.84291e-6 + (0.59154e-8 + (0.32441e-10 + 0.13387e-12 * t) * t) * t) * t) * t) * t;
+    case 80:
+      t = 2 * x - 161;
+      return 0.43621e0 + (0.87352e-2 + (0.10002e-3 + (0.89156e-6 + (0.62480e-8 + (0.34079e-10 + 0.13917e-12 * t) * t) * t) * t) * t) * t;
+    case 81:
+      t = 2 * x - 163;
+      return 0.45409e0 + (0.91463e-2 + (0.10553e-3 + (0.94293e-6 + (0.65972e-8 + (0.35782e-10 + 0.14455e-12 * t) * t) * t) * t) * t) * t;
+    case 82:
+      t = 2 * x - 165;
+      return 0.47282e0 + (0.95799e-2 + (0.11135e-3 + (0.99716e-6 + (0.69638e-8 + (0.37549e-10 + 0.15003e-12 * t) * t) * t) * t) * t) * t;
+    case 83:
+      t = 2 * x - 167;
+      return 0.49243e0 + (0.10037e-1 + (0.11750e-3 + (0.10544e-5 + (0.73484e-8 + (0.39383e-10 + 0.15559e-12 * t) * t) * t) * t) * t) * t;
+    case 84:
+      t = 2 * x - 169;
+      return 0.51298e0 + (0.10520e-1 + (0.12400e-3 + (0.11147e-5 + (0.77517e-8 + (0.41283e-10 + 0.16122e-12 * t) * t) * t) * t) * t) * t;
+    case 85:
+      t = 2 * x - 171;
+      return 0.53453e0 + (0.11030e-1 + (0.13088e-3 + (0.11784e-5 + (0.81743e-8 + (0.43252e-10 + 0.16692e-12 * t) * t) * t) * t) * t) * t;
+    case 86:
+      t = 2 * x - 173;
+      return 0.55712e0 + (0.11568e-1 + (0.13815e-3 + (0.12456e-5 + (0.86169e-8 + (0.45290e-10 + 0.17268e-12 * t) * t) * t) * t) * t) * t;
+    case 87:
+      t = 2 * x - 175;
+      return 0.58082e0 + (0.12135e-1 + (0.14584e-3 + (0.13164e-5 + (0.90803e-8 + (0.47397e-10 + 0.17850e-12 * t) * t) * t) * t) * t) * t;
+    case 88:
+      t = 2 * x - 177;
+      return 0.60569e0 + (0.12735e-1 + (0.15396e-3 + (0.13909e-5 + (0.95651e-8 + (0.49574e-10 + 0.18435e-12 * t) * t) * t) * t) * t) * t;
+    case 89:
+      t = 2 * x - 179;
+      return 0.63178e0 + (0.13368e-1 + (0.16254e-3 + (0.14695e-5 + (0.10072e-7 + (0.51822e-10 + 0.19025e-12 * t) * t) * t) * t) * t) * t;
+    case 90:
+      t = 2 * x - 181;
+      return 0.65918e0 + (0.14036e-1 + (0.17160e-3 + (0.15521e-5 + (0.10601e-7 + (0.54140e-10 + 0.19616e-12 * t) * t) * t) * t) * t) * t;
+    case 91:
+      t = 2 * x - 183;
+      return 0.68795e0 + (0.14741e-1 + (0.18117e-3 + (0.16392e-5 + (0.11155e-7 + (0.56530e-10 + 0.20209e-12 * t) * t) * t) * t) * t) * t;
+    case 92:
+      t = 2 * x - 185;
+      return 0.71818e0 + (0.15486e-1 + (0.19128e-3 + (0.17307e-5 + (0.11732e-7 + (0.58991e-10 + 0.20803e-12 * t) * t) * t) * t) * t) * t;
+    case 93:
+      t = 2 * x - 187;
+      return 0.74993e0 + (0.16272e-1 + (0.20195e-3 + (0.18269e-5 + (0.12335e-7 + (0.61523e-10 + 0.21395e-12 * t) * t) * t) * t) * t) * t;
+    }
+  return 1.0;
+}
+
+int
+main ()
+{
+#ifdef __s390x__
+  {
+    register unsigned long r5 __asm ("r5");
+    r5 = 0xdeadbeefUL;
+    asm volatile ("":"+r" (r5));
+  }
+#endif
+  double d = foo (78.4);
+  if (d < 0.38 || d > 0.42)
+    __builtin_abort ();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58831.c b/gcc/testsuite/gcc.c-torture/execute/pr58831.c
new file mode 100644
index 0000000..a40cd54
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58831.c
@@ -0,0 +1,40 @@
+#include <assert.h>
+
+int a, *b, c, d, f, **i, p, q, *r;
+short o, j;
+
+static int __attribute__((noinline, noclone))
+fn1 (int *p1, int **p2)
+{
+  int **e = &b;
+  for (; p; p++)
+    *p1 = 1;
+  *e = *p2 = &d;
+
+  assert (r);
+
+  return c;
+}
+
+static int ** __attribute__((noinline, noclone))
+fn2 (void)
+{
+  for (f = 0; f != 42; f++)
+    {
+      int *g[3] = {0, 0, 0};
+      for (o = 0; o; o--)
+        for (; a > 1;)
+          {
+            int **h[1] = { &g[2] };
+          }
+    }
+  return &r;
+}
+
+int
+main (void)
+{
+  i = fn2 ();
+  fn1 (b, i);
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic-store-6.c b/gcc/testsuite/gcc.dg/atomic-store-6.c
new file mode 100644
index 0000000..81499cd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic-store-6.c
@@ -0,0 +1,13 @@
+/* { dg-do run } */
+/* { dg-require-effective-target sync_int_128_runtime } */
+/* { dg-options "-mcx16" { target { i?86-*-* x86_64-*-* } } } */
+
+__int128_t i;
+
+int main()
+{
+  __atomic_store_16(&i, -1, 0);
+  if (i != -1)
+    __builtin_abort();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/autopar/outer-1.c b/gcc/testsuite/gcc.dg/autopar/outer-1.c
index 913d390..cadf0ff 100644
--- a/gcc/testsuite/gcc.dg/autopar/outer-1.c
+++ b/gcc/testsuite/gcc.dg/autopar/outer-1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
 
 void abort (void);
 
diff --git a/gcc/testsuite/gcc.dg/autopar/outer-3.c b/gcc/testsuite/gcc.dg/autopar/outer-3.c
index 2f1033f..bf842f0 100644
--- a/gcc/testsuite/gcc.dg/autopar/outer-3.c
+++ b/gcc/testsuite/gcc.dg/autopar/outer-3.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
 
 void abort (void);
 
diff --git a/gcc/testsuite/gcc.dg/autopar/outer-4.c b/gcc/testsuite/gcc.dg/autopar/outer-4.c
index 56f6123..14396df 100644
--- a/gcc/testsuite/gcc.dg/autopar/outer-4.c
+++ b/gcc/testsuite/gcc.dg/autopar/outer-4.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
 
 void abort (void);
 
diff --git a/gcc/testsuite/gcc.dg/autopar/outer-5.c b/gcc/testsuite/gcc.dg/autopar/outer-5.c
index 3a54298..3e55a0b 100644
--- a/gcc/testsuite/gcc.dg/autopar/outer-5.c
+++ b/gcc/testsuite/gcc.dg/autopar/outer-5.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
 
 void abort (void);
 
diff --git a/gcc/testsuite/gcc.dg/autopar/parallelization-1.c b/gcc/testsuite/gcc.dg/autopar/parallelization-1.c
index f53be85..bac759e3 100644
--- a/gcc/testsuite/gcc.dg/autopar/parallelization-1.c
+++ b/gcc/testsuite/gcc.dg/autopar/parallelization-1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
 
 void abort (void);
 
diff --git a/gcc/testsuite/gcc.dg/autopar/reduc-1.c b/gcc/testsuite/gcc.dg/autopar/reduc-1.c
index 8018a55..9bb1b57 100644
--- a/gcc/testsuite/gcc.dg/autopar/reduc-1.c
+++ b/gcc/testsuite/gcc.dg/autopar/reduc-1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
 
 #include <stdarg.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/autopar/reduc-1char.c b/gcc/testsuite/gcc.dg/autopar/reduc-1char.c
index 76645c8..8322020 100644
--- a/gcc/testsuite/gcc.dg/autopar/reduc-1char.c
+++ b/gcc/testsuite/gcc.dg/autopar/reduc-1char.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
 
 #include <stdarg.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/autopar/reduc-1short.c b/gcc/testsuite/gcc.dg/autopar/reduc-1short.c
index 526f170..5a2efa8 100644
--- a/gcc/testsuite/gcc.dg/autopar/reduc-1short.c
+++ b/gcc/testsuite/gcc.dg/autopar/reduc-1short.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
 
 #include <stdarg.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/autopar/reduc-2.c b/gcc/testsuite/gcc.dg/autopar/reduc-2.c
index e0abb26..8c9fb03 100644
--- a/gcc/testsuite/gcc.dg/autopar/reduc-2.c
+++ b/gcc/testsuite/gcc.dg/autopar/reduc-2.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
 
 #include <stdarg.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/autopar/reduc-2char.c b/gcc/testsuite/gcc.dg/autopar/reduc-2char.c
index ada1275..cff5425 100644
--- a/gcc/testsuite/gcc.dg/autopar/reduc-2char.c
+++ b/gcc/testsuite/gcc.dg/autopar/reduc-2char.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
 
 #include <stdarg.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/autopar/reduc-2short.c b/gcc/testsuite/gcc.dg/autopar/reduc-2short.c
index 3363c68..5ee5f01 100644
--- a/gcc/testsuite/gcc.dg/autopar/reduc-2short.c
+++ b/gcc/testsuite/gcc.dg/autopar/reduc-2short.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
 
 #include <stdarg.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/autopar/reduc-3.c b/gcc/testsuite/gcc.dg/autopar/reduc-3.c
index 6bc2047..c9ec27b 100644
--- a/gcc/testsuite/gcc.dg/autopar/reduc-3.c
+++ b/gcc/testsuite/gcc.dg/autopar/reduc-3.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
 
 #include <stdarg.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/autopar/reduc-6.c b/gcc/testsuite/gcc.dg/autopar/reduc-6.c
index fface8f..5d495e3 100644
--- a/gcc/testsuite/gcc.dg/autopar/reduc-6.c
+++ b/gcc/testsuite/gcc.dg/autopar/reduc-6.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
 
 #include <stdarg.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/autopar/reduc-7.c b/gcc/testsuite/gcc.dg/autopar/reduc-7.c
index f66069e..72a36ad 100644
--- a/gcc/testsuite/gcc.dg/autopar/reduc-7.c
+++ b/gcc/testsuite/gcc.dg/autopar/reduc-7.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/gcc.dg/autopar/reduc-8.c b/gcc/testsuite/gcc.dg/autopar/reduc-8.c
index 4a416df..662ff44 100644
--- a/gcc/testsuite/gcc.dg/autopar/reduc-8.c
+++ b/gcc/testsuite/gcc.dg/autopar/reduc-8.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/gcc.dg/autopar/reduc-9.c b/gcc/testsuite/gcc.dg/autopar/reduc-9.c
index 2c1677c..c738f23 100644
--- a/gcc/testsuite/gcc.dg/autopar/reduc-9.c
+++ b/gcc/testsuite/gcc.dg/autopar/reduc-9.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/gcc.dg/ipa/pr55260.c b/gcc/testsuite/gcc.dg/ipa/pr55260.c
new file mode 100644
index 0000000..ef151b0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr55260.c
@@ -0,0 +1,38 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-inline -fipa-cp-clone"  } */
+
+typedef struct {
+  int *ptr;
+  int len;
+} string;
+typedef struct {
+  string nantstr;
+  int *nant;
+} malv;
+typedef struct {
+  int *nor;
+} list_heads;
+int b;
+list_heads *fn1(string, int *, unsigned);
+void fn2(malv *p1, list_heads *p2, unsigned p3) {
+  string a = p1->nantstr;
+  fn1(a, p1->nant, p3);
+}
+
+void fn3(unsigned p1) { fn2(0, 0, p1); }
+
+list_heads *fn1(string p1, int *p2, unsigned p3) {
+  while (1) {
+    if (p3)
+      fn3(1);
+    if (b)
+      return 0;
+    fn3(1);
+  }
+}
+
+void fn5() {
+  list_heads c;
+  c.nor = 0;
+  fn2(0, &c, 1);
+}
diff --git a/gcc/testsuite/gcc.dg/pr53265.c b/gcc/testsuite/gcc.dg/pr53265.c
index c60a736..0c37a57 100644
--- a/gcc/testsuite/gcc.dg/pr53265.c
+++ b/gcc/testsuite/gcc.dg/pr53265.c
@@ -1,6 +1,6 @@
 /* PR tree-optimization/53265 */
 /* { dg-do compile } */
-/* { dg-options "-O2 -Wall" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -Wall" } */
 
 void bar (void *);
 int baz (int);
@@ -154,3 +154,5 @@
   fn11 (1);
   fn11 (1);
 }
+
+/* { dg-prune-output "array subscript is above array bounds" } */
diff --git a/gcc/testsuite/gcc.dg/pr58463.c b/gcc/testsuite/gcc.dg/pr58463.c
new file mode 100644
index 0000000..e2b4411
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr58463.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-ealias-details -O2" } */
+
+typedef struct
+{
+  int data16;
+}
+list_data;
+void
+fn1 (list_data * p1)
+{
+    p1->data16 = p1->data16 & 1 & p1->data16 >> 1;
+}
+
+/* { dg-final { cleanup-tree-dump "ealias" } } */
diff --git a/gcc/testsuite/gcc.dg/pr58805.c b/gcc/testsuite/gcc.dg/pr58805.c
new file mode 100644
index 0000000..dda0e4b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr58805.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre" } */
+
+/* Type that matches the 'p' constraint.  */
+#define TYPE void *
+
+static inline
+void bar (TYPE *r)
+{
+  TYPE t;
+  __asm__ ("" : "=&p" (t), "=p" (*r));
+}
+
+void
+foo (int n, TYPE *x, TYPE *y)
+{
+  if (n == 0)
+    bar (x);
+  else
+    bar (y);
+}
+
+/* { dg-final { scan-tree-dump-times "__asm__" 2 "pre"} } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/profile-generate-4.c b/gcc/testsuite/gcc.dg/profile-generate-4.c
new file mode 100644
index 0000000..0f57f32
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/profile-generate-4.c
@@ -0,0 +1,21 @@
+/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-O2 -fprofile-generate -fno-tree-loop-im -fdump-tree-ivopts-details-blocks" } */
+
+/* Because gcov counter related var has data race for multithread program,
+   compiler should prevent them from affecting program correctness. So
+   PROF_edge_counter variable should not be used as induction variable, or
+   else IVOPT may use such variable to compute loop boundary.  */
+
+void *ptr;
+int N;
+
+void foo(void *t) {
+  int i;
+  for (i = 0; i < N; i++) {
+    t = *(void **)t;
+  }
+  ptr = t;
+}
+
+/* { dg-final { scan-tree-dump-times "ssa name PROF_edge_counter" 0 "ivopts"} } */
+/* { dg-final { cleanup-tree-dump "ivopts" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr57488.c b/gcc/testsuite/gcc.dg/torture/pr57488.c
new file mode 100644
index 0000000..7eda364
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57488.c
@@ -0,0 +1,58 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+int i, j, *pj = &j, **ppj = &pj;
+int x, *px = &x;
+
+short s, *ps = &s, k;
+
+unsigned short u, *pu = &u, **ppu = &pu;
+
+char c, *pc = &c;
+
+unsigned char v = 48;
+
+static int
+bar (int p)
+{
+  p = k;
+  *px = **ppu = i;
+  *ppj = &p;
+  if (**ppj)
+    *pj = p;
+  return p;
+}
+
+void __attribute__((noinline))
+foo ()
+{
+  for (; i <= 3; i++)
+    for (; j; j--);
+
+  u ^= bar (*pj);
+
+  for (k = 1; k >= 0; k--)
+    {
+      int l;
+      bar (0);
+      for (l = 1; l < 5; l++)
+	{
+	  int m;
+	  for (m = 6; m; m--)
+	    {
+	      v--;
+	      *ps = *pc;
+	    }
+	}
+    }
+}
+
+int
+main ()
+{
+  foo ();
+  if (v != 0)
+    abort ();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57521.c b/gcc/testsuite/gcc.dg/torture/pr57521.c
new file mode 100644
index 0000000..e7832cb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57521.c
@@ -0,0 +1,51 @@
+/* { dg-do run } */
+/* { dg-options "-ftree-loop-if-convert" } */
+
+void abort (void);
+
+int a, b, c, d, o = 1, p;
+short e;
+
+int
+fn1 (int * p1)
+{
+  int f, g, h, j = 0, k = 0, l = 0;
+  unsigned int i;
+  int *m[1] = { &l };
+  for (; b >= 0; b--)
+    {
+      if (*p1)
+	if (j >= 0)
+	  {
+	    int n = 1;
+	    e = 1;
+	    h = a ? a : 1 % n;
+	    g = h > 0 ? 0 : h + 1;
+	    k = c + g;
+	  }
+	else
+	  continue;
+      else
+	{
+
+	  f = d > 0 ? 0 : d + 1;
+	  i = f;
+	  j = 1 + i;
+	}
+      l++;
+    }
+  return k;
+}
+
+int
+main ()
+{
+  for (;; p++)
+    {
+      fn1 (&o);
+      break;
+    }
+  if (e != 1)
+    abort ();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57656.c b/gcc/testsuite/gcc.dg/torture/pr57656.c
new file mode 100644
index 0000000..4f3645e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57656.c
@@ -0,0 +1,13 @@
+/* { dg-do run } */
+/* { dg-options "-fstrict-overflow" } */
+
+int main (void)
+{
+  int a = -1;
+  int b = __INT_MAX__;
+  int c = 2;
+  int t = 1 - ((a - b) / c);  // t = 1 - ( __INT_MIN__ / 2 )
+  if (t != (1 - (-1 - __INT_MAX__) / 2))
+    __builtin_abort();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57685.c b/gcc/testsuite/gcc.dg/torture/pr57685.c
new file mode 100644
index 0000000..75973f2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57685.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+unsigned f(void)
+{
+  unsigned a;
+  int b, c, d, e;
+
+  for(c = 27; c < 40; c++)
+    b |= d |= b;
+
+  if(b)
+    a = e;
+
+  return a;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58079.c b/gcc/testsuite/gcc.dg/torture/pr58079.c
new file mode 100644
index 0000000..99a3018
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58079.c
@@ -0,0 +1,107 @@
+/* { dg-options "-mlong-calls" { target mips*-*-* } } */
+
+typedef unsigned char u8;
+typedef unsigned short u16;
+typedef unsigned int __kernel_size_t;
+typedef __kernel_size_t size_t;
+struct list_head {
+ struct list_head *next;
+};
+
+struct dmx_ts_feed {
+ int is_filtering;
+};
+struct dmx_section_feed {
+ u16 secbufp;
+ u16 seclen;
+ u16 tsfeedp;
+};
+
+typedef int (*dmx_ts_cb) (
+	const u8 * buffer1,
+      size_t buffer1_length,
+      const u8 * buffer2,
+      size_t buffer2_length
+);
+
+struct dvb_demux_feed {
+ union {
+  struct dmx_ts_feed ts;
+  struct dmx_section_feed sec;
+ } feed;
+ union {
+  dmx_ts_cb ts;
+ } cb;
+ int type;
+ u16 pid;
+ int ts_type;
+ struct list_head list_head;
+};
+
+struct dvb_demux {
+ int (*stop_feed)(struct dvb_demux_feed *feed);
+ struct list_head feed_list;
+};
+
+
+static
+inline
+__attribute__((always_inline))
+u8
+payload(const u8 *tsp)
+{
+ if (tsp[3] & 0x20) {
+   return 184 - 1 - tsp[4];
+ }
+ return 184;
+}
+
+static
+inline
+__attribute__((always_inline))
+int
+dvb_dmx_swfilter_payload(struct dvb_demux_feed *feed, const u8 *buf)
+{
+ int count = payload(buf);
+ int p;
+ if (count == 0)
+  return -1;
+ return feed->cb.ts(&buf[p], count, ((void *)0), 0);
+}
+
+static
+inline
+__attribute__((always_inline))
+void
+dvb_dmx_swfilter_packet_type(struct dvb_demux_feed *feed, const u8 *buf)
+{
+ switch (feed->type) {
+ case 0:
+  if (feed->ts_type & 1) {
+    dvb_dmx_swfilter_payload(feed, buf);
+  }
+  if (dvb_dmx_swfilter_section_packet(feed, buf) < 0)
+   feed->feed.sec.seclen = feed->feed.sec.secbufp = 0;
+ }
+}
+
+static
+void
+dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf)
+{
+ struct dvb_demux_feed *feed;
+ int dvr_done = 0;
+
+ for (feed = ({ const typeof( ((typeof(*feed) *)0)->list_head ) *__mptr = ((&demux->feed_list)->next); (typeof(*feed) *)( (char *)__mptr - __builtin_offsetof(typeof(*feed),list_head) );}); __builtin_prefetch(feed->list_head.next), &feed->list_head != (&demux->feed_list); feed = ({ const typeof( ((typeof(*feed) *)0)->list_head ) *__mptr = (feed->list_head.next); (typeof(*feed) *)( (char *)__mptr - __builtin_offsetof(typeof(*feed),list_head) );})) {
+  if (((((feed)->type == 0) && ((feed)->feed.ts.is_filtering) && (((feed)->ts_type & (1 | 8)) == 1))) && (dvr_done++))
+   dvb_dmx_swfilter_packet_type(feed, buf);
+  else if (feed->pid == 0x2000)
+   feed->cb.ts(buf, 188, ((void *)0), 0);
+ }
+}
+void dvb_dmx_swfilter_packets(struct dvb_demux *demux, const u8 *buf, size_t count)
+{
+ while (count--) {
+   dvb_dmx_swfilter_packet(demux, buf);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58223.c b/gcc/testsuite/gcc.dg/torture/pr58223.c
new file mode 100644
index 0000000..978084a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58223.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+
+extern void abort (void);
+int a[2], b;
+
+int main ()
+{
+  for (b = 0; b < 2; b++)
+    {
+      a[0] = 1;
+      a[b] = 0;
+    }
+  if (a[0] != 1)
+    abort ();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58539.c b/gcc/testsuite/gcc.dg/torture/pr58539.c
new file mode 100644
index 0000000..a016150
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58539.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-g" } */
+
+int a, b;
+
+extern void baz (int);
+
+int foo (int p)
+{
+  return p ? p : 1;
+}
+
+void bar ()
+{
+  int *c = &a, *d = &a;
+  for (b = 0; b < 12; b++)
+    *d |= 1;
+  foo (*c);
+  baz (*c && 1);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58670.c b/gcc/testsuite/gcc.dg/torture/pr58670.c
new file mode 100644
index 0000000..ba9fce7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58670.c
@@ -0,0 +1,47 @@
+/* PR middle-end/58670 */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+
+#if defined (__i386__) || defined (__x86_64__)
+#define ASM_STR "btsl $1, %0; jc %l[lab]"
+#endif
+
+__attribute__((noinline, noclone)) int
+foo (int a, int b)
+{
+  if (a)
+    return -3;
+#ifdef ASM_STR
+  asm volatile goto (ASM_STR : : "m" (b) : "memory" : lab);
+  return 0;
+lab:
+#endif
+  return 0;
+}
+
+int
+bar (int a, int b)
+{
+  if (a)
+    return -3;
+#ifdef ASM_STR
+  asm volatile goto (ASM_STR : : "m" (b) : "memory" : lab);
+  return 0;
+lab:
+#endif
+  return 0;
+}
+
+int
+main ()
+{
+  if (foo (1, 0) != -3
+      || foo (0, 3) != 0
+      || foo (1, 0) != -3
+      || foo (0, 0) != 0
+      || bar (1, 0) != -3
+      || bar (0, 3) != 0
+      || bar (1, 0) != -3
+      || bar (0, 0) != 0)
+    __builtin_abort ();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58779.c b/gcc/testsuite/gcc.dg/torture/pr58779.c
new file mode 100644
index 0000000..b0c0c86
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58779.c
@@ -0,0 +1,12 @@
+/* { dg-do run } */
+
+int a, c;
+
+int main ()
+{
+  int e = -1;
+  short d = (c <= 0) ^ e;
+  if ((unsigned int) a - (a || d) <= (unsigned int) a)
+    __builtin_abort ();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58830.c b/gcc/testsuite/gcc.dg/torture/pr58830.c
new file mode 100644
index 0000000..8081f8b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58830.c
@@ -0,0 +1,42 @@
+/* { dg-do run } */
+/* { dg-additional-options "-ftree-pre -ftree-partial-pre" } */
+
+extern void abort (void);
+
+int b, c, d, f, g, h, i, j[6], *l = &b, *m, n, *o, r; 
+char k;
+
+static int
+foo ()
+{
+  char *p = &k;
+
+  for (; d; d++)
+    if (i)
+      h = 0;
+    else
+      h = c || (r = 0);
+
+  for (f = 0; f < 2; f++)
+    {
+      unsigned int q;
+      *l = 0;
+      if (n)
+	*m = g;
+      if (g)
+	o = 0;
+      for (q = -8; q >= 5; q++)
+	(*p)--;
+    }
+
+  return 0;
+}
+
+int
+main ()
+{
+  foo ();
+  if (j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[0]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ^ (k & 15)] != 0)
+    abort ();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-prof/20041218-1.c b/gcc/testsuite/gcc.dg/tree-prof/20041218-1.c
new file mode 100644
index 0000000..cbd1c7c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/20041218-1.c
@@ -0,0 +1,119 @@
+/* PR rtl-optimization/16968 */
+/* Testcase by Jakub Jelinek  <jakub@redhat.com> */
+/* { dg-require-effective-target freorder } */
+/* { dg-options "-O2 -freorder-blocks-and-partition" } */
+
+struct T
+{
+  unsigned int b, c, *d;
+  unsigned char e;
+};
+struct S
+{
+  unsigned int a;
+  struct T f;
+};
+struct U
+{
+  struct S g, h;
+};
+struct V
+{
+  unsigned int i;
+  struct U j;
+};
+
+extern void exit (int);
+extern void abort (void);
+
+void *
+dummy1 (void *x)
+{
+  return "";
+}
+
+void *
+dummy2 (void *x, void *y)
+{
+  exit (0);
+}
+
+struct V *
+baz (unsigned int x)
+{
+  static struct V v;
+  __builtin_memset (&v, 0x55, sizeof (v));
+  return &v;
+}
+
+int
+check (void *x, struct S *y)
+{
+  if (y->a || y->f.b || y->f.c || y->f.d || y->f.e)
+    abort ();
+  return 1;
+}
+
+static struct V *
+bar (unsigned int x, void *y)
+{
+  const struct T t = { 0, 0, (void *) 0, 0 };
+  struct V *u;
+  void *v;
+  v = dummy1 (y);
+  if (!v)
+    return (void *) 0;
+
+  u = baz (sizeof (struct V));
+  u->i = x;
+  u->j.g.a = 0;
+  u->j.g.f = t;
+  u->j.h.a = 0;
+  u->j.h.f = t;
+
+  if (!check (v, &u->j.g) || !check (v, &u->j.h))
+    return (void *) 0;
+  return u;
+}
+
+int
+foo (unsigned int *x, unsigned int y, void **z)
+{
+  void *v;
+  unsigned int i, j;
+
+  *z = v = (void *) 0;
+
+  for (i = 0; i < y; i++)
+    {
+      struct V *c;
+
+      j = *x;
+
+      switch (j)
+	{
+	case 1:
+	  c = bar (j, x);
+	  break;
+	default:
+	  c = 0;
+	  break;
+	}
+      if (c)
+	v = dummy2 (v, c);
+      else
+        return 1;
+    }
+
+  *z = v;
+  return 0;
+}
+
+int
+main (void)
+{
+  unsigned int one = 1;
+  void *p;
+  foo (&one, 1, &p);
+  abort ();
+}
diff --git a/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c b/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c
new file mode 100644
index 0000000..9dc7566
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c
@@ -0,0 +1,36 @@
+/* Test case to check if function foo gets split and the cold function
+   gets a label.  */
+/* { dg-require-effective-target freorder } */
+/* { dg-options "-O2 -freorder-blocks-and-partition --save-temps" } */
+
+#define SIZE 10000
+
+const char *sarr[SIZE];
+const char *buf_hot;
+const char *buf_cold;
+
+__attribute__((noinline))
+void 
+foo (int path)
+{
+  int i;
+  if (path)
+    {
+      for (i = 0; i < SIZE; i++)
+	sarr[i] = buf_hot;
+    }
+  else
+    {
+      for (i = 0; i < SIZE; i++)
+	sarr[i] = buf_cold;
+    }
+}
+
+int
+main (int argc, char *argv[])
+{
+  buf_hot =  "hello";
+  buf_cold = "world";
+  foo (argc);
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c b/gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c
new file mode 100644
index 0000000..bbfe1f4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c
@@ -0,0 +1,166 @@
+/* { dg-require-effective-target freorder } */
+/* { dg-options "-O2 -freorder-blocks-and-partition" } */
+#include <stdlib.h>
+
+#if !defined(NO_LABEL_VALUES) && (!defined(STACK_SIZE) || STACK_SIZE >= 4000) && __INT_MAX__ >= 2147483647
+typedef unsigned int uint32;
+typedef signed int sint32;
+
+typedef uint32 reg_t;
+
+typedef unsigned long int host_addr_t;
+typedef uint32 target_addr_t;
+typedef sint32 target_saddr_t;
+
+typedef union
+{
+  struct
+    {
+      unsigned int	offset:18;
+      unsigned int	ignore:4;
+      unsigned int	s1:8;
+      int		:2;
+      signed int	simm:14;
+      unsigned int	s3:8;
+      unsigned int	s2:8;
+      int		pad2:2;
+    } f1;
+  long long ll;
+  double d;
+} insn_t;
+
+typedef struct
+{
+  target_addr_t vaddr_tag;
+  unsigned long int rigged_paddr;
+} tlb_entry_t;
+
+typedef struct
+{
+  insn_t *pc;
+  reg_t registers[256];
+  insn_t *program;
+  tlb_entry_t tlb_tab[0x100];
+} environment_t;
+
+enum operations
+{
+  LOAD32_RR,
+  METAOP_DONE
+};
+
+host_addr_t
+f ()
+{
+  abort ();
+}
+
+reg_t
+simulator_kernel (int what, environment_t *env)
+{
+  register insn_t *pc = env->pc;
+  register reg_t *regs = env->registers;
+  register insn_t insn;
+  register int s1;
+  register reg_t r2;
+  register void *base_addr = &&sim_base_addr;
+  register tlb_entry_t *tlb = env->tlb_tab;
+
+  if (what != 0)
+    {
+      int i;
+      static void *op_map[] =
+	{
+	  &&L_LOAD32_RR,
+	  &&L_METAOP_DONE,
+	};
+      insn_t *program = env->program;
+      for (i = 0; i < what; i++)
+	program[i].f1.offset = op_map[program[i].f1.offset] - base_addr;
+    }
+
+ sim_base_addr:;
+
+  insn = *pc++;
+  r2 = (*(reg_t *) (((char *) regs) + (insn.f1.s2 << 2)));
+  s1 = (insn.f1.s1 << 2);
+  goto *(base_addr + insn.f1.offset);
+
+ L_LOAD32_RR:
+  {
+    target_addr_t vaddr_page = r2 / 4096;
+    unsigned int x = vaddr_page % 0x100;
+    insn = *pc++;
+
+    for (;;)
+      {
+	target_addr_t tag = tlb[x].vaddr_tag;
+	host_addr_t rigged_paddr = tlb[x].rigged_paddr;
+
+	if (tag == vaddr_page)
+	  {
+	    *(reg_t *) (((char *) regs) + s1) = *(uint32 *) (rigged_paddr + r2);
+	    r2 = *(reg_t *) (((char *) regs) + (insn.f1.s2 << 2));
+	    s1 = insn.f1.s1 << 2;
+	    goto *(base_addr + insn.f1.offset);
+	  }
+
+	if (((target_saddr_t) tag < 0))
+	  {
+	    *(reg_t *) (((char *) regs) + s1) = *(uint32 *) f ();
+	    r2 = *(reg_t *) (((char *) regs) + (insn.f1.s2 << 2));
+	    s1 = insn.f1.s1 << 2;
+	    goto *(base_addr + insn.f1.offset);
+	  }
+
+	x = (x - 1) % 0x100;
+      }
+
+    L_METAOP_DONE:
+      return (*(reg_t *) (((char *) regs) + s1));
+  }
+}
+
+insn_t program[2 + 1];
+
+void *malloc ();
+
+int
+main ()
+{
+  environment_t env;
+  insn_t insn;
+  int i, res;
+  host_addr_t a_page = (host_addr_t) malloc (2 * 4096);
+  target_addr_t a_vaddr = 0x123450;
+  target_addr_t vaddr_page = a_vaddr / 4096;
+  a_page = (a_page + 4096 - 1) & -4096;
+
+  env.tlb_tab[((vaddr_page) % 0x100)].vaddr_tag = vaddr_page;
+  env.tlb_tab[((vaddr_page) % 0x100)].rigged_paddr = a_page - vaddr_page * 4096;
+  insn.f1.offset = LOAD32_RR;
+  env.registers[0] = 0;
+  env.registers[2] = a_vaddr;
+  *(sint32 *) (a_page + a_vaddr % 4096) = 88;
+  insn.f1.s1 = 0;
+  insn.f1.s2 = 2;
+
+  for (i = 0; i < 2; i++)
+    program[i] = insn;
+
+  insn.f1.offset = METAOP_DONE;
+  insn.f1.s1 = 0;
+  program[2] = insn;
+
+  env.pc = program;
+  env.program = program;
+
+  res = simulator_kernel (2 + 1, &env);
+
+  if (res != 88)
+    abort ();
+  exit (0);
+}
+#else
+main(){ exit (0); }
+#endif
diff --git a/gcc/testsuite/gcc.dg/tree-prof/pr45354.c b/gcc/testsuite/gcc.dg/tree-prof/pr45354.c
index b30ad77..849e786 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/pr45354.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/pr45354.c
@@ -1,5 +1,5 @@
 /* { dg-require-effective-target freorder } */
-/* { dg-options "-O -freorder-blocks-and-partition -fschedule-insns -fselective-scheduling" { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -freorder-blocks-and-partition -fschedule-insns -fselective-scheduling" { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
 
 extern void abort (void);
 
diff --git a/gcc/testsuite/gcc.dg/tree-prof/pr50907.c b/gcc/testsuite/gcc.dg/tree-prof/pr50907.c
index 2ba26e3..b850513 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/pr50907.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/pr50907.c
@@ -1,5 +1,5 @@
 /* PR middle-end/50907 */
 /* { dg-require-effective-target freorder } */
-/* { dg-options "-O -freorder-blocks-and-partition -fschedule-insns -fselective-scheduling -fpic" { target { { powerpc*-*-* ia64-*-* x86_64-*-* } && fpic } } } */
+/* { dg-options "-O2 -freorder-blocks-and-partition -fschedule-insns -fselective-scheduling -fpic" { target { { powerpc*-*-* ia64-*-* x86_64-*-* } && fpic } } } */
 
 #include "pr45354.c"
diff --git a/gcc/testsuite/gcc.dg/tree-prof/pr52027.c b/gcc/testsuite/gcc.dg/tree-prof/pr52027.c
index c12f8b4..c46a14b 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/pr52027.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/pr52027.c
@@ -1,6 +1,6 @@
 /* PR debug/52027 */
 /* { dg-require-effective-target freorder } */
-/* { dg-options "-O -freorder-blocks-and-partition -fno-reorder-functions" } */
+/* { dg-options "-O2 -freorder-blocks-and-partition -fno-reorder-functions" } */
 
 void
 foo (int len)
diff --git a/gcc/testsuite/gcc.dg/tree-prof/va-arg-pack-1.c b/gcc/testsuite/gcc.dg/tree-prof/va-arg-pack-1.c
new file mode 100644
index 0000000..8d17dbf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/va-arg-pack-1.c
@@ -0,0 +1,145 @@
+/* __builtin_va_arg_pack () builtin tests.  */
+/* { dg-require-effective-target freorder } */
+/* { dg-options "-O2 -freorder-blocks-and-partition" } */
+
+#include <stdarg.h>
+
+extern void abort (void);
+
+int v1 = 8;
+long int v2 = 3;
+void *v3 = (void *) &v2;
+struct A { char c[16]; } v4 = { "foo" };
+long double v5 = 40;
+char seen[20];
+int cnt;
+
+__attribute__ ((noinline)) int
+foo1 (int x, int y, ...)
+{
+  int i;
+  long int l;
+  void *v;
+  struct A a;
+  long double ld;
+  va_list ap;
+
+  va_start (ap, y);
+  if (x < 0 || x >= 20 || seen[x])
+    abort ();
+  seen[x] = ++cnt;
+  if (y != 6)
+    abort ();
+  i = va_arg (ap, int);
+  if (i != 5)
+    abort ();
+  switch (x)
+    {
+    case 0:
+      i = va_arg (ap, int);
+      if (i != 9 || v1 != 9)
+	abort ();
+      a = va_arg (ap, struct A);
+      if (__builtin_memcmp (a.c, v4.c, sizeof (a.c)) != 0)
+	abort ();
+      v = (void *) va_arg (ap, struct A *);
+      if (v != (void *) &v4)
+	abort ();
+      l = va_arg (ap, long int);
+      if (l != 3 || v2 != 4)
+	abort ();
+      break;
+    case 1:
+      ld = va_arg (ap, long double);
+      if (ld != 41 || v5 != ld)
+	abort ();
+      i = va_arg (ap, int);
+      if (i != 8)
+	abort ();
+      v = va_arg (ap, void *);
+      if (v != &v2)
+	abort ();
+      break;
+    case 2:
+      break;
+    default:
+      abort ();
+    }
+  va_end (ap);
+  return x;
+}
+
+__attribute__ ((noinline)) int
+foo2 (int x, int y, ...)
+{
+  long long int ll;
+  void *v;
+  struct A a, b;
+  long double ld;
+  va_list ap;
+
+  va_start (ap, y);
+  if (x < 0 || x >= 20 || seen[x])
+    abort ();
+  seen[x] = ++cnt | 64;
+  if (y != 10)
+    abort ();
+  switch (x)
+    {
+    case 11:
+      break;
+    case 12:
+      ld = va_arg (ap, long double);
+      if (ld != 41 || v5 != 40)
+	abort ();
+      a = va_arg (ap, struct A);
+      if (__builtin_memcmp (a.c, v4.c, sizeof (a.c)) != 0)
+	abort ();
+      b = va_arg (ap, struct A);
+      if (__builtin_memcmp (b.c, v4.c, sizeof (b.c)) != 0)
+	abort ();
+      v = va_arg (ap, void *);
+      if (v != &v2)
+	abort ();
+      ll = va_arg (ap, long long int);
+      if (ll != 16LL)
+	abort ();
+      break;
+    case 2:
+      break;
+    default:
+      abort ();
+    }
+  va_end (ap);
+  return x + 8;
+}
+
+__attribute__ ((noinline)) int
+foo3 (void)
+{
+  return 6;
+}
+
+extern inline __attribute__ ((always_inline, gnu_inline)) int
+bar (int x, ...)
+{
+  if (x < 10)
+    return foo1 (x, foo3 (), 5, __builtin_va_arg_pack ());
+  return foo2 (x, foo3 () + 4, __builtin_va_arg_pack ());
+}
+
+int
+main (void)
+{
+  if (bar (0, ++v1, v4, &v4, v2++) != 0)
+    abort ();
+  if (bar (1, ++v5, 8, v3) != 1)
+    abort ();
+  if (bar (2) != 2)
+    abort ();
+  if (bar (v1 + 2) != 19)
+    abort ();
+  if (bar (v1 + 3, v5--, v4, v4, v3, 16LL) != 20)
+    abort ();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_1.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_1.c
index 60baa4b..5db06a5 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target {{ i?86-*-* x86_64-*-* } && lp64 } } } */
-/* { dg-options "-O2 -m64 -fdump-tree-ivopts" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -m64 -fdump-tree-ivopts" } */
 #define TYPE char*
 
 /* Testing that only one induction variable is selected after IVOPT on
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_2.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_2.c
index ba87b50..bb3f7f4 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_2.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target {{ i?86-*-* x86_64-*-* } && lp64 } } } */
-/* { dg-options "-O2 -m64 -fdump-tree-ivopts" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -m64 -fdump-tree-ivopts" } */
 
 #define TYPE char*
 
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_4.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_4.c
index 570664c9..d7b21fe 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_4.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target {{ i?86-*-* x86_64-*-* } && lp64 } } } */
-/* { dg-options "-O2 -m64 -fdump-tree-ivopts" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -m64 -fdump-tree-ivopts" } */
 
 #ifndef TYPE
 #define TYPE char*
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_5.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_5.c
new file mode 100644
index 0000000..42cbf74
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_5.c
@@ -0,0 +1,21 @@
+/* { dg-do compile { target {{ i?86-*-* x86_64-*-* } && lp64 } } } */
+/* { dg-options "-O2 -m64 -fdump-tree-ivopts-details" } */
+
+/* Make sure only one iv is selected after IVOPT.  */
+
+#include <x86intrin.h>
+extern __m128i arr[], d[];
+void test (void)
+{
+    unsigned int b;
+    for (b = 0; b < 1000; b += 2) {
+      __m128i *p = (__m128i *)(&d[b]);
+      __m128i a = _mm_load_si128(&arr[4*b+3]);
+      __m128i v = _mm_loadu_si128(p);
+      v = _mm_xor_si128(v, a);
+      _mm_storeu_si128(p, v);
+    }
+}
+
+/* { dg-final { scan-tree-dump-times "PHI <ivtmp" 1 "ivopts"} } */
+/* { dg-final { cleanup-tree-dump "ivopts" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_infer_2.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_infer_2.c
index 4c5a54b..c0f6398 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_infer_2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_infer_2.c
@@ -7,7 +7,8 @@
 
 extern char a[];
 
-/* Can not infer loop iteration from array -- exit test can not be replaced.  */
+/* Can not infer loop iteration from array -- exit test can not be
+   replaced by the array address.  */
 void foo (unsigned int i_width, TYPE dst)
 {
   unsigned long long i = 0;
@@ -21,5 +22,5 @@
     }
 }
 
-/* { dg-final { scan-tree-dump-times "Replacing" 0 "ivopts"} } */
+/* { dg-final { scan-tree-dump-times "\[^:\]*if \\(.*j_\[0-9\]+.*\\)" 1 "ivopts"} } */
 /* { dg-final { cleanup-tree-dump "ivopts" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_1.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_1.c
index 4e19dfd..b4566bd 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_1.c
@@ -20,5 +20,5 @@
   return s;
 }
 
-/* { dg-final { scan-tree-dump-times "Replacing" 1 "ivopts"} } */
+/* { dg-final { scan-tree-dump-times "Replacing" 2 "ivopts"} } */
 /* { dg-final { cleanup-tree-dump "ivopts" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_3.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_3.c
index dc78a43..25ae845 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_3.c
@@ -18,5 +18,5 @@
   return s;
 }
 
-/* { dg-final { scan-tree-dump-times "Replacing" 1 "ivopts"} } */
+/* { dg-final { scan-tree-dump-times "Replacing exit test: if \\(.*p2.*\\)" 1 "ivopts"} } */
 /* { dg-final { cleanup-tree-dump "ivopts" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_4.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_4.c
index d2aa78d..b02e0d3 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_4.c
@@ -21,5 +21,5 @@
   return s;
 }
 
-/* { dg-final { scan-tree-dump-times "Replacing" 0 "ivopts"} } */
+/* { dg-final { scan-tree-dump-times "Replacing" 1 "ivopts"} } */
 /* { dg-final { cleanup-tree-dump "ivopts" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopts-lt.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopts-lt.c
index 5188fed..d1e03e3 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ivopts-lt.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopts-lt.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-ivopts" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -fdump-tree-ivopts" } */
 /* { dg-require-effective-target stdint_types } */
 
 #include "stdint.h"
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-16.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-16.c
index a26999e..53a9fa4 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ldist-16.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-16.c
@@ -14,8 +14,8 @@
     }
 }
 
-/* We should apply loop distribution and generate a memset (0).  */
+/* We should not apply loop distribution and not generate a memset (0).  */
 
-/* { dg-final { scan-tree-dump "distributed: split to 2" "ldist" } } */
-/* { dg-final { scan-tree-dump-times "generated memset zero" 1 "ldist" } } */
+/* { dg-final { scan-tree-dump "Loop 1 is the same" "ldist" } } */
+/* { dg-final { scan-tree-dump-times "generated memset zero" 0 "ldist" } } */
 /* { dg-final { cleanup-tree-dump "ldist" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-16.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-16.c
index 50fa333..4b41ebe 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-16.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-16.c
@@ -2,7 +2,7 @@
    at most 100 times, thus the (32-bit) induction variables do not overflow,
    and we may use 64-bit variable to represent them.  */
 
-/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -fdump-tree-optimized" } */
 /* { dg-do compile { target x86_64-*-* } } */
 
 unsigned a[100];
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
index 3426827..f43a6d8 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
@@ -27,7 +27,7 @@
 
 /* { dg-final { scan-tree-dump-times " \\* \[^\\n\\r\]*=" 0 "optimized" } } */
 /* { dg-final { scan-tree-dump-times "\[^\\n\\r\]*= \\* " 0 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "MEM\\\[base" 1 "optimized" } } */
 
 /* 17 * iter should be strength reduced.  */
 
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-28.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-28.c
index 479355e..535324f 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-28.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-28.c
@@ -14,7 +14,13 @@
 /* There should be 64 MEMs in the unrolled loop and one more in the copy of the loop
    for the rest of the iterations.  */
 
-/* { dg-final { scan-tree-dump-times "MEM" 65 "optimized" } } */
+/* We generate prefetch(addr) as:
+   tmp = &MEM(addr);
+   prefetch(tmp);
+   to let ivopt understand the memory access mode better, so there is another MEM in
+   unrolled loop.  */
+
+/* { dg-final { scan-tree-dump-times "MEM" 66 "optimized" } } */
 
 /* There should be no i_a = i_b assignments.  */
 /* { dg-final { scan-tree-dump-times "i_.*= i_\[0-9\]*;" 0 "aprefetch" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
index a6c8c8f..4313fca 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
@@ -37,7 +37,7 @@
 
 /* { dg-final { scan-tree-dump-times " \\* \[^\\n\\r\]*=" 0 "optimized" } } */
 /* { dg-final { scan-tree-dump-times "\[^\\n\\r\]*= \\* " 0 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " MEM" 1 "optimized" } } */
 
 /* And the original induction variable should be eliminated.  */
 
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predcom-1.c b/gcc/testsuite/gcc.dg/tree-ssa/predcom-1.c
index f1e52e5..b4490d5 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/predcom-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/predcom-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-do run } */
-/* { dg-options "-O2 -funroll-loops --param max-unroll-times=8 -fpredictive-commoning -fdump-tree-pcom-details" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -funroll-loops --param max-unroll-times=8 -fpredictive-commoning -fdump-tree-pcom-details" } */
 
 void abort (void);
 
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predcom-4.c b/gcc/testsuite/gcc.dg/tree-ssa/predcom-4.c
index c29a46a..3164c45 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/predcom-4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/predcom-4.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-do run } */
-/* { dg-options "-O2 -funroll-loops --param max-unroll-times=8 -fpredictive-commoning -fdump-tree-pcom-details" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -funroll-loops --param max-unroll-times=8 -fpredictive-commoning -fdump-tree-pcom-details" } */
 
 /* Test for predictive commoning of expressions, without reassociation.  */
 
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predcom-5.c b/gcc/testsuite/gcc.dg/tree-ssa/predcom-5.c
index 29444ab..b830c4d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/predcom-5.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/predcom-5.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-do run } */
-/* { dg-options "-O2 -funroll-loops --param max-unroll-times=8 -fpredictive-commoning -fdump-tree-pcom-details" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -funroll-loops --param max-unroll-times=8 -fpredictive-commoning -fdump-tree-pcom-details" } */
 
 /* Test for predictive commoning of expressions, with reassociation.  */
 
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c b/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c
index 5c469ba..3af204a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c
@@ -1,7 +1,7 @@
 /* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
 /* { dg-require-effective-target sse2 } */
 /* { 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 -fdump-tree-aprefetch-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -fprefetch-loop-arrays -march=athlon -msse2 -mfpmath=sse --param simultaneous-prefetches=100 -fdump-tree-aprefetch-details -fdump-tree-optimized" } */
 
 #define K 1000000
 int a[K];
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/prefetch-8.c b/gcc/testsuite/gcc.dg/tree-ssa/prefetch-8.c
index 705d35f..31dc314 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/prefetch-8.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/prefetch-8.c
@@ -1,7 +1,7 @@
 /* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
 /* { dg-require-effective-target sse2 } */
 /* { 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 -fdump-tree-aprefetch-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -fprefetch-loop-arrays -march=athlon -msse2 -mfpmath=sse --param simultaneous-prefetches=100 -fdump-tree-aprefetch-details -fdump-tree-optimized" } */
 
 #define K 1000000
 int a[K];
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/prefetch-9.c b/gcc/testsuite/gcc.dg/tree-ssa/prefetch-9.c
index f78bea3..afbb8a0 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/prefetch-9.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/prefetch-9.c
@@ -1,7 +1,7 @@
 /* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
 /* { dg-require-effective-target sse2 } */
 /* { 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 -fdump-tree-aprefetch-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -fprefetch-loop-arrays -march=athlon -msse2 -mfpmath=sse --param simultaneous-prefetches=100 -fdump-tree-aprefetch-details -fdump-tree-optimized" } */
 
 #define K 1000000
 int a[K], b[K];
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-3.c
index d67f869..15e59c7 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-3.c
@@ -42,7 +42,7 @@
     abort ();
 }
 /* We should thread the jump, through an intermediate block.  */
-/* { dg-final { scan-tree-dump-times "Threaded" 1 "dom1"} } */
+/* { dg-final { scan-tree-dump-times "Threaded" 2 "dom1"} } */
 /* { dg-final { scan-tree-dump-times "one or more intermediate" 1 "dom1"} } */
 /* { dg-final { cleanup-tree-dump "dom1" } } */
 
diff --git a/gcc/testsuite/gcc.dg/var-expand1.c b/gcc/testsuite/gcc.dg/var-expand1.c
index a784ea1..b4580ea 100644
--- a/gcc/testsuite/gcc.dg/var-expand1.c
+++ b/gcc/testsuite/gcc.dg/var-expand1.c
@@ -2,7 +2,7 @@
 /* We don't (and don't want to) perform this optimisation on soft-float
    targets, where each addition is a library call.  */
 /* { dg-require-effective-target hard_float } */
-/* { dg-options "-O2 -funroll-loops --fast-math -fvariable-expansion-in-unroller -fdump-rtl-loop2_unroll" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -funroll-loops --fast-math -fvariable-expansion-in-unroller -fdump-rtl-loop2_unroll" } */
 
 extern void abort (void);
 
diff --git a/gcc/testsuite/gcc.misc-tests/help.exp b/gcc/testsuite/gcc.misc-tests/help.exp
index 20153d1..5e36213 100644
--- a/gcc/testsuite/gcc.misc-tests/help.exp
+++ b/gcc/testsuite/gcc.misc-tests/help.exp
@@ -55,7 +55,7 @@
 check_for_options c "--help=warnings,^joined,^undocumented" "" "" ""
 check_for_options c "-Q -O2 --help=optimizers" {
 -O
--ftree-loop-vectorize[^\n]*disabled
+-ftree-loop-vectorize[^\n]*enabled
 } "  -g  " ""
 check_for_options c "-Q -O3 --help=optimizers" {
 -O
diff --git a/gcc/testsuite/gcc.target/aarch64/pr58460.c b/gcc/testsuite/gcc.target/aarch64/pr58460.c
new file mode 100644
index 0000000..a7e149a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr58460.c
@@ -0,0 +1,35 @@
+/* { dg-do run } */
+/* { dg-options "-O" } */
+extern unsigned long x1;
+
+char *
+f (char *a, char *b)
+{
+  return a;
+}
+
+int
+g (char *a)
+{
+  return 2;
+}
+
+void
+h (char *p[])
+{
+  char n[x1][512];
+  char *l = f (p[1], " ");
+  if (g (p[0]))
+    n[0][0] = '\0';
+  while (l && *l)
+    {
+    }
+}
+
+unsigned long x1;
+
+int
+main ()
+{
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c b/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c
new file mode 100644
index 0000000..bd85e86
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-g -fPIC" } */
+
+void *v;
+void a (void *x) { }
+void b (void) { }
+                       /* line 7.  */
+int                    /* line 8.  */
+main (int argc)        /* line 9.  */
+{                      /* line 10.  */
+  if (argc == 12345)   /* line 11.  */
+    {
+      a (v);
+      return 1;
+    }
+  b ();
+
+  return 0;
+}
+
+/* { dg-final { scan-assembler-not "\.loc 1 7 0" } } */
+/* { dg-final { scan-assembler-not "\.loc 1 8 0" } } */
+/* { dg-final { scan-assembler-not "\.loc 1 9 0" } } */
+
+/* The loc at the start of the prologue.  */
+/* { dg-final { scan-assembler-times "\.loc 1 10 0" 1 } } */
+
+/* The loc at the end of the prologue, with the first user line.  */
+/* { dg-final { scan-assembler-times "\.loc 1 11 0" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c
index 238f020..2ff5a66 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c
@@ -8,5 +8,5 @@
 
 #include "avx2-vpop-check.h"
 
-/* { dg-final { scan-assembler-times "vpaddb\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler "vpaddb\[ \\t\]+\[^\n\]*%ymm\[0-9\]" } } */
 /* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c
index facee9f..dc524ee 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c
@@ -8,5 +8,5 @@
 
 #include "avx2-vpop-check.h"
 
-/* { dg-final { scan-assembler-times "vpaddw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler "vpaddw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" } } */
 /* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c
index 46d173f..bf0870e 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c
@@ -8,5 +8,5 @@
 
 #include "avx2-vpop-check.h"
 
-/* { dg-final { scan-assembler-times "vpmullw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler "vpmullw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" } } */
 /* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c
index e711256..b566024 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c
@@ -8,5 +8,5 @@
 
 #include "avx2-vpop-check.h"
 
-/* { dg-final { scan-assembler-times "vpsraw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler "vpsraw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" } } */
 /* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c
index 67f3afc..54d1572 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c
@@ -8,5 +8,5 @@
 
 #include "avx2-vpop-check.h"
 
-/* { dg-final { scan-assembler-times "vpsrlw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler "vpsrlw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" } } */
 /* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c
index 843128b..73882ca 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c
@@ -8,5 +8,5 @@
 
 #include "avx2-vpop-check.h"
 
-/* { dg-final { scan-assembler-times "vpsubb\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler "vpsubb\[ \\t\]+\[^\n\]*%ymm\[0-9\]" } } */
 /* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c
index 1cb90b5..b093d6f 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c
@@ -8,5 +8,5 @@
 
 #include "avx2-vpop-check.h"
 
-/* { dg-final { scan-assembler-times "vpsubw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler "vpsubw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" } } */
 /* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/i386/bmi-andn-1a.c b/gcc/testsuite/gcc.target/i386/bmi-andn-1a.c
index a7ee076..6a0fe15 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-andn-1a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-andn-1a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mbmi -fno-inline -dp" } */
+/* { dg-options "-O2 -mbmi -fno-inline -dp --param max-default-completely-peeled-insns=0" } */
 
 #include "bmi-andn-1.c"
 
diff --git a/gcc/testsuite/gcc.target/i386/bmi-andn-2a.c b/gcc/testsuite/gcc.target/i386/bmi-andn-2a.c
index 72fe026..c7a895c 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-andn-2a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-andn-2a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mbmi -fno-inline -dp" } */
+/* { dg-options "-O2 -mbmi -fno-inline -dp  --param max-default-completely-peeled-insns=0" } */
 
 #include "bmi-andn-2.c"
 
diff --git a/gcc/testsuite/gcc.target/i386/bmi-bextr-1a.c b/gcc/testsuite/gcc.target/i386/bmi-bextr-1a.c
index 4ccfbdc..8dbf1eb 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-bextr-1a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-bextr-1a.c
@@ -3,4 +3,4 @@
 
 #include "bmi-bextr-1.c"
 
-/* { dg-final { scan-assembler-times "bmi_bextr_di" 1 } } */
+/* { dg-final { scan-assembler "bmi_bextr_di" } } */
diff --git a/gcc/testsuite/gcc.target/i386/bmi-bextr-2a.c b/gcc/testsuite/gcc.target/i386/bmi-bextr-2a.c
index 282a3e4..da47610 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-bextr-2a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-bextr-2a.c
@@ -3,4 +3,4 @@
 
 #include "bmi-bextr-2.c"
 
-/* { dg-final { scan-assembler-times "bmi_bextr_si" 1 } } */
+/* { dg-final { scan-assembler "bmi_bextr_si" } } */
diff --git a/gcc/testsuite/gcc.target/i386/bmi-blsi-1a.c b/gcc/testsuite/gcc.target/i386/bmi-blsi-1a.c
index e9e0ecb..ab52571 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-blsi-1a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-blsi-1a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mbmi -fno-inline -dp" } */
+/* { dg-options "-O2 -mbmi -fno-inline -dp --param max-default-completely-peeled-insns=0" } */
 
 #include "bmi-blsi-1.c"
 
diff --git a/gcc/testsuite/gcc.target/i386/bmi-blsi-2a.c b/gcc/testsuite/gcc.target/i386/bmi-blsi-2a.c
index be9ca3f..ccca576 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-blsi-2a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-blsi-2a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mbmi -fno-inline -dp" } */
+/* { dg-options "-O2 -mbmi -fno-inline -dp --param max-default-completely-peeled-insns=0" } */
 
 #include "bmi-blsi-2.c"
 
diff --git a/gcc/testsuite/gcc.target/i386/bmi-blsmsk-1a.c b/gcc/testsuite/gcc.target/i386/bmi-blsmsk-1a.c
index 4e6cb7b..c75f33c 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-blsmsk-1a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-blsmsk-1a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mbmi -fno-inline -dp" } */
+/* { dg-options "-O2 -mbmi -fno-inline -dp  --param max-default-completely-peeled-insns=0" } */
 
 #include "bmi-blsmsk-1.c"
 
diff --git a/gcc/testsuite/gcc.target/i386/bmi-blsmsk-2a.c b/gcc/testsuite/gcc.target/i386/bmi-blsmsk-2a.c
index f6f6bab..7d3597d 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-blsmsk-2a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-blsmsk-2a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mbmi -fno-inline -dp" } */
+/* { dg-options "-O2 -mbmi -fno-inline -dp  --param max-default-completely-peeled-insns=0" } */
 
 #include "bmi-blsmsk-2.c"
 
diff --git a/gcc/testsuite/gcc.target/i386/bmi-blsr-1a.c b/gcc/testsuite/gcc.target/i386/bmi-blsr-1a.c
index 79241ca..736997d 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-blsr-1a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-blsr-1a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mbmi -fno-inline -dp" } */
+/* { dg-options "-O2 -mbmi -fno-inline -dp  --param max-default-completely-peeled-insns=0" } */
 
 #include "bmi-blsr-1.c"
 
diff --git a/gcc/testsuite/gcc.target/i386/bmi-blsr-2a.c b/gcc/testsuite/gcc.target/i386/bmi-blsr-2a.c
index d88c16e..6f6b67f 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-blsr-2a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-blsr-2a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mbmi -fno-inline -dp" } */
+/* { dg-options "-O2 -mbmi -fno-inline -dp  --param max-default-completely-peeled-insns=0" } */
 
 #include "bmi-blsr-2.c"
 
diff --git a/gcc/testsuite/gcc.target/i386/bmi-tzcnt-1a.c b/gcc/testsuite/gcc.target/i386/bmi-tzcnt-1a.c
index e283c31..cd469a7 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-tzcnt-1a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-tzcnt-1a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mbmi -fno-inline" } */
+/* { dg-options "-O2 -mbmi -fno-inline --param max-default-completely-peeled-insns=0" } */
 
 #include "bmi-tzcnt-1.c"
 
diff --git a/gcc/testsuite/gcc.target/i386/bmi-tzcnt-2a.c b/gcc/testsuite/gcc.target/i386/bmi-tzcnt-2a.c
index 2cdb3f4..b60a5a1 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-tzcnt-2a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-tzcnt-2a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mbmi -fno-inline" } */
+/* { dg-options "-O2 -mbmi -fno-inline --param max-default-completely-peeled-insns=0" } */
 
 #include "bmi-tzcnt-2.c"
 
diff --git a/gcc/testsuite/gcc.target/i386/bmi2-bzhi32-1a.c b/gcc/testsuite/gcc.target/i386/bmi2-bzhi32-1a.c
index 05be7a8..64be3ba 100644
--- a/gcc/testsuite/gcc.target/i386/bmi2-bzhi32-1a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi2-bzhi32-1a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mbmi2 -O2 -dp" } */
+/* { dg-options "-mbmi2 -O2 -dp --param max-default-completely-peeled-insns=0" } */
 
 #include "bmi2-bzhi32-1.c"
 
diff --git a/gcc/testsuite/gcc.target/i386/bmi2-bzhi64-1a.c b/gcc/testsuite/gcc.target/i386/bmi2-bzhi64-1a.c
index dc4a94c..08fee20 100644
--- a/gcc/testsuite/gcc.target/i386/bmi2-bzhi64-1a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi2-bzhi64-1a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-mbmi2 -O2 -dp" } */
+/* { dg-options "-mbmi2 -O2 -dp --param max-default-completely-peeled-insns=0" } */
 
 #include "bmi2-bzhi64-1.c"
 
diff --git a/gcc/testsuite/gcc.target/i386/bmi2-pdep32-1a.c b/gcc/testsuite/gcc.target/i386/bmi2-pdep32-1a.c
index 87888fc..7e52898 100644
--- a/gcc/testsuite/gcc.target/i386/bmi2-pdep32-1a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi2-pdep32-1a.c
@@ -3,4 +3,4 @@
 
 #include "bmi2-pdep32-1.c"
 
-/* { dg-final { scan-assembler-times "bmi2_pdep_si3" 1 } } */
+/* { dg-final { scan-assembler "bmi2_pdep_si3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/bmi2-pdep64-1a.c b/gcc/testsuite/gcc.target/i386/bmi2-pdep64-1a.c
index 8163c40..24238ca 100644
--- a/gcc/testsuite/gcc.target/i386/bmi2-pdep64-1a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi2-pdep64-1a.c
@@ -3,4 +3,4 @@
 
 #include "bmi2-pdep64-1.c"
 
-/* { dg-final { scan-assembler-times "bmi2_pdep_di3" 1 } } */
+/* { dg-final { scan-assembler "bmi2_pdep_di3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/bmi2-pext32-1a.c b/gcc/testsuite/gcc.target/i386/bmi2-pext32-1a.c
index c4a6dee..5d908b3 100644
--- a/gcc/testsuite/gcc.target/i386/bmi2-pext32-1a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi2-pext32-1a.c
@@ -3,4 +3,4 @@
 
 #include "bmi2-pext32-1.c"
 
-/* { dg-final { scan-assembler-times "bmi2_pext_si3" 1 } } */
+/* { dg-final { scan-assembler "bmi2_pext_si3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/bmi2-pext64-1a.c b/gcc/testsuite/gcc.target/i386/bmi2-pext64-1a.c
index aaf06c1..c4fb99c 100644
--- a/gcc/testsuite/gcc.target/i386/bmi2-pext64-1a.c
+++ b/gcc/testsuite/gcc.target/i386/bmi2-pext64-1a.c
@@ -3,4 +3,4 @@
 
 #include "bmi2-pext64-1.c"
 
-/* { dg-final { scan-assembler-times "bmi2_pext_di3" 1 } } */
+/* { dg-final { scan-assembler "bmi2_pext_di3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/cadd.c b/gcc/testsuite/gcc.target/i386/cadd.c
index 7a39c67..32036e1 100644
--- a/gcc/testsuite/gcc.target/i386/cadd.c
+++ b/gcc/testsuite/gcc.target/i386/cadd.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=k8" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -march=k8" } */
 /* { dg-final { scan-assembler "sbb" } } */
 
 extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/i386/pr30315.c b/gcc/testsuite/gcc.target/i386/pr30315.c
index 998d507..557b4f7 100644
--- a/gcc/testsuite/gcc.target/i386/pr30315.c
+++ b/gcc/testsuite/gcc.target/i386/pr30315.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
-/* { dg-final { scan-assembler-times "cmp" 4 } } */
+/* { dg-final { scan-assembler-not "cmp" } } */
 
 extern void abort (void);
 int c;
@@ -34,39 +34,10 @@
 }
 #define PLUSCCONLY(T, t) PLUSCCONLY1(T, t, a) PLUSCCONLY1(T, t, b)
 
-#define MINUSCC(T, t)	\
-T minuscc##t (T a, T b)	\
-{	\
-  T difference = a - b;	\
-  if (difference > a)	\
-    abort ();		\
-  return difference;	\
-}
-
-#define DECCC(T, t)	\
-T deccc##t (T a, T b)	\
-{	\
-  T difference = a - b;	\
-  if (difference > a)	\
-    c --;		\
-  return difference;	\
-}
-
-#define MINUSCCONLY(T, t)	\
-void minuscconly##t (T a, T b)	\
-{	\
-  T difference = a - b;	\
-  if (difference > a)	\
-    abort ();		\
-}
-
 #define TEST(T, t)	\
   PLUSCC(T, t)		\
   PLUSCCONLY(T, t)	\
-  INCCC(T, t)		\
-  MINUSCC(T, t)		\
-  MINUSCCONLY(T, t)	\
-  DECCC(T, t)
+  INCCC(T, t)
 
 TEST (unsigned long,  l)
 TEST (unsigned int,   i)
@@ -84,14 +55,3 @@
 
 PLUSCCZEXT(a)
 PLUSCCZEXT(b)
-
-#define MINUSCCZEXT	\
-unsigned long minuscczext (unsigned int a, unsigned int b)	\
-{	\
-  unsigned int difference = a - b;	\
-  if (difference > a)		\
-    abort ();			\
-  return difference;		\
-}
-
-MINUSCCZEXT
diff --git a/gcc/testsuite/gcc.target/i386/pr50038.c b/gcc/testsuite/gcc.target/i386/pr50038.c
index e111574..8ec601d 100644
--- a/gcc/testsuite/gcc.target/i386/pr50038.c
+++ b/gcc/testsuite/gcc.target/i386/pr50038.c
@@ -1,5 +1,5 @@
 /* PR target/50038 */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize" } */
 
 void
 test (int len, unsigned char *in, unsigned char *out)
diff --git a/gcc/testsuite/gcc.target/i386/pr58690.c b/gcc/testsuite/gcc.target/i386/pr58690.c
new file mode 100644
index 0000000..87a87cc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr58690.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
+/* { dg-options "-O2 -mx32 -maddress-mode=short" } */
+
+struct gomp_thread
+{
+  char foo[41];
+};
+extern __thread struct gomp_thread gomp_tls_data;
+void
+foo (void)
+{
+  __builtin_memset (&gomp_tls_data, '\0', sizeof (gomp_tls_data));
+}
diff --git a/gcc/testsuite/gcc.target/i386/recip-vec-sqrtf-avx.c b/gcc/testsuite/gcc.target/i386/recip-vec-sqrtf-avx.c
index 9cf3cc8..efc73f9 100644
--- a/gcc/testsuite/gcc.target/i386/recip-vec-sqrtf-avx.c
+++ b/gcc/testsuite/gcc.target/i386/recip-vec-sqrtf-avx.c
@@ -31,4 +31,4 @@
    r[i] = sqrtf (a[i]);
 }
 
-/* { dg-final { scan-assembler-times "vrsqrtps\[ \\t\]+\[^\n\]*%ymm" 3 } } */
+/* { dg-final { scan-assembler "vrsqrtps\[ \\t\]+\[^\n\]*%ymm" } } */
diff --git a/gcc/testsuite/gcc.target/i386/wmul-1.c b/gcc/testsuite/gcc.target/i386/wmul-1.c
index 4ef8385..b8fd06a 100644
--- a/gcc/testsuite/gcc.target/i386/wmul-1.c
+++ b/gcc/testsuite/gcc.target/i386/wmul-1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize" } */
 /* { dg-require-effective-target ia32 } */
 
 long long mac(const int *a, const int *b, long long sqr, long long *sum)
diff --git a/gcc/testsuite/gcc.target/powerpc/pr58330.c b/gcc/testsuite/gcc.target/powerpc/pr58330.c
new file mode 100644
index 0000000..76983dd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr58330.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O -mno-popcntb" } */
+/* { dg-final { scan-assembler-not "stwbrx" } } */
+
+void
+write_reverse (unsigned long *addr, unsigned long val)
+{
+  unsigned long reverse = __builtin_bswap64 (val);
+  __atomic_store_n (addr, reverse, __ATOMIC_RELAXED);
+}
diff --git a/gcc/testsuite/gcc.target/s390/htm-1.c b/gcc/testsuite/gcc.target/s390/htm-1.c
new file mode 100644
index 0000000..245ba2c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/htm-1.c
@@ -0,0 +1,73 @@
+/* This checks the availability of the low-level builtins introduced
+   for transactional execution.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -march=zEC12 -mzarch" } */
+
+#include <stdint.h>
+#include <htmintrin.h>
+
+int global = 0;
+uint64_t g;
+struct __htm_tdb global_tdb;
+
+int
+foo (struct __htm_tdb* tdb, int reg, int *mem, uint64_t *mem64)
+{
+
+  int cc;
+  int n;
+
+  cc = __builtin_tbegin (0);
+  cc = __builtin_tbegin (tdb);
+  cc = __builtin_tbegin (&global_tdb);
+
+  cc = __builtin_tbegin_nofloat (0);
+  cc = __builtin_tbegin_nofloat (&global_tdb);
+
+  cc = __builtin_tbegin_retry (0, 42);
+  cc = __builtin_tbegin_retry (0, reg);
+  cc = __builtin_tbegin_retry (0, *mem);
+  cc = __builtin_tbegin_retry (0, global);
+  cc = __builtin_tbegin_retry (tdb, 42);
+  cc = __builtin_tbegin_retry (&global_tdb, 42);
+
+  cc = __builtin_tbegin_retry_nofloat (0, 42);
+  cc = __builtin_tbegin_retry_nofloat (0, reg);
+  cc = __builtin_tbegin_retry_nofloat (0, *mem);
+  cc = __builtin_tbegin_retry_nofloat (0, global);
+  cc = __builtin_tbegin_retry_nofloat (&global_tdb, 42);
+
+  __builtin_tbeginc ();
+
+  n = __builtin_tx_nesting_depth();
+
+  __builtin_non_tx_store(&g, 23);
+  __builtin_non_tx_store(mem64, 23);
+  __builtin_non_tx_store(&g, reg);
+  __builtin_non_tx_store(&g, *mem);
+  __builtin_non_tx_store(&g, global);
+
+  __builtin_tabort (42 + 255);
+  __builtin_tabort (reg);
+  /* { dg-final { scan-assembler-times "tabort\t255" 1 } } */
+  __builtin_tabort (reg + 255);
+  __builtin_tabort (*mem);
+  __builtin_tabort (global);
+  /* Here global + 255 gets reloaded into a reg.  Better would be to
+     just reload global or *mem and get the +255 for free as address
+     arithmetic.  */
+  __builtin_tabort (*mem + 255);
+  __builtin_tabort (global + 255);
+
+  __builtin_tend();
+
+  __builtin_tx_assist (23);
+  __builtin_tx_assist (reg);
+  __builtin_tx_assist (*mem);
+  __builtin_tx_assist (global);
+}
+
+/* Make sure the tdb NULL argument ends up as immediate value in the
+   instruction.  */
+/* { dg-final { scan-assembler-times "tbegin\t0," 10 } } */
diff --git a/gcc/testsuite/gcc.target/s390/htm-nofloat-1.c b/gcc/testsuite/gcc.target/s390/htm-nofloat-1.c
new file mode 100644
index 0000000..df7e2ba
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/htm-nofloat-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -march=zEC12 -mzarch" } */
+
+int
+foo ()
+{
+  __builtin_tbegin_nofloat (0);
+  __builtin_tbegin_retry_nofloat (0, 42);
+}
+/* Make sure no FPR saves/restores are emitted.  */
+/* { dg-final { scan-assembler-not "std" } } */
+/* { dg-final { scan-assembler-not "ld" } } */
diff --git a/gcc/testsuite/gcc.target/s390/htm-nofloat-2.c b/gcc/testsuite/gcc.target/s390/htm-nofloat-2.c
new file mode 100644
index 0000000..59621a4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/htm-nofloat-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -mhtm -Wa,-march=zEC12,-mzarch --save-temps" } */
+
+/* __builtin_tbegin has to emit clobbers for all FPRs since the tbegin
+   instruction does not automatically preserves them.  If the
+   transaction body is fully contained in a function the backend tries
+   after reload to get rid of the FPR save/restore operations
+   triggered by the clobbers.  This testcase failed since the backend
+   was able to get rid of all FPR saves/restores and since these were
+   the only stack operations also of the entire stack space.  So even
+   the save/restore of the stack pointer was omitted in the end.
+   However, since the frame layout has been fixed before, the prologue
+   still generated the stack pointer decrement making foo return with
+   a modified stack pointer.  */
+
+void abort(void);
+
+void __attribute__((noinline))
+foo (int a)
+{
+  /* This is just to prevent the tbegin code from actually being
+     executed.  That way the test may even run on machines prior to
+     zEC12.  */
+  if (a == 42)
+    return;
+
+  if (__builtin_tbegin (0) == 0)
+    __builtin_tend ();
+}
+
+#ifdef __s390x__
+#define GET_STACK_POINTER(SP)			\
+  asm volatile ("stg %%r15, %0" : "=QRST" (SP));
+#else
+#define GET_STACK_POINTER(SP)			\
+  asm volatile ("st %%r15, %0" : "=QR" (SP));
+#endif
+
+int main(void)
+{
+  unsigned long new_sp, old_sp;
+
+  GET_STACK_POINTER (old_sp);
+  foo(42);
+  GET_STACK_POINTER (new_sp);
+
+  if (old_sp != new_sp)
+    abort ();
+
+  return 0;
+}
+
+/* Make sure no FPR saves/restores are emitted.  */
+/* { dg-final { scan-assembler-not "\tstd\t" } } */
+/* { dg-final { scan-assembler-not "\tld\t" } } */
diff --git a/gcc/testsuite/gcc.target/s390/htm-xl-intrin-1.c b/gcc/testsuite/gcc.target/s390/htm-xl-intrin-1.c
new file mode 100644
index 0000000..77ceeb7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/htm-xl-intrin-1.c
@@ -0,0 +1,37 @@
+/* This checks the availability of the XL compiler intrinsics for
+   transactional execution with the expected prototypes.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -march=zEC12 -mzarch" } */
+
+#include <htmxlintrin.h>
+
+int a = 0;
+unsigned long g;
+
+int
+foo ()
+{
+  struct __htm_tdb *tdb_struct;
+  void * const tdb = tdb_struct;
+  long result;
+  unsigned char code;
+
+  result = __TM_simple_begin ();
+  result = __TM_begin (tdb);
+  result = __TM_end ();
+  __TM_abort ();
+  __TM_named_abort (42);
+  __TM_non_transactional_store (&g, 42);
+  result = __TM_nesting_depth (tdb);
+
+  result = __TM_is_user_abort (tdb);
+  result = __TM_is_named_user_abort (tdb, &code);
+  result = __TM_is_illegal (tdb);
+  result = __TM_is_footprint_exceeded (tdb);
+  result = __TM_is_nested_too_deep (tdb);
+  result = __TM_is_conflict (tdb);
+  result = __TM_is_failure_persistent (result);
+  result = __TM_failure_address (tdb);
+  result = __TM_failure_code (tdb);
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54089-3.c b/gcc/testsuite/gcc.target/sh/pr54089-3.c
index ffb976b..3fb0f7a 100644
--- a/gcc/testsuite/gcc.target/sh/pr54089-3.c
+++ b/gcc/testsuite/gcc.target/sh/pr54089-3.c
@@ -5,7 +5,7 @@
 /* { dg-options "-O1" } */
 /* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m1*" "-m2" "-m2e*" } } */
 /* { dg-final { scan-assembler-not "and" } } */
-/* { dg-final { scan-assembler-not "31" } } */
+/* { dg-final { scan-assembler-not "#31" } } */
 
 int
 test00 (unsigned int a, int* b, int c, int* d, unsigned int e)
diff --git a/gcc/testsuite/gcc.target/sh/torture/pr58314.c b/gcc/testsuite/gcc.target/sh/torture/pr58314.c
new file mode 100644
index 0000000..61447d8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/torture/pr58314.c
@@ -0,0 +1,102 @@
+/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-options "-Os" } */
+
+typedef unsigned short __u16;
+typedef unsigned int __u32;
+
+typedef signed short s16;
+
+
+static inline __attribute__((always_inline)) __attribute__((__const__)) __u16 __arch_swab16(__u16 x)
+{
+ __asm__(
+  "swap.b		%1, %0"
+  : "=r" (x)
+  : "r" (x));
+ return x;
+}
+
+void u16_add_cpu(__u16 *var)
+{
+  *var = __arch_swab16(*var);
+}
+
+typedef struct xfs_mount {
+ int m_attr_magicpct;
+} xfs_mount_t;
+
+typedef struct xfs_da_args {
+ struct xfs_mount *t_mountp;
+ int index;
+} xfs_da_args_t;
+
+typedef struct xfs_dabuf {
+ void *data;
+} xfs_dabuf_t;
+
+typedef struct xfs_attr_leaf_map {
+ __u16 base;
+ __u16 size;
+} xfs_attr_leaf_map_t;
+typedef struct xfs_attr_leaf_hdr {
+ __u16 count;
+ xfs_attr_leaf_map_t freemap[3];
+} xfs_attr_leaf_hdr_t;
+
+typedef struct xfs_attr_leaf_entry {
+  __u16 nameidx;
+} xfs_attr_leaf_entry_t;
+
+typedef struct xfs_attr_leafblock {
+ xfs_attr_leaf_hdr_t hdr;
+ xfs_attr_leaf_entry_t entries[1];
+} xfs_attr_leafblock_t;
+
+int
+xfs_attr_leaf_remove(xfs_attr_leafblock_t *leaf, xfs_da_args_t *args)
+{
+ xfs_attr_leaf_hdr_t *hdr;
+ xfs_attr_leaf_map_t *map;
+ xfs_attr_leaf_entry_t *entry;
+ int before, after, smallest, entsize;
+ int tablesize, tmp, i;
+ xfs_mount_t *mp;
+ hdr = &leaf->hdr;
+ mp = args->t_mountp;
+
+ entry = &leaf->entries[args->index];
+
+ tablesize = __arch_swab16(hdr->count);
+
+ map = &hdr->freemap[0];
+ tmp = map->size;
+ before = after = -1;
+ smallest = 3 - 1;
+ entsize = xfs_attr_leaf_entsize(leaf, args->index);
+
+ for (i = 0; i < 2; map++, i++) {
+
+  if (map->base == tablesize)
+    u16_add_cpu(&map->base);
+
+  if (__arch_swab16(map->base)  + __arch_swab16(map->size)  == __arch_swab16(entry->nameidx))
+   before = i;
+  else if (map->base == entsize)
+   after = i;
+  else if (__arch_swab16(map->size) < tmp)
+   smallest = i;
+ }
+
+ if (before >= 0)
+  {
+   map = &hdr->freemap[after];
+   map->base = entry->nameidx;
+
+  }
+
+  map = &hdr->freemap[smallest];
+
+  map->base = __arch_swab16(entry->nameidx);
+
+ return(tmp < mp->m_attr_magicpct);
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/leaf-2.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/leaf-2.c
index 2a54bc8..df4c406 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/callabi/leaf-2.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/leaf-2.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mabi=sysv" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -mabi=sysv" } */
 
 extern int glb1, gbl2, gbl3;
 
diff --git a/gcc/testsuite/gfortran.dg/defined_assignment_10.f90 b/gcc/testsuite/gfortran.dg/defined_assignment_10.f90
new file mode 100644
index 0000000..1ccc49f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/defined_assignment_10.f90
@@ -0,0 +1,37 @@
+! { dg-do run }
+!
+! PR fortran/57697
+!
+! Further test of typebound defined assignment
+!
+module m0
+  implicit none
+  type component
+    integer :: i = 42
+  contains
+    procedure :: assign0
+    generic :: assignment(=) => assign0
+  end type
+  type parent
+    type(component) :: foo
+  end type
+contains
+  elemental subroutine assign0(lhs,rhs)
+    class(component), intent(INout) :: lhs
+    class(component), intent(in) :: rhs
+    lhs%i = 20
+  end subroutine
+end module
+
+program main
+  use m0
+  implicit none
+block
+  type(parent), allocatable :: left
+  type(parent) :: right
+!  print *, right%foo
+  left = right
+!  print *, left%foo
+!  if (left%foo%i /= 20) call abort()
+end block
+end
diff --git a/gcc/testsuite/gfortran.dg/defined_assignment_11.f90 b/gcc/testsuite/gfortran.dg/defined_assignment_11.f90
new file mode 100644
index 0000000..ec297d5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/defined_assignment_11.f90
@@ -0,0 +1,43 @@
+! { dg-do run }
+!
+! PR fortran/57697
+!
+! Further test of typebound defined assignment
+!
+module m0
+  implicit none
+  type :: component
+    integer :: i = 42
+    integer, allocatable :: b
+  contains
+    procedure :: assign0
+    generic :: assignment(=) => assign0
+  end type
+  type, extends(component) :: comp2
+    real :: aa
+  end type comp2
+  type parent
+    type(component) :: foo
+    real :: cc
+  end type
+  type p2
+    type(parent) :: x
+  end type p2
+contains
+  elemental subroutine assign0(lhs,rhs)
+    class(component), intent(INout) :: lhs
+    class(component), intent(in) :: rhs
+    lhs%i = 20
+  end subroutine
+end module
+
+program main
+  use m0
+  implicit none
+  type(p2), allocatable :: left
+  type(p2) :: right
+!  print *, right%x%foo%i
+  left = right
+!  print *, left%x%foo%i
+  if (left%x%foo%i /= 20) call abort()
+end
diff --git a/gcc/testsuite/gfortran.dg/defined_assignment_8.f90 b/gcc/testsuite/gfortran.dg/defined_assignment_8.f90
new file mode 100644
index 0000000..aab8085
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/defined_assignment_8.f90
@@ -0,0 +1,40 @@
+! { dg-do compile }
+!
+! PR fortran/58469
+!
+! Related: PR fortran/57697
+!
+! Was ICEing before
+!
+module m0
+  implicit none
+  type :: component
+    integer :: i = 42
+  contains
+    procedure :: assign0
+    generic :: assignment(=) => assign0
+  end type
+  type, extends(component) :: comp2
+    real :: aa
+  end type comp2
+  type parent
+    type(comp2) :: foo
+  end type
+contains
+  elemental subroutine assign0(lhs,rhs)
+    class(component), intent(INout) :: lhs
+    class(component), intent(in) :: rhs
+    lhs%i = 20
+  end subroutine
+end module
+
+program main
+  use m0
+  implicit none
+  type(parent), allocatable :: left
+  type(parent) :: right
+  print *, right%foo
+  left = right
+  print *, left%foo
+  if (left%foo%i /= 42) call abort()
+end
diff --git a/gcc/testsuite/gfortran.dg/defined_assignment_9.f90 b/gcc/testsuite/gfortran.dg/defined_assignment_9.f90
new file mode 100644
index 0000000..50fa007
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/defined_assignment_9.f90
@@ -0,0 +1,45 @@
+! { dg-do run }
+!
+! PR fortran/57697
+!
+! Further test of typebound defined assignment
+!
+module m0
+  implicit none
+  type component
+    integer :: i = 42
+  contains
+    procedure :: assign0
+    generic :: assignment(=) => assign0
+  end type
+  type parent
+    type(component) :: foo
+  end type
+contains
+  elemental subroutine assign0(lhs,rhs)
+    class(component), intent(INout) :: lhs
+    class(component), intent(in) :: rhs
+    lhs%i = 20
+  end subroutine
+end module
+
+program main
+  use m0
+  implicit none
+  block
+    type(parent), allocatable :: left
+    type(parent) :: right
+!    print *, right%foo
+    left = right
+!    print *, left%foo
+    if (left%foo%i /= 20) call abort()
+  end block
+  block
+    type(parent), allocatable :: left(:)
+    type(parent) :: right(5)
+!    print *, right%foo
+    left = right
+!    print *, left%foo
+    if (any (left%foo%i /= 20)) call abort()
+  end block
+end
diff --git a/gcc/testsuite/gfortran.dg/extends_15.f90 b/gcc/testsuite/gfortran.dg/extends_15.f90
new file mode 100644
index 0000000..06c3179
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/extends_15.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+!
+! PR 58355: [4.7/4.8/4.9 Regression] [F03] ICE with TYPE, EXTENDS before parent TYPE defined
+!
+! Contributed by Andrew Benson <abensonca@gmail.com>
+
+module ct
+  public :: t1
+
+  type, extends(t1) :: t2   ! { dg-error "has not been previously defined" }
+
+  type :: t1
+  end type
+end
+
+! { dg-final { cleanup-modules "ct" } }
diff --git a/gcc/testsuite/gnat.dg/array_bounds_test2.adb b/gcc/testsuite/gnat.dg/array_bounds_test2.adb
new file mode 100644
index 0000000..43e1ed3
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/array_bounds_test2.adb
@@ -0,0 +1,25 @@
+--  { dg-do run }
+
+with Ada.Unchecked_Deallocation;
+
+procedure Array_Bounds_Test2 is
+
+  type String_Ptr_T is access String;
+  procedure Free is new Ada.Unchecked_Deallocation (String, String_Ptr_T);
+  String_Data : String_Ptr_T := new String'("Hello World");
+
+  function Peek return String_Ptr_T is
+  begin
+    return String_Data;
+  end Peek;
+
+begin
+  declare
+    Corrupted_String : String := Peek.all;
+  begin
+    Free(String_Data);
+    if Corrupted_String'First /= 1 then
+      raise Program_Error;
+    end if;
+  end;
+end;
diff --git a/gcc/testsuite/gnat.dg/in_out_parameter4.adb b/gcc/testsuite/gnat.dg/in_out_parameter4.adb
new file mode 100644
index 0000000..4f5cc21
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/in_out_parameter4.adb
@@ -0,0 +1,30 @@
+-- { dg-do run }
+-- { dg-options "-gnat12 -gnatVa" }
+
+procedure In_Out_Parameter4 is
+
+   type Enum is (E_Undetermined, E_Down, E_Up);
+   subtype Status_T is Enum range E_Down .. E_Up;
+
+   function Recurse (Val : in out Integer) return Status_T is
+
+     Result : Status_T;
+
+     procedure Dummy (I : in out Integer) is begin null; end;
+
+   begin
+     if Val > 500 then
+       Val := Val - 1;
+       Result := Recurse (Val);
+       return Result;
+     else
+       return E_UP;
+     end if;
+   end;
+
+   Val : Integer := 501;
+   S : Status_T;
+
+begin
+   S := Recurse (Val);
+end;
diff --git a/gcc/testsuite/gnat.dg/opt28.adb b/gcc/testsuite/gnat.dg/opt28.adb
new file mode 100644
index 0000000..74a4c5c
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt28.adb
@@ -0,0 +1,31 @@
+with Opt28_Pkg; use Opt28_Pkg;
+
+package body Opt28 is
+
+  function Full_Filename (Filename : String) return String is
+    Path : constant String := "PATH";
+    Posix_Path : constant Posix_String := To_Posix (Path);
+  begin
+
+    declare
+      M : constant Posix_String := Value_Of (Posix_Path);
+      N : constant Posix_String (1 .. M'Length) := M;
+      Var : constant String := To_String (Str => N);
+      Start_Pos : Natural := 1;
+      End_Pos   : Natural := 1;
+    begin
+      while Start_Pos <= Var'Length loop
+        End_Pos := Position (Var (Start_Pos .. Var'Length));
+
+        if Is_File (To_Posix (Var (Start_Pos .. End_Pos - 1) & Filename)) then
+          return Var (Start_Pos .. End_Pos - 1) & Filename;
+        else
+          Start_Pos := End_Pos + 1;
+        end if;
+      end loop;
+    end;
+
+    return "";
+  end;
+
+end Opt28;
diff --git a/gcc/testsuite/gnat.dg/opt28.ads b/gcc/testsuite/gnat.dg/opt28.ads
new file mode 100644
index 0000000..4887c21
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt28.ads
@@ -0,0 +1,8 @@
+-- { dg-do compile }
+-- { dg-options "-O2" }
+
+package Opt28 is
+
+  function Full_Filename (Filename : String) return String;
+
+end Opt28;
diff --git a/gcc/testsuite/gnat.dg/opt28_pkg.ads b/gcc/testsuite/gnat.dg/opt28_pkg.ads
new file mode 100644
index 0000000..c3c32fe
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt28_pkg.ads
@@ -0,0 +1,11 @@
+package Opt28_Pkg is
+
+  type Posix_String is array (Positive range <>) of aliased Character;
+
+  function To_Posix (Str : String) return Posix_String;
+  function To_String (Str : Posix_String) return String;
+  function Is_File (Str : Posix_String) return Boolean;
+  function Value_Of (Name : Posix_String) return Posix_String;
+  function Position (In_Line : String) return Natural;
+
+end Opt28_Pkg;
diff --git a/gcc/tree-affine.c b/gcc/tree-affine.c
index 46a183a..49559e4 100644
--- a/gcc/tree-affine.c
+++ b/gcc/tree-affine.c
@@ -377,35 +377,46 @@
     type1 = sizetype;
 
   scale = double_int_ext_for_comb (scale, comb);
-  elt = fold_convert (type1, elt);
+
+  if (scale.is_minus_one ()
+      && POINTER_TYPE_P (TREE_TYPE (elt)))
+    {
+      elt = fold_build1 (NEGATE_EXPR, sizetype, convert_to_ptrofftype (elt));
+      scale = double_int_one;
+    }
 
   if (scale.is_one ())
     {
       if (!expr)
-	return fold_convert (type, elt);
+	return elt;
 
-      if (POINTER_TYPE_P (type))
-        return fold_build_pointer_plus (expr, elt);
-      return fold_build2 (PLUS_EXPR, type, expr, elt);
+      if (POINTER_TYPE_P (TREE_TYPE (expr)))
+	return fold_build_pointer_plus (expr, convert_to_ptrofftype (elt));
+      if (POINTER_TYPE_P (TREE_TYPE (elt)))
+	return fold_build_pointer_plus (elt, convert_to_ptrofftype (expr));
+      return fold_build2 (PLUS_EXPR, type1,
+			  fold_convert (type1, expr),
+			  fold_convert (type1, elt));
     }
 
   if (scale.is_minus_one ())
     {
       if (!expr)
-	return fold_convert (type, fold_build1 (NEGATE_EXPR, type1, elt));
+	return fold_build1 (NEGATE_EXPR, TREE_TYPE (elt), elt);
 
-      if (POINTER_TYPE_P (type))
-	{
-	  elt = fold_build1 (NEGATE_EXPR, type1, elt);
-	  return fold_build_pointer_plus (expr, elt);
-	}
-      return fold_build2 (MINUS_EXPR, type, expr, elt);
+      if (POINTER_TYPE_P (TREE_TYPE (expr)))
+	return fold_build_pointer_plus
+	    (expr, convert_to_ptrofftype
+	     (fold_build1 (NEGATE_EXPR, TREE_TYPE (elt), elt)));
+      return fold_build2 (MINUS_EXPR, type1,
+			  fold_convert (type1, expr),
+			  fold_convert (type1, elt));
     }
 
+  elt = fold_convert (type1, elt);
   if (!expr)
-    return fold_convert (type,
-			 fold_build2 (MULT_EXPR, type1, elt,
-				      double_int_to_tree (type1, scale)));
+    return fold_build2 (MULT_EXPR, type1, elt,
+			double_int_to_tree (type1, scale));
 
   if (scale.is_negative ())
     {
@@ -417,13 +428,14 @@
 
   elt = fold_build2 (MULT_EXPR, type1, elt,
 		     double_int_to_tree (type1, scale));
-  if (POINTER_TYPE_P (type))
+  if (POINTER_TYPE_P (TREE_TYPE (expr)))
     {
       if (code == MINUS_EXPR)
         elt = fold_build1 (NEGATE_EXPR, type1, elt);
       return fold_build_pointer_plus (expr, elt);
     }
-  return fold_build2 (code, type, expr, elt);
+  return fold_build2 (code, type1,
+		      fold_convert (type1, expr), elt);
 }
 
 /* Makes tree from the affine combination COMB.  */
@@ -856,10 +868,11 @@
   fprintf (stderr, "\n");
 }
 
-/* Returns address of the reference REF in ADDR.  The size of the accessed
-   location is stored to SIZE.  */
+/* Computes address of the reference REF in ADDR.  The size of the accessed
+   location is stored to SIZE.  Returns the ultimate containing object to
+   which REF refers.  */
 
-void
+tree
 get_inner_reference_aff (tree ref, aff_tree *addr, double_int *size)
 {
   HOST_WIDE_INT bitsize, bitpos;
@@ -886,6 +899,8 @@
   aff_combination_add (addr, &tmp);
 
   *size = double_int::from_shwi ((bitsize + BITS_PER_UNIT - 1) / BITS_PER_UNIT);
+
+  return base;
 }
 
 /* Returns true if a region of size SIZE1 at position 0 and a region of
diff --git a/gcc/tree-affine.h b/gcc/tree-affine.h
index b2558f7..86f90d8 100644
--- a/gcc/tree-affine.h
+++ b/gcc/tree-affine.h
@@ -74,7 +74,7 @@
 void aff_combination_expand (aff_tree *, struct pointer_map_t **);
 void tree_to_aff_combination_expand (tree, tree, aff_tree *,
 				     struct pointer_map_t **);
-void get_inner_reference_aff (tree, aff_tree *, double_int *);
+tree get_inner_reference_aff (tree, aff_tree *, double_int *);
 void free_affine_expand_cache (struct pointer_map_t **);
 bool aff_comb_cannot_overlap_p (aff_tree *, double_int, double_int);
 
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index 3a9aae6..9b3d863 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -797,20 +797,6 @@
   return true;
 }
 
-/* Return true when BB post-dominates all its predecessors.  */
-
-static bool
-bb_postdominates_preds (basic_block bb)
-{
-  unsigned i;
-
-  for (i = 0; i < EDGE_COUNT (bb->preds); i++)
-    if (!dominated_by_p (CDI_POST_DOMINATORS, EDGE_PRED (bb, i)->src, bb))
-      return false;
-
-  return true;
-}
-
 /* Return true when BB is if-convertible.  This routine does not check
    basic block's statements and phis.
 
@@ -868,10 +854,23 @@
 	return false;
       }
 
-  if (EDGE_COUNT (bb->preds) == 2
-      && bb != loop->header
-      && !bb_postdominates_preds (bb))
-    return false;
+  /* At least one incoming edge has to be non-critical as otherwise edge
+     predicates are not equal to basic-block predicates of the edge
+     source.  */
+  if (EDGE_COUNT (bb->preds) > 1
+      && bb != loop->header)
+    {
+      bool found = false;
+      FOR_EACH_EDGE (e, ei, bb->preds)
+	if (EDGE_COUNT (e->src->succs) == 1)
+	  found = true;
+      if (!found)
+	{
+	  if (dump_file && (dump_flags & TDF_DETAILS))
+	    fprintf (dump_file, "only critical predecessors\n");
+	  return false;
+	}
+    }
 
   return true;
 }
@@ -1084,7 +1083,6 @@
     return false;
 
   calculate_dominance_info (CDI_DOMINATORS);
-  calculate_dominance_info (CDI_POST_DOMINATORS);
 
   /* Allow statements that can be handled during if-conversion.  */
   ifc_bbs = get_loop_body_in_if_conv_order (loop);
@@ -1220,8 +1218,7 @@
    if-conversion.  */
 
 static basic_block
-find_phi_replacement_condition (struct loop *loop,
-				basic_block bb, tree *cond,
+find_phi_replacement_condition (basic_block bb, tree *cond,
 				gimple_stmt_iterator *gsi)
 {
   edge first_edge, second_edge;
@@ -1231,34 +1228,10 @@
   first_edge = EDGE_PRED (bb, 0);
   second_edge = EDGE_PRED (bb, 1);
 
-  /* Use condition based on following criteria:
-     1)
-       S1: x = !c ? a : b;
-
-       S2: x = c ? b : a;
-
-       S2 is preferred over S1. Make 'b' first_bb and use its condition.
-
-     2) Do not make loop header first_bb.
-
-     3)
-       S1: x = !(c == d)? a : b;
-
-       S21: t1 = c == d;
-       S22: x = t1 ? b : a;
-
-       S3: x = (c == d) ? b : a;
-
-       S3 is preferred over S1 and S2*, Make 'b' first_bb and use
-       its condition.
-
-     4) If  pred B is dominated by pred A then use pred B's condition.
-        See PR23115.  */
-
-  /* Select condition that is not TRUTH_NOT_EXPR.  */
+  /* Prefer an edge with a not negated predicate.
+     ???  That's a very weak cost model.  */
   tmp_cond = bb_predicate (first_edge->src);
   gcc_assert (tmp_cond);
-
   if (TREE_CODE (tmp_cond) == TRUTH_NOT_EXPR)
     {
       edge tmp_edge;
@@ -1268,11 +1241,9 @@
       second_edge = tmp_edge;
     }
 
-  /* Check if FIRST_BB is loop header or not and make sure that
-     FIRST_BB does not dominate SECOND_BB.  */
-  if (first_edge->src == loop->header
-      || dominated_by_p (CDI_DOMINATORS,
-			 second_edge->src, first_edge->src))
+  /* Check if the edge we take the condition from is not critical.
+     We know that at least one non-critical edge exists.  */
+  if (EDGE_COUNT (first_edge->src->succs) > 1)
     {
       *cond = bb_predicate (second_edge->src);
 
@@ -1347,9 +1318,6 @@
 	  arg_1 = gimple_phi_arg_def (phi, 1);
 	}
 
-      gcc_checking_assert (bb == bb->loop_father->header
-			   || bb_postdominates_preds (bb));
-
       /* Build new RHS using selected condition and arguments.  */
       rhs = fold_build_cond_expr (TREE_TYPE (res), unshare_expr (cond),
 				  arg_0, arg_1);
@@ -1395,7 +1363,7 @@
       /* BB has two predecessors.  Using predecessor's aux field, set
 	 appropriate condition for the PHI node replacement.  */
       gsi = gsi_after_labels (bb);
-      true_bb = find_phi_replacement_condition (loop, bb, &cond, &gsi);
+      true_bb = find_phi_replacement_condition (bb, &cond, &gsi);
 
       while (!gsi_end_p (phi_gsi))
 	{
@@ -1765,9 +1733,6 @@
 
   free (ifc_bbs);
   ifc_bbs = NULL;
-
-  /* Post-dominators are corrupt now.  */
-  free_dominance_info (CDI_POST_DOMINATORS);
 }
 
 /* If-convert LOOP when it is legal.  For the moment this pass has no
@@ -1830,8 +1795,6 @@
   if (changed && flag_tree_loop_if_convert_stores)
     todo |= TODO_update_ssa_only_virtuals;
 
-  free_dominance_info (CDI_POST_DOMINATORS);
-
 #ifdef ENABLE_CHECKING
   {
     basic_block bb;
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index afc64e6..866dea6 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -2195,6 +2195,29 @@
     }
 }
 
+/* Convert estimated frequencies into counts for NODE, scaling COUNT
+   with each bb's frequency. Used when NODE has a 0-weight entry
+   but we are about to inline it into a non-zero count call bb.
+   See the comments for handle_missing_profiles() in predict.c for
+   when this can happen for COMDATs.  */
+
+void
+freqs_to_counts (struct cgraph_node *node, gcov_type count)
+{
+  basic_block bb;
+  edge_iterator ei;
+  edge e;
+  struct function *fn = DECL_STRUCT_FUNCTION (node->symbol.decl);
+
+  FOR_ALL_BB_FN(bb, fn)
+    {
+      bb->count = apply_scale (count,
+                               GCOV_COMPUTE_SCALE (bb->frequency, BB_FREQ_MAX));
+      FOR_EACH_EDGE (e, ei, bb->succs)
+        e->count = apply_probability (e->src->count, e->probability);
+    }
+}
+
 /* Make a copy of the body of FN so that it can be inserted inline in
    another function.  Walks FN via CFG, returns new fndecl.  */
 
@@ -2215,12 +2238,33 @@
   int incoming_frequency = 0;
   gcov_type incoming_count = 0;
 
+  /* This can happen for COMDAT routines that end up with 0 counts
+     despite being called (see the comments for handle_missing_profiles()
+     in predict.c as to why). Apply counts to the blocks in the callee
+     before inlining, using the guessed edge frequencies, so that we don't
+     end up with a 0-count inline body which can confuse downstream
+     optimizations such as function splitting.  */
+  if (!ENTRY_BLOCK_PTR_FOR_FUNCTION (src_cfun)->count && count)
+    {
+      /* Apply the larger of the call bb count and the total incoming
+         call edge count to the callee.  */
+      gcov_type in_count = 0;
+      struct cgraph_edge *in_edge;
+      for (in_edge = id->src_node->callers; in_edge;
+           in_edge = in_edge->next_caller)
+        in_count += in_edge->count;
+      freqs_to_counts (id->src_node, count > in_count ? count : in_count);
+    }
+
   if (ENTRY_BLOCK_PTR_FOR_FUNCTION (src_cfun)->count)
     count_scale = (REG_BR_PROB_BASE * (double)count
 		   / ENTRY_BLOCK_PTR_FOR_FUNCTION (src_cfun)->count);
   else
     count_scale = REG_BR_PROB_BASE;
 
+  if (flag_auto_profile && count_scale > REG_BR_PROB_BASE)
+    count_scale = REG_BR_PROB_BASE;
+
   /* Register specific tree functions.  */
   gimple_register_cfg_hooks ();
 
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 101efbe..619d93c 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -518,17 +518,19 @@
 	  || !bitmap_bit_p (remaining_stmts, v));
 }
 
-/* Returns NULL when there is no anti-dependence among the successors
-   of vertex V, otherwise returns the edge with the anti-dep.  */
+/* Returns NULL when there is no anti-dependence or output-dependence
+   among the successors of vertex V, otherwise returns the edge with the
+   dependency.  */
 
 static struct graph_edge *
-has_anti_dependence (struct vertex *v)
+has_anti_or_output_dependence (struct vertex *v)
 {
   struct graph_edge *e;
 
   if (v->succ)
     for (e = v->succ; e; e = e->succ_next)
-      if (RDGE_TYPE (e) == anti_dd)
+      if (RDGE_TYPE (e) == anti_dd
+	  || RDGE_TYPE (e) == output_dd)
 	return e;
 
   return NULL;
@@ -580,11 +582,10 @@
 		|| predecessor_has_mem_write (rdg, &(rdg->vertices[x]))
 		/* In anti dependences the read should occur before
 		   the write, this is why both the read and the write
-		   should be placed in the same partition.  */
-		|| has_anti_dependence (&(rdg->vertices[x])))
-	      {
-		bitmap_set_bit (upstream_mem_writes, x);
-	      }
+		   should be placed in the same partition.  In output
+		   dependences the writes order need to be preserved.  */
+		|| has_anti_or_output_dependence (&(rdg->vertices[x])))
+	      bitmap_set_bit (upstream_mem_writes, x);
 	  }
 
 	nodes.release ();
@@ -613,7 +614,7 @@
   use_operand_p use_p;
   struct vertex *x = &(rdg->vertices[u]);
   gimple stmt = RDGV_STMT (x);
-  struct graph_edge *anti_dep = has_anti_dependence (x);
+  struct graph_edge *anti_dep = has_anti_or_output_dependence (x);
 
   /* Keep in the same partition the destination of an antidependence,
      because this is a store to the exact same location.  Putting this
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 679fc74..b1f6f92 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -1232,6 +1232,8 @@
       pop_cfun ();
     }
 
+  handle_missing_profiles ();
+
   del_node_map();
   cleanup_instrumentation_sampling();
   return 0;
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index a64bffc..0ad91a9 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -1707,6 +1707,9 @@
 	insert_clobber_before_stack_restore (gimple_phi_result (stmt), var,
 					     visited);
       }
+    else if (gimple_assign_ssa_name_copy_p (stmt))
+      insert_clobber_before_stack_restore (gimple_assign_lhs (stmt), var,
+					   visited);
     else
       gcc_assert (is_gimple_debug (stmt));
 }
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 2940bf1..9bb30ed 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -96,8 +96,6 @@
 /* The infinite cost.  */
 #define INFTY 10000000
 
-#define AVG_LOOP_NITER(LOOP) 5
-
 /* Returns the expected number of loop iterations for LOOP.
    The average trip count is computed from profile data if it
    exists. */
@@ -107,7 +105,7 @@
 {
   HOST_WIDE_INT niter = estimated_stmt_executions_int (loop);
   if (niter == -1)
-    return AVG_LOOP_NITER (loop);
+    return PARAM_VALUE (PARAM_IVOPT_AVG_LOOP_NITER);
 
   return niter;
 }
@@ -707,6 +705,115 @@
   return !abnormal_ssa_name_p (*index);
 }
 
+/* Return true if the use is defined by a gcov counter var.
+   It is used to check if an iv candidate is generated for
+   profiling. For profile generated ssa name, we should not
+   use it as IV because gcov counter may have data-race for
+   multithread program, it is compiler's responsibility to
+   avoid connecting profile counter related vars with program
+   correctness.
+
+   Without the check, the following bug could happen in
+   following case:
+   * original loop
+
+     int i;
+     for (i = 0; i < N; i++) {
+       t = *(void **)t;
+     }
+
+   * after profile-gen and IVOPT, loop condition is replaced and
+     pretmp_1 is involved in loop boundary computation.
+
+     pretmp_1 = __gcov0.foo[0];
+     _22 = pretmp_1 + 1;
+     ...
+     _31 = (unsigned long) pretmp_1;
+     _32 = _30 + _31;
+     _33 = _32 + 2;
+  label:
+     ivtmp.8_9 = PHI <ivtmp.8_5(5), ivtmp.8_2(3)>
+     PROF_edge_counter_10 = (long int) ivtmp.8_9;
+     __gcov0.foo[0] = PROF_edge_counter_10;
+       ...
+     ivtmp.8_5 = ivtmp.8_9 + 1;
+     if (ivtmp.8_5 != _33)
+       goto label
+
+   * after register allocation, pretmp_1 may be marked as REG_EQUIV in IRA
+     with __gcov0.foo[0] and some references are replaced by __gcov0.foo in LRA.
+
+     _22 = __gcov0.foo[0] + 1;
+     ...
+     _31 = (unsigned long) __gcov0.foo[0];
+     _32 = _30 + _31;
+     _33 = _32 + 2;
+  label:
+     ....
+
+   * Bug happens when __gcov0.foo[0] is updated asynchronously by other thread
+     between the above __gcov0.foo[0] references statements.
+
+   We don't choose to mark gcov counter as volatile because it may greatly
+   degrade profile-gen performance.
+
+   To limit patterns to be checked, we list the possible cases
+   here:
+   Before PRE, the ssa name used to set __gcov counter is as
+   follows:
+   for () {
+     PROF_edge_counter_1 = __gcov.foo[i];
+     PROF_edge_counter_2 = PROF_edge_counter_1 + 1;
+     __gcov.foo[i] = PROF_edge_counter_2;
+   }
+   If PRE works, the loop may be transformed to:
+   pretmp_1 = __gcov.foo[i];
+   for () {
+     prephitmp_1 = PHI (PROF_edge_counter_2, pretmp_1);
+     PROF_edge_counter_1 = prephitmp_1;
+     PROF_edge_counter_2 = PROF_edge_counter_1 + 1;
+     __gcov.foo[i] = PROF_edge_counter_2;
+   }
+   So there are two cases:
+   case1: If PRE doesn't work, PROF_edge_counter_1 and PROF_edge_counter_2
+   are neither induction variables candidates. We don't have to worry
+   about this case.
+   case2: If PRE works, the iv candidate base of PROF_edge_counter_1 and
+   PROF_edge_counter_2 are pretmp_1 or pretmp_1 + 1. pretmp_1 is defined
+   by __gcov var.
+
+   So this func only has to check case2. For a ssa name which is an iv
+   candidate, check its base USE and see if it is defined by __gcov var.
+   Returning true means the ssa name is generated for profiling.  */
+
+bool
+defined_by_gcov_counter (tree use)
+{
+  gimple stmt;
+  tree rhs, decl;
+  const char *name;
+
+  stmt = SSA_NAME_DEF_STMT (use);
+  if (!is_gimple_assign (stmt))
+    return false;
+
+  rhs = gimple_assign_rhs1 (stmt);
+  if (TREE_CODE (rhs) != ARRAY_REF)
+    return false;
+
+  decl = TREE_OPERAND (rhs, 0);
+  if (TREE_CODE (decl) != VAR_DECL
+      || !TREE_STATIC (decl)
+      || !DECL_ARTIFICIAL (decl))
+    return false;
+
+  name = IDENTIFIER_POINTER (DECL_NAME (decl));
+  if (strncmp (name, "__gcov", 6))
+    return false;
+
+  return true;
+}
+
 /* Returns true if EXPR contains a ssa name that occurs in an
    abnormal phi node.  */
 
@@ -723,7 +830,8 @@
   codeclass = TREE_CODE_CLASS (code);
 
   if (code == SSA_NAME)
-    return SSA_NAME_OCCURS_IN_ABNORMAL_PHI (expr) != 0;
+    return SSA_NAME_OCCURS_IN_ABNORMAL_PHI (expr) != 0
+	   || defined_by_gcov_counter (expr);
 
   if (code == INTEGER_CST
       || is_gimple_min_invariant (expr))
@@ -913,11 +1021,30 @@
 static struct iv *
 alloc_iv (tree base, tree step)
 {
+  tree base_object = base;
   struct iv *iv = XCNEW (struct iv);
   gcc_assert (step != NULL_TREE);
 
+  /* Lower all address expressions except ones with DECL_P as operand.
+     By doing this:
+       1) More accurate cost can be computed for address expressions;
+       2) Duplicate candidates won't be created for bases in different
+          forms, like &a[0] and &a.  */
+  STRIP_NOPS (base_object);
+  if (TREE_CODE (base_object) == ADDR_EXPR
+      && !DECL_P (TREE_OPERAND (base_object, 0)))
+    {
+      aff_tree comb;
+      double_int size;
+      base_object = get_inner_reference_aff (TREE_OPERAND (base_object, 0),
+					     &comb, &size);
+      gcc_assert (base_object != NULL_TREE);
+      base_object = build_fold_addr_expr (base_object);
+      base = fold_convert (TREE_TYPE (base), aff_combination_to_tree (&comb));
+    }
+
   iv->base = base;
-  iv->base_object = determine_base_object (base);
+  iv->base_object = determine_base_object (base_object);
   iv->step = step;
   iv->biv_p = false;
   iv->have_use_for = false;
@@ -1766,7 +1893,8 @@
 
       /* Check that the base expression is addressable.  This needs
 	 to be done after substituting bases of IVs into it.  */
-      if (may_be_nonaddressable_p (base))
+      if (may_be_nonaddressable_p (base)
+	  && REFERENCE_CLASS_P (base))
 	goto fail;
 
       /* Moreover, on strict alignment platforms, check that it is
@@ -1774,7 +1902,11 @@
       if (STRICT_ALIGNMENT && may_be_unaligned_p (base, step))
 	goto fail;
 
-      base = build_fold_addr_expr (base);
+      /* If base is of reference class, build its addr expr here. If
+	 base is already an address, then don't need to build addr
+	 expr.  */
+      if (REFERENCE_CLASS_P (base))
+	base = build_fold_addr_expr (base);
 
       /* Substituting bases of IVs into the base expression might
 	 have caused folding opportunities.  */
@@ -1818,13 +1950,36 @@
     }
 }
 
+/* Find whether the Ith param of the BUILTIN is a mem
+   reference. If I is -1, it returns whether the BUILTIN
+   contains any mem reference type param.  */
+
+static bool
+builtin_has_mem_ref_p (gimple builtin, int i)
+{
+  tree fndecl = gimple_call_fndecl (builtin);
+  if (DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL)
+    {
+      switch (DECL_FUNCTION_CODE (fndecl))
+	{
+	case BUILT_IN_PREFETCH:
+	  if (i == -1 || i == 0)
+	    return true;
+	}
+    }
+  else if (DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_MD)
+    return targetm.builtin_has_mem_ref_p ((int) DECL_FUNCTION_CODE (fndecl), i);
+
+  return false;
+}
+
 /* Finds interesting uses of induction variables in the statement STMT.  */
 
 static void
 find_interesting_uses_stmt (struct ivopts_data *data, gimple stmt)
 {
   struct iv *iv;
-  tree op, *lhs, *rhs;
+  tree op, *lhs, *rhs, callee;
   ssa_op_iter iter;
   use_operand_p use_p;
   enum tree_code code;
@@ -1872,14 +2027,36 @@
 	  find_interesting_uses_cond (data, stmt);
 	  return;
 	}
+    }
+  /* Handle builtin call which could be expanded to insn
+     with memory access operands. Generate USE_ADDRESS type
+     use for address expr which is used for memory access of
+     such builtin.  */
+  else if (is_gimple_call (stmt)
+	   && (callee = gimple_call_fndecl (stmt))
+	   && is_builtin_fn (callee)
+	   && builtin_has_mem_ref_p (stmt, -1))
+    {
+      size_t i;
+      for (i = 0; i < gimple_call_num_args (stmt); i++)
+	{
+	  if (builtin_has_mem_ref_p (stmt, i))
+	    {
+	      tree *arg = gimple_call_arg_ptr (stmt, i);
 
-      /* TODO -- we should also handle address uses of type
+	      if (TREE_CODE (*arg) != SSA_NAME)
+		continue;
 
-	 memory = call (whatever);
-
-	 and
-
-	 call (memory).  */
+	      gcc_assert (POINTER_TYPE_P (TREE_TYPE (*arg)));
+	      find_interesting_uses_address (data, stmt, arg);
+	    }
+	  else
+	    {
+	      tree arg = gimple_call_arg (stmt, i);
+	      find_interesting_uses_op (data, arg);
+	    }
+	}
+      return;
     }
 
   if (gimple_code (stmt) == GIMPLE_PHI
@@ -3826,9 +4003,12 @@
 {
   aff_tree ubase_aff, cbase_aff;
   tree expr, ub, cb;
+  unsigned HOST_WIDE_INT uoffset, coffset;
 
   STRIP_NOPS (ubase);
   STRIP_NOPS (cbase);
+  ubase = strip_offset (ubase, &uoffset);
+  cbase = strip_offset (cbase, &coffset);
   ub = ubase;
   cb = cbase;
 
@@ -6263,7 +6443,7 @@
   aff_tree aff;
   gimple_stmt_iterator bsi = gsi_for_stmt (use->stmt);
   tree base_hint = NULL_TREE;
-  tree ref, iv;
+  tree ref, iv, callee;
   bool ok;
 
   adjust_iv_update_pos (cand, use);
@@ -6286,10 +6466,41 @@
     base_hint = var_at_stmt (data->current_loop, cand, use->stmt);
 
   iv = var_at_stmt (data->current_loop, cand, use->stmt);
-  ref = create_mem_ref (&bsi, TREE_TYPE (*use->op_p), &aff,
-			reference_alias_ptr_type (*use->op_p),
-			iv, base_hint, data->speed);
-  copy_ref_info (ref, *use->op_p);
+
+  /*  For builtin_call(addr_expr), change it to:
+	tmp = ADDR_EXPR(TMR(...));
+	call (tmp);  */
+  if (is_gimple_call (use->stmt)
+      && (callee = gimple_call_fndecl (use->stmt))
+      && is_builtin_fn (callee))
+    {
+      gimple g;
+      gimple_seq seq = NULL;
+      tree addr;
+      tree type = TREE_TYPE (TREE_TYPE (*use->op_p));
+      location_t loc = gimple_location (use->stmt);
+      gimple_stmt_iterator gsi = gsi_for_stmt (use->stmt);
+
+      ref = create_mem_ref (&bsi, type, &aff,
+			    TREE_TYPE (*use->op_p),
+			    iv, base_hint, data->speed);
+      addr = build1 (ADDR_EXPR, TREE_TYPE (*use->op_p), ref);
+      g = gimple_build_assign_with_ops (ADDR_EXPR,
+				make_ssa_name (TREE_TYPE (*use->op_p), NULL),
+				addr, NULL);
+      gimple_set_location (g, loc);
+      gimple_seq_add_stmt_without_update (&seq, g);
+      gsi_insert_seq_before (&gsi, seq, GSI_SAME_STMT);
+
+      ref = gimple_assign_lhs (g);
+    }
+  else
+    {
+      ref = create_mem_ref (&bsi, TREE_TYPE (*use->op_p), &aff,
+			    reference_alias_ptr_type (*use->op_p),
+			    iv, base_hint, data->speed);
+      copy_ref_info (ref, *use->op_p);
+    }
   *use->op_p = ref;
 }
 
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index f562930..8da56d9 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -2520,7 +2520,8 @@
     }
   if (realistic
       && (!loop->any_estimate
-	  || i_bound.ult (loop->nb_iterations_estimate)))
+	  || (!flag_auto_profile &&
+	      i_bound.ult (loop->nb_iterations_estimate))))
     {
       loop->any_estimate = true;
       loop->nb_iterations_estimate = i_bound;
diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
index dfc24dd..408fbce 100644
--- a/gcc/tree-ssa-loop.c
+++ b/gcc/tree-ssa-loop.c
@@ -467,7 +467,7 @@
 
   return tree_unroll_loops_completely (flag_unroll_loops
 				       || flag_peel_loops
-				       || optimize >= 3, true);
+				       || optimize >= 2, true);
 }
 
 static bool
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 416a5ef..036e314 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -3664,6 +3664,12 @@
       if (dump_file && dump_flags & TDF_DETAILS)
 	fprintf (dump_file, "Starting insert iteration %d\n", num_iterations);
       new_stuff = insert_aux (ENTRY_BLOCK_PTR);
+
+      /* Clear the NEW sets before the next iteration.  We have already
+         fully propagated its contents.  */
+      if (new_stuff)
+	FOR_ALL_BB (bb)
+	  bitmap_set_free (NEW_SETS (bb));
     }
   statistics_histogram_event (cfun, "insert iterations", num_iterations);
 }
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 4699438..a1a9a73 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -1774,7 +1774,14 @@
       switch (code)
 	{
 	case BIT_NOT_EXPR:
-	  if (TREE_CODE (TREE_TYPE (exp)) == BOOLEAN_TYPE)
+	  if (TREE_CODE (TREE_TYPE (exp)) == BOOLEAN_TYPE
+	      /* Ensure the range is either +[-,0], +[0,0],
+		 -[-,0], -[0,0] or +[1,-], +[1,1], -[1,-] or
+		 -[1,1].  If it is e.g. +[-,-] or -[-,-]
+		 or similar expression of unconditional true or
+		 false, it should not be negated.  */
+	      && ((high && integer_zerop (high))
+		  || (low && integer_onep (low))))
 	    {
 	      in_p = !in_p;
 	      exp = arg0;
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index 016a5d1..3cbc970 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -2725,7 +2725,7 @@
 
   if (vnresult)
     {
-      if (vnresult->result_vdef)
+      if (vnresult->result_vdef && vdef)
 	changed |= set_ssa_val_to (vdef, vnresult->result_vdef);
 
       if (!vnresult->result && lhs)
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index d4b1400..4b67987 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -862,14 +862,16 @@
   return found;
 }
 
-/* Union two constraint vectors, TO and FROM.  Put the result in TO.  */
+/* Union two constraint vectors, TO and FROM.  Put the result in TO. 
+   Returns true of TO set is changed.  */
 
-static void
+static bool
 constraint_set_union (vec<constraint_t> *to,
 		      vec<constraint_t> *from)
 {
   int i;
   constraint_t c;
+  bool any_change = false;
 
   FOR_EACH_VEC_ELT (*from, i, c)
     {
@@ -877,8 +879,10 @@
 	{
 	  unsigned int place = to->lower_bound (c, constraint_less);
 	  to->safe_insert (place, c);
+          any_change = true;
 	}
     }
+  return any_change;
 }
 
 /* Expands the solution in SET to all sub-fields of variables included.
@@ -1014,22 +1018,24 @@
 
 
 /* Condense two variable nodes into a single variable node, by moving
-   all associated info from SRC to TO.  */
+   all associated info from FROM to TO. Returns true if TO node's
+   constraint set changes after the merge  */
 
-static void
+static bool
 merge_node_constraints (constraint_graph_t graph, unsigned int to,
 			unsigned int from)
 {
   unsigned int i;
   constraint_t c;
+  bool any_change = false;
 
   gcc_assert (find (from) == to);
 
   /* Move all complex constraints from src node into to node  */
   FOR_EACH_VEC_ELT (graph->complex[from], i, c)
     {
-      /* In complex constraints for node src, we may have either
-	 a = *src, and *src = a, or an offseted constraint which are
+      /* In complex constraints for node FROM, we may have either
+	 a = *FROM, and *FROM = a, or an offseted constraint which are
 	 always added to the rhs node's constraints.  */
 
       if (c->rhs.type == DEREF)
@@ -1038,9 +1044,12 @@
 	c->lhs.var = to;
       else
 	c->rhs.var = to;
+
     }
-  constraint_set_union (&graph->complex[to], &graph->complex[from]);
+  any_change = constraint_set_union (&graph->complex[to],
+				     &graph->complex[from]);
   graph->complex[from].release ();
+  return any_change;
 }
 
 
@@ -1471,7 +1480,11 @@
     stats.unified_vars_static++;
 
   merge_graph_nodes (graph, to, from);
-  merge_node_constraints (graph, to, from);
+  if (merge_node_constraints (graph, to, from))
+    {
+      if (update_changed)
+	bitmap_set_bit (changed, to);
+    }
 
   /* Mark TO as changed if FROM was changed. If TO was already marked
      as changed, decrease the changed count.  */
diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c
index b20d306..a081ad9 100644
--- a/gcc/tree-ssa-tail-merge.c
+++ b/gcc/tree-ssa-tail-merge.c
@@ -297,7 +297,8 @@
   tree val;
   def_operand_p def_p;
 
-  if (gimple_has_side_effects (stmt))
+  if (gimple_has_side_effects (stmt)
+      || gimple_vdef (stmt) != NULL_TREE)
     return false;
 
   def_p = SINGLE_SSA_DEF_OPERAND (stmt, SSA_OP_DEF);
@@ -1451,6 +1452,8 @@
 replace_block_by (basic_block bb1, basic_block bb2)
 {
   edge pred_edge;
+  edge e1, e2;
+  edge_iterator ei;
   unsigned int i;
   gimple bb2_phi;
 
@@ -1483,6 +1486,24 @@
 
   bb2->count += bb1->count;
 
+  /* Merge the outgoing edge counts from bb1 onto bb2.  */
+  gcov_type out_sum = 0;
+  FOR_EACH_EDGE (e1, ei, bb1->succs)
+    {
+      e2 = find_edge (bb2, e1->dest);
+      gcc_assert (e2);
+      e2->count += e1->count;
+      out_sum += e2->count;
+    }
+  /* Recompute the edge probabilities from the new merged edge count.
+     Use the sum of the new merged edge counts computed above instead
+     of bb2's merged count, in case there are profile count insanities
+     making the bb count inconsistent with the edge weights.  */
+  FOR_EACH_EDGE (e2, ei, bb2->succs)
+    {
+      e2->probability = GCOV_COMPUTE_SCALE (e2->count, out_sum);
+    }
+
   /* Do updates that use bb1, before deleting bb1.  */
   release_last_vdef (bb1);
   same_succ_flush_bb (bb1);
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index 0e4cbc9..160f4dd 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -402,6 +402,7 @@
 	 threading through.  That's the edge we want to redirect.  */
       victim = find_edge (rd->dup_block, THREAD_TARGET (e)->dest);
       e2 = redirect_edge_and_branch (victim, THREAD_TARGET2 (e)->dest);
+      e2->count = THREAD_TARGET2 (e)->count;
 
       /* If we redirected the edge, then we need to copy PHI arguments
 	 at the target.  If the edge already existed (e2 != victim case),
@@ -496,18 +497,8 @@
       free (el);
 
       thread_stats.num_threaded_edges++;
-      /* If we are threading through a joiner block, then we have to
-	 find the edge we want to redirect and update some PHI nodes.  */
-      if (THREAD_TARGET2 (e))
-	{
-	  edge e2;
 
-	  /* We want to redirect the incoming edge to the joiner block (E)
-	     to instead reach the duplicate of the joiner block.  */
-	  e2 = redirect_edge_and_branch (e, rd->dup_block);
-	  flush_pending_stmts (e2);
-	}
-      else if (rd->dup_block)
+      if (rd->dup_block)
 	{
 	  edge e2;
 
@@ -521,9 +512,15 @@
 	     the computation overflows.  */
 	  if (rd->dup_block->frequency < BB_FREQ_MAX * 2)
 	    rd->dup_block->frequency += EDGE_FREQUENCY (e);
-	  EDGE_SUCC (rd->dup_block, 0)->count += e->count;
-	  /* Redirect the incoming edge to the appropriate duplicate
-	     block.  */
+
+	  /* In the case of threading through a joiner block, the outgoing
+	     edges from the duplicate block were updated when they were
+	     redirected during ssa_fix_duplicate_block_edges.  */
+	  if (!THREAD_TARGET2 (e))
+	    EDGE_SUCC (rd->dup_block, 0)->count += e->count;
+
+	  /* Redirect the incoming edge (possibly to the joiner block) to the
+	     appropriate duplicate block.  */
 	  e2 = redirect_edge_and_branch (e, rd->dup_block);
 	  gcc_assert (e == e2);
 	  flush_pending_stmts (e2);
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index d365488..5a7acd8 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -476,41 +476,6 @@
   return false;
 }
 
-/* Check if data references pointed by DR_I and DR_J are same or
-   belong to same interleaving group.  Return FALSE if drs are
-   different, otherwise return TRUE.  */
-
-static bool
-vect_same_range_drs (data_reference_p dr_i, data_reference_p dr_j)
-{
-  gimple stmt_i = DR_STMT (dr_i);
-  gimple stmt_j = DR_STMT (dr_j);
-
-  if (operand_equal_p (DR_REF (dr_i), DR_REF (dr_j), 0)
-      || (GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt_i))
-	    && GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt_j))
-	    && (GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt_i))
-		== GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt_j)))))
-    return true;
-  else
-    return false;
-}
-
-/* If address ranges represented by DDR_I and DDR_J are equal,
-   return TRUE, otherwise return FALSE.  */
-
-static bool
-vect_vfa_range_equal (ddr_p ddr_i, ddr_p ddr_j)
-{
-  if ((vect_same_range_drs (DDR_A (ddr_i), DDR_A (ddr_j))
-       && vect_same_range_drs (DDR_B (ddr_i), DDR_B (ddr_j)))
-      || (vect_same_range_drs (DDR_A (ddr_i), DDR_B (ddr_j))
-	  && vect_same_range_drs (DDR_B (ddr_i), DDR_A (ddr_j))))
-    return true;
-  else
-    return false;
-}
-
 /* Insert DDR into LOOP_VINFO list of ddrs that may alias and need to be
    tested at run-time.  Return TRUE if DDR was successfully inserted.
    Return false if versioning is not supported.  */
@@ -2626,74 +2591,383 @@
   return true;
 }
 
+/*  A helper function used in the comparator function to sort data
+    references.  T1 and T2 are two data references to be compared.
+    The function returns -1, 0, or 1.  */
+
+static int
+compare_tree (tree t1, tree t2)
+{
+  int i, cmp;
+  enum tree_code code;
+  char tclass;
+
+  if (t1 == t2)
+    return 0;
+  if (t1 == NULL)
+    return -1;
+  if (t2 == NULL)
+    return 1;
+
+
+  if (TREE_CODE (t1) != TREE_CODE (t2))
+    return TREE_CODE (t1) < TREE_CODE (t2) ? -1 : 1;
+
+  code = TREE_CODE (t1);
+  switch (code)
+    {
+    /* For const values, we can just use hash values for comparisons.  */
+    case INTEGER_CST:
+    case REAL_CST:
+    case FIXED_CST:
+    case STRING_CST:
+    case COMPLEX_CST:
+    case VECTOR_CST:
+      {
+	hashval_t h1 = iterative_hash_expr (t1, 0);
+	hashval_t h2 = iterative_hash_expr (t2, 0);
+	if (h1 != h2)
+	  return h1 < h2 ? -1 : 1;
+	break;
+      }
+
+    case SSA_NAME:
+      cmp = compare_tree (SSA_NAME_VAR (t1), SSA_NAME_VAR (t2));
+      if (cmp != 0)
+	return cmp;
+
+      if (SSA_NAME_VERSION (t1) != SSA_NAME_VERSION (t2))
+	return SSA_NAME_VERSION (t1) < SSA_NAME_VERSION (t2) ? -1 : 1;
+      break;
+
+    default:
+      tclass = TREE_CODE_CLASS (code);
+
+      /* For var-decl, we could compare their UIDs.  */
+      if (tclass == tcc_declaration)
+	{
+	  if (DECL_UID (t1) != DECL_UID (t2))
+	    return DECL_UID (t1) < DECL_UID (t2) ? -1 : 1;
+	  break;
+	}
+
+      /* For expressions with operands, compare their operands recursively.  */
+      for (i = TREE_OPERAND_LENGTH (t1) - 1; i >= 0; --i)
+	{
+	  cmp = compare_tree (TREE_OPERAND (t1, i), TREE_OPERAND (t2, i));
+	  if (cmp != 0)
+	    return cmp;
+	}
+    }
+
+  return 0;
+}
+
+/* Operator == between two dr_with_seg_len objects.
+
+   This equality operator is used to make sure two data refs
+   are the same one so that we will consider to combine the
+   aliasing checks of those two pairs of data dependent data
+   refs.  */
+
+static bool
+operator == (const dr_with_seg_len& d1,
+	     const dr_with_seg_len& d2)
+{
+  return operand_equal_p (DR_BASE_ADDRESS (d1.dr),
+			  DR_BASE_ADDRESS (d2.dr), 0)
+	   && compare_tree (d1.offset, d2.offset) == 0
+	   && compare_tree (d1.seg_len, d2.seg_len) == 0;
+}
+
+/* Function comp_dr_with_seg_len_pair.
+
+   Comparison function for sorting objects of dr_with_seg_len_pair_t
+   so that we can combine aliasing checks in one scan.  */
+
+static int
+comp_dr_with_seg_len_pair (const void *p1_, const void *p2_)
+{
+  const dr_with_seg_len_pair_t* p1 = (const dr_with_seg_len_pair_t *) p1_;
+  const dr_with_seg_len_pair_t* p2 = (const dr_with_seg_len_pair_t *) p2_;
+
+  const dr_with_seg_len &p11 = p1->first,
+			&p12 = p1->second,
+			&p21 = p2->first,
+			&p22 = p2->second;
+
+  /* For DR pairs (a, b) and (c, d), we only consider to merge the alias checks
+     if a and c have the same basic address snd step, and b and d have the same
+     address and step.  Therefore, if any a&c or b&d don't have the same address
+     and step, we don't care the order of those two pairs after sorting.  */
+  int comp_res;
+
+  if ((comp_res = compare_tree (DR_BASE_ADDRESS (p11.dr),
+				DR_BASE_ADDRESS (p21.dr))) != 0)
+    return comp_res;
+  if ((comp_res = compare_tree (DR_BASE_ADDRESS (p12.dr),
+				DR_BASE_ADDRESS (p22.dr))) != 0)
+    return comp_res;
+  if ((comp_res = compare_tree (DR_STEP (p11.dr), DR_STEP (p21.dr))) != 0)
+    return comp_res;
+  if ((comp_res = compare_tree (DR_STEP (p12.dr), DR_STEP (p22.dr))) != 0)
+    return comp_res;
+  if ((comp_res = compare_tree (p11.offset, p21.offset)) != 0)
+    return comp_res;
+  if ((comp_res = compare_tree (p12.offset, p22.offset)) != 0)
+    return comp_res;
+
+  return 0;
+}
+
+template <class T> static void
+swap (T& a, T& b)
+{
+  T c (a);
+  a = b;
+  b = c;
+}
+
+/* Function vect_vfa_segment_size.
+
+   Create an expression that computes the size of segment
+   that will be accessed for a data reference.  The functions takes into
+   account that realignment loads may access one more vector.
+
+   Input:
+     DR: The data reference.
+     LENGTH_FACTOR: segment length to consider.
+
+   Return an expression whose value is the size of segment which will be
+   accessed by DR.  */
+
+static tree
+vect_vfa_segment_size (struct data_reference *dr, tree length_factor)
+{
+  tree segment_length;
+
+  if (integer_zerop (DR_STEP (dr)))
+    segment_length = TYPE_SIZE_UNIT (TREE_TYPE (DR_REF (dr)));
+  else
+    segment_length = size_binop (MULT_EXPR,
+				 fold_convert (sizetype, DR_STEP (dr)),
+				 fold_convert (sizetype, length_factor));
+
+  if (vect_supportable_dr_alignment (dr, false)
+	== dr_explicit_realign_optimized)
+    {
+      tree vector_size = TYPE_SIZE_UNIT
+			  (STMT_VINFO_VECTYPE (vinfo_for_stmt (DR_STMT (dr))));
+
+      segment_length = size_binop (PLUS_EXPR, segment_length, vector_size);
+    }
+  return segment_length;
+}
+
 /* Function vect_prune_runtime_alias_test_list.
 
    Prune a list of ddrs to be tested at run-time by versioning for alias.
+   Merge several alias checks into one if possible.
    Return FALSE if resulting list of ddrs is longer then allowed by
    PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS, otherwise return TRUE.  */
 
 bool
 vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo)
 {
-  vec<ddr_p>  ddrs =
+  vec<ddr_p> may_alias_ddrs =
     LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo);
-  unsigned i, j;
+  vec<dr_with_seg_len_pair_t>& comp_alias_ddrs =
+    LOOP_VINFO_COMP_ALIAS_DDRS (loop_vinfo);
+  int vect_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
+  tree scalar_loop_iters = LOOP_VINFO_NITERS (loop_vinfo);
+
+  ddr_p ddr;
+  unsigned int i;
+  tree length_factor;
 
   if (dump_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location,
-                     "=== vect_prune_runtime_alias_test_list ===");
+                     "=== vect_prune_runtime_alias_test_list ===\n");
 
-  for (i = 0; i < ddrs.length (); )
+  if (may_alias_ddrs.is_empty ())
+    return true;
+
+  /* Basically, for each pair of dependent data refs store_ptr_0
+     and load_ptr_0, we create an expression:
+
+     ((store_ptr_0 + store_segment_length_0) <= load_ptr_0)
+     || (load_ptr_0 + load_segment_length_0) <= store_ptr_0))
+
+     for aliasing checks.  However, in some cases we can decrease
+     the number of checks by combining two checks into one.  For
+     example, suppose we have another pair of data refs store_ptr_0
+     and load_ptr_1, and if the following condition is satisfied:
+
+     load_ptr_0 < load_ptr_1  &&
+     load_ptr_1 - load_ptr_0 - load_segment_length_0 < store_segment_length_0
+
+     (this condition means, in each iteration of vectorized loop,
+     the accessed memory of store_ptr_0 cannot be between the memory
+     of load_ptr_0 and load_ptr_1.)
+
+     we then can use only the following expression to finish the
+     alising checks between store_ptr_0 & load_ptr_0 and
+     store_ptr_0 & load_ptr_1:
+
+     ((store_ptr_0 + store_segment_length_0) <= load_ptr_0)
+     || (load_ptr_1 + load_segment_length_1 <= store_ptr_0))
+
+     Note that we only consider that load_ptr_0 and load_ptr_1 have the
+     same basic address.  */
+
+  comp_alias_ddrs.create (may_alias_ddrs.length ());
+
+  /* First, we collect all data ref pairs for aliasing checks.  */
+  FOR_EACH_VEC_ELT (may_alias_ddrs, i, ddr)
     {
-      bool found;
-      ddr_p ddr_i;
+      struct data_reference *dr_a, *dr_b;
+      gimple dr_group_first_a, dr_group_first_b;
+      tree segment_length_a, segment_length_b;
+      gimple stmt_a, stmt_b;
 
-      ddr_i = ddrs[i];
-      found = false;
-
-      for (j = 0; j < i; j++)
-        {
-	  ddr_p ddr_j = ddrs[j];
-
-	  if (vect_vfa_range_equal (ddr_i, ddr_j))
-	    {
-	      if (dump_enabled_p ())
-		{
-		  dump_printf_loc (MSG_NOTE, vect_location,
-                                   "found equal ranges ");
-		  dump_generic_expr (MSG_NOTE, TDF_SLIM, DR_REF (DDR_A (ddr_i)));
-		  dump_printf (MSG_NOTE,  ", ");
-		  dump_generic_expr (MSG_NOTE, TDF_SLIM, DR_REF (DDR_B (ddr_i)));
-		  dump_printf (MSG_NOTE,  " and ");
-		  dump_generic_expr (MSG_NOTE, TDF_SLIM, DR_REF (DDR_A (ddr_j)));
-		  dump_printf (MSG_NOTE,  ", ");
-		  dump_generic_expr (MSG_NOTE, TDF_SLIM, DR_REF (DDR_B (ddr_j)));
-		}
-	      found = true;
-	      break;
-	    }
+      dr_a = DDR_A (ddr);
+      stmt_a = DR_STMT (DDR_A (ddr));
+      dr_group_first_a = GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt_a));
+      if (dr_group_first_a)
+	{
+	  stmt_a = dr_group_first_a;
+	  dr_a = STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt_a));
 	}
 
-      if (found)
-      {
-	ddrs.ordered_remove (i);
-	continue;
-      }
-      i++;
+      dr_b = DDR_B (ddr);
+      stmt_b = DR_STMT (DDR_B (ddr));
+      dr_group_first_b = GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt_b));
+      if (dr_group_first_b)
+	{
+	  stmt_b = dr_group_first_b;
+	  dr_b = STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt_b));
+	}
+
+      if (!operand_equal_p (DR_STEP (dr_a), DR_STEP (dr_b), 0))
+	length_factor = scalar_loop_iters;
+      else
+	length_factor = size_int (vect_factor);
+      segment_length_a = vect_vfa_segment_size (dr_a, length_factor);
+      segment_length_b = vect_vfa_segment_size (dr_b, length_factor);
+
+      dr_with_seg_len_pair_t dr_with_seg_len_pair
+	  (dr_with_seg_len (dr_a, segment_length_a),
+	   dr_with_seg_len (dr_b, segment_length_b));
+
+      if (compare_tree (DR_BASE_ADDRESS (dr_a), DR_BASE_ADDRESS (dr_b)) > 0)
+	swap (dr_with_seg_len_pair.first, dr_with_seg_len_pair.second);
+
+      comp_alias_ddrs.safe_push (dr_with_seg_len_pair);
     }
 
-  if (ddrs.length () >
-       (unsigned) PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS))
+  /* Second, we sort the collected data ref pairs so that we can scan
+     them once to combine all possible aliasing checks.  */
+  comp_alias_ddrs.qsort (comp_dr_with_seg_len_pair);
+
+  /* Third, we scan the sorted dr pairs and check if we can combine
+     alias checks of two neighbouring dr pairs.  */
+  for (size_t i = 1; i < comp_alias_ddrs.length (); ++i)
+    {
+      /* Deal with two ddrs (dr_a1, dr_b1) and (dr_a2, dr_b2).  */
+      dr_with_seg_len *dr_a1 = &comp_alias_ddrs[i-1].first,
+		      *dr_b1 = &comp_alias_ddrs[i-1].second,
+		      *dr_a2 = &comp_alias_ddrs[i].first,
+		      *dr_b2 = &comp_alias_ddrs[i].second;
+
+      /* Remove duplicate data ref pairs.  */
+      if (*dr_a1 == *dr_a2 && *dr_b1 == *dr_b2)
+	{
+	  if (dump_enabled_p ())
+	    {
+	      dump_printf_loc (MSG_NOTE, vect_location,
+			       "found equal ranges ");
+	      dump_generic_expr (MSG_NOTE, TDF_SLIM,
+				 DR_REF (dr_a1->dr));
+	      dump_printf (MSG_NOTE,  ", ");
+	      dump_generic_expr (MSG_NOTE, TDF_SLIM,
+				 DR_REF (dr_b1->dr));
+	      dump_printf (MSG_NOTE,  " and ");
+	      dump_generic_expr (MSG_NOTE, TDF_SLIM,
+				 DR_REF (dr_a2->dr));
+	      dump_printf (MSG_NOTE,  ", ");
+	      dump_generic_expr (MSG_NOTE, TDF_SLIM,
+				 DR_REF (dr_b2->dr));
+	      dump_printf (MSG_NOTE, "\n");
+	    }
+
+	  comp_alias_ddrs.ordered_remove (i--);
+	  continue;
+	}
+
+      if (*dr_a1 == *dr_a2 || *dr_b1 == *dr_b2)
+	{
+	  /* We consider the case that DR_B1 and DR_B2 are same memrefs,
+	     and DR_A1 and DR_A2 are two consecutive memrefs.  */
+	  if (*dr_a1 == *dr_a2)
+	    {
+	      swap (dr_a1, dr_b1);
+	      swap (dr_a2, dr_b2);
+	    }
+
+	  if (!operand_equal_p (DR_BASE_ADDRESS (dr_a1->dr),
+				DR_BASE_ADDRESS (dr_a2->dr),
+				0)
+	      || !host_integerp (dr_a1->offset, 0)
+	      || !host_integerp (dr_a2->offset, 0))
+	    continue;
+
+	  HOST_WIDE_INT diff = TREE_INT_CST_LOW (dr_a2->offset) -
+			       TREE_INT_CST_LOW (dr_a1->offset);
+
+
+	  /* Now we check if the following condition is satisfied:
+
+	     DIFF - SEGMENT_LENGTH_A < SEGMENT_LENGTH_B
+
+	     where DIFF = DR_A2->OFFSET - DR_A1->OFFSET.  However,
+	     SEGMENT_LENGTH_A or SEGMENT_LENGTH_B may not be constant so we
+	     have to make a best estimation.  We can get the minimum value
+	     of SEGMENT_LENGTH_B as a constant, represented by MIN_SEG_LEN_B,
+	     then either of the following two conditions can guarantee the
+	     one above:
+
+	     1: DIFF <= MIN_SEG_LEN_B
+	     2: DIFF - SEGMENT_LENGTH_A < MIN_SEG_LEN_B
+
+	     */
+
+	  HOST_WIDE_INT
+	  min_seg_len_b = (TREE_CODE (dr_b1->seg_len) == INTEGER_CST) ?
+			     TREE_INT_CST_LOW (dr_b1->seg_len) :
+			     vect_factor;
+
+	  if (diff <= min_seg_len_b
+	      || (TREE_CODE (dr_a1->seg_len) == INTEGER_CST
+		  && diff - (HOST_WIDE_INT) TREE_INT_CST_LOW (dr_a1->seg_len) <
+		     min_seg_len_b))
+	    {
+	      dr_a1->seg_len = size_binop (PLUS_EXPR,
+					   dr_a2->seg_len, size_int (diff));
+	      comp_alias_ddrs.ordered_remove (i--);
+	    }
+	}
+    }
+
+  if ((int) comp_alias_ddrs.length () >
+      PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS))
     {
       if (dump_enabled_p ())
 	{
-	  dump_printf_loc (MSG_MISSED_OPTIMIZATION,  vect_location, 
-                           "disable versioning for alias - max number of "
-                           "generated checks exceeded.");
+	  dump_printf_loc (MSG_MISSED_OPTIMIZATION,  vect_location,
+	                   "disable versioning for alias - max number of "
+	                   "generated checks exceeded.\n");
 	}
 
-      LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo).truncate (0);
-
       return false;
     }
 
diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c
index 8dd1773..b13fbef 100644
--- a/gcc/tree-vect-loop-manip.c
+++ b/gcc/tree-vect-loop-manip.c
@@ -2282,17 +2282,12 @@
 static void
 vect_create_cond_for_alias_checks (loop_vec_info loop_vinfo,
 				   tree * cond_expr,
-				   gimple_seq * cond_expr_stmt_list)
+				   gimple_seq *)
 {
-  struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
-  vec<ddr_p>  may_alias_ddrs =
-    LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo);
-  int vect_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
-  tree scalar_loop_iters = LOOP_VINFO_NITERS (loop_vinfo);
+  vec<dr_with_seg_len_pair_t> comp_alias_ddrs =
+    LOOP_VINFO_COMP_ALIAS_DDRS (loop_vinfo);
 
-  ddr_p ddr;
-  unsigned int i;
-  tree part_cond_expr, length_factor;
+  tree part_cond_expr;
 
   /* Create expression
      ((store_ptr_0 + store_segment_length_0) <= load_ptr_0)
@@ -2303,67 +2298,39 @@
      ((store_ptr_n + store_segment_length_n) <= load_ptr_n)
      || (load_ptr_n + load_segment_length_n) <= store_ptr_n))  */
 
-  if (may_alias_ddrs.is_empty ())
+  if (comp_alias_ddrs.is_empty ())
     return;
 
-  FOR_EACH_VEC_ELT (may_alias_ddrs, i, ddr)
+  for (size_t i = 0, s = comp_alias_ddrs.length (); i < s; ++i)
     {
-      struct data_reference *dr_a, *dr_b;
-      gimple dr_group_first_a, dr_group_first_b;
-      tree addr_base_a, addr_base_b;
-      tree segment_length_a, segment_length_b;
-      gimple stmt_a, stmt_b;
-      tree seg_a_min, seg_a_max, seg_b_min, seg_b_max;
+      const dr_with_seg_len& dr_a = comp_alias_ddrs[i].first;
+      const dr_with_seg_len& dr_b = comp_alias_ddrs[i].second;
+      tree segment_length_a = dr_a.seg_len;
+      tree segment_length_b = dr_b.seg_len;
 
-      dr_a = DDR_A (ddr);
-      stmt_a = DR_STMT (DDR_A (ddr));
-      dr_group_first_a = GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt_a));
-      if (dr_group_first_a)
-        {
-	  stmt_a = dr_group_first_a;
-	  dr_a = STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt_a));
-	}
-
-      dr_b = DDR_B (ddr);
-      stmt_b = DR_STMT (DDR_B (ddr));
-      dr_group_first_b = GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt_b));
-      if (dr_group_first_b)
-        {
-	  stmt_b = dr_group_first_b;
-	  dr_b = STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt_b));
-	}
-
-      addr_base_a =
-        vect_create_addr_base_for_vector_ref (stmt_a, cond_expr_stmt_list,
-					      NULL_TREE, loop);
-      addr_base_b =
-        vect_create_addr_base_for_vector_ref (stmt_b, cond_expr_stmt_list,
-					      NULL_TREE, loop);
-
-      if (!operand_equal_p (DR_STEP (dr_a), DR_STEP (dr_b), 0))
-	length_factor = scalar_loop_iters;
-      else
-	length_factor = size_int (vect_factor);
-      segment_length_a = vect_vfa_segment_size (dr_a, length_factor);
-      segment_length_b = vect_vfa_segment_size (dr_b, length_factor);
+      tree addr_base_a
+	= fold_build_pointer_plus (DR_BASE_ADDRESS (dr_a.dr), dr_a.offset);
+      tree addr_base_b
+	= fold_build_pointer_plus (DR_BASE_ADDRESS (dr_b.dr), dr_b.offset);
 
       if (dump_enabled_p ())
 	{
-	  dump_printf_loc (MSG_NOTE, vect_location, 
-                           "create runtime check for data references ");
-	  dump_generic_expr (MSG_NOTE, TDF_SLIM, DR_REF (dr_a));
+	  dump_printf_loc (MSG_NOTE, vect_location,
+			   "create runtime check for data references ");
+	  dump_generic_expr (MSG_NOTE, TDF_SLIM, DR_REF (dr_a.dr));
 	  dump_printf (MSG_NOTE, " and ");
-	  dump_generic_expr (MSG_NOTE, TDF_SLIM, DR_REF (dr_b));
+	  dump_generic_expr (MSG_NOTE, TDF_SLIM, DR_REF (dr_b.dr));
+	  dump_printf (MSG_NOTE, "\n");
 	}
 
-      seg_a_min = addr_base_a;
-      seg_a_max = fold_build_pointer_plus (addr_base_a, segment_length_a);
-      if (tree_int_cst_compare (DR_STEP (dr_a), size_zero_node) < 0)
+      tree seg_a_min = addr_base_a;
+      tree seg_a_max = fold_build_pointer_plus (addr_base_a, segment_length_a);
+      if (tree_int_cst_compare (DR_STEP (dr_a.dr), size_zero_node) < 0)
 	seg_a_min = seg_a_max, seg_a_max = addr_base_a;
 
-      seg_b_min = addr_base_b;
-      seg_b_max = fold_build_pointer_plus (addr_base_b, segment_length_b);
-      if (tree_int_cst_compare (DR_STEP (dr_b), size_zero_node) < 0)
+      tree seg_b_min = addr_base_b;
+      tree seg_b_max = fold_build_pointer_plus (addr_base_b, segment_length_b);
+      if (tree_int_cst_compare (DR_STEP (dr_b.dr), size_zero_node) < 0)
 	seg_b_min = seg_b_max, seg_b_max = addr_base_b;
 
       part_cond_expr =
@@ -2381,7 +2348,9 @@
   if (dump_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location,
 		     "created %u versioning for alias checks.\n",
-		     may_alias_ddrs.length ());
+		     comp_alias_ddrs.length ());
+
+  comp_alias_ddrs.release ();
 }
 
 
@@ -2490,6 +2459,73 @@
       adjust_phi_and_debug_stmts (orig_phi, e, PHI_RESULT (new_phi));
     }
 
+
+  /* Extract load statements on memrefs with zero-stride accesses.  */
+
+  if (LOOP_REQUIRES_VERSIONING_FOR_ALIAS (loop_vinfo))
+    {
+      /* In the loop body, we iterate each statement to check if it is a load.
+	 Then we check the DR_STEP of the data reference.  If DR_STEP is zero,
+	 then we will hoist the load statement to the loop preheader.  */
+
+      basic_block *bbs = LOOP_VINFO_BBS (loop_vinfo);
+      int nbbs = loop->num_nodes;
+
+      for (int i = 0; i < nbbs; ++i)
+	{
+	  for (gimple_stmt_iterator si = gsi_start_bb (bbs[i]);
+	       !gsi_end_p (si);)
+	    {
+	      gimple stmt = gsi_stmt (si);
+	      stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+	      struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
+
+	      if (is_gimple_assign (stmt)
+		  && (!dr
+		      || (DR_IS_READ (dr) && integer_zerop (DR_STEP (dr)))))
+		{
+		  bool hoist = true;
+		  ssa_op_iter iter;
+		  tree var;
+
+		  /* We hoist a statement if all SSA uses in it are defined
+		     outside of the loop.  */
+		  FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_USE)
+		    {
+		      gimple def = SSA_NAME_DEF_STMT (var);
+		      if (!gimple_nop_p (def)
+			  && flow_bb_inside_loop_p (loop, gimple_bb (def)))
+			{
+			  hoist = false;
+			  break;
+			}
+		    }
+
+		  if (hoist)
+		    {
+		      if (dr)
+			gimple_set_vuse (stmt, NULL);
+
+		      gsi_remove (&si, false);
+		      gsi_insert_on_edge_immediate (loop_preheader_edge (loop),
+						    stmt);
+
+		      if (dump_enabled_p ())
+			{
+			  dump_printf_loc
+			      (MSG_NOTE, vect_location,
+			       "hoisting out of the vectorized loop: ");
+			  dump_gimple_stmt (MSG_NOTE, TDF_SLIM, stmt, 0);
+			  dump_printf (MSG_NOTE, "\n");
+			}
+		      continue;
+		    }
+		}
+	      gsi_next (&si);
+	    }
+	}
+    }
+
   /* End loop-exit-fixes after versioning.  */
 
   update_ssa (TODO_update_ssa);
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index f378bc0..e1a5971 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -2045,6 +2045,13 @@
      a3 = ...
      a2 = operation (a3, a1)
 
+   or
+
+   a3 = ...
+   loop_header:
+     a1 = phi < a0, a2 >
+     a2 = operation (a3, a1)
+
    such that:
    1. operation is commutative and associative and it is safe to
       change the order of the computation (if CHECK_REDUCTION is true)
@@ -2400,6 +2407,7 @@
   if (def2 && def2 == phi
       && (code == COND_EXPR
 	  || !def1 || gimple_nop_p (def1)
+	  || !flow_bb_inside_loop_p (loop, gimple_bb (def1))
           || (def1 && flow_bb_inside_loop_p (loop, gimple_bb (def1))
               && (is_gimple_assign (def1)
 		  || is_gimple_call (def1)
@@ -2418,6 +2426,7 @@
   if (def1 && def1 == phi
       && (code == COND_EXPR
 	  || !def2 || gimple_nop_p (def2)
+	  || !flow_bb_inside_loop_p (loop, gimple_bb (def2))
           || (def2 && flow_bb_inside_loop_p (loop, gimple_bb (def2))
  	      && (is_gimple_assign (def2)
 		  || is_gimple_call (def2)
@@ -4326,7 +4335,8 @@
          result.  (The reduction result is expected to have two immediate uses -
          one at the latch block, and one at the loop exit).  */
       FOR_EACH_IMM_USE_FAST (use_p, imm_iter, scalar_dest)
-        if (!flow_bb_inside_loop_p (loop, gimple_bb (USE_STMT (use_p))))
+        if (!flow_bb_inside_loop_p (loop, gimple_bb (USE_STMT (use_p)))
+	    && !is_gimple_debug (USE_STMT (use_p)))
           phis.safe_push (USE_STMT (use_p));
 
       /* While we expect to have found an exit_phi because of loop-closed-ssa
@@ -4455,7 +4465,10 @@
       FOR_EACH_IMM_USE_FAST (use_p, imm_iter, scalar_dest)
         {
           if (!flow_bb_inside_loop_p (loop, gimple_bb (USE_STMT (use_p))))
-            phis.safe_push (USE_STMT (use_p));
+	    {
+	      if (!is_gimple_debug (USE_STMT (use_p)))
+		phis.safe_push (USE_STMT (use_p));
+	    }
           else
             {
               if (double_reduc && gimple_code (USE_STMT (use_p)) == GIMPLE_PHI)
@@ -4465,7 +4478,8 @@
                   FOR_EACH_IMM_USE_FAST (phi_use_p, phi_imm_iter, phi_res)
                     {
                       if (!flow_bb_inside_loop_p (loop,
-                                             gimple_bb (USE_STMT (phi_use_p))))
+                                             gimple_bb (USE_STMT (phi_use_p)))
+			  && !is_gimple_debug (USE_STMT (phi_use_p)))
                         phis.safe_push (USE_STMT (phi_use_p));
                     }
                 }
@@ -5729,7 +5743,6 @@
 		     the chain.  */
 		  gsi_next (&si);
 		  vect_remove_stores (GROUP_FIRST_ELEMENT (stmt_info));
- 		  continue;
 		}
 	      else
 		{
@@ -5739,11 +5752,13 @@
 		  unlink_stmt_vdef (store);
 		  gsi_remove (&si, true);
 		  release_defs (store);
-		  continue;
 		}
-	    }
 
-	  if (!transform_pattern_stmt && gsi_end_p (pattern_def_si))
+	      /* Stores can only appear at the end of pattern statements.  */
+	      gcc_assert (!transform_pattern_stmt);
+	      pattern_def_seq = NULL;
+	    }
+	  else if (!transform_pattern_stmt && gsi_end_p (pattern_def_si))
 	    {
 	      pattern_def_seq = NULL;
 	      gsi_next (&si);
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index acc4c09..e2ddeb3 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -174,7 +174,35 @@
   bool first_pattern;
 } *slp_oprnd_info;
 
+/* This struct is used to store the information of a data reference,
+   including the data ref itself, the access offset (calculated by summing its
+   offset and init) and the segment length for aliasing checks.
+   This is used to merge alias checks.  */
 
+struct dr_with_seg_len
+{
+  dr_with_seg_len (data_reference_p d, tree len)
+    : dr (d),
+      offset (size_binop (PLUS_EXPR, DR_OFFSET (d), DR_INIT (d))),
+      seg_len (len) {}
+
+  data_reference_p dr;
+  tree offset;
+  tree seg_len;
+};
+
+/* This struct contains two dr_with_seg_len objects with aliasing data
+   refs.  Two comparisons are generated from them.  */
+
+struct dr_with_seg_len_pair_t
+{
+  dr_with_seg_len_pair_t (const dr_with_seg_len& d1,
+			       const dr_with_seg_len& d2)
+    : first (d1), second (d2) {}
+
+  dr_with_seg_len first;
+  dr_with_seg_len second;
+};
 
 typedef struct _vect_peel_info
 {
@@ -251,6 +279,10 @@
      for a run-time aliasing check.  */
   vec<ddr_p> may_alias_ddrs;
 
+  /* Data Dependence Relations defining address ranges together with segment
+     lengths from which the run-time aliasing check is built.  */
+  vec<dr_with_seg_len_pair_t> comp_alias_ddrs;
+
   /* Statements in the loop that have data references that are candidates for a
      runtime (loop versioning) misalignment check.  */
   vec<gimple> may_misalign_stmts;
@@ -313,6 +345,7 @@
 #define LOOP_VINFO_MAY_MISALIGN_STMTS(L)   (L)->may_misalign_stmts
 #define LOOP_VINFO_LOC(L)                  (L)->loop_line_number
 #define LOOP_VINFO_MAY_ALIAS_DDRS(L)       (L)->may_alias_ddrs
+#define LOOP_VINFO_COMP_ALIAS_DDRS(L)      (L)->comp_alias_ddrs
 #define LOOP_VINFO_GROUPED_STORES(L)       (L)->grouped_stores
 #define LOOP_VINFO_SLP_INSTANCES(L)        (L)->slp_instances
 #define LOOP_VINFO_SLP_UNROLLING_FACTOR(L) (L)->slp_unrolling_factor
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 0b8fdf9..f61dfd0 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -5246,10 +5246,14 @@
 	       && gimple_assign_rhs_code (op_def) == BIT_IOR_EXPR))
     {
       /* Recurse on each operand.  */
-      retval |= register_edge_assert_for_1 (gimple_assign_rhs1 (op_def),
-					    code, e, bsi);
-      retval |= register_edge_assert_for_1 (gimple_assign_rhs2 (op_def),
-					    code, e, bsi);
+      tree op0 = gimple_assign_rhs1 (op_def);
+      tree op1 = gimple_assign_rhs2 (op_def);
+      if (TREE_CODE (op0) == SSA_NAME
+	  && has_single_use (op0))
+	retval |= register_edge_assert_for_1 (op0, code, e, bsi);
+      if (TREE_CODE (op1) == SSA_NAME
+	  && has_single_use (op1))
+	retval |= register_edge_assert_for_1 (op1, code, e, bsi);
     }
   else if (gimple_assign_rhs_code (op_def) == BIT_NOT_EXPR
 	   && TYPE_PRECISION (TREE_TYPE (gimple_assign_lhs (op_def))) == 1)
@@ -6022,7 +6026,7 @@
           TREE_NO_WARNING (ref) = 1;
         }
     }
-  else if (TREE_CODE (up_sub) == INTEGER_CST
+  else if (0 && TREE_CODE (up_sub) == INTEGER_CST
 	   && (ignore_off_by_one
 	       ? (tree_int_cst_lt (up_bound, up_sub)
 		  && !tree_int_cst_equal (up_bound_p1, up_sub))
diff --git a/gcc/tree.c b/gcc/tree.c
index 9e1faa2..7a36fa8 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -11409,6 +11409,42 @@
   return gcc_eh_personality_decl;
 }
 
+/* TARGET is a call target of GIMPLE call statement
+   (obtained by gimple_call_fn).  Return true if it is
+   OBJ_TYPE_REF representing an virtual call of C++ method.
+   (As opposed to OBJ_TYPE_REF representing objc calls
+   through a cast where middle-end devirtualization machinery
+   can't apply.) */
+
+bool
+virtual_method_call_p (tree target)
+{
+  if (TREE_CODE (target) != OBJ_TYPE_REF)
+    return false;
+  target = TREE_TYPE (target);
+  gcc_checking_assert (TREE_CODE (target) == POINTER_TYPE);
+  target = TREE_TYPE (target);
+  if (TREE_CODE (target) == FUNCTION_TYPE)
+    return false;
+  gcc_checking_assert (TREE_CODE (target) == METHOD_TYPE);
+  return true;
+}
+
+/* REF is OBJ_TYPE_REF, return the class the ref corresponds to.  */
+
+tree
+obj_type_ref_class (tree ref)
+{
+  gcc_checking_assert (TREE_CODE (ref) == OBJ_TYPE_REF);
+  ref = TREE_TYPE (ref);
+  gcc_checking_assert (TREE_CODE (ref) == POINTER_TYPE);
+  ref = TREE_TYPE (ref);
+  gcc_checking_assert (TREE_CODE (ref) == METHOD_TYPE);
+  ref = TREE_VALUE (TYPE_ARG_TYPES (ref));
+  gcc_checking_assert (TREE_CODE (ref) == POINTER_TYPE);
+  return TREE_TYPE (ref);
+}
+
 /* Try to find a base info of BINFO that would have its field decl at offset
    OFFSET within the BINFO type and which is of EXPECTED_TYPE.  If it can be
    found, return, otherwise return NULL_TREE.  */
diff --git a/gcc/tree.h b/gcc/tree.h
index 44eea8e..ee0f9f7 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -5961,6 +5961,8 @@
 extern tree block_ultimate_origin (const_tree);
 
 extern tree get_binfo_at_offset (tree, HOST_WIDE_INT, tree);
+extern bool virtual_method_call_p (tree);
+extern tree obj_type_ref_class (tree ref);
 extern tree get_ref_base_and_extent (tree, HOST_WIDE_INT *,
 				     HOST_WIDE_INT *, HOST_WIDE_INT *);
 extern bool contains_bitfld_component_ref_p (const_tree);
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index 9241744..f14baa1 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -1327,7 +1327,7 @@
    may ICE. Here we only do very minimal sanity check just to make compiler happy.
    Returns true if TARGET is considered ok for call CALL_STMT.  */
 
-static bool
+bool
 check_ic_target (gimple call_stmt, struct cgraph_node *target)
 {
    location_t locus;
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index 0db1562..423ed5e 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -10240,6 +10240,7 @@
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_verify_rtl_sharing               /* todo_flags_finish */
+  TODO_verify_rtl_sharing
+   | TODO_verify_flow                   /* todo_flags_finish */
  }
 };
diff --git a/gcc/varasm.c b/gcc/varasm.c
index bcc2dde..e4c8453 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1484,7 +1484,7 @@
   if (L_IPO_COMP_MODE
       && ((TREE_CODE (decl) == FUNCTION_DECL
            && cgraph_is_auxiliary (decl))
-          || (TREE_CODE (decl) == VAR_DECL
+          || (TREE_CODE (decl) == VAR_DECL && varpool_get_node (decl)
               && varpool_is_auxiliary (varpool_get_node (decl)))))
     return;
 
diff --git a/gcc/varpool.c b/gcc/varpool.c
index 11fcac6..417be4a 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -366,7 +366,7 @@
 	{
 	  enqueue_node (node, &first);
           if (cgraph_dump_file)
-	    fprintf (cgraph_dump_file, " %s", varpool_node_asm_name (node));
+	    fprintf (cgraph_dump_file, " %s/%d", varpool_node_asm_name (node), node->symbol.order);
 	}
     }
   while (first != (struct varpool_node *)(void *)1)
@@ -404,7 +404,7 @@
       if (!node->symbol.aux)
 	{
           if (cgraph_dump_file)
-	    fprintf (cgraph_dump_file, " %s", varpool_node_asm_name (node));
+	    fprintf (cgraph_dump_file, " %s/%d", varpool_node_asm_name (node), node->symbol.order);
 	  varpool_remove_node (node);
 	}
     }
diff --git a/gnattools/ChangeLog b/gnattools/ChangeLog
index d23ba16..9d32bb0 100644
--- a/gnattools/ChangeLog
+++ b/gnattools/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/include/ChangeLog b/include/ChangeLog
index e66a9d6..b1e74fc 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/intl/ChangeLog b/intl/ChangeLog
index 9805d5d..2a0c547 100644
--- a/intl/ChangeLog
+++ b/intl/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/libada/ChangeLog b/libada/ChangeLog
index 3189396..5ea5f1c 100644
--- a/libada/ChangeLog
+++ b/libada/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/libatomic/ChangeLog b/libatomic/ChangeLog
index 61643f1..b449269 100644
--- a/libatomic/ChangeLog
+++ b/libatomic/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog
index a7ea8c5..5046ccb 100644
--- a/libbacktrace/ChangeLog
+++ b/libbacktrace/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 543e24f..c50f73c 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/libcpp/po/ChangeLog b/libcpp/po/ChangeLog
index 5d7be88..f183084 100644
--- a/libcpp/po/ChangeLog
+++ b/libcpp/po/ChangeLog
@@ -1,3 +1,15 @@
+2013-11-01  Joseph Myers  <joseph@codesourcery.com>
+
+	* tr.po: Update.
+
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
+2013-10-03  Joseph Myers  <joseph@codesourcery.com>
+
+	* sr.po: Update.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/libcpp/po/sr.po b/libcpp/po/sr.po
index c9416c4..ef7dbc3 100644
--- a/libcpp/po/sr.po
+++ b/libcpp/po/sr.po
@@ -1,13 +1,13 @@
 # Serbian translation of cpplib.
 # Copyright (C) 2012 Free Software Foundation, Inc.
 # This file is distributed under the same license as the gcc package.
-# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2012.
+# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2012, 2013.
 msgid ""
 msgstr ""
-"Project-Id-Version: cpplib-4.7.0\n"
+"Project-Id-Version: cpplib-4.8.0\n"
 "Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
-"POT-Creation-Date: 2013-02-24 01:05+0000\n"
-"PO-Revision-Date: 2012-06-13 11:32+0200\n"
+"POT-Creation-Date: 2013-03-15 17:42+0000\n"
+"PO-Revision-Date: 2013-10-03 08:53+0200\n"
 "Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
 "Language-Team: Serbian <gnu@prevod.org>\n"
 "Language: sr\n"
@@ -340,14 +340,13 @@
 msgstr "текућа датотека је старија од %s"
 
 #: directives.c:1653
-#, fuzzy, c-format
-#| msgid "invalid #pragma GCC poison directive"
+#, c-format
 msgid "invalid \"#pragma GCC %s\" directive"
-msgstr "неисправна „#pragma GCC poison“ директива"
+msgstr "неисправна директива „#pragma GCC %s“"
 
 #: directives.c:1847
 msgid "_Pragma takes a parenthesized string literal"
-msgstr "_Прагма узима словност ниске затворену заградом"
+msgstr "_Прагма узима словност ниске затворене заградом"
 
 #: directives.c:1968
 msgid "#else without #if"
@@ -398,7 +397,7 @@
 msgid "\"%s\" re-asserted"
 msgstr "„%s“ је поново утврђен"
 
-#: directives.c:2566
+#: directives.c:2567
 #, c-format
 msgid "unterminated #%s"
 msgstr "неокончано #%s"
@@ -570,39 +569,39 @@
 msgid "division by zero in #if"
 msgstr "дељење нулом у „#if“"
 
-#: files.c:504
+#: files.c:505
 msgid "NULL directory in find_file"
 msgstr "НИШТАВАН директоријум у пронађи_датотеку"
 
-#: files.c:542
+#: files.c:553
 msgid "one or more PCH files were found, but they were invalid"
 msgstr "једна или више ПЦХ датотека је пронађено, али су неисправне"
 
-#: files.c:545
+#: files.c:556
 msgid "use -Winvalid-pch for more information"
 msgstr "користите „-Winvalid-pch“ за више података"
 
-#: files.c:643
+#: files.c:660
 #, c-format
 msgid "%s is a block device"
 msgstr "%s је блок уређај"
 
-#: files.c:660
+#: files.c:677
 #, c-format
 msgid "%s is too large"
 msgstr "%s је превелико"
 
-#: files.c:700
+#: files.c:717
 #, c-format
 msgid "%s is shorter than expected"
 msgstr "%s је краће од очекиваног"
 
-#: files.c:935
+#: files.c:953
 #, c-format
 msgid "no include path in which to search for %s"
 msgstr "нема путање укључивања у којој потражити „%s“"
 
-#: files.c:1363
+#: files.c:1381
 msgid "Multiple include guards may be useful for:\n"
 msgstr "Више чувара укључивања може бити корисно за:\n"
 
@@ -710,7 +709,7 @@
 
 #: lex.c:1573 lex.c:1706
 msgid "invalid suffix on literal; C++11 requires a space between literal and identifier"
-msgstr ""
+msgstr "неисправан суфикс у словности; Ц++11 захтева размак између словности и одредника"
 
 #: lex.c:1684
 msgid "null character(s) preserved in literal"
@@ -863,36 +862,36 @@
 msgid "invalid hash type %d in cpp_macro_definition"
 msgstr "неисправна врста хеша %d у цпп_макро_одредници"
 
-#: pch.c:87 pch.c:335 pch.c:347 pch.c:365 pch.c:371 pch.c:380 pch.c:387
+#: pch.c:87 pch.c:345 pch.c:359 pch.c:377 pch.c:383 pch.c:392 pch.c:399
 msgid "while writing precompiled header"
 msgstr "за време уписивања претходно преведеног заглавља"
 
-#: pch.c:607
+#: pch.c:619
 #, c-format
 msgid "%s: not used because `%.*s' is poisoned"
 msgstr "%s: није употребљено зато што је „%.*s“ отровано"
 
-#: pch.c:629
+#: pch.c:641
 #, c-format
 msgid "%s: not used because `%.*s' not defined"
 msgstr "%s: није употребљено зато што „%.*s“ није одређено"
 
-#: pch.c:641
+#: pch.c:653
 #, c-format
 msgid "%s: not used because `%.*s' defined as `%s' not `%.*s'"
 msgstr "%s: није употребљено зато што „%.*s“ одређено као „%s“ није „%.*s“"
 
-#: pch.c:682
+#: pch.c:694
 #, c-format
 msgid "%s: not used because `%s' is defined"
 msgstr "%s: није употребљено зато што је „%s“ одређено"
 
-#: pch.c:702
+#: pch.c:714
 #, c-format
 msgid "%s: not used because `__COUNTER__' is invalid"
 msgstr "%s: није употребљено зато што „__COUNTER__“ није исправно"
 
-#: pch.c:711 pch.c:886
+#: pch.c:723 pch.c:898
 msgid "while reading precompiled header"
 msgstr "за време читања претходно преведеног заглавља"
 
@@ -904,42 +903,3 @@
 #: traditional.c:968
 msgid "syntax error in macro parameter list"
 msgstr "садржајна грешка у списку параметара макроа"
-
-#~ msgid "too many decimal points in number"
-#~ msgstr "превише децималних тачака у броју"
-
-#~ msgid "invalid digit \"%c\" in binary constant"
-#~ msgstr "неисправна цифра „%c“ у бинарној константи"
-
-#~ msgid "invalid digit \"%c\" in octal constant"
-#~ msgstr "неисправна цифра „%c“ у окталној константи"
-
-#~ msgid "no digits in hexadecimal floating constant"
-#~ msgstr "нема цифара у хексадецималној покретној константи"
-
-#~ msgid "exponent has no digits"
-#~ msgstr "изложилац нема цифру"
-
-#~ msgid "hexadecimal floating constants require an exponent"
-#~ msgstr "хексадецималне покретне константе захтевају изложилац"
-
-#~ msgid "missing binary operator before token \"%s\""
-#~ msgstr "недостаје бинарни оператор пре симбола „%s“"
-
-#~ msgid "token \"%s\" is not valid in preprocessor expressions"
-#~ msgstr "симбол „%s“ није исправан у изразима претпроцесора"
-
-#~ msgid "missing expression between '(' and ')'"
-#~ msgstr "недостаје израз између ( и )"
-
-#~ msgid "%s with no expression"
-#~ msgstr "%s без израза"
-
-#~ msgid "operator '%s' has no right operand"
-#~ msgstr "оператор „%s“ нема десни операнд"
-
-#~ msgid "operator '%s' has no left operand"
-#~ msgstr "оператор „%s“ нема леви операнд"
-
-#~ msgid " ':' without preceding '?'"
-#~ msgstr " „:“ без предводећег „?“"
diff --git a/libcpp/po/tr.po b/libcpp/po/tr.po
index a25bc8f..7e63bd1 100644
--- a/libcpp/po/tr.po
+++ b/libcpp/po/tr.po
@@ -1,20 +1,22 @@
 # Turkish translations for cpplib messages.
 # Copyright (C) 2007 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gcc package.
 #
 # Nilgün Belma Bugüner <nilgun@buguner.name.tr>, 2001, ..., 2007.
+# Volkan Gezer <vlkngzr@gmail.com>, 2013.
 msgid ""
 msgstr ""
-"Project-Id-Version: cpplib 4.2.0\n"
+"Project-Id-Version: cpplib 4.8.0\n"
 "Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
-"POT-Creation-Date: 2013-02-24 01:05+0000\n"
-"PO-Revision-Date: 2007-05-23 01:17+0300\n"
-"Last-Translator: Nilgün Belma Bugüner <nilgun@buguner.name.tr>\n"
+"POT-Creation-Date: 2013-03-15 17:42+0000\n"
+"PO-Revision-Date: 2013-11-01 22:29+0100\n"
+"Last-Translator: Volkan Gezer <vlkngzr@gmail.com>\n"
 "Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
 "Language: tr\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.11.4\n"
+"X-Generator: Lokalize 1.5\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
 #: charset.c:673
@@ -121,10 +123,9 @@
 msgstr "ISO standardı olmayan önceleme dizgesi, '\\%c'"
 
 #: charset.c:1320
-#, fuzzy, c-format
-#| msgid "unknown escape sequence '\\%c'"
+#, c-format
 msgid "unknown escape sequence: '\\%c'"
-msgstr "bilinmeyen önceleme dizgesi '\\%c'"
+msgstr "bilinmeyen kaçış dizgesi: '\\%c'"
 
 #: charset.c:1328
 #, c-format
@@ -163,10 +164,9 @@
 msgstr "#%s bir GCC uzantısıdır"
 
 #: directives.c:362
-#, fuzzy, c-format
-#| msgid "#%s is a GCC extension"
+#, c-format
 msgid "#%s is a deprecated GCC extension"
-msgstr "#%s bir GCC uzantısıdır"
+msgstr "#%s eskimiş bir GCC uzantısıdır"
 
 #: directives.c:375
 msgid "suggest not using #elif in traditional C"
@@ -247,7 +247,7 @@
 
 #: directives.c:909
 msgid "unexpected end of file after #line"
-msgstr ""
+msgstr "#line satırından sonra beklenmeyen dosya sonu"
 
 #: directives.c:912
 #, c-format
@@ -271,7 +271,7 @@
 #: directives.c:1068 directives.c:1070 directives.c:1072 directives.c:1658
 #, c-format
 msgid "%s"
-msgstr ""
+msgstr "%s"
 
 #: directives.c:1096
 #, c-format
@@ -312,16 +312,12 @@
 msgstr "main dosyasında '#pragma once'"
 
 #: directives.c:1462
-#, fuzzy
-#| msgid "invalid #pragma GCC poison directive"
 msgid "invalid #pragma push_macro directive"
-msgstr "geçersiz #pragma GCC poison yönergesi"
+msgstr "geçersiz #pragma güdümlü_makro yönergesi"
 
 #: directives.c:1517
-#, fuzzy
-#| msgid "invalid #pragma GCC poison directive"
 msgid "invalid #pragma pop_macro directive"
-msgstr "geçersiz #pragma GCC poison yönergesi"
+msgstr "geçersiz #pragma güdümlü_makro yönergesi"
 
 #: directives.c:1572
 msgid "invalid #pragma GCC poison directive"
@@ -347,10 +343,9 @@
 msgstr "mevcut dosya %s den daha eski"
 
 #: directives.c:1653
-#, fuzzy, c-format
-#| msgid "invalid #pragma GCC poison directive"
+#, c-format
 msgid "invalid \"#pragma GCC %s\" directive"
-msgstr "geçersiz #pragma GCC poison yönergesi"
+msgstr "geçersiz \"#pragma GCC %s\" yönergesi"
 
 #: directives.c:1847
 msgid "_Pragma takes a parenthesized string literal"
@@ -405,7 +400,7 @@
 msgid "\"%s\" re-asserted"
 msgstr "\"%s\" tekrar olumlanmış"
 
-#: directives.c:2566
+#: directives.c:2567
 #, c-format
 msgid "unterminated #%s"
 msgstr "sonlandırılmamış #%s"
@@ -424,16 +419,12 @@
 msgstr "%s: %s"
 
 #: expr.c:479 expr.c:577
-#, fuzzy
-#| msgid "imaginary constants are a GCC extension"
 msgid "fixed-point constants are a GCC extension"
-msgstr "sanal sabitler bir GCC genişletmesidir"
+msgstr "sabit noktalı sabitler bir GCC uzantısıdır"
 
 #: expr.c:504
-#, fuzzy
-#| msgid "invalid suffix \"%.*s\" on floating constant"
 msgid "invalid prefix \"0b\" for floating constant"
-msgstr "gerçel sabitin \"%.*s\" soneki geçersiz"
+msgstr "kayan nokta için geçerisz \"0b\" öntakısı"
 
 #: expr.c:514
 msgid "use of C99 hexadecimal floating constant"
@@ -450,10 +441,8 @@
 msgstr "geleneksel C \"%.*s\" sonekini kullanmaz"
 
 #: expr.c:564
-#, fuzzy
-#| msgid "imaginary constants are a GCC extension"
 msgid "suffix for double constant is a GCC extension"
-msgstr "sanal sabitler bir GCC genişletmesidir"
+msgstr "çift sabit için öntakı bir GCC uzantısıdır"
 
 #: expr.c:570
 #, c-format
@@ -461,10 +450,8 @@
 msgstr "onaltılık kayan sabitli \"%.*s\" soneki geçersiz"
 
 #: expr.c:581
-#, fuzzy
-#| msgid "imaginary constants are a GCC extension"
 msgid "decimal float constants are a GCC extension"
-msgstr "sanal sabitler bir GCC genişletmesidir"
+msgstr "onluk kayan sabitler bir GCC uzantısıdır"
 
 #: expr.c:599
 #, c-format
@@ -472,10 +459,8 @@
 msgstr "tamsayı sabitte sonek \"%.*s\" soneki geçersiz"
 
 #: expr.c:624
-#, fuzzy
-#| msgid "use of C99 long long integer constant"
 msgid "use of C++0x long long integer constant"
-msgstr "ISO C99 long long tamsayı sabitleri yasaklar"
+msgstr "ISO C++0x long long tamsayı sabitlerinin kullanımı"
 
 #: expr.c:625
 msgid "use of C99 long long integer constant"
@@ -486,10 +471,8 @@
 msgstr "sanal sabitler bir GCC genişletmesidir"
 
 #: expr.c:644
-#, fuzzy
-#| msgid "imaginary constants are a GCC extension"
 msgid "binary constants are a GCC extension"
-msgstr "sanal sabitler bir GCC genişletmesidir"
+msgstr "ikili sabitler bir GCC uzantısıdır"
 
 #: expr.c:737
 msgid "integer constant is too large for its type"
@@ -517,10 +500,8 @@
 msgstr "\"defined\" bu kullanımıyla uyarlanabilir olmayabilir"
 
 #: expr.c:948
-#, fuzzy
-#| msgid "integer overflow in preprocessor expression"
 msgid "user-defined literal in preprocessor expression"
-msgstr "önişlemci ifadesinde tamsayı taşması"
+msgstr "önişleyici ifadesinde kullanıcı tanımlı bağımlı"
 
 #: expr.c:953
 msgid "floating constant in preprocessor expression"
@@ -536,20 +517,17 @@
 msgstr "\"%s\" tanımlı değil"
 
 #: expr.c:1020
-#, fuzzy
-#| msgid "#%s is a GCC extension"
 msgid "assertions are a GCC extension"
-msgstr "#%s bir GCC uzantısıdır"
+msgstr "belirteçler bir GCC uzantısıdır"
 
 #: expr.c:1023
 msgid "assertions are a deprecated extension"
-msgstr ""
+msgstr "belirteçler artık kullanılmayan bir ifadedir"
 
 #: expr.c:1268
-#, fuzzy, c-format
-#| msgid "unbalanced stack in #if"
+#, c-format
 msgid "unbalanced stack in %s"
-msgstr "#if ifadesinde karşılıksız yığın"
+msgstr "%s içinde dengelenmemiş yığın"
 
 #: expr.c:1288
 #, c-format
@@ -594,39 +572,39 @@
 msgid "division by zero in #if"
 msgstr "#if içinde sıfırla bölme"
 
-#: files.c:504
+#: files.c:505
 msgid "NULL directory in find_file"
 msgstr "find_file içinde boş dizin"
 
-#: files.c:542
+#: files.c:553
 msgid "one or more PCH files were found, but they were invalid"
 msgstr "bir veya daha fazla PCH dosyası bulundu ama bunlar geçersiz"
 
-#: files.c:545
+#: files.c:556
 msgid "use -Winvalid-pch for more information"
 msgstr "daha fazla bilgi almak için -Winvalid-pch kullanın"
 
-#: files.c:643
+#: files.c:660
 #, c-format
 msgid "%s is a block device"
 msgstr "%s bir blok aygıtıdır"
 
-#: files.c:660
+#: files.c:677
 #, c-format
 msgid "%s is too large"
 msgstr "%s çok büyük"
 
-#: files.c:700
+#: files.c:717
 #, c-format
 msgid "%s is shorter than expected"
 msgstr "%s beklenenden daha kısa"
 
-#: files.c:935
+#: files.c:953
 #, c-format
 msgid "no include path in which to search for %s"
 msgstr "%s için aranacaklar içinde başlık dosyaları yolu yok"
 
-#: files.c:1363
+#: files.c:1381
 msgid "Multiple include guards may be useful for:\n"
 msgstr "Çoklu include önlemleri aşağıdakiler için kullanışlı olabilir:\n"
 
@@ -717,27 +695,24 @@
 #: lex.c:1178 lex.c:1255
 #, c-format
 msgid "identifier \"%s\" is a special operator name in C++"
-msgstr ""
+msgstr "\"%s\" belirteci, C++'da özel bir işleç adıdır"
 
 #: lex.c:1399
 msgid "raw string delimiter longer than 16 characters"
-msgstr ""
+msgstr "ham dizge ayracı 16 karakterden uzun"
 
 #: lex.c:1402
-#, fuzzy, c-format
-#| msgid "universal character %.*s is not valid in an identifier"
+#, c-format
 msgid "invalid character '%c' in raw string delimiter"
-msgstr "evrensel karakter %.*s bir belirteç içinde geçerli değil"
+msgstr "ham dizge ayracında geçersiz karakter '%c'"
 
 #: lex.c:1525 lex.c:1547
-#, fuzzy
-#| msgid "unterminated #%s"
 msgid "unterminated raw string"
-msgstr "sonlandırılmamış #%s"
+msgstr "bitirilmemiş ham dizge"
 
 #: lex.c:1573 lex.c:1706
 msgid "invalid suffix on literal; C++11 requires a space between literal and identifier"
-msgstr ""
+msgstr "geçersiz ifade soneki; C++11 ifade ve tanımlayıcı arasında bir boşluk gerektirir"
 
 #: lex.c:1684
 msgid "null character(s) preserved in literal"
@@ -785,7 +760,7 @@
 
 #: macro.c:377
 msgid "__COUNTER__ expanded inside directive with -fdirectives-only"
-msgstr ""
+msgstr "__COUNTER__ -fdirectives-only ile talimat içerisinde genişletildi"
 
 #: macro.c:535
 msgid "invalid string literal, ignoring final '\\'"
@@ -823,7 +798,7 @@
 #: macro.c:1746
 #, c-format
 msgid "invoking macro %s argument %d: empty macro arguments are undefined in ISO C90 and ISO C++98"
-msgstr ""
+msgstr "%s makrosu %d argümanı uygulanıyor: ISO C90 ve ISO C++98 içerisinde boş makro argümanları tanımsızdır"
 
 #: macro.c:2708
 #, c-format
@@ -890,38 +865,36 @@
 msgid "invalid hash type %d in cpp_macro_definition"
 msgstr "cpp_macro_definition içindeki isimli yapı türü %d geçersiz"
 
-#: pch.c:87 pch.c:335 pch.c:347 pch.c:365 pch.c:371 pch.c:380 pch.c:387
+#: pch.c:87 pch.c:345 pch.c:359 pch.c:377 pch.c:383 pch.c:392 pch.c:399
 msgid "while writing precompiled header"
 msgstr "önderlemeli başlık yazılırken"
 
-#: pch.c:607
-#, fuzzy, c-format
-#| msgid "%s: not used because `%s' is defined"
+#: pch.c:619
+#, c-format
 msgid "%s: not used because `%.*s' is poisoned"
-msgstr "%s: `%s' tanımlı olduğundan kullanılmadı"
+msgstr "%s: `%.*s' zehirli olduğu için kullanılmadı"
 
-#: pch.c:629
+#: pch.c:641
 #, c-format
 msgid "%s: not used because `%.*s' not defined"
 msgstr "%s: `%.*s' tanımlı olmadığından kullanılmadı"
 
-#: pch.c:641
+#: pch.c:653
 #, c-format
 msgid "%s: not used because `%.*s' defined as `%s' not `%.*s'"
 msgstr "%s: `%.*s' kullanılmadı çünkü `%s' olarak tanımlı, `%.*s' değil"
 
-#: pch.c:682
+#: pch.c:694
 #, c-format
 msgid "%s: not used because `%s' is defined"
 msgstr "%s: `%s' tanımlı olduğundan kullanılmadı"
 
-#: pch.c:702
-#, fuzzy, c-format
-#| msgid "%s: not used because `%s' is defined"
+#: pch.c:714
+#, c-format
 msgid "%s: not used because `__COUNTER__' is invalid"
-msgstr "%s: `%s' tanımlı olduğundan kullanılmadı"
+msgstr "%s: `__COUNTER__' geçersiz olduğundan kullanılmadı"
 
-#: pch.c:711 pch.c:886
+#: pch.c:723 pch.c:898
 msgid "while reading precompiled header"
 msgstr "önderlemeli başlık okunurken"
 
diff --git a/libdecnumber/ChangeLog b/libdecnumber/ChangeLog
index 8f6557b..0d20380 100644
--- a/libdecnumber/ChangeLog
+++ b/libdecnumber/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index fe0453a..048d1fc 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-06-25  Alan Modra  <amodra@gmail.com>
 
 	* src/powerpc/ffi.c (ffi_prep_args_SYSV): Move var declaration
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 4ef529f..8aeac1c 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-08-01  Maxim Kuvyrkov  <maxim@kugelworks.com>
 
 	Backport from trunk: Fix licenses on several libgcc files.
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index 48e2147..db9c4a7 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -850,24 +850,34 @@
 
 # Build libgcov components.
 
-# Defined in libgcov.c, included only in gcov library
-LIBGCOV = _gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta \
-    _gcov_fork _gcov_execl _gcov_execlp _gcov_execle \
-    _gcov_execv _gcov_execvp _gcov_execve _gcov_reset _gcov_dump \
-    _gcov_interval_profiler _gcov_pow2_profiler _gcov_one_value_profiler \
+LIBGCOV_MERGE = _gcov_merge_add _gcov_merge_single _gcov_merge_delta _gcov_merge_ior \
+                _gcov_merge_dc _gcov_merge_icall_topn _gcov_merge_reusedist
+LIBGCOV_PROFILER = _gcov_interval_profiler _gcov_pow2_profiler _gcov_one_value_profiler \
     _gcov_indirect_call_profiler _gcov_average_profiler _gcov_ior_profiler \
-    _gcov_indirect_call_profiler _gcov_direct_call_profiler \
-    _gcov_average_profiler _gcov_ior_profiler _gcov_merge_ior _gcov_merge_dc \
-    _gcov_merge_icall_topn _gcov_indirect_call_topn_profiler \
-    _gcov_merge_reusedist
+    _gcov_indirect_call_topn_profiler _gcov_direct_call_profiler
+LIBGCOV_INTERFACE = _gcov_flush _gcov_fork _gcov_execl _gcov_execlp _gcov_execle \
+    _gcov_execv _gcov_execvp _gcov_execve _gcov_reset _gcov_dump _gcov_sampling \
+    _gcov_prefix
+LIBGCOV_DRIVER = _gcov 
 
-libgcov-objects = $(patsubst %,%$(objext),$(LIBGCOV))
+libgcov-merge-objects = $(patsubst %,%$(objext),$(LIBGCOV_MERGE))
+libgcov-profiler-objects = $(patsubst %,%$(objext),$(LIBGCOV_PROFILER))
+libgcov-interface-objects = $(patsubst %,%$(objext),$(LIBGCOV_INTERFACE))
+libgcov-driver-objects = $(patsubst %,%$(objext),$(LIBGCOV_DRIVER))
+libgcov-objects = $(libgcov-merge-objects) $(libgcov-profiler-objects) \
+                 $(libgcov-interface-objects) $(libgcov-driver-objects)
 
-dyn-ipa.o: %$(objext): $(srcdir)/libgcov.c
-	$(gcc_compile)  -c $(srcdir)/dyn-ipa.c
-
-$(libgcov-objects): %$(objext): $(srcdir)/libgcov.c
-	$(gcc_compile) -DL$* -c $(srcdir)/libgcov.c
+dyn-ipa.o: %$(objext): $(srcdir)/dyn-ipa.c $(srcdir)/libgcov.h
+	$(gcc_compile) -c $(srcdir)/dyn-ipa.c
+$(libgcov-merge-objects): %$(objext): $(srcdir)/libgcov-merge.c $(srcdir)/libgcov.h
+	$(gcc_compile) -DL$* -c $(srcdir)/libgcov-merge.c
+$(libgcov-profiler-objects): %$(objext): $(srcdir)/libgcov-profiler.c $(srcdir)/libgcov.h
+	$(gcc_compile) -DL$* -c $(srcdir)/libgcov-profiler.c
+$(libgcov-interface-objects): %$(objext): $(srcdir)/libgcov-interface.c $(srcdir)/libgcov.h
+	$(gcc_compile) -DL$* -c $(srcdir)/libgcov-interface.c
+$(libgcov-driver-objects): %$(objext): $(srcdir)/libgcov-driver.c \
+  $(srcdir)/libgcov-driver-system.c $(srcdir)/libgcov.h
+	$(gcc_compile) -DL$* -c $(srcdir)/libgcov-driver.c
 
 # Static libraries.
 libgcc.a: $(libgcc-objects)
@@ -1094,10 +1104,14 @@
 	  cp ../../gcc/gcov-iov.h $$gcov_src_dest;		\
 	  cp $(srcdir)/../gcc/gcov-io.h $$gcov_src_dest;	\
 	  cp $(srcdir)/../gcc/gcov-io.c $$gcov_src_dest;	\
-	  cp $(srcdir)/libgcov.c $$gcov_src_dest;		\
+	  cp $(srcdir)/libgcov-driver.c $$gcov_src_dest;	\
+	  cp $(srcdir)/libgcov-merge.c $$gcov_src_dest;		\
+	  cp $(srcdir)/libgcov.h $$gcov_src_dest;		\
 	  chmod 644 $$gcov_src_dest/gcov-iov.h			\
 	  $$gcov_src_dest/gcov-io.h $$gcov_src_dest/gcov-io.c	\
-	  $$gcov_src_dest/libgcov.c;				\
+ 	  $$gcov_src_dest/libgcov.h				\
+	  $$gcov_src_dest/libgcov-merge.c			\
+	  $$gcov_src_dest/libgcov-driver.c;			\
 	fi
 
 install: install-leaf install-unwind_h
diff --git a/libgcc/config/libbid/ChangeLog b/libgcc/config/libbid/ChangeLog
index 3e25c4c..c1f04e8 100644
--- a/libgcc/config/libbid/ChangeLog
+++ b/libgcc/config/libbid/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/libgcc/dyn-ipa.c b/libgcc/dyn-ipa.c
index a86a402..287038e 100644
--- a/libgcc/dyn-ipa.c
+++ b/libgcc/dyn-ipa.c
@@ -24,31 +24,17 @@
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
-#include "tconfig.h"
-#include "tsystem.h"
-#include "coretypes.h"
-#include "tm.h"
-
-#if defined(inhibit_libc)
-#define IN_LIBGCOV (-1)
-#else
-#undef NULL /* Avoid errors if stdio.h and our stddef.h mismatch.  */
-#include <stdio.h>
-#include <stdlib.h>
-#define IN_LIBGCOV 1
-#if defined(L_gcov)
-#define GCOV_LINKAGE /* nothing */
-#endif
-#endif
-#include "gcov-io.h"
+#include "libgcov.h"
 
 struct dyn_pointer_set;
 
+#ifndef IN_GCOV_TOOL
 #define XNEWVEC(type,ne) (type *)malloc(sizeof(type) * (ne))
 #define XCNEWVEC(type,ne) (type *)calloc(1, sizeof(type) * (ne))
 #define XNEW(type) (type *)malloc(sizeof(type))
 #define XDELETEVEC(p) free(p)
 #define XDELETE(p) free(p)
+#endif
 
 struct dyn_cgraph_node
 {
@@ -196,6 +182,7 @@
 static int flag_alg_mode;
 static int flag_modu_merge_edges;
 static int flag_weak_inclusion;
+static int flag_use_existing_grouping;
 static gcov_unsigned_t mem_threshold;
 
 /* Returns 0 if no dump is enabled. Returns 1 if text form graph
@@ -232,7 +219,7 @@
   node->visited = 0;
 }
 
-/* Return module_id. FUNC_GUID is the global unique id.  
+/* Return module_id. FUNC_GUID is the global unique id.
    This id is 1 based. 0 is the invalid id.  */
 
 static inline gcov_unsigned_t
@@ -278,7 +265,7 @@
   if (func_id > the_dyn_call_graph.sup_modules[mod_idx].max_func_ident)
     return 0;
 
-  return *(pointer_set_find_or_insert
+  return (struct dyn_cgraph_node*) *(pointer_set_find_or_insert
 	   (the_dyn_call_graph.call_graph_nodes[mod_idx], func_id));
 }
 
@@ -317,8 +304,6 @@
   return the_dyn_call_graph.modules[module_id - 1];
 }
 
-struct gcov_info *__gcov_list ATTRIBUTE_HIDDEN;
-
 static inline unsigned
 cgraph_node_get_key (const void *p)
 {
@@ -371,15 +356,20 @@
   return p;
 }
 
+/* Defined in libgcov-driver.c.  */
+extern struct gcov_info *get_gcov_list (void);
+
 /* Initialize dynamic call graph.  */
 
 static void
 init_dyn_call_graph (void)
 {
   unsigned num_modules = 0;
+  unsigned max_module_id = 0;
   struct gcov_info *gi_ptr;
   const char *env_str;
   int do_dump = (do_cgraph_dump () != 0);
+  struct gcov_info *gcov_list = get_gcov_list ();
 
   the_dyn_call_graph.call_graph_nodes = 0;
   the_dyn_call_graph.modules = 0;
@@ -390,15 +380,25 @@
   flag_weak_inclusion = __gcov_lipo_weak_inclusion;
   mem_threshold = __gcov_lipo_max_mem * 1.25;
 
-  gi_ptr = __gcov_list;
+  gi_ptr = gcov_list;
 
   for (; gi_ptr; gi_ptr = gi_ptr->next)
-    num_modules++;
+    {
+      unsigned mod_id = get_module_ident (gi_ptr);
+      num_modules++;
+      if (max_module_id < mod_id)
+        max_module_id = mod_id;
+    }
+
+  if (num_modules < max_module_id)
+    num_modules = max_module_id;
 
   the_dyn_call_graph.num_modules = num_modules;
 
   the_dyn_call_graph.modules
     = XNEWVEC (struct gcov_info *, num_modules);
+  memset (the_dyn_call_graph.modules, 0,
+          num_modules * sizeof (struct gcov_info*));
 
   the_dyn_call_graph.sup_modules
     = XNEWVEC (struct dyn_module_info, num_modules);
@@ -408,7 +408,7 @@
   the_dyn_call_graph.call_graph_nodes
     = XNEWVEC (struct dyn_pointer_set *, num_modules);
 
-  gi_ptr = __gcov_list;
+  gi_ptr = gcov_list;
 
   if ((env_str = getenv ("GCOV_DYN_ALG")))
     {
@@ -421,7 +421,7 @@
         flag_weak_inclusion = atoi (env_str);
 
       if (do_dump)
-	fprintf (stderr, 
+	fprintf (stderr,
             "!!!! Using ALG=%d merge_edges=%d weak_inclusion=%d. \n",
             flag_alg_mode, flag_modu_merge_edges, flag_weak_inclusion);
     }
@@ -488,19 +488,22 @@
 __gcov_finalize_dyn_callgraph (void)
 {
   unsigned i;
-  struct gcov_info *gi_ptr;
 
   for (i = 0; i < the_dyn_call_graph.num_modules; i++)
     {
-      gi_ptr = the_dyn_call_graph.modules[i];
+      struct gcov_info *gi_ptr = the_dyn_call_graph.modules[i];
       const struct gcov_fn_info *fi_ptr;
       unsigned f_ix;
+
+      if (gi_ptr == NULL)
+        continue;
+
       for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++)
         {
           struct dyn_cgraph_node *node;
           struct dyn_cgraph_edge *callees, *next_callee;
           fi_ptr = gi_ptr->functions[f_ix];
-          node = *(pointer_set_find_or_insert
+          node = (struct dyn_cgraph_node *) *(pointer_set_find_or_insert
                    (the_dyn_call_graph.call_graph_nodes[i], fi_ptr->ident));
           gcc_assert (node);
           callees = node->callees;
@@ -663,6 +666,8 @@
       unsigned f_ix, i;
 
       gi_ptr = the_dyn_call_graph.modules[m_ix];
+      if (gi_ptr == NULL)
+        continue;
 
       for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++)
         {
@@ -672,7 +677,7 @@
           fi_ptr = gi_ptr->functions[f_ix];
           ci_ptr = fi_ptr->ctrs;
 
-          caller = *(pointer_set_find_or_insert
+          caller = (struct dyn_cgraph_node *) *(pointer_set_find_or_insert
                     (the_dyn_call_graph.call_graph_nodes[m_ix],
                      fi_ptr->ident));
           gcc_assert (caller);
@@ -913,6 +918,8 @@
       unsigned f_ix;
 
       gi_ptr = the_dyn_call_graph.modules[m_ix];
+      if (gi_ptr == NULL)
+        continue;
 
       for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++)
 	{
@@ -921,7 +928,7 @@
 
 	  fi_ptr = gi_ptr->functions[f_ix];
 
-	  node = *(pointer_set_find_or_insert
+	  node = (struct dyn_cgraph_node *) *(pointer_set_find_or_insert
 		   (the_dyn_call_graph.call_graph_nodes[m_ix], fi_ptr->ident));
 	  gcc_assert (node);
 
@@ -934,7 +941,7 @@
               else
                 {
                   capacity = capacity + (capacity >> 1);
-                  edges = (struct dyn_cgraph_edge **)realloc (edges, sizeof (void*) * capacity);
+                  edges = (struct dyn_cgraph_edge **)xrealloc (edges, sizeof (void*) * capacity);
                   edges[num_edges - 1] = callees;
                 }
               callees = callees->next_callee;
@@ -1251,7 +1258,8 @@
             {
               struct gcov_info *callee_mod_info
                   = get_module_info (callee_mod_id);
-              imp_mod_set_insert (imp_modules, callee_mod_info, callee_mod_wt);
+              if (callee_mod_info)
+                imp_mod_set_insert (imp_modules, callee_mod_info, callee_mod_wt);
             }
         }
 
@@ -1281,7 +1289,7 @@
 static dyn_fibheap_t
 dyn_fibheap_new (void)
 {
-  return (dyn_fibheap_t) calloc (1, sizeof (struct dyn_fibheap));
+  return (dyn_fibheap_t) xcalloc (1, sizeof (struct dyn_fibheap));
 }
 
 /* Create a new fibonacci heap node.  */
@@ -1290,7 +1298,7 @@
 {
   fibnode_t node;
 
-  node = (fibnode_t) calloc (1, sizeof *node);
+  node = (fibnode_t) xcalloc (1, sizeof *node);
   node->left = node;
   node->right = node;
 
@@ -1613,7 +1621,7 @@
   while (callees != 0)
     {
       callee = callees->callee;
-      unsigned callee_m_id = 
+      unsigned callee_m_id =
         get_module_ident_from_func_glob_uid (callee->guid);
       if (callee_m_id != m_id)
         {
@@ -1641,6 +1649,8 @@
       unsigned f_ix;
 
       gi_ptr = the_dyn_call_graph.modules[m_ix];
+      if (gi_ptr == NULL)
+        continue;
       modu_nodes[m_ix].module = gi_ptr;
 
       for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++)
@@ -1648,7 +1658,7 @@
 	  struct dyn_cgraph_node *node;
 
 	  fi_ptr = gi_ptr->functions[f_ix];
-	  node = *(pointer_set_find_or_insert
+	  node = (struct dyn_cgraph_node *) *(pointer_set_find_or_insert
 		   (the_dyn_call_graph.call_graph_nodes[m_ix], fi_ptr->ident));
 	  if (!node)
             {
@@ -1769,7 +1779,7 @@
 
 /* Check if inserting the module specified by DATA1 (including
    it's imported list to grouping VALUE, makes the ggc_memory
-   size exceed the memory threshold. 
+   size exceed the memory threshold.
    Return 0 if size is great than the thereshold and 0 otherwise.  */
 
 static int
@@ -1962,13 +1972,15 @@
       unsigned f_ix;
 
       gi_ptr = the_dyn_call_graph.modules[m_ix];
+      if (gi_ptr == NULL)
+        continue;
 
       for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++)
 	{
 	  struct dyn_cgraph_node *node;
 
 	  fi_ptr = gi_ptr->functions[f_ix];
-	  node = *(pointer_set_find_or_insert
+	  node = (struct dyn_cgraph_node *) *(pointer_set_find_or_insert
 		   (the_dyn_call_graph.call_graph_nodes[m_ix], fi_ptr->ident));
 	  gcc_assert (node);
           if (node->visited)
@@ -1984,6 +1996,8 @@
       unsigned f_ix;
 
       gi_ptr = the_dyn_call_graph.modules[m_ix];
+      if (gi_ptr == NULL)
+        continue;
 
       for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++)
 	{
@@ -1992,7 +2006,7 @@
           struct dyn_pointer_set *imp_modules;
 
 	  fi_ptr = gi_ptr->functions[f_ix];
-	  node = *(pointer_set_find_or_insert
+	  node = (struct dyn_cgraph_node *) *(pointer_set_find_or_insert
 		   (the_dyn_call_graph.call_graph_nodes[m_ix], fi_ptr->ident));
 	  gcc_assert (node);
 
@@ -2048,7 +2062,8 @@
 	  if (mod_idx == m_ix)
 	    continue;
 	  imp_mod_info = get_module_info (mod_idx + 1);
-	  if (!imp_mod_set_insert (imp_modules, imp_mod_info, 1.0))
+          if (imp_mod_info &&
+	      !imp_mod_set_insert (imp_modules, imp_mod_info, 1.0))
 	    i++;
 	}
     }
@@ -2095,7 +2110,7 @@
       len += 1; /* Each string is lead by a length.  */
     }
 
-  len += 10; /* 9 more fields */
+  len += 11; /* 11 more fields */
 
   gcov_write_tag_length (GCOV_TAG_MODULE_INFO, len);
   gcov_write_unsigned (module_info->ident);
@@ -2104,6 +2119,7 @@
     SET_MODULE_INCLUDE_ALL_AUX (module_info);
   gcov_write_unsigned (module_info->flags);
   gcov_write_unsigned (module_info->lang);
+  gcov_write_unsigned (module_info->ggc_memory);
   gcov_write_unsigned (module_info->num_quote_paths);
   gcov_write_unsigned (module_info->num_bracket_paths);
   gcov_write_unsigned (module_info->num_system_paths);
@@ -2166,6 +2182,112 @@
     }
 }
 
+/* Set to use module grouping from existing imports files in
+   the profile directory.  */
+void set_use_existing_grouping (void);
+
+void
+set_use_existing_grouping (void)
+{
+  flag_use_existing_grouping = 1;
+}
+
+#ifdef IN_GCOV_TOOL
+extern const char *get_source_profile_dir (void);
+
+/* find and open the imports files based on da_filename
+   in GI_PTR.  */
+
+static FILE *
+open_imports_file (struct gcov_info *gi_ptr)
+{
+  const char *gcda_name;
+  char *imports_name;
+  const char *source_dir = "";
+
+  if (gi_ptr == NULL || gi_ptr->mod_info == NULL)
+    return NULL;
+
+  gcda_name = gi_ptr->mod_info->da_filename;
+  gcc_assert (gcda_name);
+
+  source_dir = get_source_profile_dir ();
+  gcc_assert (source_dir);
+  imports_name = (char *) alloca (strlen (gcda_name) + strlen (source_dir) +
+                                  strlen (".gcda.imports") + 2);
+  strcpy (imports_name, source_dir);
+  strcat (imports_name, "/");
+  strcat (imports_name, gcda_name);
+  strcat (imports_name, ".gcda.imports");
+  return fopen (imports_name, "r");
+}
+
+extern int get_module_id_from_name (const char *);
+
+#endif /* IN_GCOV_TOOL */
+
+/* Use the module grouping from existing imports files in
+   the profile directory.  */
+
+static void
+read_modu_groups_from_imports_files (void)
+{
+#ifdef IN_GCOV_TOOL
+  unsigned m_ix;
+
+  init_dyn_call_graph ();
+
+  for (m_ix = 0; m_ix < the_dyn_call_graph.num_modules; m_ix++)
+    {
+      struct gcov_info *gi_ptr = the_dyn_call_graph.modules[m_ix];
+      FILE *fd;
+      struct dyn_pointer_set *imp_modules;
+
+      if (gi_ptr == NULL)
+        continue;
+
+      imp_modules = gcov_get_module_imp_module_set
+                      (&the_dyn_call_graph.sup_modules[m_ix]);
+
+      if ((fd = open_imports_file (gi_ptr)) != NULL)
+	{
+          char *line = NULL;
+          size_t linecap = 0;
+          while (getline (&line, &linecap, fd) != -1)
+            {
+              unsigned mod_id = 0;
+              char *name = strtok (line, " \t\n");
+
+              if (name && (mod_id = get_module_id_from_name (name)))
+                {
+                  struct gcov_info *imp_mod_info;
+           	  unsigned mod_idx = mod_id - 1;
+           	  if (mod_idx == m_ix)
+           	    continue;
+           	  imp_mod_info = get_module_info (mod_idx + 1);
+           	  imp_mod_set_insert (imp_modules, imp_mod_info, 1.0);
+                }
+              free (line);
+              line = NULL;
+            }
+          fclose (fd);
+	}
+    }
+
+  /* Now compute the export attribute  */
+  for (m_ix = 0; m_ix < the_dyn_call_graph.num_modules; m_ix++)
+    {
+      struct dyn_module_info *mi
+	= &the_dyn_call_graph.sup_modules[m_ix];
+      if (mi->imported_modules)
+        pointer_set_traverse (mi->imported_modules,
+                              gcov_mark_export_modules, 0, 0, 0);
+    }
+#else /* !IN_GCOV_TOOL */
+  gcc_assert (0);
+#endif /* IN_GCOV_TOOL */
+}
+
 /* Compute module groups needed for L-IPO compilation.  */
 
 void
@@ -2203,6 +2325,12 @@
       return;
     }
 
+  if (flag_use_existing_grouping)
+    {
+      read_modu_groups_from_imports_files ();
+      return;
+    }
+
   /* First compute dynamic call graph.  */
   gcov_build_callgraph ();
 
@@ -2344,13 +2472,15 @@
       unsigned f_ix;
 
       gi_ptr = the_dyn_call_graph.modules[m_ix];
+      if (gi_ptr == NULL)
+        continue;
 
       for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++)
 	{
 	  struct dyn_cgraph_node *node;
 
 	  fi_ptr = gi_ptr->functions[f_ix];
-	  node = *(pointer_set_find_or_insert
+	  node = (struct dyn_cgraph_node *) *(pointer_set_find_or_insert
 		   (the_dyn_call_graph.call_graph_nodes[m_ix], fi_ptr->ident));
 	  gcc_assert (node);
 
diff --git a/libgcc/libgcov-driver-system.c b/libgcc/libgcov-driver-system.c
new file mode 100644
index 0000000..37ffdb7
--- /dev/null
+++ b/libgcc/libgcov-driver-system.c
@@ -0,0 +1,203 @@
+/* Routines required for instrumenting a program.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1989-2014 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+/* A utility function for outputing errors.  */
+
+static int __attribute__((format(printf, 1, 2)))
+gcov_error (const char *fmt, ...)
+{
+  int ret;
+  va_list argp;
+  va_start (argp, fmt);
+  ret = vfprintf (stderr, fmt, argp);
+  va_end (argp);
+  return ret;
+}
+
+/* Make sure path component of the given FILENAME exists, create
+   missing directories. FILENAME must be writable.
+   Returns zero on success, or -1 if an error occurred.  */
+
+static int
+create_file_directory (char *filename)
+{
+#if !defined(TARGET_POSIX_IO) && !defined(_WIN32)
+  (void) filename;
+  return -1;
+#else
+  char *s;
+
+  s = filename;
+
+  if (HAS_DRIVE_SPEC(s))
+    s += 2;
+  if (IS_DIR_SEPARATOR(*s))
+    ++s;
+  for (; *s != '\0'; s++)
+    if (IS_DIR_SEPARATOR(*s))
+      {
+        char sep = *s;
+	*s  = '\0';
+
+        /* Try to make directory if it doesn't already exist.  */
+        if (access (filename, F_OK) == -1
+#ifdef TARGET_POSIX_IO
+            && mkdir (filename, 0755) == -1
+#else
+            && mkdir (filename) == -1
+#endif
+            /* The directory might have been made by another process.  */
+	    && errno != EEXIST)
+	  {
+            gcov_error ("profiling:%s:Cannot create directory\n", filename);
+            *s = sep;
+	    return -1;
+	  };
+
+	*s = sep;
+      };
+  return 0;
+#endif
+}
+
+static void
+allocate_filename_struct (struct gcov_filename_aux *gf)
+{
+  const char *gcov_prefix;
+  int gcov_prefix_strip = 0;
+  size_t prefix_length;
+  char *gi_filename_up;
+
+  gcc_assert (gf);
+  {
+    /* Check if the level of dirs to strip off specified. */
+    char *tmp = getenv("GCOV_PREFIX_STRIP");
+    if (tmp)
+      {
+        gcov_prefix_strip = atoi (tmp);
+        /* Do not consider negative values. */
+        if (gcov_prefix_strip < 0)
+          gcov_prefix_strip = 0;
+      }
+  }
+
+  /* Get file name relocation prefix.  Non-absolute values are ignored. */
+  gcov_prefix = getenv("GCOV_PREFIX");
+  if (gcov_prefix)
+    {
+      prefix_length = strlen(gcov_prefix);
+
+      /* Remove an unnecessary trailing '/' */
+      if (IS_DIR_SEPARATOR (gcov_prefix[prefix_length - 1]))
+        prefix_length--;
+    }
+  else
+    prefix_length = 0;
+
+  /* If no prefix was specified and a prefix stip, then we assume
+     relative.  */
+  if (gcov_prefix_strip != 0 && prefix_length == 0)
+    {
+      gcov_prefix = ".";
+      prefix_length = 1;
+    }
+  /* Allocate and initialize the filename scratch space plus one.  */
+  gi_filename = (char *) xmalloc (prefix_length + gcov_max_filename + 2);
+  if (prefix_length)
+    memcpy (gi_filename, gcov_prefix, prefix_length);
+  gi_filename_up = gi_filename + prefix_length;
+
+  gf->gi_filename_up = gi_filename_up;
+  gf->prefix_length = prefix_length;
+  gf->gcov_prefix_strip = gcov_prefix_strip;
+}
+
+/* Open a gcda file specified by GI_FILENAME.
+   Return -1 on error.  Return 0 on success.  */
+
+static int
+gcov_exit_open_gcda_file (struct gcov_info *gi_ptr, struct gcov_filename_aux *gf)
+{
+  int gcov_prefix_strip;
+  size_t prefix_length;
+  char *gi_filename_up;
+  const char *fname, *s;
+
+  gcov_prefix_strip = gf->gcov_prefix_strip;
+  gi_filename_up = gf->gi_filename_up;
+  prefix_length = gf->prefix_length;
+  fname = gi_ptr->filename;
+
+  /* Avoid to add multiple drive letters into combined path.  */
+  if (prefix_length != 0 && HAS_DRIVE_SPEC(fname))
+    fname += 2;
+
+  /* Build relocated filename, stripping off leading
+     directories from the initial filename if requested. */
+  if (gcov_prefix_strip > 0)
+    {
+      int level = 0;
+
+      s = fname;
+      if (IS_DIR_SEPARATOR(*s))
+        ++s;
+
+      /* Skip selected directory levels. */
+      for (; (*s != '\0') && (level < gcov_prefix_strip); s++)
+        if (IS_DIR_SEPARATOR(*s))
+          {
+            fname = s;
+            level++;
+          }
+    }
+
+  /* Update complete filename with stripped original. */
+  if (prefix_length != 0 && !IS_DIR_SEPARATOR (*fname))
+    {
+      /* If prefix is given, add directory separator.  */
+      strcpy (gi_filename_up, "/");
+      strcpy (gi_filename_up + 1, fname);
+    }
+  else
+    strcpy (gi_filename_up, fname);
+
+  if (!gcov_open (gi_filename))
+    {
+      /* Open failed likely due to missed directory.
+         Create directory and retry to open file. */
+      if (create_file_directory (gi_filename))
+        {
+          gcov_error ("profiling:%s:Skip\n", gi_filename);
+          return -1;
+        }
+      if (!gcov_open (gi_filename))
+        {
+          gcov_error ("profiling:%s:Cannot open\n", gi_filename);
+          return -1;
+        }
+    }
+
+  return 0;
+}
diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c
new file mode 100644
index 0000000..bbce3a6
--- /dev/null
+++ b/libgcc/libgcov-driver.c
@@ -0,0 +1,1003 @@
+/* Routines required for instrumenting a program.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1989-2013 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#include "libgcov.h"
+
+#if defined(inhibit_libc)
+/* If libc and its header files are not available, provide dummy functions.  */
+
+#if defined(L_gcov)
+void __gcov_init (struct gcov_info *p __attribute__ ((unused))) {}
+#endif
+
+#else /* !inhibit_libc */
+
+#include <string.h>
+#if GCOV_LOCKED
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/stat.h>
+#endif
+
+#ifdef L_gcov
+#include "gcov-io.c"
+
+/* The following functions can be called from outside of this file.  */
+extern void gcov_clear (void) ATTRIBUTE_HIDDEN;
+extern void gcov_exit (void) ATTRIBUTE_HIDDEN;
+extern void set_gcov_dump_complete (void) ATTRIBUTE_HIDDEN;
+extern void reset_gcov_dump_complete (void) ATTRIBUTE_HIDDEN;
+extern int get_gcov_dump_complete (void) ATTRIBUTE_HIDDEN;
+extern void set_gcov_list (struct gcov_info *) ATTRIBUTE_HIDDEN;
+extern struct gcov_info *get_gcov_list (void) ATTRIBUTE_HIDDEN;
+
+#ifndef IN_GCOV_TOOL
+/* Create a strong reference to these symbols so that they are
+   unconditionally pulled into the instrumented binary, even when
+   the only reference is a weak reference. This is necessary because
+   we are using weak references to handle older compilers that
+   pre-date these new functions. A subtlety of the linker is that
+   it will only resolve weak references defined within archive libraries
+   when there is a string reference to something else defined within
+   the same object file. Since these two functions are defined within
+   their own object files (using L_gcov_reset and L_gcov_dump), they
+   would not get resolved. Since there are symbols within the main L_gcov
+   section that are strongly referenced during -fprofile-generate builds,
+   these symbols will always need to be resolved.  */
+void (*__gcov_dummy_ref1)(void) = &__gcov_reset;
+void (*__gcov_dummy_ref2)(void) = &__gcov_dump;
+extern char *__gcov_get_profile_prefix (void);
+char *(*__gcov_dummy_ref3)(void) = &__gcov_get_profile_prefix;
+
+/* Default callback function for profile instrumentation callback.  */
+extern void __coverage_callback (gcov_type, int);
+__attribute__((weak)) void
+__coverage_callback (gcov_type funcdef_no __attribute__ ((unused)),
+                     int edge_no __attribute__ ((unused)))
+{
+   /* nothing */
+}
+#endif
+
+/* Flag when the profile has already been dumped via __gcov_dump().  */
+static int gcov_dump_complete;
+
+/* A global function that get the vaule of gcov_dump_complete.  */
+
+int
+get_gcov_dump_complete (void)
+{
+  return gcov_dump_complete;
+}
+
+/* A global functino that set the vaule of gcov_dump_complete. Will
+   be used in __gcov_dump() in libgcov-interface.c.  */
+
+void
+set_gcov_dump_complete (void)
+{
+  gcov_dump_complete = 1;
+}
+
+/* A global functino that set the vaule of gcov_dump_complete. Will
+   be used in __gcov_reset() in libgcov-interface.c.  */
+
+void
+reset_gcov_dump_complete (void)
+{
+  gcov_dump_complete = 0;
+}
+
+/* A utility function for outputing errors.  */
+static int gcov_error (const char *fmt, ...);
+
+struct gcov_summary_buffer
+{
+  struct gcov_summary_buffer *next;
+  struct gcov_summary summary;
+};
+
+/* Chain of per-object gcov structures.  */
+static struct gcov_info *__gcov_list;
+
+/* Set the head of gcov_list.  */
+void
+set_gcov_list (struct gcov_info *head)
+{
+  __gcov_list = head;
+}
+
+/* Return the head of gcov_list.  */
+struct gcov_info *
+get_gcov_list (void)
+{
+  return __gcov_list;
+}
+
+/* Size of the longest file name. */
+static size_t gcov_max_filename = 0;
+
+#ifndef IN_GCOV_TOOL
+/* Emitted in coverage.c.  */
+extern gcov_unsigned_t __gcov_sampling_period;
+static int gcov_sampling_period_initialized = 0;
+#endif
+
+/* Unique identifier assigned to each module (object file).  */
+static gcov_unsigned_t gcov_cur_module_id = 0;
+
+/* Dynamic call graph build and form module groups.  */
+void __gcov_compute_module_groups (void) ATTRIBUTE_HIDDEN;
+void __gcov_finalize_dyn_callgraph (void) ATTRIBUTE_HIDDEN;
+
+/* Add an unsigned value to the current crc */
+
+static gcov_unsigned_t
+crc32_unsigned (gcov_unsigned_t crc32, gcov_unsigned_t value)
+{
+  unsigned ix;
+
+  for (ix = 32; ix--; value <<= 1)
+    {
+      unsigned feedback;
+
+      feedback = (value ^ crc32) & 0x80000000 ? 0x04c11db7 : 0;
+      crc32 <<= 1;
+      crc32 ^= feedback;
+    }
+
+  return crc32;
+}
+
+/* Check if VERSION of the info block PTR matches libgcov one.
+   Return 1 on success, or zero in case of versions mismatch.
+   If FILENAME is not NULL, its value used for reporting purposes
+   instead of value from the info block.  */
+
+static int
+gcov_version (struct gcov_info *ptr, gcov_unsigned_t version,
+              const char *filename)
+{
+  if (version != GCOV_VERSION)
+    {
+      char v[4], e[4];
+
+      GCOV_UNSIGNED2STRING (v, version);
+      GCOV_UNSIGNED2STRING (e, GCOV_VERSION);
+
+      if (filename)
+        gcov_error ("profiling:%s:Version mismatch - expected %.4s got %.4s\n",
+                   filename? filename : ptr->filename, e, v);
+      else
+        gcov_error ("profiling:Version mismatch - expected %.4s got %.4s\n", e, v);
+
+      return 0;
+    }
+  return 1;
+}
+
+/* Insert counter VALUE into HISTOGRAM.  */
+
+static void
+gcov_histogram_insert(gcov_bucket_type *histogram, gcov_type value)
+{
+  unsigned i;
+
+  i = gcov_histo_index(value);
+  histogram[i].num_counters++;
+  histogram[i].cum_value += value;
+  if (value < histogram[i].min_value)
+    histogram[i].min_value = value;
+}
+
+/* Computes a histogram of the arc counters to place in the summary SUM.  */
+
+static void
+gcov_compute_histogram (struct gcov_summary *sum)
+{
+  struct gcov_info *gi_ptr;
+  const struct gcov_fn_info *gfi_ptr;
+  const struct gcov_ctr_info *ci_ptr;
+  struct gcov_ctr_summary *cs_ptr;
+  unsigned t_ix, f_ix, ctr_info_ix, ix;
+  int h_ix;
+
+  /* This currently only applies to arc counters.  */
+  t_ix = GCOV_COUNTER_ARCS;
+
+  /* First check if there are any counts recorded for this counter.  */
+  cs_ptr = &(sum->ctrs[t_ix]);
+  if (!cs_ptr->num)
+    return;
+
+  for (h_ix = 0; h_ix < GCOV_HISTOGRAM_SIZE; h_ix++)
+    {
+      cs_ptr->histogram[h_ix].num_counters = 0;
+      cs_ptr->histogram[h_ix].min_value = cs_ptr->run_max;
+      cs_ptr->histogram[h_ix].cum_value = 0;
+    }
+
+  /* Walk through all the per-object structures and record each of
+     the count values in histogram.  */
+  for (gi_ptr = __gcov_list; gi_ptr; gi_ptr = gi_ptr->next)
+    {
+      if (!gi_ptr->merge[t_ix])
+        continue;
+
+      /* Find the appropriate index into the gcov_ctr_info array
+         for the counter we are currently working on based on the
+         existence of the merge function pointer for this object.  */
+      for (ix = 0, ctr_info_ix = 0; ix < t_ix; ix++)
+        {
+          if (gi_ptr->merge[ix])
+            ctr_info_ix++;
+        }
+      for (f_ix = 0; f_ix != gi_ptr->n_functions; f_ix++)
+        {
+          gfi_ptr = gi_ptr->functions[f_ix];
+
+          if (!gfi_ptr || gfi_ptr->key != gi_ptr)
+            continue;
+
+          ci_ptr = &gfi_ptr->ctrs[ctr_info_ix];
+          for (ix = 0; ix < ci_ptr->num; ix++)
+            gcov_histogram_insert (cs_ptr->histogram, ci_ptr->values[ix]);
+        }
+    }
+}
+
+/* This funtions computes the program level summary and the histo-gram.
+   It computes and returns CRC32 and stored summary in THIS_PRG.  */
+
+static gcov_unsigned_t
+gcov_exit_compute_summary (struct gcov_summary *this_prg)
+{
+  struct gcov_info *gi_ptr;
+  const struct gcov_fn_info *gfi_ptr;
+  struct gcov_ctr_summary *cs_ptr;
+  const struct gcov_ctr_info *ci_ptr;
+  int f_ix;
+  unsigned t_ix;
+  gcov_unsigned_t c_num;
+  gcov_unsigned_t crc32 = 0;
+
+  /* Find the totals for this execution.  */
+  memset (this_prg, 0, sizeof (*this_prg));
+  for (gi_ptr = __gcov_list; gi_ptr; gi_ptr = gi_ptr->next)
+    {
+      crc32 = crc32_unsigned (crc32, gi_ptr->stamp);
+      crc32 = crc32_unsigned (crc32, gi_ptr->n_functions);
+
+      for (f_ix = 0; (unsigned)f_ix != gi_ptr->n_functions; f_ix++)
+        {
+          gfi_ptr = gi_ptr->functions[f_ix];
+
+          if (gfi_ptr && gfi_ptr->key != gi_ptr)
+            gfi_ptr = 0;
+
+          crc32 = crc32_unsigned (crc32, gfi_ptr ? gfi_ptr->cfg_checksum : 0);
+          crc32 = crc32_unsigned (crc32,
+                                  gfi_ptr ? gfi_ptr->lineno_checksum : 0);
+          if (!gfi_ptr)
+            continue;
+
+          ci_ptr = gfi_ptr->ctrs;
+          for (t_ix = 0; t_ix != GCOV_COUNTERS_SUMMABLE; t_ix++)
+            {
+              if (!gi_ptr->merge[t_ix])
+                continue;
+
+              cs_ptr = &(this_prg->ctrs[t_ix]);
+              cs_ptr->num += ci_ptr->num;
+              crc32 = crc32_unsigned (crc32, ci_ptr->num);
+
+              for (c_num = 0; c_num < ci_ptr->num; c_num++)
+                {
+                  cs_ptr->sum_all += ci_ptr->values[c_num];
+                  if (cs_ptr->run_max < ci_ptr->values[c_num])
+                    cs_ptr->run_max = ci_ptr->values[c_num];
+                }
+              ci_ptr++;
+            }
+        }
+    }
+  gcov_compute_histogram (this_prg);
+  return crc32;
+}
+
+/* gcda filename.  */
+static char *gi_filename;
+/* buffer for summary from other programs to be written out. */
+static struct gcov_summary_buffer *sum_buffer;
+
+/* A struct that bundles all the related information about the
+   gcda filename.  */
+struct gcov_filename_aux{
+  char *gi_filename_up;
+  int gcov_prefix_strip;
+  size_t prefix_length;
+};
+
+/* Including system dependent components. */
+#include "libgcov-driver-system.c"
+
+/* This function merges counters in GI_PTR to an existing gcda file.
+   Return 0 on success.
+   Return -1 on error. In this case, caller will goto read_fatal.  */
+
+static int
+gcov_exit_merge_gcda (struct gcov_info *gi_ptr,
+                      struct gcov_summary *prg_p,
+                      struct gcov_summary *this_prg,
+                      gcov_position_t *summary_pos_p,
+                      gcov_position_t *eof_pos_p,
+                      gcov_unsigned_t crc32)
+{
+  gcov_unsigned_t tag, length, version, stamp;
+  unsigned t_ix, f_ix;
+  int error = 0;
+  struct gcov_summary_buffer **sum_tail = &sum_buffer;
+
+  version = gcov_read_unsigned ();
+  if (!gcov_version (gi_ptr, version, gi_filename))
+    return -1;
+
+  stamp = gcov_read_unsigned ();
+  if (stamp != gi_ptr->stamp)
+    /* Read from a different compilation. Overwrite the file.  */
+    return 0;
+
+  /* Look for program summary.  */
+  for (f_ix = ~0u;;)
+    {
+      struct gcov_summary tmp;
+
+      *eof_pos_p = gcov_position ();
+      tag = gcov_read_unsigned ();
+      if (tag != GCOV_TAG_PROGRAM_SUMMARY)
+        break;
+
+      length = gcov_read_unsigned ();
+      gcov_read_summary (&tmp);
+      if ((error = gcov_is_error ()))
+        goto read_error;
+      if (*summary_pos_p)
+        {
+          /* Save all summaries after the one that will be
+             merged into below. These will need to be rewritten
+             as histogram merging may change the number of non-zero
+             histogram entries that will be emitted, and thus the
+             size of the merged summary.  */
+          (*sum_tail) = (struct gcov_summary_buffer *)
+              xmalloc (sizeof(struct gcov_summary_buffer));
+          (*sum_tail)->summary = tmp;
+          (*sum_tail)->next = 0;
+          sum_tail = &((*sum_tail)->next);
+          goto next_summary;
+        }
+      if (tmp.checksum != crc32)
+        goto next_summary;
+
+      for (t_ix = 0; t_ix != GCOV_COUNTERS_SUMMABLE; t_ix++)
+        if (tmp.ctrs[t_ix].num != this_prg->ctrs[t_ix].num)
+          goto next_summary;
+      *prg_p = tmp;
+      *summary_pos_p = *eof_pos_p;
+
+    next_summary:;
+    }
+
+  /* Merge execution counts for each function.  */
+  for (f_ix = 0; f_ix != gi_ptr->n_functions;
+       f_ix++, tag = gcov_read_unsigned ())
+    {
+      const struct gcov_ctr_info *ci_ptr;
+      const struct gcov_fn_info *gfi_ptr = gi_ptr->functions[f_ix];
+
+      if (tag != GCOV_TAG_FUNCTION)
+        goto read_mismatch;
+
+      length = gcov_read_unsigned ();
+      if (!length)
+        /* This function did not appear in the other program.
+           We have nothing to merge.  */
+        continue;
+
+      /* Check function.  */
+      if (length != GCOV_TAG_FUNCTION_LENGTH)
+        goto read_mismatch;
+
+      gcc_assert (gfi_ptr && gfi_ptr->key == gi_ptr);
+
+      if (gcov_read_unsigned () != gfi_ptr->ident
+          || gcov_read_unsigned () != gfi_ptr->lineno_checksum
+          || gcov_read_unsigned () != gfi_ptr->cfg_checksum)
+         goto read_mismatch;
+
+      ci_ptr = gfi_ptr->ctrs;
+      for (t_ix = 0; t_ix < GCOV_COUNTERS; t_ix++)
+        {
+          gcov_merge_fn merge = gi_ptr->merge[t_ix];
+
+          if (!merge)
+            continue;
+
+          tag = gcov_read_unsigned ();
+          length = gcov_read_unsigned ();
+          if (tag != GCOV_TAG_FOR_COUNTER (t_ix)
+              || length != GCOV_TAG_COUNTER_LENGTH (ci_ptr->num))
+            goto read_mismatch;
+          (*merge) (ci_ptr->values, ci_ptr->num);
+          ci_ptr++;
+        }
+        if ((error = gcov_is_error ()))
+          goto read_error;
+    }
+  if (tag && tag != GCOV_TAG_MODULE_INFO)
+    {
+    read_mismatch:;
+      gcov_error ("profiling:%s:Merge mismatch for %s\n",
+                  gi_filename, f_ix + 1 ? "function" : "summaries");
+      return -1;
+    }
+
+  return 0;
+
+read_error:;
+  gcov_error (error < 0 ? "profiling:%s:Overflow merging\n"
+                : "profiling:%s:Error merging\n", gi_filename);
+  return -1;
+}
+
+/* Write counters in GI_PTR and the summary in PRG to a gcda file. In
+   the case of appending to an existing file, SUMMARY_POS will be non-zero.
+   We will write the file starting from SUMMAY_POS.  */
+
+static void
+gcov_exit_write_gcda (struct gcov_info *gi_ptr,
+                      const struct gcov_summary *prg_p,
+                      const gcov_position_t eof_pos,
+                      const gcov_position_t summary_pos)
+
+{
+  const struct gcov_ctr_info *ci_ptr;
+  unsigned t_ix, f_ix, n_counts, length;
+  gcov_position_t eof_pos1 = 0;
+  struct gcov_summary_buffer *next_sum_buffer;
+
+  /* Write out the data.  */
+  if (!eof_pos)
+    {
+      gcov_write_tag_length (GCOV_DATA_MAGIC, GCOV_VERSION);
+      gcov_write_unsigned (gi_ptr->stamp);
+    }
+
+  if (summary_pos)
+     gcov_seek (summary_pos);
+  gcc_assert (!summary_pos || summary_pos == gcov_position ());
+
+  /* Generate whole program statistics.  */
+  gcov_write_summary (GCOV_TAG_PROGRAM_SUMMARY, prg_p);
+
+  /* Rewrite all the summaries that were after the summary we merged
+     into. This is necessary as the merged summary may have a different
+     size due to the number of non-zero histogram entries changing after
+     merging.  */
+
+  while (sum_buffer)
+    {
+      gcov_write_summary (GCOV_TAG_PROGRAM_SUMMARY, &sum_buffer->summary);
+      next_sum_buffer = sum_buffer->next;
+      free (sum_buffer);
+      sum_buffer = next_sum_buffer;
+    }
+
+  /* Write execution counts for each function.  */
+  for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++)
+    {
+      const struct gcov_fn_info *gfi_ptr = gi_ptr->functions[f_ix];
+      gcc_assert (gfi_ptr && gfi_ptr->key == gi_ptr);
+      length = GCOV_TAG_FUNCTION_LENGTH;
+
+      gcov_write_tag_length (GCOV_TAG_FUNCTION, length);
+
+      gcov_write_unsigned (gfi_ptr->ident);
+      gcov_write_unsigned (gfi_ptr->lineno_checksum);
+      gcov_write_unsigned (gfi_ptr->cfg_checksum);
+
+      ci_ptr = gfi_ptr->ctrs;
+      for (t_ix = 0; t_ix < GCOV_COUNTERS; t_ix++)
+        {
+          if (!gi_ptr->merge[t_ix])
+            continue;
+
+          n_counts = ci_ptr->num;
+          gcov_write_tag_length (GCOV_TAG_FOR_COUNTER (t_ix),
+                                 GCOV_TAG_COUNTER_LENGTH (n_counts));
+          gcov_type *c_ptr = ci_ptr->values;
+          while (n_counts--)
+            gcov_write_counter (*c_ptr++);
+          ci_ptr++;
+        }
+      eof_pos1 = gcov_position ();
+    }
+
+    /* Write the end marker  */
+    gcov_write_unsigned (0);
+    gi_ptr->eof_pos = eof_pos1;
+}
+
+/* Helper function for merging summary.
+   Return -1 on error. Return 0 on success.  */
+
+static int
+gcov_exit_merge_summary (const struct gcov_info *gi_ptr, struct gcov_summary *prg,
+                         struct gcov_summary *this_prg, gcov_unsigned_t crc32,
+                         struct gcov_summary *all_prg __attribute__ ((unused)))
+{
+  struct gcov_ctr_summary *cs_prg, *cs_tprg, *cs_all;
+  unsigned t_ix;
+
+  /* Merge the summaries.  */
+  for (t_ix = 0; t_ix < GCOV_COUNTERS_SUMMABLE; t_ix++)
+    {
+      cs_prg = &(prg->ctrs[t_ix]);
+      cs_tprg = &(this_prg->ctrs[t_ix]);
+      cs_all = &(all_prg->ctrs[t_ix]);
+
+      if (gi_ptr->merge[t_ix])
+        {
+          if (!cs_prg->runs++)
+            cs_prg->num = cs_tprg->num;
+          cs_prg->sum_all += cs_tprg->sum_all;
+          if (cs_prg->run_max < cs_tprg->run_max)
+            cs_prg->run_max = cs_tprg->run_max;
+          cs_prg->sum_max += cs_tprg->run_max;
+          if (cs_prg->runs == 1)
+            memcpy (cs_prg->histogram, cs_tprg->histogram,
+                    sizeof (gcov_bucket_type) * GCOV_HISTOGRAM_SIZE);
+          else
+            gcov_histogram_merge (cs_prg->histogram, cs_tprg->histogram);
+        }
+      else if (cs_prg->runs)
+        return -1;
+
+      if (!cs_all->runs && cs_prg->runs)
+        memcpy (cs_all, cs_prg, sizeof (*cs_all));
+      else if (!all_prg->checksum
+               && (!GCOV_LOCKED || cs_all->runs == cs_prg->runs)
+               /* Don't compare the histograms, which may have slight
+                   variations depending on the order they were updated
+                   due to the truncating integer divides used in the
+                   merge.  */
+                && memcmp (cs_all, cs_prg,
+                           sizeof (*cs_all) - (sizeof (gcov_bucket_type)
+                                               * GCOV_HISTOGRAM_SIZE)))
+        {
+          gcov_error ("profiling:%s:Invocation mismatch - "
+              "some data files may have been removed%s\n",
+          gi_filename, GCOV_LOCKED
+          ? "" : " or concurrent update without locking support");
+          all_prg->checksum = ~0u;
+        }
+    }
+
+  prg->checksum = crc32;
+
+  return 0;
+}
+
+/* Sort N entries in VALUE_ARRAY in descending order.
+   Each entry in VALUE_ARRAY has two values. The sorting
+   is based on the second value.  */
+
+GCOV_LINKAGE  void
+gcov_sort_n_vals (gcov_type *value_array, int n)
+{
+  int j, k;
+  for (j = 2; j < n; j += 2)
+    {
+      gcov_type cur_ent[2];
+      cur_ent[0] = value_array[j];
+      cur_ent[1] = value_array[j + 1];
+      k = j - 2;
+      while (k >= 0 && value_array[k + 1] < cur_ent[1])
+        {
+          value_array[k + 2] = value_array[k];
+          value_array[k + 3] = value_array[k+1];
+          k -= 2;
+        }
+      value_array[k + 2] = cur_ent[0];
+      value_array[k + 3] = cur_ent[1];
+    }
+}
+
+/* Sort the profile counters for all indirect call sites. Counters
+   for each call site are allocated in array COUNTERS.  */
+
+static void
+gcov_sort_icall_topn_counter (const struct gcov_ctr_info *counters)
+{
+  int i;
+  gcov_type *values;
+  int n = counters->num;
+  gcc_assert (!(n % GCOV_ICALL_TOPN_NCOUNTS));
+
+  values = counters->values;
+
+  for (i = 0; i < n; i += GCOV_ICALL_TOPN_NCOUNTS)
+    {
+      gcov_type *value_array = &values[i + 1];
+      gcov_sort_n_vals (value_array, GCOV_ICALL_TOPN_NCOUNTS - 1);
+    }
+}
+
+static void
+gcov_sort_topn_counter_arrays (const struct gcov_info *gi_ptr)
+{
+  unsigned int i;
+  int f_ix;
+  const struct gcov_fn_info *gfi_ptr;
+  const struct gcov_ctr_info *ci_ptr;
+
+  for (f_ix = 0; (unsigned)f_ix != gi_ptr->n_functions; f_ix++)
+    {
+      gfi_ptr = gi_ptr->functions[f_ix];
+      ci_ptr = gfi_ptr->ctrs;
+      for (i = 0; i < GCOV_COUNTERS; i++)
+        {
+          if (gi_ptr->merge[i] == 0)
+            continue;
+          if (i == GCOV_COUNTER_ICALL_TOPNV)
+            {
+              gcov_sort_icall_topn_counter (ci_ptr);
+              break;
+            }
+          ci_ptr++;
+        }
+     }
+}
+
+/* Dump the coverage counts for one gcov_info object. We merge with existing
+   counts when possible, to avoid growing the .da files ad infinitum. We use
+   this program's checksum to make sure we only accumulate whole program
+   statistics to the correct summary. An object file might be embedded
+   in two separate programs, and we must keep the two program
+   summaries separate.  */
+
+static void
+gcov_exit_dump_gcov (struct gcov_info *gi_ptr, struct gcov_filename_aux *gf,
+		     gcov_unsigned_t crc32, struct gcov_summary *all_prg,
+                     struct gcov_summary *this_prg)
+{
+  struct gcov_summary prg; /* summary for this object over all program.  */
+  int error;
+  gcov_unsigned_t tag;
+  gcov_position_t summary_pos = 0;
+  gcov_position_t eof_pos = 0;
+
+  sum_buffer = 0;
+  gcov_sort_topn_counter_arrays (gi_ptr);
+
+  error = gcov_exit_open_gcda_file (gi_ptr, gf);
+  if (error == -1)
+    return;
+
+  tag = gcov_read_unsigned ();
+  if (tag)
+    {
+      /* Merge data from file.  */
+      if (tag != GCOV_DATA_MAGIC)
+        {
+          gcov_error ("profiling:%s:Not a gcov data file\n", gi_filename);
+          goto read_fatal;
+        }
+      error = gcov_exit_merge_gcda (gi_ptr, &prg, this_prg, &summary_pos, &eof_pos,
+				    crc32);
+      if (error == -1)
+        goto read_fatal;
+    }
+
+  gcov_rewrite ();
+
+  if (!summary_pos)
+    {
+      memset (&prg, 0, sizeof (prg));
+      summary_pos = eof_pos;
+    }
+
+  error = gcov_exit_merge_summary (gi_ptr, &prg, this_prg, crc32, all_prg);
+  if (error == -1)
+    goto read_fatal;
+
+  gcov_exit_write_gcda (gi_ptr, &prg, eof_pos, summary_pos);
+  /* fall through */
+
+read_fatal:;
+  if ((error = gcov_close ()))
+    gcov_error (error  < 0 ?
+                "profiling:%s:Overflow writing\n" :
+                "profiling:%s:Error writing\n",
+                gi_filename);
+}
+
+/* Write imported files (auxiliary modules) for primary module GI_PTR
+   into file GI_FILENAME.  */
+
+static void
+gcov_write_import_file (char *gi_filename, struct gcov_info *gi_ptr)
+{
+  char  *gi_imports_filename;
+  const char *gcov_suffix;
+  FILE *imports_file;
+  size_t prefix_length, suffix_length;
+
+  gcov_suffix = getenv ("GCOV_IMPORTS_SUFFIX");
+  if (!gcov_suffix || !strlen (gcov_suffix))
+    gcov_suffix = ".imports";
+  suffix_length = strlen (gcov_suffix);
+  prefix_length = strlen (gi_filename);
+  gi_imports_filename = (char *) alloca (prefix_length + suffix_length + 1);
+  memset (gi_imports_filename, 0, prefix_length + suffix_length + 1);
+  memcpy (gi_imports_filename, gi_filename, prefix_length);
+  memcpy (gi_imports_filename + prefix_length, gcov_suffix, suffix_length);
+  imports_file = fopen (gi_imports_filename, "w");
+  if (imports_file)
+    {
+      const struct dyn_imp_mod **imp_mods;
+      unsigned i, imp_len;
+      imp_mods = gcov_get_sorted_import_module_array (gi_ptr, &imp_len);
+      if (imp_mods)
+        {
+          for (i = 0; i < imp_len; i++)
+	    {
+	      fprintf (imports_file, "%s\n",
+		       imp_mods[i]->imp_mod->mod_info->source_filename);
+	      fprintf (imports_file, "%s%s\n",
+		       imp_mods[i]->imp_mod->mod_info->da_filename, GCOV_DATA_SUFFIX);
+	    }
+          free (imp_mods);
+        }
+      fclose (imports_file);
+    }
+}
+
+/* Write out auxiliary module infomation.  */
+
+static void
+gcov_dump_module_info (struct gcov_filename_aux *gf)
+{
+  struct gcov_info *gi_ptr;
+
+  __gcov_compute_module_groups ();
+
+  /* Now write out module group info.  */
+  for (gi_ptr = __gcov_list; gi_ptr; gi_ptr = gi_ptr->next)
+    {
+      int error;
+
+      if (gcov_exit_open_gcda_file (gi_ptr, gf) == -1)
+        continue;
+
+      /* Overwrite the zero word at the of the file.  */
+      gcov_rewrite ();
+      gcov_seek (gi_ptr->eof_pos);
+
+      gcov_write_module_infos (gi_ptr);
+      /* Write the end marker  */
+      gcov_write_unsigned (0);
+      gcov_truncate ();
+
+      if ((error = gcov_close ()))
+           gcov_error (error  < 0 ?  "profiling:%s:Overflow writing\n" :
+                                     "profiling:%s:Error writing\n",
+                                     gi_filename);
+      gcov_write_import_file (gi_filename, gi_ptr);
+    }
+
+  __gcov_finalize_dyn_callgraph ();
+}
+
+/* Dump the coverage counts. We merge with existing counts when
+   possible, to avoid growing the .da files ad infinitum. We use this
+   program's checksum to make sure we only accumulate whole program
+   statistics to the correct summary. An object file might be embedded
+   in two separate programs, and we must keep the two program
+   summaries separate.  */
+
+void
+gcov_exit (void)
+{
+  struct gcov_info *gi_ptr;
+  struct gcov_filename_aux gf;
+  gcov_unsigned_t crc32;
+  struct gcov_summary all_prg;
+  struct gcov_summary this_prg;
+  int dump_module_info = 0;
+
+  /* Prevent the counters from being dumped a second time on exit when the
+     application already wrote out the profile using __gcov_dump().  */
+  if (gcov_dump_complete)
+    return;
+
+  crc32 = gcov_exit_compute_summary (&this_prg);
+
+  allocate_filename_struct (&gf);
+#if !GCOV_LOCKED
+  memset (&all_prg, 0, sizeof (all_prg));
+#endif
+
+  for (gi_ptr = __gcov_list; gi_ptr; gi_ptr = gi_ptr->next)
+    {
+      gcov_exit_dump_gcov (gi_ptr, &gf, crc32, &all_prg, &this_prg);
+
+      /* The IS_PRIMARY field is overloaded to indicate if this module
+         is FDO/LIPO.  */
+      if (gi_ptr->mod_info)
+        dump_module_info |= gi_ptr->mod_info->is_primary;
+    }
+
+  if (dump_module_info)
+    gcov_dump_module_info (&gf);
+
+  free (gi_filename);
+}
+
+/* Reset all counters to zero.  */
+
+void
+gcov_clear (void)
+{
+  const struct gcov_info *gi_ptr;
+
+  for (gi_ptr = __gcov_list; gi_ptr; gi_ptr = gi_ptr->next)
+    {
+      unsigned f_ix;
+
+      for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++)
+	{
+	  unsigned t_ix;
+	  const struct gcov_fn_info *gfi_ptr = gi_ptr->functions[f_ix];
+
+	  if (!gfi_ptr || gfi_ptr->key != gi_ptr)
+	    continue;
+	  const struct gcov_ctr_info *ci_ptr = gfi_ptr->ctrs;
+	  for (t_ix = 0; t_ix != GCOV_COUNTERS; t_ix++)
+	    {
+	      if (!gi_ptr->merge[t_ix])
+		continue;
+
+	      memset (ci_ptr->values, 0, sizeof (gcov_type) * ci_ptr->num);
+	      ci_ptr++;
+	    }
+	}
+    }
+}
+
+/* Add a new object file onto the bb chain.  Invoked automatically
+   when running an object file's global ctors.  */
+
+void
+__gcov_init (struct gcov_info *info)
+{
+#ifndef IN_GCOV_TOOL
+  if (!gcov_sampling_period_initialized)
+    {
+      const char* env_value_str = getenv ("GCOV_SAMPLING_PERIOD");
+      if (env_value_str)
+        {
+          int env_value_int = atoi(env_value_str);
+          if (env_value_int >= 1)
+            __gcov_sampling_period = env_value_int;
+        }
+      gcov_sampling_period_initialized = 1;
+    }
+#endif /* IN_GCOV_TOOL */
+
+  if (!info->version || !info->n_functions)
+    return;
+
+  if (gcov_version (info, info->version, 0))
+    {
+      size_t filename_length = strlen (info->filename);
+
+      /* Refresh the longest file name information.  */
+      if (filename_length > gcov_max_filename)
+        gcov_max_filename = filename_length;
+
+      /* Assign the module ID (starting at 1).  */
+      info->mod_info->ident = (++gcov_cur_module_id);
+      gcc_assert (EXTRACT_MODULE_ID_FROM_GLOBAL_ID (GEN_FUNC_GLOBAL_ID (
+                                                       info->mod_info->ident, 0))
+                  == info->mod_info->ident);
+
+      if (!__gcov_list)
+        {
+          atexit (gcov_exit);
+        }
+
+      info->next = __gcov_list;
+      __gcov_list = info;
+    }
+  info->version = 0;
+}
+
+/* This function returns the size of gcda file to be written. Note
+   the size is in units of gcov_type.  */
+
+GCOV_LINKAGE unsigned gcov_gcda_file_size (const struct gcov_info *,
+                                           const struct gcov_summary *);
+
+GCOV_LINKAGE unsigned
+gcov_gcda_file_size (const struct gcov_info *gi_ptr,
+                     const struct gcov_summary *sum)
+{
+  unsigned size;
+  const struct gcov_fn_info *fi_ptr;
+  unsigned f_ix, t_ix, h_ix, h_cnt = 0;
+  unsigned n_counts;
+  const struct gcov_ctr_info *ci_ptr;
+  const struct gcov_ctr_summary *csum;
+
+  /* GCOV_DATA_MAGIC, GCOV_VERSION and time_stamp.  */
+  size = 3;
+
+  /* Program summary, which depends on the number of non-zero
+      histogram entries.  */
+   csum = &sum->ctrs[GCOV_COUNTER_ARCS];
+   for (h_ix = 0; h_ix < GCOV_HISTOGRAM_SIZE; h_ix++)
+     {
+       if (csum->histogram[h_ix].num_counters > 0)
+         h_cnt++;
+     }
+   size += 2 + GCOV_TAG_SUMMARY_LENGTH(h_cnt);
+
+  /* size for each function.  */
+  for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++)
+    {
+      fi_ptr = gi_ptr->functions[f_ix];
+
+      size += 2 /* tag_length itself */
+              + GCOV_TAG_FUNCTION_LENGTH; /* ident, lineno_cksum, cfg_cksm */
+
+      ci_ptr = fi_ptr->ctrs;
+      for (t_ix = 0; t_ix < GCOV_COUNTERS; t_ix++)
+        {
+          if (!gi_ptr->merge[t_ix])
+            continue;
+
+          n_counts = ci_ptr->num;
+          size += 2 + GCOV_TAG_COUNTER_LENGTH (n_counts);
+          ci_ptr++;
+        }
+    }
+
+  size += 1;
+
+  return size*4;
+}
+
+#endif /* L_gcov */
+#endif /* inhibit_libc */
diff --git a/libgcc/libgcov-interface.c b/libgcc/libgcov-interface.c
new file mode 100644
index 0000000..fe56a3a
--- /dev/null
+++ b/libgcc/libgcov-interface.c
@@ -0,0 +1,310 @@
+/* Routines required for instrumenting a program.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1989-2013 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#include "libgcov.h"
+#include "gthr.h"
+
+#if defined(inhibit_libc)
+/* If libc and its header files are not available, provide dummy functions.  */
+
+#ifdef L_gcov_flush
+void __gcov_flush (void) {}
+#endif
+
+#ifdef L_gcov_reset
+void __gcov_reset (void) {}
+#endif
+
+#ifdef L_gcov_dump
+void __gcov_dump (void) {}
+#endif
+
+#else
+
+extern void gcov_clear (void) ATTRIBUTE_HIDDEN;
+extern void gcov_exit (void) ATTRIBUTE_HIDDEN;
+extern void set_gcov_dump_complete (void) ATTRIBUTE_HIDDEN;
+extern void reset_gcov_dump_complete (void) ATTRIBUTE_HIDDEN;
+
+#ifdef L_gcov_flush
+
+#ifdef __GTHREAD_MUTEX_INIT
+ATTRIBUTE_HIDDEN __gthread_mutex_t __gcov_flush_mx = __GTHREAD_MUTEX_INIT;
+#define init_mx_once()
+#else
+__gthread_mutex_t __gcov_flush_mx ATTRIBUTE_HIDDEN;
+
+static void
+init_mx (void)
+{
+  __GTHREAD_MUTEX_INIT_FUNCTION (&__gcov_flush_mx);
+}
+static void
+init_mx_once (void)
+{
+  static __gthread_once_t once = __GTHREAD_ONCE_INIT;
+  __gthread_once (&once, init_mx);
+}
+#endif
+
+/* Called before fork or exec - write out profile information gathered so
+   far and reset it to zero.  This avoids duplication or loss of the
+   profile information gathered so far.  */
+
+void
+__gcov_flush (void)
+{
+  init_mx_once ();
+  __gthread_mutex_lock (&__gcov_flush_mx);
+
+  gcov_exit ();
+  gcov_clear ();
+
+  __gthread_mutex_unlock (&__gcov_flush_mx);
+}
+
+#endif /* L_gcov_flush */
+
+#ifdef L_gcov_reset
+
+/* Function that can be called from application to reset counters to zero,
+   in order to collect profile in region of interest.  */
+
+void
+__gcov_reset (void)
+{
+  gcov_clear ();
+  /* Re-enable dumping to support collecting profile in multiple regions
+     of interest.  */
+  reset_gcov_dump_complete ();
+}
+
+#endif /* L_gcov_reset */
+
+#ifdef L_gcov_dump
+
+/* Function that can be called from application to write profile collected
+   so far, in order to collect profile in region of interest.  */
+
+void
+__gcov_dump (void)
+{
+  gcov_exit ();
+  /* Prevent profile from being dumped a second time on application exit.  */
+  set_gcov_dump_complete ();
+}
+
+#endif /* L_gcov_dump */
+
+#ifdef L_gcov_sampling
+
+/* Emitted in coverage.c.  */
+
+/* Sampling period.  */
+extern gcov_unsigned_t __gcov_sampling_period;
+extern gcov_unsigned_t __gcov_has_sampling;
+void __gcov_set_sampling_period (unsigned int period);
+unsigned int __gcov_sampling_enabled (void);
+/* Per thread sample counter.  */
+THREAD_PREFIX gcov_unsigned_t __gcov_sample_counter = 0;
+
+/* Set sampling period to PERIOD.  */
+
+void __gcov_set_sampling_period (unsigned int period)
+{
+  gcc_assert (__gcov_has_sampling);
+  __gcov_sampling_period = period;
+}
+
+unsigned int __gcov_sampling_enabled (void)
+{
+  return __gcov_has_sampling;
+}
+
+#endif
+
+#ifdef L_gcov_prefix
+
+char *__gcov_get_profile_prefix (void);
+
+/* Profile directory prefix specified to -fprofile-generate=.  */
+extern char * __gcov_profile_prefix;
+
+char *__gcov_get_profile_prefix (void)
+{
+  return __gcov_profile_prefix;
+}
+
+#endif
+
+#ifdef L_gcov_fork
+/* A wrapper for the fork function.  Flushes the accumulated profiling data, so
+   that they are not counted twice.  */
+
+pid_t
+__gcov_fork (void)
+{
+  pid_t pid;
+  extern __gthread_mutex_t __gcov_flush_mx;
+  __gcov_flush ();
+  pid = fork ();
+  if (pid == 0)
+    __GTHREAD_MUTEX_INIT_FUNCTION (&__gcov_flush_mx);
+  return pid;
+}
+#endif
+
+#ifdef L_gcov_execl
+/* A wrapper for the execl function.  Flushes the accumulated profiling data, so
+   that they are not lost.  */
+
+int
+__gcov_execl (const char *path, char *arg, ...)
+{
+  va_list ap, aq;
+  unsigned i, length;
+  char **args;
+
+  __gcov_flush ();
+
+  va_start (ap, arg);
+  va_copy (aq, ap);
+
+  length = 2;
+  while (va_arg (ap, char *))
+    length++;
+  va_end (ap);
+
+  args = (char **) alloca (length * sizeof (void *));
+  args[0] = arg;
+  for (i = 1; i < length; i++)
+    args[i] = va_arg (aq, char *);
+  va_end (aq);
+
+  return execv (path, args);
+}
+#endif
+
+#ifdef L_gcov_execlp
+/* A wrapper for the execlp function.  Flushes the accumulated profiling data, so
+   that they are not lost.  */
+
+int
+__gcov_execlp (const char *path, char *arg, ...)
+{
+  va_list ap, aq;
+  unsigned i, length;
+  char **args;
+
+  __gcov_flush ();
+
+  va_start (ap, arg);
+  va_copy (aq, ap);
+
+  length = 2;
+  while (va_arg (ap, char *))
+    length++;
+  va_end (ap);
+
+  args = (char **) alloca (length * sizeof (void *));
+  args[0] = arg;
+  for (i = 1; i < length; i++)
+    args[i] = va_arg (aq, char *);
+  va_end (aq);
+
+  return execvp (path, args);
+}
+#endif
+
+#ifdef L_gcov_execle
+/* A wrapper for the execle function.  Flushes the accumulated profiling data, so
+   that they are not lost.  */
+
+int
+__gcov_execle (const char *path, char *arg, ...)
+{
+  va_list ap, aq;
+  unsigned i, length;
+  char **args;
+  char **envp;
+
+  __gcov_flush ();
+
+  va_start (ap, arg);
+  va_copy (aq, ap);
+
+  length = 2;
+  while (va_arg (ap, char *))
+    length++;
+  va_end (ap);
+
+  args = (char **) alloca (length * sizeof (void *));
+  args[0] = arg;
+  for (i = 1; i < length; i++)
+    args[i] = va_arg (aq, char *);
+  envp = va_arg (aq, char **);
+  va_end (aq);
+
+  return execve (path, args, envp);
+}
+#endif
+
+#ifdef L_gcov_execv
+/* A wrapper for the execv function.  Flushes the accumulated profiling data, so
+   that they are not lost.  */
+
+int
+__gcov_execv (const char *path, char *const argv[])
+{
+  __gcov_flush ();
+  return execv (path, argv);
+}
+#endif
+
+#ifdef L_gcov_execvp
+/* A wrapper for the execvp function.  Flushes the accumulated profiling data, so
+   that they are not lost.  */
+
+int
+__gcov_execvp (const char *path, char *const argv[])
+{
+  __gcov_flush ();
+  return execvp (path, argv);
+}
+#endif
+
+#ifdef L_gcov_execve
+/* A wrapper for the execve function.  Flushes the accumulated profiling data, so
+   that they are not lost.  */
+
+int
+__gcov_execve (const char *path, char *const argv[], char *const envp[])
+{
+  __gcov_flush ();
+  return execve (path, argv, envp);
+}
+#endif
+
+#endif /* inhibit_libc */
diff --git a/libgcc/libgcov-merge.c b/libgcc/libgcov-merge.c
new file mode 100644
index 0000000..3385ea4
--- /dev/null
+++ b/libgcc/libgcov-merge.c
@@ -0,0 +1,292 @@
+/* Routines required for instrumenting a program.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1989-2013 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#include "libgcov.h"
+
+#if defined(inhibit_libc)
+/* If libc and its header files are not available, provide dummy functions.  */
+
+#ifdef L_gcov_merge_add
+void __gcov_merge_add (gcov_type *counters  __attribute__ ((unused)),
+		       unsigned n_counters __attribute__ ((unused))) {}
+#endif
+
+#ifdef L_gcov_merge_single
+void __gcov_merge_single (gcov_type *counters  __attribute__ ((unused)),
+			  unsigned n_counters __attribute__ ((unused))) {}
+#endif
+
+#ifdef L_gcov_merge_delta
+void __gcov_merge_delta (gcov_type *counters  __attribute__ ((unused)),
+			 unsigned n_counters __attribute__ ((unused))) {}
+#endif
+
+#else
+
+static inline gcov_type
+gcov_get_counter (void)
+{
+#ifndef IN_GCOV_TOOL
+  return gcov_read_counter ();
+#else
+  return gcov_read_counter_mem () * gcov_get_merge_weight ();
+#endif
+}
+
+static inline gcov_type
+gcov_get_counter_target (void)
+{
+#ifndef IN_GCOV_TOOL
+  return gcov_read_counter ();
+#else
+  return gcov_read_counter_mem ();
+#endif
+}
+
+#ifdef L_gcov_merge_add
+/* The profile merging function that just adds the counters.  It is given
+   an array COUNTERS of N_COUNTERS old counters and it reads the same number
+   of counters from the gcov file.  */
+void
+__gcov_merge_add (gcov_type *counters, unsigned n_counters)
+{
+  for (; n_counters; counters++, n_counters--)
+    *counters += gcov_get_counter ();
+}
+#endif /* L_gcov_merge_add */
+
+#ifdef L_gcov_merge_ior
+/* The profile merging function that just adds the counters.  It is given
+   an array COUNTERS of N_COUNTERS old counters and it reads the same number
+   of counters from the gcov file.  */
+void
+__gcov_merge_ior (gcov_type *counters, unsigned n_counters)
+{
+  for (; n_counters; counters++, n_counters--)
+    *counters |= gcov_get_counter ();
+}
+#endif
+
+#ifdef L_gcov_merge_dc
+
+/* Returns 1 if the function global id GID is not valid.  */
+
+static int
+__gcov_is_gid_insane (gcov_type gid)
+{
+  if (EXTRACT_MODULE_ID_FROM_GLOBAL_ID (gid) == 0
+      || EXTRACT_FUNC_ID_FROM_GLOBAL_ID (gid) == 0)
+    return 1;
+  return 0;
+}
+
+/* The profile merging function used for merging direct call counts
+   This function is given array COUNTERS of N_COUNTERS old counters and it
+   reads the same number of counters from the gcov file.  */
+
+void
+__gcov_merge_dc (gcov_type *counters, unsigned n_counters)
+{
+  unsigned i;
+
+  gcc_assert (!(n_counters % 2));
+  for (i = 0; i < n_counters; i += 2)
+    {
+      gcov_type global_id = gcov_get_counter_target ();
+      gcov_type call_count = gcov_get_counter ();
+
+      /* Note that global id counter may never have been set if no calls were
+	 made from this call-site.  */
+      if (counters[i] && global_id)
+        {
+          /* TODO race condition requires us do the following correction.  */
+          if (__gcov_is_gid_insane (counters[i]))
+            counters[i] = global_id;
+          else if (__gcov_is_gid_insane (global_id))
+            global_id = counters[i];
+
+          gcc_assert (counters[i] == global_id);
+        }
+      else if (global_id)
+	counters[i] = global_id;
+
+      counters[i + 1] += call_count;
+
+      /* Reset. */
+      if (__gcov_is_gid_insane (counters[i]))
+        counters[i] = counters[i + 1] = 0;
+
+      /* Assert that the invariant (global_id == 0) <==> (call_count == 0)
+	 holds true after merging.  */
+      if (counters[i] == 0)
+        counters[i+1] = 0;
+      if (counters[i + 1] == 0)
+        counters[i] = 0;
+    }
+}
+#endif
+
+#ifdef L_gcov_merge_icall_topn
+/* The profile merging function used for merging indirect call counts
+   This function is given array COUNTERS of N_COUNTERS old counters and it
+   reads the same number of counters from the gcov file.  */
+
+void
+__gcov_merge_icall_topn (gcov_type *counters, unsigned n_counters)
+{
+  unsigned i, j, k, m;
+
+  gcc_assert (!(n_counters % GCOV_ICALL_TOPN_NCOUNTS));
+  for (i = 0; i < n_counters; i += GCOV_ICALL_TOPN_NCOUNTS)
+    {
+      gcov_type *value_array = &counters[i + 1];
+      unsigned tmp_size = 2 * (GCOV_ICALL_TOPN_NCOUNTS - 1);
+      gcov_type *tmp_array
+          = (gcov_type *) alloca (tmp_size * sizeof (gcov_type));
+
+      for (j = 0; j < tmp_size; j++)
+        tmp_array[j] = 0;
+
+      for (j = 0; j < GCOV_ICALL_TOPN_NCOUNTS - 1; j += 2)
+        {
+          tmp_array[j] = value_array[j];
+          tmp_array[j + 1] = value_array [j + 1];
+        }
+
+      /* Skip the number_of_eviction entry.  */
+      gcov_get_counter ();
+      for (k = 0; k < GCOV_ICALL_TOPN_NCOUNTS - 1; k += 2)
+        {
+          int found = 0;
+          gcov_type global_id = gcov_get_counter_target ();
+          gcov_type call_count = gcov_get_counter ();
+          for (m = 0; m < j; m += 2)
+            {
+              if (tmp_array[m] == global_id)
+                {
+                  found = 1;
+                  tmp_array[m + 1] += call_count;
+                  break;
+                }
+            }
+          if (!found)
+            {
+              tmp_array[j] = global_id;
+              tmp_array[j + 1] = call_count;
+              j += 2;
+            }
+        }
+      /* Now sort the temp array */
+      gcov_sort_n_vals (tmp_array, j);
+
+      /* Now copy back the top half of the temp array */
+      for (k = 0; k < GCOV_ICALL_TOPN_NCOUNTS - 1; k += 2)
+        {
+          value_array[k] = tmp_array[k];
+          value_array[k + 1] = tmp_array[k + 1];
+        }
+    }
+}
+#endif
+
+
+#ifdef L_gcov_merge_single
+/* The profile merging function for choosing the most common value.
+   It is given an array COUNTERS of N_COUNTERS old counters and it
+   reads the same number of counters from the gcov file.  The counters
+   are split into 3-tuples where the members of the tuple have
+   meanings:
+
+   -- the stored candidate on the most common value of the measured entity
+   -- counter
+   -- total number of evaluations of the value  */
+void
+__gcov_merge_single (gcov_type *counters, unsigned n_counters)
+{
+  unsigned i, n_measures;
+  gcov_type value, counter, all;
+
+  gcc_assert (!(n_counters % 3));
+  n_measures = n_counters / 3;
+  for (i = 0; i < n_measures; i++, counters += 3)
+    {
+      value = gcov_get_counter_target ();
+      counter = gcov_get_counter ();
+      all = gcov_get_counter ();
+
+      if (counters[0] == value)
+	counters[1] += counter;
+      else if (counter > counters[1])
+	{
+	  counters[0] = value;
+	  counters[1] = counter - counters[1];
+	}
+      else
+	counters[1] -= counter;
+      counters[2] += all;
+    }
+}
+#endif /* L_gcov_merge_single */
+
+#ifdef L_gcov_merge_delta
+/* The profile merging function for choosing the most common
+   difference between two consecutive evaluations of the value.  It is
+   given an array COUNTERS of N_COUNTERS old counters and it reads the
+   same number of counters from the gcov file.  The counters are split
+   into 4-tuples where the members of the tuple have meanings:
+
+   -- the last value of the measured entity
+   -- the stored candidate on the most common difference
+   -- counter
+   -- total number of evaluations of the value  */
+void
+__gcov_merge_delta (gcov_type *counters, unsigned n_counters)
+{
+  unsigned i, n_measures;
+  gcov_type value, counter, all;
+
+  gcc_assert (!(n_counters % 4));
+  n_measures = n_counters / 4;
+  for (i = 0; i < n_measures; i++, counters += 4)
+    {
+      /* last = */ gcov_get_counter ();
+      value = gcov_get_counter_target  ();
+      counter = gcov_get_counter ();
+      all = gcov_get_counter ();
+
+      if (counters[1] == value)
+	counters[2] += counter;
+      else if (counter > counters[2])
+	{
+	  counters[1] = value;
+	  counters[2] = counter - counters[2];
+	}
+      else
+	counters[2] -= counter;
+      counters[3] += all;
+    }
+}
+#endif /* L_gcov_merge_delta */
+#endif /* inhibit_libc */
diff --git a/libgcc/libgcov-profiler.c b/libgcc/libgcov-profiler.c
new file mode 100644
index 0000000..52b8f5d
--- /dev/null
+++ b/libgcc/libgcov-profiler.c
@@ -0,0 +1,351 @@
+/* Routines required for instrumenting a program.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1989-2013 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#include "libgcov.h"
+#if !defined(inhibit_libc)
+
+#ifdef L_gcov_interval_profiler
+/* If VALUE is in interval <START, START + STEPS - 1>, then increases the
+   corresponding counter in COUNTERS.  If the VALUE is above or below
+   the interval, COUNTERS[STEPS] or COUNTERS[STEPS + 1] is increased
+   instead.  */
+
+void
+__gcov_interval_profiler (gcov_type *counters, gcov_type value,
+			  int start, unsigned steps)
+{
+  gcov_type delta = value - start;
+  if (delta < 0)
+    counters[steps + 1]++;
+  else if (delta >= steps)
+    counters[steps]++;
+  else
+    counters[delta]++;
+}
+#endif
+
+#ifdef L_gcov_pow2_profiler
+/* If VALUE is a power of two, COUNTERS[1] is incremented.  Otherwise
+   COUNTERS[0] is incremented.  */
+
+void
+__gcov_pow2_profiler (gcov_type *counters, gcov_type value)
+{
+  if (value & (value - 1))
+    counters[0]++;
+  else
+    counters[1]++;
+}
+#endif
+
+/* Tries to determine the most common value among its inputs.  Checks if the
+   value stored in COUNTERS[0] matches VALUE.  If this is the case, COUNTERS[1]
+   is incremented.  If this is not the case and COUNTERS[1] is not zero,
+   COUNTERS[1] is decremented.  Otherwise COUNTERS[1] is set to one and
+   VALUE is stored to COUNTERS[0].  This algorithm guarantees that if this
+   function is called more than 50% of the time with one value, this value
+   will be in COUNTERS[0] in the end.
+
+   In any case, COUNTERS[2] is incremented.  */
+
+static inline void
+__gcov_one_value_profiler_body (gcov_type *counters, gcov_type value)
+{
+  if (value == counters[0])
+    counters[1]++;
+  else if (counters[1] == 0)
+    {
+      counters[1] = 1;
+      counters[0] = value;
+    }
+  else
+    counters[1]--;
+  counters[2]++;
+}
+
+/* Atomic update version of __gcov_one_value_profile_body().  */
+static inline void
+__gcov_one_value_profiler_body_atomic (gcov_type *counters, gcov_type value)
+{
+  if (value == counters[0])
+    GCOV_TYPE_ATOMIC_FETCH_ADD_FN (&counters[1], 1, MEMMODEL_RELAXED);
+  else if (counters[1] == 0)
+    {
+      counters[1] = 1;
+      counters[0] = value;
+    }
+  else
+    GCOV_TYPE_ATOMIC_FETCH_ADD_FN (&counters[1], -1, MEMMODEL_RELAXED);
+  GCOV_TYPE_ATOMIC_FETCH_ADD_FN (&counters[2], 1, MEMMODEL_RELAXED);
+}
+
+#ifdef L_gcov_one_value_profiler
+void
+__gcov_one_value_profiler (gcov_type *counters, gcov_type value)
+{
+  __gcov_one_value_profiler_body (counters, value);
+}
+
+void
+__gcov_one_value_profiler_atomic (gcov_type *counters, gcov_type value)
+{
+  __gcov_one_value_profiler_body_atomic (counters, value);
+}
+
+#endif
+
+#ifdef L_gcov_indirect_call_profiler
+
+/* By default, the C++ compiler will use function addresses in the
+   vtable entries.  Setting TARGET_VTABLE_USES_DESCRIPTORS to nonzero
+   tells the compiler to use function descriptors instead.  The value
+   of this macro says how many words wide the descriptor is (normally 2),
+   but it may be dependent on target flags.  Since we do not have access
+   to the target flags here we just check to see if it is set and use
+   that to set VTABLE_USES_DESCRIPTORS to 0 or 1.
+
+   It is assumed that the address of a function descriptor may be treated
+   as a pointer to a function.  */
+
+#ifdef TARGET_VTABLE_USES_DESCRIPTORS
+#define VTABLE_USES_DESCRIPTORS 1
+#else
+#define VTABLE_USES_DESCRIPTORS 0
+#endif
+
+/* Tries to determine the most common value among its inputs. */
+void
+__gcov_indirect_call_profiler (gcov_type* counter, gcov_type value,
+			       void* cur_func, void* callee_func)
+{
+  /* If the C++ virtual tables contain function descriptors then one
+     function may have multiple descriptors and we need to dereference
+     the descriptors to see if they point to the same function.  */
+  if (cur_func == callee_func
+      || (VTABLE_USES_DESCRIPTORS && callee_func
+	  && *(void **) cur_func == *(void **) callee_func))
+    __gcov_one_value_profiler_body (counter, value);
+}
+
+/* Atomic update version of __gcov_indirect_call_profiler().  */
+void
+__gcov_indirect_call_profiler_atomic (gcov_type* counter, gcov_type value,
+                                      void* cur_func, void* callee_func)
+{
+  if (cur_func == callee_func
+      || (VTABLE_USES_DESCRIPTORS && callee_func
+          && *(void **) cur_func == *(void **) callee_func))
+    __gcov_one_value_profiler_body_atomic (counter, value);
+}
+#endif
+
+#ifdef L_gcov_indirect_call_topn_profiler
+/* Tries to keep track the most frequent N values in the counters where
+   N is specified by parameter TOPN_VAL. To track top N values, 2*N counter
+   entries are used.
+   counter[0] --- the accumative count of the number of times one entry in
+                  in the counters gets evicted/replaced due to limited capacity.
+                  When this value reaches a threshold, the bottom N values are
+                  cleared.
+   counter[1] through counter[2*N] records the top 2*N values collected so far.
+   Each value is represented by two entries: count[2*i+1] is the ith value, and
+   count[2*i+2] is the number of times the value is seen.  */
+
+static void
+__gcov_topn_value_profiler_body (gcov_type *counters, gcov_type value,
+                                 gcov_unsigned_t topn_val)
+{
+   unsigned i, found = 0, have_zero_count = 0;
+
+   gcov_type *entry;
+   gcov_type *lfu_entry = &counters[1];
+   gcov_type *value_array = &counters[1];
+   gcov_type *num_eviction = &counters[0];
+
+   /* There are 2*topn_val values tracked, each value takes two slots in the
+      counter array */
+   for ( i = 0; i < (topn_val << 2); i += 2)
+     {
+       entry = &value_array[i];
+       if ( entry[0] == value)
+         {
+           entry[1]++ ;
+           found = 1;
+           break;
+         }
+       else if (entry[1] == 0)
+         {
+           lfu_entry = entry;
+           have_zero_count = 1;
+         }
+      else if (entry[1] < lfu_entry[1])
+        lfu_entry = entry;
+     }
+
+   if (found)
+     return;
+
+   /* lfu_entry is either an empty entry or an entry
+      with lowest count, which will be evicted.  */
+   lfu_entry[0] = value;
+   lfu_entry[1] = 1;
+
+#define GCOV_ICALL_COUNTER_CLEAR_THRESHOLD 3000
+
+   /* Too many evictions -- time to clear bottom entries to
+      avoid hot values bumping each other out.  */
+   if ( !have_zero_count
+        && ++*num_eviction >= GCOV_ICALL_COUNTER_CLEAR_THRESHOLD)
+     {
+       unsigned i, j;
+       gcov_type *p, minv;
+       gcov_type* tmp_cnts
+           = (gcov_type *)alloca (topn_val * sizeof(gcov_type));
+
+       *num_eviction = 0;
+
+       for ( i = 0; i < topn_val; i++ )
+         tmp_cnts[i] = 0;
+
+       /* Find the largest topn_val values from the group of
+          2*topn_val values and put them into tmp_cnts. */
+
+       for ( i = 0; i < 2 * topn_val; i += 2 )
+         {
+           p = 0;
+           for ( j = 0; j < topn_val; j++ )
+             {
+               if ( !p || tmp_cnts[j] < *p )
+                  p = &tmp_cnts[j];
+             }
+            if ( value_array[i + 1] > *p )
+              *p = value_array[i + 1];
+         }
+
+       minv = tmp_cnts[0];
+       for ( j = 1; j < topn_val; j++ )
+         {
+           if (tmp_cnts[j] < minv)
+             minv = tmp_cnts[j];
+         }
+       /* Zero out low value entries  */
+       for ( i = 0; i < 2 * topn_val; i += 2 )
+         {
+           if (value_array[i + 1] < minv)
+             {
+               value_array[i] = 0;
+               value_array[i + 1] = 0;
+             }
+         }
+     }
+}
+
+/* Pointer to the indirect-call counters (per call-site counters).
+   Initialized by the caller.  */
+THREAD_PREFIX gcov_type *__gcov_indirect_call_topn_counters ATTRIBUTE_HIDDEN;
+
+/* Indirect call callee address.  */
+THREAD_PREFIX void *__gcov_indirect_call_topn_callee ATTRIBUTE_HIDDEN;
+
+#ifdef TARGET_VTABLE_USES_DESCRIPTORS
+#define VTABLE_USES_DESCRIPTORS 1
+#else
+#define VTABLE_USES_DESCRIPTORS 0
+#endif
+
+void
+__gcov_indirect_call_topn_profiler (void *cur_func,
+                                    void *cur_module_gcov_info,
+                                    gcov_unsigned_t cur_func_id)
+{
+  void *callee_func = __gcov_indirect_call_topn_callee;
+  gcov_type *counter = __gcov_indirect_call_topn_counters;
+  /* If the C++ virtual tables contain function descriptors then one
+     function may have multiple descriptors and we need to dereference
+     the descriptors to see if they point to the same function.  */
+  if (cur_func == callee_func
+      || (VTABLE_USES_DESCRIPTORS && callee_func
+	  && *(void **) cur_func == *(void **) callee_func))
+    {
+      gcov_type global_id
+          = ((struct gcov_info *) cur_module_gcov_info)->mod_info->ident;
+      global_id = GEN_FUNC_GLOBAL_ID (global_id, cur_func_id);
+      __gcov_topn_value_profiler_body (counter, global_id, GCOV_ICALL_TOPN_VAL);
+      __gcov_indirect_call_topn_callee = 0;
+    }
+}
+
+#endif
+
+#ifdef L_gcov_direct_call_profiler
+/* Pointer to the direct-call counters (per call-site counters).
+   Initialized by the caller.  */
+THREAD_PREFIX gcov_type *__gcov_direct_call_counters ATTRIBUTE_HIDDEN;
+
+/* Direct call callee address.  */
+THREAD_PREFIX void *__gcov_direct_call_callee ATTRIBUTE_HIDDEN;
+
+/* Direct call profiler. */
+void
+__gcov_direct_call_profiler (void *cur_func,
+			     void *cur_module_gcov_info,
+			     gcov_unsigned_t cur_func_id)
+{
+  if (cur_func == __gcov_direct_call_callee)
+    {
+      gcov_type global_id
+          = ((struct gcov_info *) cur_module_gcov_info)->mod_info->ident;
+      global_id = GEN_FUNC_GLOBAL_ID (global_id, cur_func_id);
+      __gcov_direct_call_counters[0] = global_id;
+      __gcov_direct_call_counters[1]++;
+      __gcov_direct_call_callee = 0;
+    }
+}
+#endif
+
+
+#ifdef L_gcov_average_profiler
+/* Increase corresponding COUNTER by VALUE.  FIXME: Perhaps we want
+   to saturate up.  */
+
+void
+__gcov_average_profiler (gcov_type *counters, gcov_type value)
+{
+  counters[0] += value;
+  counters[1] ++;
+}
+#endif
+
+#ifdef L_gcov_ior_profiler
+/* Bitwise-OR VALUE into COUNTER.  */
+
+void
+__gcov_ior_profiler (gcov_type *counters, gcov_type value)
+{
+  *counters |= value;
+}
+#endif
+
+#endif /* inhibit_libc */
diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c
new file mode 100644
index 0000000..b3098e5
--- /dev/null
+++ b/libgcc/libgcov-util.c
@@ -0,0 +1,1086 @@
+/* Utility functions for reading gcda files into in-memory
+   gcov_info structures and offline profile processing. */
+/* Copyright (C) 2014 Free Software Foundation, Inc.
+   Contributed by Rong Xu <xur@google.com>.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+
+#define IN_GCOV_TOOL 1
+#define L_gcov 1
+#define L_gcov_merge_add 1
+#define L_gcov_merge_single 1
+#define L_gcov_merge_delta 1
+#define L_gcov_merge_icall_topn 1
+#define L_gcov_merge_dc 1
+#define L_gcov_merge_ior 1
+#define L_gcov_merge_reusedist 1
+
+#include "libgcov.h"
+#include "intl.h"
+#include "diagnostic.h"
+#include "version.h"
+#include "demangle.h"
+
+extern gcov_type gcov_read_counter_mem();
+extern unsigned gcov_get_merge_weight();
+
+/* We need the dumping and merge part of code in libgcov.  */
+#include "libgcov-driver.c"
+#include "libgcov-merge.c"
+
+/* Verbose mode for debug.  */
+static int verbose;
+
+/* Set verbose flag.  */
+void gcov_set_verbose (void)
+{
+  verbose = 1;
+}
+
+/* The following part is to read Gcda and reconstruct GCOV_INFO.  */
+
+#include "obstack.h"
+#include <unistd.h>
+#include <ftw.h>
+
+static void tag_function (unsigned, unsigned);
+static void tag_blocks (unsigned, unsigned);
+static void tag_arcs (unsigned, unsigned);
+static void tag_lines (unsigned, unsigned);
+static void tag_counters (unsigned, unsigned);
+static void tag_summary (unsigned, unsigned);
+static void tag_module_info (unsigned, unsigned);
+
+/* The gcov_info for the first module.  */
+static struct gcov_info *curr_gcov_info;
+/* The gcov_info being processed.  */
+static struct gcov_info *gcov_info_head;
+/* This variable points to the module being processed.  */
+static struct gcov_module_info *curr_module_info;
+/* This variable contains all the functions in current module.  */
+static struct obstack fn_info;
+/* The function being processed.  */
+static struct gcov_fn_info *curr_fn_info;
+/* The number of functions seen so far.  */
+static unsigned num_fn_info;
+/* This variable contains all the counters for current module.  */
+static int k_ctrs_mask[GCOV_COUNTERS];
+/* The kind of counters that have been seen.  */
+static struct gcov_ctr_info k_ctrs[GCOV_COUNTERS];
+/* Number of kind of counters that have been seen.  */
+static int k_ctrs_types;
+/* The longest length of all the filenames.  */
+static int max_filename_len;
+
+/* Merge functions for counters.  */
+static gcov_merge_fn ctr_merge_functions[GCOV_COUNTERS] = {
+    __gcov_merge_add,
+    __gcov_merge_add,
+    __gcov_merge_add,
+    __gcov_merge_single,
+    __gcov_merge_delta,
+    __gcov_merge_single,
+    __gcov_merge_add,
+    __gcov_merge_ior,
+    __gcov_merge_icall_topn,
+    __gcov_merge_dc,
+};
+
+/* Set the ctrs field in gcvo_fn_info object FN_INFO.  */
+
+static void
+set_fn_ctrs (struct gcov_fn_info *fn_info)
+{
+  int j = 0, i;
+
+  for (i = 0; i < GCOV_COUNTERS; i++)
+    {
+      if (k_ctrs_mask[i] == 0)
+        continue;
+      fn_info->ctrs[j].num = k_ctrs[i].num;
+      fn_info->ctrs[j].values = k_ctrs[i].values;
+      j++;
+    }
+  if (k_ctrs_types == 0)
+    k_ctrs_types = j;
+  else
+    gcc_assert (j == k_ctrs_types);
+}
+
+typedef struct tag_format
+{
+    unsigned tag;
+    char const *name;
+    void (*proc) (unsigned, unsigned);
+} tag_format_t;
+
+static const tag_format_t tag_table[] =
+{
+  {0, "NOP", NULL},
+  {0, "UNKNOWN", NULL},
+  {0, "COUNTERS", tag_counters},
+  {GCOV_TAG_FUNCTION, "FUNCTION", tag_function},
+  {GCOV_TAG_BLOCKS, "BLOCKS", tag_blocks},
+  {GCOV_TAG_ARCS, "ARCS", tag_arcs},
+  {GCOV_TAG_LINES, "LINES", tag_lines},
+  {GCOV_TAG_OBJECT_SUMMARY, "OBJECT_SUMMARY", tag_summary},
+  {GCOV_TAG_PROGRAM_SUMMARY, "PROGRAM_SUMMARY", tag_summary},
+  {GCOV_TAG_MODULE_INFO, "MODULE INFO", tag_module_info},
+  {0, NULL, NULL}
+};
+
+/* Handler for reading function tag.  */
+
+static void
+tag_function (unsigned tag ATTRIBUTE_UNUSED, unsigned length ATTRIBUTE_UNUSED)
+{
+  int i;
+
+  /* write out previous fn_info.  */
+  if (num_fn_info)
+    {
+      set_fn_ctrs (curr_fn_info);
+      obstack_ptr_grow (&fn_info, curr_fn_info);
+    }
+
+  /* Here we over allocate a bit, using GCOV_COUNTERS instead of the actual active
+     counter types.  */
+  curr_fn_info = (struct gcov_fn_info *) xcalloc (sizeof (struct gcov_fn_info)
+                   + GCOV_COUNTERS * sizeof (struct gcov_ctr_info), 1);
+
+  for (i = 0; i < GCOV_COUNTERS; i++)
+     k_ctrs[i].num = 0;
+  k_ctrs_types = 0;
+
+  curr_fn_info->key = curr_gcov_info;
+  curr_fn_info->ident = gcov_read_unsigned ();
+  curr_fn_info->lineno_checksum = gcov_read_unsigned ();
+  curr_fn_info->cfg_checksum = gcov_read_unsigned ();
+  num_fn_info++;
+
+  if (verbose)
+    fprintf (stdout, "tag one function id=%d\n", curr_fn_info->ident);
+}
+
+/* Handler for reading block tag.  */
+
+static void
+tag_blocks (unsigned tag ATTRIBUTE_UNUSED, unsigned length ATTRIBUTE_UNUSED)
+{
+  gcc_assert (0);
+}
+
+/* Handler for reading flow arc tag.  */
+
+static void
+tag_arcs (unsigned tag ATTRIBUTE_UNUSED, unsigned length ATTRIBUTE_UNUSED)
+{
+  gcc_assert (0);
+}
+
+/* Handler for reading line tag.  */
+
+static void
+tag_lines (unsigned tag ATTRIBUTE_UNUSED, unsigned length ATTRIBUTE_UNUSED)
+{
+  gcc_assert (0);
+}
+
+/* Handler for reading counters array tag with value as TAG and length of LENGTH.  */
+
+static void
+tag_counters (unsigned tag, unsigned length)
+{
+  unsigned n_counts = GCOV_TAG_COUNTER_NUM (length);
+  gcov_type *values;
+  unsigned ix;
+  unsigned tag_ix;
+
+  tag_ix = GCOV_COUNTER_FOR_TAG (tag);
+  gcc_assert (tag_ix < GCOV_COUNTERS);
+  k_ctrs_mask [tag_ix] = 1;
+  gcc_assert (k_ctrs[tag_ix].num == 0);
+  k_ctrs[tag_ix].num = n_counts;
+
+  k_ctrs[tag_ix].values = values = (gcov_type *) xmalloc (n_counts * sizeof (gcov_type));
+  gcc_assert (values);
+
+  for (ix = 0; ix != n_counts; ix++)
+    values[ix] = gcov_read_counter ();
+}
+
+/* Handler for reading summary tag.  */
+
+static void
+tag_summary (unsigned tag ATTRIBUTE_UNUSED, unsigned length ATTRIBUTE_UNUSED)
+{
+  struct gcov_summary summary;
+
+  gcov_read_summary (&summary);
+}
+
+/* This function is called at the end of reading a gcda file.
+   It flushes the contents in curr_fn_info to gcov_info object OBJ_INFO.  */
+
+static void
+read_gcda_finalize (struct gcov_info *obj_info)
+{
+  int i;
+
+  set_fn_ctrs (curr_fn_info);
+  obstack_ptr_grow (&fn_info, curr_fn_info);
+
+  /* We set the following fields: merge, n_functions, and functions.  */
+  obj_info->n_functions = num_fn_info;
+  obj_info->functions = (const struct gcov_fn_info**) obstack_finish (&fn_info);
+
+  /* wrap all the counter array.  */
+  for (i=0; i< GCOV_COUNTERS; i++)
+    {
+      if (k_ctrs_mask[i])
+        obj_info->merge[i] = ctr_merge_functions[i];
+    }
+
+  obj_info->mod_info = curr_module_info;
+}
+
+extern void gcov_read_module_info (struct gcov_module_info *mod_info,
+    gcov_unsigned_t len);
+
+/* Substitute string is of this format:
+     old_sub1:new_sub1[,old_sub2:new_sub2]
+   Note that we only apply the substutution ONE time, for the first match.  */
+
+static const char *substitute_string;
+
+/* A global function to set the substitute string.  */
+
+void
+lipo_set_substitute_string (const char *str)
+{
+  char *sub_dup = xstrdup (str);
+  char *cur_sub = sub_dup;
+
+  /* First check if the str is in the right form.
+     Dup the string and split it into tokens with
+     ',' and ':' as the delimiters.  */
+  do
+    {
+      char *new_str;
+      char *next = strchr (cur_sub, ',');
+      if (next)
+        *next++ = '\0';
+      new_str = strchr (cur_sub, ':');
+      if (!new_str)
+        {
+          fprintf (stderr, "Warning: Skip invalid substibution string:%s\n",
+                   str);
+          free (sub_dup);
+          return;
+        }
+      *new_str++ = '\0';
+      cur_sub = next;
+    } while (cur_sub);
+
+  free (sub_dup);
+  substitute_string = str;
+}
+
+/* Replace the first occurance of CUT_STR to NEW_STR in INPUT_STR.  */
+
+static char *
+lipo_process_substitute_string_1 (char *input_str,
+                                  const char *cur_str,
+                                  const char *new_str)
+{
+  char *p;
+
+  if (!input_str || !cur_str || !new_str)
+    return input_str;
+
+  if ((p = strstr (input_str, cur_str)) != NULL)
+    {
+      char *t;
+
+      if (verbose)
+        printf ("Substitute: %s \n", input_str);
+      t = (char*) xmalloc (strlen (input_str) + 1
+          + strlen (new_str) - strlen (cur_str));
+      *p = 0;
+
+      strcpy (t, input_str);
+      strcat (t, new_str);
+      strcat (t, p + strlen (cur_str));
+      if (verbose)
+        printf ("       -->  %s\n", t);
+      return t;
+    }
+
+  return input_str;
+}
+
+/* Parse the substitute string and apply to the INPUT_STR.  */
+
+static char *
+lipo_process_substitute_string (char *input_str)
+{
+  char *sub_dup, *cur_sub, *ret;
+
+  if (substitute_string == NULL)
+    return input_str;
+
+  sub_dup = xstrdup (substitute_string);
+  cur_sub = sub_dup;
+  ret = input_str;
+
+  /* Dup the string and split it into tokens with
+     ',' and ':' as the delimiters.  */
+  do
+    {
+      char *new_str, *new_input;
+      char *next = strchr (cur_sub, ',');
+      if (next)
+        *next++ = '\0';
+      new_str = strchr (cur_sub, ':');
+      gcc_assert (new_str);
+      *new_str++ = '\0';
+      new_input = ret;
+      ret = lipo_process_substitute_string_1 (new_input, cur_sub, new_str);
+      if (ret != new_input)
+        free (new_input);
+      cur_sub = next;
+    } while (cur_sub);
+
+  free (sub_dup);
+  return ret;
+}
+
+/* This function reads module_info from a gcda file.  */
+
+static void
+tag_module_info (unsigned tag ATTRIBUTE_UNUSED, unsigned length)
+{
+  struct gcov_module_info* mod_info;
+
+  mod_info = (struct gcov_module_info *)
+      xmalloc ((length + 2) * sizeof (gcov_unsigned_t));
+
+  gcov_read_module_info (mod_info, length);
+
+  if (mod_info->is_primary)
+    {
+      mod_info->da_filename =
+          lipo_process_substitute_string (mod_info->da_filename);
+      curr_module_info = mod_info;
+    }
+  else
+    free (mod_info);
+}
+
+/* Read the content of a gcda file FILENAME, and return a gcov_info data structure.
+   Program level summary CURRENT_SUMMARY will also be updated.  */
+
+static struct gcov_info *
+read_gcda_file (const char *filename)
+{
+  unsigned tags[4];
+  unsigned depth = 0;
+  unsigned magic, version;
+  struct gcov_info *obj_info;
+  int i, len;
+  char *str_dup;
+
+  for (i=0; i< GCOV_COUNTERS; i++)
+    k_ctrs_mask[i] = 0;
+  k_ctrs_types = 0;
+
+  if (!gcov_open (filename))
+    {
+      fprintf (stderr, "%s:cannot open\n", filename);
+      return NULL;
+    }
+
+  /* Read magic.  */
+  magic = gcov_read_unsigned ();
+  if (magic != GCOV_DATA_MAGIC)
+    {
+      fprintf (stderr, "%s:not a gcov data file\n", filename);
+      gcov_close ();
+      return NULL;
+    }
+
+  /* Read version.  */
+  version = gcov_read_unsigned ();
+  if (version != GCOV_VERSION)
+    {
+      fprintf (stderr, "%s:incorrect gcov version %d vs %d \n", filename, version, GCOV_VERSION);
+      gcov_close ();
+      return NULL;
+    }
+
+  /* Instantiate a gcov_info object.  */
+  curr_gcov_info = obj_info = (struct gcov_info *) xcalloc (sizeof (struct gcov_info) +
+             sizeof (struct gcov_ctr_info) * GCOV_COUNTERS, 1);
+
+  obj_info->version = version;
+  obstack_init (&fn_info);
+  num_fn_info = 0;
+  curr_fn_info = 0;
+  curr_module_info = 0;
+
+  str_dup = lipo_process_substitute_string (xstrdup (filename));
+  obj_info->filename = str_dup;
+
+  if ((len = strlen (str_dup)) > max_filename_len)
+    max_filename_len = len;
+
+  /* Read stamp.  */
+  obj_info->stamp = gcov_read_unsigned ();
+
+  while (1)
+    {
+      gcov_position_t base;
+      unsigned tag, length;
+      tag_format_t const *format;
+      unsigned tag_depth;
+      int error;
+      unsigned mask;
+
+      tag = gcov_read_unsigned ();
+      if (!tag)
+	break;
+      length = gcov_read_unsigned ();
+      base = gcov_position ();
+      mask = GCOV_TAG_MASK (tag) >> 1;
+      for (tag_depth = 4; mask; mask >>= 8)
+	{
+	  if (((mask & 0xff) != 0xff))
+	    {
+	      fprintf (stderr, "warning: %s:tag `%08x' is invalid\n", filename, tag);
+	      break;
+	    }
+	  tag_depth--;
+	}
+      for (format = tag_table; format->name; format++)
+	if (format->tag == tag)
+	  goto found;
+      format = &tag_table[GCOV_TAG_IS_COUNTER (tag) ? 2 : 1];
+    found:;
+      if (tag)
+	{
+	  if (depth && depth < tag_depth)
+	    {
+	      if (!GCOV_TAG_IS_SUBTAG (tags[depth - 1], tag))
+		fprintf (stderr, "warning: %s:tag `%08x' is incorrectly nested\n",
+			filename, tag);
+	    }
+	  depth = tag_depth;
+	  tags[depth - 1] = tag;
+	}
+
+      if (format->proc)
+        {
+	  unsigned long actual_length;
+
+	  (*format->proc) (tag, length);
+
+	  actual_length = gcov_position () - base;
+	  if (actual_length > length)
+	    fprintf (stderr,"warning: %s:record size mismatch %lu bytes overread\n",
+		    filename, actual_length - length);
+	  else if (length > actual_length)
+	    fprintf (stderr,"warning: %s:record size mismatch %lu bytes unread\n",
+		    filename, length - actual_length);
+	}
+
+      gcov_sync (base, length);
+      if ((error = gcov_is_error ()))
+	{
+	  fprintf (stderr,error < 0 ? "warning:%s:counter overflow at %lu\n" :
+		  "Warning:%s:read error at %lu\n", filename,
+		  (long unsigned) gcov_position ());
+	  break;
+	}
+    }
+
+  read_gcda_finalize (obj_info);
+  gcov_close ();
+
+  return obj_info;
+}
+
+extern int is_module_available (const char *, unsigned *, int);
+
+/* If only use the modules in the modu_list.  */
+
+static int flag_use_modu_list;
+
+/* Set to use only the modules in the modu_list file.  */
+
+void
+set_use_modu_list (void)
+{
+  flag_use_modu_list = 1;
+}
+
+
+/* This will be called by ftw(). It opens and read a gcda file FILENAME.
+   Return a non-zero value to stop the tree walk.  */
+
+static int
+ftw_read_file (const char *filename,
+               const struct stat *status ATTRIBUTE_UNUSED,
+               int type)
+{
+  int filename_len;
+  int suffix_len;
+  struct gcov_info *obj_info;
+
+  /* Only read regular files.  */
+  if (type != FTW_F)
+    return 0;
+
+  filename_len = strlen (filename);
+  suffix_len = strlen (GCOV_DATA_SUFFIX);
+
+  if (filename_len <= suffix_len)
+    return 0;
+
+  if (strcmp(filename + filename_len - suffix_len, GCOV_DATA_SUFFIX))
+    return 0;
+
+   if (verbose)
+    fprintf (stderr, "reading file: %s\n", filename);
+
+  obj_info = read_gcda_file (filename);
+
+  if (obj_info->mod_info)
+    {
+      unsigned mod_id = obj_info->mod_info->ident;
+      int create = (flag_use_modu_list ? 0 : 1);
+
+      if (!is_module_available (obj_info->mod_info->source_filename,
+                                &mod_id, create))
+        {
+          if (verbose)
+            fprintf (stderr, "warning: module %s (%d) is not avail\n",
+                     obj_info->mod_info->source_filename, mod_id);
+          return 0;
+        }
+    }
+
+  obj_info->next = gcov_info_head;
+  gcov_info_head = obj_info;
+
+  return 0;
+}
+
+/* Source profile directory name.  */
+
+static const char *source_profile_dir;
+
+/* Return Source profile directory name.  */
+
+const char *
+get_source_profile_dir (void)
+{
+  return source_profile_dir;
+}
+
+/* Initializer for reading a profile dir.  */
+
+static inline void
+read_profile_dir_init (void)
+{
+  gcov_info_head = 0;
+}
+
+/* Driver for read a profile directory and convert into gcov_info list in memory.
+   Return NULL on error,
+   Return the head of gcov_info list on success.
+   Note the file static variable GCOV_MAX_FILENAME is also set.  */
+
+struct gcov_info *
+gcov_read_profile_dir (const char* dir_name, int recompute_summary ATTRIBUTE_UNUSED)
+{
+  char *pwd;
+  int ret;
+
+  read_profile_dir_init ();
+
+  if (access (dir_name, R_OK) != 0)
+    {
+      fprintf (stderr, "cannot access directory %s\n", dir_name);
+      return NULL;
+    }
+  pwd = getcwd (NULL, 0);
+  gcc_assert (pwd);
+  ret = chdir (dir_name);
+  if (ret !=0)
+    {
+      fprintf (stderr, "%s is not a directory\n", dir_name);
+      return NULL;
+    }
+  source_profile_dir = getcwd (NULL, 0);
+
+  ftw (".", ftw_read_file, 50);
+  ret = chdir (pwd);
+  free (pwd);
+
+
+  /* gcov_max_filename is defined in libgcov.c that records the
+     max filename len. We need to set it here to allocate the
+     array for dumping.  */
+  gcov_max_filename = max_filename_len;
+
+  return gcov_info_head;;
+}
+
+/* This part of the code is to merge profile counters.  */
+
+static gcov_type *gcov_value_buf;
+static gcov_unsigned_t gcov_value_buf_size;
+static gcov_unsigned_t gcov_value_buf_pos;
+static unsigned gcov_merge_weight;
+
+/* Read a counter value from gcov_value_buf array.  */
+
+gcov_type
+gcov_read_counter_mem (void)
+{
+  gcov_type ret;
+  gcc_assert (gcov_value_buf_pos < gcov_value_buf_size);
+  ret = *(gcov_value_buf + gcov_value_buf_pos);
+  ++gcov_value_buf_pos;
+  return ret;
+}
+
+/* Return the recorded merge weight.  */
+
+unsigned
+gcov_get_merge_weight (void)
+{
+  return gcov_merge_weight;
+}
+
+/* A wrapper function for merge functions. It sets up the
+   value buffer and weights and then calls the merge function.  */
+
+static void
+merge_wrapper (gcov_merge_fn f, gcov_type *v1, gcov_unsigned_t n,
+               gcov_type *v2, unsigned w)
+{
+  gcov_value_buf = v2;
+  gcov_value_buf_pos = 0;
+  gcov_value_buf_size = n;
+  gcov_merge_weight = w;
+  (*f) (v1, n);
+}
+
+/* Offline tool to manipulate profile data.
+   This tool targets on matched profiles. But it has some tolerance on
+   unmatched profiles.
+   When merging p1 to p2 (p2 is the dst),
+   * m.gcda in p1 but not in p2: append m.gcda to p2 with specified weight;
+     emit warning
+   * m.gcda in p2 but not in p1: keep m.gcda in p2 and multiply by
+     specified weight; emit warning.
+   * m.gcda in both p1 and p2:
+   ** p1->m.gcda->f checksum matches p2->m.gcda->f: simple merge.
+   ** p1->m.gcda->f checksum does not matches p2->m.gcda->f: keep
+      p2->m.gcda->f and
+      drop p1->m.gcda->f. A warning is emitted.  */
+
+/* Add INFO2's counter to INFO1, multiplying by weight W.  */
+
+static int
+gcov_merge (struct gcov_info *info1, struct gcov_info *info2, int w)
+{
+  unsigned f_ix;
+  unsigned n_functions = info1->n_functions;
+  int has_mismatch = 0;
+
+  gcc_assert (info2->n_functions == n_functions);
+  for (f_ix = 0; f_ix < n_functions; f_ix++)
+    {
+      unsigned t_ix;
+      const struct gcov_fn_info *gfi_ptr1 = info1->functions[f_ix];
+      const struct gcov_fn_info *gfi_ptr2 = info2->functions[f_ix];
+      const struct gcov_ctr_info *ci_ptr1, *ci_ptr2;
+
+      if (!gfi_ptr1 || gfi_ptr1->key != info1)
+        continue;
+      if (!gfi_ptr2 || gfi_ptr2->key != info2)
+        continue;
+
+      if (gfi_ptr1->cfg_checksum != gfi_ptr2->cfg_checksum)
+        {
+          fprintf (stderr, "in %s, cfg_checksum mismatch, skipping\n",
+                  info1->filename);
+          has_mismatch = 1;
+          continue;
+        }
+      ci_ptr1 = gfi_ptr1->ctrs;
+      ci_ptr2 = gfi_ptr2->ctrs;
+      for (t_ix = 0; t_ix != GCOV_COUNTERS; t_ix++)
+        {
+          gcov_merge_fn merge1 = info1->merge[t_ix];
+          gcov_merge_fn merge2 = info2->merge[t_ix];
+
+          gcc_assert (merge1 == merge2);
+          if (!merge1)
+            continue;
+          gcc_assert (ci_ptr1->num == ci_ptr2->num);
+          merge_wrapper (merge1, ci_ptr1->values, ci_ptr1->num, ci_ptr2->values, w);
+          ci_ptr1++;
+          ci_ptr2++;
+        }
+    }
+
+  return has_mismatch;
+}
+
+/* Find and return the match gcov_info object for INFO from ARRAY.
+   SIZE is the length of ARRAY.
+   Return NULL if there is no match.  */
+
+static struct gcov_info *
+find_match_gcov_info (struct gcov_info **array, int size, struct gcov_info *info)
+{
+  struct gcov_info *gi_ptr;
+  struct gcov_info *ret = NULL;
+  int i;
+
+  for (i = 0; i < size; i++)
+    {
+      gi_ptr = array[i];
+      if (gi_ptr == 0)
+        continue;
+      /* For LIPO, it's easy as we can just match the module_id.  */
+      if (gi_ptr->mod_info && info->mod_info)
+        {
+          if (gi_ptr->mod_info->ident == info->mod_info->ident)
+            {
+              ret = gi_ptr;
+              array[i] = 0;
+              break;
+            }
+        }
+      else /* For FDO, we have to match the name. This can be expensive.
+              Maybe we should use hash here.  */
+        if (!strcmp (gi_ptr->filename, info->filename))
+          {
+            ret = gi_ptr;
+            array[i] = 0;
+            break;
+          }
+    }
+
+  if (ret && ret->n_functions != info->n_functions)
+    {
+      fprintf (stderr, "mismatched profiles in %s (%d functions"
+                       " vs %d functions)\n",
+                       ret->filename,
+                       ret->n_functions,
+                       info->n_functions);
+      ret = NULL;
+    }
+  return ret;
+}
+
+/* Merge the list of gcov_info list from SRC_PROFILE to TGT_PROFILE.
+   Return 0 on success: without mismatch.
+   Reutrn 1 on error.  */
+
+int
+gcov_profile_merge (struct gcov_info *tgt_profile, struct gcov_info *src_profile,
+                    int w1, int w2)
+{
+  struct gcov_info *gi_ptr;
+  struct gcov_info **tgt_infos;
+  struct gcov_info *tgt_tail;
+  struct gcov_info **in_src_not_tgt;
+  unsigned tgt_cnt = 0, src_cnt = 0;
+  unsigned unmatch_info_cnt = 0;
+  unsigned int i;
+
+  for (gi_ptr = tgt_profile; gi_ptr; gi_ptr = gi_ptr->next)
+    tgt_cnt++;
+  for (gi_ptr = src_profile; gi_ptr; gi_ptr = gi_ptr->next)
+    src_cnt++;
+  tgt_infos = (struct gcov_info **) xmalloc (sizeof (struct gcov_info *)
+                 * tgt_cnt);
+  gcc_assert (tgt_infos);
+  in_src_not_tgt = (struct gcov_info **) xmalloc (sizeof (struct gcov_info *)
+                     * src_cnt);
+  gcc_assert (in_src_not_tgt);
+
+  for (gi_ptr = tgt_profile, i = 0; gi_ptr; gi_ptr = gi_ptr->next, i++)
+    tgt_infos[i] = gi_ptr;
+
+  tgt_tail = tgt_infos[tgt_cnt - 1];
+
+  /* First pass on tgt_profile, we multiply w1 to all counters.  */
+  if (w1 > 1)
+    {
+       for (i = 0; i < tgt_cnt; i++)
+         gcov_merge (tgt_infos[i], tgt_infos[i], w1-1);
+    }
+
+  /* Second pass, add src_profile to the tgt_profile.  */
+  for (gi_ptr = src_profile; gi_ptr; gi_ptr = gi_ptr->next)
+    {
+      struct gcov_info *gi_ptr1;
+
+      gi_ptr1 = find_match_gcov_info (tgt_infos, tgt_cnt, gi_ptr);
+      if (gi_ptr1 == NULL)
+        {
+          in_src_not_tgt[unmatch_info_cnt++] = gi_ptr;
+          continue;
+        }
+      gcov_merge (gi_ptr1, gi_ptr, w2);
+    }
+
+  /* For modules in src but not in tgt. We adjust the counter and append.  */
+  for (i = 0; i < unmatch_info_cnt; i++)
+    {
+      gi_ptr = in_src_not_tgt[i];
+      gcov_merge (gi_ptr, gi_ptr, w2 - 1);
+      tgt_tail->next = gi_ptr;
+      tgt_tail = gi_ptr;
+    }
+
+  return 0;
+}
+
+typedef gcov_type (*counter_op_fn) (gcov_type, void*, void*);
+
+/* Performing FN upon arc counters.  */
+
+static void
+__gcov_add_counter_op (gcov_type *counters, unsigned n_counters,
+                       counter_op_fn fn, void *data1, void *data2)
+{
+  for (; n_counters; counters++, n_counters--)
+    {
+      gcov_type val = *counters;
+      *counters = fn(val, data1, data2);
+    }
+}
+
+/* Performing FN upon ior counters.  */
+
+static void
+__gcov_ior_counter_op (gcov_type *counters ATTRIBUTE_UNUSED,
+                       unsigned n_counters ATTRIBUTE_UNUSED,
+                       counter_op_fn fn ATTRIBUTE_UNUSED,
+                       void *data1 ATTRIBUTE_UNUSED,
+                       void *data2 ATTRIBUTE_UNUSED)
+{
+  /* Do nothing.  */
+}
+
+/* Performaing FN upon delta counters.  */
+
+static void
+__gcov_delta_counter_op (gcov_type *counters, unsigned n_counters,
+                         counter_op_fn fn, void *data1, void *data2)
+{
+  unsigned i, n_measures;
+
+  gcc_assert (!(n_counters % 4));
+  n_measures = n_counters / 4;
+  for (i = 0; i < n_measures; i++, counters += 4)
+    {
+      counters[2] = fn (counters[2], data1, data2);
+      counters[3] = fn (counters[3], data1, data2);
+    }
+}
+
+/* Performing FN upon single counters.  */
+
+static void
+__gcov_single_counter_op (gcov_type *counters, unsigned n_counters,
+                          counter_op_fn fn, void *data1, void *data2)
+{
+  unsigned i, n_measures;
+
+  gcc_assert (!(n_counters % 3));
+  n_measures = n_counters / 3;
+  for (i = 0; i < n_measures; i++, counters += 3)
+    {
+      counters[1] = fn (counters[1], data1, data2);
+      counters[2] = fn (counters[2], data1, data2);
+    }
+}
+
+/* Performing FN upon indirect-call profile counters.  */
+
+static void
+__gcov_icall_topn_op (gcov_type *counters, unsigned n_counters,
+                      counter_op_fn fn, void *data1, void *data2)
+{
+  unsigned i;
+
+  gcc_assert (!(n_counters % GCOV_ICALL_TOPN_NCOUNTS));
+  for (i = 0; i < n_counters; i += GCOV_ICALL_TOPN_NCOUNTS)
+    {
+      unsigned j;
+      gcov_type *value_array = &counters[i + 1];
+
+      for (j = 0; j < GCOV_ICALL_TOPN_NCOUNTS - 1; j += 2)
+        value_array[j + 1] = fn (value_array[j + 1], data1, data2);
+    }
+}
+
+/* Performing FN upon direct-call profile counters.  */
+
+static void
+__gcov_dc_op (gcov_type *counters, unsigned n_counters,
+              counter_op_fn fn, void *data1, void *data2)
+{
+  unsigned i;
+
+  gcc_assert (!(n_counters % 2));
+  for (i = 0; i < n_counters; i += 2)
+    counters[i + 1] = fn (counters[i + 1], data1, data2);
+}
+
+
+/* Scaling the counter value V by multiplying *(float*) DATA1.  */
+
+static gcov_type
+fp_scale (gcov_type v, void *data1, void *data2 ATTRIBUTE_UNUSED)
+{
+  float f = *(float *) data1;
+  return (gcov_type) (v * f);
+}
+
+/* Scaling the counter value V by multiplying DATA2/DATA1.  */
+
+static gcov_type
+int_scale (gcov_type v, void *data1, void *data2)
+{
+  int n = *(int *) data1;
+  int d = *(int *) data2;
+  return (gcov_type) ((v / d) * n);
+}
+
+/* Type of function used to process counters.  */
+typedef void (*gcov_counter_fn) (gcov_type *, gcov_unsigned_t,
+                          counter_op_fn, void *, void *); 
+
+/* Function array to process profile counters.  */
+static gcov_counter_fn ctr_functions[GCOV_COUNTERS] = { 
+    __gcov_add_counter_op,
+    __gcov_add_counter_op,
+    __gcov_add_counter_op,
+    __gcov_single_counter_op,
+    __gcov_delta_counter_op,
+    __gcov_single_counter_op,
+    __gcov_add_counter_op,
+    __gcov_ior_counter_op,
+    __gcov_icall_topn_op,
+    __gcov_dc_op,
+};
+
+/* Driver for scaling profile counters.  */
+
+int
+gcov_profile_scale (struct gcov_info *profile, float scale_factor, int n, int d)
+{
+  struct gcov_info *gi_ptr;
+  unsigned f_ix;
+
+  if (verbose)
+    fprintf (stdout, "scale_factor is %f\n", scale_factor);
+
+  /* Scaling the counters.  */
+  for (gi_ptr = profile; gi_ptr; gi_ptr = gi_ptr->next)
+    for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++)
+      {
+        unsigned t_ix;
+        const struct gcov_fn_info *gfi_ptr = gi_ptr->functions[f_ix];
+        const struct gcov_ctr_info *ci_ptr;
+
+        if (!gfi_ptr || gfi_ptr->key != gi_ptr)
+          continue;
+
+        ci_ptr = gfi_ptr->ctrs;
+        for (t_ix = 0; t_ix != GCOV_COUNTERS; t_ix++)
+          {
+            gcov_merge_fn merge = gi_ptr->merge[t_ix];
+
+            if (!merge)
+              continue;
+            if (d == 0)
+              (*ctr_functions[t_ix]) (ci_ptr->values, ci_ptr->num,
+                                      fp_scale, &scale_factor, NULL);
+            else
+              (*ctr_functions[t_ix]) (ci_ptr->values, ci_ptr->num,
+                                      int_scale, &n, &d);
+            ci_ptr++;
+          }
+      }
+
+  return 0;
+}
+
+/* Driver to normalize profile counters.  */
+
+int
+gcov_profile_normalize (struct gcov_info *profile, gcov_type max_val)
+{
+  struct gcov_info *gi_ptr;
+  gcov_type curr_max_val = 0;
+  unsigned f_ix;
+  unsigned int i;
+  float scale_factor;
+
+  /* Find the largest count value.  */
+  for (gi_ptr = profile; gi_ptr; gi_ptr = gi_ptr->next)
+    for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++)
+      {
+        unsigned t_ix;
+        const struct gcov_fn_info *gfi_ptr = gi_ptr->functions[f_ix];
+        const struct gcov_ctr_info *ci_ptr;
+
+        if (!gfi_ptr || gfi_ptr->key != gi_ptr)
+          continue;
+
+        ci_ptr = gfi_ptr->ctrs;
+        for (t_ix = 0; t_ix < 1; t_ix++)
+          {
+            for (i = 0; i < ci_ptr->num; i++)
+              if (ci_ptr->values[i] > curr_max_val)
+                curr_max_val = ci_ptr->values[i];
+            ci_ptr++;
+          }
+      }
+
+  scale_factor = (float)max_val / curr_max_val;
+  if (verbose)
+    fprintf (stdout, "max_val is %lld\n", (long long) curr_max_val);
+
+  return gcov_profile_scale (profile, scale_factor, 0, 0);
+}
diff --git a/libgcc/libgcov.c b/libgcc/libgcov.c
deleted file mode 100644
index 43601f9..0000000
--- a/libgcc/libgcov.c
+++ /dev/null
@@ -1,1989 +0,0 @@
-/* Routines required for instrumenting a program.  */
-/* Compile this one with gcc.  */
-/* Copyright (C) 1989-2013 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.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "tconfig.h"
-#include "tsystem.h"
-#include "coretypes.h"
-#include "tm.h"
-#include "libgcc_tm.h"
-#include "gthr.h"
-
-#if 1
-#define THREAD_PREFIX __thread
-#else
-#define THREAD_PREFIX
-#endif
-
-#if defined(inhibit_libc)
-#define IN_LIBGCOV (-1)
-#else
-#define IN_LIBGCOV 1
-#if defined(L_gcov)
-#define GCOV_LINKAGE /* nothing */
-#endif
-#endif
-
-#include "gcov-io.h"
-
-#if defined(inhibit_libc)
-/* If libc and its header files are not available, provide dummy functions.  */
-
-#ifdef L_gcov
-void __gcov_init (struct gcov_info *p __attribute__ ((unused))) {}
-void __gcov_flush (void) {}
-#endif
-
-#ifdef L_gcov_reset
-void __gcov_reset (void) {}
-#endif
-
-#ifdef L_gcov_dump
-void __gcov_dump (void) {}
-#endif
-
-#ifdef L_gcov_merge_add
-void __gcov_merge_add (gcov_type *counters  __attribute__ ((unused)),
-		       unsigned n_counters __attribute__ ((unused))) {}
-#endif
-
-#ifdef L_gcov_merge_single
-void __gcov_merge_single (gcov_type *counters  __attribute__ ((unused)),
-			  unsigned n_counters __attribute__ ((unused))) {}
-#endif
-
-#ifdef L_gcov_merge_delta
-void __gcov_merge_delta (gcov_type *counters  __attribute__ ((unused)),
-			 unsigned n_counters __attribute__ ((unused))) {}
-#endif
-
-#else
-
-#include <string.h>
-#if GCOV_LOCKED
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/stat.h>
-#endif
-
-extern void gcov_clear (void) ATTRIBUTE_HIDDEN;
-extern void gcov_exit (void) ATTRIBUTE_HIDDEN;
-extern int gcov_dump_complete ATTRIBUTE_HIDDEN;
-
-#ifdef L_gcov
-#include "gcov-io.c"
-
-/* Create a strong reference to these symbols so that they are
-   unconditionally pulled into the instrumented binary, even when
-   the only reference is a weak reference. This is necessary because
-   we are using weak references to handle older compilers that
-   pre-date these new functions. A subtlety of the linker is that
-   it will only resolve weak references defined within archive libraries
-   when there is a string reference to something else defined within
-   the same object file. Since these two functions are defined within
-   their own object files (using L_gcov_reset and L_gcov_dump), they
-   would not get resolved. Since there are symbols within the main L_gcov
-   section that are strongly referenced during -fprofile-generate builds,
-   these symbols will always need to be resolved.  */
-void (*__gcov_dummy_ref1)() = &__gcov_reset;
-void (*__gcov_dummy_ref2)() = &__gcov_dump;
-
-
-/* Default callback function for profile instrumentation callback.  */
-__attribute__((weak)) void
-__coverage_callback (gcov_type funcdef_no __attribute__ ((unused)),
-                     int edge_no __attribute__ ((unused)))
-{
-   /* nothing */
-}
-
-
-/* Utility function for outputing errors.  */
-static int
-gcov_error (const char *fmt, ...)
-{
-  int ret;
-  va_list argp;
-  va_start (argp, fmt);
-  ret = vfprintf (stderr, fmt, argp);
-  va_end (argp);
-  return ret;
-}
-
-/* Emitted in coverage.c.  */
-
-/* Sampling period.  */
-extern gcov_unsigned_t __gcov_sampling_period;
-extern gcov_unsigned_t __gcov_has_sampling;
-static int gcov_sampling_period_initialized = 0;
-void __gcov_set_sampling_period (unsigned int period);
-unsigned int __gcov_sampling_enabled ();
-
-/* Set sampling period to PERIOD.  */
-
-void __gcov_set_sampling_period (unsigned int period)
-{
-  gcc_assert (__gcov_has_sampling);
-  __gcov_sampling_period = period;
-}
-
-unsigned int __gcov_sampling_enabled ()
-{
-  return __gcov_has_sampling;
-}
-
-/* Profile directory prefix specified to -fprofile-generate=.  */
-extern char * __gcov_profile_prefix;
-
-char *__gcov_get_profile_prefix ()
-{
-  return __gcov_profile_prefix;
-}
-
-/* Per thread sample counter.  */
-THREAD_PREFIX gcov_unsigned_t __gcov_sample_counter = 0;
-
-struct gcov_summary_buffer
-{
-  struct gcov_summary_buffer *next;
-  struct gcov_summary summary;
-};
-
-static struct gcov_summary_buffer *next_sum_buffer, *sum_buffer;
-static struct gcov_summary_buffer **sum_tail;
-
-/* Chain of per-object gcov structures.  */
-extern struct gcov_info *__gcov_list;
-
-/* A program checksum allows us to distinguish program data for an
-   object file included in multiple programs.  */
-static gcov_unsigned_t gcov_crc32;
-
-/* Size of the longest file name. */
-static size_t gcov_max_filename = 0;
-
-/* Unique identifier assigned to each module (object file).  */
-static gcov_unsigned_t gcov_cur_module_id = 0;
-
-/* Pointer to the direct-call counters (per call-site counters).
-   Initialized by the caller.  */
-THREAD_PREFIX gcov_type *__gcov_direct_call_counters ATTRIBUTE_HIDDEN;
-
-/* Direct call callee address.  */
-THREAD_PREFIX void *__gcov_direct_call_callee ATTRIBUTE_HIDDEN;
-
-/* Pointer to the indirect-call counters (per call-site counters).
-   Initialized by the caller.  */
-THREAD_PREFIX gcov_type *__gcov_indirect_call_topn_counters ATTRIBUTE_HIDDEN;
-
-/* Indirect call callee address.  */
-THREAD_PREFIX void *__gcov_indirect_call_topn_callee ATTRIBUTE_HIDDEN;
-
-/* Dynamic call graph build and form module groups.  */
-void __gcov_compute_module_groups (void) ATTRIBUTE_HIDDEN;
-void __gcov_finalize_dyn_callgraph (void) ATTRIBUTE_HIDDEN;
-
-/* Profile summary for the gdca file, used in sanity check?  */
-static struct gcov_summary all;
-
-/* Profile summary for this program in current exeuction.  */
-static struct gcov_summary this_program;
-
-/* Merged profile summary for this program.  */
-static struct gcov_summary program;
-
-/* Record the position of summary info.  */
-static gcov_position_t summary_pos = 0;
-
-/* Record the postion of eof.  */
-static gcov_position_t eof_pos = 0;
-
-/* Number of chars in prefix to be stripped.  */
-static int gcov_prefix_strip = 0;
-
-/* The length of path prefix.  */
-static size_t prefix_length = 0;
-
-/* gi_filename is current object filename.
-   gi_filename_up points to the stripped filename.  */
-static char *gi_filename, *gi_filename_up;
-
-static int gcov_open_by_filename (char * gi_filename);
-static int gcov_exit_init (void);
-static void gcov_dump_one_gcov (struct gcov_info *gi_ptr);
-
-/* Flag when the profile has already been dumped via __gcov_dump().  */
-int gcov_dump_complete = 0;
-
-/* Make sure path component of the given FILENAME exists, create
-   missing directories. FILENAME must be writable.
-   Returns zero on success, or -1 if an error occurred.  */
-
-static int
-create_file_directory (char *filename)
-{
-#if !defined(TARGET_POSIX_IO) && !defined(_WIN32)
-  (void) filename;
-  return -1;
-#else
-  char *s;
-
-  s = filename;
-
-  if (HAS_DRIVE_SPEC(s))
-    s += 2;
-  if (IS_DIR_SEPARATOR(*s))
-    ++s;
-  for (; *s != '\0'; s++)
-    if (IS_DIR_SEPARATOR(*s))
-      {
-        char sep = *s;
-	*s  = '\0';
-
-        /* Try to make directory if it doesn't already exist.  */
-        if (access (filename, F_OK) == -1
-#ifdef TARGET_POSIX_IO
-            && mkdir (filename, 0755) == -1
-#else
-            && mkdir (filename) == -1
-#endif
-            /* The directory might have been made by another process.  */
-	    && errno != EEXIST)
-	  {
-            fprintf (stderr, "profiling:%s:Cannot create directory\n",
-		     filename);
-            *s = sep;
-	    return -1;
-	  };
-
-	*s = sep;
-      };
-  return 0;
-#endif
-}
-
-/* Open a file with the specified name.  */
-
-static int
-gcov_open_by_filename (char * gi_filename)
-{
-  if (!gcov_open (gi_filename))
-    {
-      /* Open failed likely due to missed directory.
-         Create directory and retry to open file.  */
-      if (create_file_directory (gi_filename))
-        {
-          gcov_error ("profiling:%s:Skip\n", gi_filename);
-          return -1;
-        }
-      if (!gcov_open (gi_filename))
-        {
-          gcov_error ("profiling:%s:Cannot open\n", gi_filename);
-          return -1;
-        }
-    }
-  return 0;
-}
-
-
-/* Determine whether a counter is active.  */
-
-static inline int
-gcov_counter_active (const struct gcov_info *info, unsigned int type)
-{
-  return (info->merge[type] != 0);
-}
-
-
-/* Add an unsigned value to the current crc */
-
-static gcov_unsigned_t
-crc32_unsigned (gcov_unsigned_t crc32, gcov_unsigned_t value)
-{
-  unsigned ix;
-
-  for (ix = 32; ix--; value <<= 1)
-    {
-      unsigned feedback;
-
-      feedback = (value ^ crc32) & 0x80000000 ? 0x04c11db7 : 0;
-      crc32 <<= 1;
-      crc32 ^= feedback;
-    }
-
-  return crc32;
-}
-
-/* Check if VERSION of the info block PTR matches libgcov one.
-   Return 1 on success, or zero in case of versions mismatch.
-   If FILENAME is not NULL, its value used for reporting purposes
-   instead of value from the info block.  */
-
-static int
-gcov_version (struct gcov_info *ptr __attribute__ ((unused)), 
-              gcov_unsigned_t version, const char *filename)
-{
-  if (version != GCOV_VERSION)
-    {
-      char v[4], e[4];
-
-      GCOV_UNSIGNED2STRING (v, version);
-      GCOV_UNSIGNED2STRING (e, GCOV_VERSION);
-
-      if (filename)
-        gcov_error ("profiling:%s:Version mismatch - expected %.4s got %.4s\n",
-                   filename, e, v);
-      else
-        gcov_error ("profiling:Version mismatch - expected %.4s got %.4s\n", e, v);
-      return 0;
-    }
-  return 1;
-}
-
-#define GCOV_GET_FILENAME gcov_strip_leading_dirs
-
-/* Insert counter VALUE into HISTOGRAM.  */
-
-static void
-gcov_histogram_insert(gcov_bucket_type *histogram, gcov_type value)
-{
-  unsigned i;
-
-  i = gcov_histo_index(value);
-  histogram[i].num_counters++;
-  histogram[i].cum_value += value;
-  if (value < histogram[i].min_value)
-    histogram[i].min_value = value;
-}
-
-/* Computes a histogram of the arc counters to place in the summary SUM.  */
-
-static void
-gcov_compute_histogram (struct gcov_summary *sum)
-{
-  struct gcov_info *gi_ptr;
-  const struct gcov_fn_info *gfi_ptr;
-  const struct gcov_ctr_info *ci_ptr;
-  struct gcov_ctr_summary *cs_ptr;
-  unsigned t_ix, f_ix, ctr_info_ix, ix;
-  int h_ix;
-
-  /* This currently only applies to arc counters.  */
-  t_ix = GCOV_COUNTER_ARCS;
-
-  /* First check if there are any counts recorded for this counter.  */
-  cs_ptr = &(sum->ctrs[t_ix]);
-  if (!cs_ptr->num)
-    return;
-
-  for (h_ix = 0; h_ix < GCOV_HISTOGRAM_SIZE; h_ix++)
-    {
-      cs_ptr->histogram[h_ix].num_counters = 0;
-      cs_ptr->histogram[h_ix].min_value = cs_ptr->run_max;
-      cs_ptr->histogram[h_ix].cum_value = 0;
-    }
-
-  /* Walk through all the per-object structures and record each of
-     the count values in histogram.  */
-  for (gi_ptr = __gcov_list; gi_ptr; gi_ptr = gi_ptr->next)
-    {
-      if (!gi_ptr->merge[t_ix])
-        continue;
-
-      /* Find the appropriate index into the gcov_ctr_info array
-         for the counter we are currently working on based on the
-         existence of the merge function pointer for this object.  */
-      for (ix = 0, ctr_info_ix = 0; ix < t_ix; ix++)
-        {
-          if (gi_ptr->merge[ix])
-            ctr_info_ix++;
-        }
-      for (f_ix = 0; f_ix != gi_ptr->n_functions; f_ix++)
-        {
-          gfi_ptr = gi_ptr->functions[f_ix];
-
-          if (!gfi_ptr || gfi_ptr->key != gi_ptr)
-            continue;
-
-          ci_ptr = &gfi_ptr->ctrs[ctr_info_ix];
-          for (ix = 0; ix < ci_ptr->num; ix++)
-            gcov_histogram_insert (cs_ptr->histogram, ci_ptr->values[ix]);
-        }
-    }
-}
-
-/* Dump the coverage counts. We merge with existing counts when
-   possible, to avoid growing the .da files ad infinitum. We use this
-   program's checksum to make sure we only accumulate whole program
-   statistics to the correct summary. An object file might be embedded
-   in two separate programs, and we must keep the two program
-   summaries separate.  */
-
-/* Strip GCOV_PREFIX_STRIP levels of leading '/' from FILENAME and
-   put the result into GI_FILENAME_UP.  */
-
-static void
-gcov_strip_leading_dirs (int prefix_length, int gcov_prefix_strip,
-			 const char *filename, char *gi_filename_up)
-{
-  /* Avoid to add multiple drive letters into combined path.  */
-  if (prefix_length != 0 && HAS_DRIVE_SPEC(filename))
-    filename += 2;
-
-  /* Build relocated filename, stripping off leading
-     directories from the initial filename if requested. */
-  if (gcov_prefix_strip > 0)
-    {
-      int level = 0;
-      const char *s = filename;
-      if (IS_DIR_SEPARATOR(*s))
-	++s;
-
-      /* Skip selected directory levels. */
-      for (; (*s != '\0') && (level < gcov_prefix_strip); s++)
-        if (IS_DIR_SEPARATOR(*s))
-          {
-            filename = s;
-            level++;
-          }
-    }
-
-  /* Update complete filename with stripped original. */
-  if (prefix_length != 0 && !IS_DIR_SEPARATOR (*filename))
-    {
-      /* If prefix is given, add directory separator.  */
-      strcpy (gi_filename_up, "/");
-      strcpy (gi_filename_up + 1, filename);
-    }
-  else
-    strcpy (gi_filename_up, filename);
-}
-
-/* This function allocates the space to store current file name.  */
-
-static void
-gcov_alloc_filename (void)
-{
-  /* Get file name relocation prefix.  Non-absolute values are ignored.  */
-  const char *gcov_prefix = 0;
-
-  prefix_length = 0;
-  gcov_prefix_strip = 0;
-
-  {
-    /* Check if the level of dirs to strip off specified. */
-    char *tmp = getenv ("GCOV_PREFIX_STRIP");
-    if (tmp)
-      {
-        gcov_prefix_strip = atoi (tmp);
-        /* Do not consider negative values. */
-        if (gcov_prefix_strip < 0)
-          gcov_prefix_strip = 0;
-      }
-  }
-
-  /* Get file name relocation prefix.  Non-absolute values are ignored. */
-  gcov_prefix = getenv ("GCOV_PREFIX");
-  if (gcov_prefix)
-    {
-      prefix_length = strlen(gcov_prefix);
-
-      /* Remove an unnecessary trailing '/' */
-      if (IS_DIR_SEPARATOR (gcov_prefix[prefix_length - 1]))
-        prefix_length--;
-    }
-  else
-    prefix_length = 0;
-
-  /* If no prefix was specified and a prefix stip, then we assume
-     relative.  */
-  if (gcov_prefix_strip != 0 && prefix_length == 0)
-    {
-      gcov_prefix = ".";
-      prefix_length = 1;
-    }
-
-  /* Allocate and initialize the filename scratch space.  */
-  gi_filename = (char *) malloc (prefix_length + gcov_max_filename + 2);
-  if (prefix_length)
-    memcpy (gi_filename, gcov_prefix, prefix_length);
-
-  gi_filename_up = gi_filename + prefix_length;
-}
-
-/* Sort N entries in VALUE_ARRAY in descending order.
-   Each entry in VALUE_ARRAY has two values. The sorting
-   is based on the second value.  */
-
-GCOV_LINKAGE  void
-gcov_sort_n_vals (gcov_type *value_array, int n)
-{
-  int j, k;
-  for (j = 2; j < n; j += 2)
-    {
-      gcov_type cur_ent[2];
-      cur_ent[0] = value_array[j];
-      cur_ent[1] = value_array[j + 1];
-      k = j - 2;
-      while (k >= 0 && value_array[k + 1] < cur_ent[1])
-        {
-          value_array[k + 2] = value_array[k];
-          value_array[k + 3] = value_array[k+1];
-          k -= 2;
-        }
-      value_array[k + 2] = cur_ent[0];
-      value_array[k + 3] = cur_ent[1];
-    }
-}
-
-/* Sort the profile counters for all indirect call sites. Counters
-   for each call site are allocated in array COUNTERS.  */
-
-static void
-gcov_sort_icall_topn_counter (const struct gcov_ctr_info *counters)
-{
-  int i;
-  gcov_type *values;
-  int n = counters->num;
-  gcc_assert (!(n % GCOV_ICALL_TOPN_NCOUNTS));
-
-  values = counters->values;
-
-  for (i = 0; i < n; i += GCOV_ICALL_TOPN_NCOUNTS)
-    {
-      gcov_type *value_array = &values[i + 1];
-      gcov_sort_n_vals (value_array, GCOV_ICALL_TOPN_NCOUNTS - 1);
-    }
-}
-
-/* Write imported files (auxiliary modules) for primary module GI_PTR
-   into file GI_FILENAME.  */
-
-static void
-gcov_write_import_file (char *gi_filename, struct gcov_info *gi_ptr)
-{
-  char  *gi_imports_filename;
-  const char *gcov_suffix;
-  FILE *imports_file;
-  size_t prefix_length, suffix_length;
-
-  gcov_suffix = getenv ("GCOV_IMPORTS_SUFFIX");
-  if (!gcov_suffix || !strlen (gcov_suffix))
-    gcov_suffix = ".imports";
-  suffix_length = strlen (gcov_suffix);
-  prefix_length = strlen (gi_filename);
-  gi_imports_filename = (char *) alloca (prefix_length + suffix_length + 1);
-  memset (gi_imports_filename, 0, prefix_length + suffix_length + 1);
-  memcpy (gi_imports_filename, gi_filename, prefix_length);
-  memcpy (gi_imports_filename + prefix_length, gcov_suffix, suffix_length);
-  imports_file = fopen (gi_imports_filename, "w");
-  if (imports_file)
-    {
-      const struct dyn_imp_mod **imp_mods;
-      unsigned i, imp_len;
-      imp_mods = gcov_get_sorted_import_module_array (gi_ptr, &imp_len);
-      if (imp_mods)
-        {
-          for (i = 0; i < imp_len; i++)
-	    {
-	      fprintf (imports_file, "%s\n",
-		       imp_mods[i]->imp_mod->mod_info->source_filename);
-	      fprintf (imports_file, "%s%s\n",
-		       imp_mods[i]->imp_mod->mod_info->da_filename, GCOV_DATA_SUFFIX);
-	    }
-          free (imp_mods);
-        }
-      fclose (imports_file);
-    }
-}
-
-static void
-gcov_dump_module_info (void)
-{
-  struct gcov_info *gi_ptr;
-
-  __gcov_compute_module_groups ();
-
-  /* Now write out module group info.  */
-  for (gi_ptr = __gcov_list; gi_ptr; gi_ptr = gi_ptr->next)
-  {
-    int error;
-
-    GCOV_GET_FILENAME (prefix_length, gcov_prefix_strip, gi_ptr->filename,
-                       gi_filename_up);
-    error = gcov_open_by_filename (gi_filename);
-    if (error != 0)
-      continue;
-
-    /* Overwrite the zero word at the of the file.  */
-    gcov_rewrite ();
-    gcov_seek (gi_ptr->eof_pos);
-
-    gcov_write_module_infos (gi_ptr);
-    /* Write the end marker  */
-    gcov_write_unsigned (0);
-    gcov_truncate ();
-
-    if ((error = gcov_close ()))
-         gcov_error (error  < 0 ?  "profiling:%s:Overflow writing\n" :
-                                   "profiling:%s:Error writing\n",
-                                   gi_filename);
-    gcov_write_import_file (gi_filename, gi_ptr);
-  }
-  __gcov_finalize_dyn_callgraph ();
-}
-
-/* Dump the coverage counts. We merge with existing counts when
-   possible, to avoid growing the .da files ad infinitum. We use this
-   program's checksum to make sure we only accumulate whole program
-   statistics to the correct summary. An object file might be embedded
-   in two separate programs, and we must keep the two program
-   summaries separate.  */
-
-void
-gcov_exit (void)
-{
-  struct gcov_info *gi_ptr;
-  int dump_module_info;
-
-  /* Prevent the counters from being dumped a second time on exit when the
-     application already wrote out the profile using __gcov_dump().  */
-  if (gcov_dump_complete)
-    return;
-
-  dump_module_info = gcov_exit_init ();
-
-  for (gi_ptr = __gcov_list; gi_ptr; gi_ptr = gi_ptr->next)
-    gcov_dump_one_gcov (gi_ptr);
-
-  if (dump_module_info)
-    gcov_dump_module_info ();
-
-  free (gi_filename);
-}
-
-/* Reset all counters to zero.  */
-
-void
-gcov_clear (void)
-{
-  const struct gcov_info *gi_ptr;
-
-  for (gi_ptr = __gcov_list; gi_ptr; gi_ptr = gi_ptr->next)
-    {
-      unsigned f_ix;
-
-      for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++)
-	{
-	  unsigned t_ix;
-	  const struct gcov_fn_info *gfi_ptr = gi_ptr->functions[f_ix];
-
-	  if (!gfi_ptr || gfi_ptr->key != gi_ptr)
-	    continue;
-	  const struct gcov_ctr_info *ci_ptr = gfi_ptr->ctrs;
-	  for (t_ix = 0; t_ix != GCOV_COUNTERS; t_ix++)
-	    {
-	      if (!gi_ptr->merge[t_ix])
-		continue;
-	      
-	      memset (ci_ptr->values, 0, sizeof (gcov_type) * ci_ptr->num);
-	      ci_ptr++;
-	    }
-	}
-    }
-}
-
-/* Add a new object file onto the bb chain.  Invoked automatically
-   when running an object file's global ctors.  */
-
-void
-__gcov_init (struct gcov_info *info)
-{
-  if (!gcov_sampling_period_initialized)
-    {
-      const char* env_value_str = getenv ("GCOV_SAMPLING_PERIOD");
-      if (env_value_str)
-        {
-          int env_value_int = atoi(env_value_str);
-          if (env_value_int >= 1)
-            __gcov_sampling_period = env_value_int;
-        }
-      gcov_sampling_period_initialized = 1;
-    }
-
-  if (!info->version || !info->n_functions)
-    return;
-
-  if (gcov_version (info, info->version, 0))
-    {
-      const char *ptr = info->filename;
-      size_t filename_length = strlen (info->filename);
-
-      /* Refresh the longest file name information.  */
-      if (filename_length > gcov_max_filename)
-        gcov_max_filename = filename_length;
-
-      /* Assign the module ID (starting at 1).  */
-      info->mod_info->ident = (++gcov_cur_module_id);
-      gcc_assert (EXTRACT_MODULE_ID_FROM_GLOBAL_ID (GEN_FUNC_GLOBAL_ID (
-                                                       info->mod_info->ident, 0))
-                  == info->mod_info->ident);
-
-      if (!__gcov_list)
-        {
-          atexit (gcov_exit);
-        }
-
-      info->next = __gcov_list;
-      __gcov_list = info;
-    }
-  info->version = 0;
-}
-
-#ifdef __GTHREAD_MUTEX_INIT
-ATTRIBUTE_HIDDEN __gthread_mutex_t __gcov_flush_mx = __GTHREAD_MUTEX_INIT;
-#define init_mx_once()
-#else
-__gthread_mutex_t __gcov_flush_mx ATTRIBUTE_HIDDEN;
-
-static void
-init_mx (void)
-{
-  __GTHREAD_MUTEX_INIT_FUNCTION (&__gcov_flush_mx);
-}
-static void
-init_mx_once (void)
-{
-  static __gthread_once_t once = __GTHREAD_ONCE_INIT;
-  __gthread_once (&once, init_mx);
-}
-#endif
-
-/* Called before fork or exec - write out profile information gathered so
-   far and reset it to zero.  This avoids duplication or loss of the
-   profile information gathered so far.  */
-
-void
-__gcov_flush (void)
-{
-  init_mx_once ();
-  __gthread_mutex_lock (&__gcov_flush_mx);
-
-  gcov_exit ();
-  gcov_clear ();
-
-  __gthread_mutex_unlock (&__gcov_flush_mx);
-}
-
-static void
-gcov_sort_topn_counter_arrays (const struct gcov_info *gi_ptr)
-{
-  unsigned int i;
-  int f_ix;
-  const struct gcov_fn_info *gfi_ptr;
-  const struct gcov_ctr_info *ci_ptr;
-
-  for (f_ix = 0; (unsigned)f_ix != gi_ptr->n_functions; f_ix++)
-    {
-      gfi_ptr = gi_ptr->functions[f_ix];
-      ci_ptr = gfi_ptr->ctrs;
-      for (i = 0; i < GCOV_COUNTERS; i++)
-        {
-          if (!gcov_counter_active (gi_ptr, i))
-            continue;
-          if (i == GCOV_COUNTER_ICALL_TOPNV)
-            {
-              gcov_sort_icall_topn_counter (ci_ptr);
-              break;
-            }
-          ci_ptr++;
-        }
-     }
-}
-
-/* Compute object summary recored in gcov_info INFO. The result is
-   stored in OBJ_SUM. Note that the caller is responsible for
-   zeroing out OBJ_SUM, otherwise the summary is accumulated.  */
-
-static void
-gcov_object_summary (struct gcov_info *info, struct gcov_summary *obj_sum)
-{
-  const struct gcov_fn_info *gfi_ptr;
-  const struct gcov_ctr_info *ci_ptr;
-  struct gcov_ctr_summary *cs_ptr;
-  gcov_unsigned_t c_num;
-  unsigned t_ix;
-  int f_ix;
-  gcov_unsigned_t crc32 = gcov_crc32;
-
-  /* Totals for this object file.  */
-  crc32 = crc32_unsigned (crc32, info->stamp);
-  crc32 = crc32_unsigned (crc32, info->n_functions);
-
-  for (f_ix = 0; (unsigned) f_ix != info->n_functions; f_ix++)
-    {
-      gfi_ptr = info->functions[f_ix];
-
-      if (!gfi_ptr || gfi_ptr->key != info)
-        gfi_ptr = 0;
-
-      crc32 = crc32_unsigned (crc32, gfi_ptr ? gfi_ptr->cfg_checksum : 0);
-      crc32 = crc32_unsigned (crc32,
-                              gfi_ptr ? gfi_ptr->lineno_checksum : 0);
-
-      if (!gfi_ptr)
-        continue;
-
-      ci_ptr = gfi_ptr->ctrs;
-      for (t_ix = 0; t_ix < GCOV_COUNTERS_SUMMABLE; t_ix++)
-        {
-          if (!info->merge[t_ix])
-            continue;
-
-          cs_ptr = &(obj_sum->ctrs[t_ix]);
-          cs_ptr->num += ci_ptr->num;
-          crc32 = crc32_unsigned (crc32, ci_ptr->num);
-
-          for (c_num = 0; c_num < ci_ptr->num; c_num++)
-            {
-              cs_ptr->sum_all += ci_ptr->values[c_num];
-              if (cs_ptr->run_max < ci_ptr->values[c_num])
-                cs_ptr->run_max = ci_ptr->values[c_num];
-            }
-          ci_ptr++;
-        }
-    }
-  gcov_crc32 = crc32;
-}
-
-/* Merge with existing gcda file in the same directory to avoid
-   excessive growthe of the files.  */
-
-static int
-gcov_merge_gcda_file (struct gcov_info *gi_ptr)
-{
-  struct gcov_ctr_summary *cs_prg, *cs_tprg, *cs_all;
-  unsigned t_ix, f_ix = 0;
-
-  const struct gcov_fn_info *gfi_ptr;
-  int error = 0;
-  gcov_unsigned_t tag, length, version, stamp;
-
-  eof_pos = 0;
-  summary_pos = 0;
-  sum_buffer = 0;
-  sum_tail = &sum_buffer;
-
-  tag = gcov_read_unsigned ();
-  if (tag)
-    {
-      /* Merge data from file.  */
-      if (tag != GCOV_DATA_MAGIC)
-        {
-          gcov_error ("profiling:%s:Not a gcov data file\n", gi_filename);
-          goto read_fatal;
-        }
-     version = gcov_read_unsigned ();
-     if (!gcov_version (gi_ptr, version, gi_filename))
-       goto read_fatal;
-
-     stamp = gcov_read_unsigned ();
-     if (stamp != gi_ptr->stamp)
-       /* Read from a different compilation. Overwrite the file.  */
-       goto rewrite;
-
-      /* Look for program summary.  */
-     for (f_ix = ~0u;;)
-       {
-         struct gcov_summary tmp;
-
-         eof_pos = gcov_position ();
-         tag = gcov_read_unsigned ();
-         if (tag != GCOV_TAG_PROGRAM_SUMMARY)
-           break;
-
-         length = gcov_read_unsigned ();
-         gcov_read_summary (&tmp);
-         if ((error = gcov_is_error ()))
-           goto read_error;
-         if (summary_pos)
-             {
-               /* Save all summaries after the one that will be
-                  merged into below. These will need to be rewritten
-                  as histogram merging may change the number of non-zero
-                  histogram entries that will be emitted, and thus the
-                  size of the merged summary.  */
-               (*sum_tail) = (struct gcov_summary_buffer *)
-                   malloc (sizeof(struct gcov_summary_buffer));
-               (*sum_tail)->summary = tmp;
-               (*sum_tail)->next = 0;
-               sum_tail = &((*sum_tail)->next);
-               goto next_summary;
-             }
-           if (tmp.checksum != gcov_crc32)
-             goto next_summary;
-
-           for (t_ix = 0; t_ix != GCOV_COUNTERS_SUMMABLE; t_ix++)
-             if (tmp.ctrs[t_ix].num != this_program.ctrs[t_ix].num)
-               goto next_summary;
-           program = tmp;
-           summary_pos = eof_pos;
-
-         next_summary:;
-         }
-
-     /* Merge execution counts for each function.  */
-     for (f_ix = 0; f_ix != gi_ptr->n_functions;
-          f_ix++, tag = gcov_read_unsigned ())
-       {
-         const struct gcov_ctr_info *ci_ptr;
-
-         gfi_ptr = gi_ptr->functions[f_ix];
-
-         if (tag != GCOV_TAG_FUNCTION)
-           goto read_mismatch;
-         length = gcov_read_unsigned ();
-
-         if (!length)
-           /* This function did not appear in the other program.
-              We have nothing to merge.  */
-           continue;
-
-         /* Check function.  */
-         if (length != GCOV_TAG_FUNCTION_LENGTH)
-           goto read_mismatch;
-
-         gcc_assert (gfi_ptr && gfi_ptr->key == gi_ptr);
-
-         if (gcov_read_unsigned () != gfi_ptr->ident
-             || gcov_read_unsigned () != gfi_ptr->lineno_checksum
-             || gcov_read_unsigned () != gfi_ptr->cfg_checksum)
-            goto read_mismatch;
-
-         ci_ptr = gfi_ptr->ctrs;
-         for (t_ix = 0; t_ix < GCOV_COUNTERS; t_ix++)
-           {
-             gcov_merge_fn merge = gi_ptr->merge[t_ix];
-
-             if (!merge)
-               continue;
-
-             tag = gcov_read_unsigned ();
-             length = gcov_read_unsigned ();
-             if (tag != GCOV_TAG_FOR_COUNTER (t_ix)
-                 || length != GCOV_TAG_COUNTER_LENGTH (ci_ptr->num))
-               goto read_mismatch;
-             (*merge) (ci_ptr->values, ci_ptr->num);
-             ci_ptr++;
-           }
-           if ((error = gcov_is_error ()))
-             goto read_error;
-       }
-     if (tag && tag != GCOV_TAG_MODULE_INFO)
-       goto read_mismatch;
-    }
-  goto rewrite;
-
-read_error:;
-    gcov_error (error < 0 ? "profiling:%s:Overflow merging\n"
-                : "profiling:%s:Error merging\n", gi_filename);
-    goto read_fatal;
-
-    goto rewrite;
-
-read_mismatch:;
-    gcov_error ("profiling:%s:Merge mismatch for %s\n",
-                 gi_filename, f_ix + 1 ? "function" : "summaries");
-    goto read_fatal;
-
-read_fatal:;
-    gcov_close ();
-    return 1;
-
-rewrite:;
-    gcov_rewrite ();
-    if (!summary_pos)
-      {
-        memset (&program, 0, sizeof (program));
-        summary_pos = eof_pos;
-      }
-
-    /* Merge the summaries.  */
-    for (t_ix = 0; t_ix < GCOV_COUNTERS_SUMMABLE; t_ix++)
-      {
-        cs_prg = &program.ctrs[t_ix];
-        cs_tprg = &this_program.ctrs[t_ix];
-        cs_all = &all.ctrs[t_ix];
-
-        if (gi_ptr->merge[t_ix])
-          {
-            if (!cs_prg->runs++)
-              cs_prg->num = cs_tprg->num;
-            cs_prg->sum_all += cs_tprg->sum_all;
-            if (cs_prg->run_max < cs_tprg->run_max)
-              cs_prg->run_max = cs_tprg->run_max;
-            cs_prg->sum_max += cs_tprg->run_max;
-            if (cs_prg->runs == 1)
-              memcpy (cs_prg->histogram, cs_tprg->histogram,
-                      sizeof (gcov_bucket_type) * GCOV_HISTOGRAM_SIZE);
-            else
-              gcov_histogram_merge (cs_prg->histogram, cs_tprg->histogram);
-          }
-        else if (cs_prg->runs)
-          goto read_mismatch;
-
-        if (!cs_all->runs && cs_prg->runs)
-          memcpy (cs_all, cs_prg, sizeof (*cs_all));
-        else if (!all.checksum
-                 && (!GCOV_LOCKED || cs_all->runs == cs_prg->runs)
-                 /* Don't compare the histograms, which may have slight
-                     variations depending on the order they were updated
-                     due to the truncating integer divides used in the
-                     merge.  */
-                  && memcmp (cs_all, cs_prg,
-                             sizeof (*cs_all) - (sizeof (gcov_bucket_type)
-                                                 * GCOV_HISTOGRAM_SIZE)))
-          {
-            gcov_error ("profiling:%s:Invocation mismatch - "
-                "some data files may have been removed%s\n",
-            gi_filename, GCOV_LOCKED
-            ? "" : " or concurrent update without locking support");
-            all.checksum = ~0u;
-          }
-      }
-
-  program.checksum = gcov_crc32;
-
-  return 0;
-}
-
-/* This function returns the size of gcda file to be written. Note
-   the size is in units of gcov_type.  */
-
-GCOV_LINKAGE unsigned
-gcov_gcda_file_size (struct gcov_info *gi_ptr)
-{
-  unsigned size;
-  const struct gcov_fn_info *fi_ptr;
-  unsigned f_ix, t_ix, h_ix, h_cnt = 0;
-  unsigned n_counts;
-  const struct gcov_ctr_info *ci_ptr;
-  struct gcov_summary *sum = &this_program;
-  const struct gcov_ctr_summary *csum;
-
-  /* GCOV_DATA_MAGIC, GCOV_VERSION and time_stamp.  */
-  size = 3;
-
-  /* Program summary, which depends on the number of non-zero
-      histogram entries.  */
-   csum = &sum->ctrs[GCOV_COUNTER_ARCS];
-   for (h_ix = 0; h_ix < GCOV_HISTOGRAM_SIZE; h_ix++)
-     {
-       if (csum->histogram[h_ix].num_counters > 0)
-         h_cnt++;
-     }
-   size += 2 + GCOV_TAG_SUMMARY_LENGTH(h_cnt);
-
-  /* size for each function.  */
-  for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++)
-    {
-      fi_ptr = gi_ptr->functions[f_ix];
-
-      size += 2 /* tag_length itself */
-              + GCOV_TAG_FUNCTION_LENGTH; /* ident, lineno_cksum, cfg_cksm */
-
-      ci_ptr = fi_ptr->ctrs;
-      for (t_ix = 0; t_ix < GCOV_COUNTERS; t_ix++)
-        {
-          if (!gcov_counter_active (gi_ptr, t_ix))
-            continue;
-
-          n_counts = ci_ptr->num;
-          size += 2 + GCOV_TAG_COUNTER_LENGTH (n_counts);
-          ci_ptr++;
-        }
-    }
-
-  size += 1;
-
-  return size*4;
-}
-
-/* Write profile data (including summary and module grouping information,
-   if available, to file.  */
-
-static void
-gcov_write_gcda_file (struct gcov_info *gi_ptr)
-{
-  const struct gcov_fn_info *gfi_ptr;
-  const struct gcov_ctr_info *ci_ptr;
-  unsigned t_ix, f_ix, n_counts, length;
-  int error = 0;
-  gcov_position_t eof_pos1 = 0;
-
-  /* Write out the data.  */
-  gcov_seek (0);
-  gcov_write_tag_length (GCOV_DATA_MAGIC, GCOV_VERSION);
-  gcov_write_unsigned (gi_ptr->stamp);
-
-  if (summary_pos)
-     gcov_seek (summary_pos);
-  gcc_assert (!summary_pos || summary_pos == gcov_position ());
-
-  /* Generate whole program statistics.  */
-  gcov_write_summary (GCOV_TAG_PROGRAM_SUMMARY, &program);
-
-  /* Rewrite all the summaries that were after the summary we merged
-     into. This is necessary as the merged summary may have a different
-     size due to the number of non-zero histogram entries changing after
-     merging.  */
-
-  while (sum_buffer)
-    {
-      gcov_write_summary (GCOV_TAG_PROGRAM_SUMMARY, &sum_buffer->summary);
-      next_sum_buffer = sum_buffer->next;
-      free (sum_buffer);
-      sum_buffer = next_sum_buffer;
-    }
-
-  /* Write execution counts for each function.  */
-  for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++)
-    {
-      gfi_ptr = gi_ptr->functions[f_ix];
-      gcc_assert (gfi_ptr && gfi_ptr->key == gi_ptr);
-      length = GCOV_TAG_FUNCTION_LENGTH;
-
-      gcov_write_tag_length (GCOV_TAG_FUNCTION, length);
-
-      gcov_write_unsigned (gfi_ptr->ident);
-      gcov_write_unsigned (gfi_ptr->lineno_checksum);
-      gcov_write_unsigned (gfi_ptr->cfg_checksum);
-
-      ci_ptr = gfi_ptr->ctrs;
-      for (t_ix = 0; t_ix < GCOV_COUNTERS; t_ix++)
-        {
-          if (!gi_ptr->merge[t_ix])
-            continue;
-
-          n_counts = ci_ptr->num;
-          gcov_write_tag_length (GCOV_TAG_FOR_COUNTER (t_ix),
-                                 GCOV_TAG_COUNTER_LENGTH (n_counts));
-          gcov_type *c_ptr = ci_ptr->values;
-          while (n_counts--)
-            gcov_write_counter (*c_ptr++);
-          ci_ptr++;
-        }
-      eof_pos1 = gcov_position ();
-    }
-
-    eof_pos = eof_pos1;
-    /* Write the end marker  */
-    gcov_write_unsigned (0);
-
-    gi_ptr->eof_pos = eof_pos;
-
-    if ((error = gcov_close ()))
-      gcov_error (error  < 0 ?
-                  "profiling:%s:Overflow writing\n" :
-                  "profiling:%s:Error writing\n",
-                   gi_filename);
-}
-
-/* Do some preparation work before calling the actual dumping
-   routine.
-   Return: 1 when module grouping info needs to be dumped,
-           0 otherwise.  */
-
-static int
-gcov_exit_init (void)
-{
-  struct gcov_info *gi_ptr;
-  int dump_module_info = 0;
-
-  dump_module_info = 0;
-  gcov_prefix_strip = 0;
-
-  memset (&all, 0, sizeof (all));
-
-  /* Find the totals for this execution.  */
-  memset (&this_program, 0, sizeof (this_program));
-  for (gi_ptr = __gcov_list; gi_ptr; gi_ptr = gi_ptr->next)
-    {
-      gcov_object_summary (gi_ptr, &this_program);
-
-      /* The IS_PRIMARY field is overloaded to indicate if this module
-         is FDO/LIPO.  */
-      dump_module_info |= gi_ptr->mod_info->is_primary;
-    }
-
-  gcov_compute_histogram (&this_program);
-
-  gcov_alloc_filename ();
-
-  return dump_module_info;
-}
-
-/* Dump one entry in the gcov_info list (for one object).  */
-
-static void
-gcov_dump_one_gcov (struct gcov_info *gi_ptr)
-{
-  int ret;
-
-  gcov_sort_topn_counter_arrays (gi_ptr);
-
-  GCOV_GET_FILENAME (prefix_length, gcov_prefix_strip, gi_ptr->filename,
-                     gi_filename_up);
-
-  if (gcov_open_by_filename (gi_filename) == -1)
-    return;
-
-  /* Now merge this file.  */
-  ret = gcov_merge_gcda_file (gi_ptr);
-  if (ret != 0 ) return;
-
-  gcov_write_gcda_file (gi_ptr);
-}
-
-#endif /* L_gcov */
-
-#ifdef L_gcov_reset
-
-/* Function that can be called from application to reset counters to zero,
-   in order to collect profile in region of interest.  */
-
-void
-__gcov_reset (void)
-{
-  gcov_clear ();
-  /* Re-enable dumping to support collecting profile in multiple regions
-     of interest.  */
-  gcov_dump_complete = 0;
-}
-
-#endif /* L_gcov_reset */
-
-#ifdef L_gcov_dump
-
-/* Function that can be called from application to write profile collected
-   so far, in order to collect profile in region of interest.  */
-
-void
-__gcov_dump (void)
-{
-  gcov_exit ();
-  /* Prevent profile from being dumped a second time on application exit.  */
-  gcov_dump_complete = 1;
-}
-
-#endif /* L_gcov_dump */
-
-#ifdef L_gcov_merge_add
-/* The profile merging function that just adds the counters.  It is given
-   an array COUNTERS of N_COUNTERS old counters and it reads the same number
-   of counters from the gcov file.  */
-void
-__gcov_merge_add (gcov_type *counters, unsigned n_counters)
-{
-  for (; n_counters; counters++, n_counters--)
-    *counters += gcov_read_counter ();
-}
-#endif /* L_gcov_merge_add */
-
-#ifdef L_gcov_merge_ior
-/* The profile merging function that just adds the counters.  It is given
-   an array COUNTERS of N_COUNTERS old counters and it reads the same number
-   of counters from the gcov file.  */
-void
-__gcov_merge_ior (gcov_type *counters, unsigned n_counters)
-{
-  for (; n_counters; counters++, n_counters--)
-    *counters |= gcov_read_counter ();
-}
-#endif
-
-#ifdef L_gcov_merge_dc
-
-/* Returns 1 if the function global id GID is not valid.  */
-
-static int
-__gcov_is_gid_insane (gcov_type gid)
-{
-  if (EXTRACT_MODULE_ID_FROM_GLOBAL_ID (gid) == 0
-      || EXTRACT_FUNC_ID_FROM_GLOBAL_ID (gid) == 0)
-    return 1;
-  return 0;
-}
-
-/* The profile merging function used for merging direct call counts
-   This function is given array COUNTERS of N_COUNTERS old counters and it
-   reads the same number of counters from the gcov file.  */
-
-void
-__gcov_merge_dc (gcov_type *counters, unsigned n_counters)
-{
-  unsigned i;
-
-  gcc_assert (!(n_counters % 2));
-  for (i = 0; i < n_counters; i += 2)
-    {
-      gcov_type global_id = gcov_read_counter ();
-      gcov_type call_count = gcov_read_counter ();
-
-      /* Note that global id counter may never have been set if no calls were
-	 made from this call-site.  */
-      if (counters[i] && global_id)
-        {
-          /* TODO race condition requires us do the following correction.  */
-          if (__gcov_is_gid_insane (counters[i]))
-            counters[i] = global_id;
-          else if (__gcov_is_gid_insane (global_id))
-            global_id = counters[i];
-
-          gcc_assert (counters[i] == global_id);
-        }
-      else if (global_id)
-	counters[i] = global_id;
-
-      counters[i + 1] += call_count;
-
-      /* Reset. */
-      if (__gcov_is_gid_insane (counters[i]))
-        counters[i] = counters[i + 1] = 0;
-
-      /* Assert that the invariant (global_id == 0) <==> (call_count == 0)
-	 holds true after merging.  */
-      if (counters[i] == 0)
-        counters[i+1] = 0;
-      if (counters[i + 1] == 0)
-        counters[i] = 0;
-    }
-}
-#endif
-
-#ifdef L_gcov_merge_icall_topn
-/* The profile merging function used for merging indirect call counts
-   This function is given array COUNTERS of N_COUNTERS old counters and it
-   reads the same number of counters from the gcov file.  */
-
-void
-__gcov_merge_icall_topn (gcov_type *counters, unsigned n_counters)
-{
-  unsigned i, j, k, m;
-
-  gcc_assert (!(n_counters % GCOV_ICALL_TOPN_NCOUNTS));
-  for (i = 0; i < n_counters; i += GCOV_ICALL_TOPN_NCOUNTS)
-    {
-      gcov_type *value_array = &counters[i + 1];
-      unsigned tmp_size = 2 * (GCOV_ICALL_TOPN_NCOUNTS - 1);
-      gcov_type *tmp_array 
-          = (gcov_type *) alloca (tmp_size * sizeof (gcov_type));
-
-      for (j = 0; j < tmp_size; j++)
-        tmp_array[j] = 0;
-
-      for (j = 0; j < GCOV_ICALL_TOPN_NCOUNTS - 1; j += 2)
-        {
-          tmp_array[j] = value_array[j];
-          tmp_array[j + 1] = value_array [j + 1];
-        }
-
-      /* Skip the number_of_eviction entry.  */
-      gcov_read_counter ();
-      for (k = 0; k < GCOV_ICALL_TOPN_NCOUNTS - 1; k += 2)
-        {
-          int found = 0;
-          gcov_type global_id = gcov_read_counter ();
-          gcov_type call_count = gcov_read_counter ();
-          for (m = 0; m < j; m += 2)
-            {
-              if (tmp_array[m] == global_id)
-                {
-                  found = 1;
-                  tmp_array[m + 1] += call_count;
-                  break;
-                }
-            }
-          if (!found)
-            {
-              tmp_array[j] = global_id;
-              tmp_array[j + 1] = call_count;
-              j += 2;
-            }
-        }
-      /* Now sort the temp array */
-      gcov_sort_n_vals (tmp_array, j);
-
-      /* Now copy back the top half of the temp array */
-      for (k = 0; k < GCOV_ICALL_TOPN_NCOUNTS - 1; k += 2)
-        {
-          value_array[k] = tmp_array[k];
-          value_array[k + 1] = tmp_array[k + 1];
-        }
-    }
-}
-#endif
-
-
-#ifdef L_gcov_merge_single
-/* The profile merging function for choosing the most common value.
-   It is given an array COUNTERS of N_COUNTERS old counters and it
-   reads the same number of counters from the gcov file.  The counters
-   are split into 3-tuples where the members of the tuple have
-   meanings:
-
-   -- the stored candidate on the most common value of the measured entity
-   -- counter
-   -- total number of evaluations of the value  */
-void
-__gcov_merge_single (gcov_type *counters, unsigned n_counters)
-{
-  unsigned i, n_measures;
-  gcov_type value, counter, all;
-
-  gcc_assert (!(n_counters % 3));
-  n_measures = n_counters / 3;
-  for (i = 0; i < n_measures; i++, counters += 3)
-    {
-      value = gcov_read_counter ();
-      counter = gcov_read_counter ();
-      all = gcov_read_counter ();
-
-      if (counters[0] == value)
-	counters[1] += counter;
-      else if (counter > counters[1])
-	{
-	  counters[0] = value;
-	  counters[1] = counter - counters[1];
-	}
-      else
-	counters[1] -= counter;
-      counters[2] += all;
-    }
-}
-#endif /* L_gcov_merge_single */
-
-#ifdef L_gcov_merge_delta
-/* The profile merging function for choosing the most common
-   difference between two consecutive evaluations of the value.  It is
-   given an array COUNTERS of N_COUNTERS old counters and it reads the
-   same number of counters from the gcov file.  The counters are split
-   into 4-tuples where the members of the tuple have meanings:
-
-   -- the last value of the measured entity
-   -- the stored candidate on the most common difference
-   -- counter
-   -- total number of evaluations of the value  */
-void
-__gcov_merge_delta (gcov_type *counters, unsigned n_counters)
-{
-  unsigned i, n_measures;
-  gcov_type value, counter, all;
-
-  gcc_assert (!(n_counters % 4));
-  n_measures = n_counters / 4;
-  for (i = 0; i < n_measures; i++, counters += 4)
-    {
-      /* last = */ gcov_read_counter ();
-      value = gcov_read_counter ();
-      counter = gcov_read_counter ();
-      all = gcov_read_counter ();
-
-      if (counters[1] == value)
-	counters[2] += counter;
-      else if (counter > counters[2])
-	{
-	  counters[1] = value;
-	  counters[2] = counter - counters[2];
-	}
-      else
-	counters[2] -= counter;
-      counters[3] += all;
-    }
-}
-#endif /* L_gcov_merge_delta */
-
-#ifdef L_gcov_interval_profiler
-/* If VALUE is in interval <START, START + STEPS - 1>, then increases the
-   corresponding counter in COUNTERS.  If the VALUE is above or below
-   the interval, COUNTERS[STEPS] or COUNTERS[STEPS + 1] is increased
-   instead.  */
-
-void
-__gcov_interval_profiler (gcov_type *counters, gcov_type value,
-			  int start, unsigned steps)
-{
-  gcov_type delta = value - start;
-  if (delta < 0)
-    counters[steps + 1]++;
-  else if (delta >= steps)
-    counters[steps]++;
-  else
-    counters[delta]++;
-}
-#endif
-
-#ifdef L_gcov_pow2_profiler
-/* If VALUE is a power of two, COUNTERS[1] is incremented.  Otherwise
-   COUNTERS[0] is incremented.  */
-
-void
-__gcov_pow2_profiler (gcov_type *counters, gcov_type value)
-{
-  if (value & (value - 1))
-    counters[0]++;
-  else
-    counters[1]++;
-}
-#endif
-
-/* Tries to determine the most common value among its inputs.  Checks if the
-   value stored in COUNTERS[0] matches VALUE.  If this is the case, COUNTERS[1]
-   is incremented.  If this is not the case and COUNTERS[1] is not zero,
-   COUNTERS[1] is decremented.  Otherwise COUNTERS[1] is set to one and
-   VALUE is stored to COUNTERS[0].  This algorithm guarantees that if this
-   function is called more than 50% of the time with one value, this value
-   will be in COUNTERS[0] in the end.
-
-   In any case, COUNTERS[2] is incremented.  */
-
-static inline void
-__gcov_one_value_profiler_body (gcov_type *counters, gcov_type value)
-{
-  if (value == counters[0])
-    counters[1]++;
-  else if (counters[1] == 0)
-    {
-      counters[1] = 1;
-      counters[0] = value;
-    }
-  else
-    counters[1]--;
-  counters[2]++;
-}
-
-/* Atomic update version of __gcov_one_value_profile_body().  */
-static inline void
-__gcov_one_value_profiler_body_atomic (gcov_type *counters, gcov_type value)
-{
-  if (value == counters[0])
-    GCOV_TYPE_ATOMIC_FETCH_ADD_FN (&counters[1], 1, MEMMODEL_RELAXED);
-  else if (counters[1] == 0)
-    {
-      counters[1] = 1;
-      counters[0] = value;
-    }
-  else
-    GCOV_TYPE_ATOMIC_FETCH_ADD_FN (&counters[1], -1, MEMMODEL_RELAXED);
-  GCOV_TYPE_ATOMIC_FETCH_ADD_FN (&counters[2], 1, MEMMODEL_RELAXED);
-}
-
-#ifdef L_gcov_indirect_call_topn_profiler
-/* Tries to keep track the most frequent N values in the counters where
-   N is specified by parameter TOPN_VAL. To track top N values, 2*N counter
-   entries are used.
-   counter[0] --- the accumative count of the number of times one entry in
-                  in the counters gets evicted/replaced due to limited capacity.
-                  When this value reaches a threshold, the bottom N values are
-                  cleared.
-   counter[1] through counter[2*N] records the top 2*N values collected so far.
-   Each value is represented by two entries: count[2*i+1] is the ith value, and
-   count[2*i+2] is the number of times the value is seen.  */
-
-static void
-__gcov_topn_value_profiler_body (gcov_type *counters, gcov_type value,
-                                 gcov_unsigned_t topn_val)
-{
-   unsigned i, found = 0, have_zero_count = 0;
-
-   gcov_type *entry;
-   gcov_type *lfu_entry = &counters[1];
-   gcov_type *value_array = &counters[1];
-   gcov_type *num_eviction = &counters[0];
-
-   /* There are 2*topn_val values tracked, each value takes two slots in the
-      counter array */
-   for ( i = 0; i < (topn_val << 2); i += 2)
-     {
-       entry = &value_array[i];
-       if ( entry[0] == value)
-         {
-           entry[1]++ ;
-           found = 1;
-           break;
-         }
-       else if (entry[1] == 0)
-         {
-           lfu_entry = entry;
-           have_zero_count = 1;
-         }
-      else if (entry[1] < lfu_entry[1])
-        lfu_entry = entry;
-     }
-
-   if (found)
-     return;
-
-   /* lfu_entry is either an empty entry or an entry
-      with lowest count, which will be evicted.  */
-   lfu_entry[0] = value;
-   lfu_entry[1] = 1;
-
-#define GCOV_ICALL_COUNTER_CLEAR_THRESHOLD 3000
-
-   /* Too many evictions -- time to clear bottom entries to 
-      avoid hot values bumping each other out.  */
-   if ( !have_zero_count 
-        && ++*num_eviction >= GCOV_ICALL_COUNTER_CLEAR_THRESHOLD)
-     {
-       unsigned i, j;
-       gcov_type *p, minv;
-       gcov_type* tmp_cnts 
-           = (gcov_type *)alloca (topn_val * sizeof(gcov_type));
-
-       *num_eviction = 0;
-
-       for ( i = 0; i < topn_val; i++ )
-         tmp_cnts[i] = 0;
-
-       /* Find the largest topn_val values from the group of
-          2*topn_val values and put them into tmp_cnts. */
-
-       for ( i = 0; i < 2 * topn_val; i += 2 ) 
-         {
-           p = 0;
-           for ( j = 0; j < topn_val; j++ ) 
-             {
-               if ( !p || tmp_cnts[j] < *p ) 
-                  p = &tmp_cnts[j];
-             }
-            if ( value_array[i + 1] > *p )
-              *p = value_array[i + 1];
-         }
-
-       minv = tmp_cnts[0];
-       for ( j = 1; j < topn_val; j++ )
-         {
-           if (tmp_cnts[j] < minv)
-             minv = tmp_cnts[j];
-         }
-       /* Zero out low value entries  */
-       for ( i = 0; i < 2 * topn_val; i += 2 )
-         {
-           if (value_array[i + 1] < minv) 
-             {
-               value_array[i] = 0;
-               value_array[i + 1] = 0;
-             }
-         }
-     }
-}
-#endif
-
-#ifdef L_gcov_one_value_profiler
-void
-__gcov_one_value_profiler (gcov_type *counters, gcov_type value)
-{
-  __gcov_one_value_profiler_body (counters, value);
-}
-
-void
-__gcov_one_value_profiler_atomic (gcov_type *counters, gcov_type value)
-{
-  __gcov_one_value_profiler_body_atomic (counters, value);
-}
-
-#endif
-
-#ifdef L_gcov_indirect_call_profiler
-
-/* By default, the C++ compiler will use function addresses in the
-   vtable entries.  Setting TARGET_VTABLE_USES_DESCRIPTORS to nonzero
-   tells the compiler to use function descriptors instead.  The value
-   of this macro says how many words wide the descriptor is (normally 2),
-   but it may be dependent on target flags.  Since we do not have access
-   to the target flags here we just check to see if it is set and use
-   that to set VTABLE_USES_DESCRIPTORS to 0 or 1.
-
-   It is assumed that the address of a function descriptor may be treated
-   as a pointer to a function.  */
-
-#ifdef TARGET_VTABLE_USES_DESCRIPTORS
-#define VTABLE_USES_DESCRIPTORS 1
-#else
-#define VTABLE_USES_DESCRIPTORS 0
-#endif
-
-/* Tries to determine the most common value among its inputs. */
-void
-__gcov_indirect_call_profiler (gcov_type* counter, gcov_type value,
-			       void* cur_func, void* callee_func)
-{
-  /* If the C++ virtual tables contain function descriptors then one
-     function may have multiple descriptors and we need to dereference
-     the descriptors to see if they point to the same function.  */
-  if (cur_func == callee_func
-      || (VTABLE_USES_DESCRIPTORS && callee_func
-	  && *(void **) cur_func == *(void **) callee_func))
-    __gcov_one_value_profiler_body (counter, value);
-}
-
-/* Atomic update version of __gcov_indirect_call_profiler().  */
-void
-__gcov_indirect_call_profiler_atomic (gcov_type* counter, gcov_type value,
-                                      void* cur_func, void* callee_func)
-{
-  if (cur_func == callee_func
-      || (VTABLE_USES_DESCRIPTORS && callee_func
-          && *(void **) cur_func == *(void **) callee_func))
-    __gcov_one_value_profiler_body_atomic (counter, value);
-}
-#endif
-
-
-#ifdef L_gcov_indirect_call_topn_profiler
-extern THREAD_PREFIX gcov_type *__gcov_indirect_call_topn_counters ATTRIBUTE_HIDDEN;
-extern THREAD_PREFIX void *__gcov_indirect_call_topn_callee ATTRIBUTE_HIDDEN;
-#ifdef TARGET_VTABLE_USES_DESCRIPTORS
-#define VTABLE_USES_DESCRIPTORS 1
-#else
-#define VTABLE_USES_DESCRIPTORS 0
-#endif
-void
-__gcov_indirect_call_topn_profiler (void *cur_func,
-                                    void *cur_module_gcov_info,
-                                    gcov_unsigned_t cur_func_id)
-{
-  void *callee_func = __gcov_indirect_call_topn_callee;
-  gcov_type *counter = __gcov_indirect_call_topn_counters;
-  /* If the C++ virtual tables contain function descriptors then one
-     function may have multiple descriptors and we need to dereference
-     the descriptors to see if they point to the same function.  */
-  if (cur_func == callee_func
-      || (VTABLE_USES_DESCRIPTORS && callee_func
-	  && *(void **) cur_func == *(void **) callee_func))
-    {
-      gcov_type global_id 
-          = ((struct gcov_info *) cur_module_gcov_info)->mod_info->ident;
-      global_id = GEN_FUNC_GLOBAL_ID (global_id, cur_func_id);
-      __gcov_topn_value_profiler_body (counter, global_id, GCOV_ICALL_TOPN_VAL);
-      __gcov_indirect_call_topn_callee = 0;
-    }
-}
-
-#endif
-
-#ifdef L_gcov_direct_call_profiler
-extern THREAD_PREFIX gcov_type *__gcov_direct_call_counters ATTRIBUTE_HIDDEN;
-extern THREAD_PREFIX void *__gcov_direct_call_callee ATTRIBUTE_HIDDEN;
-/* Direct call profiler. */
-void
-__gcov_direct_call_profiler (void *cur_func,
-			     void *cur_module_gcov_info,
-			     gcov_unsigned_t cur_func_id)
-{
-  if (cur_func == __gcov_direct_call_callee)
-    {
-      gcov_type global_id 
-          = ((struct gcov_info *) cur_module_gcov_info)->mod_info->ident;
-      global_id = GEN_FUNC_GLOBAL_ID (global_id, cur_func_id);
-      __gcov_direct_call_counters[0] = global_id;
-      __gcov_direct_call_counters[1]++;
-      __gcov_direct_call_callee = 0;
-    }
-}
-#endif
-
-
-#ifdef L_gcov_average_profiler
-/* Increase corresponding COUNTER by VALUE.  FIXME: Perhaps we want
-   to saturate up.  */
-
-void
-__gcov_average_profiler (gcov_type *counters, gcov_type value)
-{
-  counters[0] += value;
-  counters[1] ++;
-}
-#endif
-
-#ifdef L_gcov_ior_profiler
-/* Bitwise-OR VALUE into COUNTER.  */
-
-void
-__gcov_ior_profiler (gcov_type *counters, gcov_type value)
-{
-  *counters |= value;
-}
-#endif
-
-#ifdef L_gcov_fork
-/* A wrapper for the fork function.  Flushes the accumulated profiling data, so
-   that they are not counted twice.  */
-
-pid_t
-__gcov_fork (void)
-{
-  pid_t pid;
-  extern __gthread_mutex_t __gcov_flush_mx;
-  __gcov_flush ();
-  pid = fork ();
-  if (pid == 0)
-    __GTHREAD_MUTEX_INIT_FUNCTION (&__gcov_flush_mx);
-  return pid;
-}
-#endif
-
-#ifdef L_gcov_execl
-/* A wrapper for the execl function.  Flushes the accumulated profiling data, so
-   that they are not lost.  */
-
-int
-__gcov_execl (const char *path, char *arg, ...)
-{
-  va_list ap, aq;
-  unsigned i, length;
-  char **args;
-
-  __gcov_flush ();
-
-  va_start (ap, arg);
-  va_copy (aq, ap);
-
-  length = 2;
-  while (va_arg (ap, char *))
-    length++;
-  va_end (ap);
-
-  args = (char **) alloca (length * sizeof (void *));
-  args[0] = arg;
-  for (i = 1; i < length; i++)
-    args[i] = va_arg (aq, char *);
-  va_end (aq);
-
-  return execv (path, args);
-}
-#endif
-
-#ifdef L_gcov_execlp
-/* A wrapper for the execlp function.  Flushes the accumulated profiling data, so
-   that they are not lost.  */
-
-int
-__gcov_execlp (const char *path, char *arg, ...)
-{
-  va_list ap, aq;
-  unsigned i, length;
-  char **args;
-
-  __gcov_flush ();
-
-  va_start (ap, arg);
-  va_copy (aq, ap);
-
-  length = 2;
-  while (va_arg (ap, char *))
-    length++;
-  va_end (ap);
-
-  args = (char **) alloca (length * sizeof (void *));
-  args[0] = arg;
-  for (i = 1; i < length; i++)
-    args[i] = va_arg (aq, char *);
-  va_end (aq);
-
-  return execvp (path, args);
-}
-#endif
-
-#ifdef L_gcov_execle
-/* A wrapper for the execle function.  Flushes the accumulated profiling data, so
-   that they are not lost.  */
-
-int
-__gcov_execle (const char *path, char *arg, ...)
-{
-  va_list ap, aq;
-  unsigned i, length;
-  char **args;
-  char **envp;
-
-  __gcov_flush ();
-
-  va_start (ap, arg);
-  va_copy (aq, ap);
-
-  length = 2;
-  while (va_arg (ap, char *))
-    length++;
-  va_end (ap);
-
-  args = (char **) alloca (length * sizeof (void *));
-  args[0] = arg;
-  for (i = 1; i < length; i++)
-    args[i] = va_arg (aq, char *);
-  envp = va_arg (aq, char **);
-  va_end (aq);
-
-  return execve (path, args, envp);
-}
-#endif
-
-#ifdef L_gcov_execv
-/* A wrapper for the execv function.  Flushes the accumulated profiling data, so
-   that they are not lost.  */
-
-int
-__gcov_execv (const char *path, char *const argv[])
-{
-  __gcov_flush ();
-  return execv (path, argv);
-}
-#endif
-
-#ifdef L_gcov_execvp
-/* A wrapper for the execvp function.  Flushes the accumulated profiling data, so
-   that they are not lost.  */
-
-int
-__gcov_execvp (const char *path, char *const argv[])
-{
-  __gcov_flush ();
-  return execvp (path, argv);
-}
-#endif
-
-#ifdef L_gcov_execve
-/* A wrapper for the execve function.  Flushes the accumulated profiling data, so
-   that they are not lost.  */
-
-int
-__gcov_execve (const char *path, char *const argv[], char *const envp[])
-{
-  __gcov_flush ();
-  return execve (path, argv, envp);
-}
-#endif
-
-#endif /* inhibit_libc */
diff --git a/libgcc/libgcov.h b/libgcc/libgcov.h
new file mode 100644
index 0000000..77fa24f
--- /dev/null
+++ b/libgcc/libgcov.h
@@ -0,0 +1,325 @@
+/* Header file for libgcov-*.c.
+   Copyright (C) 1996-2014 Free Software Foundation, Inc.
+   Contributed by Bob Manson <manson@cygnus.com>.
+   Completely remangled by Nathan Sidwell <nathan@codesourcery.com>.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef GCC_LIBGCOV_H
+#define GCC_LIBGCOV_H
+
+/* work around the poisoned malloc/calloc in system.h.  */
+#ifndef xmalloc
+#define xmalloc malloc
+#endif
+#ifndef xcalloc
+#define xcalloc calloc
+#endif
+#ifndef xrealloc
+#define xrealloc realloc
+#endif
+
+#ifndef IN_GCOV_TOOL
+/* About the target.  */
+
+#include "tconfig.h"
+#include "tsystem.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "libgcc_tm.h"
+
+#if defined(HAVE_CC_TLS) && !defined (USE_EMUTLS)
+#define THREAD_PREFIX __thread
+#else
+#define THREAD_PREFIX
+#endif
+
+#else /* IN_GCOV_TOOL */
+/* About the host.  */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+
+typedef unsigned gcov_unsigned_t;
+typedef unsigned gcov_position_t;
+/* gcov_type is typedef'd elsewhere for the compiler */
+#if defined (HOST_HAS_F_SETLKW)
+#define GCOV_LOCKED 1
+#else
+#define GCOV_LOCKED 0
+#endif
+
+#endif /* !IN_GCOV_TOOL */
+
+#if defined(inhibit_libc)
+#define IN_LIBGCOV (-1)
+#else
+#define IN_LIBGCOV 1
+#if defined(L_gcov)
+#define GCOV_LINKAGE /* nothing */
+#endif
+#endif
+
+#undef FUNC_ID_WIDTH
+#undef FUNC_ID_MASK
+
+#if BITS_PER_UNIT == 8
+typedef unsigned gcov_unsigned_t __attribute__ ((mode (SI)));
+typedef unsigned gcov_position_t __attribute__ ((mode (SI)));
+#if LONG_LONG_TYPE_SIZE > 32
+typedef signed gcov_type __attribute__ ((mode (DI)));
+#define FUNC_ID_WIDTH 32
+#define FUNC_ID_MASK ((1ll << FUNC_ID_WIDTH) - 1)
+typedef unsigned gcov_type_unsigned __attribute__ ((mode (DI)));
+#else
+typedef signed gcov_type __attribute__ ((mode (SI)));
+#define FUNC_ID_WIDTH 16
+#define FUNC_ID_MASK ((1 << FUNC_ID_WIDTH) - 1)
+typedef unsigned gcov_type_unsigned __attribute__ ((mode (SI)));
+#endif
+#else   /* BITS_PER_UNIT != 8  */
+#if BITS_PER_UNIT == 16
+typedef unsigned gcov_unsigned_t __attribute__ ((mode (HI)));
+typedef unsigned gcov_position_t __attribute__ ((mode (HI)));
+#if LONG_LONG_TYPE_SIZE > 32
+typedef signed gcov_type __attribute__ ((mode (SI)));
+#define FUNC_ID_WIDTH 32
+#define FUNC_ID_MASK ((1ll << FUNC_ID_WIDTH) - 1)
+typedef unsigned gcov_type_unsigned __attribute__ ((mode (SI)));
+#else
+typedef signed gcov_type __attribute__ ((mode (HI)));
+#define FUNC_ID_WIDTH 16
+#define FUNC_ID_MASK ((1 << FUNC_ID_WIDTH) - 1)
+typedef unsigned gcov_type_unsigned __attribute__ ((mode (HI)));
+#endif
+#else  /* BITS_PER_UNIT != 16  */
+typedef unsigned gcov_unsigned_t __attribute__ ((mode (QI)));
+typedef unsigned gcov_position_t __attribute__ ((mode (QI)));
+#if LONG_LONG_TYPE_SIZE > 32
+typedef signed gcov_type __attribute__ ((mode (HI)));
+#define FUNC_ID_WIDTH 32
+#define FUNC_ID_MASK ((1ll << FUNC_ID_WIDTH) - 1)
+typedef unsigned gcov_type_unsigned __attribute__ ((mode (HI)));
+#else
+typedef signed gcov_type __attribute__ ((mode (QI)));
+#define FUNC_ID_WIDTH 16
+#define FUNC_ID_MASK ((1 << FUNC_ID_WIDTH) - 1)
+typedef unsigned gcov_type_unsigned __attribute__ ((mode (QI)));
+#endif
+#endif /* BITS_PER_UNIT == 16  */
+
+#endif  /* BITS_PER_UNIT == 8  */
+
+#if LONG_LONG_TYPE_SIZE > 32
+#define GCOV_TYPE_ATOMIC_FETCH_ADD_FN __atomic_fetch_add_8
+#define GCOV_TYPE_ATOMIC_FETCH_ADD BUILT_IN_ATOMIC_FETCH_ADD_8
+#else
+#define GCOV_TYPE_ATOMIC_FETCH_ADD_FN __atomic_fetch_add_4
+#define GCOV_TYPE_ATOMIC_FETCH_ADD BUILT_IN_ATOMIC_FETCH_ADD_4
+#endif
+
+#undef EXTRACT_MODULE_ID_FROM_GLOBAL_ID
+#undef EXTRACT_FUNC_ID_FROM_GLOBAL_ID
+#undef GEN_FUNC_GLOBAL_ID
+#define EXTRACT_MODULE_ID_FROM_GLOBAL_ID(gid) \
+                (gcov_unsigned_t)(((gid) >> FUNC_ID_WIDTH) & FUNC_ID_MASK)
+#define EXTRACT_FUNC_ID_FROM_GLOBAL_ID(gid) \
+                (gcov_unsigned_t)((gid) & FUNC_ID_MASK)
+#define GEN_FUNC_GLOBAL_ID(m,f) ((((gcov_type) (m)) << FUNC_ID_WIDTH) | (f))
+
+
+#if defined (TARGET_POSIX_IO)
+#define GCOV_LOCKED 1
+#else
+#define GCOV_LOCKED 0
+#endif
+
+#define gcov_var __gcov_var
+#define gcov_open __gcov_open
+#define gcov_close __gcov_close
+#define gcov_write_tag_length __gcov_write_tag_length
+#define gcov_position __gcov_position
+#define gcov_seek __gcov_seek
+#define gcov_rewrite __gcov_rewrite
+#define gcov_truncate __gcov_truncate
+#define gcov_is_error __gcov_is_error
+#define gcov_write_unsigned __gcov_write_unsigned
+#define gcov_write_counter __gcov_write_counter
+#define gcov_write_summary __gcov_write_summary
+#define gcov_write_module_info __gcov_write_module_info
+#define gcov_read_unsigned __gcov_read_unsigned
+#define gcov_read_counter __gcov_read_counter
+#define gcov_read_summary __gcov_read_summary
+#define gcov_read_module_info __gcov_read_module_info
+#define gcov_sort_n_vals __gcov_sort_n_vals
+
+/* Poison these, so they don't accidentally slip in.  */
+#pragma GCC poison gcov_write_string gcov_write_tag gcov_write_length
+#pragma GCC poison /*gcov_read_string gcov_sync*/ gcov_time gcov_magic
+
+#ifdef HAVE_GAS_HIDDEN
+#define ATTRIBUTE_HIDDEN  __attribute__ ((__visibility__ ("hidden")))
+#else
+#define ATTRIBUTE_HIDDEN
+#endif
+
+#include "gcov-io.h"
+
+/* Structures embedded in coveraged program.  The structures generated
+   by write_profile must match these.  */
+
+/* Information about counters for a single function.  */
+struct gcov_ctr_info
+{
+  gcov_unsigned_t num;		/* number of counters.  */
+  gcov_type *values;		/* their values.  */
+};
+
+/* Information about a single function.  This uses the trailing array
+   idiom. The number of counters is determined from the merge pointer
+   array in gcov_info.  The key is used to detect which of a set of
+   comdat functions was selected -- it points to the gcov_info object
+   of the object file containing the selected comdat function.  */
+
+struct gcov_fn_info
+{
+  const struct gcov_info *key;		/* comdat key */
+  gcov_unsigned_t ident;		/* unique ident of function */
+  gcov_unsigned_t lineno_checksum;	/* function lineo_checksum */
+  gcov_unsigned_t cfg_checksum;	/* function cfg checksum */
+  struct gcov_ctr_info ctrs[0];		/* instrumented counters */
+};
+
+/* Type of function used to merge counters.  */
+typedef void (*gcov_merge_fn) (gcov_type *, gcov_unsigned_t);
+
+/* Information about a single object file.  */
+struct gcov_info
+{
+  gcov_unsigned_t version;	/* expected version number */
+  struct gcov_module_info *mod_info; /* addtional module info.  */
+  struct gcov_info *next;	/* link to next, used by libgcov */
+
+  gcov_unsigned_t stamp;	/* uniquifying time stamp */
+  const char *filename;		/* output file name */
+  gcov_unsigned_t eof_pos;      /* end position of profile data */
+  gcov_merge_fn merge[GCOV_COUNTERS];  /* merge functions (null for
+					  unused) */
+
+  unsigned n_functions;		/* number of functions */
+
+#ifndef IN_GCOV_TOOL
+  const struct gcov_fn_info *const *functions; /* pointer to pointers
+                                                  to function information  */
+#else
+  const struct gcov_fn_info **functions;
+#endif /* !IN_GCOV_TOOL */
+};
+
+/* Information about a single imported module.  */
+struct dyn_imp_mod
+{
+  const struct gcov_info *imp_mod;
+  double weight;
+};
+
+/* Register a new object file module.  */
+extern void __gcov_init (struct gcov_info *) ATTRIBUTE_HIDDEN;
+
+/* Set sampling rate to RATE.  */
+extern void __gcov_set_sampling_rate (unsigned int rate);
+
+/* Called before fork, to avoid double counting.  */
+extern void __gcov_flush (void) ATTRIBUTE_HIDDEN;
+
+/* Function to reset all counters to 0.  */
+extern void __gcov_reset (void);
+
+/* Function to enable early write of profile information so far.  */
+extern void __gcov_dump (void);
+
+/* The merge function that just sums the counters.  */
+extern void __gcov_merge_add (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
+
+/* The merge function to choose the most common value.  */
+extern void __gcov_merge_single (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
+
+/* The merge function to choose the most common difference between
+   consecutive values.  */
+extern void __gcov_merge_delta (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
+
+/* The merge function that just ors the counters together.  */
+extern void __gcov_merge_ior (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
+
+/* The merge function used for direct call counters.  */
+extern void __gcov_merge_dc (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
+
+/* The merge function used for indirect call counters.  */
+extern void __gcov_merge_icall_topn (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
+
+/* The profiler functions.  */
+extern void __gcov_interval_profiler (gcov_type *, gcov_type, int, unsigned);
+extern void __gcov_pow2_profiler (gcov_type *, gcov_type);
+extern void __gcov_one_value_profiler (gcov_type *, gcov_type);
+extern void __gcov_one_value_profiler_atomic (gcov_type *, gcov_type);
+extern void __gcov_indirect_call_profiler (gcov_type *, gcov_type, void *, void *);
+extern void __gcov_indirect_call_profiler_atomic (gcov_type *, gcov_type, void *, void *);
+extern void __gcov_indirect_call_topn_profiler (void *, void *, gcov_unsigned_t) ATTRIBUTE_HIDDEN;
+extern void __gcov_direct_call_profiler (void *, void *, gcov_unsigned_t) ATTRIBUTE_HIDDEN;
+extern void __gcov_average_profiler (gcov_type *, gcov_type);
+extern void __gcov_ior_profiler (gcov_type *, gcov_type);
+extern void __gcov_sort_n_vals (gcov_type *value_array, int n);
+
+#ifndef inhibit_libc
+/* The wrappers around some library functions.  */
+extern pid_t __gcov_fork (void) ATTRIBUTE_HIDDEN;
+extern int __gcov_execl (const char *, char *, ...) ATTRIBUTE_HIDDEN;
+extern int __gcov_execlp (const char *, char *, ...) ATTRIBUTE_HIDDEN;
+extern int __gcov_execle (const char *, char *, ...) ATTRIBUTE_HIDDEN;
+extern int __gcov_execv (const char *, char *const []) ATTRIBUTE_HIDDEN;
+extern int __gcov_execvp (const char *, char *const []) ATTRIBUTE_HIDDEN;
+extern int __gcov_execve (const char *, char  *const [], char *const [])
+  ATTRIBUTE_HIDDEN;
+
+/* Functions that only available only in libgcov.  */
+GCOV_LINKAGE int gcov_open (const char */*name*/) ATTRIBUTE_HIDDEN;
+GCOV_LINKAGE void gcov_write_counter (gcov_type) ATTRIBUTE_HIDDEN;
+GCOV_LINKAGE void gcov_write_tag_length (gcov_unsigned_t, gcov_unsigned_t)
+    ATTRIBUTE_HIDDEN;
+GCOV_LINKAGE void gcov_write_summary (gcov_unsigned_t /*tag*/,
+				      const struct gcov_summary *)
+    ATTRIBUTE_HIDDEN;
+
+GCOV_LINKAGE void gcov_write_module_infos (struct gcov_info *mod_info)
+    ATTRIBUTE_HIDDEN;
+GCOV_LINKAGE const struct dyn_imp_mod **
+gcov_get_sorted_import_module_array (struct gcov_info *mod_info, unsigned *len)
+    ATTRIBUTE_HIDDEN;
+/*staic void gcov_rewrite (void); */
+GCOV_LINKAGE void gcov_seek (gcov_position_t /*position*/) ATTRIBUTE_HIDDEN;
+GCOV_LINKAGE void gcov_truncate (void) ATTRIBUTE_HIDDEN;
+
+#endif /* !inhibit_libc */
+
+#endif /* GCC_LIBGCOV_H */
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 8b9eba1..cd7a210 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,14 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
+2013-10-04  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/55469
+	* io/list_read (parse_repeat, read_integer, read_character,
+	parse_real, read_real, check_type, list_formatted_read_scalar,
+	finish_list_read): Call list_free.
+
 2013-06-21  Uros Bizjak  <ubizjak@gmail.com>
 
 	Backport from mainline
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index 5a44bdf..60f4549 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -616,6 +616,7 @@
   free_saved (dtp);
   if (c == EOF)
     {
+      free_line (dtp);
       hit_eof (dtp);
       return 1;
     }
@@ -905,11 +906,14 @@
   free_saved (dtp);  
   if (c == EOF)
     {
+      free_line (dtp);
       hit_eof (dtp);
       return;
     }
   else if (c != '\n')
     eat_line (dtp);
+
+  free_line (dtp);
   snprintf (message, MSGLEN, "Bad integer for item %d in list input",
 	      dtp->u.p.item_count);
   generate_error (&dtp->common, LIBERROR_READ_VALUE, message);
@@ -1079,7 +1083,6 @@
       unget_char (dtp, c);
       eat_separator (dtp);
       dtp->u.p.saved_type = BT_CHARACTER;
-      free_line (dtp);
     }
   else 
     {
@@ -1088,10 +1091,12 @@
 		  dtp->u.p.item_count);
       generate_error (&dtp->common, LIBERROR_READ_VALUE, message);
     }
+  free_line (dtp);
   return;
 
  eof:
   free_saved (dtp);
+  free_line (dtp);
   hit_eof (dtp);
 }
 
@@ -1286,11 +1291,14 @@
   free_saved (dtp);
   if (c == EOF)
     {
+      free_line (dtp);
       hit_eof (dtp);
       return 1;
     }
   else if (c != '\n')
     eat_line (dtp);
+
+  free_line (dtp);
   snprintf (message, MSGLEN, "Bad floating point number for item %d",
 	      dtp->u.p.item_count);
   generate_error (&dtp->common, LIBERROR_READ_VALUE, message);
@@ -1391,11 +1399,14 @@
   free_saved (dtp);
   if (c == EOF)
     {
+      free_line (dtp);
       hit_eof (dtp);
       return;
     }
   else if (c != '\n')   
     eat_line (dtp);
+
+  free_line (dtp);
   snprintf (message, MSGLEN, "Bad complex value in item %d of list input",
 	      dtp->u.p.item_count);
   generate_error (&dtp->common, LIBERROR_READ_VALUE, message);
@@ -1630,7 +1641,10 @@
   eat_separator (dtp);
   push_char (dtp, '\0');
   if (convert_real (dtp, dest, dtp->u.p.saved_string, length))
-    return;
+    {
+      free_saved (dtp);
+      return;
+    }
 
   free_saved (dtp);
   dtp->u.p.saved_type = BT_REAL;
@@ -1768,12 +1782,14 @@
   free_saved (dtp);
   if (c == EOF)
     {
+      free_line (dtp);
       hit_eof (dtp);
       return;
     }
   else if (c != '\n')
     eat_line (dtp);
 
+  free_line (dtp);
   snprintf (message, MSGLEN, "Bad real number in item %d of list input",
 	      dtp->u.p.item_count);
   generate_error (&dtp->common, LIBERROR_READ_VALUE, message);
@@ -1790,6 +1806,7 @@
 
   if (dtp->u.p.saved_type != BT_UNKNOWN && dtp->u.p.saved_type != type)
     {
+      free_line (dtp);
       snprintf (message, MSGLEN, "Read type %s where %s was expected for item %d",
 		  type_name (dtp->u.p.saved_type), type_name (type),
 		  dtp->u.p.item_count);
@@ -1803,6 +1820,7 @@
 
   if (dtp->u.p.saved_length != len)
     {
+      free_line (dtp);
       snprintf (message, MSGLEN,
 		  "Read kind %d %s where kind %d is required for item %d",
 		  dtp->u.p.saved_length, type_name (dtp->u.p.saved_type), len,
@@ -1976,7 +1994,10 @@
 
 cleanup:
   if (err == LIBERROR_END)
-    hit_eof (dtp);
+    {
+      free_line (dtp);
+      hit_eof (dtp);
+    }
   return err;
 }
 
@@ -2024,7 +2045,10 @@
 
   err = eat_line (dtp);
   if (err == LIBERROR_END)
-    hit_eof (dtp);
+    {
+      free_line (dtp);
+      hit_eof (dtp);
+    }
 }
 
 /*			NAMELIST INPUT
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index 6a81d33..957f23c 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -424,6 +424,7 @@
 	runtime/go-caller.c \
 	runtime/go-callers.c \
 	runtime/go-can-convert-interface.c \
+	runtime/go-cdiv.c \
 	runtime/go-cgo.c \
 	runtime/go-check-interface.c \
 	runtime/go-construct-map.c \
@@ -895,9 +896,28 @@
 	go/path/match.go \
 	go/path/path.go
 
+if LIBGO_IS_X86_64
+go_reflect_makefunc_file = \
+	go/reflect/makefuncgo_amd64.go
+go_reflect_makefunc_s_file = \
+	go/reflect/makefunc_amd64.S
+else
+if LIBGO_IS_386
+go_reflect_makefunc_file = \
+	go/reflect/makefuncgo_386.go
+go_reflect_makefunc_s_file = \
+	go/reflect/makefunc_386.S
+else
+go_reflect_makefunc_file =
+go_reflect_makefunc_s_file = \
+	go/reflect/makefunc_dummy.c
+endif
+endif
+
 go_reflect_files = \
 	go/reflect/deepequal.go \
 	go/reflect/makefunc.go \
+	$(go_reflect_makefunc_file) \
 	go/reflect/type.go \
 	go/reflect/value.go
 
@@ -1761,6 +1781,7 @@
 	os.lo \
 	path.lo \
 	reflect-go.lo \
+	reflect/makefunc.lo \
 	regexp.lo \
 	runtime-go.lo \
 	sort.lo \
@@ -2147,6 +2168,9 @@
 	$(BUILDPACKAGE)
 reflect/check: $(CHECK_DEPS)
 	@$(CHECK)
+reflect/makefunc.lo: $(go_reflect_makefunc_s_file)
+	@$(MKDIR_P) reflect
+	$(LTCOMPILE) -c -o $@ $<
 .PHONY: reflect/check
 
 @go_include@ regexp.lo.dep
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index eccc72d..706a72e 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -134,17 +134,17 @@
 am__DEPENDENCIES_2 = bufio.lo bytes.lo bytes/index.lo crypto.lo \
 	errors.lo expvar.lo flag.lo fmt.lo hash.lo html.lo image.lo \
 	io.lo log.lo math.lo mime.lo net.lo os.lo path.lo \
-	reflect-go.lo regexp.lo runtime-go.lo sort.lo strconv.lo \
-	strings.lo sync.lo syscall.lo syscall/errno.lo \
-	syscall/signame.lo syscall/wait.lo testing.lo time-go.lo \
-	unicode.lo archive/tar.lo archive/zip.lo compress/bzip2.lo \
-	compress/flate.lo compress/gzip.lo compress/lzw.lo \
-	compress/zlib.lo container/heap.lo container/list.lo \
-	container/ring.lo crypto/aes.lo crypto/cipher.lo crypto/des.lo \
-	crypto/dsa.lo crypto/ecdsa.lo crypto/elliptic.lo \
-	crypto/hmac.lo crypto/md5.lo crypto/rand.lo crypto/rc4.lo \
-	crypto/rsa.lo crypto/sha1.lo crypto/sha256.lo crypto/sha512.lo \
-	crypto/subtle.lo crypto/tls.lo crypto/x509.lo \
+	reflect-go.lo reflect/makefunc.lo regexp.lo runtime-go.lo \
+	sort.lo strconv.lo strings.lo sync.lo syscall.lo \
+	syscall/errno.lo syscall/signame.lo syscall/wait.lo testing.lo \
+	time-go.lo unicode.lo archive/tar.lo archive/zip.lo \
+	compress/bzip2.lo compress/flate.lo compress/gzip.lo \
+	compress/lzw.lo compress/zlib.lo container/heap.lo \
+	container/list.lo container/ring.lo crypto/aes.lo \
+	crypto/cipher.lo crypto/des.lo crypto/dsa.lo crypto/ecdsa.lo \
+	crypto/elliptic.lo crypto/hmac.lo crypto/md5.lo crypto/rand.lo \
+	crypto/rc4.lo crypto/rsa.lo crypto/sha1.lo crypto/sha256.lo \
+	crypto/sha512.lo crypto/subtle.lo crypto/tls.lo crypto/x509.lo \
 	crypto/x509/pkix.lo database/sql.lo database/sql/driver.lo \
 	debug/dwarf.lo debug/elf.lo debug/gosym.lo debug/macho.lo \
 	debug/pe.lo encoding/ascii85.lo encoding/asn1.lo \
@@ -195,7 +195,7 @@
 @LIBGO_IS_LINUX_TRUE@am__objects_5 = getncpu-linux.lo
 am__objects_6 = go-append.lo go-assert.lo go-assert-interface.lo \
 	go-byte-array-to-string.lo go-breakpoint.lo go-caller.lo \
-	go-callers.lo go-can-convert-interface.lo go-cgo.lo \
+	go-callers.lo go-can-convert-interface.lo go-cdiv.lo go-cgo.lo \
 	go-check-interface.lo go-construct-map.lo \
 	go-convert-interface.lo go-copy.lo go-defer.lo \
 	go-deferred-recover.lo go-eface-compare.lo \
@@ -757,6 +757,7 @@
 	runtime/go-caller.c \
 	runtime/go-callers.c \
 	runtime/go-can-convert-interface.c \
+	runtime/go-cdiv.c \
 	runtime/go-cgo.c \
 	runtime/go-check-interface.c \
 	runtime/go-construct-map.c \
@@ -1087,9 +1088,26 @@
 	go/path/match.go \
 	go/path/path.go
 
+@LIBGO_IS_386_FALSE@@LIBGO_IS_X86_64_FALSE@go_reflect_makefunc_file = 
+@LIBGO_IS_386_TRUE@@LIBGO_IS_X86_64_FALSE@go_reflect_makefunc_file = \
+@LIBGO_IS_386_TRUE@@LIBGO_IS_X86_64_FALSE@	go/reflect/makefuncgo_386.go
+
+@LIBGO_IS_X86_64_TRUE@go_reflect_makefunc_file = \
+@LIBGO_IS_X86_64_TRUE@	go/reflect/makefuncgo_amd64.go
+
+@LIBGO_IS_386_FALSE@@LIBGO_IS_X86_64_FALSE@go_reflect_makefunc_s_file = \
+@LIBGO_IS_386_FALSE@@LIBGO_IS_X86_64_FALSE@	go/reflect/makefunc_dummy.c
+
+@LIBGO_IS_386_TRUE@@LIBGO_IS_X86_64_FALSE@go_reflect_makefunc_s_file = \
+@LIBGO_IS_386_TRUE@@LIBGO_IS_X86_64_FALSE@	go/reflect/makefunc_386.S
+
+@LIBGO_IS_X86_64_TRUE@go_reflect_makefunc_s_file = \
+@LIBGO_IS_X86_64_TRUE@	go/reflect/makefunc_amd64.S
+
 go_reflect_files = \
 	go/reflect/deepequal.go \
 	go/reflect/makefunc.go \
+	$(go_reflect_makefunc_file) \
 	go/reflect/type.go \
 	go/reflect/value.go
 
@@ -1846,6 +1864,7 @@
 	os.lo \
 	path.lo \
 	reflect-go.lo \
+	reflect/makefunc.lo \
 	regexp.lo \
 	runtime-go.lo \
 	sort.lo \
@@ -2350,6 +2369,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-caller.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-callers.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-can-convert-interface.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-cdiv.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-cgo.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-check-interface.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-construct-map.Plo@am__quote@
@@ -2536,6 +2556,13 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o go-can-convert-interface.lo `test -f 'runtime/go-can-convert-interface.c' || echo '$(srcdir)/'`runtime/go-can-convert-interface.c
 
+go-cdiv.lo: runtime/go-cdiv.c
+@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT go-cdiv.lo -MD -MP -MF $(DEPDIR)/go-cdiv.Tpo -c -o go-cdiv.lo `test -f 'runtime/go-cdiv.c' || echo '$(srcdir)/'`runtime/go-cdiv.c
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/go-cdiv.Tpo $(DEPDIR)/go-cdiv.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='runtime/go-cdiv.c' object='go-cdiv.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o go-cdiv.lo `test -f 'runtime/go-cdiv.c' || echo '$(srcdir)/'`runtime/go-cdiv.c
+
 go-cgo.lo: runtime/go-cgo.c
 @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT go-cgo.lo -MD -MP -MF $(DEPDIR)/go-cgo.Tpo -c -o go-cgo.lo `test -f 'runtime/go-cgo.c' || echo '$(srcdir)/'`runtime/go-cgo.c
 @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/go-cgo.Tpo $(DEPDIR)/go-cgo.Plo
@@ -4499,6 +4526,9 @@
 	$(BUILDPACKAGE)
 reflect/check: $(CHECK_DEPS)
 	@$(CHECK)
+reflect/makefunc.lo: $(go_reflect_makefunc_s_file)
+	@$(MKDIR_P) reflect
+	$(LTCOMPILE) -c -o $@ $<
 .PHONY: reflect/check
 
 @go_include@ regexp.lo.dep
diff --git a/libgo/config.h.in b/libgo/config.h.in
index 349ace6..f6da8b9 100644
--- a/libgo/config.h.in
+++ b/libgo/config.h.in
@@ -3,6 +3,9 @@
 /* Define if building universal (internal helper macro) */
 #undef AC_APPLE_UNIVERSAL_BUILD
 
+/* Define to the flags needed for the .section .eh_frame directive. */
+#undef EH_FRAME_FLAGS
+
 /* Define to 1 if you have the `accept4' function. */
 #undef HAVE_ACCEPT4
 
@@ -12,6 +15,15 @@
 /* Define to 1 if you have the `asinl' function. */
 #undef HAVE_ASINL
 
+/* Define if your assembler supports GNU comdat group syntax. */
+#undef HAVE_AS_COMDAT_GAS
+
+/* Define if your assembler supports unwind section type. */
+#undef HAVE_AS_X86_64_UNWIND_SECTION_TYPE
+
+/* Define if your assembler supports PC relative relocs. */
+#undef HAVE_AS_X86_PCREL
+
 /* Define to 1 if you have the `atan2l' function. */
 #undef HAVE_ATAN2L
 
@@ -27,6 +39,9 @@
 /* Define to 1 if you have the `dl_iterate_phdr' function. */
 #undef HAVE_DL_ITERATE_PHDR
 
+/* Define to 1 if you have the `dup3' function. */
+#undef HAVE_DUP3
+
 /* Define to 1 if you have the `epoll_create1' function. */
 #undef HAVE_EPOLL_CREATE1
 
@@ -54,6 +69,9 @@
 /* Define if _Unwind_GetIPInfo is available. */
 #undef HAVE_GETIPINFO
 
+/* Define to 1 if you have the `getxattr' function. */
+#undef HAVE_GETXATTR
+
 /* Define to 1 if you have the `inotify_add_watch' function. */
 #undef HAVE_INOTIFY_ADD_WATCH
 
@@ -99,6 +117,9 @@
 /* Define to 1 if you have the <linux/rtnetlink.h> header file. */
 #undef HAVE_LINUX_RTNETLINK_H
 
+/* Define to 1 if you have the `listxattr' function. */
+#undef HAVE_LISTXATTR
+
 /* Define to 1 if the system has the type `loff_t'. */
 #undef HAVE_LOFF_T
 
@@ -159,6 +180,9 @@
 /* Define to 1 if you have the `pipe2' function. */
 #undef HAVE_PIPE2
 
+/* Define to 1 if you have the `removexattr' function. */
+#undef HAVE_REMOVEXATTR
+
 /* Define to 1 if you have the `renameat' function. */
 #undef HAVE_RENAMEAT
 
@@ -168,6 +192,9 @@
 /* Define to 1 if you have the `setenv' function. */
 #undef HAVE_SETENV
 
+/* Define to 1 if you have the `setxattr' function. */
+#undef HAVE_SETXATTR
+
 /* Define to 1 if you have the `sinl' function. */
 #undef HAVE_SINL
 
diff --git a/libgo/configure b/libgo/configure
index 2be1587..1625cc9 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -14706,7 +14706,7 @@
 fi
 
 
-for ac_func in accept4 epoll_create1 faccessat fallocate fchmodat fchownat futimesat inotify_add_watch inotify_init inotify_init1 inotify_rm_watch mkdirat mknodat openat pipe2 renameat sync_file_range splice tee unlinkat unshare utimensat
+for ac_func in accept4 dup3 epoll_create1 faccessat fallocate fchmodat fchownat futimesat getxattr inotify_add_watch inotify_init inotify_init1 inotify_rm_watch listxattr mkdirat mknodat openat pipe2 removexattr renameat setxattr sync_file_range splice tee unlinkat unshare utimensat
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -15179,6 +15179,101 @@
 
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether .eh_frame section should be read-only" >&5
+$as_echo_n "checking whether .eh_frame section should be read-only... " >&6; }
+if test "${libgo_cv_ro_eh_frame+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+libgo_cv_ro_eh_frame=no
+echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
+if $CC $CFLAGS -S -fpic -fexceptions -o conftest.s conftest.c > /dev/null 2>&1; then
+  if grep '.section.*eh_frame.*"a"' conftest.s > /dev/null; then
+    libgo_cv_ro_eh_frame=yes
+  elif grep '.section.*eh_frame.*#alloc' conftest.c \
+       | grep -v '#write' > /dev/null; then
+    libgo_cv_ro_eh_frame=yes
+  fi
+fi
+rm -f conftest.*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgo_cv_ro_eh_frame" >&5
+$as_echo "$libgo_cv_ro_eh_frame" >&6; }
+if test "x$libgo_cv_ro_eh_frame" = xyes; then
+
+$as_echo "#define EH_FRAME_FLAGS \"a\"" >>confdefs.h
+
+else
+
+$as_echo "#define EH_FRAME_FLAGS \"aw\"" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler supports GNU comdat group syntax" >&5
+$as_echo_n "checking if assembler supports GNU comdat group syntax... " >&6; }
+if test "${libgo_cv_as_comdat_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
+if $CC $CFLAGS -c conftest.s > /dev/null 2>&1; then
+  libgo_cv_as_comdat_gnu=yes
+else
+  libgo_cv_as_comdat_gnu=no
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgo_cv_as_comdat_gnu" >&5
+$as_echo "$libgo_cv_as_comdat_gnu" >&6; }
+if test "x$libgo_cv_as_comdat_gnu" = xyes; then
+
+$as_echo "#define HAVE_AS_COMDAT_GAS 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler supports pc related relocs" >&5
+$as_echo_n "checking assembler supports pc related relocs... " >&6; }
+if test "${libgo_cv_as_x86_pcrel+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+libgo_cv_as_x86_pcrel=yes
+echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s
+if $CC $CFLAGS -c conftest.s 2>&1 | $EGREP -i 'illegal|warning' > /dev/null; then
+    libgo_cv_as_x86_pcrel=no
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgo_cv_as_x86_pcrel" >&5
+$as_echo "$libgo_cv_as_x86_pcrel" >&6; }
+if test "x$libgo_cv_as_x86_pcrel" = xyes; then
+
+$as_echo "#define HAVE_AS_X86_PCREL 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler supports unwind section type" >&5
+$as_echo_n "checking assembler supports unwind section type... " >&6; }
+if test "${libgo_cv_as_x86_64_unwind_section_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+libgo_cv_as_x86_64_unwind_section_type=yes
+echo '.section .eh_frame,"a",@unwind' > conftest.s
+if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
+    libgo_cv_as_x86_64_unwind_section_type=no
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgo_cv_as_x86_64_unwind_section_type" >&5
+$as_echo "$libgo_cv_as_x86_64_unwind_section_type" >&6; }
+if test "x$libgo_cv_as_x86_64_unwind_section_type" = xyes; then
+
+$as_echo "#define HAVE_AS_X86_64_UNWIND_SECTION_TYPE 1" >>confdefs.h
+
+fi
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
diff --git a/libgo/configure.ac b/libgo/configure.ac
index 91c1cdb..8ce846d 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -503,7 +503,7 @@
 AM_CONDITIONAL(HAVE_STRERROR_R, test "$ac_cv_func_strerror_r" = yes)
 AM_CONDITIONAL(HAVE_WAIT4, test "$ac_cv_func_wait4" = yes)
 
-AC_CHECK_FUNCS(accept4 epoll_create1 faccessat fallocate fchmodat fchownat futimesat inotify_add_watch inotify_init inotify_init1 inotify_rm_watch mkdirat mknodat openat pipe2 renameat sync_file_range splice tee unlinkat unshare utimensat)
+AC_CHECK_FUNCS(accept4 dup3 epoll_create1 faccessat fallocate fchmodat fchownat futimesat getxattr inotify_add_watch inotify_init inotify_init1 inotify_rm_watch listxattr mkdirat mknodat openat pipe2 removexattr renameat setxattr sync_file_range splice tee unlinkat unshare utimensat)
 AC_TYPE_OFF_T
 AC_CHECK_TYPES([loff_t])
 
@@ -757,6 +757,68 @@
 	    [Define if setcontext clobbers TLS variables])
 fi
 
+AC_CACHE_CHECK([whether .eh_frame section should be read-only],
+libgo_cv_ro_eh_frame, [
+libgo_cv_ro_eh_frame=no
+echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
+if $CC $CFLAGS -S -fpic -fexceptions -o conftest.s conftest.c > /dev/null 2>&1; then
+  if grep '.section.*eh_frame.*"a"' conftest.s > /dev/null; then
+    libgo_cv_ro_eh_frame=yes
+  elif grep '.section.*eh_frame.*#alloc' conftest.c \
+       | grep -v '#write' > /dev/null; then
+    libgo_cv_ro_eh_frame=yes
+  fi
+fi
+rm -f conftest.*
+])
+if test "x$libgo_cv_ro_eh_frame" = xyes; then
+  AC_DEFINE(EH_FRAME_FLAGS, "a",
+	    [Define to the flags needed for the .section .eh_frame directive.])
+else
+  AC_DEFINE(EH_FRAME_FLAGS, "aw",
+	    [Define to the flags needed for the .section .eh_frame directive.])
+fi
+
+AC_CACHE_CHECK([if assembler supports GNU comdat group syntax],
+libgo_cv_as_comdat_gnu, [
+echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
+if $CC $CFLAGS -c conftest.s > /dev/null 2>&1; then
+  libgo_cv_as_comdat_gnu=yes
+else
+  libgo_cv_as_comdat_gnu=no
+fi
+])
+if test "x$libgo_cv_as_comdat_gnu" = xyes; then
+  AC_DEFINE(HAVE_AS_COMDAT_GAS, 1,
+	    [Define if your assembler supports GNU comdat group syntax.])
+fi
+
+AC_CACHE_CHECK([assembler supports pc related relocs],
+libgo_cv_as_x86_pcrel, [
+libgo_cv_as_x86_pcrel=yes
+echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s
+if $CC $CFLAGS -c conftest.s 2>&1 | $EGREP -i 'illegal|warning' > /dev/null; then
+    libgo_cv_as_x86_pcrel=no
+fi
+])
+if test "x$libgo_cv_as_x86_pcrel" = xyes; then
+  AC_DEFINE(HAVE_AS_X86_PCREL, 1,
+	    [Define if your assembler supports PC relative relocs.])
+fi
+
+AC_CACHE_CHECK([assembler supports unwind section type],
+libgo_cv_as_x86_64_unwind_section_type, [
+libgo_cv_as_x86_64_unwind_section_type=yes
+echo '.section .eh_frame,"a",@unwind' > conftest.s
+if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
+    libgo_cv_as_x86_64_unwind_section_type=no
+fi
+])
+if test "x$libgo_cv_as_x86_64_unwind_section_type" = xyes; then
+  AC_DEFINE(HAVE_AS_X86_64_UNWIND_SECTION_TYPE, 1,
+	    [Define if your assembler supports unwind section type.])
+fi
+
 AC_CACHE_SAVE
 
 if test ${multilib} = yes; then
diff --git a/libgo/go/reflect/all_test.go b/libgo/go/reflect/all_test.go
index 6528e60..526f09b 100644
--- a/libgo/go/reflect/all_test.go
+++ b/libgo/go/reflect/all_test.go
@@ -1430,11 +1430,13 @@
 	}
 }
 
-/*
-
-Not yet implemented for gccgo.
-
 func TestMakeFunc(t *testing.T) {
+	switch runtime.GOARCH {
+	case "amd64", "386":
+	default:
+		t.Skip("MakeFunc not implemented for " + runtime.GOARCH)
+	}
+
 	f := dummy
 	fv := MakeFunc(TypeOf(f), func(in []Value) []Value { return in })
 	ValueOf(&f).Elem().Set(fv)
@@ -1452,7 +1454,29 @@
 	}
 }
 
-*/
+func TestMakeFuncInterface(t *testing.T) {
+	switch runtime.GOARCH {
+	case "amd64", "386":
+	default:
+		t.Skip("MakeFunc not implemented for " + runtime.GOARCH)
+	}
+
+	fn := func(i int) int { return i }
+	incr := func(in []Value) []Value {
+		return []Value{ValueOf(int(in[0].Int() + 1))}
+	}
+	fv := MakeFunc(TypeOf(fn), incr)
+	ValueOf(&fn).Elem().Set(fv)
+	if r := fn(2); r != 3 {
+		t.Errorf("Call returned %d, want 3", r)
+	}
+	if r := fv.Call([]Value{ValueOf(14)})[0].Int(); r != 15 {
+		t.Errorf("Call returned %d, want 15", r)
+	}
+	if r := fv.Interface().(func(int) int)(26); r != 27 {
+		t.Errorf("Call returned %d, want 27", r)
+	}
+}
 
 type Point struct {
 	x, y int
@@ -2406,6 +2430,15 @@
 	}
 }
 
+func TestFuncArg(t *testing.T) {
+	f1 := func(i int, f func(int) int) int { return f(i) }
+	f2 := func(i int) int { return i + 1 }
+	r := ValueOf(f1).Call([]Value{ValueOf(100), ValueOf(f2)})
+	if r[0].Int() != 101 {
+		t.Errorf("function returned %d, want 101", r[0].Int())
+	}
+}
+
 var tagGetTests = []struct {
 	Tag   StructTag
 	Key   string
diff --git a/libgo/go/reflect/makefunc.go b/libgo/go/reflect/makefunc.go
index f03beb3..3e8085b 100644
--- a/libgo/go/reflect/makefunc.go
+++ b/libgo/go/reflect/makefunc.go
@@ -7,6 +7,7 @@
 package reflect
 
 import (
+	"runtime"
 	"unsafe"
 )
 
@@ -45,14 +46,33 @@
 		panic("reflect: call of MakeFunc with non-Func type")
 	}
 
+	switch runtime.GOARCH {
+	case "amd64", "386":
+	default:
+		panic("reflect.MakeFunc not implemented for " + runtime.GOARCH)
+	}
+
 	t := typ.common()
 	ftyp := (*funcType)(unsafe.Pointer(t))
 
-	_, _ = t, ftyp
+	// Indirect Go func value (dummy) to obtain
+	// actual code address. (A Go func value is a pointer
+	// to a C function pointer. http://golang.org/s/go11func.)
+	dummy := makeFuncStub
+	code := **(**uintptr)(unsafe.Pointer(&dummy))
 
-	panic("reflect MakeFunc not implemented")
+	impl := &makeFuncImpl{code: code, typ: ftyp, fn: fn}
+
+	return Value{t, unsafe.Pointer(&impl), flag(Func<<flagKindShift) | flagIndir}
 }
 
+// makeFuncStub is an assembly function that is the code half of
+// the function returned from MakeFunc. It expects a *callReflectFunc
+// as its context register, and its job is to invoke callReflect(ctxt, frame)
+// where ctxt is the context register and frame is a pointer to the first
+// word in the passed-in argument frame.
+func makeFuncStub()
+
 // makeMethodValue converts v from the rcvr+method index representation
 // of a method value to an actual method func value, which is
 // basically the receiver value with a special bit set, into a true
diff --git a/libgo/go/reflect/makefunc_386.S b/libgo/go/reflect/makefunc_386.S
new file mode 100644
index 0000000..5878bc4
--- /dev/null
+++ b/libgo/go/reflect/makefunc_386.S
@@ -0,0 +1,198 @@
+/* Copyright 2013 The Go Authors. All rights reserved.
+   Use of this source code is governed by a BSD-style
+   license that can be found in the LICENSE file.
+
+   MakeFunc 386 assembly code.  */
+
+#include "config.h"
+
+	.globl reflect.makeFuncStub
+
+#ifdef __ELF__
+	.type reflect.makeFuncStub,@function
+#endif
+
+reflect.makeFuncStub:
+.LFB1:
+
+	/* Go does not provide any equivalent to the regparm function
+	   attribute, so on Go we do not need to worry about passing
+	   parameters in registers.  We just pass a pointer to the
+	   arguments on the stack.
+	
+	   We do need to pick up the return values, though, so we pass
+	   a pointer to a struct that looks like this.
+	   struct {
+	     esp uint32		// 0x0
+	     eax uint32		// 0x4
+	     st0 uint64		// 0x8
+	   }
+	*/
+
+	pushl	%ebp
+.LCFI0:
+	movl	%esp, %ebp
+.LCFI1:
+	pushl	%ebx		/* In case this is PIC.  */
+	subl	$36, %esp	/* Enough for args and to align stack.  */
+.LCFI2:
+
+#ifdef __PIC__
+	call	__x86.get_pc_thunk.bx
+	addl	$_GLOBAL_OFFSET_TABLE_, %ebx
+#endif
+
+	leal	8(%ebp), %eax	/* Set esp field in struct.  */
+	movl	%eax, -24(%ebp)
+
+#ifdef __PIC__
+	call	__go_get_closure@PLT
+#else
+	call	__go_get_closure
+#endif
+
+	movl	%eax, 4(%esp)
+
+	leal	-24(%ebp), %eax
+	movl	%eax, (%esp)
+
+#ifdef __PIC__
+	call	reflect.MakeFuncStubGo@PLT
+#else
+	call	reflect.MakeFuncStubGo
+#endif
+
+	/* Set return registers.  */
+
+	movl	-20(%ebp), %eax
+	fldl	-16(%ebp)
+
+#ifdef __SSE2__
+	/* In case we are compiling with -msseregparm.  This won't work
+	   correctly if only SSE1 is supported, but that seems unlikely.  */
+	movsd	-16(%ebp), %xmm0
+#endif
+
+	addl	$36, %esp
+	popl	%ebx
+.LCFI3:
+	popl	%ebp
+.LCFI4:
+	ret
+.LFE1:
+#ifdef __ELF__
+	.size	reflect.makeFuncStub, . - reflect.makeFuncStub
+#endif
+
+#ifdef __PIC__
+#ifdef HAVE_AS_COMDAT_GAS
+	.section	.text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat
+#else
+	/* Sun as needs a different syntax.  */
+	.section	.text.__x86.get_pc_thunk.bx%__x86.get_pc_thunk.bx,"ax",@progbits
+	.group		__x86.get_pc_thunk.bx,.text.__x86.get_pc_thunk.bx%__x86.get_pc_thunk.bx,#comdat
+#endif
+	.globl	__x86.get_pc_thunk.bx
+	.hidden	__x86.get_pc_thunk.bx
+#ifdef __ELF__
+	.type	__x86.get_pc_thunk.bx, @function
+#endif
+__x86.get_pc_thunk.bx:
+.LFB2:
+	movl	(%esp), %ebx
+	ret
+.LFE2:
+#ifdef __ELF__
+	.size	__x86.get_pc_thunk.bx, . - __x86.get_pc_thunk.bx
+#endif
+#endif
+
+#ifdef __ELF__
+#if defined __PIC__
+# if defined __sun__ && defined __svr4__
+/* 32-bit Solaris 2/x86 uses datarel encoding for PIC.  GNU ld before 2.22
+   doesn't correctly sort .eh_frame_hdr with mixed encodings, so match this.  */
+#  define FDE_ENCODING		0x30	/* datarel */
+#  define FDE_ENCODE(X)		X@GOTOFF
+# else
+#  define FDE_ENCODING		0x1b	/* pcrel sdata4 */
+#  if defined HAVE_AS_X86_PCREL
+#   define FDE_ENCODE(X)	X-.
+#  else
+#   define FDE_ENCODE(X)	X@rel
+#  endif
+# endif
+#else
+# define FDE_ENCODING		0	/* absolute */
+# define FDE_ENCODE(X)		X
+#endif
+
+	.section	.eh_frame,EH_FRAME_FLAGS,@progbits
+.Lframe1:
+	.long	.LECIE1-.LSCIE1	/* Length of Common Information Entry */
+.LSCIE1:
+	.long	0x0	/* CIE Identifier Tag */
+	.byte	0x1	/* CIE Version */
+	.ascii "zR\0"	/* CIE Augmentation */
+	.byte	0x1	/* .uleb128 0x1; CIE Code Alignment Factor */
+	.byte	0x7c	/* .sleb128 -4; CIE Data Alignment Factor */
+	.byte	0x8	/* CIE RA Column */
+	.byte	0x1	/* .uleb128 0x1; Augmentation size */
+	.byte	FDE_ENCODING
+	.byte	0xc	/* DW_CFA_def_cfa */
+	.byte	0x4	/* .uleb128 0x4 */
+	.byte	0x4	/* .uleb128 0x4 */
+	.byte	0x88	/* DW_CFA_offset, column 0x8 */
+	.byte	0x1	/* .uleb128 0x1 */
+	.align 4
+.LECIE1:
+.LSFDE1:
+	.long	.LEFDE1-.LASFDE1	/* FDE Length */
+.LASFDE1:
+	.long	.LASFDE1-.Lframe1	/* FDE CIE offset */
+	.long	FDE_ENCODE(.LFB1)	/* FDE initial location */
+	.long	.LFE1-.LFB1		/* FDE address range */
+	.byte	0x0	/* .uleb128 0x0; Augmentation size */
+	.byte	0x4	/* DW_CFA_advance_loc4 */
+	.long	.LCFI0-.LFB1
+	.byte	0xe	/* DW_CFA_def_cfa_offset */
+	.byte	0x8	/* .uleb128 0x8 */
+	.byte	0x85	/* DW_CFA_offset, column 0x5 */
+	.byte	0x2	/* .uleb128 0x2 */
+	.byte	0x4	/* DW_CFA_advance_loc4 */
+	.long	.LCFI1-.LCFI0
+	.byte	0xd	/* DW_CFA_def_cfa_register */
+	.byte	0x5	/* .uleb128 0x5 */
+	.byte	0x4	/* DW_CFA_advance_loc4 */
+	.long	.LCFI2-.LCFI1
+	.byte	0x83	/* .DW_CFA_offset, column 0x3 */
+	.byte	0x3	/* .uleb128 0x3 */
+	.byte	0x4	/* DW_CFA_advance_loc4 */
+	.long	.LCFI3-.LCFI2
+	.byte	0xc3	/* DW_CFA_restore, column 0x3 */
+	.byte	0x4	/* DW_CFA_advance_loc4 */
+	.long	.LCFI4-.LCFI3
+	.byte	0xc5	/* DW_CFA_restore, column 0x5 */
+	.byte	0xc	/* DW_CFA_def_cfa */
+	.byte	0x4	/* .uleb128 0x4 */
+	.byte	0x4	/* .uleb128 0x4 */
+	.align 4
+.LEFDE1:
+#ifdef __PIC__
+.LSFDE2:
+	.long	.LEFDE2-.LASFDE2	/* FDE Length */
+.LASFDE2:
+	.long	.LASFDE2-.Lframe1	/* FDE CIE offset */
+	.long	FDE_ENCODE(.LFB2)	/* FDE initial location */
+	.long	.LFE2-.LFB2		/* FDE address range */
+	.byte	0x0	/* .uleb128 0x0; Augmentation size */
+	.align 4
+.LEFDE2:
+#endif /* __PIC__ */
+#endif /* __ELF__ */
+
+#if defined(__ELF__) && defined(__linux__)
+	.section	.note.GNU-stack,"",@progbits
+	.section	.note.GNU-split-stack,"",@progbits
+	.section	.note.GNU-no-split-stack,"",@progbits
+#endif
diff --git a/libgo/go/reflect/makefunc_amd64.S b/libgo/go/reflect/makefunc_amd64.S
new file mode 100644
index 0000000..9d12f19
--- /dev/null
+++ b/libgo/go/reflect/makefunc_amd64.S
@@ -0,0 +1,162 @@
+# Copyright 2013 The Go Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+
+# MakeFunc amd64 assembly code.
+
+#include "config.h"
+
+	.global	reflect.makeFuncStub
+
+#ifdef __ELF__
+	.type	reflect.makeFuncStub,@function
+#endif
+
+reflect.makeFuncStub:
+.LFB1:
+
+	# Store all the parameter registers in a struct that looks
+	# like:
+	# struct {
+	#   rax uint64		// 0x0
+	#   rdi uint64		// 0x8
+	#   rsi uint64		// 0x10
+	#   rdx uint64		// 0x18
+	#   rcx uint64		// 0x20
+	#   r8 uint64		// 0x28
+	#   r9 uint64		// 0x30
+	#   rsp uint64		// 0x38 Pointer to arguments on stack.
+	#   xmm0 [2]uint64	// 0x40
+	#   xmm1 [2]uint64	// 0x50
+	#   xmm2 [2]uint64	// 0x60
+	#   xmm3 [2]uint64	// 0x70
+	#   xmm4 [2]uint64	// 0x80
+	#   xmm5 [2]uint64	// 0x90
+	#   xmm6 [2]uint64	// 0xa0
+	#   xmm7 [2]uint64	// 0xb0
+	# };
+
+	pushq	%rbp
+.LCFI0:
+	movq	%rsp, %rbp
+.LCFI1:
+
+	subq	$0xc0, %rsp		# Space for struct on stack.
+
+	movq	%rax, 0x0(%rsp)
+	movq	%rdi, 0x8(%rsp)
+	movq	%rsi, 0x10(%rsp)
+	movq	%rdx, 0x18(%rsp)
+	movq	%rcx, 0x20(%rsp)
+	movq	%r8, 0x28(%rsp)
+	movq	%r9, 0x30(%rsp)
+	leaq	16(%rbp), %rax
+	movq	%rax, 0x38(%rsp)
+	movdqa	%xmm0, 0x40(%rsp)
+	movdqa	%xmm1, 0x50(%rsp)
+	movdqa	%xmm2, 0x60(%rsp)
+	movdqa	%xmm3, 0x70(%rsp)
+	movdqa	%xmm4, 0x80(%rsp)
+	movdqa	%xmm5, 0x90(%rsp)
+	movdqa	%xmm6, 0xa0(%rsp)
+	movdqa	%xmm7, 0xb0(%rsp)
+
+	# Get function type.
+#ifdef __PIC__
+	call	__go_get_closure@PLT
+#else
+	call	__go_get_closure
+#endif
+	movq	%rax, %rsi
+
+	movq	%rsp, %rdi
+
+#ifdef __PIC__
+	call	reflect.MakeFuncStubGo@PLT
+#else
+	call	reflect.MakeFuncStubGo
+#endif
+
+	# The structure will be updated with any return values.  Load
+	# all possible return registers before returning to the caller.
+
+	movq	0x0(%rsp), %rax
+	movq	0x18(%rsp), %rdx
+	movq	0x8(%rsp), %rdi
+	movq	0x10(%rsp), %rsi
+	movdqa	0x40(%rsp), %xmm0
+	movdqa	0x50(%rsp), %xmm1
+
+	# long double values are returned on the floating point stack,
+	# but we don't worry about that since Go doesn't have a long
+	# double type.
+
+	leave
+.LCFI2:
+
+	ret
+.LFE1:
+
+#ifdef __ELF__
+	.size	reflect.makeFuncStub, . - reflect.makeFuncStub
+#endif
+
+#ifdef __ELF__
+#ifdef HAVE_AS_X86_64_UNWIND_SECTION_TYPE
+	.section	.eh_frame,"a",@unwind
+#else
+	.section	.eh_frame,"a",@progbits
+#endif
+.Lframe1:
+	.long	.LECIE1-.LSCIE1	/* Length of Common Information Entry */
+.LSCIE1:
+	.long	0x0		/* CIE Identifier Tag */
+	.byte	0x1		/* CIE Version */
+	.ascii "zR\0"		/* CIE Augmentation */
+	.uleb128 1		/* CIE Code Alignment Factor */
+	.sleb128 -8		/* CIE Data Alignment Factor */
+	.byte	0x10		/* CIE RA Column */
+	.uleb128 1		/* Augmentation size */
+	.byte	0x1b		/* FDE Encoding (pcrel sdata4) */
+	.byte	0xc		/* DW_CFA_def_cfa, %rsp offset 8 */
+	.uleb128 7
+	.uleb128 8
+	.byte	0x80+16		/* DW_CFA_offset, %rip offset 1*-8 */
+	.uleb128 1
+	.align 8
+.LECIE1:
+.LSFDE1:
+	.long	.LEFDE1-.LASFDE1	/* FDE Length */
+.LASFDE1:
+	.long	.LASFDE1-.Lframe1	/* FDE CIE offset */
+#if HAVE_AS_X86_PCREL
+	.long	.LFB1-.			/* FDE initial location */
+#else
+	.long	.LFB1@rel
+#endif
+	.long	.LFE1-.LFB1		/* FDE address range */
+	.uleb128 0x0			/* Augmentation size */
+	.byte	0x4			/* DW_CFA_advance_loc4 */
+	.long	.LCFI0-.LFB1
+	.byte	0xe			/* DW_CFA_def_cfa_offset */
+	.uleb128 16
+	.byte	0x86			/* DW_CFA_offset, column 0x6 */
+	.uleb128 2
+	.byte	0x4			/* DW_CFA_advance_loc4 */
+	.long	.LCFI1-.LCFI0
+	.byte	0xd			/* DW_CFA_def_cfa_register */
+	.uleb128 6
+	.byte	0x2			/* DW_CFA_advance_loc1 */
+	.byte	.LCFI2-.LCFI1
+	.byte	0xc			/* DW_CFA_def_cfa */
+	.uleb128 7
+	.uleb128 8
+	.align 8
+.LEFDE1:
+#endif /* __ELF__ */
+
+#if defined(__ELF__) && defined(__linux__)
+	.section	.note.GNU-stack,"",@progbits
+	.section	.note.GNU-split-stack,"",@progbits
+	.section	.note.GNU-no-split-stack,"",@progbits
+#endif
diff --git a/libgo/go/reflect/makefunc_dummy.c b/libgo/go/reflect/makefunc_dummy.c
new file mode 100644
index 0000000..aba48df
--- /dev/null
+++ b/libgo/go/reflect/makefunc_dummy.c
@@ -0,0 +1,12 @@
+// Copyright 2013 The Go Authors.  All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !amd64
+
+// Dummy function for processors without makefunc support.
+
+void makeFuncStub () __asm__ ("reflect.makeFuncStub");
+void makeFuncStub ()
+{
+}
diff --git a/libgo/go/reflect/makefuncgo_386.go b/libgo/go/reflect/makefuncgo_386.go
new file mode 100644
index 0000000..0fac1f4
--- /dev/null
+++ b/libgo/go/reflect/makefuncgo_386.go
@@ -0,0 +1,135 @@
+// Copyright 2013 The Go Authors.  All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// MakeFunc 386 implementation.
+
+package reflect
+
+import "unsafe"
+
+// The assembler stub will pass a pointer to this structure.  We
+// assume that no parameters are passed in registers--that is, we do
+// not support the -mregparm option.  On return we will set the
+// registers that might hold result values.
+type i386Regs struct {
+	esp uint32
+	eax uint32 // Value to return in %eax.
+	st0 uint64 // Value to return in %st(0).
+}
+
+// MakeFuncStubGo implements the 386 calling convention for MakeFunc.
+// This should not be called.  It is exported so that assembly code
+// can call it.
+
+func MakeFuncStubGo(regs *i386Regs, c *makeFuncImpl) {
+	ftyp := c.typ
+
+	// See if the result requires a struct.  If it does, the first
+	// parameter is a pointer to the struct.
+	retStruct := false
+	retEmpty := false
+	switch len(ftyp.out) {
+	case 0:
+		retEmpty = true
+	case 1:
+		if ftyp.out[0].size == 0 {
+			retEmpty = true
+		} else {
+			switch ftyp.out[0].Kind() {
+			case Complex64, Complex128, Array, Interface, Slice, String, Struct:
+				retStruct = true
+			}
+		}
+	default:
+		size := uintptr(0)
+		for _, typ := range ftyp.out {
+			size += typ.size
+		}
+		if size == 0 {
+			retEmpty = true
+		} else {
+			retStruct = true
+		}
+	}
+
+	in := make([]Value, 0, len(ftyp.in))
+	ap := uintptr(regs.esp)
+
+	var retPtr unsafe.Pointer
+	if retStruct {
+		retPtr = *(*unsafe.Pointer)(unsafe.Pointer(ap))
+		ap += ptrSize
+	}
+
+	for _, rt := range ftyp.in {
+		ap = align(ap, ptrSize)
+
+		// We have to copy the argument onto the heap in case
+		// the function hangs on the reflect.Value we pass it.
+		p := unsafe_New(rt)
+		memmove(p, unsafe.Pointer(ap), rt.size)
+
+		v := Value{rt, p, flag(rt.Kind()<<flagKindShift) | flagIndir}
+		in = append(in, v)
+		ap += rt.size
+	}
+
+	// Call the real function.
+
+	out := c.fn(in)
+
+	if len(out) != len(ftyp.out) {
+		panic("reflect: wrong return count from function created by MakeFunc")
+	}
+
+	for i, typ := range ftyp.out {
+		v := out[i]
+		if v.typ != typ {
+			panic("reflect: function created by MakeFunc using " + funcName(c.fn) +
+				" returned wrong type: have " +
+				out[i].typ.String() + " for " + typ.String())
+		}
+		if v.flag&flagRO != 0 {
+			panic("reflect: function created by MakeFunc using " + funcName(c.fn) +
+				" returned value obtained from unexported field")
+		}
+	}
+
+	if retEmpty {
+		return
+	}
+
+	if retStruct {
+		off := uintptr(0)
+		for i, typ := range ftyp.out {
+			v := out[i]
+			off = align(off, uintptr(typ.fieldAlign))
+			addr := unsafe.Pointer(uintptr(retPtr) + off)
+			if v.flag&flagIndir == 0 && (v.kind() == Ptr || v.kind() == UnsafePointer) {
+				storeIword(addr, iword(v.val), typ.size)
+			} else {
+				memmove(addr, v.val, typ.size)
+			}
+			off += typ.size
+		}
+		regs.eax = uint32(uintptr(retPtr))
+		return
+	}
+
+	if len(ftyp.out) != 1 {
+		panic("inconsistency")
+	}
+
+	v := out[0]
+	w := v.iword()
+	if v.Kind() != Ptr && v.Kind() != UnsafePointer {
+		w = loadIword(unsafe.Pointer(w), v.typ.size)
+	}
+	switch v.Kind() {
+	case Float32, Float64:
+		regs.st0 = uint64(uintptr(w))
+	default:
+		regs.eax = uint32(uintptr(w))
+	}
+}
diff --git a/libgo/go/reflect/makefuncgo_amd64.go b/libgo/go/reflect/makefuncgo_amd64.go
new file mode 100644
index 0000000..ecc50a4
--- /dev/null
+++ b/libgo/go/reflect/makefuncgo_amd64.go
@@ -0,0 +1,493 @@
+// Copyright 2013 The Go Authors.  All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// MakeFunc amd64 implementation.
+
+package reflect
+
+import "unsafe"
+
+// The assembler stub will pass a pointer to this structure.
+// This will come in holding all the registers that might hold
+// function parameters.  On return we will set the registers that
+// might hold result values.
+type amd64Regs struct {
+	rax  uint64
+	rdi  uint64
+	rsi  uint64
+	rdx  uint64
+	rcx  uint64
+	r8   uint64
+	r9   uint64
+	rsp  uint64
+	xmm0 [2]uint64
+	xmm1 [2]uint64
+	xmm2 [2]uint64
+	xmm3 [2]uint64
+	xmm4 [2]uint64
+	xmm5 [2]uint64
+	xmm6 [2]uint64
+	xmm7 [2]uint64
+}
+
+// Argument classifications.  The amd64 ELF ABI uses several more, but
+// these are the only ones that arise for Go types.
+type amd64Class int
+
+const (
+	amd64Integer amd64Class = iota
+	amd64SSE
+	amd64NoClass
+	amd64Memory
+)
+
+// amd64Classify returns the one or two register classes needed to
+// pass the value of type.  Go types never need more than two
+// registers.  amd64Memory means the value is stored in memory.
+// amd64NoClass means the register is not used.
+func amd64Classify(typ *rtype) (amd64Class, amd64Class) {
+	switch typ.Kind() {
+	default:
+		panic("internal error--unknown kind in amd64Classify")
+
+	case Bool, Int, Int8, Int16, Int32, Int64,
+		Uint, Uint8, Uint16, Uint32, Uint64,
+		Uintptr, Chan, Func, Map, Ptr, UnsafePointer:
+
+		return amd64Integer, amd64NoClass
+
+	case Float32, Float64, Complex64:
+		return amd64SSE, amd64NoClass
+
+	case Complex128:
+		return amd64SSE, amd64SSE
+
+	case Array:
+		if typ.size == 0 {
+			return amd64NoClass, amd64NoClass
+		} else if typ.size > 16 {
+			return amd64Memory, amd64NoClass
+		}
+		atyp := (*arrayType)(unsafe.Pointer(typ))
+		eclass1, eclass2 := amd64Classify(atyp.elem)
+		if eclass1 == amd64Memory {
+			return amd64Memory, amd64NoClass
+		}
+		if eclass2 == amd64NoClass && typ.size > 8 {
+			eclass2 = eclass1
+		}
+		return eclass1, eclass2
+
+	case Interface:
+		return amd64Integer, amd64Integer
+
+	case Slice:
+		return amd64Memory, amd64NoClass
+
+	case String:
+		return amd64Integer, amd64Integer
+
+	case Struct:
+		if typ.size == 0 {
+			return amd64NoClass, amd64NoClass
+		} else if typ.size > 16 {
+			return amd64Memory, amd64NoClass
+		}
+		var first, second amd64Class
+		f := amd64NoClass
+		onFirst := true
+		styp := (*structType)(unsafe.Pointer(typ))
+		for _, field := range styp.fields {
+			if onFirst && field.offset >= 8 {
+				first = f
+				f = amd64NoClass
+				onFirst = false
+			}
+			fclass1, fclass2 := amd64Classify(field.typ)
+			f = amd64MergeClasses(f, fclass1)
+			if fclass2 != amd64NoClass {
+				if !onFirst {
+					panic("amd64Classify inconsistent")
+				}
+				first = f
+				f = fclass2
+				onFirst = false
+			}
+		}
+		if onFirst {
+			first = f
+			second = amd64NoClass
+		} else {
+			second = f
+		}
+		if first == amd64Memory || second == amd64Memory {
+			return amd64Memory, amd64NoClass
+		}
+		return first, second
+	}
+}
+
+// amd64MergeClasses merges two register classes as described in the
+// amd64 ELF ABI.
+func amd64MergeClasses(c1, c2 amd64Class) amd64Class {
+	switch {
+	case c1 == c2:
+		return c1
+	case c1 == amd64NoClass:
+		return c2
+	case c2 == amd64NoClass:
+		return c1
+	case c1 == amd64Memory || c2 == amd64Memory:
+		return amd64Memory
+	case c1 == amd64Integer || c2 == amd64Integer:
+		return amd64Integer
+	default:
+		return amd64SSE
+	}
+}
+
+// MakeFuncStubGo implements the amd64 calling convention for
+// MakeFunc.  This should not be called.  It is exported so that
+// assembly code can call it.
+
+func MakeFuncStubGo(regs *amd64Regs, c *makeFuncImpl) {
+	ftyp := c.typ
+
+	// See if the result requires a struct.  If it does, the first
+	// parameter is a pointer to the struct.
+	var ret1, ret2 amd64Class
+	switch len(ftyp.out) {
+	case 0:
+		ret1, ret2 = amd64NoClass, amd64NoClass
+	case 1:
+		ret1, ret2 = amd64Classify(ftyp.out[0])
+	default:
+		off := uintptr(0)
+		f := amd64NoClass
+		onFirst := true
+		for _, rt := range ftyp.out {
+			off = align(off, uintptr(rt.fieldAlign))
+
+			if onFirst && off >= 8 {
+				ret1 = f
+				f = amd64NoClass
+				onFirst = false
+			}
+
+			off += rt.size
+			if off > 16 {
+				break
+			}
+
+			fclass1, fclass2 := amd64Classify(rt)
+			f = amd64MergeClasses(f, fclass1)
+			if fclass2 != amd64NoClass {
+				if !onFirst {
+					panic("amd64Classify inconsistent")
+				}
+				ret1 = f
+				f = fclass2
+				onFirst = false
+			}
+		}
+		if off > 16 {
+			ret1, ret2 = amd64Memory, amd64NoClass
+		} else {
+			if onFirst {
+				ret1, ret2 = f, amd64NoClass
+			} else {
+				ret2 = f
+			}
+		}
+		if ret1 == amd64Memory || ret2 == amd64Memory {
+			ret1, ret2 = amd64Memory, amd64NoClass
+		}
+	}
+
+	in := make([]Value, 0, len(ftyp.in))
+	intreg := 0
+	ssereg := 0
+	ap := uintptr(regs.rsp)
+
+	maxIntregs := 6 // When we support Windows, this would be 4.
+	maxSSEregs := 8
+
+	if ret1 == amd64Memory {
+		// We are returning a value in memory, which means
+		// that the first argument is a hidden parameter
+		// pointing to that return area.
+		intreg++
+	}
+
+argloop:
+	for _, rt := range ftyp.in {
+		c1, c2 := amd64Classify(rt)
+
+		fl := flag(rt.Kind()) << flagKindShift
+		if c2 == amd64NoClass {
+
+			// Argument is passed in a single register or
+			// in memory.
+
+			switch c1 {
+			case amd64NoClass:
+				v := Value{rt, nil, fl | flagIndir}
+				in = append(in, v)
+				continue argloop
+			case amd64Integer:
+				if intreg < maxIntregs {
+					reg := amd64IntregVal(regs, intreg)
+					iw := unsafe.Pointer(reg)
+					if k := rt.Kind(); k != Ptr && k != UnsafePointer {
+						iw = unsafe.Pointer(&reg)
+						fl |= flagIndir
+					}
+					v := Value{rt, iw, fl}
+					in = append(in, v)
+					intreg++
+					continue argloop
+				}
+			case amd64SSE:
+				if ssereg < maxSSEregs {
+					reg := amd64SSEregVal(regs, ssereg)
+					v := Value{rt, unsafe.Pointer(&reg), fl | flagIndir}
+					in = append(in, v)
+					ssereg++
+					continue argloop
+				}
+			}
+
+			in, ap = amd64Memarg(in, ap, rt)
+			continue argloop
+		}
+
+		// Argument is passed in two registers.
+
+		nintregs := 0
+		nsseregs := 0
+		switch c1 {
+		case amd64Integer:
+			nintregs++
+		case amd64SSE:
+			nsseregs++
+		default:
+			panic("inconsistent")
+		}
+		switch c2 {
+		case amd64Integer:
+			nintregs++
+		case amd64SSE:
+			nsseregs++
+		default:
+			panic("inconsistent")
+		}
+
+		// If the whole argument does not fit in registers, it
+		// is passed in memory.
+
+		if intreg+nintregs > maxIntregs || ssereg+nsseregs > maxSSEregs {
+			in, ap = amd64Memarg(in, ap, rt)
+			continue argloop
+		}
+
+		var word1, word2 uintptr
+		switch c1 {
+		case amd64Integer:
+			word1 = amd64IntregVal(regs, intreg)
+			intreg++
+		case amd64SSE:
+			word1 = amd64SSEregVal(regs, ssereg)
+			ssereg++
+		}
+		switch c2 {
+		case amd64Integer:
+			word2 = amd64IntregVal(regs, intreg)
+			intreg++
+		case amd64SSE:
+			word2 = amd64SSEregVal(regs, ssereg)
+			ssereg++
+		}
+
+		p := unsafe_New(rt)
+		*(*uintptr)(p) = word1
+		*(*uintptr)(unsafe.Pointer(uintptr(p) + ptrSize)) = word2
+		v := Value{rt, p, fl | flagIndir}
+		in = append(in, v)
+	}
+
+	// All the real arguments have been found and turned into
+	// Value's.  Call the real function.
+
+	out := c.fn(in)
+
+	if len(out) != len(ftyp.out) {
+		panic("reflect: wrong return count from function created by MakeFunc")
+	}
+
+	for i, typ := range ftyp.out {
+		v := out[i]
+		if v.typ != typ {
+			panic("reflect: function created by MakeFunc using " + funcName(c.fn) +
+				" returned wrong type: have " +
+				out[i].typ.String() + " for " + typ.String())
+		}
+		if v.flag&flagRO != 0 {
+			panic("reflect: function created by MakeFunc using " + funcName(c.fn) +
+				" returned value obtained from unexported field")
+		}
+	}
+
+	if ret1 == amd64NoClass {
+		return
+	}
+
+	if ret1 == amd64Memory {
+		// The address of the memory area was passed as a
+		// hidden parameter in %rdi.
+		ptr := unsafe.Pointer(uintptr(regs.rdi))
+		off := uintptr(0)
+		for i, typ := range ftyp.out {
+			v := out[i]
+			off = align(off, uintptr(typ.fieldAlign))
+			addr := unsafe.Pointer(uintptr(ptr) + off)
+			if v.flag&flagIndir == 0 && (v.kind() == Ptr || v.kind() == UnsafePointer) {
+				storeIword(addr, iword(v.val), typ.size)
+			} else {
+				memmove(addr, v.val, typ.size)
+			}
+			off += typ.size
+		}
+		return
+	}
+
+	if len(out) == 1 && ret2 == amd64NoClass {
+		v := out[0]
+		w := v.iword()
+		if v.Kind() != Ptr && v.Kind() != UnsafePointer {
+			w = loadIword(unsafe.Pointer(w), v.typ.size)
+		}
+		switch ret1 {
+		case amd64Integer:
+			regs.rax = uint64(uintptr(w))
+		case amd64SSE:
+			regs.xmm0[0] = uint64(uintptr(w))
+			regs.xmm0[1] = 0
+		default:
+			panic("inconsistency")
+		}
+		return
+	}
+
+	var buf [2]unsafe.Pointer
+	ptr := unsafe.Pointer(&buf[0])
+	off := uintptr(0)
+	for i, typ := range ftyp.out {
+		v := out[i]
+		off = align(off, uintptr(typ.fieldAlign))
+		addr := unsafe.Pointer(uintptr(ptr) + off)
+		if v.flag&flagIndir == 0 && (v.kind() == Ptr || v.kind() == UnsafePointer) {
+			storeIword(addr, iword(v.val), typ.size)
+		} else {
+			memmove(addr, v.val, typ.size)
+		}
+		off += uintptr(typ.size)
+	}
+
+	switch ret1 {
+	case amd64Integer:
+		regs.rax = *(*uint64)(unsafe.Pointer(&buf[0]))
+	case amd64SSE:
+		regs.xmm0[0] = *(*uint64)(unsafe.Pointer(&buf[0]))
+		regs.xmm0[1] = 0
+	default:
+		panic("inconsistency")
+	}
+
+	switch ret2 {
+	case amd64Integer:
+		reg := *(*uint64)(unsafe.Pointer(&buf[1]))
+		if ret1 == amd64Integer {
+			regs.rdx = reg
+		} else {
+			regs.rax = reg
+		}
+	case amd64SSE:
+		reg := *(*uint64)(unsafe.Pointer(&buf[1]))
+		if ret1 == amd64Integer {
+			regs.xmm0[0] = reg
+			regs.xmm0[1] = 0
+		} else {
+			regs.xmm1[0] = reg
+			regs.xmm1[1] = 0
+		}
+	case amd64NoClass:
+	default:
+		panic("inconsistency")
+	}
+}
+
+// The amd64Memarg function adds an argument passed in memory.
+func amd64Memarg(in []Value, ap uintptr, rt *rtype) ([]Value, uintptr) {
+	ap = align(ap, ptrSize)
+	ap = align(ap, uintptr(rt.align))
+
+	// We have to copy the argument onto the heap in case the
+	// function hangs onto the reflect.Value we pass it.
+	p := unsafe_New(rt)
+	memmove(p, unsafe.Pointer(ap), rt.size)
+
+	v := Value{rt, p, flag(rt.Kind()<<flagKindShift) | flagIndir}
+	in = append(in, v)
+	ap += rt.size
+	return in, ap
+}
+
+// The amd64IntregVal function returns the value of integer register i.
+func amd64IntregVal(regs *amd64Regs, i int) uintptr {
+	var r uint64
+	switch i {
+	case 0:
+		r = regs.rdi
+	case 1:
+		r = regs.rsi
+	case 2:
+		r = regs.rdx
+	case 3:
+		r = regs.rcx
+	case 4:
+		r = regs.r8
+	case 5:
+		r = regs.r9
+	default:
+		panic("amd64IntregVal: bad index")
+	}
+	return uintptr(r)
+}
+
+// The amd64SSEregVal function returns the value of SSE register i.
+// Note that although SSE registers can hold two uinptr's, for the
+// types we use in Go we only ever use the least significant one.  The
+// most significant one would only be used for 128 bit types.
+func amd64SSEregVal(regs *amd64Regs, i int) uintptr {
+	var r uint64
+	switch i {
+	case 0:
+		r = regs.xmm0[0]
+	case 1:
+		r = regs.xmm1[0]
+	case 2:
+		r = regs.xmm2[0]
+	case 3:
+		r = regs.xmm3[0]
+	case 4:
+		r = regs.xmm4[0]
+	case 5:
+		r = regs.xmm5[0]
+	case 6:
+		r = regs.xmm6[0]
+	case 7:
+		r = regs.xmm7[0]
+	}
+	return uintptr(r)
+}
diff --git a/libgo/go/reflect/value.go b/libgo/go/reflect/value.go
index 45a0858..b199f70 100644
--- a/libgo/go/reflect/value.go
+++ b/libgo/go/reflect/value.go
@@ -433,7 +433,7 @@
 	if v.flag&flagMethod != 0 {
 		nin++
 	}
-	firstPointer := len(in) > 0 && Kind(t.In(0).(*rtype).kind) != Ptr && v.flag&flagMethod == 0 && isMethod(v.typ)
+	firstPointer := len(in) > 0 && t.In(0).Kind() != Ptr && v.flag&flagMethod == 0 && isMethod(v.typ)
 	params := make([]unsafe.Pointer, nin)
 	off := 0
 	if v.flag&flagMethod != 0 {
@@ -497,8 +497,10 @@
 	sawRet := false
 	for i, c := range s {
 		if c == '(' {
+			if parens == 0 {
+				params++
+			}
 			parens++
-			params++
 		} else if c == ')' {
 			parens--
 		} else if parens == 0 && c == ' ' && s[i+1] != '(' && !sawRet {
@@ -509,75 +511,6 @@
 	return params > 2
 }
 
-// callReflect is the call implementation used by a function
-// returned by MakeFunc. In many ways it is the opposite of the
-// method Value.call above. The method above converts a call using Values
-// into a call of a function with a concrete argument frame, while
-// callReflect converts a call of a function with a concrete argument
-// frame into a call using Values.
-// It is in this file so that it can be next to the call method above.
-// The remainder of the MakeFunc implementation is in makefunc.go.
-func callReflect(ctxt *makeFuncImpl, frame unsafe.Pointer) {
-	ftyp := ctxt.typ
-	f := ctxt.fn
-
-	// Copy argument frame into Values.
-	ptr := frame
-	off := uintptr(0)
-	in := make([]Value, 0, len(ftyp.in))
-	for _, arg := range ftyp.in {
-		typ := arg
-		off += -off & uintptr(typ.align-1)
-		v := Value{typ, nil, flag(typ.Kind()) << flagKindShift}
-		if typ.size <= ptrSize {
-			// value fits in word.
-			v.val = unsafe.Pointer(loadIword(unsafe.Pointer(uintptr(ptr)+off), typ.size))
-		} else {
-			// value does not fit in word.
-			// Must make a copy, because f might keep a reference to it,
-			// and we cannot let f keep a reference to the stack frame
-			// after this function returns, not even a read-only reference.
-			v.val = unsafe_New(typ)
-			memmove(v.val, unsafe.Pointer(uintptr(ptr)+off), typ.size)
-			v.flag |= flagIndir
-		}
-		in = append(in, v)
-		off += typ.size
-	}
-
-	// Call underlying function.
-	out := f(in)
-	if len(out) != len(ftyp.out) {
-		panic("reflect: wrong return count from function created by MakeFunc")
-	}
-
-	// Copy results back into argument frame.
-	if len(ftyp.out) > 0 {
-		off += -off & (ptrSize - 1)
-		for i, arg := range ftyp.out {
-			typ := arg
-			v := out[i]
-			if v.typ != typ {
-				panic("reflect: function created by MakeFunc using " + funcName(f) +
-					" returned wrong type: have " +
-					out[i].typ.String() + " for " + typ.String())
-			}
-			if v.flag&flagRO != 0 {
-				panic("reflect: function created by MakeFunc using " + funcName(f) +
-					" returned value obtained from unexported field")
-			}
-			off += -off & uintptr(typ.align-1)
-			addr := unsafe.Pointer(uintptr(ptr) + off)
-			if v.flag&flagIndir == 0 {
-				storeIword(addr, iword(v.val), typ.size)
-			} else {
-				memmove(addr, v.val, typ.size)
-			}
-			off += typ.size
-		}
-	}
-}
-
 // methodReceiver returns information about the receiver
 // described by v. The Value v may or may not have the
 // flagMethod bit set, so the kind cached in v.flag should
@@ -611,7 +544,13 @@
 		}
 		fn = unsafe.Pointer(&m.tfn)
 		t = m.mtyp
-		rcvr = v.iword()
+		// Can't call iword here, because it checks v.kind,
+		// and that is always Func.
+		if v.flag&flagIndir != 0 && (v.typ.Kind() == Ptr || v.typ.Kind() == UnsafePointer) {
+			rcvr = loadIword(v.val, v.typ.size)
+		} else {
+			rcvr = iword(v.val)
+		}
 	}
 	return
 }
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go
index 79de2f3..60eecd9 100644
--- a/libgo/go/syscall/libcall_linux.go
+++ b/libgo/go/syscall/libcall_linux.go
@@ -190,6 +190,9 @@
 //sys	Adjtimex(buf *Timex) (state int, err error)
 //adjtimex(buf *Timex) _C_int
 
+//sysnb	Dup3(oldfd int, newfd int, flags int) (err error)
+//dup3(oldfd _C_int, newfd _C_int, flags _C_int) _C_int
+
 //sys	Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
 //faccessat(dirfd _C_int, pathname *byte, mode _C_int, flags _C_int) _C_int
 
@@ -268,6 +271,9 @@
 	return origlen - len(buf), count, names
 }
 
+//sys	Getxattr(path string, attr string, dest []byte) (sz int, err error)
+//getxattr(path *byte, attr *byte, buf *byte, count Size_t) Ssize_t
+
 //sys	InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error)
 //inotify_add_watch(fd _C_int, pathname *byte, mask uint32) _C_int
 
@@ -283,6 +289,9 @@
 //sys	Klogctl(typ int, buf []byte) (n int, err error)
 //klogctl(typ _C_int, bufp *byte, len _C_int) _C_int
 
+//sys	Listxattr(path string, dest []byte) (sz int, err error)
+//listxattr(path *byte, list *byte, size Size_t) Ssize_t
+
 //sys	Mkdirat(dirfd int, path string, mode uint32) (err error)
 //mkdirat(dirfd _C_int, path *byte, mode Mode_t) _C_int
 
@@ -305,6 +314,9 @@
 //sys	PivotRoot(newroot string, putold string) (err error)
 //pivot_root(newroot *byte, putold *byte) _C_int
 
+//sys	Removexattr(path string, attr string) (err error)
+//removexattr(path *byte, name *byte) _C_int
+
 //sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
 //renameat(olddirfd _C_int, oldpath *byte, newdirfd _C_int, newpath *byte) _C_int
 
@@ -338,6 +350,9 @@
 //sysnb	Setresuid(ruid int, eguid int, suid int) (err error)
 //setresuid(ruid Uid_t, euid Uid_t, suid Uid_t) _C_int
 
+//sys	Setxattr(path string, attr string, data []byte, flags int) (err error)
+//setxattr(path *byte, name *byte, value *byte, size Size_t, flags _C_int) _C_int
+
 //sys	splice(rfd int, roff *_loff_t, wfd int, woff *_loff_t, len int, flags int) (n int64, err error)
 //splice(rfd _C_int, roff *_loff_t, wfd _C_int, woff *_loff_t, len Size_t, flags _C_uint) Ssize_t
 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
diff --git a/libgo/go/syscall/libcall_posix.go b/libgo/go/syscall/libcall_posix.go
index 1e7823b..91ff59b 100644
--- a/libgo/go/syscall/libcall_posix.go
+++ b/libgo/go/syscall/libcall_posix.go
@@ -238,6 +238,9 @@
 //sysnb	Getppid() (ppid int)
 //getppid() Pid_t
 
+//sys Getpriority(which int, who int) (prio int, err error)
+//getpriority(which _C_int, who _C_int) _C_int
+
 //sysnb	Getrlimit(resource int, rlim *Rlimit) (err error)
 //getrlimit(resource _C_int, rlim *Rlimit) _C_int
 
@@ -307,6 +310,9 @@
 //sysnb	Setpgid(pid int, pgid int) (err error)
 //setpgid(pid Pid_t, pgid Pid_t) _C_int
 
+//sys Setpriority(which int, who int, prio int) (err error)
+//setpriority(which _C_int, who _C_int, prio _C_int) _C_int
+
 //sysnb	Setreuid(ruid int, euid int) (err error)
 //setreuid(ruid Uid_t, euid Uid_t) _C_int
 
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
index 11bcb25..71c3286 100755
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -1035,6 +1035,10 @@
 grep '^const _LOCK_' gen-sysinfo.go |
     sed -e 's/^\(const \)_\(LOCK_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
 
+# The PRIO constants.
+grep '^const _PRIO_' gen-sysinfo.go | \
+  sed -e 's/^\(const \)_\(PRIO_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
+
 # The GNU/Linux LINUX_REBOOT flags.
 grep '^const _LINUX_REBOOT_' gen-sysinfo.go |
     sed -e 's/^\(const \)_\(LINUX_REBOOT_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
diff --git a/libgo/runtime/go-append.c b/libgo/runtime/go-append.c
index 12fe876..8d5dee2 100644
--- a/libgo/runtime/go-append.c
+++ b/libgo/runtime/go-append.c
@@ -24,24 +24,24 @@
 	     uintptr_t element_size)
 {
   uintptr_t ucount;
-  int count;
+  intgo count;
 
   if (bvalues == NULL || bcount == 0)
     return a;
 
   ucount = (uintptr_t) a.__count + bcount;
-  count = (int) ucount;
+  count = (intgo) ucount;
   if ((uintptr_t) count != ucount || count <= a.__count)
     runtime_panicstring ("append: slice overflow");
 
   if (count > a.__capacity)
     {
-      int m;
+      intgo m;
       void *n;
 
       m = a.__capacity;
-      if (m == 0)
-	m = (int) bcount;
+      if (m + m < count)
+	m = count;
       else
 	{
 	  do
@@ -54,7 +54,7 @@
 	  while (m < count);
 	}
 
-      if ((uintptr) m > MaxMem / element_size)
+      if (element_size > 0 && (uintptr) m > MaxMem / element_size)
 	runtime_panicstring ("growslice: cap out of range");
 
       n = __go_alloc (m * element_size);
diff --git a/libgo/runtime/go-callers.c b/libgo/runtime/go-callers.c
index dd1cf79..291dfd0 100644
--- a/libgo/runtime/go-callers.c
+++ b/libgo/runtime/go-callers.c
@@ -53,6 +53,21 @@
 	return 0;
     }
 
+  /* Skip thunks and recover functions.  There is no equivalent to
+     these functions in the gc toolchain, so returning them here means
+     significantly different results for runtime.Caller(N).  */
+  if (function != NULL)
+    {
+      const char *p;
+
+      p = __builtin_strchr (function, '.');
+      if (p != NULL && __builtin_strncmp (p + 1, "$thunk", 6) == 0)
+	return 0;
+      p = __builtin_strrchr (function, '$');
+      if (p != NULL && __builtin_strcmp(p, "$recover") == 0)
+	return 0;
+    }
+
   if (arg->skip > 0)
     {
       --arg->skip;
diff --git a/libgo/runtime/go-cdiv.c b/libgo/runtime/go-cdiv.c
new file mode 100644
index 0000000..0a81e45
--- /dev/null
+++ b/libgo/runtime/go-cdiv.c
@@ -0,0 +1,46 @@
+/* go-cdiv.c -- complex division routines
+
+   Copyright 2013 The Go Authors. All rights reserved.
+   Use of this source code is governed by a BSD-style
+   license that can be found in the LICENSE file.  */
+
+/* Calls to these functions are generated by the Go frontend for
+   division of complex64 or complex128.  We use these because Go's
+   complex division expects slightly different results from the GCC
+   default.  When dividing NaN+1.0i / 0+0i, Go expects NaN+NaNi but
+   GCC generates NaN+Infi.  NaN+Infi seems wrong seems the rules of
+   C99 Annex G specify that if either side of a complex number is Inf,
+   the the whole number is Inf, but an operation involving NaN ought
+   to result in NaN, not Inf.  */
+
+__complex float
+__go_complex64_div (__complex float a, __complex float b)
+{
+  if (__builtin_expect (b == 0+0i, 0))
+    {
+      if (!__builtin_isinff (__real__ a)
+	  && !__builtin_isinff (__imag__ a)
+	  && (__builtin_isnanf (__real__ a) || __builtin_isnanf (__imag__ a)))
+	{
+	  /* Pass "1" to nanf to match math/bits.go.  */
+	  return __builtin_nanf("1") + __builtin_nanf("1")*1i;
+	}
+    }
+  return a / b;
+}
+
+__complex double
+__go_complex128_div (__complex double a, __complex double b)
+{
+  if (__builtin_expect (b == 0+0i, 0))
+    {
+      if (!__builtin_isinf (__real__ a)
+	  && !__builtin_isinf (__imag__ a)
+	  && (__builtin_isnan (__real__ a) || __builtin_isnan (__imag__ a)))
+	{
+	  /* Pass "1" to nan to match math/bits.go.  */
+	  return __builtin_nan("1") + __builtin_nan("1")*1i;
+	}
+    }
+  return a / b;
+}
diff --git a/libgo/runtime/go-make-slice.c b/libgo/runtime/go-make-slice.c
index 591ab37..f08cb01 100644
--- a/libgo/runtime/go-make-slice.c
+++ b/libgo/runtime/go-make-slice.c
@@ -34,7 +34,10 @@
   std = (const struct __go_slice_type *) td;
 
   ilen = (intgo) len;
-  if (ilen < 0 || (uintptr_t) ilen != len)
+  if (ilen < 0
+      || (uintptr_t) ilen != len
+      || (std->__element_type->__size > 0
+	  && len > MaxMem / std->__element_type->__size))
     runtime_panicstring ("makeslice: len out of range");
 
   icap = (intgo) cap;
diff --git a/libgo/runtime/go-nosys.c b/libgo/runtime/go-nosys.c
index 3ab5ea2..0a94de0 100644
--- a/libgo/runtime/go-nosys.c
+++ b/libgo/runtime/go-nosys.c
@@ -43,6 +43,17 @@
 }
 #endif
 
+#ifndef HAVE_DUP3
+int
+dup3 (int oldfd __attribute__ ((unused)),
+      int newfd __attribute__ ((unused)),
+      int flags __attribute__ ((unused)))
+{
+  errno = ENOSYS;
+  return -1;
+}
+#endif
+
 #ifndef HAVE_EPOLL_CREATE1
 int
 epoll_create1 (int flags __attribute__ ((unused)))
@@ -112,6 +123,18 @@
 }
 #endif
 
+#ifndef HAVE_GETXATTR
+ssize_t
+getxattr (const char *path __attribute__ ((unused)),
+	  const char *name __attribute__ ((unused)),
+	  void *value __attribute__ ((unused)),
+	  size_t size __attribute__ ((unused)))
+{
+  errno = ENOSYS;
+  return -1;
+}
+#endif
+
 #ifndef HAVE_INOTIFY_ADD_WATCH
 int
 inotify_add_watch (int fd __attribute__ ((unused)),
@@ -151,6 +174,17 @@
 }
 #endif
 
+#ifndef HAVE_LISTXATTR
+ssize_t
+listxattr (const char *path __attribute__ ((unused)),
+	   char *list __attribute__ ((unused)),
+	   size_t size __attribute__ ((unused)))
+{
+  errno = ENOSYS;
+  return -1;
+}
+#endif
+
 #ifndef HAVE_MKDIRAT
 int
 mkdirat (int dirfd __attribute__ ((unused)),
@@ -196,6 +230,16 @@
 }
 #endif
 
+#ifndef HAVE_REMOVEXATTR
+int
+removexattr (const char *path __attribute__ ((unused)),
+	     const char *name __attribute__ ((unused)))
+{
+  errno = ENOSYS;
+  return -1;
+}
+#endif
+
 #ifndef HAVE_RENAMEAT
 int
 renameat (int olddirfd __attribute__ ((unused)),
@@ -208,6 +252,19 @@
 }
 #endif
 
+#ifndef HAVE_SETXATTR
+int
+setxattr (const char *path __attribute__ ((unused)),
+	  const char *name __attribute__ ((unused)),
+	  const void *value __attribute__ ((unused)),
+	  size_t size __attribute__ ((unused)),
+	  int flags __attribute__ ((unused)))
+{
+  errno = ENOSYS;
+  return -1;
+}
+#endif
+
 #ifndef HAVE_SPLICE
 int
 splice (int fd __attribute__ ((unused)),
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
index 9771b71..23a94db 100644
--- a/libgo/runtime/go-signal.c
+++ b/libgo/runtime/go-signal.c
@@ -399,6 +399,9 @@
 {
   G *gp;
   M *mp;
+#ifdef USING_SPLIT_STACK
+  void *stack_context[10];
+#endif
 
   /* We are now running on the stack registered via sigaltstack.
      (Actually there is a small span of time between runtime_siginit
@@ -409,7 +412,7 @@
   if (gp != NULL)
     {
 #ifdef USING_SPLIT_STACK
-      __splitstack_getcontext (&gp->stack_context[0]);
+      __splitstack_getcontext (&stack_context[0]);
 #endif
     }
 
@@ -432,7 +435,7 @@
   if (gp != NULL)
     {
 #ifdef USING_SPLIT_STACK
-      __splitstack_setcontext (&gp->stack_context[0]);
+      __splitstack_setcontext (&stack_context[0]);
 #endif
     }
 }
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 84f8cdf..7a377b7 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,18 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
+2013-10-09  Jakub Jelinek  <jakub@redhat.com>
+
+	* parallel.c (GOMP_parallel_end): Remember team->nthreads and call
+	gomp_team_end before adjusting gomp_remaining_threads_count, increment
+	gomp_remaining_threads_count instead of decrementing it again.
+	* testsuite/libgomp.c/thread-limit-1.c: New test.
+
+2013-09-19  Jakub Jelinek  <jakub@redhat.com>
+
+	* testsuite/libgomp.c/sections-2.c: New test.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/libgomp/parallel.c b/libgomp/parallel.c
index 4573511..2d5250a 100644
--- a/libgomp/parallel.c
+++ b/libgomp/parallel.c
@@ -115,19 +115,22 @@
     {
       struct gomp_thread *thr = gomp_thread ();
       struct gomp_team *team = thr->ts.team;
-      if (team && team->nthreads > 1)
+      unsigned int nthreads = team ? team->nthreads : 1;
+      gomp_team_end ();
+      if (nthreads > 1)
 	{
 #ifdef HAVE_SYNC_BUILTINS
 	  __sync_fetch_and_add (&gomp_remaining_threads_count,
-				1UL - team->nthreads);
+				nthreads - 1);
 #else
 	  gomp_mutex_lock (&gomp_remaining_threads_lock);
-	  gomp_remaining_threads_count -= team->nthreads - 1;
+	  gomp_remaining_threads_count += nthreads - 1;
 	  gomp_mutex_unlock (&gomp_remaining_threads_lock);
 #endif
 	}
     }
-  gomp_team_end ();
+  else
+    gomp_team_end ();
 }
 
 
diff --git a/libgomp/testsuite/libgomp.c/sections-2.c b/libgomp/testsuite/libgomp.c/sections-2.c
new file mode 100644
index 0000000..38216be
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/sections-2.c
@@ -0,0 +1,29 @@
+/* { dg-do run } */
+
+#include <stdlib.h>
+#include <unistd.h>
+
+__attribute__((noinline, noclone, noreturn))
+void
+foo ()
+{
+  sleep (4);
+  exit (0);
+}
+
+int
+main ()
+{
+  #pragma omp parallel
+  {
+    #pragma omp sections
+      {
+        foo ();
+      #pragma omp section
+        foo ();
+      #pragma omp section
+        foo ();
+      }
+  }
+  return 0;
+}
diff --git a/libgomp/testsuite/libgomp.c/thread-limit-1.c b/libgomp/testsuite/libgomp.c/thread-limit-1.c
new file mode 100644
index 0000000..6cc716b
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/thread-limit-1.c
@@ -0,0 +1,41 @@
+/* { dg-do run } */
+/* { dg-set-target-env-var OMP_THREAD_LIMIT "6" } */
+
+#include <stdlib.h>
+#include <unistd.h>
+
+int
+main ()
+{
+  if (omp_get_thread_limit () != 6)
+    return 0;
+  omp_set_dynamic (0);
+  omp_set_nested (1);
+  #pragma omp parallel num_threads (3)
+  if (omp_get_num_threads () != 3)
+    abort ();
+  #pragma omp parallel num_threads (3)
+  if (omp_get_num_threads () != 3)
+    abort ();
+  #pragma omp parallel num_threads (8)
+  if (omp_get_num_threads () > 6)
+    abort ();
+  #pragma omp parallel num_threads (6)
+  if (omp_get_num_threads () != 6)
+    abort ();
+  int cnt = 0;
+  #pragma omp parallel num_threads (5)
+  #pragma omp parallel num_threads (5)
+  #pragma omp parallel num_threads (2)
+  {
+    int v;
+    #pragma omp atomic capture
+    v = ++cnt;
+    if (v > 6)
+      abort ();
+    usleep (10000);
+    #pragma omp atomic
+    --cnt;
+  }
+  return 0;
+}
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 34813ee..df4c305 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/libitm/ChangeLog b/libitm/ChangeLog
index 287bf73..b71c0f8 100644
--- a/libitm/ChangeLog
+++ b/libitm/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-08-14  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
 
 	Revert:
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index a7f4a22..2701366 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-06-19  Matthias Klose  <doko@ubuntu.com>
 
 	* pkg.m4 (PKG_CHECK_MODULES): Use AC_PATH_TOOL to check for pkg-config.
diff --git a/libjava/classpath/ChangeLog b/libjava/classpath/ChangeLog
index 6831ade..cb9966d 100644
--- a/libjava/classpath/ChangeLog
+++ b/libjava/classpath/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/libjava/libltdl/ChangeLog b/libjava/libltdl/ChangeLog
index d8df6fb..7ff2646 100644
--- a/libjava/libltdl/ChangeLog
+++ b/libjava/libltdl/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog
index 6336ffd..64800db 100644
--- a/libmudflap/ChangeLog
+++ b/libmudflap/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog
index a775e42..feec5c9 100644
--- a/libobjc/ChangeLog
+++ b/libobjc/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-07-04  Kai Tietz  <ktietz@redhat.com>
 
 	* exception.c: Add check for SjLj to SEH blocks.
diff --git a/libquadmath/ChangeLog b/libquadmath/ChangeLog
index cdca513..449fea9 100644
--- a/libquadmath/ChangeLog
+++ b/libquadmath/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog
index 7681a5a..11d22c0 100644
--- a/libsanitizer/ChangeLog
+++ b/libsanitizer/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/libssp/ChangeLog b/libssp/ChangeLog
index 385833e..10dcb78 100644
--- a/libssp/ChangeLog
+++ b/libssp/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index b0a3969..3fb5d88 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,135 @@
+2013-11-01  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR libstdc++/58952
+	* include/c_global/cstdio: Undef getchar.
+
+2013-10-31  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+	* testsuite/20_util/shared_ptr/cons/58839.cc: Do not use
+	default_delete<void>.
+
+2013-10-30  Chris Studholme  <cvs@cs.utoronto.ca>
+
+	PR libstdc++/58912
+	* include/bits/shared_ptr_base.h (_Sp_counted_ptr_inplace): Remove
+	unnecessary initialization of storage buffer.
+
+2013-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+	PR libstdc++/58839
+	* include/bits/shared_ptr_base.h
+	(__shared_ptr<T>::__shared_ptr(unique_ptr<U,D>&&)): Do not dereference
+	pointer.
+	* testsuite/20_util/shared_ptr/cons/58839.cc: New.
+
+2013-10-20  Chris Jefferson  <chris@bubblescope.net>
+	    Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR libstdc++/58800
+	* include/bits/stl_algo.h (__unguarded_partition_pivot): Change
+	__last - 2 to __last - 1.
+	* testsuite/25_algorithms/nth_element/58800.cc: New
+
+2013-10-16  François Dumont  <fdumont@gcc.gnu.org>
+
+	PR libstdc++/58191
+	* include/debug/macros.h (__glibcxx_check_partitioned_lower): Add
+	__gnu_debug::__base calls on iterators passed to internal debug
+	check.
+	(__glibcxx_check_partitioned_lower_pred): Likewise.
+	(__glibcxx_check_partitioned_upper): Likewise.
+	(__glibcxx_check_partitioned_upper_pred): Likewise.
+	* include/debug/functions.h (__check_partitioned_lower):
+	Remove code to detect safe iterators.
+	(__check_partitioned_upper): Likewise.
+
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
+2013-10-09  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+	* testsuite/20_util/shared_ptr/cons/58659.cc: Use VERIFY instead of
+	aborting.
+
+2013-10-08  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+	PR libstdc++/58659
+	* include/bits/shared_ptr_base.h (__shared_count::__shared_count(P,D)):
+	Delegate to constructor taking allocator.
+	(__shared_count::_S_create_from_up): Inline into ...
+	(__shared_count::__shared_count(unique_ptr<Y,D>&&): Here. Use
+	std::conditional instead of constrained overloads. Allocate memory
+	using the allocator type that will be used for deallocation.
+	* testsuite/20_util/shared_ptr/cons/58659.cc: New.
+	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust.
+
+2013-10-07  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+	PR libstdc++/57641
+	* include/std/mutex (timed_mutex, recursive_timed_mutex): Add
+	overloaded _M_try_lock_until to handle conversion between different
+	clocks. Replace constrained __try_lock_for_impl overloads with
+	conditional increment.
+	* testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: New.
+
+2013-10-06  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+	PR libstdc++/57465
+	* include/std/functional
+	(_Function_base::_Base_manager::_M_not_empty_function): Fix overload
+	for pointers.
+	* testsuite/20_util/function/cons/57465.cc: New.
+
+2013-10-02  Jonathan Wakely  <jwakely.gcc@gmail.com>
+	    Daniel Krugler  <daniel.kruegler@gmail.com>
+
+	PR libstdc++/58569
+	* include/std/functional (function::_CheckResult): Move to namespace
+	scope and rename to __check_func_return_type.
+	* testsuite/20_util/function/58569.cc: New.
+
+2013-09-30  Chris Jefferson  <chris@bubblescope.net>
+
+	PR libstdc++/58437
+	* include/bits/stl_algo.h (__move_median_first): Rename to
+	__move_median_to_first, change to take an addition argument.
+	(__unguarded_partition_pivot): Adjust.
+	* testsuite/performance/25_algorithms/sort.cc: New.
+	* testsuite/performance/25_algorithms/sort_heap.cc: Likewise.
+	* testsuite/performance/25_algorithms/stable_sort.cc: Likewise.
+
+2013-09-19  Mitsuru Kariya  <kariya_mitsuru@hotmail.com>
+	    Chris Jefferson  <chris@bubblescope.net>
+
+	PR libstdc++/58358
+	* include/bits/stl_algo.h (search_n): Fix to guarantee a number
+	of comparisons <= number of elements in the range.
+	* testsuite/25_algorithms/search_n/58358.cc: New.
+	* testsuite/25_algorithms/search_n/iterator.cc: Extend.
+
+2013-09-13  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR libstdc++/58415
+	* include/ext/sso_string_base.h (__sso_string_base<>::
+	__sso_string_base(__sso_string_base&&)): Fix thinkos about
+	_M_length vs _M_set_length.
+	* testsuite/ext/vstring/cons/58415-1.cc: New.
+	* testsuite/ext/vstring/cons/58415-2.cc: Likewise.
+
+2013-09-10  Kai Tietz  <ktietz@redhat.com>
+
+	Backport from trunk.
+	PR libstdc++/54314
+	* config/abi/pre/gnu-versioned-namespace.ver: Add thunk _ZTv0_n12_NS*
+	like in gnu.ver.
+
+2013-09-07  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR libstdc++/58341
+	* include/bits/stl_algobase.h (copy_backward): Fix documentation
+	per DR 1206.
+
 2013-09-03  Paolo Carlini  <paolo.carlini@oracle.com>
 
 	PR libstdc++/58302
diff --git a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
index 7880767..ccbdc28 100644
--- a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
+++ b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
@@ -63,6 +63,7 @@
     _ZTVN9__gnu_cxx3__718stdio_sync_filebufI[cw]NSt3__711char_traitsI[cw]EEEE;
 
     # thunk
+    _ZTv0_n12_NS*;
     _ZTv0_n24_NS*;
 
     # typeinfo structure
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index b900f6c..4a1af13 100644
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
@@ -321,7 +321,9 @@
       _M_check(size_type __pos, const char* __s) const
       {
 	if (__pos > this->size())
-	  __throw_out_of_range(__N(__s));
+	  __throw_out_of_range_fmt(__N("%s: __pos (which is %zu) > "
+				       "this->size() (which is %zu)"),
+				   __s, __pos, this->size());
 	return __pos;
       }
 
@@ -865,7 +867,10 @@
       at(size_type __n) const
       {
 	if (__n >= this->size())
-	  __throw_out_of_range(__N("basic_string::at"));
+	  __throw_out_of_range_fmt(__N("basic_string::at: __n "
+				       "(which is %zu) >= this->size() "
+				       "(which is %zu)"),
+				   __n, this->size());
 	return _M_data()[__n];
       }
 
@@ -884,7 +889,10 @@
       at(size_type __n)
       {
 	if (__n >= size())
-	  __throw_out_of_range(__N("basic_string::at"));
+	  __throw_out_of_range_fmt(__N("basic_string::at: __n "
+				       "(which is %zu) >= this->size() "
+				       "(which is %zu)"),
+				   __n, this->size());
 	_M_leak();
 	return _M_data()[__n];
       }
diff --git a/libstdc++-v3/include/bits/deque.tcc b/libstdc++-v3/include/bits/deque.tcc
index 89c5ef7..096c16e 100644
--- a/libstdc++-v3/include/bits/deque.tcc
+++ b/libstdc++-v3/include/bits/deque.tcc
@@ -193,6 +193,10 @@
     deque<_Tp, _Alloc>::
     erase(iterator __position)
     {
+#if __google_stl_debug_deque
+      if (__position < this->begin() || __position >= this->end())
+	__throw_logic_error("erase() at invalid position");
+#endif
       iterator __next = __position;
       ++__next;
       const difference_type __index = __position - begin();
@@ -216,6 +220,10 @@
     deque<_Tp, _Alloc>::
     erase(iterator __first, iterator __last)
     {
+#if __google_stl_debug_deque
+      if (__first < this->begin() || __first > __last || __last > this->end())
+	  __throw_logic_error("erase() invalid range");
+#endif
       if (__first == __last)
 	return __first;
       else if (__first == begin() && __last == end())
diff --git a/libstdc++-v3/include/bits/functexcept.h b/libstdc++-v3/include/bits/functexcept.h
index 1614058..03e2040 100644
--- a/libstdc++-v3/include/bits/functexcept.h
+++ b/libstdc++-v3/include/bits/functexcept.h
@@ -75,6 +75,10 @@
   __throw_out_of_range(const char*) __attribute__((__noreturn__));
 
   void
+  __throw_out_of_range_fmt(const char*, ...) __attribute__((__noreturn__))
+    __attribute__((__format__(__printf__, 1, 2)));
+
+  void
   __throw_runtime_error(const char*) __attribute__((__noreturn__));
 
   void
diff --git a/libstdc++-v3/include/bits/shared_ptr.h b/libstdc++-v3/include/bits/shared_ptr.h
index 71f1b69..c89b9dc 100644
--- a/libstdc++-v3/include/bits/shared_ptr.h
+++ b/libstdc++-v3/include/bits/shared_ptr.h
@@ -319,6 +319,12 @@
       template<typename _Tp1, typename _Alloc, typename... _Args>
 	friend shared_ptr<_Tp1>
 	allocate_shared(const _Alloc& __a, _Args&&... __args);
+
+      // This constructor is non-standard, it is used by weak_ptr::lock().
+      shared_ptr(const weak_ptr<_Tp>& __r, std::nothrow_t)
+      : __shared_ptr<_Tp>(__r, std::nothrow) { }
+
+      friend class weak_ptr<_Tp>;
     };
 
   // 20.7.2.2.7 shared_ptr comparisons
@@ -492,23 +498,7 @@
 
       shared_ptr<_Tp>
       lock() const noexcept
-      {
-#ifdef __GTHREADS
-	if (this->expired())
-	  return shared_ptr<_Tp>();
-
-	__try
-	  {
-	    return shared_ptr<_Tp>(*this);
-	  }
-	__catch(const bad_weak_ptr&)
-	  {
-	    return shared_ptr<_Tp>();
-	  }
-#else
-	return this->expired() ? shared_ptr<_Tp>() : shared_ptr<_Tp>(*this);
-#endif
-      }
+      { return shared_ptr<_Tp>(*this, std::nothrow); }
     };
 
   // 20.7.2.3.6 weak_ptr specialized algorithms.
diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h
index c5df1fb..3eaff9e 100644
--- a/libstdc++-v3/include/bits/shared_ptr_base.h
+++ b/libstdc++-v3/include/bits/shared_ptr_base.h
@@ -132,7 +132,10 @@
   
       void
       _M_add_ref_lock();
-      
+
+      bool
+      _M_add_ref_lock_nothrow();
+
       void
       _M_release() noexcept
       {
@@ -215,6 +218,51 @@
     }
 
   template<>
+    inline bool
+    _Sp_counted_base<_S_single>::
+    _M_add_ref_lock_nothrow()
+    {
+      if (_M_use_count == 0)
+	return false;
+      ++_M_use_count;
+      return true;
+    }
+
+  template<>
+    inline bool
+    _Sp_counted_base<_S_mutex>::
+    _M_add_ref_lock_nothrow()
+    {
+      __gnu_cxx::__scoped_lock sentry(*this);
+      if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0)
+	{
+	  _M_use_count = 0;
+	  return false;
+	}
+      return true;
+    }
+
+  template<>
+    inline bool
+    _Sp_counted_base<_S_atomic>::
+    _M_add_ref_lock_nothrow()
+    {
+      // Perform lock-free add-if-not-zero operation.
+      _Atomic_word __count = _M_get_use_count();
+      do
+	{
+	  if (__count == 0)
+	    return false;
+	  // Replace the current counter value with the old value + 1, as
+	  // long as it's not changed meanwhile.
+	}
+      while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1,
+					  true, __ATOMIC_ACQ_REL,
+					  __ATOMIC_RELAXED));
+      return true;
+    }
+
+  template<>
     inline void
     _Sp_counted_base<_S_mutex>::
     _M_add_ref_lock()
@@ -391,7 +439,7 @@
     public:
       template<typename... _Args>
 	_Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args)
-	: _M_impl(__a), _M_storage()
+	: _M_impl(__a)
 	{
 	  _M_impl._M_ptr = static_cast<_Tp*>(static_cast<void*>(&_M_storage));
 	  // _GLIBCXX_RESOLVE_LIB_DEFECTS
@@ -459,29 +507,9 @@
 	}
 
       template<typename _Ptr, typename _Deleter>
-	__shared_count(_Ptr __p, _Deleter __d) : _M_pi(0)
-	{
-	  // The allocator's value_type doesn't matter, will rebind it anyway.
-	  typedef std::allocator<int> _Alloc;
-	  typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
-	  typedef typename allocator_traits<_Alloc>::template
-	    rebind_traits<_Sp_cd_type> _Alloc_traits;
-	  typename _Alloc_traits::allocator_type __a;
-	  _Sp_cd_type* __mem = 0;
-	  __try
-	    {
-	      __mem = _Alloc_traits::allocate(__a, 1);
-	      _Alloc_traits::construct(__a, __mem, __p, std::move(__d));
-	      _M_pi = __mem;
-	    }
-	  __catch(...)
-	    {
-	      __d(__p); // Call _Deleter on __p.
-	      if (__mem)
-	        _Alloc_traits::deallocate(__a, __mem, 1);
-	      __throw_exception_again;
-	    }
-	}
+	__shared_count(_Ptr __p, _Deleter __d)
+	: __shared_count(__p, std::move(__d), allocator<int>())
+	{ }
 
       template<typename _Ptr, typename _Deleter, typename _Alloc>
 	__shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0)
@@ -540,16 +568,32 @@
       // Special case for unique_ptr<_Tp,_Del> to provide the strong guarantee.
       template<typename _Tp, typename _Del>
         explicit
-	__shared_count(std::unique_ptr<_Tp, _Del>&& __r)
-	: _M_pi(_S_create_from_up(std::move(__r)))
-	{ __r.release(); }
+	__shared_count(std::unique_ptr<_Tp, _Del>&& __r) : _M_pi(0)
+	{
+	  using _Ptr = typename unique_ptr<_Tp, _Del>::pointer;
+	  using _Del2 = typename conditional<is_reference<_Del>::value,
+	      reference_wrapper<typename remove_reference<_Del>::type>,
+	      _Del>::type;
+	  using _Sp_cd_type
+	    = _Sp_counted_deleter<_Ptr, _Del2, allocator<void>, _Lp>;
+	  using _Alloc = allocator<_Sp_cd_type>;
+	  using _Alloc_traits = allocator_traits<_Alloc>;
+	  _Alloc __a;
+	  _Sp_cd_type* __mem = _Alloc_traits::allocate(__a, 1);
+	  _Alloc_traits::construct(__a, __mem, __r.release(),
+				   __r.get_deleter());  // non-throwing
+	  _M_pi = __mem;
+	}
 
       // Throw bad_weak_ptr when __r._M_get_use_count() == 0.
       explicit __shared_count(const __weak_count<_Lp>& __r);
 
+      // Does not throw if __r._M_get_use_count() == 0, caller must check.
+      explicit __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t);
+
       ~__shared_count() noexcept
       {
-	if (_M_pi != 0)
+	if (_M_pi != nullptr)
 	  _M_pi->_M_release();
       }
 
@@ -611,28 +655,6 @@
     private:
       friend class __weak_count<_Lp>;
 
-      template<typename _Tp, typename _Del>
-	static _Sp_counted_base<_Lp>*
-	_S_create_from_up(std::unique_ptr<_Tp, _Del>&& __r,
-	  typename std::enable_if<!std::is_reference<_Del>::value>::type* = 0)
-	{
-	  typedef typename unique_ptr<_Tp, _Del>::pointer _Ptr;
-	  return new _Sp_counted_deleter<_Ptr, _Del, std::allocator<void>,
-	    _Lp>(__r.get(), __r.get_deleter());
-	}
-
-      template<typename _Tp, typename _Del>
-	static _Sp_counted_base<_Lp>*
-	_S_create_from_up(std::unique_ptr<_Tp, _Del>&& __r,
-	  typename std::enable_if<std::is_reference<_Del>::value>::type* = 0)
-	{
-	  typedef typename unique_ptr<_Tp, _Del>::pointer _Ptr;
-	  typedef typename std::remove_reference<_Del>::type _Del1;
-	  typedef std::reference_wrapper<_Del1> _Del2;
-	  return new _Sp_counted_deleter<_Ptr, _Del2, std::allocator<void>,
-	    _Lp>(__r.get(), std::ref(__r.get_deleter()));
-	}
-
       _Sp_counted_base<_Lp>*  _M_pi;
     };
 
@@ -721,15 +743,27 @@
 
   // Now that __weak_count is defined we can define this constructor:
   template<_Lock_policy _Lp>
-    inline __shared_count<_Lp>:: __shared_count(const __weak_count<_Lp>& __r)
+    inline
+    __shared_count<_Lp>::__shared_count(const __weak_count<_Lp>& __r)
     : _M_pi(__r._M_pi)
     {
-      if (_M_pi != 0)
+      if (_M_pi != nullptr)
 	_M_pi->_M_add_ref_lock();
       else
 	__throw_bad_weak_ptr();
     }
 
+  // Now that __weak_count is defined we can define this constructor:
+  template<_Lock_policy _Lp>
+    inline
+    __shared_count<_Lp>::
+    __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t)
+    : _M_pi(__r._M_pi)
+    {
+      if (_M_pi != nullptr)
+	if (!_M_pi->_M_add_ref_lock_nothrow())
+	  _M_pi = nullptr;
+    }
 
   // Support for enable_shared_from_this.
 
@@ -848,7 +882,7 @@
 	: _M_ptr(__r.get()), _M_refcount()
 	{
 	  __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
-	  auto __tmp = std::__addressof(*__r.get());
+	  auto __tmp = __r.get();
 	  _M_refcount = __shared_count<_Lp>(std::move(__r));
 	  __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
 	}
@@ -1036,6 +1070,16 @@
 	friend __shared_ptr<_Tp1, _Lp1>
 	__allocate_shared(const _Alloc& __a, _Args&&... __args);
 
+      // This constructor is used by __weak_ptr::lock() and
+      // shared_ptr::shared_ptr(const weak_ptr&, std::nothrow_t).
+      __shared_ptr(const __weak_ptr<_Tp, _Lp>& __r, std::nothrow_t)
+      : _M_refcount(__r._M_refcount, std::nothrow)
+      {
+	_M_ptr = _M_refcount._M_get_use_count() ? __r._M_ptr : nullptr;
+      }
+
+      friend class __weak_ptr<_Tp, _Lp>;
+
     private:
       void*
       _M_get_deleter(const std::type_info& __ti) const noexcept
@@ -1271,31 +1315,7 @@
 
       __shared_ptr<_Tp, _Lp>
       lock() const noexcept
-      {
-#ifdef __GTHREADS
-	// Optimization: avoid throw overhead.
-	if (expired())
-	  return __shared_ptr<element_type, _Lp>();
-
-	__try
-	  {
-	    return __shared_ptr<element_type, _Lp>(*this);
-	  }
-	__catch(const bad_weak_ptr&)
-	  {
-	    // Q: How can we get here?
-	    // A: Another thread may have invalidated r after the
-	    //    use_count test above.
-	    return __shared_ptr<element_type, _Lp>();
-	  }
-
-#else
-	// Optimization: avoid try/catch overhead when single threaded.
-	return expired() ? __shared_ptr<element_type, _Lp>()
-			 : __shared_ptr<element_type, _Lp>(*this);
-
-#endif
-      } // XXX MT
+      { return __shared_ptr<element_type, _Lp>(*this, std::nothrow); }
 
       long
       use_count() const noexcept
diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h
index a8805f1..752eead 100644
--- a/libstdc++-v3/include/bits/stl_algo.h
+++ b/libstdc++-v3/include/bits/stl_algo.h
@@ -72,10 +72,11 @@
 {
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
-  /// Swaps the median value of *__a, *__b and *__c to *__a
+  /// Swaps the median value of *__a, *__b and *__c to *__result
   template<typename _Iterator>
     void
-    __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c)
+    __move_median_to_first(_Iterator __result, _Iterator __a,
+			   _Iterator __b, _Iterator __c)
     {
       // concept requirements
       __glibcxx_function_requires(_LessThanComparableConcept<
@@ -84,23 +85,26 @@
       if (*__a < *__b)
 	{
 	  if (*__b < *__c)
-	    std::iter_swap(__a, __b);
+	    std::iter_swap(__result, __b);
 	  else if (*__a < *__c)
-	    std::iter_swap(__a, __c);
+	    std::iter_swap(__result, __c);
+	  else
+	    std::iter_swap(__result, __a);
 	}
       else if (*__a < *__c)
-	return;
+      	std::iter_swap(__result, __a);
       else if (*__b < *__c)
-	std::iter_swap(__a, __c);
+	std::iter_swap(__result, __c);
       else
-	std::iter_swap(__a, __b);
+	std::iter_swap(__result, __b);
     }
 
-  /// Swaps the median value of *__a, *__b and *__c under __comp to *__a
+  /// Swaps the median value of *__a, *__b and *__c under __comp to *__result
   template<typename _Iterator, typename _Compare>
     void
-    __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c,
-			_Compare __comp)
+    __move_median_to_first(_Iterator __result, _Iterator __a,
+			   _Iterator __b, _Iterator __c,
+			   _Compare __comp)
     {
       // concept requirements
       __glibcxx_function_requires(_BinaryFunctionConcept<_Compare, bool,
@@ -110,16 +114,18 @@
       if (__comp(*__a, *__b))
 	{
 	  if (__comp(*__b, *__c))
-	    std::iter_swap(__a, __b);
+	    std::iter_swap(__result, __b);
 	  else if (__comp(*__a, *__c))
-	    std::iter_swap(__a, __c);
+	    std::iter_swap(__result, __c);
+	  else
+	    std::iter_swap(__result, __a);
 	}
       else if (__comp(*__a, *__c))
-	return;
+	std::iter_swap(__result, __a);
       else if (__comp(*__b, *__c))
-	std::iter_swap(__a, __c);
+	std::iter_swap(__result, __c);
       else
-	std::iter_swap(__a, __b);
+	std::iter_swap(__result, __b);
     }
 
   // for_each
@@ -418,38 +424,23 @@
 	_DistanceType;
 
       _DistanceType __tailSize = __last - __first;
-      const _DistanceType __pattSize = __count;
+      _DistanceType __remainder = __count;
 
-      if (__tailSize < __pattSize)
-        return __last;
-
-      const _DistanceType __skipOffset = __pattSize - 1;
-      _RandomAccessIter __lookAhead = __first + __skipOffset;
-      __tailSize -= __pattSize;
-
-      while (1) // the main loop...
+      while (__remainder <= __tailSize) // the main loop...
 	{
-	  // __lookAhead here is always pointing to the last element of next 
-	  // possible match.
-	  while (!(*__lookAhead == __val)) // the skip loop...
-	    {
-	      if (__tailSize < __pattSize)
-		return __last;  // Failure
-	      __lookAhead += __pattSize;
-	      __tailSize -= __pattSize;
-	    }
-	  _DistanceType __remainder = __skipOffset;
-	  for (_RandomAccessIter __backTrack = __lookAhead - 1; 
-	       *__backTrack == __val; --__backTrack)
+	  __first += __remainder;
+	  __tailSize -= __remainder;
+	  // __first here is always pointing to one past the last element of
+	  // next possible match.
+	  _RandomAccessIter __backTrack = __first; 
+	  while (*--__backTrack == __val)
 	    {
 	      if (--__remainder == 0)
-		return (__lookAhead - __skipOffset); // Success
+	        return (__first - __count); // Success
 	    }
-	  if (__remainder > __tailSize)
-	    return __last; // Failure
-	  __lookAhead += __remainder;
-	  __tailSize -= __remainder;
+	  __remainder = __count + 1 - (__first - __backTrack);
 	}
+      return __last; // Failure
     }
 
   // search_n
@@ -511,38 +502,23 @@
 	_DistanceType;
 
       _DistanceType __tailSize = __last - __first;
-      const _DistanceType __pattSize = __count;
+      _DistanceType __remainder = __count;
 
-      if (__tailSize < __pattSize)
-        return __last;
-
-      const _DistanceType __skipOffset = __pattSize - 1;
-      _RandomAccessIter __lookAhead = __first + __skipOffset;
-      __tailSize -= __pattSize;
-
-      while (1) // the main loop...
+      while (__remainder <= __tailSize) // the main loop...
 	{
-	  // __lookAhead here is always pointing to the last element of next 
-	  // possible match.
-	  while (!bool(__binary_pred(*__lookAhead, __val))) // the skip loop...
-	    {
-	      if (__tailSize < __pattSize)
-		return __last;  // Failure
-	      __lookAhead += __pattSize;
-	      __tailSize -= __pattSize;
-	    }
-	  _DistanceType __remainder = __skipOffset;
-	  for (_RandomAccessIter __backTrack = __lookAhead - 1; 
-	       __binary_pred(*__backTrack, __val); --__backTrack)
+	  __first += __remainder;
+	  __tailSize -= __remainder;
+	  // __first here is always pointing to one past the last element of
+	  // next possible match.
+	  _RandomAccessIter __backTrack = __first; 
+	  while (__binary_pred(*--__backTrack, __val))
 	    {
 	      if (--__remainder == 0)
-		return (__lookAhead - __skipOffset); // Success
+	        return (__first - __count); // Success
 	    }
-	  if (__remainder > __tailSize)
-	    return __last; // Failure
-	  __lookAhead += __remainder;
-	  __tailSize -= __remainder;
+	  __remainder = __count + 1 - (__first - __backTrack);
 	}
+      return __last; // Failure
     }
 
   // find_end for forward iterators.
@@ -2338,7 +2314,7 @@
 				_RandomAccessIterator __last)
     {
       _RandomAccessIterator __mid = __first + (__last - __first) / 2;
-      std::__move_median_first(__first, __mid, (__last - 1));
+      std::__move_median_to_first(__first, __first + 1, __mid, __last - 1);
       return std::__unguarded_partition(__first + 1, __last, *__first);
     }
 
@@ -2350,7 +2326,8 @@
 				_RandomAccessIterator __last, _Compare __comp)
     {
       _RandomAccessIterator __mid = __first + (__last - __first) / 2;
-      std::__move_median_first(__first, __mid, (__last - 1), __comp);
+      std::__move_median_to_first(__first, __first + 1, __mid, __last - 1,
+				  __comp);
       return std::__unguarded_partition(__first + 1, __last, *__first, __comp);
     }
 
diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h
index a90881f..87dd171 100644
--- a/libstdc++-v3/include/bits/stl_algobase.h
+++ b/libstdc++-v3/include/bits/stl_algobase.h
@@ -611,7 +611,7 @@
    *  loop count will be known (and therefore a candidate for compiler
    *  optimizations such as unrolling).
    *
-   *  Result may not be in the range [first,last).  Use copy instead.  Note
+   *  Result may not be in the range (first,last].  Use copy instead.  Note
    *  that the start of the output range may overlap [first,last).
   */
   template<typename _BI1, typename _BI2>
diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h
index 2bbfe33..10b196d 100644
--- a/libstdc++-v3/include/bits/stl_bvector.h
+++ b/libstdc++-v3/include/bits/stl_bvector.h
@@ -867,7 +867,10 @@
     _M_range_check(size_type __n) const
     {
       if (__n >= this->size())
-        __throw_out_of_range(__N("vector<bool>::_M_range_check"));
+	__throw_out_of_range_fmt(__N("vector<bool>::_M_range_check: __n "
+				     "(which is %zu) >= this->size() "
+				     "(which is %zu)"),
+				 __n, this->size());
     }
 
   public:
@@ -975,6 +978,10 @@
     iterator
     insert(iterator __position, const bool& __x = bool())
     {
+#if __google_stl_debug_bvector
+      if (__position < this->begin() || __position > this->end())
+	__throw_logic_error("insert() at invalid position");
+#endif
       const difference_type __n = __position - begin();
       if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage
 	  && __position == end())
@@ -994,6 +1001,8 @@
 #if __google_stl_debug_bvector
 	if (!this->_M_is_valid())
 	  __throw_logic_error("insert() on corrupt (dangling?) vector");
+	if (__position < this->begin() || __position > this->end())
+	  __throw_logic_error("insert() at invalid position");
 #endif
 	_M_insert_dispatch(__position, __first, __last, __false_type());
       }
@@ -1006,6 +1015,8 @@
 #if __google_stl_debug_bvector
 	if (!this->_M_is_valid())
 	  __throw_logic_error("insert() on corrupt (dangling?) vector");
+	if (__position < this->begin() || __position > this->end())
+	  __throw_logic_error("insert() at invalid position");
 #endif
 	typedef typename std::__is_integer<_InputIterator>::__type _Integral;
 	_M_insert_dispatch(__position, __first, __last, _Integral());
@@ -1018,6 +1029,8 @@
 #if __google_stl_debug_bvector
       if (!this->_M_is_valid())
 	__throw_logic_error("insert() on corrupt (dangling?) vector");
+      if (__position < this->begin() || __position > this->end())
+	__throw_logic_error("insert() at invalid position");
 #endif
       _M_fill_insert(__position, __n, __x);
     }
@@ -1040,7 +1053,8 @@
     erase(iterator __position)
     {
 #if __google_stl_debug_bvector
-      _M_range_check(__position - begin());
+      if (__position < this->begin() || __position >= this->end())
+	__throw_logic_error("erase() at invalid position");
 #endif
       if (__position + 1 != end())
         std::copy(__position + 1, end(), __position);
@@ -1054,6 +1068,8 @@
 #if __google_stl_debug_bvector
       if (!this->_M_is_valid())
 	__throw_logic_error("erase() on corrupt (dangling?) vector");
+      if (__first < this->begin() || __first > __last || __last > this->end())
+	__throw_logic_error("erase() invalid range");
 #endif
       if (__first != __last)
 	_M_erase_at_end(std::copy(__last, end(), __first));
diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h
index a547654..c094a33 100644
--- a/libstdc++-v3/include/bits/stl_deque.h
+++ b/libstdc++-v3/include/bits/stl_deque.h
@@ -1275,7 +1275,10 @@
       _M_range_check(size_type __n) const
       {
 	if (__n >= this->size())
-	  __throw_out_of_range(__N("deque::_M_range_check"));
+	  __throw_out_of_range_fmt(__N("deque::_M_range_check: __n "
+				       "(which is %zu)>= this->size() "
+				       "(which is %zu)"),
+				   __n, this->size());
       }
 
     public:
@@ -1549,7 +1552,13 @@
        */
       void
       insert(iterator __position, size_type __n, const value_type& __x)
-      { _M_fill_insert(__position, __n, __x); }
+      {
+#if __google_stl_debug_deque
+	if (__position < this->begin() || __position > this->end())
+	  __throw_logic_error("insert() at invalid position");
+#endif
+	_M_fill_insert(__position, __n, __x);
+      }
 
       /**
        *  @brief  Inserts a range into the %deque.
@@ -1567,7 +1576,13 @@
         void
         insert(iterator __position, _InputIterator __first,
 	       _InputIterator __last)
-        { _M_insert_dispatch(__position, __first, __last, __false_type()); }
+        {
+#if __google_stl_debug_deque
+	if (__position < this->begin() || __position > this->end())
+	  __throw_logic_error("insert() at invalid position");
+#endif
+	  _M_insert_dispatch(__position, __first, __last, __false_type());
+	}
 #else
       template<typename _InputIterator>
         void
diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h
index 164a111..343a89e 100644
--- a/libstdc++-v3/include/bits/stl_vector.h
+++ b/libstdc++-v3/include/bits/stl_vector.h
@@ -63,6 +63,20 @@
 #include <initializer_list>
 #endif
 
+#ifdef _GLIBCXX_ADDRESS_SANITIZER_ANNOTATIONS
+extern "C" void
+__sanitizer_annotate_contiguous_container(const void *, const void *,
+					  const void *, const void *);
+#else
+// When sanitizer annotataions are off, avoid bazillion of no-op
+// functions that blow up debug binary size.
+#define __sanitizer_vector_annotate_new()
+#define __sanitizer_vector_annotate_delete()
+#define __sanitizer_vector_annotate_increase(a)
+#define __sanitizer_vector_annotate_shrink(a)
+#endif  // _GLIBCXX_ADDRESS_SANITIZER_ANNOTATIONS
+
+
 namespace std _GLIBCXX_VISIBILITY(default)
 {
 _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
@@ -872,7 +886,10 @@
       _M_range_check(size_type __n) const
       {
 	if (__n >= this->size())
-	  __throw_out_of_range(__N("vector::_M_range_check"));
+	  __throw_out_of_range_fmt(__N("vector::_M_range_check: __n "
+				       "(which is %zu) >= this->size() "
+				       "(which is %zu)"),
+				   __n, this->size());
       }
 
     public:
@@ -1013,6 +1030,7 @@
       {
 	if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
 	  {
+	    __sanitizer_vector_annotate_increase(1);
 	    _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
 	                             __x);
 	    ++this->_M_impl._M_finish;
@@ -1047,8 +1065,14 @@
       void
       pop_back()
       {
+#if __google_stl_debug_vector
+	if (this->empty())
+	  __throw_logic_error(__N("pop_back() on empty vector"));
+#endif
+	size_type __old_size = size();
 	--this->_M_impl._M_finish;
 	_Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish);
+	__sanitizer_vector_annotate_shrink(__old_size);
       }
 
 #if __cplusplus >= 201103L
@@ -1132,7 +1156,13 @@
        */
       void
       insert(iterator __position, size_type __n, const value_type& __x)
-      { _M_fill_insert(__position, __n, __x); }
+      {
+#if __google_stl_debug_vector
+	if (__position < this->begin() || __position > this->end())
+	  __throw_out_of_range(__N("insert() at invalid position"));
+#endif
+	_M_fill_insert(__position, __n, __x);
+      }
 
       /**
        *  @brief  Inserts a range into the %vector.
@@ -1154,13 +1184,23 @@
         void
         insert(iterator __position, _InputIterator __first,
 	       _InputIterator __last)
-        { _M_insert_dispatch(__position, __first, __last, __false_type()); }
+        {
+#if __google_stl_debug_vector
+	  if (__position < this->begin() || __position > this->end())
+	    __throw_out_of_range(__N("insert() at invalid position"));
+#endif
+	  _M_insert_dispatch(__position, __first, __last, __false_type());
+	}
 #else
       template<typename _InputIterator>
         void
         insert(iterator __position, _InputIterator __first,
 	       _InputIterator __last)
         {
+#if __google_stl_debug_vector
+	  if (__position < this->begin() || __position > this->end())
+	    __throw_out_of_range(__N("insert() at invalid position"));
+#endif
 	  // Check whether it's an integral type.  If so, it's not an iterator.
 	  typedef typename std::__is_integer<_InputIterator>::__type _Integral;
 	  _M_insert_dispatch(__position, __first, __last, _Integral());
@@ -1470,8 +1510,10 @@
       void
       _M_erase_at_end(pointer __pos)
       {
+	size_type __old_size = size();
 	std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator());
 	this->_M_impl._M_finish = __pos;
+	__sanitizer_vector_annotate_shrink(__old_size);
       }
 
 #if __cplusplus >= 201103L
@@ -1506,6 +1548,72 @@
 	  }
       }
 #endif
+
+#ifdef _GLIBCXX_ADDRESS_SANITIZER_ANNOTATIONS
+    private:
+      template<class T, class U>
+      struct __is_same_allocator {
+	static void __annotate_contiguous_container(pointer __beg,
+						    pointer __end,
+						    pointer __old_mid,
+						    pointer __new_mid) { }
+      };
+      // The following functions are no-ops outside of AddressSanitizer mode.
+      // We call annotatations only for the default Allocator because
+      // other allocators may not meet the AddressSanitizer alignment
+      // constraints.
+      // See the documentation for __sanitizer_annotate_contiguous_container
+      // for more details.
+      template <class T> struct __is_same_allocator<T, T> {
+	static void __annotate_contiguous_container(pointer __beg,
+						    pointer __end,
+						    pointer __old_mid,
+						    pointer __new_mid) {
+	  if (__beg)
+	    __sanitizer_annotate_contiguous_container(__beg,
+						      __end,
+						      __old_mid,
+						      __new_mid);
+	}
+      };
+
+      void __annotate_contiguous_container(pointer __beg,
+					   pointer __end,
+					   pointer __old_mid,
+					   pointer __new_mid)
+      {
+	__is_same_allocator<_Alloc, std::allocator<_Tp> >::
+	  __annotate_contiguous_container(__beg, __end, __old_mid, __new_mid);
+      }
+      void __sanitizer_vector_annotate_new()
+      {
+	__annotate_contiguous_container(_M_impl._M_start,
+					_M_impl._M_end_of_storage,
+					_M_impl._M_end_of_storage,
+					_M_impl._M_finish);
+      }
+      void __sanitizer_vector_annotate_delete()
+      {
+	__annotate_contiguous_container(_M_impl._M_start,
+					_M_impl._M_end_of_storage,
+					_M_impl._M_finish,
+					_M_impl._M_end_of_storage);
+      }
+      void __sanitizer_vector_annotate_increase(size_type __n)
+      {
+	__annotate_contiguous_container(_M_impl._M_start,
+					_M_impl._M_end_of_storage,
+					_M_impl._M_finish,
+					_M_impl._M_finish + __n);
+      }
+      void __sanitizer_vector_annotate_shrink(size_type __old_size)
+      {
+	__annotate_contiguous_container(_M_impl._M_start,
+					_M_impl._M_end_of_storage,
+					_M_impl._M_start + __old_size,
+					_M_impl._M_finish);
+      }
+#endif	// _GLIBCXX_ADDRESS_SANITIZER_ANNOTATIONS
     };
 
 
diff --git a/libstdc++-v3/include/bits/vector.tcc b/libstdc++-v3/include/bits/vector.tcc
index d4cd16e..9608ff5 100644
--- a/libstdc++-v3/include/bits/vector.tcc
+++ b/libstdc++-v3/include/bits/vector.tcc
@@ -73,6 +73,7 @@
 	  pointer __tmp = _M_allocate_and_copy(__n,
 	    _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_start),
 	    _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_finish));
+	  __sanitizer_vector_annotate_delete();
 	  std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
 			_M_get_Tp_allocator());
 	  _M_deallocate(this->_M_impl._M_start,
@@ -81,6 +82,7 @@
 	  this->_M_impl._M_start = __tmp;
 	  this->_M_impl._M_finish = __tmp + __old_size;
 	  this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
+	  __sanitizer_vector_annotate_new();
 	}
     }
 
@@ -93,6 +95,7 @@
       {
 	if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
 	  {
+	    __sanitizer_vector_annotate_increase(1);
 	    _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
 				     std::forward<_Args>(__args)...);
 	    ++this->_M_impl._M_finish;
@@ -111,6 +114,7 @@
       if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage
 	  && __position == end())
 	{
+	  __sanitizer_vector_annotate_increase(1);
 	  _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, __x);
 	  ++this->_M_impl._M_finish;
 	}
@@ -138,6 +142,7 @@
 	_GLIBCXX_MOVE3(__position + 1, end(), __position);
       --this->_M_impl._M_finish;
       _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish);
+      __sanitizer_vector_annotate_shrink(size() + 1);
       return __position;
     }
 
@@ -166,6 +171,7 @@
 #endif
       if (&__x != this)
 	{
+	  __sanitizer_vector_annotate_delete();
 #if __cplusplus >= 201103L
 	  if (_Alloc_traits::_S_propagate_on_copy_assign())
 	    {
@@ -213,6 +219,7 @@
 					  _M_get_Tp_allocator());
 	    }
 	  this->_M_impl._M_finish = this->_M_impl._M_start + __xlen;
+	  __sanitizer_vector_annotate_new();
 	}
       return *this;
     }
@@ -224,11 +231,13 @@
     {
       if (__n > capacity())
 	{
+	  __sanitizer_vector_annotate_delete();
 	  vector __tmp(__n, __val, _M_get_Tp_allocator());
 	  __tmp.swap(*this);
 	}
       else if (__n > size())
 	{
+	  __sanitizer_vector_annotate_increase(__n - size());
 	  std::fill(begin(), end(), __val);
 	  std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
 					__n - size(), __val,
@@ -268,6 +277,7 @@
 	if (__len > capacity())
 	  {
 	    pointer __tmp(_M_allocate_and_copy(__len, __first, __last));
+	    __sanitizer_vector_annotate_delete();
 	    std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
 			  _M_get_Tp_allocator());
 	    _M_deallocate(this->_M_impl._M_start,
@@ -276,11 +286,13 @@
 	    this->_M_impl._M_start = __tmp;
 	    this->_M_impl._M_finish = this->_M_impl._M_start + __len;
 	    this->_M_impl._M_end_of_storage = this->_M_impl._M_finish;
+	    __sanitizer_vector_annotate_new();
 	  }
 	else if (size() >= __len)
 	  _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start));
 	else
 	  {
+	    __sanitizer_vector_annotate_increase(__len - size());
 	    _ForwardIterator __mid = __first;
 	    std::advance(__mid, size());
 	    std::copy(__first, __mid, this->_M_impl._M_start);
@@ -302,6 +314,7 @@
 	if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage
 	    && __position == end())
 	  {
+	    __sanitizer_vector_annotate_increase(1);
 	    _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
 				     std::forward<_Args>(__args)...);
 	    ++this->_M_impl._M_finish;
@@ -325,6 +338,7 @@
     {
       if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
 	{
+	  __sanitizer_vector_annotate_increase(1);
 	  _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
 			           _GLIBCXX_MOVE(*(this->_M_impl._M_finish
 				                   - 1)));
@@ -385,6 +399,7 @@
 	      _M_deallocate(__new_start, __len);
 	      __throw_exception_again;
 	    }
+	  __sanitizer_vector_annotate_delete();
 	  std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
 			_M_get_Tp_allocator());
 	  _M_deallocate(this->_M_impl._M_start,
@@ -393,6 +408,7 @@
 	  this->_M_impl._M_start = __new_start;
 	  this->_M_impl._M_finish = __new_finish;
 	  this->_M_impl._M_end_of_storage = __new_start + __len;
+	  __sanitizer_vector_annotate_new();
 	}
     }
 
@@ -429,6 +445,7 @@
 	    _M_deallocate(__new_start, __len);
 	    __throw_exception_again;
 	  }
+	__sanitizer_vector_annotate_delete();
 	std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
 		      _M_get_Tp_allocator());
 	_M_deallocate(this->_M_impl._M_start,
@@ -437,6 +454,7 @@
 	this->_M_impl._M_start = __new_start;
 	this->_M_impl._M_finish = __new_finish;
 	this->_M_impl._M_end_of_storage = __new_start + __len;
+	__sanitizer_vector_annotate_new();
       }
 #endif
 
@@ -450,6 +468,7 @@
 	  if (size_type(this->_M_impl._M_end_of_storage
 			- this->_M_impl._M_finish) >= __n)
 	    {
+	      __sanitizer_vector_annotate_increase(__n);
 	      value_type __x_copy = __x;
 	      const size_type __elems_after = end() - __position;
 	      pointer __old_finish(this->_M_impl._M_finish);
@@ -518,6 +537,7 @@
 		  _M_deallocate(__new_start, __len);
 		  __throw_exception_again;
 		}
+	      __sanitizer_vector_annotate_delete();
 	      std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
 			    _M_get_Tp_allocator());
 	      _M_deallocate(this->_M_impl._M_start,
@@ -526,6 +546,7 @@
 	      this->_M_impl._M_start = __new_start;
 	      this->_M_impl._M_finish = __new_finish;
 	      this->_M_impl._M_end_of_storage = __new_start + __len;
+	      __sanitizer_vector_annotate_new();
 	    }
 	}
     }
@@ -541,6 +562,7 @@
 	  if (size_type(this->_M_impl._M_end_of_storage
 			- this->_M_impl._M_finish) >= __n)
 	    {
+	      __sanitizer_vector_annotate_increase(__n);
 	      std::__uninitialized_default_n_a(this->_M_impl._M_finish,
 					       __n, _M_get_Tp_allocator());
 	      this->_M_impl._M_finish += __n;
@@ -569,6 +591,7 @@
 		  _M_deallocate(__new_start, __len);
 		  __throw_exception_again;
 		}
+	      __sanitizer_vector_annotate_delete();
 	      std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
 			    _M_get_Tp_allocator());
 	      _M_deallocate(this->_M_impl._M_start,
@@ -577,6 +600,7 @@
 	      this->_M_impl._M_start = __new_start;
 	      this->_M_impl._M_finish = __new_finish;
 	      this->_M_impl._M_end_of_storage = __new_start + __len;
+	      __sanitizer_vector_annotate_new();
 	    }
 	}
     }
@@ -588,7 +612,10 @@
     {
       if (capacity() == size())
 	return false;
-      return std::__shrink_to_fit_aux<vector>::_S_do_it(*this);
+      __sanitizer_vector_annotate_delete();
+      bool __res = std::__shrink_to_fit_aux<vector>::_S_do_it(*this);
+      __sanitizer_vector_annotate_new();
+      return __res;
     }
 #endif
 
@@ -619,6 +646,7 @@
 	    if (size_type(this->_M_impl._M_end_of_storage
 			  - this->_M_impl._M_finish) >= __n)
 	      {
+		__sanitizer_vector_annotate_increase(__n);
 		const size_type __elems_after = end() - __position;
 		pointer __old_finish(this->_M_impl._M_finish);
 		if (__elems_after > __n)
@@ -676,6 +704,7 @@
 		    _M_deallocate(__new_start, __len);
 		    __throw_exception_again;
 		  }
+		__sanitizer_vector_annotate_delete();
 		std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
 			      _M_get_Tp_allocator());
 		_M_deallocate(this->_M_impl._M_start,
@@ -684,6 +713,7 @@
 		this->_M_impl._M_start = __new_start;
 		this->_M_impl._M_finish = __new_finish;
 		this->_M_impl._M_end_of_storage = __new_start + __len;
+		__sanitizer_vector_annotate_new();
 	      }
 	  }
       }
diff --git a/libstdc++-v3/include/c_global/cstdio b/libstdc++-v3/include/c_global/cstdio
index fcbec0c..e81e4b1 100644
--- a/libstdc++-v3/include/c_global/cstdio
+++ b/libstdc++-v3/include/c_global/cstdio
@@ -69,6 +69,7 @@
 #undef ftell
 #undef fwrite
 #undef getc
+#undef getchar
 #undef gets
 #undef perror
 #undef printf
diff --git a/libstdc++-v3/include/debug/array b/libstdc++-v3/include/debug/array
index bce10cf..3f1a966 100644
--- a/libstdc++-v3/include/debug/array
+++ b/libstdc++-v3/include/debug/array
@@ -165,7 +165,10 @@
       at(size_type __n)
       {
 	if (__n >= _Nm)
-	  std::__throw_out_of_range(__N("array::at"));
+	  std::__throw_out_of_range_fmt(__N("array::at: __n "
+				            "(which is %zu) >= _Nm "
+					    "(which is %zu)"),
+					__n, _Nm);
 	return _AT_Type::_S_ref(_M_elems, __n);
       }
 
@@ -175,7 +178,9 @@
 	// Result of conditional expression must be an lvalue so use
 	// boolean ? lvalue : (throw-expr, lvalue)
 	return __n < _Nm ? _AT_Type::_S_ref(_M_elems, __n)
-	  : (std::__throw_out_of_range(__N("array::at")),
+	  : (std::__throw_out_of_range_fmt(__N("array::at: __n (which is %zu) "
+					       ">= _Nm (which is %zu)"),
+					   __n, _Nm),
 	     _AT_Type::_S_ref(_M_elems, 0));
       }
 
diff --git a/libstdc++-v3/include/debug/functions.h b/libstdc++-v3/include/debug/functions.h
index 3f16098..d3a1223 100644
--- a/libstdc++-v3/include/debug/functions.h
+++ b/libstdc++-v3/include/debug/functions.h
@@ -345,11 +345,13 @@
       return __check_sorted_set_aux(__first, __last, __pred, _SameType());
    }
 
+  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+  // 270. Binary search requirements overly strict
+  // Determine if a sequence is partitioned w.r.t. this element.
   template<typename _ForwardIterator, typename _Tp>
     inline bool
-  __check_partitioned_lower_aux(_ForwardIterator __first,
-				_ForwardIterator __last, const _Tp& __value,
-				std::forward_iterator_tag)
+    __check_partitioned_lower(_ForwardIterator __first,
+			      _ForwardIterator __last, const _Tp& __value)
     {
       while (__first != __last && *__first < __value)
 	++__first;
@@ -362,38 +364,11 @@
       return __first == __last;
     }
 
-  // For performance reason, as the iterator range has been validated, check on
-  // random access safe iterators is done using the base iterator.
-  template<typename _Iterator, typename _Sequence, typename _Tp>
-    inline bool
-    __check_partitioned_lower_aux(
-			const _Safe_iterator<_Iterator, _Sequence>& __first,
-			const _Safe_iterator<_Iterator, _Sequence>& __last,
-			const _Tp& __value,
-			std::random_access_iterator_tag __tag)
-    {
-      return __check_partitioned_lower_aux(__first.base(), __last.base(),
-					   __value, __tag);
-    }
-
-  // _GLIBCXX_RESOLVE_LIB_DEFECTS
-  // 270. Binary search requirements overly strict
-  // Determine if a sequence is partitioned w.r.t. this element.
   template<typename _ForwardIterator, typename _Tp>
     inline bool
-    __check_partitioned_lower(_ForwardIterator __first,
+    __check_partitioned_upper(_ForwardIterator __first,
 			      _ForwardIterator __last, const _Tp& __value)
     {
-      return __check_partitioned_lower_aux(__first, __last, __value,
-					   std::__iterator_category(__first));
-    }
-
-  template<typename _ForwardIterator, typename _Tp>
-    inline bool
-    __check_partitioned_upper_aux(_ForwardIterator __first,
-				  _ForwardIterator __last, const _Tp& __value,
-				  std::forward_iterator_tag)
-    {
       while (__first != __last && !(__value < *__first))
 	++__first;
       if (__first != __last)
@@ -405,35 +380,12 @@
       return __first == __last;
     }
 
-  // For performance reason, as the iterator range has been validated, check on
-  // random access safe iterators is done using the base iterator.
-  template<typename _Iterator, typename _Sequence, typename _Tp>
-    inline bool
-    __check_partitioned_upper_aux(
-			const _Safe_iterator<_Iterator, _Sequence>& __first,
-			const _Safe_iterator<_Iterator, _Sequence>& __last,
-			const _Tp& __value,
-			std::random_access_iterator_tag __tag)
-    {
-      return __check_partitioned_upper_aux(__first.base(), __last.base(),
-					   __value, __tag);
-    }
-
-  template<typename _ForwardIterator, typename _Tp>
-    inline bool
-    __check_partitioned_upper(_ForwardIterator __first,
-			      _ForwardIterator __last, const _Tp& __value)
-    {
-      return __check_partitioned_upper_aux(__first, __last, __value,
-					   std::__iterator_category(__first));
-    }
-
+  // Determine if a sequence is partitioned w.r.t. this element.
   template<typename _ForwardIterator, typename _Tp, typename _Pred>
     inline bool
-    __check_partitioned_lower_aux(_ForwardIterator __first,
-				  _ForwardIterator __last, const _Tp& __value,
-				  _Pred __pred,
-				  std::forward_iterator_tag)
+    __check_partitioned_lower(_ForwardIterator __first,
+			      _ForwardIterator __last, const _Tp& __value,
+			      _Pred __pred)
     {
       while (__first != __last && bool(__pred(*__first, __value)))
 	++__first;
@@ -446,39 +398,12 @@
       return __first == __last;
     }
 
-  // For performance reason, as the iterator range has been validated, check on
-  // random access safe iterators is done using the base iterator.
-  template<typename _Iterator, typename _Sequence,
-	   typename _Tp, typename _Pred>
-    inline bool
-    __check_partitioned_lower_aux(
-			const _Safe_iterator<_Iterator, _Sequence>& __first,
-			const _Safe_iterator<_Iterator, _Sequence>& __last,
-			const _Tp& __value, _Pred __pred,
-			std::random_access_iterator_tag __tag)
-    {
-      return __check_partitioned_lower_aux(__first.base(), __last.base(),
-					   __value, __pred, __tag);
-    }
-
-  // Determine if a sequence is partitioned w.r.t. this element.
   template<typename _ForwardIterator, typename _Tp, typename _Pred>
     inline bool
-    __check_partitioned_lower(_ForwardIterator __first,
+    __check_partitioned_upper(_ForwardIterator __first,
 			      _ForwardIterator __last, const _Tp& __value,
 			      _Pred __pred)
     {
-      return __check_partitioned_lower_aux(__first, __last, __value, __pred,
-					   std::__iterator_category(__first));
-    }
-
-  template<typename _ForwardIterator, typename _Tp, typename _Pred>
-    inline bool
-    __check_partitioned_upper_aux(_ForwardIterator __first,
-				  _ForwardIterator __last, const _Tp& __value,
-				  _Pred __pred,
-				  std::forward_iterator_tag)
-    {
       while (__first != __last && !bool(__pred(__value, *__first)))
 	++__first;
       if (__first != __last)
@@ -490,31 +415,6 @@
       return __first == __last;
     }
 
-  // For performance reason, as the iterator range has been validated, check on
-  // random access safe iterators is done using the base iterator.
-  template<typename _Iterator, typename _Sequence,
-	   typename _Tp, typename _Pred>
-    inline bool
-    __check_partitioned_upper_aux(
-			const _Safe_iterator<_Iterator, _Sequence>& __first,
-			const _Safe_iterator<_Iterator, _Sequence>& __last,
-			const _Tp& __value, _Pred __pred,
-			std::random_access_iterator_tag __tag)
-    {
-      return __check_partitioned_upper_aux(__first.base(), __last.base(),
-					   __value, __pred, __tag);
-    }
-
-  template<typename _ForwardIterator, typename _Tp, typename _Pred>
-    inline bool
-    __check_partitioned_upper(_ForwardIterator __first,
-			      _ForwardIterator __last, const _Tp& __value,
-			      _Pred __pred)
-    {
-      return __check_partitioned_upper_aux(__first, __last, __value, __pred,
-					   std::__iterator_category(__first));
-    }
-
   // Helper struct to detect random access safe iterators.
   template<typename _Iterator>
     struct __is_safe_random_iterator
diff --git a/libstdc++-v3/include/debug/macros.h b/libstdc++-v3/include/debug/macros.h
index 26732c9..31bcaf3 100644
--- a/libstdc++-v3/include/debug/macros.h
+++ b/libstdc++-v3/include/debug/macros.h
@@ -261,8 +261,9 @@
     w.r.t. the value _Value. */
 #define __glibcxx_check_partitioned_lower(_First,_Last,_Value)		\
 __glibcxx_check_valid_range(_First,_Last);				\
-_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_lower(_First, _Last, \
-							    _Value),	\
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_lower(		\
+			__gnu_debug::__base(_First),			\
+			__gnu_debug::__base(_Last), _Value),		\
 		      _M_message(__gnu_debug::__msg_unpartitioned)      \
 		      ._M_iterator(_First, #_First)			\
 		      ._M_iterator(_Last, #_Last)			\
@@ -270,8 +271,9 @@
 
 #define __glibcxx_check_partitioned_upper(_First,_Last,_Value)		\
 __glibcxx_check_valid_range(_First,_Last);				\
-_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_upper(_First, _Last, \
-							    _Value),	\
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_upper(		\
+			__gnu_debug::__base(_First),			\
+			__gnu_debug::__base(_Last), _Value),		\
 		      _M_message(__gnu_debug::__msg_unpartitioned)      \
 		      ._M_iterator(_First, #_First)			\
 		      ._M_iterator(_Last, #_Last)			\
@@ -281,8 +283,9 @@
     w.r.t. the value _Value and predicate _Pred. */
 #define __glibcxx_check_partitioned_lower_pred(_First,_Last,_Value,_Pred) \
 __glibcxx_check_valid_range(_First,_Last);				\
-_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_lower(_First, _Last, \
-							 _Value, _Pred), \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_lower(		\
+			__gnu_debug::__base(_First),			\
+			__gnu_debug::__base(_Last), _Value, _Pred),	\
 		      _M_message(__gnu_debug::__msg_unpartitioned_pred) \
 		      ._M_iterator(_First, #_First)			\
 		      ._M_iterator(_Last, #_Last)			\
@@ -293,8 +296,9 @@
     w.r.t. the value _Value and predicate _Pred. */
 #define __glibcxx_check_partitioned_upper_pred(_First,_Last,_Value,_Pred) \
 __glibcxx_check_valid_range(_First,_Last);				\
-_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_upper(_First, _Last, \
-							 _Value, _Pred), \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_upper(		\
+			__gnu_debug::__base(_First),			\
+			__gnu_debug::__base(_Last), _Value, _Pred),	\
 		      _M_message(__gnu_debug::__msg_unpartitioned_pred) \
 		      ._M_iterator(_First, #_First)			\
 		      ._M_iterator(_Last, #_Last)			\
diff --git a/libstdc++-v3/include/ext/sso_string_base.h b/libstdc++-v3/include/ext/sso_string_base.h
index c02cb8b..5a60c14 100644
--- a/libstdc++-v3/include/ext/sso_string_base.h
+++ b/libstdc++-v3/include/ext/sso_string_base.h
@@ -387,9 +387,9 @@
 	  _M_capacity(__rcs._M_allocated_capacity);
 	}
 
-      _M_length(__rcs._M_length());
-      __rcs._M_length(0);
+      _M_set_length_no_wipe(__rcs._M_length());
       __rcs._M_data(__rcs._M_local_data);
+      __rcs._M_set_length_no_wipe(0);
     }
 #endif
 
diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h
index db2e964..d820a4b 100644
--- a/libstdc++-v3/include/ext/vstring.h
+++ b/libstdc++-v3/include/ext/vstring.h
@@ -100,7 +100,9 @@
       _M_check(size_type __pos, const char* __s) const
       {
 	if (__pos > this->size())
-	  std::__throw_out_of_range(__N(__s));
+	  std::__throw_out_of_range_fmt(__N("%s: __pos (which is %zu) > "
+					    "this->size() (which is %zu)"),
+					__s, __pos, this->size());
 	return __pos;
       }
 
@@ -596,7 +598,10 @@
       at(size_type __n) const
       {
 	if (__n >= this->size())
-	  std::__throw_out_of_range(__N("__versa_string::at"));
+	  std::__throw_out_of_range_fmt(__N("__versa_string::at: __n "
+					    "(which is %zu) >= this->size() "
+					    "(which is %zu)"),
+					__n, this->size());
 	return this->_M_data()[__n];
       }
 
@@ -615,7 +620,10 @@
       at(size_type __n)
       {
 	if (__n >= this->size())
-	  std::__throw_out_of_range(__N("__versa_string::at"));
+	  std::__throw_out_of_range_fmt(__N("__versa_string::at: __n "
+					    "(which is %zu) >= this->size() "
+					    "(which is %zu)"),
+					__n, this->size());
 	this->_M_leak();
 	return this->_M_data()[__n];
       }
diff --git a/libstdc++-v3/include/profile/array b/libstdc++-v3/include/profile/array
index bd6da6c..43ce63b 100644
--- a/libstdc++-v3/include/profile/array
+++ b/libstdc++-v3/include/profile/array
@@ -138,7 +138,10 @@
       at(size_type __n)
       {
 	if (__n >= _Nm)
-	  std::__throw_out_of_range(__N("array::at"));
+	  std::__throw_out_of_range_fmt(__N("array::at: __n "
+				            "(which is %zu) >= _Nm "
+					    "(which is %zu)"),
+					__n, _Nm);
 	return _AT_Type::_S_ref(_M_elems, __n);
       }
 
@@ -148,7 +151,9 @@
 	// Result of conditional expression must be an lvalue so use
 	// boolean ? lvalue : (throw-expr, lvalue)
 	return __n < _Nm ? _AT_Type::_S_ref(_M_elems, __n)
-	  : (std::__throw_out_of_range(__N("array::at")),
+	  : (std::__throw_out_of_range_fmt(__N("array::at: __n (which is %zu) "
+					       ">= _Nm (which is %zu)"),
+					   __n, _Nm),
 	     _AT_Type::_S_ref(_M_elems, 0));
       }
 
diff --git a/libstdc++-v3/include/std/array b/libstdc++-v3/include/std/array
index 0d2a71c..bde17b5 100644
--- a/libstdc++-v3/include/std/array
+++ b/libstdc++-v3/include/std/array
@@ -180,7 +180,9 @@
       at(size_type __n)
       {
 	if (__n >= _Nm)
-	  std::__throw_out_of_range(__N("array::at"));
+	  std::__throw_out_of_range_fmt(__N("array::at: __n (which is %zu) "
+					    ">= _Nm (which is %zu)"),
+					__n, _Nm);
 	return _AT_Type::_S_ref(_M_elems, __n);
       }
 
@@ -190,7 +192,9 @@
 	// Result of conditional expression must be an lvalue so use
 	// boolean ? lvalue : (throw-expr, lvalue)
 	return __n < _Nm ? _AT_Type::_S_ref(_M_elems, __n)
-	  : (std::__throw_out_of_range(__N("array::at")),
+	  : (std::__throw_out_of_range_fmt(__N("array::at: __n (which is %zu) "
+					       ">= _Nm (which is %zu)"),
+					   __n, _Nm),
 	     _AT_Type::_S_ref(_M_elems, 0));
       }
 
diff --git a/libstdc++-v3/include/std/bitset b/libstdc++-v3/include/std/bitset
index 1da6baf..708a434 100644
--- a/libstdc++-v3/include/std/bitset
+++ b/libstdc++-v3/include/std/bitset
@@ -752,6 +752,26 @@
       typedef _Base_bitset<_GLIBCXX_BITSET_WORDS(_Nb)> _Base;
       typedef unsigned long _WordT;
 
+      template<class _CharT, class _Traits, class _Alloc>
+      void
+      _M_check_initial_position(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
+				size_t __position) const
+      {
+	if (__position > __s.size())
+	  __throw_out_of_range_fmt(__N("bitset::bitset: __position "
+				       "(which is %zu) > __s.size() "
+				       "(which is %zu)"),
+				   __position, __s.size());
+      }
+
+      void _M_check(size_t __position, const char *__s) const
+      {
+	if (__position >= _Nb)
+	  __throw_out_of_range_fmt(__N("%s: __position (which is %zu) "
+				       ">= _Nb (which is %zu)"),
+				   __s, __position, _Nb);
+      }
+
       void
       _M_do_sanitize() _GLIBCXX_NOEXCEPT
       { 
@@ -867,9 +887,7 @@
 	       size_t __position = 0)
 	: _Base()
 	{
-	  if (__position > __s.size())
-	    __throw_out_of_range(__N("bitset::bitset initial position "
-				     "not valid"));
+	  _M_check_initial_position(__s, __position);
 	  _M_copy_from_string(__s, __position,
 			      std::basic_string<_CharT, _Traits, _Alloc>::npos,
 			      _CharT('0'), _CharT('1'));
@@ -890,9 +908,7 @@
 	       size_t __position, size_t __n)
 	: _Base()
 	{
-	  if (__position > __s.size())
-	    __throw_out_of_range(__N("bitset::bitset initial position "
-				     "not valid"));
+	  _M_check_initial_position(__s, __position);
 	  _M_copy_from_string(__s, __position, __n, _CharT('0'), _CharT('1'));
 	}
 
@@ -904,9 +920,7 @@
 	       _CharT __zero, _CharT __one = _CharT('1'))
 	: _Base()
 	{
-	  if (__position > __s.size())
-	    __throw_out_of_range(__N("bitset::bitset initial position "
-				     "not valid"));
+	  _M_check_initial_position(__s, __position);
 	  _M_copy_from_string(__s, __position, __n, __zero, __one);
 	}
 
@@ -1067,8 +1081,7 @@
       bitset<_Nb>&
       set(size_t __position, bool __val = true)
       {
-	if (__position >= _Nb)
-	  __throw_out_of_range(__N("bitset::set"));
+	this->_M_check(__position, __N("bitset::set"));
 	return _Unchecked_set(__position, __val);
       }
 
@@ -1092,8 +1105,7 @@
       bitset<_Nb>&
       reset(size_t __position)
       {
-	if (__position >= _Nb)
-	  __throw_out_of_range(__N("bitset::reset"));
+	this->_M_check(__position, __N("bitset::reset"));
 	return _Unchecked_reset(__position);
       }
       
@@ -1116,8 +1128,7 @@
       bitset<_Nb>&
       flip(size_t __position)
       {
-	if (__position >= _Nb)
-	  __throw_out_of_range(__N("bitset::flip"));
+	this->_M_check(__position, __N("bitset::flip"));
 	return _Unchecked_flip(__position);
       }
       
@@ -1302,8 +1313,7 @@
       bool
       test(size_t __position) const
       {
-	if (__position >= _Nb)
-	  __throw_out_of_range(__N("bitset::test"));
+	this->_M_check(__position, __N("bitset::test"));
 	return _Unchecked_test(__position);
       }
 
diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional
index 0807a71..64b6dae 100644
--- a/libstdc++-v3/include/std/functional
+++ b/libstdc++-v3/include/std/functional
@@ -1964,7 +1964,7 @@
 
 	template<typename _Tp>
 	  static bool
-	  _M_not_empty_function(const _Tp*& __fp)
+	  _M_not_empty_function(_Tp* const& __fp)
 	  { return __fp; }
 
 	template<typename _Class, typename _Tp>
@@ -2160,6 +2160,10 @@
       }
     };
 
+  template<typename _From, typename _To>
+    using __check_func_return_type
+      = __or_<is_void<_To>, is_convertible<_From, _To>>;
+
   /**
    *  @brief Primary class template for std::function.
    *  @ingroup functors
@@ -2177,16 +2181,8 @@
 	using _Invoke = decltype(__callable_functor(std::declval<_Functor&>())
 				 (std::declval<_ArgTypes>()...) );
 
-      template<typename _CallRes, typename _Res1>
-	struct _CheckResult
-	: is_convertible<_CallRes, _Res1> { };
-
-      template<typename _CallRes>
-	struct _CheckResult<_CallRes, void>
-	: true_type { };
-
       template<typename _Functor>
-	using _Callable = _CheckResult<_Invoke<_Functor>, _Res>;
+	using _Callable = __check_func_return_type<_Invoke<_Functor>, _Res>;
 
       template<typename _Cond, typename _Tp>
 	using _Requires = typename enable_if<_Cond::value, _Tp>::type;
diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex
index 67f3418..3093d9a 100644
--- a/libstdc++-v3/include/std/mutex
+++ b/libstdc++-v3/include/std/mutex
@@ -237,25 +237,12 @@
     template <class _Rep, class _Period>
       bool
       try_lock_for(const chrono::duration<_Rep, _Period>& __rtime)
-      { return __try_lock_for_impl(__rtime); }
+      { return _M_try_lock_for(__rtime); }
 
     template <class _Clock, class _Duration>
       bool
       try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime)
-      {
-	chrono::time_point<_Clock, chrono::seconds> __s =
-	  chrono::time_point_cast<chrono::seconds>(__atime);
-
-	chrono::nanoseconds __ns =
-	  chrono::duration_cast<chrono::nanoseconds>(__atime - __s);
-
-	__gthread_time_t __ts = {
-	  static_cast<std::time_t>(__s.time_since_epoch().count()),
-	  static_cast<long>(__ns.count())
-	};
-
-	return !__gthread_mutex_timedlock(&_M_mutex, &__ts);
-      }
+      { return _M_try_lock_until(__atime); }
 
     void
     unlock()
@@ -270,26 +257,39 @@
 
   private:
     template<typename _Rep, typename _Period>
-      typename enable_if<
-	ratio_less_equal<__clock_t::period, _Period>::value, bool>::type
-      __try_lock_for_impl(const chrono::duration<_Rep, _Period>& __rtime)
+      bool
+      _M_try_lock_for(const chrono::duration<_Rep, _Period>& __rtime)
       {
-	__clock_t::time_point __atime = __clock_t::now()
-	  + chrono::duration_cast<__clock_t::duration>(__rtime);
+	auto __rt = chrono::duration_cast<__clock_t::duration>(__rtime);
+	if (ratio_greater<__clock_t::period, _Period>())
+	  ++__rt;
 
-	return try_lock_until(__atime);
+	return _M_try_lock_until(__clock_t::now() + __rt);
       }
 
-    template <typename _Rep, typename _Period>
-      typename enable_if<
-	!ratio_less_equal<__clock_t::period, _Period>::value, bool>::type
-      __try_lock_for_impl(const chrono::duration<_Rep, _Period>& __rtime)
+    template<typename _Duration>
+      bool
+      _M_try_lock_until(const chrono::time_point<__clock_t,
+						 _Duration>& __atime)
       {
-	__clock_t::time_point __atime = __clock_t::now()
-	  + ++chrono::duration_cast<__clock_t::duration>(__rtime);
+	chrono::time_point<__clock_t, chrono::seconds> __s =
+	  chrono::time_point_cast<chrono::seconds>(__atime);
 
-	return try_lock_until(__atime);
+	chrono::nanoseconds __ns =
+	  chrono::duration_cast<chrono::nanoseconds>(__atime - __s);
+
+	__gthread_time_t __ts = {
+	  static_cast<std::time_t>(__s.time_since_epoch().count()),
+	  static_cast<long>(__ns.count())
+	};
+
+	return !__gthread_mutex_timedlock(native_handle(), &__ts);
       }
+
+    template<typename _Clock, typename _Duration>
+      bool
+      _M_try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime)
+      { return _M_try_lock_for(__atime - _Clock::now()); }
   };
 
   /// recursive_timed_mutex
@@ -330,25 +330,12 @@
     template <class _Rep, class _Period>
       bool
       try_lock_for(const chrono::duration<_Rep, _Period>& __rtime)
-      { return __try_lock_for_impl(__rtime); }
+      { return _M_try_lock_for(__rtime); }
 
     template <class _Clock, class _Duration>
       bool
       try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime)
-      {
-	chrono::time_point<_Clock, chrono::seconds>  __s =
-	  chrono::time_point_cast<chrono::seconds>(__atime);
-
-	chrono::nanoseconds __ns =
-	  chrono::duration_cast<chrono::nanoseconds>(__atime - __s);
-
-	__gthread_time_t __ts = {
-	  static_cast<std::time_t>(__s.time_since_epoch().count()),
-	  static_cast<long>(__ns.count())
-	};
-
-	return !__gthread_recursive_mutex_timedlock(&_M_mutex, &__ts);
-      }
+      { return _M_try_lock_until(__atime); }
 
     void
     unlock()
@@ -363,26 +350,39 @@
 
   private:
     template<typename _Rep, typename _Period>
-      typename enable_if<
-	ratio_less_equal<__clock_t::period, _Period>::value, bool>::type
-      __try_lock_for_impl(const chrono::duration<_Rep, _Period>& __rtime)
+      bool
+      _M_try_lock_for(const chrono::duration<_Rep, _Period>& __rtime)
       {
-	__clock_t::time_point __atime = __clock_t::now()
-	  + chrono::duration_cast<__clock_t::duration>(__rtime);
+	auto __rt = chrono::duration_cast<__clock_t::duration>(__rtime);
+	if (ratio_greater<__clock_t::period, _Period>())
+	  ++__rt;
 
-	return try_lock_until(__atime);
+	return _M_try_lock_until(__clock_t::now() + __rt);
       }
 
-    template <typename _Rep, typename _Period>
-      typename enable_if<
-	!ratio_less_equal<__clock_t::period, _Period>::value, bool>::type
-      __try_lock_for_impl(const chrono::duration<_Rep, _Period>& __rtime)
+    template<typename _Duration>
+      bool
+      _M_try_lock_until(const chrono::time_point<__clock_t,
+						 _Duration>& __atime)
       {
-	__clock_t::time_point __atime = __clock_t::now()
-	  + ++chrono::duration_cast<__clock_t::duration>(__rtime);
+	chrono::time_point<__clock_t, chrono::seconds> __s =
+	  chrono::time_point_cast<chrono::seconds>(__atime);
 
-	return try_lock_until(__atime);
+	chrono::nanoseconds __ns =
+	  chrono::duration_cast<chrono::nanoseconds>(__atime - __s);
+
+	__gthread_time_t __ts = {
+	  static_cast<std::time_t>(__s.time_since_epoch().count()),
+	  static_cast<long>(__ns.count())
+	};
+
+	return !__gthread_mutex_timedlock(native_handle(), &__ts);
       }
+
+    template<typename _Clock, typename _Duration>
+      bool
+      _M_try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime)
+      { return _M_try_lock_for(__atime - _Clock::now()); }
   };
 #endif
 #endif // _GLIBCXX_HAS_GTHREADS
diff --git a/libstdc++-v3/testsuite/20_util/function/58569.cc b/libstdc++-v3/testsuite/20_util/function/58569.cc
new file mode 100644
index 0000000..f1e67bc
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/function/58569.cc
@@ -0,0 +1,29 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// libstdc++/58569
+
+#include <functional>
+
+struct foo {
+  std::function<foo (int)> x;
+  std::function<foo ()> y;
+};
+
+foo a;
diff --git a/libstdc++-v3/testsuite/20_util/function/cons/57465.cc b/libstdc++-v3/testsuite/20_util/function/cons/57465.cc
new file mode 100644
index 0000000..44413fb
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/function/cons/57465.cc
@@ -0,0 +1,31 @@
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// libstdc++/57465
+
+// { dg-options "-std=gnu++11" }
+
+#include <functional>
+#include <testsuite_hooks.h>
+
+int main()
+{
+  using F = void();
+  F* f = nullptr;
+  std::function<F> x(f);
+  VERIFY( !x );
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
index 6fa34a9..2844619 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
@@ -1,7 +1,7 @@
 // { dg-options "-std=gnu++0x" }
 // { dg-do compile }
 
-// Copyright (C) 2010-2013 Free Software Foundation, Inc.
+// Copyright (C) 2010-2014 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -32,7 +32,7 @@
 {
   X* px = 0;
   std::shared_ptr<X> p1(px);   // { dg-error "here" }
-  // { dg-error "incomplete" "" { target *-*-* } 771 }
+  // { dg-error "incomplete" "" { target *-*-* } 805 }
 
   std::shared_ptr<X> p9(ap());  // { dg-error "here" }
   // { dg-error "incomplete" "" { target *-*-* } 307 }
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/58659.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/58659.cc
new file mode 100644
index 0000000..9315796
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/58659.cc
@@ -0,0 +1,68 @@
+// { dg-options "-std=gnu++11" }
+
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct X { };
+
+using spcd = std::_Sp_counted_deleter<X*, std::default_delete<X>,
+std::allocator<void>, std::__default_lock_policy>;
+
+namespace std
+{
+  template<>
+    struct allocator<spcd>
+    {
+      using value_type = spcd;
+
+      allocator() = default;
+
+      template<typename U>
+        allocator(const allocator<U>&) { }
+
+      value_type* allocate(size_t n)
+      {
+        if (n != 1)
+          throw bad_alloc();
+        allocated = true;
+        return static_cast<value_type*>((void*)(storage));
+      }
+
+      void deallocate(value_type* p, size_t n)
+      {
+        VERIFY(n == 1 && p == (void*)storage && allocated);
+        allocated = false;
+      }
+
+      static char storage[sizeof(spcd)];
+      static bool allocated;
+    };
+
+  char allocator<spcd>::storage[];
+  bool allocator<spcd>::allocated = false;
+}
+
+int main()
+{
+  std::shared_ptr<X> s( std::unique_ptr<X>(new X) );
+  VERIFY( std::allocator<spcd>::allocated );
+  s.reset();
+  VERIFY( !std::allocator<spcd>::allocated );
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/58839.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/58839.cc
new file mode 100644
index 0000000..f78a07f
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/58839.cc
@@ -0,0 +1,33 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <memory>
+
+// libstdc++/58839
+
+struct D {
+  void operator()(void*) const noexcept { }
+};
+
+void test01()
+{
+  std::unique_ptr<void, D> y;
+  std::shared_ptr<void> x = std::move(y);
+}
diff --git a/libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_neg.cc b/libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_neg.cc
index d465cd2..ca6f9f8 100644
--- a/libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_neg.cc
@@ -28,6 +28,6 @@
 int n2 = std::get<1>(std::move(a));
 int n3 = std::get<1>(ca);
 
-// { dg-error "static assertion failed" "" { target *-*-* } 270 }
-// { dg-error "static assertion failed" "" { target *-*-* } 279 }
-// { dg-error "static assertion failed" "" { target *-*-* } 287 }
+// { dg-error "static assertion failed" "" { target *-*-* } 274 }
+// { dg-error "static assertion failed" "" { target *-*-* } 283 }
+// { dg-error "static assertion failed" "" { target *-*-* } 291 }
diff --git a/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc b/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc
index 3a52607..0648bc1 100644
--- a/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc
@@ -23,4 +23,4 @@
 
 typedef std::tuple_element<1, std::array<int, 1>>::type type;
 
-// { dg-error "static assertion failed" "" { target *-*-* } 316 }
+// { dg-error "static assertion failed" "" { target *-*-* } 320 }
diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc
index 6275f97..ba2b2f3 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1730 }
+// { dg-error "no matching" "" { target *-*-* } 1745 }
 
 #include <deque>
 
diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc
index 7a7b9df..03ad79f 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1663 }
+// { dg-error "no matching" "" { target *-*-* } 1678 }
 
 #include <deque>
 
diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc
index 8dc5468..fe5a7c5 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1663 }
+// { dg-error "no matching" "" { target *-*-* } 1678 }
 
 #include <deque>
 #include <utility>
diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc
index a7acea6..b55ebcf 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1814 }
+// { dg-error "no matching" "" { target *-*-* } 1829 }
 
 #include <deque>
 
diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
index 71965c9..47db344 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1361 }
+// { dg-error "no matching" "" { target *-*-* } 1401 }
 
 #include <vector>
 
diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
index cfe19a8..c1549b6 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1287 }
+// { dg-error "no matching" "" { target *-*-* } 1327 }
 
 #include <vector>
 
diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
index 2afdd89..b1e74aa 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1287 }
+// { dg-error "no matching" "" { target *-*-* } 1327 }
 
 #include <vector>
 #include <utility>
diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc
index ec32ec2..4d18ae35 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1402 }
+// { dg-error "no matching" "" { target *-*-* } 1442 }
 
 #include <vector>
 
diff --git a/libstdc++-v3/testsuite/25_algorithms/nth_element/58800.cc b/libstdc++-v3/testsuite/25_algorithms/nth_element/58800.cc
new file mode 100644
index 0000000..108c0e5
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/nth_element/58800.cc
@@ -0,0 +1,52 @@
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// 25.3.2 [lib.alg.nth.element]
+
+// { dg-options "-std=gnu++11" }
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+#include <testsuite_iterators.h>
+
+using __gnu_test::test_container;
+using __gnu_test::random_access_iterator_wrapper;
+
+typedef test_container<int, random_access_iterator_wrapper> Container;
+
+void test01()
+{
+  std::vector<int> v = {
+    207089,
+    202585,
+    180067,
+    157549,
+    211592,
+    216096,
+    207089
+  };
+
+  Container con(v.data(), v.data() + 7);
+
+  std::nth_element(con.begin(), con.begin() + 3, con.end());
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/search_n/58358.cc b/libstdc++-v3/testsuite/25_algorithms/search_n/58358.cc
new file mode 100644
index 0000000..b5ae346
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/search_n/58358.cc
@@ -0,0 +1,41 @@
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++11" }
+
+// 25.1.9 [lib.alg.search]
+
+#include <algorithm>
+#include <vector>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::vector<int> a{2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
+  int count = 0;
+  std::search_n(a.begin(), a.end(), 10, 1,
+		[&count](int t, int u) { ++count; return t == u; });
+  VERIFY( count <= 11 );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/search_n/iterator.cc b/libstdc++-v3/testsuite/25_algorithms/search_n/iterator.cc
index 27cffe7..1061696 100644
--- a/libstdc++-v3/testsuite/25_algorithms/search_n/iterator.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/search_n/iterator.cc
@@ -31,9 +31,11 @@
 int array1[11] = {0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0};
 int array2[TEST_DEPTH];
 
+int pred_count;
 bool 
 pred(int i, int j)
 {
+  ++pred_count;
   return i == j;
 }
 
@@ -90,16 +92,22 @@
 
 	    int* t1 = search_n(forwardcon.begin(),
 			       forwardcon.end(), j, 1).ptr;
+	    pred_count = 0;
 	    int* t2 = search_n(forwardcon.begin(),
 			       forwardcon.end(), j, 1, pred).ptr;
+	    VERIFY(pred_count <= i);
 	    int* t3 = search_n(bidircon.begin(),
 			       bidircon.end(), j, 1).ptr;
+	    pred_count = 0;
 	    int* t4 = search_n(bidircon.begin(),
 			       bidircon.end(), j, 1, pred).ptr;
+	    VERIFY(pred_count <= i);
 	    int* t5 = search_n(randomcon.begin(),
 			       randomcon.end(), j, 1).ptr;
+	    pred_count = 0;
 	    int* t6 = search_n(randomcon.begin(),
 			       randomcon.end(), j, 1, pred).ptr;
+	    VERIFY(pred_count <= i);
 	    VERIFY((t1 == t2) && (t2 == t3) && (t3 == t4) &&
 		   (t4 == t5) && (t5 == t6));
 	  }
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/57641.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/57641.cc
new file mode 100644
index 0000000..94fe5b3
--- /dev/null
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/57641.cc
@@ -0,0 +1,69 @@
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
+// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* powerpc-ibm-aix* } }
+// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+// { dg-require-cstdint "" }
+// { dg-require-gthreads-timed "" }
+
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <mutex>
+#include <chrono>
+#include <thread>
+#include <testsuite_hooks.h>
+
+// PR libstdc++/57641
+
+namespace C = std::chrono;
+
+// custom clock with epoch 10s before system_clock's
+struct clock
+{
+  typedef C::system_clock::rep rep;
+  typedef C::system_clock::period period;
+  typedef C::system_clock::duration duration;
+  typedef C::time_point<clock> time_point;
+  static constexpr bool is_steady = C::system_clock::is_steady;
+
+  static time_point
+  now()
+  {
+    auto sys_time = C::system_clock::now().time_since_epoch();
+    return time_point(sys_time + C::seconds(10));
+  }
+};
+
+std::timed_mutex mx;
+bool test = false;
+
+void f()
+{
+  test = mx.try_lock_until(clock::now() + C::milliseconds(1));
+}
+
+int main()
+{
+  bool test = false;
+  std::lock_guard<std::timed_mutex> l(mx);
+  auto start = C::system_clock::now();
+  std::thread t(f);
+  t.join();
+  auto stop = C::system_clock::now();
+  VERIFY( (stop - start) < C::seconds(9) );
+  VERIFY( !test );
+}
diff --git a/libstdc++-v3/testsuite/ext/vstring/cons/58415-1.cc b/libstdc++-v3/testsuite/ext/vstring/cons/58415-1.cc
new file mode 100644
index 0000000..cfcb893
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/vstring/cons/58415-1.cc
@@ -0,0 +1,41 @@
+// { dg-options "-std=gnu++11" }
+// { dg-require-string-conversions "" }
+
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/vstring.h>
+#include <testsuite_hooks.h>
+
+typedef __gnu_cxx::__versa_string<char> string;
+
+void test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  string s1("string");
+  string s2("");
+  std::swap(s1, s2);
+
+  VERIFY( s1.c_str()[0] == '\0' );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/vstring/cons/58415-2.cc b/libstdc++-v3/testsuite/ext/vstring/cons/58415-2.cc
new file mode 100644
index 0000000..9ba192a
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/vstring/cons/58415-2.cc
@@ -0,0 +1,38 @@
+// { dg-options "-std=gnu++11" }
+// { dg-require-string-conversions "" }
+
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/vstring.h>
+#include <testsuite_hooks.h>
+
+typedef __gnu_cxx::__versa_string<char> string;
+
+void test01()
+{
+  string s1;
+  string s2 = std::move(s1);
+
+  VERIFY( s2.c_str()[0] == '\0' );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/performance/25_algorithms/sort.cc b/libstdc++-v3/testsuite/performance/25_algorithms/sort.cc
new file mode 100644
index 0000000..07062ab
--- /dev/null
+++ b/libstdc++-v3/testsuite/performance/25_algorithms/sort.cc
@@ -0,0 +1,65 @@
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <vector>
+#include <algorithm>
+#include <testsuite_performance.h>
+
+int main()
+{
+  using namespace __gnu_test;
+
+  time_counter time;
+  resource_counter resource;
+
+  const int max_size = 10000000;
+
+  std::vector<int> v(max_size);
+
+  for (int i = 0; i < max_size; ++i)
+    v[i] = -i;
+
+  start_counters(time, resource);
+  std::sort(v.begin(), v.end());
+  stop_counters(time, resource);
+
+  report_performance(__FILE__, "reverse", time, resource);
+  clear_counters(time, resource);
+
+  for (int i = 0; i < max_size; ++i)
+    v[i] = i;
+
+  start_counters(time, resource);
+  std::sort(v.begin(), v.end());
+  stop_counters(time, resource);
+
+  report_performance(__FILE__, "forwards", time, resource);
+  clear_counters(time, resource);
+
+  // a simple psuedo-random series which does not rely on rand() and friends
+  v[0] = 0;
+  for (int i = 1; i < max_size; ++i)
+    v[i] = (v[i-1] + 110211473) * 745988807;
+
+  start_counters(time, resource);
+  std::sort(v.begin(), v.end());
+  stop_counters(time, resource);
+
+  report_performance(__FILE__, "random", time, resource);
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/performance/25_algorithms/sort_heap.cc b/libstdc++-v3/testsuite/performance/25_algorithms/sort_heap.cc
new file mode 100644
index 0000000..63cb224
--- /dev/null
+++ b/libstdc++-v3/testsuite/performance/25_algorithms/sort_heap.cc
@@ -0,0 +1,73 @@
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <vector>
+#include <algorithm>
+#include <testsuite_performance.h>
+
+int main()
+{
+  using namespace __gnu_test;
+
+  time_counter time;
+  resource_counter resource;
+
+  const int max_size = 10000000;
+
+  std::vector<int> v(max_size);
+
+  for (int i = 0; i < max_size; ++i)
+    v[i] = -i;
+
+  start_counters(time, resource);
+  std::make_heap(v.begin(), v.end());
+  stop_counters(time, resource);
+
+  report_performance(__FILE__, "make_heap_reverse", time, resource);
+  clear_counters(time, resource);
+
+  for (int i = 0; i < max_size; ++i)
+    v[i] = i;
+
+  start_counters(time, resource);
+  std::make_heap(v.begin(), v.end());
+  stop_counters(time, resource);
+
+  report_performance(__FILE__, "make_heap_forwards", time, resource);
+  clear_counters(time, resource);
+
+  // a simple psuedo-random series which does not rely on rand() and friends
+  v[0] = 0;
+  for (int i = 1; i < max_size; ++i)
+    v[i] = (v[i-1] + 110211473) * 745988807;
+
+  start_counters(time, resource);
+  std::make_heap(v.begin(), v.end());
+  stop_counters(time, resource);
+
+  report_performance(__FILE__, "make_heap_random", time, resource);
+
+
+  start_counters(time, resource);
+  std::sort_heap(v.begin(), v.end());
+  stop_counters(time, resource);
+
+  report_performance(__FILE__, "sort_heap", time, resource);
+  clear_counters(time, resource);
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/performance/25_algorithms/stable_sort.cc b/libstdc++-v3/testsuite/performance/25_algorithms/stable_sort.cc
new file mode 100644
index 0000000..6440eb3
--- /dev/null
+++ b/libstdc++-v3/testsuite/performance/25_algorithms/stable_sort.cc
@@ -0,0 +1,65 @@
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <vector>
+#include <algorithm>
+#include <testsuite_performance.h>
+
+int main()
+{
+  using namespace __gnu_test;
+
+  time_counter time;
+  resource_counter resource;
+
+  const int max_size = 10000000;
+
+  std::vector<int> v(max_size);
+
+  for (int i = 0; i < max_size; ++i)
+    v[i] = -i;
+
+  start_counters(time, resource);
+  std::stable_sort(v.begin(), v.end());
+  stop_counters(time, resource);
+
+  report_performance(__FILE__, "reverse", time, resource);
+  clear_counters(time, resource);
+
+  for (int i = 0; i < max_size; ++i)
+    v[i] = i;
+
+  start_counters(time, resource);
+  std::stable_sort(v.begin(), v.end());
+  stop_counters(time, resource);
+
+  report_performance(__FILE__, "forwards", time, resource);
+  clear_counters(time, resource);
+
+  // a simple psuedo-random series which does not rely on rand() and friends
+  v[0] = 0;
+  for (int i = 1; i < max_size; ++i)
+    v[i] = (v[i-1] + 110211473) * 745988807;
+
+  start_counters(time, resource);
+  std::stable_sort(v.begin(), v.end());
+  stop_counters(time, resource);
+
+  report_performance(__FILE__, "random", time, resource);
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/util/exception/safety.h b/libstdc++-v3/testsuite/util/exception/safety.h
index b6bfa32..fa45cf5 100644
--- a/libstdc++-v3/testsuite/util/exception/safety.h
+++ b/libstdc++-v3/testsuite/util/exception/safety.h
@@ -47,22 +47,12 @@
       const typename distribution_type::param_type p(0, __max_size);
       size_type random = generator(p);
       if (random < distribution.min() || random > distribution.max())
-	{
-	  std::string __s("setup_base::generate");
-	  __s += "\n";
-	  __s += "random number generated is: ";
-	  char buf[40];
-	  __builtin_sprintf(buf, "%lu", (unsigned long)random);
-	  __s += buf;
-	  __s += " on range [";
-	  __builtin_sprintf(buf, "%lu", (unsigned long)distribution.min());
-	  __s += buf;
-	  __s += ", ";
-	  __builtin_sprintf(buf, "%lu", (unsigned long)distribution.max());
-	  __s += buf;
-	  __s += "]\n";
-	  std::__throw_out_of_range(__s.c_str());
-	}
+	std::__throw_out_of_range_fmt(__N("setup_base::generate\n"
+					  "random number generated is: %zu "
+					  "out of range [%zu, %zu]\n"),
+				      (size_t)random,
+				      (size_t)distribution.min(),
+				      (size_t)distribution.max());
       return random;
     }
 
diff --git a/libstdc++-v3/testsuite/util/testsuite_abi.cc b/libstdc++-v3/testsuite/util/testsuite_abi.cc
index 67f260d..bf3016b 100644
--- a/libstdc++-v3/testsuite/util/testsuite_abi.cc
+++ b/libstdc++-v3/testsuite/util/testsuite_abi.cc
@@ -196,6 +196,7 @@
       known_versions.push_back("GLIBCXX_3.4.17");
       known_versions.push_back("GLIBCXX_3.4.18");
       known_versions.push_back("GLIBCXX_3.4.19");
+      known_versions.push_back("GLIBCXX_3.4.20");
       known_versions.push_back("GLIBCXX_LDBL_3.4");
       known_versions.push_back("GLIBCXX_LDBL_3.4.7");
       known_versions.push_back("GLIBCXX_LDBL_3.4.10");
@@ -224,7 +225,7 @@
 	test.version_status = symbol::incompatible;
 
       // Check that added symbols are added in the latest pre-release version.
-      bool latestp = (test.version_name == "GLIBCXX_3.4.19"
+      bool latestp = (test.version_name == "GLIBCXX_3.4.20"
 		     || test.version_name == "CXXABI_1.3.7"
 		     || test.version_name == "CXXABI_TM_1");
       if (added && !latestp)
diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog
index 66e07b4..01d1ed9 100644
--- a/lto-plugin/ChangeLog
+++ b/lto-plugin/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog
index f1404ad..82c25b3 100644
--- a/maintainer-scripts/ChangeLog
+++ b/maintainer-scripts/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.
diff --git a/zlib/ChangeLog b/zlib/ChangeLog
index a886dbd..73bedd2 100644
--- a/zlib/ChangeLog
+++ b/zlib/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-16  Release Manager
+
+	* GCC 4.8.2 released.
+
 2013-05-31  Release Manager
 
 	* GCC 4.8.1 released.