summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2013-05-07 13:38:22 +0000
committerdoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2013-05-07 13:38:22 +0000
commit0a6cd6e9fd06217d9830c50ee5cf61eb8509f632 (patch)
tree1edcc11cc000000ff337133d110c8c0e0494bb88
parentd8cfc2261e9f9d2d7c31c1f8e18e9921732ae3e7 (diff)
downloadgcc-47-0a6cd6e9fd06217d9830c50ee5cf61eb8509f632.tar.gz
* Update to SVN 20130506 (r198653) from the gcc-4_7-branch.
git-svn-id: svn://svn.debian.org/svn/gcccvs/branches/sid/gcc-4.7@6728 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
-rw-r--r--debian/changelog12
-rw-r--r--debian/control2
-rw-r--r--debian/control.m42
-rw-r--r--debian/patches/hjl-x32-gcc-4_7-branch.diff12
-rw-r--r--debian/patches/svn-updates.diff1152
-rw-r--r--debian/rules.defs1
6 files changed, 1158 insertions, 23 deletions
diff --git a/debian/changelog b/debian/changelog
index b027aed..b2b4194 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,12 +1,20 @@
-gcc-4.7 (4.7.3-3) UNRELEASED; urgency=low
+gcc-4.7 (4.7.3-3) unstable; urgency=low
+
+ * Update to SVN 20130506 (r198653) from the gcc-4_7-branch.
+ - Fix PR tree-optimization/57066, PR target/44578 (x86),
+ PR target/57098 (x86), PR target/57108 (SH), PR target/56866 (x86),
+ PR fortran/56968, PR fortran/53685, PR fortran/57022,
+ PR libfortran/51825, PR libfortran/56786, PR libfortran/52512.
[ Matthias Klose ]
* Fix control file for builds without the x32 multilibs
+ * For this upload, build-depend on gcc-4.8-base to make sure gcc-4.8 is
+ built before.
[ Samuel Thibault ]
* Backport r195826 to fix gdb build on hurd-i386.
- -- Matthias Klose <doko@debian.org> Sun, 21 Apr 2013 19:33:07 +0200
+ -- Matthias Klose <doko@debian.org> Tue, 07 May 2013 00:19:24 +0200
gcc-4.7 (4.7.3-2) experimental; urgency=low
diff --git a/debian/control b/debian/control
index aedb976..112655b 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Uploaders: Matthias Klose <doko@debian.org>
Standards-Version: 3.9.4
-Build-Depends: debhelper (>= 5.0.62),
+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],
diff --git a/debian/control.m4 b/debian/control.m4
index f06d5a1..5db3cb7 100644
--- a/debian/control.m4
+++ b/debian/control.m4
@@ -61,7 +61,7 @@ Build-Depends: DPKG_BUILD_DEP debhelper (>= 5.0.62),
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],
diff --git a/debian/patches/hjl-x32-gcc-4_7-branch.diff b/debian/patches/hjl-x32-gcc-4_7-branch.diff
index 2a6a184..860a53d 100644
--- a/debian/patches/hjl-x32-gcc-4_7-branch.diff
+++ b/debian/patches/hjl-x32-gcc-4_7-branch.diff
@@ -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 --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff
index 3aae5f2..c51b662 100644
--- a/debian/patches/svn-updates.diff
+++ b/debian/patches/svn-updates.diff
@@ -1,10 +1,10 @@
-# DP: updates from the 4.7 branch upto 20130421 (r198115).
+# DP: updates from the 4.7 branch upto 20130506 (r198653).
last_updated()
{
cat > ${dir}LAST_UPDATED <<EOF
-Sun Apr 21 14:41:06 CEST 2013
-Sun Apr 21 12:41:06 UTC 2013 (revision 198115)
+Tue May 7 00:15:37 CEST 2013
+Mon May 6 22:15:37 UTC 2013 (revision 198653)
EOF
}
@@ -227,12 +227,69 @@ Index: gcc/DATESTAMP
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_7-branch)
@@ -1 +1 @@
-20130411
-+20130421
++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,75 @@
+@@ -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.
@@ -308,6 +365,432 @@ Index: gcc/ChangeLog
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)
@@ -350,6 +833,67 @@ Index: gcc/testsuite/gcc.dg/pr48189.c
+ 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)
@@ -387,7 +931,73 @@ 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,22 @@
+@@ -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
@@ -543,7 +1153,25 @@ 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,8 @@
+@@ -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
@@ -552,6 +1180,154 @@ Index: gcc/fortran/ChangeLog
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)
@@ -706,6 +1482,92 @@ Index: gcc/config/sparc/sparc.c
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)
@@ -754,3 +1616,279 @@ Index: gcc/config/pa/pa.c
}
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 --git a/debian/rules.defs b/debian/rules.defs
index 4cf3b93..e9c30e8 100644
--- a/debian/rules.defs
+++ b/debian/rules.defs
@@ -969,6 +969,7 @@ ifneq (,$(filter $(distrelease),lenny etch squeeze dapper hardy jaunty karmic lu
# 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