diff -pruN 4.7.3-1/debian/changelog 4.7.3-2/debian/changelog
--- 4.7.3-1/debian/changelog	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/changelog	2013-05-08 15:38:04.000000000 +0000
@@ -1,3 +1,10 @@
+gcj-4.7 (4.7.3-2) unstable; urgency=low
+
+  * Merge the packaging and updates with gcc-4.7 4.7.3-3.
+  * Disable multilib dejagnu runs for gcj.
+
+ -- Matthias Klose <doko@debian.org>  Wed, 08 May 2013 12:37:08 +0200
+
 gcj-4.7 (4.7.3-1) experimental; urgency=low
 
   * GCC 4.7.3 release.
diff -pruN 4.7.3-1/debian/control 4.7.3-2/debian/control
--- 4.7.3-1/debian/control	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/control	2013-05-08 15:38:04.000000000 +0000
@@ -3,17 +3,17 @@ Section: devel
 Priority: optional
 Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
 Uploaders: Matthias Klose <doko@debian.org>
-Standards-Version: 3.9.3
-Build-Depends: debhelper (>= 5.0.62), 
+Standards-Version: 3.9.4
+Build-Depends: debhelper (>= 5.0.62), gcc-4.8-base, 
   libc6.1-dev (>= 2.13-5) [alpha ia64] | libc0.3-dev (>= 2.13-5) [hurd-i386] | libc0.1-dev (>= 2.13-5) [kfreebsd-i386 kfreebsd-amd64] | libc6-dev (>= 2.13-5) , libc6-dev (>= 2.13-31) [armel armhf], libc6-dev-amd64 [i386 x32], libc6-dev-sparc64 [sparc], libc6-dev-s390 [s390x], libc6-dev-s390x [s390], libc6-dev-i386 [amd64 x32], libc6-dev-powerpc [ppc64], libc6-dev-ppc64 [powerpc], libc0.1-dev-i386 [kfreebsd-amd64], lib32gcc1 [amd64 ppc64 kfreebsd-amd64 s390x x32], lib64gcc1 [i386 powerpc sparc s390 x32], libc6-dev-mips64 [mips mipsel], libc6-dev-mipsn32 [mips mipsel], libc6-dev-x32 [amd64 i386], libx32gcc1 [amd64 i386],
   m4, libtool, autoconf2.64, automake (>= 1:1.11), automake (<< 1:1.12), 
   libunwind7-dev (>= 0.98.5-6) [ia64], libatomic-ops-dev [ia64],
   zlib1g-dev, gawk, lzma, xz-utils, patchutils,
   binutils-hppa64 (>= 2.22) [hppa],
   gperf (>= 3.0.1), bison (>= 1:2.3), flex, gettext,
-  texinfo (>= 4.3), locales, sharutils,
+  texinfo (>= 4.3), sharutils,
   procps,  libc6.1-dbg [alpha ia64] | libc0.3-dbg [hurd-i386] | libc0.1-dbg [kfreebsd-i386 kfreebsd-amd64] | libc6-dbg, zlib1g-dev, libantlr-java, python, libffi-dev, fastjar, libmagic-dev, libecj-java (>= 3.3.0-2), zip, libasound2-dev [!arm64 !knetbsd-i386 !knetbsd-alpha !hurd-i386 !hurd-alpha !kfreebsd-i386 !kfreebsd-amd64 !knetbsd-i386 !knetbsd-alpha], libxtst-dev, libxt-dev, libgtk2.0-dev (>= 2.4.4-2), libart-2.0-dev, libcairo2-dev, g++-4.7 [armel armhf], gcc-4.7-source (>= 4.7.3), gcc-4.7-source (<< 4.7.4),    
-  libcloog-ppl-dev (>= 0.16), libmpc-dev, libmpfr-dev (>= 3.0.0-9~), libgmp-dev (>= 2:5.0.1~),
+  libcloog-ppl-dev (>= 0.16), libmpc-dev (>= 1.0), libmpfr-dev (>= 3.0.0-9~), libgmp-dev (>= 2:5.0.1~),
   dejagnu [!m68k !hurd-i386 !hurd-alpha], realpath (>= 1.9.12), chrpath, lsb-release, quilt
 Build-Depends-Indep:  
 Build-Conflicts: binutils-gold
diff -pruN 4.7.3-1/debian/control.m4 4.7.3-2/debian/control.m4
--- 4.7.3-1/debian/control.m4	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/control.m4	2013-05-08 15:38:04.000000000 +0000
@@ -50,7 +50,7 @@ Uploaders: Iain Buclaw <ibuclaw@ubuntu.c
 ', `dnl
 Uploaders: Matthias Klose <doko@debian.org>
 ')dnl SRCNAME
