summaryrefslogtreecommitdiff
path: root/debian/patches/svn-updates-linaro.diff
diff options
context:
space:
mode:
authordoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2013-07-15 12:28:52 +0000
committerdoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2013-07-15 12:28:52 +0000
commit516e0286125de47b4f8db639afd99cb3531e8056 (patch)
tree0a5c0c2c292420b0fbbf2b30ff17fbad8f0ea214 /debian/patches/svn-updates-linaro.diff
parentd9b7120641671686ebf742ef56ea288fe765e042 (diff)
downloadgcc-47-516e0286125de47b4f8db639afd99cb3531e8056.tar.gz
* Update to SVN 20130715 (r200955) from the gcc-4_7-branch.
* Update the Linaro support to the 4.7-2013.07 release. git-svn-id: svn://svn.debian.org/svn/gcccvs/branches/sid/gcc-4.7@6915 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
Diffstat (limited to 'debian/patches/svn-updates-linaro.diff')
-rw-r--r--debian/patches/svn-updates-linaro.diff1012
1 files changed, 696 insertions, 316 deletions
diff --git a/debian/patches/svn-updates-linaro.diff b/debian/patches/svn-updates-linaro.diff
index 47d1fd9..f5b76b3 100644
--- a/debian/patches/svn-updates-linaro.diff
+++ b/debian/patches/svn-updates-linaro.diff
@@ -1,382 +1,762 @@
-# DP: updates from the 4.7 branch upto 20130614 (r200084).
+# DP: updates from the 4.7 branch upto 20130715 (r200955).
last_updated()
{
cat > ${dir}LAST_UPDATED <<EOF
-Fri Jun 14 09:56:44 CEST 2013
-Fri Jun 14 07:56:44 UTC 2013 (revision 200084)
+Mon Jul 15 11:09:50 CEST 2013
+Mon Jul 15 09:09:50 UTC 2013 (revision 200955)
EOF
}
-LANG=C svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@199594 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch \
+LANG=C svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@200408 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch \
| sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \
| awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0'
-Index: libgcc/config.host
-===================================================================
---- a/src/libgcc/config.host (revision
-+++ b/src/libgcc/config.host (revision
-@@ -315,7 +315,7 @@
- md_unwind_header=alpha/vms-unwind.h
- ;;
- arm-wrs-vxworks)
-- tmake_file="$tmake_file arm/t-arm arm/t-vxworks t-fdpbit"
-+ tmake_file="$tmake_file arm/t-arm arm/t-vxworks t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
- extra_parts="$extra_parts crti.o crtn.o"
- ;;
- arm*-*-freebsd*)
-Index: libgcc/ChangeLog
-===================================================================
---- a/src/libgcc/ChangeLog (revision
-+++ b/src/libgcc/ChangeLog (revision
-@@ -1,3 +1,16 @@
-+2013-06-08 Walter Lee <walt@tilera.com>
-+
-+ Backport from mainline:
-+ 2013-06-08 Walter Lee <walt@tilera.com>
-+
-+ * config/tilepro/atomic.h: Don't include stdint.h or features.h.
-+ Replace int64_t with long long. Add __extension__ where
-+ appropriate.
-+
-+2013-06-06 Douglas B Rupp <rupp@adacore.com>
-+
-+ * config.host (arm-wrs-vxworks): Configure with other soft float.
-+
- 2013-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
-
- Backport from mainline:
-Index: libgcc/config/tilepro/atomic.h
-===================================================================
---- a/src/libgcc/config/tilepro/atomic.h (revision
-+++ b/src/libgcc/config/tilepro/atomic.h (revision
-@@ -1,6 +1,5 @@
- /* Macros for atomic functionality for tile.
-- Copyright (C) 2011, 2012
-- Free Software Foundation, Inc.
-+ Copyright (C) 2011-2013 Free Software Foundation, Inc.
- Contributed by Walter Lee (walt@tilera.com)
-
- This file is free software; you can redistribute it and/or modify it
-@@ -93,8 +92,6 @@
- compare-and-exchange routine, so may be potentially less efficient. */
- #endif
-
--#include <stdint.h>
--#include <features.h>
- #ifdef __tilegx__
- #include <arch/spr_def.h>
- #else
-@@ -123,9 +120,9 @@
-
- /* 64-bit integer compare-and-exchange. */
- static __inline __attribute__ ((always_inline))
-- int64_t arch_atomic_val_compare_and_exchange_8 (volatile int64_t * mem,
-- int64_t oldval,
-- int64_t newval)
-+ long long arch_atomic_val_compare_and_exchange_8 (volatile long long
-+ *mem, long long oldval,
-+ long long newval)
- {
- #ifdef __tilegx__
- __insn_mtspr (SPR_CMPEXCH_VALUE, oldval);
-@@ -140,7 +137,7 @@
- "R04" (newval_lo), "R05" (newval_hi),
- "m" (*mem):"r20", "r21", "r22", "r23", "r24", "r25",
- "r26", "r27", "r28", "r29", "memory");
-- return ((uint64_t) result_hi) << 32 | result_lo;
-+ return ((long long) result_hi) << 32 | result_lo;
- #endif
- }
-
-@@ -151,11 +148,11 @@
-
-
- #define arch_atomic_val_compare_and_exchange(mem, o, n) \
-- ({ \
-+ __extension__ ({ \
- (__typeof(*(mem)))(__typeof(*(mem)-*(mem))) \
- ((sizeof(*(mem)) == 8) ? \
- arch_atomic_val_compare_and_exchange_8( \
-- (volatile int64_t*)(mem), (__typeof((o)-(o)))(o), \
-+ (volatile long long*)(mem), (__typeof((o)-(o)))(o), \
- (__typeof((n)-(n)))(n)) : \
- (sizeof(*(mem)) == 4) ? \
- arch_atomic_val_compare_and_exchange_4( \
-@@ -165,7 +162,7 @@
- })
-
- #define arch_atomic_bool_compare_and_exchange(mem, o, n) \
-- ({ \
-+ __extension__ ({ \
- __typeof(o) __o = (o); \
- __builtin_expect( \
- __o == arch_atomic_val_compare_and_exchange((mem), __o, (n)), 1); \
-@@ -175,7 +172,7 @@
- /* Loop with compare_and_exchange until we guess the correct value.
- Normally "expr" will be an expression using __old and __value. */
- #define __arch_atomic_update_cmpxchg(mem, value, expr) \
-- ({ \
-+ __extension__ ({ \
- __typeof(value) __value = (value); \
- __typeof(*(mem)) *__mem = (mem), __old = *__mem, __guess; \
- do { \
-@@ -190,12 +187,14 @@
- /* Generic atomic op with 8- or 4-byte variant.
- The _mask, _addend, and _expr arguments are ignored on tilegx. */
- #define __arch_atomic_update(mem, value, op, _mask, _addend, _expr) \
-- ({ \
-+ __extension__ ({ \
- ((__typeof(*(mem))) \
- ((sizeof(*(mem)) == 8) ? (__typeof(*(mem)-*(mem)))__insn_##op( \
-- (void *)(mem), (int64_t)(__typeof((value)-(value)))(value)) : \
-+ (volatile void *)(mem), \
-+ (long long)(__typeof((value)-(value)))(value)) : \
- (sizeof(*(mem)) == 4) ? (int)__insn_##op##4( \
-- (void *)(mem), (int32_t)(__typeof((value)-(value)))(value)) : \
-+ (volatile void *)(mem), \
-+ (int)(__typeof((value)-(value)))(value)) : \
- __arch_atomic_error_bad_argument_size())); \
- })
-
-@@ -225,7 +224,7 @@
- /* Generic atomic op with 8- or 4-byte variant.
- The _op argument is ignored on tilepro. */
- #define __arch_atomic_update(mem, value, _op, mask, addend, expr) \
-- ({ \
-+ __extension__ ({ \
- (__typeof(*(mem)))(__typeof(*(mem)-*(mem))) \
- ((sizeof(*(mem)) == 8) ? \
- __arch_atomic_update_cmpxchg((mem), (value), (expr)) : \
-@@ -264,13 +263,13 @@
- __arch_atomic_update_cmpxchg(mem, mask, ~(__old & __value))
-
- #define arch_atomic_bit_set(mem, bit) \
-- ({ \
-+ __extension__ ({ \
- __typeof(*(mem)) __mask = (__typeof(*(mem)))1 << (bit); \
- __mask & arch_atomic_or((mem), __mask); \
- })
-
- #define arch_atomic_bit_clear(mem, bit) \
-- ({ \
-+ __extension__ ({ \
- __typeof(*(mem)) __mask = (__typeof(*(mem)))1 << (bit); \
- __mask & arch_atomic_and((mem), ~__mask); \
- })
Index: gcc/DATESTAMP
===================================================================
--- a/src/gcc/DATESTAMP (revision
+++ b/src/gcc/DATESTAMP (revision
@@ -1 +1 @@
--20130603
-+20130614
+-20130626
++20130715
Index: gcc/ChangeLog
===================================================================
--- a/src/gcc/ChangeLog (revision
+++ b/src/gcc/ChangeLog (revision
-@@ -1,3 +1,31 @@
-+2013-06-07 Uros Bizjak <ubizjak@gmail.com>
+@@ -1,3 +1,51 @@
++2013-07-11 Georg-Johann Lay <avr@gjlay.de>
+
-+ Backport from mainline
-+ 2013-06-10 Uros Bizjak <ubizjak@gmail.com>
++ Backport from 2013-07-11 trunk r200901.
+
-+ * config/alpha/alpha.c (alpha_emit_xfloating_compare): Also use
-+ cmp_code to construct REG_EQUAL note.
++ PR target/57631
++ * config/avr/avr.c (avr_set_current_function): Sanity-check signal
++ name seen by assembler/linker if available.
+
-+ Backport from mainline
-+ 2013-06-05 Uros Bizjak <ubizjak@gmail.com>
++2013-07-10 Georg-Johann Lay <avr@gjlay.de>
++
++ Backport from 2013-07-10 trunk r200872.
++
++ PR target/57844
++ * config/avr/avr.c (avr_prologue_setup_frame): Trunk -size to mode
++ of my_fp.
+
-+ * config/alpha/alpha.c (alpha_emit_conditional_move): Swap all
-+ GE, GT, GEU and GTU compares, modulo DImode compares with zero.
++2013-07-10 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
-+ 2013-05-23 Uros Bizjak <ubizjak@gmail.com>
++ 2013-07-06 Uros Bizjak <ubizjak@gmail.com>
++
++ * config/i386/sse.md (sse_movlhps): Change alternative 3
++ of operand 2 to "m".
++
++2013-07-09 Joseph Myers <joseph@codesourcery.com>
++
++ * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Only
++ adjust register size for TDmode and TFmode for VSX registers.
++
++2013-07-08 Eric Botcazou <ebotcazou@adacore.com>
++
++ * Makefile.in (tree-ssa-reassoc.o): Add dependency on $(PARAMS_H).
+
-+ PR target/57379
-+ * config/alpha/alpha.md (unspec): Add UNSPEC_XFLT_COMPARE.
-+ * config/alpha/alpha.c (alpha_emit_xfloating_compare): Construct
-+ REG_EQUAL note as UNSPEC_XFLT_COMPARE unspec.
++2013-07-08 Jakub Jelinek <jakub@redhat.com>
+
-+2013-06-09 Jakub Jelinek <jakub@redhat.com>
++ PR rtl-optimization/57829
++ * simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Ensure that
++ mask bits outside of mode are just sign-extension from mode to HWI.
+
-+ PR target/57568
-+ * config/i386/i386.md (TARGET_READ_MODIFY_WRITE peepholes): Ensure
-+ that operands[2] doesn't overlap with operands[0].
++2013-07-05 Uros Bizjak <ubizjak@gmail.com>
+
- 2013-05-22 Uros Bizjak <ubizjak@gmail.com>
++ Backport from mainline
++ 2013-06-20 Uros Bizjak <ubizjak@gmail.com>
++
++ PR target/57655
++ * config/i386/i386.c (construct_container): Report error if
++ long double is used with disabled x87 float returns.
++
+ 2013-06-21 David Edelsohn <dje.gcc@gmail.com>
- PR target/57356
-Index: gcc/testsuite/gfortran.dg/do_5.f90
+ Backport from mainline
+Index: gcc/testsuite/gcc.target/i386/pr57655.c
===================================================================
---- a/src/gcc/testsuite/gfortran.dg/do_5.f90 (revision
-+++ b/src/gcc/testsuite/gfortran.dg/do_5.f90 (revision
-@@ -0,0 +1,29 @@
+--- a/src/gcc/testsuite/gcc.target/i386/pr57655.c (revision
++++ b/src/gcc/testsuite/gcc.target/i386/pr57655.c (revision
+@@ -0,0 +1,10 @@
++/* { dg-do compile } */
++/* { dg-options "-mavx -mvzeroupper -mno-fp-ret-in-387" }
++
++/* { dg-error "x87 register return with x87 disabled" "" { target { ! ia32 } } 8 } */
++
++long double
++foo (long double x)
++{
++ return __builtin_ilogbl (x);
++}
+Index: gcc/testsuite/gfortran.dg/dot_product_2.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/dot_product_2.f90 (revision
++++ b/src/gcc/testsuite/gfortran.dg/dot_product_2.f90 (revision
+@@ -0,0 +1,38 @@
+! { dg-do compile }
++! { dg-options "-fdump-tree-original" }
+!
-+! PR fortran/54370
++! PR fortran/57785
+!
-+! The following program was ICEing at tree-check time
-+! "L()" was regarded as default-kind logical.
++! Contributed by Kontantinos Anagnostopoulos
+!
-+! Contributed by Kirill Chilikin
++! The implicit complex conjugate was missing for DOT_PRODUCT
++
++
++! For the following, the compile-time simplification fails for SUM;
++! see PR fortran/56342. Hence, a manually expanded SUM is used.
++
++!if (DOT_PRODUCT ((/ (1.0, 2.0), (2.0, 3.0) /), (/ (1.0, 1.0), (1.0, 4.0) /)) &
++! /= SUM (CONJG ((/ (1.0, 2.0), (2.0, 3.0) /))*(/ (1.0, 1.0), (1.0, 4.0) /))) &
++! call abort ()
+!
-+ MODULE M
-+ CONTAINS
-+
-+ LOGICAL(C_BOOL) FUNCTION L() BIND(C)
-+ USE, INTRINSIC :: ISO_C_BINDING
-+ L = .FALSE.
-+ END FUNCTION
-+
-+ LOGICAL(8) FUNCTION L2() BIND(C) ! { dg-warning "may not be a C interoperable kind but it is bind" }
-+ L2 = .FALSE._8
-+ END FUNCTION
-+
-+ SUBROUTINE S()
-+ DO WHILE (L())
-+ ENDDO
-+ DO WHILE (L2())
-+ ENDDO
-+ END
-+
-+ END
-Index: gcc/testsuite/gcc.c-torture/execute/pr57568.c
++!if (ANY (MATMUL ((/ (1.0, 2.0), (2.0, 3.0) /), &
++! RESHAPE ((/ (1.0, 1.0), (1.0, 4.0) /),(/2, 1/))) /= &
++! SUM ((/ (1.0, 2.0), (2.0, 3.0) /)*(/ (1.0, 1.0), (1.0, 4.0) /)))) &
++! call abort ()
++
++
++if (DOT_PRODUCT ((/ (1.0, 2.0), (2.0, 3.0) /), (/ (1.0, 1.0), (1.0, 4.0) /)) &
++ /= CONJG (cmplx(1.0, 2.0)) * cmplx(1.0, 1.0) &
++ + CONJG (cmplx(2.0, 3.0)) * cmplx(1.0, 4.0)) &
++ call abort ()
++
++if (ANY (MATMUL ((/ (1.0, 2.0), (2.0, 3.0) /), &
++ RESHAPE ((/ (1.0, 1.0), (1.0, 4.0) /),(/2, 1/))) &
++ /= cmplx(1.0, 2.0) * cmplx(1.0, 1.0) &
++ + cmplx(2.0, 3.0) * cmplx(1.0, 4.0))) &
++ call abort ()
++end
++
++
++! { dg-final { scan-tree-dump-not "abort" "original" } }
++! { dg-final { cleanup-tree-dump "original" } }
+Index: gcc/testsuite/gcc.c-torture/execute/pr57829.c
===================================================================
---- a/src/gcc/testsuite/gcc.c-torture/execute/pr57568.c (revision
-+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr57568.c (revision
-@@ -0,0 +1,12 @@
-+/* PR target/57568 */
+--- a/src/gcc/testsuite/gcc.c-torture/execute/pr57829.c (revision
++++ b/src/gcc/testsuite/gcc.c-torture/execute/pr57829.c (revision
+@@ -0,0 +1,31 @@
++/* PR rtl-optimization/57829 */
++
++__attribute__((noinline, noclone))
++int
++f1 (int k)
++{
++ return 2 | ((k - 1) >> ((int) sizeof (int) * __CHAR_BIT__ - 1));
++}
++
++__attribute__((noinline, noclone))
++long int
++f2 (long int k)
++{
++ return 2L | ((k - 1L) >> ((int) sizeof (long int) * __CHAR_BIT__ - 1));
++}
+
-+extern void abort (void);
-+int a[6][9] = { }, b = 1, *c = &a[3][5];
++__attribute__((noinline, noclone))
++int
++f3 (int k)
++{
++ k &= 63;
++ return 4 | ((k + 2) >> 5);
++}
+
+int
+main ()
+{
-+ if (b && (*c = *c + *c))
-+ abort ();
++ if (f1 (1) != 2 || f2 (1L) != 2L || f3 (63) != 6 || f3 (1) != 4)
++ __builtin_abort ();
+ return 0;
+}
Index: gcc/testsuite/ChangeLog
===================================================================
--- a/src/gcc/testsuite/ChangeLog (revision
+++ b/src/gcc/testsuite/ChangeLog (revision
-@@ -1,3 +1,16 @@
-+2013-06-09 Jakub Jelinek <jakub@redhat.com>
+@@ -1,3 +1,26 @@
++2012-12-03 Paolo Carlini <paolo.carlini@oracle.com>
++
++ PR c++/54170
++ * g++.dg/cpp0x/lambda/lambda-nullptr.C: New.
+
-+ PR target/57568
-+ * gcc.c-torture/execute/pr57568.c: New test.
++2013-07-08 Tobias Burnus <burnus@net-b.de>
+
-+2013-06-06 Tobias Burnus <burnus@net-b.de>
++ PR fortran/57785
++ * gfortran.dg/dot_product_2.f90: New.
++
++2013-07-08 Jakub Jelinek <jakub@redhat.com>
++
++ PR rtl-optimization/57829
++ * gcc.c-torture/execute/pr57829.c: New test.
++
++2013-07-05 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
-+ 2012-08-27 Tobias Burnus <burnus@net-b.de>
++ 2013-06-20 Uros Bizjak <ubizjak@gmail.com>
+
-+ PR fortran/54370
-+ * gfortran.dg/do_5.f90: New.
++ PR target/57655
++ * gcc.target/i386/pr57655.c: New test.
+
- 2013-06-01 Janus Weil <janus@gcc.gnu.org>
- Tobias Burnus <burnus@net-b.de>
+ 2013-06-09 Jakub Jelinek <jakub@redhat.com>
-Index: gcc/fortran/ChangeLog
+ PR target/57568
+Index: gcc/testsuite/g++.dg/debug/template2.C
===================================================================
---- a/src/gcc/fortran/ChangeLog (revision
-+++ b/src/gcc/fortran/ChangeLog (revision
-@@ -1,3 +1,12 @@
-+2013-06-06 Tobias Burnus <burnus@net-b.de>
+--- a/src/gcc/testsuite/g++.dg/debug/template2.C (revision
++++ b/src/gcc/testsuite/g++.dg/debug/template2.C (revision
+@@ -0,0 +1,14 @@
++// PR c++/57545
+
-+ Backport from mainline
-+ 2012-08-27 Tobias Burnus <burnus@net-b.de>
++template<typename T, long unsigned int N>
++struct array {
++ T data[N];
++};
++
++template<typename T>
++struct derived {
++ typedef long unsigned int size_type;
++ static const size_type n = 42;
++
++ array<int, n> a;
++};
+Index: gcc/testsuite/g++.dg/expr/const1.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/expr/const1.C (revision
++++ b/src/gcc/testsuite/g++.dg/expr/const1.C (revision
+@@ -0,0 +1,9 @@
++// PR c++/57551
++
++extern unsigned long ADDR;
++
++unsigned long f(){
++ const unsigned long* const var=&ADDR;
++ const unsigned long retval=var[1];
++ return retval;
++}
+Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C (revision
++++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C (revision
+@@ -0,0 +1,26 @@
++// PR c++/57437
++// { dg-require-effective-target c++11 }
++
++struct A {
++ int i;
+
-+ PR fortran/54370
-+ * trans-stmt.c (gfc_trans_do_while): Don't change the logical
-+ kind for negation of the condition.
++ A(): i(42) {}
++ A(const A&) = default;
++ A(A&& a): i(a.i) { a.i = 0; }
++};
+
- 2013-06-01 Janus Weil <janus@gcc.gnu.org>
- Tobias Burnus <burnus@net-b.de>
++int main()
++{
++ A x;
++
++ auto y = [x] () mutable {
++ x.i++;
++ return x;
++ };
++
++ if (y().i != 43)
++ __builtin_abort ();
++
++ if (y().i != 44)
++ __builtin_abort ();
++}
+Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C (revision
++++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C (revision
+@@ -0,0 +1,47 @@
++// PR c++/54170
++// { dg-do run { target c++11 } }
++
++#include <cassert>
++
++struct A;
++typedef A* ptr;
++typedef int (A::*pmf) (int);
++typedef int (A::*pdm);
++
++int total;
++
++void add(int n)
++{
++ total += n;
++}
++
++template <typename RType, typename Callable>
++RType Call(Callable native_func, int arg)
++{
++ return native_func(arg);
++}
++
++template <typename RType>
++RType do_test(int delta)
++{
++ return Call<RType>([=](int delta) { add(delta); return nullptr; }, delta);
++}
++
++template <typename RType>
++void test()
++{
++ total = 0;
++ assert (!do_test<RType>(5));
++ assert (total == 5);
++ assert (!do_test<RType>(20));
++ assert (total == 25);
++ assert (!do_test<RType>(-256));
++ assert (total == -231);
++}
++
++int main()
++{
++ test<ptr>();
++ test<pdm>();
++ test<pmf>();
++}
+Index: gcc/testsuite/g++.dg/template/using23.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/template/using23.C (revision
++++ b/src/gcc/testsuite/g++.dg/template/using23.C (revision
+@@ -0,0 +1,15 @@
++// PR c++/57831
++
++struct A {
++ void f();
++};
++template <class T> struct B : T {
++ typedef T base;
++ using base::f; // If I write "using B<T>::f" it's ok
++ void g( ) {
++ B<T>::f(); // This is OK as expected
++ (this->*&T::f)(); // This is also OK
++ (this->*&B<T>::f)(); // This causes error
++ }
++};
++template struct B< A >;
+Index: gcc/cp/typeck.c
+===================================================================
+--- a/src/gcc/cp/typeck.c (revision
++++ b/src/gcc/cp/typeck.c (revision
+@@ -7246,7 +7246,7 @@
+ /* Handle null pointer to member function conversions. */
+ if (null_ptr_cst_p (pfn))
+ {
+- pfn = build_c_cast (input_location, type, nullptr_node);
++ pfn = build_c_cast (input_location, type, pfn);
+ return build_ptrmemfunc1 (to_type,
+ integer_zero_node,
+ pfn);
+@@ -7929,7 +7929,8 @@
+ && TREE_CODE (retval) == VAR_DECL
+ && DECL_CONTEXT (retval) == current_function_decl
+ && ! TREE_STATIC (retval)
+- && ! DECL_ANON_UNION_VAR_P (retval)
++ /* And not a lambda or anonymous union proxy. */
++ && !DECL_HAS_VALUE_EXPR_P (retval)
+ && (DECL_ALIGN (retval)
+ >= DECL_ALIGN (DECL_RESULT (current_function_decl)))
+ /* The cv-unqualified type of the returned value must be the
+@@ -7978,7 +7979,8 @@
+ Note that these conditions are similar to, but not as strict as,
+ the conditions for the named return value optimization. */
+ if ((cxx_dialect != cxx98)
+- && (TREE_CODE (retval) == VAR_DECL
++ && ((TREE_CODE (retval) == VAR_DECL
++ && !DECL_HAS_VALUE_EXPR_P (retval))
+ || TREE_CODE (retval) == PARM_DECL)
+ && DECL_CONTEXT (retval) == current_function_decl
+ && !TREE_STATIC (retval)
+Index: gcc/cp/ChangeLog
+===================================================================
+--- a/src/gcc/cp/ChangeLog (revision
++++ b/src/gcc/cp/ChangeLog (revision
+@@ -1,3 +1,27 @@
++2012-12-03 Paolo Carlini <paolo.carlini@oracle.com>
++
++ PR c++/54170
++ * cvt.c (cp_convert_to_pointer): Don't discard side-effects from
++ expressions of nullptr_t.
++ * typeck.c (build_ptrmemfunc): Likewise.
++
++2013-07-09 Jason Merrill <jason@redhat.com>
++
++ PR c++/57437
++ * typeck.c (check_return_expr): Lambda proxies aren't eligible
++ for nrv or return by move.
++
++ PR c++/57545
++ * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
++ argument to have the exact type of the parameter.
++
++ PR c++/57551
++ * semantics.c (cxx_eval_indirect_ref): Don't try to look through
++ a POINTER_PLUS_EXPR for type punning diagnostic.
++
++ PR c++/57831
++ * pt.c (tsubst_copy): Handle USING_DECL.
++
+ 2013-05-20 Jason Merrill <jason@redhat.com>
-Index: gcc/fortran/trans-stmt.c
+ PR c++/57325
+Index: gcc/cp/pt.c
===================================================================
---- a/src/gcc/fortran/trans-stmt.c (revision
-+++ b/src/gcc/fortran/trans-stmt.c (revision
-@@ -1743,7 +1743,7 @@
- gfc_conv_expr_val (&cond, code->expr1);
- gfc_add_block_to_block (&block, &cond.pre);
- cond.expr = fold_build1_loc (code->expr1->where.lb->location,
-- TRUTH_NOT_EXPR, boolean_type_node, cond.expr);
-+ TRUTH_NOT_EXPR, TREE_TYPE (cond.expr), cond.expr);
-
- /* Build "IF (! cond) GOTO exit_label". */
- tmp = build1_v (GOTO_EXPR, exit_label);
-Index: gcc/config/alpha/alpha.md
+--- a/src/gcc/cp/pt.c (revision
++++ b/src/gcc/cp/pt.c (revision
+@@ -5521,6 +5521,10 @@
+ else
+ return NULL_TREE;
+ }
++
++ /* Avoid typedef problems. */
++ if (TREE_TYPE (expr) != type)
++ expr = fold_convert (type, expr);
+ }
+ /* [temp.arg.nontype]/5, bullet 2
+
+@@ -12214,6 +12218,9 @@
+ case TYPE_DECL:
+ return tsubst (t, args, complain, in_decl);
+
++ case USING_DECL:
++ t = DECL_NAME (t);
++ /* Fall through. */
+ case IDENTIFIER_NODE:
+ if (IDENTIFIER_TYPENAME_P (t))
+ {
+Index: gcc/cp/semantics.c
===================================================================
---- a/src/gcc/config/alpha/alpha.md (revision
-+++ b/src/gcc/config/alpha/alpha.md (revision
-@@ -25,6 +25,7 @@
- ;; Uses of UNSPEC in this file:
-
- (define_c_enum "unspec" [
-+ UNSPEC_XFLT_COMPARE
- UNSPEC_ARG_HOME
- UNSPEC_LDGP1
- UNSPEC_INSXH
-Index: gcc/config/alpha/alpha.c
+--- a/src/gcc/cp/semantics.c (revision
++++ b/src/gcc/cp/semantics.c (revision
+@@ -7459,11 +7459,6 @@
+ {
+ tree sub = op0;
+ STRIP_NOPS (sub);
+- if (TREE_CODE (sub) == POINTER_PLUS_EXPR)
+- {
+- sub = TREE_OPERAND (sub, 0);
+- STRIP_NOPS (sub);
+- }
+ if (TREE_CODE (sub) == ADDR_EXPR)
+ {
+ /* We couldn't fold to a constant value. Make sure it's not
+Index: gcc/cp/cvt.c
===================================================================
---- a/src/gcc/config/alpha/alpha.c (revision
-+++ b/src/gcc/config/alpha/alpha.c (revision
-@@ -2658,12 +2658,12 @@
- break;
-
- case GE: case GT: case GEU: case GTU:
-- /* These must be swapped. */
-- if (op1 != CONST0_RTX (cmp_mode))
+--- a/src/gcc/cp/cvt.c (revision
++++ b/src/gcc/cp/cvt.c (revision
+@@ -198,6 +198,8 @@
+
+ if (null_ptr_cst_p (expr))
+ {
++ tree val;
++
+ if (c_inhibit_evaluation_warnings == 0
+ && !NULLPTR_TYPE_P (TREE_TYPE (expr)))
+ warning (OPT_Wzero_as_null_pointer_constant,
+@@ -207,16 +209,14 @@
+ return build_ptrmemfunc (TYPE_PTRMEMFUNC_FN_TYPE (type), expr, 0,
+ /*c_cast_p=*/false, tf_warning_or_error);
+
+- if (TYPE_PTRMEM_P (type))
- {
-- code = swap_condition (code);
-- tem = op0, op0 = op1, op1 = tem;
+- /* A NULL pointer-to-member is represented by -1, not by
+- zero. */
+- expr = build_int_cst_type (type, -1);
- }
-+ /* These normally need swapping, but for integer zero we have
-+ special patterns that recognize swapped operands. */
-+ if (cmp_mode == DImode && op1 == const0_rtx)
-+ break;
-+ code = swap_condition (code);
-+ tem = op0, op0 = op1, op1 = tem;
- break;
-
- default:
-@@ -3025,12 +3025,9 @@
- operands[1] = op1;
- out = gen_reg_rtx (DImode);
-
-- /* What's actually returned is -1,0,1, not a proper boolean value,
-- so use an EXPR_LIST as with a generic libcall instead of a
-- comparison type expression. */
-- note = gen_rtx_EXPR_LIST (VOIDmode, op1, NULL_RTX);
-- note = gen_rtx_EXPR_LIST (VOIDmode, op0, note);
-- note = gen_rtx_EXPR_LIST (VOIDmode, func, note);
-+ /* What's actually returned is -1,0,1, not a proper boolean value. */
-+ note = gen_rtx_fmt_ee (cmp_code, VOIDmode, op0, op1);
-+ note = gen_rtx_UNSPEC (DImode, gen_rtvec (1, note), UNSPEC_XFLT_COMPARE);
- alpha_emit_xfloating_libcall (func, out, operands, 2, note);
-
- return out;
-Index: gcc/config/i386/i386.md
+- else
+- expr = build_int_cst (type, 0);
++ /* A NULL pointer-to-data-member is represented by -1, not by
++ zero. */
++ val = (TYPE_PTRMEM_P (type)
++ ? build_int_cst_type (type, -1)
++ : build_int_cst (type, 0));
+
+- return expr;
++ return (TREE_SIDE_EFFECTS (expr)
++ ? build2 (COMPOUND_EXPR, type, expr, val) : val);
+ }
+ else if (TYPE_PTR_TO_MEMBER_P (type) && INTEGRAL_CODE_P (form))
+ {
+Index: gcc/fortran/ChangeLog
===================================================================
---- a/src/gcc/config/i386/i386.md (revision
-+++ b/src/gcc/config/i386/i386.md (revision
-@@ -17194,6 +17194,7 @@
- "(TARGET_READ_MODIFY_WRITE || optimize_insn_for_size_p ())
- && peep2_reg_dead_p (4, operands[0])
- && !reg_overlap_mentioned_p (operands[0], operands[1])
-+ && !reg_overlap_mentioned_p (operands[0], operands[2])
- && (<MODE>mode != QImode
- || immediate_operand (operands[2], QImode)
- || q_regs_operand (operands[2], QImode))
-@@ -17258,6 +17259,7 @@
- || immediate_operand (operands[2], SImode)
- || q_regs_operand (operands[2], SImode))
- && !reg_overlap_mentioned_p (operands[0], operands[1])
-+ && !reg_overlap_mentioned_p (operands[0], operands[2])
- && ix86_match_ccmode (peep2_next_insn (3),
- (GET_CODE (operands[3]) == PLUS
- || GET_CODE (operands[3]) == MINUS)
+--- a/src/gcc/fortran/ChangeLog (revision
++++ b/src/gcc/fortran/ChangeLog (revision
+@@ -1,3 +1,10 @@
++2013-07-08 Tobias Burnus <burnus@net-b.de>
++
++ PR fortran/57785
++ * simplify.c (compute_dot_product): Complex conjugate for
++ dot_product.
++ (gfc_simplify_dot_product, gfc_simplify_matmul): Update call.
++
+ 2013-06-06 Tobias Burnus <burnus@net-b.de>
+
+ Backport from mainline
+Index: gcc/fortran/simplify.c
+===================================================================
+--- a/src/gcc/fortran/simplify.c (revision
++++ b/src/gcc/fortran/simplify.c (revision
+@@ -332,13 +332,15 @@
+ }
+
+
+-/* Helper function for gfc_simplify_dot_product() and gfc_simplify_matmul. */
++/* Helper function for gfc_simplify_dot_product() and gfc_simplify_matmul;
++ if conj_a is true, the matrix_a is complex conjugated. */
+
+ static gfc_expr *
+ compute_dot_product (gfc_expr *matrix_a, int stride_a, int offset_a,
+- gfc_expr *matrix_b, int stride_b, int offset_b)
++ gfc_expr *matrix_b, int stride_b, int offset_b,
++ bool conj_a)
+ {
+- gfc_expr *result, *a, *b;
++ gfc_expr *result, *a, *b, *c;
+
+ result = gfc_get_constant_expr (matrix_a->ts.type, matrix_a->ts.kind,
+ &matrix_a->where);
+@@ -361,9 +363,11 @@
+ case BT_INTEGER:
+ case BT_REAL:
+ case BT_COMPLEX:
+- result = gfc_add (result,
+- gfc_multiply (gfc_copy_expr (a),
+- gfc_copy_expr (b)));
++ if (conj_a && a->ts.type == BT_COMPLEX)
++ c = gfc_simplify_conjg (a);
++ else
++ c = gfc_copy_expr (a);
++ result = gfc_add (result, gfc_multiply (c, gfc_copy_expr (b)));
+ break;
+
+ default:
+@@ -1877,7 +1881,7 @@
+ gcc_assert (vector_b->rank == 1);
+ gcc_assert (gfc_compare_types (&vector_a->ts, &vector_b->ts));
+
+- return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0);
++ return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0, true);
+ }
+
+
+@@ -3883,7 +3887,7 @@
+ for (row = 0; row < result_rows; ++row)
+ {
+ gfc_expr *e = compute_dot_product (matrix_a, stride_a, offset_a,
+- matrix_b, 1, offset_b);
++ matrix_b, 1, offset_b, false);
+ gfc_constructor_append_expr (&result->value.constructor,
+ e, NULL);
+
+Index: gcc/simplify-rtx.c
+===================================================================
+--- a/src/gcc/simplify-rtx.c (revision
++++ b/src/gcc/simplify-rtx.c (revision
+@@ -2558,6 +2558,7 @@
+ HOST_WIDE_INT mask = INTVAL (trueop1) << count;
+
+ if (mask >> count == INTVAL (trueop1)
++ && trunc_int_for_mode (mask, mode) == mask
+ && (mask & nonzero_bits (XEXP (op0, 0), mode)) == 0)
+ return simplify_gen_binary (ASHIFTRT, mode,
+ plus_constant (XEXP (op0, 0), mask),
+Index: gcc/Makefile.in
+===================================================================
+--- a/src/gcc/Makefile.in (revision
++++ b/src/gcc/Makefile.in (revision
+@@ -2570,7 +2570,7 @@
+ $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) \
+ tree-iterator.h $(BASIC_BLOCK_H) $(GIMPLE_H) $(TREE_INLINE_H) \
+ $(VEC_H) langhooks.h alloc-pool.h pointer-set.h $(CFGLOOP_H) \
+- tree-pretty-print.h gimple-pretty-print.h $(DIAGNOSTIC_CORE_H)
++ tree-pretty-print.h gimple-pretty-print.h $(DIAGNOSTIC_CORE_H) $(PARAMS_H)
+ tree-optimize.o : tree-optimize.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
+ $(TREE_H) $(TM_P_H) $(GGC_H) output.h \
+ $(DIAGNOSTIC_H) $(BASIC_BLOCK_H) $(FLAGS_H) $(TIMEVAR_H) $(TM_H) \
+Index: gcc/config/i386/sse.md
+===================================================================
+--- a/src/gcc/config/i386/sse.md (revision
++++ b/src/gcc/config/i386/sse.md (revision
+@@ -3276,7 +3276,7 @@
+ (vec_select:V4SF
+ (vec_concat:V8SF
+ (match_operand:V4SF 1 "nonimmediate_operand" " 0,x,0,x,0")
+- (match_operand:V4SF 2 "nonimmediate_operand" " x,x,m,x,x"))
++ (match_operand:V4SF 2 "nonimmediate_operand" " x,x,m,m,x"))
+ (parallel [(const_int 0)
+ (const_int 1)
+ (const_int 4)
+Index: gcc/config/i386/i386.c
+===================================================================
+--- a/src/gcc/config/i386/i386.c (revision
++++ b/src/gcc/config/i386/i386.c (revision
+@@ -6303,7 +6303,7 @@
+
+ /* Likewise, error if the ABI requires us to return values in the
+ x87 registers and the user specified -mno-80387. */
+- if (!TARGET_80387 && in_return)
++ if (!TARGET_FLOAT_RETURNS_IN_80387 && in_return)
+ for (i = 0; i < n; i++)
+ if (regclass[i] == X86_64_X87_CLASS
+ || regclass[i] == X86_64_X87UP_CLASS
+Index: gcc/config/avr/avr.c
+===================================================================
+--- a/src/gcc/config/avr/avr.c (revision
++++ b/src/gcc/config/avr/avr.c (revision
+@@ -549,7 +549,12 @@
+ {
+ tree args = TYPE_ARG_TYPES (TREE_TYPE (decl));
+ tree ret = TREE_TYPE (TREE_TYPE (decl));
+- const char *name = IDENTIFIER_POINTER (DECL_NAME (decl));
++ const char *name;
++
++ name = DECL_ASSEMBLER_NAME_SET_P (decl)
++ /* Remove the leading '*' added in set_user_assembler_name. */
++ ? 1 + IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))
++ : IDENTIFIER_POINTER (DECL_NAME (decl));
+
+ /* Silently ignore 'signal' if 'interrupt' is present. AVR-LibC startet
+ using this when it switched from SIGNAL and INTERRUPT to ISR. */
+@@ -1004,7 +1009,7 @@
+ leaf function and thus X has already been saved. */
+
+ int irq_state = -1;
+- HOST_WIDE_INT size_cfa = size;
++ HOST_WIDE_INT size_cfa = size, neg_size;
+ rtx fp_plus_insns, fp, my_fp;
+
+ gcc_assert (frame_pointer_needed
+@@ -1043,6 +1048,7 @@
+ }
+
+ size = trunc_int_for_mode (size, GET_MODE (my_fp));
++ neg_size = trunc_int_for_mode (-size, GET_MODE (my_fp));
+
+ /************ Method 1: Adjust frame pointer ************/
+
+@@ -1062,7 +1068,7 @@
+ gen_rtx_SET (VOIDmode, fp, stack_pointer_rtx));
+ }
+
+- insn = emit_move_insn (my_fp, plus_constant (my_fp, -size));
++ insn = emit_move_insn (my_fp, plus_constant (my_fp, neg_size));
+ if (frame_pointer_needed)
+ {
+ RTX_FRAME_RELATED_P (insn) = 1;
+Index: gcc/config/rs6000/rs6000.c
+===================================================================
+--- a/src/gcc/config/rs6000/rs6000.c (revision
++++ b/src/gcc/config/rs6000/rs6000.c (revision
+@@ -2402,7 +2402,8 @@
+ int reg_size2 = reg_size;
+
+ /* TFmode/TDmode always takes 2 registers, even in VSX. */
+- if (m == TDmode || m == TFmode)
++ if (TARGET_VSX && VSX_REG_CLASS_P (c)
++ && (m == TDmode || m == TFmode))
+ reg_size2 = UNITS_PER_FP_WORD;
+
+ rs6000_class_max_nregs[m][c]
+Index: libgfortran/ChangeLog
+===================================================================
+--- a/src/libgfortran/ChangeLog (revision
++++ b/src/libgfortran/ChangeLog (revision
+@@ -1,3 +1,19 @@
++2013-07-03 Uros Bizjak <ubizjak@gmail.com>
++
++ Backport from mainline
++ 2013-06-20 Uros Bizjak <ubizjak@gmail.com>
++
++ * config/fpu-387.h (_FPU_MASK_ALL): New.
++ (_FPU_EX_ALL): Ditto.
++ (set_fpu): Use fstcw to store x87 FPU control word. Use fnclex to
++ clear stalled exception flags. Correctly clear stalled SSE
++ exception flags. Simplify code.
++
++ Backport from mainline
++ 2013-06-19 Uros Bizjak <ubizjak@gmail.com>
++
++ * config/fpu-387.h: Use __asm__ and __volatile__ consistently.
++
+ 2013-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ Backport from mainline:
+Index: libgfortran/config/fpu-387.h
+===================================================================
+--- a/src/libgfortran/config/fpu-387.h (revision
++++ b/src/libgfortran/config/fpu-387.h (revision
+@@ -73,7 +73,7 @@
+
+ /* We need a single SSE instruction here so the handler can safely skip
+ over it. */
+- __asm__ volatile ("movaps %xmm0,%xmm0");
++ __asm__ __volatile__ ("movaps\t%xmm0,%xmm0");
+
+ sigaction (SIGILL, &oact, NULL);
+
+@@ -95,42 +95,42 @@
+ #define _FPU_MASK_OM 0x08
+ #define _FPU_MASK_UM 0x10
+ #define _FPU_MASK_PM 0x20
++#define _FPU_MASK_ALL 0x3f
+
++#define _FPU_EX_ALL 0x3f
++
+ void set_fpu (void)
+ {
++ int excepts = 0;
+ unsigned short cw;
+
+- asm volatile ("fnstcw %0" : "=m" (cw));
++ __asm__ __volatile__ ("fstcw\t%0" : "=m" (cw));
+
+- cw |= (_FPU_MASK_IM | _FPU_MASK_DM | _FPU_MASK_ZM | _FPU_MASK_OM
+- | _FPU_MASK_UM | _FPU_MASK_PM);
++ if (options.fpe & GFC_FPE_INVALID) excepts |= _FPU_MASK_IM;
++ if (options.fpe & GFC_FPE_DENORMAL) excepts |= _FPU_MASK_DM;
++ if (options.fpe & GFC_FPE_ZERO) excepts |= _FPU_MASK_ZM;
++ if (options.fpe & GFC_FPE_OVERFLOW) excepts |= _FPU_MASK_OM;
++ if (options.fpe & GFC_FPE_UNDERFLOW) excepts |= _FPU_MASK_UM;
++ if (options.fpe & GFC_FPE_INEXACT) excepts |= _FPU_MASK_PM;
+
+- if (options.fpe & GFC_FPE_INVALID) cw &= ~_FPU_MASK_IM;
+- if (options.fpe & GFC_FPE_DENORMAL) cw &= ~_FPU_MASK_DM;
+- if (options.fpe & GFC_FPE_ZERO) cw &= ~_FPU_MASK_ZM;
+- if (options.fpe & GFC_FPE_OVERFLOW) cw &= ~_FPU_MASK_OM;
+- if (options.fpe & GFC_FPE_UNDERFLOW) cw &= ~_FPU_MASK_UM;
+- if (options.fpe & GFC_FPE_INEXACT) cw &= ~_FPU_MASK_PM;
++ cw |= _FPU_MASK_ALL;
++ cw &= ~excepts;
+
+- asm volatile ("fldcw %0" : : "m" (cw));
++ __asm__ __volatile__ ("fnclex\n\tfldcw\t%0" : : "m" (cw));
+
+ if (has_sse())
+ {
+ unsigned int cw_sse;
+
+- asm volatile ("%vstmxcsr %0" : "=m" (cw_sse));
++ __asm__ __volatile__ ("%vstmxcsr\t%0" : "=m" (cw_sse));
+
+- cw_sse &= 0xffff0000;
+- cw_sse |= (_FPU_MASK_IM | _FPU_MASK_DM | _FPU_MASK_ZM | _FPU_MASK_OM
+- | _FPU_MASK_UM | _FPU_MASK_PM ) << 7;
++ /* The SSE exception masks are shifted by 7 bits. */
++ cw_sse |= _FPU_MASK_ALL << 7;
++ cw_sse &= ~(excepts << 7);
+
+- if (options.fpe & GFC_FPE_INVALID) cw_sse &= ~(_FPU_MASK_IM << 7);
+- if (options.fpe & GFC_FPE_DENORMAL) cw_sse &= ~(_FPU_MASK_DM << 7);
+- if (options.fpe & GFC_FPE_ZERO) cw_sse &= ~(_FPU_MASK_ZM << 7);
+- if (options.fpe & GFC_FPE_OVERFLOW) cw_sse &= ~(_FPU_MASK_OM << 7);
+- if (options.fpe & GFC_FPE_UNDERFLOW) cw_sse &= ~(_FPU_MASK_UM << 7);
+- if (options.fpe & GFC_FPE_INEXACT) cw_sse &= ~(_FPU_MASK_PM << 7);
++ /* Clear stalled exception flags. */
++ cw_sse &= ~_FPU_EX_ALL;
+
+- asm volatile ("%vldmxcsr %0" : : "m" (cw_sse));
++ __asm__ __volatile__ ("%vldmxcsr\t%0" : : "m" (cw_sse));
+ }
+ }