summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2014-02-26 07:34:16 +0000
committerdoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2014-02-26 07:34:16 +0000
commit3a788292c1c553ed6b3db2ae7f89b1ae8312ceee (patch)
treef4b46532e31b3ccbef877e6610f178a2dcdfdfb6
parentf5edcbccfd5a5336bd277cab852102bb42731564 (diff)
downloadgcc-48-3a788292c1c553ed6b3db2ae7f89b1ae8312ceee.tar.gz
* Update to SVN 20140226 (r208166) from the gcc-4_8-branch.
git-svn-id: svn://svn.debian.org/svn/gcccvs/branches/sid/gcc-4.8@7197 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
-rw-r--r--debian/changelog4
-rw-r--r--debian/patches/svn-updates.diff1323
2 files changed, 1299 insertions, 28 deletions
diff --git a/debian/changelog b/debian/changelog
index ea785d5..5b88122 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
gcc-4.8 (4.8.2-17) UNRELEASED; urgency=medium
- * Update to SVN 20140221 (r208010) from the gcc-4_8-branch.
+ * Update to SVN 20140226 (r208166) from the gcc-4_8-branch.
* Update the ibm branch to SVN 20140223 (r208054).
- -- Matthias Klose <doko@debian.org> Mon, 24 Feb 2014 10:50:08 +0100
+ -- Matthias Klose <doko@debian.org> Wed, 26 Feb 2014 08:33:44 +0100
gcc-4.8 (4.8.2-16) unstable; urgency=medium
diff --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff
index a45d74e..10cc4a2 100644
--- a/debian/patches/svn-updates.diff
+++ b/debian/patches/svn-updates.diff
@@ -1,10 +1,10 @@
-# DP: updates from the 4.8 branch upto 20140217 (r208010).
+# DP: updates from the 4.8 branch upto 20140225 (r208166).
last_updated()
{
cat > ${dir}LAST_UPDATED <<EOF
-Fri Feb 21 19:27:11 CET 2014
-Fri Feb 21 18:27:11 UTC 2014 (revision 208010)
+Wed Feb 26 08:22:14 CET 2014
+Wed Feb 26 07:22:14 UTC 2014 (revision 208166)
EOF
}
@@ -5494,7 +5494,7 @@ Index: gcc/DATESTAMP
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_8-branch)
@@ -1 +1 @@
-20131016
-+20140221
++20140226
Index: gcc/value-prof.c
===================================================================
--- a/src/gcc/value-prof.c (.../tags/gcc_4_8_2_release)
@@ -6037,7 +6037,78 @@ Index: gcc/ChangeLog
===================================================================
--- a/src/gcc/ChangeLog (.../tags/gcc_4_8_2_release)
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_8-branch)
-@@ -1,3 +1,1497 @@
+@@ -1,3 +1,1568 @@
++2014-02-25 Richard Biener <rguenther@suse.de>
++
++ Backport from mainline
++ 2014-02-21 Richard Biener <rguenther@suse.de>
++
++ PR tree-optimization/60276
++ * tree-vectorizer.h (struct _stmt_vec_info): Add min_neg_dist field.
++ (STMT_VINFO_MIN_NEG_DIST): New macro.
++ * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Record
++ STMT_VINFO_MIN_NEG_DIST.
++ * tree-vect-stmts.c (vectorizable_load): Verify if assumptions
++ made for negative dependence distances still hold.
++
++2014-02-25 Richard Biener <rguenther@suse.de>
++
++ Backport from mainline
++ 2014-02-21 Richard Biener <rguenther@suse.de>
++
++ PR middle-end/60291
++ * tree-ssa-live.c (mark_all_vars_used_1): Do not walk
++ DECL_INITIAL for globals not in the current function context.
++
++ 2014-02-20 Richard Biener <rguenther@suse.de>
++
++ PR middle-end/60221
++ * tree-eh.c (execute_cleanup_eh_1): Also cleanup empty EH
++ regions at -O0.
++
++ 2014-02-14 Richard Biener <rguenther@suse.de>
++
++ PR tree-optimization/60183
++ * tree-ssa-phiprop.c (propagate_with_phi): Avoid speculating
++ loads.
++ (tree_ssa_phiprop): Calculate and free post-dominators.
++
++2014-02-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
++
++ PR target/55426
++ * config/arm/arm.h (CANNOT_CHANGE_MODE_CLASS): Allow 128 to 64-bit
++ conversions.
++
++2014-02-24 John David Anglin <danglin@gcc.gnu.org>
++
++ * config/pa/pa.c (pa_output_move_double): Don't valididate when
++ adjusting offsetable addresses.
++
++2014-02-23 David Holsgrove <david.holsgrove@xilinx.com>
++
++ * config/microblaze/microblaze.md: Correct ashrsi_reg / lshrsi_reg names
++
++2014-02-23 Edgar E. Iglesias <edgar.iglesias@xilinx.com>
++
++ * config/microblaze/microblaze.h: Remove SECONDARY_MEMORY_NEEDED
++ definition.
++
++2014-02-23 David Holsgrove <david.holsgrove@xilinx.com>
++
++ * /config/microblaze/microblaze.c: Add microblaze_asm_output_mi_thunk
++ and define TARGET_ASM_OUTPUT_MI_THUNK and
++ TARGET_ASM_CAN_OUTPUT_MI_THUNK.
++
++2014-02-23 David Holsgrove <david.holsgrove@xilinx.com>
++
++ * config/microblaze/predicates.md: Add cmp_op predicate.
++ * config/microblaze/microblaze.md: Add branch_compare instruction
++ which uses cmp_op predicate and emits cmp insn before branch.
++ * config/microblaze/microblaze.c (microblaze_emit_compare): Rename
++ to microblaze_expand_conditional_branch and consolidate logic.
++ (microblaze_expand_conditional_branch): emit branch_compare
++ insn instead of handling cmp op separate from branch insn.
++
+2014-02-21 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/55260
@@ -7535,7 +7606,7 @@ Index: gcc/ChangeLog
2013-10-16 Release Manager
* GCC 4.8.2 released.
-@@ -639,7 +2138,7 @@
+@@ -639,7 +2209,7 @@
2013-07-31 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
Backport from mainline
@@ -7792,6 +7863,85 @@ Index: gcc/testsuite/gcc.target/powerpc/rs6000-ldouble-3.c
+ abort ();
+ exit (0);
+}
+Index: gcc/testsuite/gcc.target/microblaze/others/mem_reload.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/microblaze/others/mem_reload.c (.../tags/gcc_4_8_2_release)
++++ b/src/gcc/testsuite/gcc.target/microblaze/others/mem_reload.c (.../branches/gcc-4_8-branch)
+@@ -0,0 +1,74 @@
++/* { dg-options "-O2 -fPIC" } */
++
++typedef struct test_struct
++{
++ unsigned long long h[8];
++ unsigned long long Nl,Nh;
++ union {
++ unsigned long long d[16];
++ unsigned char p[(16*8)];
++ } u;
++ unsigned int num,md_len;
++} TEST_STRUCT;
++
++static const unsigned long long K512[12] = {
++ 0x428a2f98d728ae22,0x7137449123ef65cd,
++ 0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc,
++ 0x3956c25bf348b538,0x59f111f1b605d019,
++ 0x923f82a4af194f9b,0xab1c5ed5da6d8118,
++ 0xd807aa98a3030242,0x12835b0145706fbe,
++ 0x243185be4ee4b28c,0x550c7dc3d5ffb4e2};
++
++#define ROTR(x,s) (((x)>>s) | (x)<<(64-s))
++#define Sigma0(x) (ROTR((x),28) ^ ROTR((x),34) ^ ROTR((x),39))
++#define Sigma1(x) (ROTR((x),14) ^ ROTR((x),18) ^ ROTR((x),41))
++#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z)))
++#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
++
++#define ROUND_00_15(i,a,b,c,d,e,f,g,h) do { \
++ T1 += h + Sigma1(e) + Ch(e,f,g) + K512[i]; \
++ h = Sigma0(a) + Maj(a,b,c); \
++ d += T1; h += T1; } while (0)
++
++#define ROUND_16_80(i,a,b,c,d,e,f,g,h,X) do { \
++ T1 = X[(i)&0x0f] += s0 + s1 + X[(i+9)&0x0f]; \
++ ROUND_00_15(i,a,b,c,d,e,f,g,h); } while (0)
++
++static void testfunc1 (TEST_STRUCT *ctx, const void *in, unsigned int num)
++{
++ const unsigned long long *W=in;
++ unsigned long long a,b,c,d,e,f,g,h,s0,s1,T1;
++ unsigned long long X[16];
++ int i;
++
++ while (num--) {
++
++ T1 = X[0] = W[0]; ROUND_00_15(0,a,b,c,d,e,f,g,h);
++ T1 = X[1] = W[1]; ROUND_00_15(1,h,a,b,c,d,e,f,g);
++ T1 = X[2] = W[2]; ROUND_00_15(2,g,h,a,b,c,d,e,f);
++ T1 = X[3] = W[3]; ROUND_00_15(3,f,g,h,a,b,c,d,e);
++ T1 = X[4] = W[4]; ROUND_00_15(4,e,f,g,h,a,b,c,d);
++ T1 = X[5] = W[5]; ROUND_00_15(5,d,e,f,g,h,a,b,c);
++ T1 = X[6] = W[6]; ROUND_00_15(6,c,d,e,f,g,h,a,b);
++ T1 = X[7] = W[7]; ROUND_00_15(7,b,c,d,e,f,g,h,a);
++ T1 = X[8] = W[8]; ROUND_00_15(8,a,b,c,d,e,f,g,h);
++ T1 = X[9] = W[9]; ROUND_00_15(9,h,a,b,c,d,e,f,g);
++
++ for (i=16;i<80;i+=8)
++ {
++ ROUND_16_80(i+0,a,b,c,d,e,f,g,h,X);
++ }
++
++ ctx->h[4] += e; ctx->h[5] += f; ctx->h[6] += g; ctx->h[7] += h;
++ }
++}
++
++int testfunc2 (TEST_STRUCT *c, const void *_data, unsigned int len)
++{
++ const unsigned char *data=(const unsigned char *)_data;
++
++ unsigned char *p=(unsigned char *)c->u.p;
++
++ testfunc1 (c,p,0);
++ testfunc1 (c,data,len/sizeof(c->u));
++}
Index: gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c (.../tags/gcc_4_8_2_release)
@@ -12649,6 +12799,69 @@ Index: gcc/testsuite/gfortran.dg/proc_ptr_45.f90
+Function g()
+ g = 2
+End Function
+Index: gcc/testsuite/gfortran.dg/pr59700.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr59700.f90 (.../tags/gcc_4_8_2_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr59700.f90 (.../branches/gcc-4_8-branch)
+@@ -0,0 +1,40 @@
++! { dg-do run }
++! PR59700 Test case by Steve Kargl
++program foo
++
++ implicit none
++
++ character(len=80) msg
++ integer, parameter :: fd = 10
++ integer i1, i2, i3, i4
++ real x1, x2, x3, x4
++ complex c1, c2
++ logical a
++
++ open(unit=fd, status='scratch')
++ write(fd, '(A)') '1 2 3.4 q'
++
++ rewind(fd)
++ msg = 'ok'
++ read(fd, *, err=10, iomsg=msg) i1, i2, i3, i4
++10 if (msg /= 'Bad integer for item 3 in list input') call abort
++ rewind(fd)
++ msg = 'ok'
++ read(fd, *, err=20, iomsg=msg) x1, x2, x3, x4
++20 if (msg /= 'Bad real number in item 4 of list input') call abort
++ rewind(fd)
++ msg = 'ok'
++ read(fd, *, err=30, iomsg=msg) i1, x2, x1, a
++30 if (msg /= 'Bad logical value while reading item 4') call abort
++ rewind(fd)
++ read(fd, *, err=31, iomsg=msg) i1, x2, a, x1
++31 if (msg /= 'Bad repeat count in item 3 of list input') call abort
++ close(fd)
++ open(unit=fd, status='scratch')
++ write(fd, '(A)') '(1, 2) (3.4, q)'
++ rewind(fd)
++ msg = 'ok'
++ read(fd, *, err=40, iomsg=msg) c1, c2
++40 if (msg /= 'Bad floating point number for item 2') call abort
++ close(fd)
++end program foo
+Index: gcc/testsuite/gfortran.dg/ichar_3.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/ichar_3.f90 (.../tags/gcc_4_8_2_release)
++++ b/src/gcc/testsuite/gfortran.dg/ichar_3.f90 (.../branches/gcc-4_8-branch)
+@@ -0,0 +1,13 @@
++! { dg-do compile }
++!
++! PR fortran/59599
++! The call to ichar was triggering an ICE.
++!
++! Original testcase from Fran Martinez Fadrique <fmartinez@gmv.com>
++
++character(1) cpk(2)
++integer res(2)
++cpk = 'a'
++res = ichar( cpk, kind=1 )
++print *, ichar( cpk, kind=1 )
++end
Index: gcc/testsuite/gfortran.dg/unlimited_polymorphic_15.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/unlimited_polymorphic_15.f90 (.../tags/gcc_4_8_2_release)
@@ -13697,6 +13910,49 @@ Index: gcc/testsuite/gcc.dg/torture/pr58956.c
+ abort ();
+ return 0;
+}
+Index: gcc/testsuite/gcc.dg/torture/pr60183.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/torture/pr60183.c (.../tags/gcc_4_8_2_release)
++++ b/src/gcc/testsuite/gcc.dg/torture/pr60183.c (.../branches/gcc-4_8-branch)
+@@ -0,0 +1,38 @@
++/* { dg-do run } */
++
++/* Large so an out-of-bound read will crash. */
++unsigned char c[0x30001] = { 1 };
++int j = 2;
++
++static void
++foo (unsigned long *x, unsigned char *y)
++{
++ int i;
++ unsigned long w = x[0];
++ for (i = 0; i < j; i++)
++ {
++ w += *y;
++ y += 0x10000;
++ w += *y;
++ y += 0x10000;
++ }
++ x[1] = w;
++}
++
++__attribute__ ((noinline, noclone)) void
++bar (unsigned long *x)
++{
++ foo (x, c);
++}
++
++int
++main ()
++{
++ unsigned long a[2] = { 0, -1UL };
++ asm volatile (""::"r" (c):"memory");
++ c[0] = 0;
++ bar (a);
++ if (a[1] != 0)
++ __builtin_abort ();
++ return 0;
++}
Index: gcc/testsuite/gcc.dg/torture/pr57517.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/torture/pr57517.c (.../tags/gcc_4_8_2_release)
@@ -14467,6 +14723,63 @@ Index: gcc/testsuite/gcc.dg/strlenopt-1f.c
/* { dg-final { scan-tree-dump-times "strcat \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "stpcpy \\(" 0 "strlen" } } */
/* { dg-final { cleanup-tree-dump "strlen" } } */
+Index: gcc/testsuite/gcc.dg/vect/pr60276.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/vect/pr60276.c (.../tags/gcc_4_8_2_release)
++++ b/src/gcc/testsuite/gcc.dg/vect/pr60276.c (.../branches/gcc-4_8-branch)
+@@ -0,0 +1,52 @@
++/* { dg-do run } */
++
++extern void abort (void);
++
++static void
++foo (int *out, const int *lp, unsigned samples)
++{
++ int x, target;
++ for (x = 0, target = 0; x < (int)samples; x += 2, target++)
++ {
++ out[x] = lp[target];
++ out[x - 1] = out[x - 2] + out[x];
++ }
++}
++
++static void
++foo_novec (int *out, const int *lp, unsigned samples)
++{
++ int x, target;
++ for (x = 0, target = 0; x < (int)samples; x += 2, target++)
++ {
++ out[x] = lp[target];
++ out[x - 1] = out[x - 2] + out[x];
++ __asm__ volatile ("" : : : "memory");
++ }
++}
++
++int main(void)
++{
++ const int lp[25] = {
++ 0, 2, 4, 6, 8,
++ 10, 12, 14, 16,
++ 18, 20, 22, 24,
++ 26, 28, 30, 32,
++ 34, 36, 38, 40,
++ 42, 44, 46, 48,
++ };
++ int out[49] = {0};
++ int out2[49] = {0};
++ int s;
++
++ foo (out + 2, lp + 1, 48);
++ foo_novec (out2 + 2, lp + 1, 48);
++
++ for (s = 0; s < 49; s++)
++ if (out[s] != out2[s])
++ abort ();
++
++ return 0;
++}
++
++/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc/testsuite/gcc.dg/pr53060.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/pr53060.c (.../tags/gcc_4_8_2_release)
@@ -14480,7 +14793,45 @@ Index: gcc/testsuite/ChangeLog
===================================================================
--- a/src/gcc/testsuite/ChangeLog (.../tags/gcc_4_8_2_release)
+++ b/src/gcc/testsuite/ChangeLog (.../branches/gcc-4_8-branch)
-@@ -1,3 +1,876 @@
+@@ -1,3 +1,914 @@
++2014-02-25 Richard Biener <rguenther@suse.de>
++
++ Backport from mainline
++ 2014-02-21 Richard Biener <rguenther@suse.de>
++
++ PR tree-optimization/60276
++ * gcc.dg/vect/pr60276.c: New testcase.
++
++2014-02-25 Richard Biener <rguenther@suse.de>
++
++ Backport from mainline
++ 2014-02-14 Richard Biener <rguenther@suse.de>
++
++ PR tree-optimization/60183
++ * gcc.dg/torture/pr60183.c: New testcase.
++
++2014-02-24 Fabien ChĂȘne <fabien@gcc.gnu.org>
++
++ PR c++/37140
++ * g++.dg/template/using27.C: New.
++ * g++.dg/template/using28.C: New.
++ * g++.dg/template/using29.C: New.
++
++2014-02-23 David Holsgrove <david.holsgrove@xilinx.com>
++
++ * gcc/testsuite/gcc.target/microblaze/others/mem_reload.c: New test.
++
++2014-02-22 Mikael Morin <mikael@gcc.gnu.org>
++
++ PR fortran/59599
++ * gfortran.dg/ichar_3.f90: New test.
++
++2014-02-21 Steven G. Kargl <kargl@gcc.gnu.org>
++
++ Backport from mainline
++ PR fortran/59700
++ * gfortran.dg/pr59700.f90: New test.
++
+2014-02-21 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/55260
@@ -15357,7 +15708,7 @@ Index: gcc/testsuite/ChangeLog
2013-10-16 Release Manager
* GCC 4.8.2 released.
-@@ -39,9 +912,9 @@
+@@ -39,9 +950,9 @@
Backport from mainline
2013-06-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
@@ -15370,7 +15721,7 @@ Index: gcc/testsuite/ChangeLog
2013-10-04 Tobias Burnus <burnus@net-b.de>
-@@ -307,8 +1180,8 @@
+@@ -307,8 +1218,8 @@
Backport from mainline
2013-08-12 Perez Read <netfirewall@gmail.com>
@@ -15381,7 +15732,7 @@ Index: gcc/testsuite/ChangeLog
2013-08-11 Janus Weil <janus@gcc.gnu.org>
-@@ -494,7 +1367,7 @@
+@@ -494,7 +1405,7 @@
2013-06-19 Wei Mi <wmi@google.com>
PR rtl-optimization/57518
@@ -15390,7 +15741,7 @@ Index: gcc/testsuite/ChangeLog
2013-06-11 Tobias Burnus <burnus@net-b.de>
-@@ -623,8 +1496,8 @@
+@@ -623,8 +1534,8 @@
2013-05-09 Martin Jambor <mjambor@suse.cz>
@@ -15401,7 +15752,7 @@ Index: gcc/testsuite/ChangeLog
2013-05-08 Marc Glisse <marc.glisse@inria.fr>
-@@ -701,7 +1574,7 @@
+@@ -701,7 +1612,7 @@
2013-04-25 Marek Polacek <polacek@redhat.com>
PR tree-optimization/57066
@@ -15410,7 +15761,7 @@ Index: gcc/testsuite/ChangeLog
2013-05-02 Jakub Jelinek <jakub@redhat.com>
-@@ -727,32 +1600,32 @@
+@@ -727,32 +1638,32 @@
Backport from mainline
2013-04-24 Vladimir Makarov <vmakarov@redhat.com>
@@ -15451,7 +15802,7 @@ Index: gcc/testsuite/ChangeLog
2013-05-02 Ian Bolton <ian.bolton@arm.com>
-@@ -1102,7 +1975,7 @@
+@@ -1102,7 +2013,7 @@
2013-03-29 Tobias Burnus <burnus@net-b.de>
PR fortran/56737
@@ -15460,7 +15811,7 @@ Index: gcc/testsuite/ChangeLog
2013-04-02 Richard Biener <rguenther@suse.de>
-@@ -1636,7 +2509,7 @@
+@@ -1636,7 +2547,7 @@
2013-02-20 Jan Hubicka <jh@suse.cz>
PR tree-optimization/56265
@@ -15469,7 +15820,7 @@ Index: gcc/testsuite/ChangeLog
2013-02-20 Richard Biener <rguenther@suse.de>
-@@ -1823,11 +2696,9 @@
+@@ -1823,11 +2734,9 @@
Avoid instrumenting duplicated memory access in the same basic block
* c-c++-common/asan/no-redundant-instrumentation-1.c: New test.
@@ -16176,6 +16527,20 @@ Index: gcc/testsuite/g++.dg/cpp0x/initlist79.C
+struct A {};
+
+std::initializer_list<volatile A> x = {{}};
+Index: gcc/testsuite/g++.dg/cpp0x/enum_base2.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp0x/enum_base2.C (.../tags/gcc_4_8_2_release)
++++ b/src/gcc/testsuite/g++.dg/cpp0x/enum_base2.C (.../branches/gcc-4_8-branch)
+@@ -0,0 +1,9 @@
++// PR c++/60187
++// { dg-require-effective-target c++11 }
++
++template<typename... T> struct A
++{
++ enum E : T {}; // { dg-error "parameter pack" }
++};
++
++A<int> a;
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi5.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi5.C (.../tags/gcc_4_8_2_release)
@@ -16216,6 +16581,28 @@ Index: gcc/testsuite/g++.dg/cpp0x/constexpr-53094-2.C
typedef float __attribute__ ((vector_size (4 * sizeof (float)))) V4;
constexpr V4 build (float x, float y, float z) { return (V4){ x, y, z, 0 };}
+Index: gcc/testsuite/g++.dg/cpp0x/defaulted48.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp0x/defaulted48.C (.../tags/gcc_4_8_2_release)
++++ b/src/gcc/testsuite/g++.dg/cpp0x/defaulted48.C (.../branches/gcc-4_8-branch)
+@@ -0,0 +1,17 @@
++// PR c++/60108
++// { dg-require-effective-target c++11 }
++
++template<int> struct A
++{
++ virtual ~A();
++};
++
++template<typename> struct B : A<0>, A<1>
++{
++ ~B() = default;
++};
++
++struct C : B<bool>
++{
++ C() {}
++};
Index: gcc/testsuite/g++.dg/cpp0x/nsdmi-union3.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/cpp0x/nsdmi-union3.C (.../tags/gcc_4_8_2_release)
@@ -16638,6 +17025,28 @@ Index: gcc/testsuite/g++.dg/template/ref7.C
+{
+ return 1;
+}
+Index: gcc/testsuite/g++.dg/template/using28.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/template/using28.C (.../tags/gcc_4_8_2_release)
++++ b/src/gcc/testsuite/g++.dg/template/using28.C (.../branches/gcc-4_8-branch)
+@@ -0,0 +1,17 @@
++// PR c++/37140
++
++struct C
++{
++ static const int block_size = 1;
++};
++
++template <typename T> struct A {
++ typedef C type;
++};
++
++template <typename T> struct B : public A<T> {
++ using typename A<T>::type;
++ static const int block_size = type::block_size;
++};
++
++template class B<int>;
Index: gcc/testsuite/g++.dg/template/shadow1.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/template/shadow1.C (.../tags/gcc_4_8_2_release)
@@ -16668,6 +17077,70 @@ Index: gcc/testsuite/g++.dg/template/partial14.C
+struct C<T>::Implementation<0, b> { typedef void Typedef; };
+
+template class C<unsigned>;
+Index: gcc/testsuite/g++.dg/template/using27.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/template/using27.C (.../tags/gcc_4_8_2_release)
++++ b/src/gcc/testsuite/g++.dg/template/using27.C (.../branches/gcc-4_8-branch)
+@@ -0,0 +1,33 @@
++// PR c++/37140
++
++struct X
++{
++ typedef int nested_type;
++};
++
++template <class T>
++struct A
++{
++ typedef X type;
++};
++
++template <class T>
++struct B : A<T>
++{
++ using typename A<T>::type;
++ typename type::nested_type x;
++};
++
++template <class T>
++struct C : B<T>
++{
++ using typename B<T>::type;
++ typename type::nested_type y;
++};
++
++struct D : C<int>
++{
++ using C<int>::type;
++ type::nested_type z;
++};
++
+Index: gcc/testsuite/g++.dg/template/using29.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/template/using29.C (.../tags/gcc_4_8_2_release)
++++ b/src/gcc/testsuite/g++.dg/template/using29.C (.../branches/gcc-4_8-branch)
+@@ -0,0 +1,21 @@
++// PR c++/58047
++
++template <int N>
++struct print_arg { };
++
++struct const_holder {
++ static const int CONSTANT = 42;
++};
++
++template <typename T>
++struct identity {
++ typedef T type;
++};
++
++template <class T>
++struct test_case : public identity<T> {
++ using typename identity<T>::type;
++ print_arg<type::CONSTANT> printer;
++};
++
++template struct test_case<const_holder>;
Index: gcc/testsuite/g++.dg/template/partial15.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/template/partial15.C (.../tags/gcc_4_8_2_release)
@@ -17075,9 +17548,22 @@ Index: gcc/cp/ChangeLog
===================================================================
--- a/src/gcc/cp/ChangeLog (.../tags/gcc_4_8_2_release)
+++ b/src/gcc/cp/ChangeLog (.../branches/gcc-4_8-branch)
-@@ -1,3 +1,216 @@
+@@ -1,3 +1,229 @@
++2014-02-24 Fabien ChĂȘne <fabien@gcc.gnu.org>
++ PR c++/37140
++ * parser.c (cp_parser_nonclass_name): Call strip_using_decl and
++ move the code handling dependent USING_DECLs...
++ * name-lookup.c (strip_using_decl): ...Here.
++
+2014-02-21 Jason Merrill <jason@redhat.com>
+
++ PR c++/60108
++ * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
++
++ PR c++/60187
++ * parser.c (cp_parser_enum_specifier): Call
++ check_for_bare_parameter_packs.
++
+ PR c++/60216
+ * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
+
@@ -17598,6 +18084,15 @@ Index: gcc/cp/semantics.c
decl = DECL_NAME (decl);
return decl;
}
+@@ -3853,7 +3854,7 @@
+ linkage of all functions, and as that causes writes to
+ the data mapped in from the PCH file, it's advantageous
+ to mark the functions at this point. */
+- if (!DECL_IMPLICIT_INSTANTIATION (fn))
++ if (!DECL_IMPLICIT_INSTANTIATION (fn) || DECL_DEFAULTED_FN (fn))
+ {
+ /* This function must have external linkage, as
+ otherwise DECL_INTERFACE_KNOWN would have been
@@ -4291,7 +4292,8 @@
error ("%qE has invalid type for %<reduction%>", t);
remove = true;
@@ -17756,7 +18251,44 @@ Index: gcc/cp/parser.c
/* Look for the type-name again. We are not responsible for
checking that it matches the first type-name. */
*type = cp_parser_nonclass_name (parser);
-@@ -22209,6 +22205,9 @@
+@@ -14168,25 +14164,7 @@
+ /* Look up the type-name. */
+ type_decl = cp_parser_lookup_name_simple (parser, identifier, token->location);
+
+- if (TREE_CODE (type_decl) == USING_DECL)
+- {
+- if (!DECL_DEPENDENT_P (type_decl))
+- type_decl = strip_using_decl (type_decl);
+- else if (USING_DECL_TYPENAME_P (type_decl))
+- {
+- /* We have found a type introduced by a using
+- declaration at class scope that refers to a dependent
+- type.
+-
+- using typename :: [opt] nested-name-specifier unqualified-id ;
+- */
+- type_decl = make_typename_type (TREE_TYPE (type_decl),
+- DECL_NAME (type_decl),
+- typename_type, tf_error);
+- if (type_decl != error_mark_node)
+- type_decl = TYPE_NAME (type_decl);
+- }
+- }
++ type_decl = strip_using_decl (type_decl);
+
+ if (TREE_CODE (type_decl) != TYPE_DECL
+ && (objc_is_id (identifier) || objc_is_class_name (identifier)))
+@@ -14742,7 +14720,8 @@
+ {
+ underlying_type = grokdeclarator (NULL, &type_specifiers, TYPENAME,
+ /*initialized=*/0, NULL);
+- if (underlying_type == error_mark_node)
++ if (underlying_type == error_mark_node
++ || check_for_bare_parameter_packs (underlying_type))
+ underlying_type = NULL_TREE;
+ }
+ }
+@@ -22209,6 +22188,9 @@
tree cast;
bool nonconst_p;
@@ -17766,7 +18298,7 @@ Index: gcc/cp/parser.c
if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE))
{
maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
-@@ -22576,6 +22575,9 @@
+@@ -22576,6 +22558,9 @@
&& CONSTRUCTOR_IS_DIRECT_INIT (parsed_arg))
flags = LOOKUP_NORMAL;
parsed_arg = digest_init_flags (TREE_TYPE (decl), parsed_arg, flags);
@@ -17955,7 +18487,41 @@ Index: gcc/cp/name-lookup.c
===================================================================
--- a/src/gcc/cp/name-lookup.c (.../tags/gcc_4_8_2_release)
+++ b/src/gcc/cp/name-lookup.c (.../branches/gcc-4_8-branch)
-@@ -5605,9 +5605,9 @@
+@@ -394,7 +394,8 @@
+ }
+ }
+
+-/* Strip non dependent using declarations. */
++/* Strip non dependent using declarations. If DECL is dependent,
++ surreptitiously create a typename_type and return it. */
+
+ tree
+ strip_using_decl (tree decl)
+@@ -404,6 +405,23 @@
+
+ while (TREE_CODE (decl) == USING_DECL && !DECL_DEPENDENT_P (decl))
+ decl = USING_DECL_DECLS (decl);
++
++ if (TREE_CODE (decl) == USING_DECL && DECL_DEPENDENT_P (decl)
++ && USING_DECL_TYPENAME_P (decl))
++ {
++ /* We have found a type introduced by a using
++ declaration at class scope that refers to a dependent
++ type.
++
++ using typename :: [opt] nested-name-specifier unqualified-id ;
++ */
++ decl = make_typename_type (TREE_TYPE (decl),
++ DECL_NAME (decl),
++ typename_type, tf_error);
++ if (decl != error_mark_node)
++ decl = TYPE_NAME (decl);
++ }
++
+ return decl;
+ }
+
+@@ -5605,9 +5623,9 @@
push_using_directive (tree used)
{
tree ret;
@@ -20682,6 +21248,21 @@ Index: gcc/tree-eh.c
case INDIRECT_REF:
return !TREE_THIS_NOTRAP (expr);
+@@ -4304,11 +4322,12 @@
+ remove_unreachable_handlers ();
+
+ /* Watch out for the region tree vanishing due to all unreachable. */
+- if (cfun->eh->region_tree && optimize)
++ if (cfun->eh->region_tree)
+ {
+ bool changed = false;
+
+- changed |= unsplit_all_eh ();
++ if (optimize)
++ changed |= unsplit_all_eh ();
+ changed |= cleanup_all_empty_eh ();
+
+ if (changed)
Index: gcc/fortran/interface.c
===================================================================
--- a/src/gcc/fortran/interface.c (.../tags/gcc_4_8_2_release)
@@ -20892,7 +21473,13 @@ Index: gcc/fortran/ChangeLog
===================================================================
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_8_2_release)
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch)
-@@ -1,3 +1,179 @@
+@@ -1,3 +1,185 @@
++2014-02-22 Mikael Morin <mikael@gcc.gnu.org>
++
++ PR fortran/59599
++ * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Calculate the
++ number of arguments.
++
+2014-02-19 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/49397
@@ -21624,6 +22211,22 @@ Index: gcc/fortran/primary.c
}
if (build_actual_constructor (&comp_head, &ctor_head, sym) == FAILURE)
+Index: gcc/fortran/trans-intrinsic.c
+===================================================================
+--- a/src/gcc/fortran/trans-intrinsic.c (.../tags/gcc_4_8_2_release)
++++ b/src/gcc/fortran/trans-intrinsic.c (.../branches/gcc-4_8-branch)
+@@ -4685,8 +4685,10 @@
+ gfc_conv_intrinsic_ichar (gfc_se * se, gfc_expr * expr)
+ {
+ tree args[2], type, pchartype;
++ int nargs;
+
+- gfc_conv_intrinsic_function_args (se, expr, args, 2);
++ nargs = gfc_intrinsic_argument_list_length (expr);
++ gfc_conv_intrinsic_function_args (se, expr, args, nargs);
+ gcc_assert (POINTER_TYPE_P (TREE_TYPE (args[1])));
+ pchartype = gfc_get_pchar_type (expr->value.function.actual->expr->ts.kind);
+ args[1] = fold_build1_loc (input_location, NOP_EXPR, pchartype, args[1]);
Index: gcc/configure.ac
===================================================================
--- a/src/gcc/configure.ac (.../tags/gcc_4_8_2_release)
@@ -21732,6 +22335,29 @@ Index: gcc/print-rtl.c
if (MEM_OFFSET_KNOWN_P (in_rtx))
fprintf (outfile, "+" HOST_WIDE_INT_PRINT_DEC, MEM_OFFSET (in_rtx));
+Index: gcc/tree-vectorizer.h
+===================================================================
+--- a/src/gcc/tree-vectorizer.h (.../tags/gcc_4_8_2_release)
++++ b/src/gcc/tree-vectorizer.h (.../branches/gcc-4_8-branch)
+@@ -542,6 +542,10 @@
+ is 1. */
+ unsigned int gap;
+
++ /* The minimum negative dependence distance this stmt participates in
++ or zero if none. */
++ unsigned int min_neg_dist;
++
+ /* Not all stmts in the loop need to be vectorized. e.g, the increment
+ of the loop induction variable and computation of array indexes. relevant
+ indicates whether the stmt needs to be vectorized. */
+@@ -593,6 +597,7 @@
+ #define STMT_VINFO_GROUP_READ_WRITE_DEPENDENCE(S) (S)->read_write_dep
+ #define STMT_VINFO_GROUPED_ACCESS(S) ((S)->first_element != NULL && (S)->data_ref_info)
+ #define STMT_VINFO_LOOP_PHI_EVOLUTION_PART(S) (S)->loop_phi_evolution_part
++#define STMT_VINFO_MIN_NEG_DIST(S) (S)->min_neg_dist
+
+ #define GROUP_FIRST_ELEMENT(S) (S)->first_element
+ #define GROUP_NEXT_ELEMENT(S) (S)->next_element
Index: gcc/ipa-split.c
===================================================================
--- a/src/gcc/ipa-split.c (.../tags/gcc_4_8_2_release)
@@ -21986,6 +22612,24 @@ Index: gcc/lra-coalesce.c
bitmap_clear (&used_pseudos_bitmap);
bitmap_clear (&involved_insns_bitmap);
bitmap_clear (&coalesced_pseudos_bitmap);
+Index: gcc/tree-vect-data-refs.c
+===================================================================
+--- a/src/gcc/tree-vect-data-refs.c (.../tags/gcc_4_8_2_release)
++++ b/src/gcc/tree-vect-data-refs.c (.../branches/gcc-4_8-branch)
+@@ -739,6 +739,13 @@
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "dependence distance negative.");
++ /* Record a negative dependence distance to later limit the
++ amount of stmt copying / unrolling we can perform.
++ Only need to handle read-after-write dependence. */
++ if (DR_IS_READ (drb)
++ && (STMT_VINFO_MIN_NEG_DIST (stmtinfo_b) == 0
++ || STMT_VINFO_MIN_NEG_DIST (stmtinfo_b) > dist))
++ STMT_VINFO_MIN_NEG_DIST (stmtinfo_b) = dist;
+ continue;
+ }
+
Index: gcc/gimplify.c
===================================================================
--- a/src/gcc/gimplify.c (.../tags/gcc_4_8_2_release)
@@ -22441,6 +23085,20 @@ Index: gcc/simplify-rtx.c
{
rtx op0 = simplify_gen_unary (TRUNCATE, mode, XEXP (op, 0), op_mode);
if (op0)
+Index: gcc/tree-ssa-live.c
+===================================================================
+--- a/src/gcc/tree-ssa-live.c (.../tags/gcc_4_8_2_release)
++++ b/src/gcc/tree-ssa-live.c (.../branches/gcc-4_8-branch)
+@@ -394,7 +394,8 @@
+ {
+ /* When a global var becomes used for the first time also walk its
+ initializer (non global ones don't have any). */
+- if (set_is_used (t) && is_global_var (t))
++ if (set_is_used (t) && is_global_var (t)
++ && DECL_CONTEXT (t) == current_function_decl)
+ mark_all_vars_used (&DECL_INITIAL (t));
+ }
+ /* remove_unused_scope_block_p requires information about labels
Index: gcc/tree-sra.c
===================================================================
--- a/src/gcc/tree-sra.c (.../tags/gcc_4_8_2_release)
@@ -22989,7 +23647,49 @@ Index: gcc/tree-vect-stmts.c
===================================================================
--- a/src/gcc/tree-vect-stmts.c (.../tags/gcc_4_8_2_release)
+++ b/src/gcc/tree-vect-stmts.c (.../branches/gcc-4_8-branch)
-@@ -6054,8 +6054,7 @@
+@@ -4369,6 +4369,20 @@
+ return false;
+ }
+
++ /* Invalidate assumptions made by dependence analysis when vectorization
++ on the unrolled body effectively re-orders stmts. */
++ if (ncopies > 1
++ && STMT_VINFO_MIN_NEG_DIST (stmt_info) != 0
++ && ((unsigned)LOOP_VINFO_VECT_FACTOR (loop_vinfo)
++ > STMT_VINFO_MIN_NEG_DIST (stmt_info)))
++ {
++ if (dump_enabled_p ())
++ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
++ "cannot perform implicit CSE when unrolling "
++ "with negative dependence distance\n");
++ return false;
++ }
++
+ if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
+ return false;
+
+@@ -4425,6 +4439,20 @@
+ else if (!vect_grouped_load_supported (vectype, group_size))
+ return false;
+ }
++
++ /* Invalidate assumptions made by dependence analysis when vectorization
++ on the unrolled body effectively re-orders stmts. */
++ if (!PURE_SLP_STMT (stmt_info)
++ && STMT_VINFO_MIN_NEG_DIST (stmt_info) != 0
++ && ((unsigned)LOOP_VINFO_VECT_FACTOR (loop_vinfo)
++ > STMT_VINFO_MIN_NEG_DIST (stmt_info)))
++ {
++ if (dump_enabled_p ())
++ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
++ "cannot perform implicit CSE when performing "
++ "group loads with negative dependence distance\n");
++ return false;
++ }
+ }
+
+
+@@ -6054,8 +6082,7 @@
corresponding to that mode. The theory is that any use that
would cause problems with this will disable vectorization anyway. */
else if (!SCALAR_FLOAT_TYPE_P (scalar_type)
@@ -22999,6 +23699,40 @@ Index: gcc/tree-vect-stmts.c
scalar_type = lang_hooks.types.type_for_mode (inner_mode, 1);
/* We can't build a vector type of elements with alignment bigger than
+Index: gcc/tree-ssa-phiprop.c
+===================================================================
+--- a/src/gcc/tree-ssa-phiprop.c (.../tags/gcc_4_8_2_release)
++++ b/src/gcc/tree-ssa-phiprop.c (.../branches/gcc-4_8-branch)
+@@ -307,6 +307,12 @@
+ gimple def_stmt;
+ tree vuse;
+
++ /* Only replace loads in blocks that post-dominate the PHI node. That
++ makes sure we don't end up speculating loads. */
++ if (!dominated_by_p (CDI_POST_DOMINATORS,
++ bb, gimple_bb (use_stmt)))
++ continue;
++
+ /* Check whether this is a load of *ptr. */
+ if (!(is_gimple_assign (use_stmt)
+ && TREE_CODE (gimple_assign_lhs (use_stmt)) == SSA_NAME
+@@ -378,6 +384,7 @@
+ size_t n;
+
+ calculate_dominance_info (CDI_DOMINATORS);
++ calculate_dominance_info (CDI_POST_DOMINATORS);
+
+ n = num_ssa_names;
+ phivn = XCNEWVEC (struct phiprop_d, n);
+@@ -395,6 +402,8 @@
+ bbs.release ();
+ free (phivn);
+
++ free_dominance_info (CDI_POST_DOMINATORS);
++
+ return 0;
+ }
+
Index: gcc/tree-object-size.c
===================================================================
--- a/src/gcc/tree-object-size.c (.../tags/gcc_4_8_2_release)
@@ -27769,6 +28503,14 @@ Index: gcc/config/microblaze/predicates.md
;; Return if the operand is either the PC or a label_ref.
(define_special_predicate "pc_or_label_operand"
(ior (match_code "pc,label_ref")
+@@ -119,3 +123,7 @@
+ ;; Test for valid PIC call operand
+ (define_predicate "call_insn_plt_operand"
+ (match_test "PLT_ADDR_P (op)"))
++
++;; Return if the code of this rtx pattern is a comparison.
++(define_predicate "cmp_op"
++ (match_code "gt,ge,gtu,geu,lt,le,ltu,leu"))
Index: gcc/config/microblaze/microblaze.md
===================================================================
--- a/src/gcc/config/microblaze/microblaze.md (.../tags/gcc_4_8_2_release)
@@ -27811,7 +28553,52 @@ Index: gcc/config/microblaze/microblaze.md
;; 32-bit floating point moves
(define_expand "movsf"
-@@ -1649,7 +1662,7 @@
+@@ -1472,7 +1485,7 @@
+ (set_attr "length" "124")]
+ )
+
+-(define_insn "*ashlri_reg"
++(define_insn "*ashrsi_reg"
+ [(set (match_operand:SI 0 "register_operand" "=&d")
+ (ashiftrt:SI (match_operand:SI 1 "register_operand" "d")
+ (match_operand:SI 2 "register_operand" "d")))]
+@@ -1561,7 +1574,7 @@
+ (set_attr "length" "124")]
+ )
+
+-(define_insn "*lshlri_reg"
++(define_insn "*lshrsi_reg"
+ [(set (match_operand:SI 0 "register_operand" "=&d")
+ (lshiftrt:SI (match_operand:SI 1 "register_operand" "d")
+ (match_operand:SI 2 "register_operand" "d")))]
+@@ -1622,34 +1635,12 @@
+ (set_attr "length" "4")]
+ )
+
+-(define_insn "signed_compare"
+- [(set (match_operand:SI 0 "register_operand" "=d")
+- (unspec
+- [(match_operand:SI 1 "register_operand" "d")
+- (match_operand:SI 2 "register_operand" "d")] UNSPEC_CMP))]
+- ""
+- "cmp\t%0,%1,%2"
+- [(set_attr "type" "arith")
+- (set_attr "mode" "SI")
+- (set_attr "length" "4")])
+-
+-(define_insn "unsigned_compare"
+- [(set (match_operand:SI 0 "register_operand" "=d")
+- (unspec
+- [(match_operand:SI 1 "register_operand" "d")
+- (match_operand:SI 2 "register_operand" "d")] UNSPEC_CMPU))]
+- ""
+- "cmpu\t%0,%1,%2"
+- [(set_attr "type" "arith")
+- (set_attr "mode" "SI")
+- (set_attr "length" "4")])
+-
+ ;;----------------------------------------------------------------
+ ;; Setting a register from an floating point comparison.
;;----------------------------------------------------------------
(define_insn "cstoresf4"
[(set (match_operand:SI 0 "register_operand" "=r")
@@ -27820,7 +28607,7 @@ Index: gcc/config/microblaze/microblaze.md
[(match_operand:SF 2 "register_operand" "r")
(match_operand:SF 3 "register_operand" "r")]))]
"TARGET_HARD_FLOAT"
-@@ -1678,7 +1691,7 @@
+@@ -1678,7 +1669,7 @@
(define_expand "cbranchsf4"
[(set (pc)
@@ -27829,7 +28616,55 @@ Index: gcc/config/microblaze/microblaze.md
[(match_operand:SF 1 "register_operand")
(match_operand:SF 2 "register_operand")])
(label_ref (match_operand 3 ""))
-@@ -2201,6 +2214,14 @@
+@@ -1717,6 +1708,47 @@
+ (set_attr "length" "4")]
+ )
+
++(define_insn "branch_compare"
++ [(set (pc)
++ (if_then_else (match_operator:SI 0 "cmp_op"
++ [(match_operand:SI 1 "register_operand" "d")
++ (match_operand:SI 2 "register_operand" "d")
++ ])
++ (label_ref (match_operand 3))
++ (pc)))
++ (clobber(reg:SI R_TMP))]
++ ""
++ {
++ operands[4] = gen_rtx_REG (SImode, MB_ABI_ASM_TEMP_REGNUM);
++ enum rtx_code code = GET_CODE (operands[0]);
++
++ if (code == GT || code == LE)
++ {
++ output_asm_insn ("cmp\tr18,%z1,%z2", operands);
++ code = swap_condition (code);
++ }
++ else if (code == GTU || code == LEU)
++ {
++ output_asm_insn ("cmpu\tr18,%z1,%z2", operands);
++ code = swap_condition (code);
++ }
++ else if (code == GE || code == LT)
++ {
++ output_asm_insn ("cmp\tr18,%z2,%z1", operands);
++ }
++ else if (code == GEU || code == LTU)
++ {
++ output_asm_insn ("cmpu\tr18,%z2,%z1", operands);
++ }
++
++ operands[0] = gen_rtx_fmt_ee (signed_condition (code), SImode, operands[4], const0_rtx);
++ return "b%C0i%?\tr18,%3";
++ }
++ [(set_attr "type" "branch")
++ (set_attr "mode" "none")
++ (set_attr "length" "12")]
++)
++
+ ;;----------------------------------------------------------------
+ ;; Unconditional branches
+ ;;----------------------------------------------------------------
+@@ -2201,6 +2233,14 @@
(set_attr "mode" "none")
(set_attr "length" "4")])
@@ -27884,6 +28719,185 @@ Index: gcc/config/microblaze/microblaze.c
else if (*v == 'Y')
{ /* Looking for minor */
if (!(*p >= '0' && *p <= '9'))
+@@ -3064,6 +3071,73 @@
+ return result;
+ }
+
++static void
++microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
++ HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
++ tree function)
++{
++ rtx this_rtx, insn, funexp;
++
++ reload_completed = 1;
++ epilogue_completed = 1;
++
++ /* Mark the end of the (empty) prologue. */
++ emit_note (NOTE_INSN_PROLOGUE_END);
++
++ /* Find the "this" pointer. If the function returns a structure,
++ the structure return pointer is in MB_ABI_FIRST_ARG_REGNUM. */
++ if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function))
++ this_rtx = gen_rtx_REG (Pmode, (MB_ABI_FIRST_ARG_REGNUM + 1));
++ else
++ this_rtx = gen_rtx_REG (Pmode, MB_ABI_FIRST_ARG_REGNUM);
++
++ /* Apply the constant offset, if required. */
++ if (delta)
++ emit_insn (gen_addsi3 (this_rtx, this_rtx, GEN_INT (delta)));
++
++ /* Apply the offset from the vtable, if required. */
++ if (vcall_offset)
++ {
++ rtx vcall_offset_rtx = GEN_INT (vcall_offset);
++ rtx temp1 = gen_rtx_REG (Pmode, MB_ABI_TEMP1_REGNUM);
++
++ emit_move_insn (temp1, gen_rtx_MEM (Pmode, this_rtx));
++
++ rtx loc = gen_rtx_PLUS (Pmode, temp1, vcall_offset_rtx);
++ emit_move_insn (temp1, gen_rtx_MEM (Pmode, loc));
++
++ emit_insn (gen_addsi3 (this_rtx, this_rtx, temp1));
++ }
++
++ /* Generate a tail call to the target function. */
++ if (!TREE_USED (function))
++ {
++ assemble_external (function);
++ TREE_USED (function) = 1;
++ }
++
++ funexp = XEXP (DECL_RTL (function), 0);
++ rtx temp2 = gen_rtx_REG (Pmode, MB_ABI_TEMP2_REGNUM);
++
++ if (flag_pic)
++ emit_move_insn (temp2, expand_pic_symbol_ref (Pmode, funexp));
++ else
++ emit_move_insn (temp2, funexp);
++
++ emit_insn (gen_indirect_jump (temp2));
++
++ /* Run just enough of rest_of_compilation. This sequence was
++ "borrowed" from rs6000.c. */
++ insn = get_insns ();
++ shorten_branches (insn);
++ final_start_function (insn, file, 1);
++ final (insn, file, 1);
++ final_end_function ();
++
++ reload_completed = 0;
++ epilogue_completed = 0;
++}
++
+ bool
+ microblaze_expand_move (enum machine_mode mode, rtx operands[])
+ {
+@@ -3234,67 +3308,47 @@
+ emit_move_insn (mem, fnaddr);
+ }
+
+-/* Emit instruction to perform compare.
+- cmp is (compare_op op0 op1). */
+-static rtx
+-microblaze_emit_compare (enum machine_mode mode, rtx cmp, enum rtx_code *cmp_code)
++/* Generate conditional branch -- first, generate test condition,
++ second, generate correct branch instruction. */
++
++void
++microblaze_expand_conditional_branch (enum machine_mode mode, rtx operands[])
+ {
+- rtx cmp_op0 = XEXP (cmp, 0);
+- rtx cmp_op1 = XEXP (cmp, 1);
++ enum rtx_code code = GET_CODE (operands[0]);
++ rtx cmp_op0 = operands[1];
++ rtx cmp_op1 = operands[2];
++ rtx label1 = operands[3];
+ rtx comp_reg = gen_reg_rtx (SImode);
+- enum rtx_code code = *cmp_code;
+-
++ rtx condition;
++
+ gcc_assert ((GET_CODE (cmp_op0) == REG) || (GET_CODE (cmp_op0) == SUBREG));
+
+ /* If comparing against zero, just test source reg. */
+- if (cmp_op1 == const0_rtx)
+- return cmp_op0;
++ if (cmp_op1 == const0_rtx)
++ {
++ comp_reg = cmp_op0;
++ condition = gen_rtx_fmt_ee (signed_condition (code), SImode, comp_reg, const0_rtx);
++ emit_jump_insn (gen_condjump (condition, label1));
++ }
+
+- if (code == EQ || code == NE)
++ else if (code == EQ || code == NE)
+ {
+ /* Use xor for equal/not-equal comparison. */
+ emit_insn (gen_xorsi3 (comp_reg, cmp_op0, cmp_op1));
++ condition = gen_rtx_fmt_ee (signed_condition (code), SImode, comp_reg, const0_rtx);
++ emit_jump_insn (gen_condjump (condition, label1));
+ }
+- else if (code == GT || code == GTU || code == LE || code == LEU)
++ else
+ {
+- /* MicroBlaze compare is not symmetrical. */
+- /* Swap argument order. */
++ /* Generate compare and branch in single instruction. */
+ cmp_op1 = force_reg (mode, cmp_op1);
+- if (code == GT || code == LE)
+- emit_insn (gen_signed_compare (comp_reg, cmp_op0, cmp_op1));
+- else
+- emit_insn (gen_unsigned_compare (comp_reg, cmp_op0, cmp_op1));
+- /* Translate test condition. */
+- *cmp_code = swap_condition (code);
++ condition = gen_rtx_fmt_ee (code, mode, cmp_op0, cmp_op1);
++ emit_jump_insn (gen_branch_compare(condition, cmp_op0, cmp_op1, label1));
+ }
+- else /* if (code == GE || code == GEU || code == LT || code == LTU) */
+- {
+- cmp_op1 = force_reg (mode, cmp_op1);
+- if (code == GE || code == LT)
+- emit_insn (gen_signed_compare (comp_reg, cmp_op1, cmp_op0));
+- else
+- emit_insn (gen_unsigned_compare (comp_reg, cmp_op1, cmp_op0));
+- }
+-
+- return comp_reg;
+ }
+
+-/* Generate conditional branch -- first, generate test condition,
+- second, generate correct branch instruction. */
+
+ void
+-microblaze_expand_conditional_branch (enum machine_mode mode, rtx operands[])
+-{
+- enum rtx_code code = GET_CODE (operands[0]);
+- rtx comp;
+- rtx condition;
+-
+- comp = microblaze_emit_compare (mode, operands[0], &code);
+- condition = gen_rtx_fmt_ee (signed_condition (code), SImode, comp, const0_rtx);
+- emit_jump_insn (gen_condjump (condition, operands[3]));
+-}
+-
+-void
+ microblaze_expand_conditional_branch_sf (rtx operands[])
+ {
+ rtx condition;
+@@ -3501,6 +3555,12 @@
+ #undef TARGET_SECONDARY_RELOAD
+ #define TARGET_SECONDARY_RELOAD microblaze_secondary_reload
+
++#undef TARGET_ASM_OUTPUT_MI_THUNK
++#define TARGET_ASM_OUTPUT_MI_THUNK microblaze_asm_output_mi_thunk
++
++#undef TARGET_ASM_CAN_OUTPUT_MI_THUNK
++#define TARGET_ASM_CAN_OUTPUT_MI_THUNK hook_bool_const_tree_hwi_hwi_const_tree_true
++
+ #undef TARGET_SCHED_ADJUST_COST
+ #define TARGET_SCHED_ADJUST_COST microblaze_adjust_cost
+
Index: gcc/config/microblaze/microblaze.h
===================================================================
--- a/src/gcc/config/microblaze/microblaze.h (.../tags/gcc_4_8_2_release)
@@ -27901,6 +28915,16 @@ Index: gcc/config/microblaze/microblaze.h
#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
((TREE_CODE (EXP) == STRING_CST || TREE_CODE (EXP) == CONSTRUCTOR) \
&& (ALIGN) < BITS_PER_WORD \
+@@ -407,9 +413,6 @@
+ || GET_MODE (X) == VOIDmode) \
+ ? (GR_REGS) : (CLASS))))
+
+-#define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) \
+- (GET_MODE_CLASS (MODE) == MODE_INT)
+-
+ /* Stack layout; function entry, exit and calling. */
+
+ #define STACK_GROWS_DOWNWARD
Index: gcc/config/cris/cris.md
===================================================================
--- a/src/gcc/config/cris/cris.md (.../tags/gcc_4_8_2_release)
@@ -28983,6 +30007,31 @@ Index: gcc/config/arm/arm.c
if (IS_STACKALIGN (func_type))
/* Restore the original stack pointer. Before prologue, the stack was
+Index: gcc/config/arm/arm.h
+===================================================================
+--- a/src/gcc/config/arm/arm.h (.../tags/gcc_4_8_2_release)
++++ b/src/gcc/config/arm/arm.h (.../branches/gcc-4_8-branch)
+@@ -1213,11 +1213,15 @@
+ VFPv2.
+ In big-endian mode, modes greater than word size (i.e. DFmode) are stored in
+ VFP registers in little-endian order. We can't describe that accurately to
+- GCC, so avoid taking subregs of such values. */
+-#define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \
+- (TARGET_VFP && TARGET_BIG_END \
+- && (GET_MODE_SIZE (FROM) > UNITS_PER_WORD \
+- || GET_MODE_SIZE (TO) > UNITS_PER_WORD) \
++ GCC, so avoid taking subregs of such values.
++ The only exception is going from a 128-bit to a 64-bit type. In that case
++ the data layout happens to be consistent for big-endian, so we explicitly allow
++ that case. */
++#define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \
++ (TARGET_VFP && TARGET_BIG_END \
++ && !(GET_MODE_SIZE (FROM) == 16 && GET_MODE_SIZE (TO) == 8) \
++ && (GET_MODE_SIZE (FROM) > UNITS_PER_WORD \
++ || GET_MODE_SIZE (TO) > UNITS_PER_WORD) \
+ && reg_classes_intersect_p (VFP_REGS, (CLASS)))
+
+ /* The class value for index registers, and the one for base regs. */
Index: gcc/config/arm/vfp.md
===================================================================
--- a/src/gcc/config/arm/vfp.md (.../tags/gcc_4_8_2_release)
@@ -30059,6 +31108,23 @@ Index: gcc/config/pa/pa.c
{
int ishighonly = 0;
+@@ -2625,14 +2629,14 @@
+ if (optype0 == REGOP)
+ latehalf[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
+ else if (optype0 == OFFSOP)
+- latehalf[0] = adjust_address (operands[0], SImode, 4);
++ latehalf[0] = adjust_address_nv (operands[0], SImode, 4);
+ else
+ latehalf[0] = operands[0];
+
+ if (optype1 == REGOP)
+ latehalf[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1);
+ else if (optype1 == OFFSOP)
+- latehalf[1] = adjust_address (operands[1], SImode, 4);
++ latehalf[1] = adjust_address_nv (operands[1], SImode, 4);
+ else if (optype1 == CNSTOP)
+ split_double (operands[1], &operands[1], &latehalf[1]);
+ else
@@ -7539,7 +7543,7 @@
if (!TARGET_LONG_CALLS && distance < MAX_PCREL17F_OFFSET)
return 8;
@@ -31813,7 +32879,23 @@ Index: libgfortran/ChangeLog
===================================================================
--- a/src/libgfortran/ChangeLog (.../tags/gcc_4_8_2_release)
+++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_8-branch)
-@@ -1,3 +1,14 @@
+@@ -1,3 +1,30 @@
++2014-02-21 Jerry DeLisle <jvdelisle@gcc.gnu>
++ Dominique d'Humieres <dominiq@lps.ens.fr>
++ Steven G. Kargl <kargl@gcc.gnu.org>
++
++ Backport from mainline
++ PR libfortran/59700
++ PR libfortran/59764
++ * io/io.h (struct st_parameter_dt): Assign expanded_read flag to
++ unused bit. Define new variable line_buffer_pos.
++ * io/list_read.c (free_saved, next_char, l_push_char,
++ read_logical, read_real): Replace use of item_count with
++ line_buffer_pos for line_buffer look ahead.
++ (read_logical, read_integer, parse_real, read_real, check_type):
++ Adjust location of free_line to after generating error messages
++ to retain the correct item count for the message.
++
+2014-02-15 Jerry DeLisle <jvdelisle@gcc.gnu>
+ Dominique d'Humieres <dominiq@lps.ens.fr>
+
@@ -31828,6 +32910,195 @@ Index: libgfortran/ChangeLog
2013-10-16 Release Manager
* GCC 4.8.2 released.
+Index: libgfortran/io/list_read.c
+===================================================================
+--- a/src/libgfortran/io/list_read.c (.../tags/gcc_4_8_2_release)
++++ b/src/libgfortran/io/list_read.c (.../branches/gcc-4_8-branch)
+@@ -118,7 +118,7 @@
+ static void
+ free_line (st_parameter_dt *dtp)
+ {
+- dtp->u.p.item_count = 0;
++ dtp->u.p.line_buffer_pos = 0;
+ dtp->u.p.line_buffer_enabled = 0;
+
+ if (dtp->u.p.line_buffer == NULL)
+@@ -150,15 +150,15 @@
+ {
+ dtp->u.p.at_eol = 0;
+
+- c = dtp->u.p.line_buffer[dtp->u.p.item_count];
+- if (c != '\0' && dtp->u.p.item_count < 64)
++ c = dtp->u.p.line_buffer[dtp->u.p.line_buffer_pos];
++ if (c != '\0' && dtp->u.p.line_buffer_pos < 64)
+ {
+- dtp->u.p.line_buffer[dtp->u.p.item_count] = '\0';
+- dtp->u.p.item_count++;
++ dtp->u.p.line_buffer[dtp->u.p.line_buffer_pos] = '\0';
++ dtp->u.p.line_buffer_pos++;
+ goto done;
+ }
+
+- dtp->u.p.item_count = 0;
++ dtp->u.p.line_buffer_pos = 0;
+ dtp->u.p.line_buffer_enabled = 0;
+ }
+
+@@ -640,7 +640,7 @@
+ if (dtp->u.p.line_buffer == NULL)
+ dtp->u.p.line_buffer = xcalloc (SCRATCH_SIZE, 1);
+
+- dtp->u.p.line_buffer[dtp->u.p.item_count++] = c;
++ dtp->u.p.line_buffer[dtp->u.p.line_buffer_pos++] = c;
+ }
+
+
+@@ -750,7 +750,7 @@
+ {
+ dtp->u.p.nml_read_error = 1;
+ dtp->u.p.line_buffer_enabled = 1;
+- dtp->u.p.item_count = 0;
++ dtp->u.p.line_buffer_pos = 0;
+ return;
+ }
+
+@@ -758,14 +758,17 @@
+
+ bad_logical:
+
+- free_line (dtp);
+-
+ if (nml_bad_return (dtp, c))
+- return;
++ {
++ free_line (dtp);
++ return;
++ }
+
++
+ free_saved (dtp);
+ if (c == EOF)
+ {
++ free_line (dtp);
+ hit_eof (dtp);
+ return;
+ }
+@@ -773,6 +776,7 @@
+ eat_line (dtp);
+ snprintf (message, MSGLEN, "Bad logical value while reading item %d",
+ dtp->u.p.item_count);
++ free_line (dtp);
+ generate_error (&dtp->common, LIBERROR_READ_VALUE, message);
+ return;
+
+@@ -913,9 +917,9 @@
+ else if (c != '\n')
+ eat_line (dtp);
+
+- free_line (dtp);
+ snprintf (message, MSGLEN, "Bad integer for item %d in list input",
+ dtp->u.p.item_count);
++ free_line (dtp);
+ generate_error (&dtp->common, LIBERROR_READ_VALUE, message);
+
+ return;
+@@ -1298,9 +1302,9 @@
+ else if (c != '\n')
+ eat_line (dtp);
+
+- free_line (dtp);
+ snprintf (message, MSGLEN, "Bad floating point number for item %d",
+ dtp->u.p.item_count);
++ free_line (dtp);
+ generate_error (&dtp->common, LIBERROR_READ_VALUE, message);
+
+ return 1;
+@@ -1406,9 +1410,9 @@
+ else if (c != '\n')
+ eat_line (dtp);
+
+- free_line (dtp);
+ snprintf (message, MSGLEN, "Bad complex value in item %d of list input",
+ dtp->u.p.item_count);
++ free_line (dtp);
+ generate_error (&dtp->common, LIBERROR_READ_VALUE, message);
+ }
+
+@@ -1770,7 +1774,7 @@
+ {
+ dtp->u.p.nml_read_error = 1;
+ dtp->u.p.line_buffer_enabled = 1;
+- dtp->u.p.item_count = 0;
++ dtp->u.p.line_buffer_pos = 0;
+ return;
+ }
+
+@@ -1789,9 +1793,9 @@
+ else if (c != '\n')
+ eat_line (dtp);
+
+- free_line (dtp);
+ snprintf (message, MSGLEN, "Bad real number in item %d of list input",
+ dtp->u.p.item_count);
++ free_line (dtp);
+ generate_error (&dtp->common, LIBERROR_READ_VALUE, message);
+ }
+
+@@ -1806,11 +1810,10 @@
+
+ if (dtp->u.p.saved_type != BT_UNKNOWN && dtp->u.p.saved_type != type)
+ {
+- free_line (dtp);
+ snprintf (message, MSGLEN, "Read type %s where %s was expected for item %d",
+ type_name (dtp->u.p.saved_type), type_name (type),
+ dtp->u.p.item_count);
+-
++ free_line (dtp);
+ generate_error (&dtp->common, LIBERROR_READ_VALUE, message);
+ return 1;
+ }
+@@ -1820,12 +1823,12 @@
+
+ if (dtp->u.p.saved_length != len)
+ {
+- free_line (dtp);
+ snprintf (message, MSGLEN,
+ "Read kind %d %s where kind %d is required for item %d",
+ dtp->u.p.saved_length, type_name (dtp->u.p.saved_type), len,
+ dtp->u.p.item_count);
+ generate_error (&dtp->common, LIBERROR_READ_VALUE, message);
++ free_line (dtp);
+ return 1;
+ }
+
+Index: libgfortran/io/io.h
+===================================================================
+--- a/src/libgfortran/io/io.h (.../tags/gcc_4_8_2_release)
++++ b/src/libgfortran/io/io.h (.../branches/gcc-4_8-branch)
+@@ -424,7 +424,10 @@
+ unsigned g0_no_blanks : 1;
+ /* Used to signal use of free_format_data. */
+ unsigned format_not_saved : 1;
+- /* 14 unused bits. */
++ /* A flag used to identify when a non-standard expanded namelist read
++ has occurred. */
++ unsigned expanded_read : 1;
++ /* 13 unused bits. */
+
+ /* Used for ungetc() style functionality. Possible values
+ are an unsigned char, EOF, or EOF - 1 used to mark the
+@@ -441,9 +444,8 @@
+ char *line_buffer;
+ struct format_data *fmt;
+ namelist_info *ionml;
+- /* A flag used to identify when a non-standard expanded namelist read
+- has occurred. */
+- int expanded_read;
++ /* Current position within the look-ahead line buffer. */
++ int line_buffer_pos;
+ /* Storage area for values except for strings. Must be
+ large enough to hold a complex value (two reals) of the
+ largest kind. */
Index: libgfortran/io/write_float.def
===================================================================
--- a/src/libgfortran/io/write_float.def (.../tags/gcc_4_8_2_release)