-Standards-Version: 3.9.3
+Standards-Version: 3.9.4
 ifdef(`TARGET',`dnl cross
 Build-Depends: DPKG_BUILD_DEP debhelper (>= 5.0.62),
   LIBC_BUILD_DEP, LIBC_BIARCH_BUILD_DEP
@@ -61,14 +61,14 @@ Build-Depends: DPKG_BUILD_DEP debhelper
   BINUTILS_BUILD_DEP,
   bison (>= 1:2.3), flex, realpath (>= 1.9.12), lsb-release, quilt
 ',`dnl native
-Build-Depends: debhelper (>= 5.0.62),
+Build-Depends: debhelper (>= 5.0.62), gcc-4.8-base,
   LIBC_BUILD_DEP, LIBC_BIARCH_BUILD_DEP
   AUTO_BUILD_DEP AUTOGEN_BUILD_DEP
   libunwind7-dev (>= 0.98.5-6) [ia64], libatomic-ops-dev [ia64],
   zlib1g-dev, gawk, lzma, xz-utils, patchutils,
   binutils-hppa64 (>= BINUTILSV) [hppa],
   gperf (>= 3.0.1), bison (>= 1:2.3), flex, gettext,
-  texinfo (>= 4.3), locales, sharutils,
+  texinfo (>= 4.3), sharutils,
   procps, FORTRAN_BUILD_DEP JAVA_BUILD_DEP GNAT_BUILD_DEP GO_BUILD_DEP GDC_BUILD_DEP SPU_BUILD_DEP
   CLOOG_BUILD_DEP MPC_BUILD_DEP MPFR_BUILD_DEP GMP_BUILD_DEP
   CHECK_BUILD_DEP realpath (>= 1.9.12), chrpath, lsb-release, quilt
@@ -646,6 +646,7 @@ ifdef(`TARGET', `dnl
 ')`'dnl libx32gcc
 
 ifenabled(`cdev',`
+ifenabled(`x32dev',`
 Package: libx32gcc`'PV-dev`'LS
 Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs')
 Section: libdevel
@@ -657,6 +658,7 @@ BUILT_USING`'dnl
 Description: GCC support library (x32 development files)
  This package contains the headers and static library files necessary for
  building C programs which use libgcc, libgomp, libquadmath, libssp or libitm.
+')`'dnl x32dev
 ')`'dnl cdev
 
 ifdef(`TARGET', `', `
@@ -1758,6 +1760,7 @@ Description: Runtime library for GNU Obj
  This package contains the headers and static library files needed to build
  GNU ObjC applications.
 
+ifenabled(`x32dev',`
 Package: libx32objc`'PV-dev`'LS
 Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs')
 Section: libdevel
@@ -1768,6 +1771,7 @@ BUILT_USING`'dnl
 Description: Runtime library for GNU Objective-C applications (x32 development files)
  This package contains the headers and static library files needed to build
  GNU ObjC applications.
+')`'dnl libx32objc
 
 ifenabled(`armml',`
 Package: libhfobjc`'PV-dev`'LS
@@ -2051,6 +2055,7 @@ Description: Runtime library for GNU For
  This package contains the headers and static library files needed to build
  GNU Fortran applications.
 
+ifenabled(`x32dev',`
 Package: libx32gfortran`'PV-dev`'LS
 Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs')
 Section: libdevel
@@ -2062,6 +2067,7 @@ BUILT_USING`'dnl
 Description: Runtime library for GNU Fortran applications (x32 development files)
  This package contains the headers and static library files needed to build
  GNU Fortran applications.
+')`'dnl libx32gfortran
 
 ifenabled(`armml',`
 Package: libhfgfortran`'PV-dev`'LS
@@ -3033,7 +3039,7 @@ ifdef(`TARGET', `dnl
  environment.
 ')`'dnl
 
-ifenabled(`libx32dbgcxx',`
+ifenabled(`x32dev',`
 Package: libx32stdc++CXX_SO`'PV-dev`'LS
 Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs')
 Section: ifdef(`TARGET',`devel',`libdevel')
@@ -3056,7 +3062,9 @@ ifdef(`TARGET', `dnl
  This package contains files for TARGET architecture, for use in cross-compile
  environment.
 ')`'dnl
+')`'dnl x32dev
 
+ifenabled(`libx32dbgcxx',`
 Package: libx32stdc++CXX_SO`'PV-dbg`'LS
 Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs')
 Section: debug
diff -pruN 4.7.3-1/debian/patches/ada-link-shlib.diff 4.7.3-2/debian/patches/ada-link-shlib.diff
--- 4.7.3-1/debian/patches/ada-link-shlib.diff	1970-01-01 00:00:00.000000000 +0000
+++ 4.7.3-2/debian/patches/ada-link-shlib.diff	2013-05-08 15:38:04.000000000 +0000
@@ -0,0 +1,85 @@
+# DP: In gnatlink, pass the options and libraries after objects to the
+# DP: linker to avoid link failures with --as-needed. Closes: #680292.
+
+--- a/src/gcc/ada/mlib-tgt-specific-linux.adb
++++ b/src/gcc/ada/mlib-tgt-specific-linux.adb
+@@ -81,19 +81,54 @@
+       Version_Arg          : String_Access;
+       Symbolic_Link_Needed : Boolean := False;
+ 
++      N_Options    : Argument_List := Options;
++      Options_Last : Natural := N_Options'Last;
++      --  After moving -lxxx to Options_2, N_Options up to index Options_Last
++      --  will contain the Options to pass to MLib.Utl.Gcc.
++
++      Real_Options_2 : Argument_List (1 .. Options'Length);
++      Real_Options_2_Last : Natural := 0;
++      --  Real_Options_2 up to index Real_Options_2_Last will contain the
++      --  Options_2 to pass to MLib.Utl.Gcc.
++
+    begin
+       if Opt.Verbose_Mode then
+          Write_Str ("building relocatable shared library ");
+          Write_Line (Lib_Path);
+       end if;
+ 
++      --  Move all -lxxx to Options_2
++
++      declare
++         Index : Natural := N_Options'First;
++         Arg   : String_Access;
++
++      begin
++         while Index <= Options_Last loop
++            Arg := N_Options (Index);
++
++            if Arg'Length > 2
++              and then Arg (Arg'First .. Arg'First + 1) = "-l"
++            then
++               Real_Options_2_Last := Real_Options_2_Last + 1;
++               Real_Options_2 (Real_Options_2_Last) := Arg;
++               N_Options (Index .. Options_Last - 1) :=
++                 N_Options (Index + 1 .. Options_Last);
++               Options_Last := Options_Last - 1;
++
++            else
++               Index := Index + 1;
++            end if;
++         end loop;
++      end;
++
+       if Lib_Version = "" then
+          Utl.Gcc
+            (Output_File => Lib_Path,
+             Objects     => Ofiles,
+-            Options     => Options,
++            Options     => N_Options (N_Options'First .. Options_Last),
+             Driver_Name => Driver_Name,
+-            Options_2   => No_Argument_List);
++            Options_2   => Real_Options_2 (1 .. Real_Options_2_Last));
+ 
+       else
+          declare
+@@ -111,18 +146,18 @@
+                Utl.Gcc
+                  (Output_File => Lib_Version,
+                   Objects     => Ofiles,
+-                  Options     => Options & Version_Arg,
++		  Options     => N_Options (N_Options'First .. Options_Last) & Version_Arg,
+                   Driver_Name => Driver_Name,
+-                  Options_2   => No_Argument_List);
++                  Options_2   => Real_Options_2 (1 .. Real_Options_2_Last));
+                Symbolic_Link_Needed := Lib_Version /= Lib_Path;
+ 
+             else
+                Utl.Gcc
+                  (Output_File => Lib_Dir & Directory_Separator & Lib_Version,
+                   Objects     => Ofiles,
+-                  Options     => Options & Version_Arg,
++		  Options     => N_Options (N_Options'First .. Options_Last) & Version_Arg,
+                   Driver_Name => Driver_Name,
+-                  Options_2   => No_Argument_List);
++                  Options_2   => Real_Options_2 (1 .. Real_Options_2_Last));
+                Symbolic_Link_Needed :=
+                  Lib_Dir & Directory_Separator & Lib_Version /= Lib_Path;
+             end if;
diff -pruN 4.7.3-1/debian/patches/hjl-x32-gcc-4_7-branch.diff 4.7.3-2/debian/patches/hjl-x32-gcc-4_7-branch.diff
--- 4.7.3-1/debian/patches/hjl-x32-gcc-4_7-branch.diff	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/patches/hjl-x32-gcc-4_7-branch.diff	2013-05-08 15:38:04.000000000 +0000
@@ -1575,18 +1575,6 @@ Index: b/src/gcc/config/i386/i386.md
     (clobber (mem:BLK (scratch)))]
    ""
    "pop{<imodesuffix>}\t%0"
-@@ -3444,9 +3451,9 @@
- })
- 
- (define_insn "*zero_extendsidi2_rex64"
--  [(set (match_operand:DI 0 "nonimmediate_operand"  "=r,o,?*Ym,?*y,?*Yi,*x")
-+  [(set (match_operand:DI 0 "nonimmediate_operand"	   "=r  ,o,?*Ym,?*y,?*Yi,*x")
- 	(zero_extend:DI
--	 (match_operand:SI 1 "nonimmediate_operand" "rm,0,r   ,m  ,r   ,m")))]
-+	 (match_operand:SI 1 "x86_64_zext_general_operand" "rmWz,0,r   ,m  ,r   ,m")))]
-   "TARGET_64BIT"
-   "@
-    mov{l}\t{%1, %k0|%k0, %1}
 @@ -11129,10 +11136,15 @@
     (set_attr "modrm" "0")])
  
diff -pruN 4.7.3-1/debian/patches/libstdc++-no-testsuite.diff 4.7.3-2/debian/patches/libstdc++-no-testsuite.diff
--- 4.7.3-1/debian/patches/libstdc++-no-testsuite.diff	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/patches/libstdc++-no-testsuite.diff	2013-05-08 15:38:04.000000000 +0000
@@ -7,7 +7,7 @@
  
  # Run the testsuite in normal mode.
  check-DEJAGNU $(check_DEJAGNU_normal_targets): check-DEJAGNU%: site.exp
-+	case "$(target)" in arm*|hppa*|mipsel*) exit 0;; esac; \
++	case "$(target)" in arm*|hppa*|ia64*|mipsel*) exit 0;; esac; \
  	AR="$(AR)"; export AR; \
  	RANLIB="$(RANLIB)"; export RANLIB; \
  	if [ -z "$*$(filter-out --target_board=%, $(RUNTESTFLAGS))" ] \
diff -pruN 4.7.3-1/debian/patches/r195826.diff 4.7.3-2/debian/patches/r195826.diff
--- 4.7.3-1/debian/patches/r195826.diff	1970-01-01 00:00:00.000000000 +0000
+++ 4.7.3-2/debian/patches/r195826.diff	2013-05-08 15:38:04.000000000 +0000
@@ -0,0 +1,13 @@
+Index: a/src/gcc/config/gnu.h
+===================================================================
+--- a/src/gcc/config/gnu.h	(révision 195825)
++++ b/src/gcc/config/gnu.h	(révision 195826)
+@@ -33,7 +33,7 @@
+ 	builtin_define ("__gnu_hurd__");	\
+ 	builtin_define ("__GNU__");		\
+ 	builtin_define_std ("unix");		\
+-	builtin_define_std ("MACH");		\
++	builtin_define ("__MACH__");		\
+ 	builtin_assert ("system=gnu");		\
+ 	builtin_assert ("system=mach");		\
+ 	builtin_assert ("system=unix");		\
diff -pruN 4.7.3-1/debian/patches/svn-updates.diff 4.7.3-2/debian/patches/svn-updates.diff
--- 4.7.3-1/debian/patches/svn-updates.diff	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/patches/svn-updates.diff	2013-05-08 15:38:04.000000000 +0000
@@ -1,10 +1,10 @@
-# DP: updates from the 4.7 branch upto 20130404 (r197476).
+# DP: updates from the 4.7 branch upto 20130506 (r198653).
 
 last_updated()
 {
 	cat > ${dir}LAST_UPDATED <<EOF
-Thu Apr  4 12:59:07 CEST 2013
-Thu Apr  4 10:59:07 UTC 2013 (revision 197476)
+Tue May  7 00:15:37 CEST 2013
+Mon May  6 22:15:37 UTC 2013 (revision 198653)
 EOF
 }
 
@@ -12,3 +12,1883 @@ LANG=C svn diff svn://gcc.gnu.org/svn/gc
 	| sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \
 	| awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0'
 
+Index: libstdc++-v3/ChangeLog
+===================================================================
+--- a/src/libstdc++-v3/ChangeLog	(.../tags/gcc_4_7_3_release)
++++ b/src/libstdc++-v3/ChangeLog	(.../branches/gcc-4_7-branch)
+@@ -1,3 +1,20 @@
++2013-04-15  Jack Howarth  <howarth@bromo.med.uc.edu>
++
++	Backport from mainline
++
++	2012-10-10  Jack Howarth  <howarth@bromo.med.uc.edu>
++ 		    Jonathan Wakely  <jwakely.gcc@gmail.com>
++
++	PR libstdc++/54847
++	* config/os/bsd/darwin/os_defines.h: Define _GLIBCXX_USE_NANOSLEEP
++	and _GLIBCXX_USE_SCHED_YIELD.
++	* acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Add comment.
++
++2013-04-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
++
++	* testsuite/30_threads/condition_variable/members/53841.cc: Add
++	-std=gnu++0x -pthread on alpha*-*-osf*, mips-sgi-irix6*.
++
+ 2013-04-11  Release Manager
+ 
+ 	* GCC 4.7.3 released.
+Index: libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc	(.../tags/gcc_4_7_3_release)
++++ b/src/libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc	(.../branches/gcc-4_7-branch)
+@@ -1,5 +1,5 @@
+ // { dg-do compile }
+-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* powerpc-ibm-aix* hppa*-hp-hpux11* } }
++// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* hppa*-hp-hpux11* } }
+ // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+ // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+ // { dg-require-cstdint "" }
+Index: libstdc++-v3/config/os/bsd/darwin/os_defines.h
+===================================================================
+--- a/src/libstdc++-v3/config/os/bsd/darwin/os_defines.h	(.../tags/gcc_4_7_3_release)
++++ b/src/libstdc++-v3/config/os/bsd/darwin/os_defines.h	(.../branches/gcc-4_7-branch)
+@@ -42,4 +42,9 @@
+ // Static initializer macro is buggy in darwin, see libstdc++/51906
+ #define _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC
+ 
++// Configure checks for nanosleep fail on Darwin, but nanosleep and
++// sched_yield are always available, so use them.
++#define _GLIBCXX_USE_NANOSLEEP 1
++#define _GLIBCXX_USE_SCHED_YIELD 1
++
+ #endif
+Index: libstdc++-v3/acinclude.m4
+===================================================================
+--- a/src/libstdc++-v3/acinclude.m4	(.../tags/gcc_4_7_3_release)
++++ b/src/libstdc++-v3/acinclude.m4	(.../branches/gcc-4_7-branch)
+@@ -1132,6 +1132,11 @@
+ dnl --disable-libstdcxx-time
+ dnl        disables the checks completely
+ dnl
++dnl N.B. Darwin provides nanosleep but doesn't support the whole POSIX
++dnl Timers option, so doesn't define _POSIX_TIMERS. Because the test
++dnl below fails Darwin unconditionally defines _GLIBCXX_USE_NANOSLEEP in
++dnl os_defines.h and also defines _GLIBCXX_USE_SCHED_YIELD.
++dnl
+ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
+ 
+   AC_MSG_CHECKING([for clock_gettime, nanosleep and sched_yield])
+Index: libgcc/ChangeLog
+===================================================================
+--- a/src/libgcc/ChangeLog	(.../tags/gcc_4_7_3_release)
++++ b/src/libgcc/ChangeLog	(.../branches/gcc-4_7-branch)
+@@ -1,3 +1,10 @@
++2013-04-11  Julian Brown  <julian@codesourcery.com>
++
++	* config/arm/linux-atomic.c (SUBWORD_SYNC_OP, SUBWORD_VAL_CAS)
++	(SUBWORD_TEST_AND_SET): Use signed char/short types instead of
++	unsigned char/unsigned short.
++	(__sync_val_compare_and_swap_{1,2}): Handle signed argument.
++
+ 2013-04-11  Release Manager
+ 
+ 	* GCC 4.7.3 released.
+Index: libgcc/config/arm/linux-atomic.c
+===================================================================
+--- a/src/libgcc/config/arm/linux-atomic.c	(.../tags/gcc_4_7_3_release)
++++ b/src/libgcc/config/arm/linux-atomic.c	(.../branches/gcc-4_7-branch)
+@@ -97,19 +97,19 @@
+     return (RETURN & mask) >> shift;					\
+   }
+ 
+-SUBWORD_SYNC_OP (add,   , +, unsigned short, 2, oldval)
+-SUBWORD_SYNC_OP (sub,   , -, unsigned short, 2, oldval)
+-SUBWORD_SYNC_OP (or,    , |, unsigned short, 2, oldval)
+-SUBWORD_SYNC_OP (and,   , &, unsigned short, 2, oldval)
+-SUBWORD_SYNC_OP (xor,   , ^, unsigned short, 2, oldval)
+-SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, oldval)
++SUBWORD_SYNC_OP (add,   , +, short, 2, oldval)
++SUBWORD_SYNC_OP (sub,   , -, short, 2, oldval)
++SUBWORD_SYNC_OP (or,    , |, short, 2, oldval)
++SUBWORD_SYNC_OP (and,   , &, short, 2, oldval)
++SUBWORD_SYNC_OP (xor,   , ^, short, 2, oldval)
++SUBWORD_SYNC_OP (nand, ~, &, short, 2, oldval)
+ 
+-SUBWORD_SYNC_OP (add,   , +, unsigned char, 1, oldval)
+-SUBWORD_SYNC_OP (sub,   , -, unsigned char, 1, oldval)
+-SUBWORD_SYNC_OP (or,    , |, unsigned char, 1, oldval)
+-SUBWORD_SYNC_OP (and,   , &, unsigned char, 1, oldval)
+-SUBWORD_SYNC_OP (xor,   , ^, unsigned char, 1, oldval)
+-SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, oldval)
++SUBWORD_SYNC_OP (add,   , +, signed char, 1, oldval)
++SUBWORD_SYNC_OP (sub,   , -, signed char, 1, oldval)
++SUBWORD_SYNC_OP (or,    , |, signed char, 1, oldval)
++SUBWORD_SYNC_OP (and,   , &, signed char, 1, oldval)
++SUBWORD_SYNC_OP (xor,   , ^, signed char, 1, oldval)
++SUBWORD_SYNC_OP (nand, ~, &, signed char, 1, oldval)
+ 
+ #define OP_AND_FETCH_WORD(OP, PFX_OP, INF_OP)				\
+   int HIDDEN								\
+@@ -132,19 +132,19 @@
+ OP_AND_FETCH_WORD (xor,   , ^)
+ OP_AND_FETCH_WORD (nand, ~, &)
+ 
+-SUBWORD_SYNC_OP (add,   , +, unsigned short, 2, newval)
+-SUBWORD_SYNC_OP (sub,   , -, unsigned short, 2, newval)
+-SUBWORD_SYNC_OP (or,    , |, unsigned short, 2, newval)
+-SUBWORD_SYNC_OP (and,   , &, unsigned short, 2, newval)
+-SUBWORD_SYNC_OP (xor,   , ^, unsigned short, 2, newval)
+-SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, newval)
++SUBWORD_SYNC_OP (add,   , +, short, 2, newval)
++SUBWORD_SYNC_OP (sub,   , -, short, 2, newval)
++SUBWORD_SYNC_OP (or,    , |, short, 2, newval)
++SUBWORD_SYNC_OP (and,   , &, short, 2, newval)
++SUBWORD_SYNC_OP (xor,   , ^, short, 2, newval)
++SUBWORD_SYNC_OP (nand, ~, &, short, 2, newval)
+ 
+-SUBWORD_SYNC_OP (add,   , +, unsigned char, 1, newval)
+-SUBWORD_SYNC_OP (sub,   , -, unsigned char, 1, newval)
+-SUBWORD_SYNC_OP (or,    , |, unsigned char, 1, newval)
+-SUBWORD_SYNC_OP (and,   , &, unsigned char, 1, newval)
+-SUBWORD_SYNC_OP (xor,   , ^, unsigned char, 1, newval)
+-SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, newval)
++SUBWORD_SYNC_OP (add,   , +, signed char, 1, newval)
++SUBWORD_SYNC_OP (sub,   , -, signed char, 1, newval)
++SUBWORD_SYNC_OP (or,    , |, signed char, 1, newval)
++SUBWORD_SYNC_OP (and,   , &, signed char, 1, newval)
++SUBWORD_SYNC_OP (xor,   , ^, signed char, 1, newval)
++SUBWORD_SYNC_OP (nand, ~, &, signed char, 1, newval)
+ 
+ int HIDDEN
+ __sync_val_compare_and_swap_4 (int *ptr, int oldval, int newval)
+@@ -181,7 +181,7 @@
+ 	actual_oldval = *wordptr;					\
+ 									\
+ 	if (__builtin_expect (((actual_oldval & mask) >> shift) !=      \
+-                              (unsigned int) oldval, 0))                \
++                              ((unsigned int) oldval & MASK_##WIDTH), 0)) \
+           return (actual_oldval & mask) >> shift;			\
+ 									\
+ 	actual_newval = (actual_oldval & ~mask)				\
+@@ -195,8 +195,8 @@
+       }									\
+   }
+ 
+-SUBWORD_VAL_CAS (unsigned short, 2)
+-SUBWORD_VAL_CAS (unsigned char,  1)
++SUBWORD_VAL_CAS (short,       2)
++SUBWORD_VAL_CAS (signed char, 1)
+ 
+ typedef unsigned char bool;
+ 
+@@ -217,8 +217,8 @@
+     return (oldval == actual_oldval);					\
+   }
+ 
+-SUBWORD_BOOL_CAS (unsigned short, 2)
+-SUBWORD_BOOL_CAS (unsigned char,  1)
++SUBWORD_BOOL_CAS (short,       2)
++SUBWORD_BOOL_CAS (signed char, 1)
+ 
+ void HIDDEN
+ __sync_synchronize (void)
+@@ -260,8 +260,8 @@
+     return (oldval & mask) >> shift;					\
+   }
+ 
+-SUBWORD_TEST_AND_SET (unsigned short, 2)
+-SUBWORD_TEST_AND_SET (unsigned char,  1)
++SUBWORD_TEST_AND_SET (short,       2)
++SUBWORD_TEST_AND_SET (signed char, 1)
+ 
+ #define SYNC_LOCK_RELEASE(TYPE, WIDTH)					\
+   void HIDDEN								\
+Index: gcc/target.def
+===================================================================
+--- a/src/gcc/target.def	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/target.def	(.../branches/gcc-4_7-branch)
+@@ -2758,6 +2758,13 @@
+  bool, false)
+ 
+ DEFHOOKPOD
++(force_at_comp_dir,
++ "True if the @code{DW_AT_comp_dir} attribute should be emitted for each \
++ compilation unit.  This attribute is required for the darwin linker \
++ to emit debug information.",
++ bool, false)
++
++DEFHOOKPOD
+ (delay_sched2, "True if sched2 is not to be run at its normal place.  \
+ This usually means it will be run as part of machine-specific reorg.",
+ bool, false)
+Index: gcc/DATESTAMP
+===================================================================
+--- a/src/gcc/DATESTAMP	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/DATESTAMP	(.../branches/gcc-4_7-branch)
+@@ -1 +1 @@
+-20130411
++20130506
+Index: gcc/builtins.c
+===================================================================
+--- a/src/gcc/builtins.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/builtins.c	(.../branches/gcc-4_7-branch)
+@@ -9692,7 +9692,16 @@
+       case rvc_inf:
+ 	/* If arg is Inf or NaN and we're logb, return it.  */
+ 	if (TREE_CODE (rettype) == REAL_TYPE)
+-	  return fold_convert_loc (loc, rettype, arg);
++	  {
++	    /* For logb(-Inf) we have to return +Inf.  */
++	    if (real_isinf (value) && real_isneg (value))
++	      {
++		REAL_VALUE_TYPE tem;
++		real_inf (&tem);
++		return build_real (rettype, tem);
++	      }
++	    return fold_convert_loc (loc, rettype, arg);
++	  }
+ 	/* Fall through... */
+       case rvc_zero:
+ 	/* Zero may set errno and/or raise an exception for logb, also
+Index: gcc/ChangeLog
+===================================================================
+--- a/src/gcc/ChangeLog	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/ChangeLog	(.../branches/gcc-4_7-branch)
+@@ -1,3 +1,110 @@
++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-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  Christian Bruel  <christian.bruel@st.com>
++
++	PR target/57108
++	* sh.md (tstsi_t_zero_extract_eq): Set mode for operand 0.
++
++2013-04-27  Jakub Jelinek  <jakub@redhat.com>
++
++	PR target/56866
++	* config/i386/sse.md (xop_rotr<mode>3): Fix up computation of
++	the immediate rotate count.
++
++2013-04-21  Eric Botcazou  <ebotcazou@adacore.com>
++
++	* cfgexpand.c (avoid_complex_debug_insns): Fix C++ism.
++
++2013-04-19  Matthias Klose  <doko@ubuntu.com>
++
++	PR middle-end/56848
++	Re-apply
++	2013-04-01  Andrey Belevantsev  <abel@ispras.ru>
++
++	Backport from mainline
++	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.
++
++	Backport from 4.8:
++	2012-08-27  Maxim Kuvyrkov  <maxim@codesourcery.com>
++
++	* sched-deps.c (add_dependence_list_and_free): Simplify.
++	(flush_pending_list_and_free): Fix a hack that was fixing a hack.  Free
++	lists when add_dependence_list_and_free doesn't free them.
++
++2013-04-19  Marek Polacek  <polacek@redhat.com>
++
++	Backport from mainline
++	2013-01-08  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-04-16  Jack Howarth  <howarth@bromo.med.uc.edu>
++
++	Backport from mainline
++	2012-05-29  Jack Howarth  <howarth@bromo.med.uc.edu>
++	* config/darwin.h (STARTFILE_SPEC): Use -no_new_main with -lgcrt1.o
++	on Darwin >= 12.
++	(DARWIN_CRT1_SPEC): Use -lcrt1.10.6.o when Darwin >= 10 and < 12.
++
++
++	2012-05-29  Jack Howarth  <howarth@bromo.med.uc.edu>
++	PR debug/53453
++	* doc/tm.texi: Update.
++	* doc/tm.texi.in (SDB and DWARF) <TARGET_FORCE_AT_COMP_DIR>: Add @hook.
++	* target.def (force_at_comp_dir): New hook.
++	* config/darwin.h (TARGET_FORCE_AT_COMP_DIR): Define.
++	* dwarf2out.c (dwarf2out_finish): Check targetm.force_at_comp_dir.
++
++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-13  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
++
++	Backport from mainline:
++	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-11  Release Manager
+ 
+ 	* GCC 4.7.3 released.
+Index: gcc/testsuite/gcc.target/i386/pr44578.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/pr44578.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/gcc.target/i386/pr44578.c	(.../branches/gcc-4_7-branch)
+@@ -0,0 +1,31 @@
++/* { dg-do run } */
++/* { dg-options "-O2 -mtune=athlon64" } */
++
++extern void abort (void);
++
++long double
++__attribute__((noinline, noclone))
++test (float num)
++{
++  unsigned int i;
++
++  if (num < 0.0)
++    num = 0.0;
++
++  __builtin_memcpy (&i, &num, sizeof(unsigned int));
++
++  return (long double)(unsigned long long) i;
++}
++
++int
++main ()
++{
++  long double x;
++
++  x = test (0.0);
++
++  if (x != 0.0)
++    abort ();
++
++  return 0;
++}
+Index: gcc/testsuite/gcc.target/i386/pr56866.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/pr56866.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/gcc.target/i386/pr56866.c	(.../branches/gcc-4_7-branch)
+@@ -0,0 +1,16 @@
++/* PR target/56866 */
++/* { dg-do run } */
++/* { dg-require-effective-target xop } */
++/* { dg-options "-O3 -mxop" } */
++
++#define main xop_test_main
++#include "../../gcc.c-torture/execute/pr56866.c"
++#undef main
++
++#include "xop-check.h"
++
++static void
++xop_test (void)
++{
++  xop_test_main ();
++}
+Index: gcc/testsuite/gcc.target/i386/pr57098.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/pr57098.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/gcc.target/i386/pr57098.c	(.../branches/gcc-4_7-branch)
+@@ -0,0 +1,10 @@
++/* { dg-do compile } */
++/* { dg-require-effective-target lp64 } */
++/* { dg-options "-msse4 -mcmodel=large" } */
++
++typedef int V __attribute__((vector_size(16)));
++
++void foo (V *p, V *mask)
++{
++  *p = __builtin_shuffle (*p, *mask);
++}
+Index: gcc/testsuite/gcc.target/sh/pr57108.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/sh/pr57108.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/gcc.target/sh/pr57108.c	(.../branches/gcc-4_7-branch)
+@@ -0,0 +1,19 @@
++/* { dg-do compile { target "sh*-*-*" } } */
++/* { dg-options "-O1" } */
++
++void __assert_func (void) __attribute__ ((__noreturn__)) ;
++
++void ATATransfer (int num, int buffer)
++{
++ int wordCount;
++
++ while (num > 0)
++  {
++    wordCount = num * 512 / sizeof (int);
++
++    ((0 == (buffer & 63)) ? (void)0 : __assert_func () );
++    ((0 == (wordCount & 31)) ? (void)0 : __assert_func ());
++  }
++
++
++ }
+Index: gcc/testsuite/gfortran.dg/transfer_check_4.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/transfer_check_4.f90	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/gfortran.dg/transfer_check_4.f90	(.../branches/gcc-4_7-branch)
+@@ -0,0 +1,44 @@
++! { dg-do compile }
++! { dg-options "-Wall" }
++
++! PR 57022: [4.7/4.8/4.9 Regression] Inappropriate warning for use of TRANSFER with arrays
++! Contributed by William Clodius <wclodius@los-alamos.net>
++
++subroutine transfers (test)
++
++  use, intrinsic :: iso_fortran_env
++  
++  integer, intent(in) :: test
++
++  integer(int8)  :: test8(8)  = 0
++  integer(int16) :: test16(4) = 0
++  integer(int32) :: test32(2) = 0
++  integer(int64) :: test64    = 0
++
++  select case(test)
++  case(0)
++    test64 = transfer(test8, test64)
++  case(1)
++    test64 = transfer(test16, test64)
++  case(2)
++    test64 = transfer(test32, test64)
++  case(3)
++    test8  = transfer(test64, test8, 8)
++  case(4)
++    test16 = transfer(test64, test16, 4)
++  case(5)
++    test32 = transfer(test64, test32, 2)
++  end select
++
++end subroutine
++
++
++! PR 53685: surprising warns about transfer with explicit character range
++! Contributed by Jos de Kloe <kloedej@knmi.nl>
++
++subroutine mytest(byte_array,val)
++  integer, parameter :: r8_ = Selected_Real_Kind(15,307)  ! = real*8
++  character(len=1), dimension(16), intent(in) :: byte_array
++  real(r8_),intent(out) :: val
++  val = transfer(byte_array(1:8),val)    
++end subroutine
+Index: gcc/testsuite/gfortran.dg/namelist_77.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/namelist_77.f90	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/gfortran.dg/namelist_77.f90	(.../branches/gcc-4_7-branch)
+@@ -0,0 +1,49 @@
++! { dg-do run }
++!
++! PR libfortran/51825 - Fortran runtime error: Cannot match namelist object name
++! Test case derived from PR.
++
++module local_mod
++
++    type mytype1
++        integer :: int1
++    end type
++
++    type mytype2
++        integer :: n_x       
++        integer :: n_px        
++    end type
++
++    type beam_init_struct
++        character(16) :: chars(1) = ''                                  
++        type (mytype1) dummy
++        type (mytype2) grid(1)      
++    end type
++
++end module
++
++program error_namelist
++
++    use local_mod
++
++    implicit none
++
++    type (beam_init_struct) beam_init
++
++    namelist / error_params / beam_init
++
++    open (10, status='scratch')
++    write (10, '(a)') "&error_params"
++    write (10, '(a)') "  beam_init%chars(1)='JUNK'"
++    write (10, '(a)') "  beam_init%grid(1)%n_x=3"
++    write (10, '(a)') "  beam_init%grid(1)%n_px=2"
++    write (10, '(a)') "/"
++    rewind(10)
++    read(10, nml=error_params)
++    close (10)
++
++    if (beam_init%chars(1) /= 'JUNK') call abort
++    if (beam_init%grid(1)%n_x /= 3) call abort
++    if (beam_init%grid(1)%n_px /= 2) call abort
++
++end program
+Index: gcc/testsuite/gfortran.dg/namelist_79.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/namelist_79.f90	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/gfortran.dg/namelist_79.f90	(.../branches/gcc-4_7-branch)
+@@ -0,0 +1,43 @@
++! { dg-do run }
++! PR libfortran/52512 - Cannot match namelist object name
++! Test case derived from PR.
++
++program testje
++
++    implicit none
++
++    integer :: getal, jn
++    type ptracer
++        character(len = 8)  :: sname  !: short name
++        logical             :: lini   !: read in a file or not
++    end type ptracer
++    type(ptracer) , dimension(3) :: tracer
++    namelist/namtoptrc/  getal,tracer
++
++    ! standard values
++    getal = 9999
++    do jn = 1, 3
++        tracer(jn)%sname = 'default_name'
++        tracer(jn)%lini = .false.
++    end do
++
++    open (10, status='scratch')
++    write (10, '(a)') "&namtoptrc"
++    write (10, '(a)') "   getal = 7"
++    write (10, '(a)') "   tracer(1) = 'DIC     ', .true."
++    write (10, '(a)') "   tracer(2) = 'Alkalini', .true."
++    write (10, '(a)') "   tracer(3) = 'O2      ', .true."
++    write (10, '(a)') "/"
++    rewind(10)
++    read(10, nml=namtoptrc)
++    close (10)
++
++    if (getal /= 7) call abort
++    if (tracer(1)%sname /= 'DIC     ') call abort
++    if (tracer(2)%sname /= 'Alkalini') call abort
++    if (tracer(3)%sname /= 'O2      ') call abort
++    if (.not. tracer(1)%lini) call abort
++    if (.not. tracer(2)%lini) call abort
++    if (.not. tracer(3)%lini) call abort
++
++end program testje
+Index: gcc/testsuite/gfortran.dg/proc_ptr_41.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/proc_ptr_41.f90	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/gfortran.dg/proc_ptr_41.f90	(.../branches/gcc-4_7-branch)
+@@ -0,0 +1,37 @@
++! { dg-do compile }
++!
++! PR 56968: [4.7/4.8/4.9 Regression] [F03] Issue with a procedure defined with a generic name returning procedure pointer
++!
++! Contributed by Samuel Debionne <samuel.debionne@ujf-grenoble.fr>
++
++module test
++
++  interface generic_name_get_proc_ptr
++    module procedure specific_name_get_proc_ptr
++  end interface
++
++  abstract interface
++    double precision function foo(arg1)
++      real, intent(in) :: arg1
++    end function
++  end interface
++
++contains
++
++  function specific_name_get_proc_ptr() result(res)
++    procedure(foo), pointer :: res
++  end function
++
++end module test
++
++program crash_test
++    use :: test
++
++    procedure(foo), pointer :: ptr
++
++    ptr => specific_name_get_proc_ptr()
++    ptr => generic_name_get_proc_ptr()
++
++end program
++
++! { dg-final { cleanup-modules "test" } }
+Index: gcc/testsuite/gfortran.dg/namelist_81.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/namelist_81.f90	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/gfortran.dg/namelist_81.f90	(.../branches/gcc-4_7-branch)
+@@ -0,0 +1,43 @@
++! { dg-do run }
++! PR56786 Error on embedded spaces
++integer :: i(3)
++namelist /nml/ i
++
++i = -42
++open(99,status='scratch')
++write(99,'(a)') '&nml i(3 ) = 5 /'
++rewind(99)
++read(99,nml=nml)
++close(99)
++if (i(1)/=-42 .or. i(2)/=-42 .or. i(3)/=5) call abort()
++
++! Shorten the file so the read hits EOF
++
++open(99,status='scratch')
++write(99,'(a)') '&nml i(3 ) = 5 '
++rewind(99)
++read(99,nml=nml, end=30)
++call abort()
++! Shorten some more
++ 30 close(99)
++open(99,status='scratch')
++write(99,'(a)') '&nml i(3 ) ='
++rewind(99)
++read(99,nml=nml, end=40)
++call abort()
++! Shorten some more
++ 40 close(99)
++open(99,status='scratch')
++write(99,'(a)') '&nml i(3 )'
++rewind(99)
++read(99,nml=nml, end=50)
++call abort()
++! Shorten some more
++ 50 close(99)
++open(99,status='scratch')
++write(99,'(a)') '&nml i(3 '
++rewind(99)
++read(99,nml=nml, end=60)
++call abort()
++ 60 close(99)
++end
+Index: gcc/testsuite/gfortran.dg/namelist_78.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/namelist_78.f90	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/gfortran.dg/namelist_78.f90	(.../branches/gcc-4_7-branch)
+@@ -0,0 +1,34 @@
++! { dg-do run }
++!
++! PR libfortran/51825
++! Test case regarding namelist problems with derived types
++
++program namelist
++
++    type d1
++        integer :: j = 0
++    end type d1
++
++    type d2
++        type(d1) k
++    end type d2
++
++    type d3
++        type(d2) d(2)
++    end type d3
++
++    type(d3) der
++    namelist /nmlst/ der
++
++    open (10, status='scratch')
++    write (10, '(a)') "&NMLST"
++    write (10, '(a)') " DER%D(1)%K%J = 1,"
++    write (10, '(a)') " DER%D(2)%K%J = 2,"
++    write (10, '(a)') "/"
++    rewind(10)
++    read(10, nml=nmlst)
++    close (10)
++
++    if (der%d(1)%k%j /= 1) call abort
++    if (der%d(2)%k%j /= 2) call abort
++end program namelist
+Index: gcc/testsuite/gcc.c-torture/execute/pr56866.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.c-torture/execute/pr56866.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/gcc.c-torture/execute/pr56866.c	(.../branches/gcc-4_7-branch)
+@@ -0,0 +1,45 @@
++/* PR target/56866 */
++
++int
++main ()
++{
++#if __CHAR_BIT__ == 8 && __SIZEOF_LONG_LONG__ == 8 && __SIZEOF_INT__ == 4 && __SIZEOF_SHORT__ == 2
++  unsigned long long wq[256], rq[256];
++  unsigned int wi[256], ri[256];
++  unsigned short ws[256], rs[256];
++  unsigned char wc[256], rc[256];
++  int t;
++
++  __builtin_memset (wq, 0, sizeof wq);
++  __builtin_memset (wi, 0, sizeof wi);
++  __builtin_memset (ws, 0, sizeof ws);
++  __builtin_memset (wc, 0, sizeof wc);
++  wq[0] = 0x0123456789abcdefULL;
++  wi[0] = 0x01234567;
++  ws[0] = 0x4567;
++  wc[0] = 0x73;
++
++  asm volatile ("" : : "g" (wq), "g" (wi), "g" (ws), "g" (wc) : "memory");
++
++  for (t = 0; t < 256; ++t)
++    rq[t] = (wq[t] >> 8) | (wq[t] << (sizeof (wq[0]) * __CHAR_BIT__ - 8));
++  for (t = 0; t < 256; ++t)
++    ri[t] = (wi[t] >> 8) | (wi[t] << (sizeof (wi[0]) * __CHAR_BIT__ - 8));
++  for (t = 0; t < 256; ++t)
++    rs[t] = (ws[t] >> 9) | (ws[t] << (sizeof (ws[0]) * __CHAR_BIT__ - 9));
++  for (t = 0; t < 256; ++t)
++    rc[t] = (wc[t] >> 5) | (wc[t] << (sizeof (wc[0]) * __CHAR_BIT__ - 5));
++
++  asm volatile ("" : : "g" (rq), "g" (ri), "g" (rs), "g" (rc) : "memory");
++
++  if (rq[0] != 0xef0123456789abcdULL || rq[1])
++    __builtin_abort ();
++  if (ri[0] != 0x67012345 || ri[1])
++    __builtin_abort ();
++  if (rs[0] != 0xb3a2 || rs[1])
++    __builtin_abort ();
++  if (rc[0] != 0x9b || rc[1])
++    __builtin_abort ();
++#endif
++  return 0;
++}
+Index: gcc/testsuite/gcc.dg/pr56890-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/pr56890-2.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/gcc.dg/pr56890-2.c	(.../branches/gcc-4_7-branch)
+@@ -0,0 +1,19 @@
++/* PR target/56890 */
++/* Reported by Rainer Jung <rainer.jung@kippdata.de> */
++
++/* { dg-do assemble } */
++/* { dg-options "-O" } */
++
++unsigned int buggy(unsigned int min, unsigned int max)
++{
++    unsigned int number;
++    if (max < 16384) {
++        unsigned short num16;
++        num16 = min + (long) ((double) (max - min + 1.0) * (num16 / (65535 + 1.0)));
++        return num16;
++    }
++    else {
++        (number) = min + (long) ((double) (max - min + 1.0) * (number / (4294967295U + 1.0)));
++    }
++    return number;
++}
+Index: gcc/testsuite/gcc.dg/pr48189.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/pr48189.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/gcc.dg/pr48189.c	(.../branches/gcc-4_7-branch)
+@@ -0,0 +1,13 @@
++/* PR tree-optimization/48189 */
++/* { dg-do compile } */
++/* { dg-options "-O --param max-predicted-iterations=0" } */
++
++struct S { int s[8]; };
++  
++void
++foo (int *x, struct S *y)
++{
++  int i;
++  for (i = 0; y[i].s[i]; i++)
++    *x++ = y[i].s[i];
++}
+Index: gcc/testsuite/gcc.dg/torture/builtin-logb-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c	(.../branches/gcc-4_7-branch)
+@@ -48,25 +48,25 @@
+ /* Test if FUNCRES(FUNC(NEG FUNCARG(ARGARG))) is false.  Check the
+    sign as well.  */
+ #ifndef __SPU__
+-#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES) do { \
++#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES,NEG2) do { \
+   if (!__builtin_##FUNCRES##f(__builtin_##FUNC(NEG __builtin_##FUNCARG##f(ARGARG))) \
+-      || CKSGN_F(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG)), NEG __builtin_##FUNCARG##f(ARGARG))) \
++      || CKSGN_F(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG)), NEG2 __builtin_##FUNCARG##f(ARGARG))) \
+     link_error(__LINE__); \
+   if (!__builtin_##FUNCRES(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG))) \
+-      || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG __builtin_##FUNCARG(ARGARG))) \
++      || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG2 __builtin_##FUNCARG(ARGARG))) \
+     link_error(__LINE__); \
+   if (!__builtin_##FUNCRES##l(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG))) \
+-      || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG __builtin_##FUNCARG##l(ARGARG))) \
++      || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG2 __builtin_##FUNCARG##l(ARGARG))) \
+     link_error(__LINE__); \
+   } while (0)
+ #else
+-#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES) do { \
++#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES,NEG2) do { \
+   /* SPU single-precision floating point format does not support Inf or Nan.  */ \
+   if (!__builtin_##FUNCRES(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG))) \
+-      || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG __builtin_##FUNCARG(ARGARG))) \
++      || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG2 __builtin_##FUNCARG(ARGARG))) \
+     link_error(__LINE__); \
+   if (!__builtin_##FUNCRES##l(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG))) \
+-      || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG __builtin_##FUNCARG##l(ARGARG))) \
++      || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG2 __builtin_##FUNCARG##l(ARGARG))) \
+     link_error(__LINE__); \
+   } while (0)
+ #endif
+@@ -173,15 +173,15 @@
+ 
+   /* Test for f(+-Inf) -> +-Inf and f(+-NaN) -> +-NaN, regardless of
+      the radix.  */
+-  TESTIT3 (logb, ,inf, , isinf);
+-  TESTIT3 (logb, - ,inf, , isinf);
+-  TESTIT3 (logb,  ,nan, "", isnan);
+-  TESTIT3 (logb, - ,nan, "", isnan);
++  TESTIT3 (logb, ,inf, , isinf, );
++  TESTIT3 (logb, - ,inf, , isinf, );
++  TESTIT3 (logb,  ,nan, "", isnan, );
++  TESTIT3 (logb, - ,nan, "", isnan, -);
+ 
+-  TESTIT3 (significand, ,inf, , isinf);
+-  TESTIT3 (significand, - ,inf, , isinf);
+-  TESTIT3 (significand,  ,nan, "", isnan);
+-  TESTIT3 (significand, - ,nan, "", isnan);
++  TESTIT3 (significand, ,inf, , isinf, );
++  TESTIT3 (significand, - ,inf, , isinf, -);
++  TESTIT3 (significand,  ,nan, "", isnan, );
++  TESTIT3 (significand, - ,nan, "", isnan, -);
+ }
+ 
+ int main()
+Index: gcc/testsuite/gcc.dg/torture/pr53922.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/torture/pr53922.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/gcc.dg/torture/pr53922.c	(.../branches/gcc-4_7-branch)
+@@ -1,6 +1,7 @@
+ /* { dg-do run } */
+ /* { dg-require-weak "" } */
+-/* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } { "*" } { "" } } */
++/* { dg-skip-if "No undefined weak" { alpha*-*-osf* } } */
++/* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } } */
+ 
+ int x(int a)
+ {
+Index: gcc/testsuite/gcc.dg/pr56890-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/pr56890-1.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/gcc.dg/pr56890-1.c	(.../branches/gcc-4_7-branch)
+@@ -0,0 +1,15 @@
++/* PR target/56890 */
++/* Reported by Rainer Jung <rainer.jung@kippdata.de> */
++
++/* { dg-do assemble } */
++/* { dg-options "-O2" } */
++
++unsigned int buggy(unsigned int min, unsigned int max)
++{
++    if (max < 16384) {
++        unsigned short num16 = 0;
++        num16 = min + (long) ((double) (max - min + 1.0) * (num16 / (65535 + 1.0)));
++        return num16;
++    }
++    return 0;
++}
+Index: gcc/testsuite/ChangeLog
+===================================================================
+--- a/src/gcc/testsuite/ChangeLog	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/ChangeLog	(.../branches/gcc-4_7-branch)
+@@ -1,3 +1,88 @@
++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-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  Christian Bruel  <christian.bruel@st.com>
++
++	PR target/57108
++	* gcc.target/sh/pr57108.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>
++
++	Backport from trunk:
++
++	PR fortran/56786
++	* gfortran.dg/namelist_81.f90:  New test.
++
++2013-04-28  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/53685
++	PR fortran/57022
++	* gfortran.dg/transfer_check_4.f90: New.
++
++2013-04-19  Marek Polacek  <polacek@redhat.com>
++
++	Backport from mainline
++	2013-01-08  Steven Bosscher  <steven@gcc.gnu.org>
++		    Jakub Jelinek  <jakub@redhat.com>
++
++	PR tree-optimization/48189
++	* gcc.dg/pr48189.c: New test.
++
++2013-04-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
++
++	* gcc.dg/torture/pr53922.c: Skip on alpha*-*-osf*.
++	Remove dg-skip-if default args.
++
++2013-04-15  Eric Botcazou  <ebotcazou@adacore.com>
++
++	* gcc.dg/pr56890-1.c: New test.
++	* gcc.dg/pr56890-2.c: Likewise.
++
+ 2013-04-11  Release Manager
+ 
+ 	* GCC 4.7.3 released.
+Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C	(.../branches/gcc-4_7-branch)
+@@ -0,0 +1,14 @@
++// PR c++/56388
++// { dg-require-effective-target c++11 }
++
++int main()
++{
++    bool /*const*/ condition = false;
++
++    [&]{
++        try{}
++        catch(...){
++            if(condition){}
++        }
++    }();
++}
+Index: gcc/cp/ChangeLog
+===================================================================
+--- a/src/gcc/cp/ChangeLog	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/cp/ChangeLog	(.../branches/gcc-4_7-branch)
+@@ -1,3 +1,13 @@
++2013-04-21  Eric Botcazou  <ebotcazou@adacore.com>
++
++	* parser.c (cp_parser_late_return_type_opt): Fix C++ism.
++
++2013-04-15  Jason Merrill  <jason@redhat.com>
++
++	PR c++/56388
++	* semantics.c (insert_capture_proxy): Just use index 1 in the
++	stmt_list_stack.
++
+ 2013-04-11  Release Manager
+ 
+ 	* GCC 4.7.3 released.
+Index: gcc/cp/semantics.c
+===================================================================
+--- a/src/gcc/cp/semantics.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/cp/semantics.c	(.../branches/gcc-4_7-branch)
+@@ -8959,13 +8959,12 @@
+ insert_capture_proxy (tree var)
+ {
+   cp_binding_level *b;
+-  int skip;
+   tree stmt_list;
+ 
+   /* Put the capture proxy in the extra body block so that it won't clash
+      with a later local variable.  */
+   b = current_binding_level;
+-  for (skip = 0; ; ++skip)
++  for (;;)
+     {
+       cp_binding_level *n = b->level_chain;
+       if (n->kind == sk_function_parms)
+@@ -8976,8 +8975,7 @@
+ 
+   /* And put a DECL_EXPR in the STATEMENT_LIST for the same block.  */
+   var = build_stmt (DECL_SOURCE_LOCATION (var), DECL_EXPR, var);
+-  stmt_list = VEC_index (tree, stmt_list_stack,
+-			 VEC_length (tree, stmt_list_stack) - 1 - skip);
++  stmt_list = VEC_index (tree, stmt_list_stack, 1);
+   gcc_assert (stmt_list);
+   append_to_statement_list_force (var, &stmt_list);
+ }
+Index: gcc/cp/parser.c
+===================================================================
+--- a/src/gcc/cp/parser.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/cp/parser.c	(.../branches/gcc-4_7-branch)
+@@ -16691,7 +16691,7 @@
+ cp_parser_late_return_type_opt (cp_parser* parser, cp_cv_quals quals)
+ {
+   cp_token *token;
+-  tree type;
++  tree type, save_ccp, save_ccr;
+ 
+   /* Peek at the next token.  */
+   token = cp_lexer_peek_token (parser->lexer);
+@@ -16702,8 +16702,8 @@
+   /* Consume the ->.  */
+   cp_lexer_consume_token (parser->lexer);
+ 
+-  tree save_ccp = current_class_ptr;
+-  tree save_ccr = current_class_ref;
++  save_ccp = current_class_ptr;
++  save_ccr = current_class_ref;
+   if (quals >= 0)
+     {
+       /* DR 1207: 'this' is in scope in the trailing return type.  */
+Index: gcc/dwarf2out.c
+===================================================================
+--- a/src/gcc/dwarf2out.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/dwarf2out.c	(.../branches/gcc-4_7-branch)
+@@ -22538,7 +22538,7 @@
+   /* Add the name for the main input file now.  We delayed this from
+      dwarf2out_init to avoid complications with PCH.  */
+   add_name_attribute (comp_unit_die (), remap_debug_filename (filename));
+-  if (!IS_ABSOLUTE_PATH (filename))
++  if (!IS_ABSOLUTE_PATH (filename) || targetm.force_at_comp_dir)
+     add_comp_dir_attribute (comp_unit_die ());
+   else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL)
+     {
+Index: gcc/predict.c
+===================================================================
+--- a/src/gcc/predict.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/predict.c	(.../branches/gcc-4_7-branch)
+@@ -983,7 +983,8 @@
+ 	  if (TREE_CODE (niter) == INTEGER_CST)
+ 	    {
+ 	      if (host_integerp (niter, 1)
+-		  && compare_tree_int (niter, max-1) == -1)
++		  && max
++		  && compare_tree_int (niter, max - 1) == -1)
+ 		nitercst = tree_low_cst (niter, 1) + 1;
+ 	      else
+ 		nitercst = max;
+@@ -1005,6 +1006,11 @@
+ 	  else
+ 	    continue;
+ 
++	  /* If the prediction for number of iterations is zero, do not
++	     predict the exit edges.  */
++	  if (nitercst == 0)
++	    continue;
++
+ 	  probability = ((REG_BR_PROB_BASE + nitercst / 2) / nitercst);
+ 	  predict_edge (ex, predictor, probability);
+ 	}
+Index: gcc/fortran/ChangeLog
+===================================================================
+--- a/src/gcc/fortran/ChangeLog	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/fortran/ChangeLog	(.../branches/gcc-4_7-branch)
+@@ -1,3 +1,26 @@
++2013-04-26  Janus Weil  <janus@gcc.gnu.org>
++
++	Backports from trunk:
++
++	PR fortran/56968
++	* expr.c (gfc_check_pointer_assign): Handle generic functions returning
++	procedure pointers.
++
++	PR fortran/53685
++	PR fortran/57022
++	* check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE
++	expressions.
++	* target-memory.h (gfc_element_size): New prototype.
++	* target-memory.c (size_array): Remove.
++	(gfc_element_size): New function.
++	(gfc_target_expr_size): Modified to always return the full size of the
++	expression.
++
++2013-04-18  Tobias Burnus  <burnus@net-b.de>
++
++	PR fortran/56994
++	* invoke.texi (NEAREST): S argument is not optional.
++
+ 2013-04-11  Release Manager
+ 
+ 	* GCC 4.7.3 released.
+Index: gcc/fortran/expr.c
+===================================================================
+--- a/src/gcc/fortran/expr.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/fortran/expr.c	(.../branches/gcc-4_7-branch)
+@@ -3493,8 +3493,12 @@
+ 	}
+       else if (rvalue->expr_type == EXPR_FUNCTION)
+ 	{
+-	  s2 = rvalue->symtree->n.sym->result;
+-	  name = rvalue->symtree->n.sym->result->name;
++	  if (rvalue->value.function.esym)
++	    s2 = rvalue->value.function.esym->result;
++	  else
++	    s2 = rvalue->symtree->n.sym->result;
++
++	  name = s2->name;
+ 	}
+       else
+ 	{
+Index: gcc/fortran/target-memory.c
+===================================================================
+--- a/src/gcc/fortran/target-memory.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/fortran/target-memory.c	(.../branches/gcc-4_7-branch)
+@@ -35,17 +35,7 @@
+ /* --------------------------------------------------------------- */ 
+ /* Calculate the size of an expression.  */
+ 
+-static size_t
+-size_array (gfc_expr *e)
+-{
+-  mpz_t array_size;
+-  gfc_constructor *c = gfc_constructor_first (e->value.constructor);
+-  size_t elt_size = gfc_target_expr_size (c->expr);
+ 
+-  gfc_array_size (e, &array_size);
+-  return (size_t)mpz_get_ui (array_size) * elt_size;
+-}
+-
+ static size_t
+ size_integer (int kind)
+ {
+@@ -82,16 +72,14 @@
+ }
+ 
+ 
++/* Return the size of a single element of the given expression.
++   Identical to gfc_target_expr_size for scalars.  */
++
+ size_t
+-gfc_target_expr_size (gfc_expr *e)
++gfc_element_size (gfc_expr *e)
+ {
+   tree type;
+ 
+-  gcc_assert (e != NULL);
+-
+-  if (e->expr_type == EXPR_ARRAY)
+-    return size_array (e);
+-
+   switch (e->ts.type)
+     {
+     case BT_INTEGER:
+@@ -130,12 +118,36 @@
+ 	return int_size_in_bytes (type);
+       }
+     default:
+-      gfc_internal_error ("Invalid expression in gfc_target_expr_size.");
++      gfc_internal_error ("Invalid expression in gfc_element_size.");
+       return 0;
+     }
+ }
+ 
+ 
++/* Return the size of an expression in its target representation.  */
++
++size_t
++gfc_target_expr_size (gfc_expr *e)
++{
++  mpz_t tmp;
++  size_t asz;
++
++  gcc_assert (e != NULL);
++
++  if (e->rank)
++    {
++      if (gfc_array_size (e, &tmp))
++	asz = mpz_get_ui (tmp);
++      else
++	asz = 0;
++    }
++  else
++    asz = 1;
++
++  return asz * gfc_element_size (e);
++}
++
++
+ /* The encode_* functions export a value into a buffer, and 
+    return the number of bytes of the buffer that have been
+    used.  */
+Index: gcc/fortran/target-memory.h
+===================================================================
+--- a/src/gcc/fortran/target-memory.h	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/fortran/target-memory.h	(.../branches/gcc-4_7-branch)
+@@ -25,7 +25,7 @@
+ /* Convert a BOZ to REAL or COMPLEX.  */
+ bool gfc_convert_boz (gfc_expr *, gfc_typespec *);
+ 
+-/* Return the size of an expression in its target representation.  */
++size_t gfc_element_size (gfc_expr *);
+ size_t gfc_target_expr_size (gfc_expr *);
+ 
+ /* Write a constant expression in binary form to a target buffer.  */
+Index: gcc/fortran/check.c
+===================================================================
+--- a/src/gcc/fortran/check.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/fortran/check.c	(.../branches/gcc-4_7-branch)
+@@ -3988,8 +3988,6 @@
+ 			      size_t *result_length_p)
+ {
+   size_t result_elt_size;
+-  mpz_t tmp;
+-  gfc_expr *mold_element;
+ 
+   if (source->expr_type == EXPR_FUNCTION)
+     return FAILURE;
+@@ -3998,20 +3996,12 @@
+     return FAILURE;
+ 
+   /* Calculate the size of the source.  */
+-  if (source->expr_type == EXPR_ARRAY
+-      && gfc_array_size (source, &tmp) == FAILURE)
+-    return FAILURE;
+-
+   *source_size = gfc_target_expr_size (source);
+   if (*source_size == 0)
+     return FAILURE;
+ 
+-  mold_element = mold->expr_type == EXPR_ARRAY
+-		 ? gfc_constructor_first (mold->value.constructor)->expr
+-		 : mold;
+-
+   /* Determine the size of the element.  */
+-  result_elt_size = gfc_target_expr_size (mold_element);
++  result_elt_size = gfc_element_size (mold);
+   if (result_elt_size == 0)
+     return FAILURE;
+ 
+Index: gcc/cfgexpand.c
+===================================================================
+--- a/src/gcc/cfgexpand.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/cfgexpand.c	(.../branches/gcc-4_7-branch)
+@@ -3646,6 +3646,8 @@
+ avoid_complex_debug_insns (rtx insn, rtx *exp_p, int depth)
+ {
+   rtx exp = *exp_p;
++  const char *format_ptr;
++  int i, j;
+ 
+   if (exp == NULL_RTX)
+     return;
+@@ -3668,8 +3670,7 @@
+       return;
+     }
+ 
+-  const char *format_ptr = GET_RTX_FORMAT (GET_CODE (exp));
+-  int i, j;
++  format_ptr = GET_RTX_FORMAT (GET_CODE (exp));
+   for (i = 0; i < GET_RTX_LENGTH (GET_CODE (exp)); i++)
+     switch (*format_ptr++)
+       {
+Index: gcc/sched-deps.c
+===================================================================
+--- a/src/gcc/sched-deps.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/sched-deps.c	(.../branches/gcc-4_7-branch)
+@@ -1563,24 +1563,15 @@
+ add_dependence_list_and_free (struct deps_desc *deps, rtx insn, rtx *listp,
+                               int uncond, enum reg_note dep_type)
+ {
+-  rtx list, next;
++  add_dependence_list (insn, *listp, uncond, dep_type);
+ 
+   /* We don't want to short-circuit dependencies involving debug
+      insns, because they may cause actual dependencies to be
+      disregarded.  */
+   if (deps->readonly || DEBUG_INSN_P (insn))
+-    {
+-      add_dependence_list (insn, *listp, uncond, dep_type);
+-      return;
+-    }
++    return;
+ 
+-  for (list = *listp, *listp = NULL; list ; list = next)
+-    {
+-      next = XEXP (list, 1);
+-      if (uncond || ! sched_insns_conditions_mutex_p (insn, XEXP (list, 0)))
+-	add_dependence (insn, XEXP (list, 0), dep_type);
+-      free_INSN_LIST_node (list);
+-    }
++  free_INSN_LIST_list (listp);
+ }
+ 
+ /* Remove all occurences of INSN from LIST.  Return the number of
+@@ -1764,6 +1755,15 @@
+   add_dependence_list_and_free (deps, insn, &deps->pending_jump_insns, 1,
+ 				REG_DEP_ANTI);
+ 
++  if (DEBUG_INSN_P (insn))
++    {
++      if (for_write)
++	free_INSN_LIST_list (&deps->pending_read_insns);
++      free_INSN_LIST_list (&deps->pending_write_insns);
++      free_INSN_LIST_list (&deps->last_pending_memory_flush);
++      free_INSN_LIST_list (&deps->pending_jump_insns);
++    }
++
+   if (!deps->readonly)
+     {
+       free_EXPR_LIST_list (&deps->pending_write_mems);
+@@ -3262,9 +3262,9 @@
+             SET_REGNO_REG_SET (&deps->reg_last_in_use, i);
+           }
+ 
+-      /* Flush pending lists on jumps, but not on speculative checks.  */
+-      if (JUMP_P (insn) && !(sel_sched_p ()
+-                             && sel_insn_is_speculation_check (insn)))
++      /* Don't flush pending lists on speculative checks for
++	 selective scheduling.  */
++      if (!sel_sched_p () || !sel_insn_is_speculation_check (insn))
+ 	flush_pending_lists (deps, insn, true, true);
+ 
+       reg_pending_barrier = NOT_A_BARRIER;
+Index: gcc/config/sparc/sparc.c
+===================================================================
+--- a/src/gcc/config/sparc/sparc.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/config/sparc/sparc.c	(.../branches/gcc-4_7-branch)
+@@ -4207,13 +4207,14 @@
+    mapped into one sparc_mode_class mode.  */
+ 
+ enum sparc_mode_class {
+-  S_MODE, D_MODE, T_MODE, O_MODE,
++  H_MODE, S_MODE, D_MODE, T_MODE, O_MODE,
+   SF_MODE, DF_MODE, TF_MODE, OF_MODE,
+   CC_MODE, CCFP_MODE
+ };
+ 
+ /* Modes for single-word and smaller quantities.  */
+-#define S_MODES ((1 << (int) S_MODE) | (1 << (int) SF_MODE))
++#define S_MODES \
++  ((1 << (int) H_MODE) | (1 << (int) S_MODE) | (1 << (int) SF_MODE))
+ 
+ /* Modes for double-word and smaller quantities.  */
+ #define D_MODES (S_MODES | (1 << (int) D_MODE) | (1 << DF_MODE))
+@@ -4224,13 +4225,11 @@
+ /* Modes for 8-word and smaller quantities.  */
+ #define O_MODES (T_MODES | (1 << (int) O_MODE) | (1 << (int) OF_MODE))
+ 
+-/* Modes for single-float quantities.  We must allow any single word or
+-   smaller quantity.  This is because the fix/float conversion instructions
+-   take integer inputs/outputs from the float registers.  */
+-#define SF_MODES (S_MODES)
++/* Modes for single-float quantities.  */
++#define SF_MODES ((1 << (int) S_MODE) | (1 << (int) SF_MODE))
+ 
+ /* Modes for double-float and smaller quantities.  */
+-#define DF_MODES (D_MODES)
++#define DF_MODES (SF_MODES | (1 << (int) D_MODE) | (1 << DF_MODE))
+ 
+ /* Modes for quad-float and smaller quantities.  */
+ #define TF_MODES (DF_MODES | (1 << (int) TF_MODE))
+@@ -4326,7 +4325,9 @@
+ 	case MODE_INT:
+ 	case MODE_PARTIAL_INT:
+ 	case MODE_COMPLEX_INT:
+-	  if (GET_MODE_SIZE (i) <= 4)
++	  if (GET_MODE_SIZE (i) < 4)
++	    sparc_mode_class[i] = 1 << (int) H_MODE;
++	  else if (GET_MODE_SIZE (i) == 4)
+ 	    sparc_mode_class[i] = 1 << (int) S_MODE;
+ 	  else if (GET_MODE_SIZE (i) == 8)
+ 	    sparc_mode_class[i] = 1 << (int) D_MODE;
+@@ -4338,14 +4339,16 @@
+ 	    sparc_mode_class[i] = 0;
+ 	  break;
+ 	case MODE_VECTOR_INT:
+-	  if (GET_MODE_SIZE (i) <= 4)
+-	    sparc_mode_class[i] = 1 << (int)SF_MODE;
++	  if (GET_MODE_SIZE (i) == 4)
++	    sparc_mode_class[i] = 1 << (int) SF_MODE;
+ 	  else if (GET_MODE_SIZE (i) == 8)
+-	    sparc_mode_class[i] = 1 << (int)DF_MODE;
++	    sparc_mode_class[i] = 1 << (int) DF_MODE;
++	  else
++	    sparc_mode_class[i] = 0;
+ 	  break;
+ 	case MODE_FLOAT:
+ 	case MODE_COMPLEX_FLOAT:
+-	  if (GET_MODE_SIZE (i) <= 4)
++	  if (GET_MODE_SIZE (i) == 4)
+ 	    sparc_mode_class[i] = 1 << (int) SF_MODE;
+ 	  else if (GET_MODE_SIZE (i) == 8)
+ 	    sparc_mode_class[i] = 1 << (int) DF_MODE;
+Index: gcc/config/i386/i386.md
+===================================================================
+--- a/src/gcc/config/i386/i386.md	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/config/i386/i386.md	(.../branches/gcc-4_7-branch)
+@@ -3444,9 +3444,9 @@
+ })
+ 
+ (define_insn "*zero_extendsidi2_rex64"
+-  [(set (match_operand:DI 0 "nonimmediate_operand"  "=r,o,?*Ym,?*y,?*Yi,*x")
++  [(set (match_operand:DI 0 "nonimmediate_operand"  "=r,o,?*Ym,?!*y,?*Yi,*x")
+ 	(zero_extend:DI
+-	 (match_operand:SI 1 "nonimmediate_operand" "rm,0,r   ,m  ,r   ,m")))]
++	 (match_operand:SI 1 "nonimmediate_operand" "rm,0,r   ,m   ,r   ,m")))]
+   "TARGET_64BIT"
+   "@
+    mov{l}\t{%1, %k0|%k0, %1}
+@@ -3469,9 +3469,9 @@
+ 
+ ;; %%% Kill me once multi-word ops are sane.
+ (define_insn "zero_extendsidi2_1"
+-  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,?r,?o,?*Ym,?*y,?*Yi,*x")
++  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,?r,?o,?*Ym,?!*y,?*Yi,*x")
+ 	(zero_extend:DI
+-	 (match_operand:SI 1 "nonimmediate_operand" "0,rm,r ,r   ,m  ,r   ,m")))
++	 (match_operand:SI 1 "nonimmediate_operand" "0,rm,r ,r   ,m   ,r   ,m")))
+    (clobber (reg:CC FLAGS_REG))]
+   "!TARGET_64BIT"
+   "@
+Index: gcc/config/i386/sse.md
+===================================================================
+--- a/src/gcc/config/i386/sse.md	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/config/i386/sse.md	(.../branches/gcc-4_7-branch)
+@@ -11167,7 +11167,8 @@
+ 	 (match_operand:SI 2 "const_0_to_<sserotatemax>_operand" "n")))]
+   "TARGET_XOP"
+ {
+-  operands[3] = GEN_INT ((<ssescalarnum> * 8) - INTVAL (operands[2]));
++  operands[3]
++    = GEN_INT (GET_MODE_BITSIZE (<ssescalarmode>mode) - INTVAL (operands[2]));
+   return \"vprot<ssemodesuffix>\t{%3, %1, %0|%0, %1, %3}\";
+ }
+   [(set_attr "type" "sseishft")
+Index: gcc/config/i386/i386.c
+===================================================================
+--- a/src/gcc/config/i386/i386.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/config/i386/i386.c	(.../branches/gcc-4_7-branch)
+@@ -20026,7 +20026,7 @@
+ 	      vec[i * 2 + 1] = const1_rtx;
+ 	    }
+ 	  vt = gen_rtx_CONST_VECTOR (maskmode, gen_rtvec_v (w, vec));
+-	  vt = force_const_mem (maskmode, vt);
++	  vt = validize_mem (force_const_mem (maskmode, vt));
+ 	  t1 = expand_simple_binop (maskmode, PLUS, t1, vt, t1, 1,
+ 				    OPTAB_DIRECT);
+ 
+@@ -20223,7 +20223,7 @@
+       for (i = 0; i < 16; ++i)
+ 	vec[i] = GEN_INT (i/e * e);
+       vt = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, vec));
+-      vt = force_const_mem (V16QImode, vt);
++      vt = validize_mem (force_const_mem (V16QImode, vt));
+       if (TARGET_XOP)
+ 	emit_insn (gen_xop_pperm (mask, mask, mask, vt));
+       else
+@@ -20234,7 +20234,7 @@
+       for (i = 0; i < 16; ++i)
+ 	vec[i] = GEN_INT (i % e);
+       vt = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, vec));
+-      vt = force_const_mem (V16QImode, vt);
++      vt = validize_mem (force_const_mem (V16QImode, vt));
+       emit_insn (gen_addv16qi3 (mask, mask, vt));
+     }
+ 
+Index: gcc/config/sh/sh.md
+===================================================================
+--- a/src/gcc/config/sh/sh.md	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/config/sh/sh.md	(.../branches/gcc-4_7-branch)
+@@ -654,7 +654,7 @@
+ 
+ (define_insn "tstsi_t_zero_extract_eq"
+   [(set (reg:SI T_REG)
+-	(eq:SI (zero_extract:SI (match_operand 0 "logical_operand" "z")
++	(eq:SI (zero_extract:SI (match_operand:SI 0 "logical_operand" "z")
+ 		(match_operand:SI 1 "const_int_operand")
+ 		(match_operand:SI 2 "const_int_operand"))
+          (const_int 0)))]
+Index: gcc/config/darwin.h
+===================================================================
+--- a/src/gcc/config/darwin.h	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/config/darwin.h	(.../branches/gcc-4_7-branch)
+@@ -356,7 +356,9 @@
+      %{!Zbundle:%{pg:%{static:-lgcrt0.o}				    \
+                      %{!static:%{object:-lgcrt0.o}			    \
+                                %{!object:%{preload:-lgcrt0.o}		    \
+-                                 %{!preload:-lgcrt1.o %(darwin_crt2)}}}}    \
++                                 %{!preload:-lgcrt1.o                       \
++                                 %:version-compare(>= 10.8 mmacosx-version-min= -no_new_main) \
++                                 %(darwin_crt2)}}}}    \
+                 %{!pg:%{static:-lcrt0.o}				    \
+                       %{!static:%{object:-lcrt0.o}			    \
+                                 %{!object:%{preload:-lcrt0.o}		    \
+@@ -379,7 +381,7 @@
+ #define DARWIN_CRT1_SPEC						\
+   "%:version-compare(!> 10.5 mmacosx-version-min= -lcrt1.o)		\
+    %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lcrt1.10.5.o)	\
+-   %:version-compare(>= 10.6 mmacosx-version-min= -lcrt1.10.6.o)	\
++   %:version-compare(>< 10.6 10.8 mmacosx-version-min= -lcrt1.10.6.o)	\
+    %{fgnu-tm: -lcrttms.o}"
+ 
+ /* Default Darwin ASM_SPEC, very simple.  */
+@@ -414,6 +416,8 @@
+ 
+ #define TARGET_WANT_DEBUG_PUB_SECTIONS true
+ 
++#define TARGET_FORCE_AT_COMP_DIR true
++
+ /* When generating stabs debugging, use N_BINCL entries.  */
+ 
+ #define DBX_USE_BINCL
+Index: gcc/config/pa/pa.c
+===================================================================
+--- a/src/gcc/config/pa/pa.c	(.../tags/gcc_4_7_3_release)
++++ b/src/gcc/config/pa/pa.c	(.../branches/gcc-4_7-branch)
+@@ -790,7 +790,9 @@
+ 	  /* Extract CODE_LABEL.  */
+ 	  orig = XEXP (orig, 0);
+ 	  add_reg_note (insn, REG_LABEL_OPERAND, orig);
+-	  LABEL_NUSES (orig)++;
++	  /* Make sure we have label and not a note.  */
++	  if (LABEL_P (orig))
++	    LABEL_NUSES (orig)++;
+ 	}
+       crtl->uses_pic_offset_table = 1;
+       return reg;
+Index: libgfortran/ChangeLog
+===================================================================
+--- a/src/libgfortran/ChangeLog	(.../tags/gcc_4_7_3_release)
++++ b/src/libgfortran/ChangeLog	(.../branches/gcc-4_7-branch)
+@@ -1,3 +1,38 @@
++2013-04-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
++
++	Backport from mainline:
++	2013-03-20  Tilo Schwarz  <tilo@tilo-schwarz.de>
++
++	PR libfortran/51825
++	* io/list_read.c (nml_read_obj): Don't end the component loop on a
++	nested derived type, but continue with the next loop iteration.
++	(nml_get_obj_data): Don't move the first_nl pointer further in the
++	list if a qualifier was found.
++
++2013-04-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
++
++	Backport from mainline:
++
++	PR libfortran/56786
++	* io/list_read.c (nml_parse_qualifier): Remove spurious next_char call
++	when checking for EOF. Use error return mechanism when EOF detected.
++	Do not return FAILURE unless parse_err_msg and parse_err_msg_size have
++	been set. Use hit_eof.
++	(nml_get_obj_data): Likewise use the correct error mechanism.
++	* io/transfer.c (hit_eof): Do not set AFTER_ENDFILE if in namelist
++	mode.
++
++2013-04-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
++
++	Backport from mainline:
++	2013-03-25  Tilo Schwarz  <tilo@tilo-schwarz.de>
++
++	PR libfortran/52512
++	* io/list_read.c (nml_parse_qualifier): To check for a derived type
++	don't use the namelist head element type but the current element type.
++	(nml_get_obj_data): Add current namelist element type to
++	nml_parse_qualifier call.
++
+ 2013-04-11  Release Manager
+ 
+ 	* GCC 4.7.3 released.
+Index: libgfortran/io/list_read.c
+===================================================================
+--- a/src/libgfortran/io/list_read.c	(.../tags/gcc_4_7_3_release)
++++ b/src/libgfortran/io/list_read.c	(.../branches/gcc-4_7-branch)
+@@ -2028,8 +2028,8 @@
+ 
+ static try
+ nml_parse_qualifier (st_parameter_dt *dtp, descriptor_dimension *ad,
+-		     array_loop_spec *ls, int rank, char *parse_err_msg,
+-		     size_t parse_err_msg_size,
++		     array_loop_spec *ls, int rank, bt nml_elem_type,
++		     char *parse_err_msg, size_t parse_err_msg_size,
+ 		     int *parsed_rank)
+ {
+   int dim;
+@@ -2053,7 +2053,7 @@
+   /* The next character in the stream should be the '('.  */
+ 
+   if ((c = next_char (dtp)) == EOF)
+-    return FAILURE;
++    goto err_ret;
+ 
+   /* Process the qualifier, by dimension and triplet.  */
+ 
+@@ -2067,7 +2067,7 @@
+ 
+ 	  /* Process a potential sign.  */
+ 	  if ((c = next_char (dtp)) == EOF)
+-	    return FAILURE;
++	    goto err_ret;
+ 	  switch (c)
+ 	    {
+ 	    case '-':
+@@ -2085,11 +2085,12 @@
+ 	  /* Process characters up to the next ':' , ',' or ')'.  */
+ 	  for (;;)
+ 	    {
+-	      if ((c = next_char (dtp)) == EOF)
+-		return FAILURE;
+-
++	      c = next_char (dtp);
+ 	      switch (c)
+ 		{
++		case EOF:
++		  goto err_ret;
++
+ 		case ':':
+                   is_array_section = 1;
+ 		  break;
+@@ -2112,10 +2113,8 @@
+ 		  push_char (dtp, c);
+ 		  continue;
+ 
+-		case ' ': case '\t':
++		case ' ': case '\t': case '\r': case '\n':
+ 		  eat_spaces (dtp);
+-		  if ((c = next_char (dtp) == EOF))
+-		    return FAILURE;
+ 		  break;
+ 
+ 		default:
+@@ -2204,7 +2203,7 @@
+ 		      do not allow excess data to be processed.  */
+ 		  if (is_array_section == 1
+ 		      || !(compile_options.allow_std & GFC_STD_GNU)
+-		      || dtp->u.p.ionml->type == BT_DERIVED)
++		      || nml_elem_type == BT_DERIVED)
+ 		    ls[dim].end = ls[dim].start;
+ 		  else
+ 		    dtp->u.p.expanded_read = 1;
+@@ -2257,6 +2256,15 @@
+ 
+ err_ret:
+ 
++  /* The EOF error message is issued by hit_eof. Return true so that the
++     caller does not use parse_err_msg and parse_err_msg_size to generate
++     an unrelated error message.  */
++  if (c == EOF)
++    {
++      hit_eof (dtp);
++      dtp->u.p.input_complete = 1;
++      return SUCCESS;
++    }
+   return FAILURE;
+ }
+ 
+@@ -2553,17 +2561,17 @@
+ 	       since a single object can have multiple reads.  */
+ 	    dtp->u.p.expanded_read = 0;
+ 
+-	    /* Now loop over the components. Update the component pointer
+-	       with the return value from nml_write_obj.  This loop jumps
+-	       past nested derived types by testing if the potential
+-	       component name contains '%'.  */
++	    /* Now loop over the components.  */
+ 
+ 	    for (cmp = nl->next;
+ 		 cmp &&
+-		   !strncmp (cmp->var_name, obj_name, obj_name_len) &&
+-		   !strchr (cmp->var_name + obj_name_len, '%');
++		   !strncmp (cmp->var_name, obj_name, obj_name_len);
+ 		 cmp = cmp->next)
+ 	      {
++		/* Jump over nested derived type by testing if the potential
++		   component name contains '%'.  */
++		if (strchr (cmp->var_name + obj_name_len, '%'))
++		    continue;
+ 
+ 		if (nml_read_obj (dtp, cmp, (index_type)(pdata - nl->mem_pos),
+ 				  pprev_nl, nml_err_msg, nml_err_msg_size,
+@@ -2726,12 +2734,12 @@
+     return SUCCESS;
+ 
+   if ((c = next_char (dtp)) == EOF)
+-    return FAILURE;
++    goto nml_err_ret;
+   switch (c)
+     {
+     case '=':
+       if ((c = next_char (dtp)) == EOF)
+-	return FAILURE;
++	goto nml_err_ret;
+       if (c != '?')
+ 	{
+ 	  snprintf (nml_err_msg, nml_err_msg_size, 
+@@ -2781,8 +2789,9 @@
+       if (!is_separator (c))
+ 	push_char (dtp, tolower(c));
+       if ((c = next_char (dtp)) == EOF)
+-	return FAILURE;
+-    } while (!( c=='=' || c==' ' || c=='\t' || c =='(' || c =='%' ));
++	goto nml_err_ret;
++    }
++  while (!( c=='=' || c==' ' || c=='\t' || c =='(' || c =='%' ));
+ 
+   unget_char (dtp, c);
+ 
+@@ -2842,7 +2851,7 @@
+     {
+       parsed_rank = 0;
+       if (nml_parse_qualifier (dtp, nl->dim, nl->ls, nl->var_rank,
+-			       nml_err_msg, nml_err_msg_size, 
++			       nl->type, nml_err_msg, nml_err_msg_size,
+ 			       &parsed_rank) == FAILURE)
+ 	{
+ 	  char *nml_err_msg_end = strchr (nml_err_msg, '\0');
+@@ -2857,7 +2866,7 @@
+       qualifier_flag = 1;
+ 
+       if ((c = next_char (dtp)) == EOF)
+-	return FAILURE;
++	goto nml_err_ret;
+       unget_char (dtp, c);
+     }
+   else if (nl->var_rank > 0)
+@@ -2876,14 +2885,15 @@
+ 	  goto nml_err_ret;
+ 	}
+ 
+-      if (*pprev_nl == NULL || !component_flag)
++      /* Don't move first_nl further in the list if a qualifier was found.  */
++      if ((*pprev_nl == NULL && !qualifier_flag) || !component_flag)
+ 	first_nl = nl;
+ 
+       root_nl = nl;
+ 
+       component_flag = 1;
+       if ((c = next_char (dtp)) == EOF)
+-	return FAILURE;
++	goto nml_err_ret;
+       goto get_name;
+     }
+ 
+@@ -2898,8 +2908,8 @@
+       descriptor_dimension chd[1] = { {1, clow, nl->string_length} };
+       array_loop_spec ind[1] = { {1, clow, nl->string_length, 1} };
+ 
+-      if (nml_parse_qualifier (dtp, chd, ind, -1, nml_err_msg, 
+-			       nml_err_msg_size, &parsed_rank)
++      if (nml_parse_qualifier (dtp, chd, ind, -1, nl->type,
++			       nml_err_msg, nml_err_msg_size, &parsed_rank)
+ 	  == FAILURE)
+ 	{
+ 	  char *nml_err_msg_end = strchr (nml_err_msg, '\0');
+@@ -2921,7 +2931,7 @@
+ 	}
+ 
+       if ((c = next_char (dtp)) == EOF)
+-	return FAILURE;
++	goto nml_err_ret;
+       unget_char (dtp, c);
+     }
+ 
+@@ -2961,7 +2971,7 @@
+     return SUCCESS;
+ 
+   if ((c = next_char (dtp)) == EOF)
+-    return FAILURE;
++    goto nml_err_ret;
+ 
+   if (c != '=')
+     {
+@@ -2996,6 +3006,17 @@
+ 
+ nml_err_ret:
+ 
++  /* The EOF error message is issued by hit_eof. Return true so that the
++     caller does not use nml_err_msg and nml_err_msg_size to generate
++     an unrelated error message.  */
++  if (c == EOF)
++    {
++      dtp->u.p.input_complete = 1;
++      unget_char (dtp, c);
++      hit_eof (dtp);
++      return SUCCESS;
++    }
++
+   return FAILURE;
+ }
+ 
+Index: libgfortran/io/transfer.c
+===================================================================
+--- a/src/libgfortran/io/transfer.c	(.../tags/gcc_4_7_3_release)
++++ b/src/libgfortran/io/transfer.c	(.../branches/gcc-4_7-branch)
+@@ -3748,7 +3748,7 @@
+       case NO_ENDFILE:
+       case AT_ENDFILE:
+         generate_error (&dtp->common, LIBERROR_END, NULL);
+-	if (!is_internal_unit (dtp))
++	if (!is_internal_unit (dtp) && !dtp->u.p.namelist_mode)
+ 	  {
+ 	    dtp->u.p.current_unit->endfile = AFTER_ENDFILE;
+ 	    dtp->u.p.current_unit->current_record = 0;
diff -pruN 4.7.3-1/debian/rules2 4.7.3-2/debian/rules2
--- 4.7.3-1/debian/rules2	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/rules2	2013-05-08 15:38:04.000000000 +0000
@@ -644,6 +644,11 @@ ifneq (,$(findstring gdc, $(PKGSOURCE)))
   DEJAGNU_RUNS =
 endif
 
+# neither is gcj
+ifneq (,$(findstring gcj, $(PKGSOURCE)))
+  DEJAGNU_RUNS =
+endif
+
 # neither is gnat
 ifneq (,$(findstring gnat, $(PKGSOURCE)))
   DEJAGNU_RUNS =
diff -pruN 4.7.3-1/debian/rules.conf 4.7.3-2/debian/rules.conf
--- 4.7.3-1/debian/rules.conf	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/rules.conf	2013-05-08 15:38:04.000000000 +0000
@@ -290,10 +290,10 @@ ifneq (,$(findstring amd64,$(biarchx32ar
   LIBC_BIARCH_BUILD_DEP += libc6-dev-x32 [amd64 i386], libx32gcc1 [amd64 i386],
 endif
 ifneq (,$(findstring armel,$(biarchhfarchs)))
-  LIBC_BIARCH_BUILD_DEP += libc6-dev-armhf [armel],
+  LIBC_BIARCH_BUILD_DEP += libc6-dev-armhf [armel], libhfgcc1 [armel],
 endif
 ifneq (,$(findstring armhf,$(biarchsfarchs)))
-  LIBC_BIARCH_BUILD_DEP += libc6-dev-armel [armhf],
+  LIBC_BIARCH_BUILD_DEP += libc6-dev-armel [armhf], libsfgcc1 [armhf],
 endif
 else
   LIBC_BUILD_DEP = $(LIBC_DEV_DEP),
@@ -314,6 +314,8 @@ endif
 ifneq (,$(filter $(distrelease),lenny etch squeeze dapper hardy jaunty karmic lucid maverick natty))
   GMP_BUILD_DEP = libgmp3-dev | libgmp-dev (>= 2:5.0.1~),
   MPFR_BUILD_DEP = libmpfr-dev,
+  GMP_BUILD_DEP = libgmp-dev (>= 2:5.0.1~),
+  MPFR_BUILD_DEP = libmpfr-dev (>= 3.0.0-9~),
 else
   GMP_BUILD_DEP = libgmp-dev (>= 2:5.0.1~),
   MPFR_BUILD_DEP = libmpfr-dev (>= 3.0.0-9~),
@@ -332,7 +334,12 @@ else
     CLOOG_BUILD_DEP = libcloog-ppl-dev (>= 0.16),
     CLOOG_RUNTIME_DEP =
 endif
-MPC_BUILD_DEP = libmpc-dev,
+
+ifneq (,$(filter $(distrelease),lenny etch squeeze wheezy dapper hardy jaunty karmic lucid maverick natty oneiric precise quantal raring))
+  MPC_BUILD_DEP = libmpc-dev,
+else
+  MPC_BUILD_DEP = libmpc-dev (>= 1.0),
+endif
 
 SOURCE_BUILD_DEP :=
 ifeq (,$(findstring gcc,$(PKGSOURCE)))
@@ -412,7 +419,9 @@ endif
 
 ifeq ($(PKGSOURCE),gcc-$(BASE_VERSION))
   LIBSTDCXX_BUILD_INDEP = doxygen (>= 1.7.2), graphviz (>= 2.2), ghostscript, texlive-latex-base
-  LIBSTDCXX_BUILD_INDEP +=, xsltproc, libxml2-utils, docbook-xsl-ns
+  ifeq (,$(filter $(distrelease),lenny etch dapper hardy jaunty karmic lucid maverick natty oneiric))
+    LIBSTDCXX_BUILD_INDEP +=, xsltproc, libxml2-utils, docbook-xsl-ns
+  endif
   JAVA_BUILD_INDEP :=, $(JAVA_BUILD_INDEP)
 endif
 
@@ -632,6 +641,7 @@ addons += cdev c++dev fdev objcdev sourc
 addons += plugindev
 addons += $(if $(findstring armel,$(biarchhfarchs)),armml)
 addons += $(if $(findstring armhf,$(biarchsfarchs)),armml)
+addons += $(if $(findstring amd64,$(biarchx32archs)),x32dev)
 ifeq ($(with_libgcc),yes)
   addons += libgcc lib4gcc lib32gcc lib64gcc libn32gcc
   addons += $(if $(findstring amd64,$(biarchx32archs)),libx32gcc)
diff -pruN 4.7.3-1/debian/rules.d/binary-fortran.mk 4.7.3-2/debian/rules.d/binary-fortran.mk
--- 4.7.3-1/debian/rules.d/binary-fortran.mk	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/rules.d/binary-fortran.mk	2013-05-08 15:38:04.000000000 +0000
@@ -102,7 +102,7 @@ define __do_fortran
 	dh_fixperms -p$(p_l) -p$(p_d)
 	$(cross_makeshlibs) dh_makeshlibs -p$(p_l)
 	$(call cross_mangle_shlibs,$(p_l))
-	DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
+	$(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
 		$(call shlibdirs_to_search, \
 			$(subst gfortran$(FORTRAN_SONAME),gcc$(GCC_SONAME),$(p_l)) \
 			$(subst gfortran$(FORTRAN_SONAME),gcc$(QUADMATH_SONAME),$(p_l)) \
diff -pruN 4.7.3-1/debian/rules.d/binary-go.mk 4.7.3-2/debian/rules.d/binary-go.mk
--- 4.7.3-1/debian/rules.d/binary-go.mk	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/rules.d/binary-go.mk	2013-05-08 15:38:04.000000000 +0000
@@ -104,7 +104,7 @@ define __do_gccgo
 	dh_fixperms -p$(p_l) -p$(p_d)
 	$(cross_makeshlibs) dh_makeshlibs -p$(p_l)
 	$(call cross_mangle_shlibs,$(p_l))
-	$(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
+	$(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
 		$(call shlibdirs_to_search,$(subst go$(GO_SONAME),gcc$(GCC_SONAME),$(p_l)),$(2))
 	$(call cross_mangle_substvars,$(p_l))
 	$(cross_gencontrol) dh_gencontrol -p$(p_l) -p$(p_d) \
diff -pruN 4.7.3-1/debian/rules.d/binary-libgcc.mk 4.7.3-2/debian/rules.d/binary-libgcc.mk
--- 4.7.3-1/debian/rules.d/binary-libgcc.mk	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/rules.d/binary-libgcc.mk	2013-05-08 15:38:04.000000000 +0000
@@ -264,7 +264,7 @@ define __do_libgcc
 	)
 
 	$(if $(DEB_STAGE),,
-	    DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
+	    $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
 		$(call shlibdirs_to_search,,$(2))
 	)
 	$(call cross_mangle_substvars,$(p_l))
diff -pruN 4.7.3-1/debian/rules.d/binary-libgomp.mk 4.7.3-2/debian/rules.d/binary-libgomp.mk
--- 4.7.3-1/debian/rules.d/binary-libgomp.mk	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/rules.d/binary-libgomp.mk	2013-05-08 15:38:04.000000000 +0000
@@ -35,7 +35,7 @@ define __do_gomp
 	dh_fixperms -p$(p_l) -p$(p_d)
 	$(cross_makeshlibs) dh_makeshlibs -p$(p_l)
 	$(call cross_mangle_shlibs,$(p_l))
-	DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
+	$(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
 		$(call shlibdirs_to_search,$(subst gomp$(GOMP_SONAME),gcc$(GCC_SONAME),$(p_l)),$(2))
 	$(call cross_mangle_substvars,$(p_l))
 	$(cross_gencontrol) dh_gencontrol -p$(p_l) -p$(p_d)	\
diff -pruN 4.7.3-1/debian/rules.d/binary-libitm.mk 4.7.3-2/debian/rules.d/binary-libitm.mk
--- 4.7.3-1/debian/rules.d/binary-libitm.mk	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/rules.d/binary-libitm.mk	2013-05-08 15:38:04.000000000 +0000
@@ -35,7 +35,7 @@ define __do_itm
 	dh_fixperms -p$(p_l) -p$(p_d)
 	$(cross_makeshlibs) dh_makeshlibs -p$(p_l)
 	$(call cross_mangle_shlibs,$(p_l))
-	DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
+	$(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
 		$(call shlibdirs_to_search,,$(2))
 	$(call cross_mangle_substvars,$(p_l))
 	$(cross_gencontrol) dh_gencontrol -p$(p_l) -p$(p_d)	\
diff -pruN 4.7.3-1/debian/rules.d/binary-libmudflap.mk 4.7.3-2/debian/rules.d/binary-libmudflap.mk
--- 4.7.3-1/debian/rules.d/binary-libmudflap.mk	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/rules.d/binary-libmudflap.mk	2013-05-08 15:38:04.000000000 +0000
@@ -46,7 +46,7 @@ define __do_mudflap
 	dh_fixperms -p$(p_l) -p$(p_d)
 	$(cross_makeshlibs) dh_makeshlibs -p$(p_l) -V '$(p_l) (>= $(DEB_SOVERSION))'
 	$(call cross_mangle_shlibs,$(p_l))
-	DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
+	$(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
 		$(call shlibdirs_to_search,,$(2))
 	$(call cross_mangle_substvars,$(p_l))
 	$(cross_gencontrol) dh_gencontrol -p$(p_l) -p$(p_d) \
diff -pruN 4.7.3-1/debian/rules.d/binary-libobjc.mk 4.7.3-2/debian/rules.d/binary-libobjc.mk
--- 4.7.3-1/debian/rules.d/binary-libobjc.mk	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/rules.d/binary-libobjc.mk	2013-05-08 15:38:04.000000000 +0000
@@ -70,7 +70,7 @@ define __do_libobjc
 	dh_fixperms -p$(p_l) -p$(p_d)
 	$(cross_makeshlibs) dh_makeshlibs -p$(p_l) -Xlibobjc_gc.so
 	$(call cross_mangle_shlibs,$(p_l))
-	DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
+	$(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
 		$(call shlibdirs_to_search,$(subst objc$(OBJC_SONAME),gcc$(GCC_SONAME),$(p_l)),$(2))
 	$(call cross_mangle_substvars,$(p_l))
 	$(cross_gencontrol) dh_gencontrol -p$(p_l) -p$(p_d) \
diff -pruN 4.7.3-1/debian/rules.d/binary-libstdcxx.mk 4.7.3-2/debian/rules.d/binary-libstdcxx.mk
--- 4.7.3-1/debian/rules.d/binary-libstdcxx.mk	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/rules.d/binary-libstdcxx.mk	2013-05-08 15:38:04.000000000 +0000
@@ -198,7 +198,7 @@ define __do_libstdcxx
 
 	$(cross_makeshlibs) dh_makeshlibs -p$(p_l) || echo FIXME: libstdc++ symbols
 	$(call cross_mangle_shlibs,$(p_l))
-	DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
+	$(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
 		$(call shlibdirs_to_search,$(subst stdc++$(CXX_SONAME),gcc$(GCC_SONAME),$(p_l)),$(2))
 	$(call cross_mangle_substvars,$(p_l))
 
@@ -240,7 +240,7 @@ define __do_libstdcxx_dbg
 		rm -f $(d_d)/$(usr_lib$(2))/debug/libstdc++_pic.a
 	)
 
-	DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_d) \
+	$(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_d) \
 		$(call shlibdirs_to_search,$(subst $(pkg_ver),,$(subst stdc++$(CXX_SONAME),gcc$(GCC_SONAME),$(p_l))),$(2))
 	$(call cross_mangle_substvars,$(p_d))
 
@@ -406,11 +406,11 @@ endif
 		$(d_dev)/$(docdir)/$(p_base)/C++/changelog.libstdc++
 ifeq ($(with_check),yes)
 	cp -p debian/README.libstdc++-baseline \
-		$(d_dev)/$(docdir)/$(p_base)/C++/README.libstdc++-baseline
+		$(d_dev)/$(docdir)/$(p_base)/C++/README.libstdc++-baseline.$(DEB_TARGET_ARCH)
 	if [ -f $(buildlibdir)/libstdc++-v3/testsuite/current_symbols.txt ]; \
 	then \
 	  cp -p $(buildlibdir)/libstdc++-v3/testsuite/current_symbols.txt \
-	    $(d_dev)/$(docdir)/$(p_base)/C++/libstdc++_symbols.txt; \
+	    $(d_dev)/$(docdir)/$(p_base)/C++/libstdc++_symbols.txt.$(DEB_TARGET_ARCH); \
 	fi
 endif
 	cp -p $(buildlibdir)/libstdc++-v3/src/libstdc++-symbols.ver \
@@ -442,11 +442,11 @@ endif
 	dh_fixperms -p$(p_dev) -p$(p_pic) -p$(p_dbg)
 # XXX: what about biarchn32?
 #ifeq ($(biarch64),yes)
-#	DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_dev) -p$(p_pic) -p$(p_dbg) -Xlib64
+#	$(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_dev) -p$(p_pic) -p$(p_dbg) -Xlib64
 #else
-#	DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_dev) -p$(p_pic) -p$(p_dbg) -Xlib32/debug
+#	$(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_dev) -p$(p_pic) -p$(p_dbg) -Xlib32/debug
 #endif
-	DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_dev) -p$(p_pic) -p$(p_dbg)
+	$(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_dev) -p$(p_pic) -p$(p_dbg)
 	$(call cross_mangle_substvars,$(p_dbg))
 	$(cross_gencontrol) dh_gencontrol -p$(p_dev) -p$(p_pic) -p$(p_dbg) \
 		-- -v$(DEB_VERSION) $(common_substvars)
diff -pruN 4.7.3-1/debian/rules.d/binary-snapshot.mk 4.7.3-2/debian/rules.d/binary-snapshot.mk
--- 4.7.3-1/debian/rules.d/binary-snapshot.mk	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/rules.d/binary-snapshot.mk	2013-05-08 15:38:04.000000000 +0000
@@ -210,7 +210,7 @@ endif
 	  echo 'libgnarl-$(GNAT_SONAME) 1 ${p_snap} (>= $(DEB_VERSION))'; \
 	) > debian/shlibs.local
 
-	DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps)  \
+	$(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps)  \
 	  dh_shlibdeps -p$(p_snap) -l$(CURDIR)/$(d_snap)/$(PF)/lib:$(CURDIR)/$(d_snap)/$(PF)/$(if $(filter $(DEB_TARGET_ARCH),amd64 ppc64),lib32,lib64):/usr/$(DEB_TARGET_GNU_TYPE)/lib -Xlibgcj-tools -Xlibmudflap
 	-sed -i -e 's/$(p_snap)[^,]*, //g' debian/$(p_snap).substvars
 
diff -pruN 4.7.3-1/debian/rules.defs 4.7.3-2/debian/rules.defs
--- 4.7.3-1/debian/rules.defs	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/rules.defs	2013-05-08 15:38:04.000000000 +0000
@@ -340,8 +340,11 @@ with_common_libs := yes
 # XXX: should with_common_libs be "yes" only if this is the default compiler
 # version on the targeted arch?
 
-# currently, Debian experimental has gcc-4.8 too
-ifeq ($(distribution),Debian)
+# currently, Debian experimental has gcc-4.8 too (identifying as wheezy)
+ifeq (,$(filter $(distrelease),etch lenny squeeze))
+  with_common_pkgs :=
+  with_common_libs :=
+else ifeq (,$(filter $(distrelease),dapper hardy jaunty karmic lucid maverick oneiric precise quantal raring))
   with_common_pkgs :=
   with_common_libs :=
 endif
@@ -966,6 +969,7 @@ ifneq (,$(filter $(distrelease),lenny et
 # FIXME: sid currently identifies itself as wheezy, add it here after the release
 else ifneq (,$(filter $(distrelease),sid natty oneiric precise quantal))
   cloog_backend = ppl-0.11
+  cloog_backend = ppl-1.0
 else
   cloog_backend = ppl-1.0
 endif
@@ -1594,6 +1598,12 @@ else
   endef
   define cross_mangle_substvars
   endef
+  # precise's dh_shlibdeps doesn't work well for ARM multilibs
+  ifneq (,$(filter $(distrelease),precise))
+    ifneq (,$(filter $(DEB_TARGET_ARCH), armel armhf))
+      ignshld = -
+    endif
+  endif
 endif
 
 # takes a *list* of package names as $1, the multilib dirname as $2
diff -pruN 4.7.3-1/debian/rules.parameters 4.7.3-2/debian/rules.parameters
--- 4.7.3-1/debian/rules.parameters	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/rules.parameters	2013-05-08 15:38:04.000000000 +0000
@@ -2,15 +2,15 @@
 GCC_VERSION	:= 4.7.3
 NEXT_GCC_VERSION	:= 4.7.4
 BASE_VERSION	:= 4.7
-SOURCE_VERSION	:= 4.7.3-1
-DEB_VERSION	:= 4.7.3-1
-DEB_EVERSION	:= 1:4.7.3-1
+SOURCE_VERSION	:= 4.7.3-2
+DEB_VERSION	:= 4.7.3-2
+DEB_EVERSION	:= 1:4.7.3-2
 GDC_BASE_VERSION  := 
 DEB_GDC_VERSION	:= 
 DEB_SOVERSION	:= 4.7
 DEB_SOEVERSION	:= 1:4.7
 DEB_LIBGCC_SOVERSION	:= 
-DEB_LIBGCC_VERSION	:= 1:4.7.3-1
+DEB_LIBGCC_VERSION	:= 1:4.7.3-2
 DEB_STDCXX_SOVERSION	:= 4.7
 DEB_GCJ_SOVERSION	:= 4.7
 PKG_GCJ_EXT	:= 13
diff -pruN 4.7.3-1/debian/rules.patch 4.7.3-2/debian/rules.patch
--- 4.7.3-1/debian/rules.patch	2013-05-08 15:38:01.000000000 +0000
+++ 4.7.3-2/debian/rules.patch	2013-05-08 15:38:04.000000000 +0000
@@ -14,6 +14,7 @@ series_file	?= $(patchdir)/series
 
 debian_patches = \
 	$(if $(with_linaro_branch),gcc-linaro) \
+	svn-updates \
 	hjl-x32-gcc-4_7-branch \
 
 #	svn-updates$(if $(with_linaro_branch),-linaro) \
@@ -159,6 +160,8 @@ ifeq ($(with_ada),yes)
 	ada-s-taprop-gnu.adb
   endif
 
+  debian_patches += \
+	ada-link-shlib
 endif
 
 ifeq (0,1)
@@ -245,7 +248,7 @@ ifeq ($(DEB_CROSS),yes)
 endif
 
 ifeq ($(DEB_TARGET_ARCH_OS),hurd)
-  debian_patches += hurd-changes
+  debian_patches += hurd-changes r195826
 endif
 
 debian_patches += gcc-ice-hack gcc-ice-apport
@@ -260,9 +263,11 @@ debian_patches += libstdc++-arm-wno-abi
 ifneq (,$(filter $(DEB_TARGET_ARCH), mips mipsel))
   # timeouts on the buildd's, Debian
   debian_patches += libstdc++-no-testsuite
-else ifeq ($(distribution)-$(DEB_TARGET_ARCH),Ubuntu-armel)
-  # timeouts on the buildd's, Ubuntu only
-  debian_patches += libstdc++-no-testsuite
+else ifeq ($(distribution),Ubuntu)
+  ifneq (,$(filter $(DEB_TARGET_ARCH), armel ia64 mips mipsel))
+    # timeouts on the buildd's, Ubuntu only
+    debian_patches += libstdc++-no-testsuite
+  endif
 endif
 debian_patches += ada-mips
 debian_patches += libffi-ro-eh_frame_sect
