[gcc-7] 278/354: * Update to SVN 20170830 (r251446) from the gcc-7-branch. * Default to PIE on powerpc again, now that PR target/81170 and PR target/81295 are fixed. Closes: #856224.

Ximin Luo infinity0 at debian.org
Thu Nov 23 15:51:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository gcc-7.

commit 2a1a2eb1e0f5e8d7b3eae85f5502ca68a8465b33
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Wed Aug 30 09:32:37 2017 +0000

      * Update to SVN 20170830 (r251446) from the gcc-7-branch.
      * Default to PIE on powerpc again, now that PR target/81170 and
        PR target/81295 are fixed. Closes: #856224.
    
    
    git-svn-id: svn+ssh://svn.debian.org/svn/gcccvs/branches/sid/gcc-7@9645 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
 debian/changelog                |   11 +-
 debian/patches/pr81723.diff     |  204 -----
 debian/patches/svn-updates.diff | 1863 ++++++++++++++++++++++++++++++++++++++-
 debian/rules.patch              |    1 -
 4 files changed, 1864 insertions(+), 215 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3b9a726..043c64d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,17 @@
 gcc-7 (7.2.0-2) UNRELEASED; urgency=medium
 
-  * Update to SVN 20170824 (r251336) from the gcc-7-branch.
+  * Update to SVN 20170830 (r251446) from the gcc-7-branch.
     - Fix PR target/72804 (PPC), PR target/80210 (PPC), PR target/81910 (AVR),
-      PR target/79883 (AVR), PR fortran/81296, PR fortran/80164.
+      PR target/79883 (AVR), PR fortran/81296, PR fortran/80164,
+      PR target/81593 (PPC), PR target/81170 (PPC), PR target/81295 (PPC),
+      PR tree-optimization/81977, PR debug/81993 (closes: #873609),
+      PR middle-end/81088, PR middle-end/81065, PR sanitizer/80932,
+      PR middle-end/81884, PR tree-optimization/81181,
+      PR tree-optimization/81723, PR target/81921 (x86), PR c++/81607.
   * Update the Linaro support to the 7-2017.08 snapshot.
   * Restore configuring with  on armhf. Closes: #873584.
+  * Default to PIE on powerpc again, now that PR target/81170 and
+    PR target/81295 are fixed. Closes: #856224.
 
  -- Matthias Klose <doko at debian.org>  Wed, 30 Aug 2017 07:02:51 +0200
 
diff --git a/debian/patches/pr81723.diff b/debian/patches/pr81723.diff
deleted file mode 100644
index e4b21d8..0000000
--- a/debian/patches/pr81723.diff
+++ /dev/null
@@ -1,204 +0,0 @@
-# DP: Fix PR tree-optimization/81723, taken from the trunk.
-
-gcc/
-
-2017-08-08  Richard Biener  <rguenther at suse.de>
-
-	PR tree-optimization/81723
-	* tree-vect-slp.c (struct bst_traits): New hash traits.
-	(bst_fail): New global.
-	(vect_build_slp_tree_2): New worker, split out from ...
-	(vect_build_slp_tree): ... this now wrapping it with using
-	bst_fail set to cache SLP tree build fails.  Properly handle
-	max_tree_size.
-	(vect_analyze_slp_instance): Allocate and free bst_fail.
-
-gcc/testsuite/
-
-2017-08-08  Richard Biener  <rguenther at suse.de>
-
-	PR tree-optimization/81723
-	* gfortran.dg/pr81723.f: New testcase.
-
- 
---- a/src/gcc/testsuite/gfortran.dg/pr81723.f
-+++ a/src/gcc/testsuite/gfortran.dg/pr81723.f
-@@ -0,0 +1,56 @@
-+! { dg-do compile }
-+! { dg-options "-O3 -fno-automatic" }
-+
-+      FUNCTION WWERF(Z)
-+
-+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-+      COMPLEX*16 WWERF
-+      COMPLEX*16 Z,ZH,R(37),S,T,V,W
-+
-+      PARAMETER (Z1 = 1, HF = Z1/2, Z10 = 10)
-+      PARAMETER (C1 = 74/Z10, C2 = 83/Z10, C3 = Z10/32, C4 = 16/Z10)
-+      PARAMETER (C = 1.12837 91670 95512 57D0, P = (2*C4)**33)
-+
-+      DOUBLE PRECISION GREAL,GIMAG,XARG,YARG
-+      COMPLEX*16 ZARG,GCONJG,GCMPLX
-+      GREAL( ZARG)=DREAL( ZARG)
-+      GIMAG( ZARG)=DIMAG( ZARG)
-+      GCONJG(ZARG)=DCONJG(ZARG)
-+      GCMPLX(XARG,YARG)=DCMPLX(XARG,YARG)
-+
-+      X=Z
-+      Y=GIMAG(Z)
-+      XA=ABS(X)
-+      YA=ABS(Y)
-+      IF(YA .LT. C1 .AND. XA .LT. C2) THEN
-+       ZH=GCMPLX(YA+C4,XA)
-+       R(37)=0
-+       DO 1 N = 36,1,-1
-+       T=ZH+N*GCONJG(R(N+1))
-+    1  R(N)=HF*T/(GREAL(T)**2+GIMAG(T)**2)
-+       XL=P
-+       S=0
-+       DO 2 N = 33,1,-1
-+       XL=C3*XL
-+    2  S=R(N)*(S+XL)
-+       V=C*S
-+      ELSE
-+       ZH=GCMPLX(YA,XA)
-+       R(1)=0
-+       DO 3 N = 9,1,-1
-+       T=ZH+N*GCONJG(R(1))
-+    3  R(1)=HF*T/(GREAL(T)**2+GIMAG(T)**2)
-+       V=C*R(1)
-+      END IF
-+      IF(YA .EQ. 0) V=GCMPLX(EXP(-XA**2),GIMAG(V))
-+      IF(Y .LT. 0) THEN
-+       V=2*EXP(-GCMPLX(XA,YA)**2)-V
-+       IF(X .GT. 0) V=GCONJG(V)
-+      ELSE
-+       IF(X .LT. 0) V=GCONJG(V)
-+      END IF
-+
-+      WWERF=V
-+
-+      RETURN
-+      END
---- a/src/gcc/tree-vect-slp.c
-+++ b/src/gcc/tree-vect-slp.c
-@@ -908,14 +908,51 @@
-   return true;
- }
- 
--/* Recursively build an SLP tree starting from NODE.
--   Fail (and return a value not equal to zero) if def-stmts are not
--   isomorphic, require data permutation or are of unsupported types of
--   operation.  Otherwise, return 0.
--   The value returned is the depth in the SLP tree where a mismatch
--   was found.  */
-+/* Traits for the hash_set to record failed SLP builds for a stmt set.
-+   Note we never remove apart from at destruction time so we do not
-+   need a special value for deleted that differs from empty.  */
-+struct bst_traits
-+{
-+  typedef vec <gimple *> value_type;
-+  typedef vec <gimple *> compare_type;
-+  static inline hashval_t hash (value_type);
-+  static inline bool equal (value_type existing, value_type candidate);
-+  static inline bool is_empty (value_type x) { return !x.exists (); }
-+  static inline bool is_deleted (value_type x) { return !x.exists (); }
-+  static inline void mark_empty (value_type &x) { x.release (); }
-+  static inline void mark_deleted (value_type &x) { x.release (); }
-+  static inline void remove (value_type &x) { x.release (); }
-+};
-+inline hashval_t
-+bst_traits::hash (value_type x)
-+{
-+  inchash::hash h;
-+  for (unsigned i = 0; i < x.length (); ++i)
-+    h.add_int (gimple_uid (x[i]));
-+  return h.end ();
-+}
-+inline bool
-+bst_traits::equal (value_type existing, value_type candidate)
-+{
-+  if (existing.length () != candidate.length ())
-+    return false;
-+  for (unsigned i = 0; i < existing.length (); ++i)
-+    if (existing[i] != candidate[i])
-+      return false;
-+  return true;
-+}
- 
-+static hash_set <vec <gimple *>, bst_traits> *bst_fail;
-+
- static slp_tree
-+vect_build_slp_tree_2 (vec_info *vinfo,
-+		       vec<gimple *> stmts, unsigned int group_size,
-+		       unsigned int *max_nunits,
-+		       vec<slp_tree> *loads,
-+		       bool *matches, unsigned *npermutes, unsigned *tree_size,
-+		       unsigned max_tree_size);
-+
-+static slp_tree
- vect_build_slp_tree (vec_info *vinfo,
-                      vec<gimple *> stmts, unsigned int group_size,
-                      unsigned int *max_nunits,
-@@ -923,6 +960,39 @@
- 		     bool *matches, unsigned *npermutes, unsigned *tree_size,
- 		     unsigned max_tree_size)
- {
-+  if (bst_fail->contains (stmts))
-+    return NULL;
-+  slp_tree res = vect_build_slp_tree_2 (vinfo, stmts, group_size, max_nunits,
-+					loads, matches, npermutes, tree_size,
-+					max_tree_size);
-+  /* When SLP build fails for stmts record this, otherwise SLP build
-+     can be exponential in time when we allow to construct parts from
-+     scalars, see PR81723.  */
-+  if (! res)
-+    {
-+      vec <gimple *> x;
-+      x.create (stmts.length ());
-+      x.splice (stmts);
-+      bst_fail->add (x);
-+    }
-+  return res;
-+}
-+
-+/* Recursively build an SLP tree starting from NODE.
-+   Fail (and return a value not equal to zero) if def-stmts are not
-+   isomorphic, require data permutation or are of unsupported types of
-+   operation.  Otherwise, return 0.
-+   The value returned is the depth in the SLP tree where a mismatch
-+   was found.  */
-+
-+static slp_tree
-+vect_build_slp_tree_2 (vec_info *vinfo,
-+		       vec<gimple *> stmts, unsigned int group_size,
-+		       unsigned int *max_nunits,
-+		       vec<slp_tree> *loads,
-+		       bool *matches, unsigned *npermutes, unsigned *tree_size,
-+		       unsigned max_tree_size)
-+{
-   unsigned nops, i, this_tree_size = 0, this_max_nunits = *max_nunits;
-   gimple *stmt;
-   slp_tree node;
-@@ -1014,6 +1084,9 @@
- 
-   stmt = stmts[0];
- 
-+  if (tree_size)
-+    max_tree_size -= *tree_size;
-+
-   /* Create SLP_TREE nodes for the definition node/s.  */
-   FOR_EACH_VEC_ELT (oprnds_info, i, oprnd_info)
-     {
-@@ -1933,9 +2006,11 @@
-   /* Build the tree for the SLP instance.  */
-   bool *matches = XALLOCAVEC (bool, group_size);
-   unsigned npermutes = 0;
-+  bst_fail = new hash_set <vec <gimple *>, bst_traits> ();
-   node = vect_build_slp_tree (vinfo, scalar_stmts, group_size,
- 				   &max_nunits, &loads, matches, &npermutes,
- 			      NULL, max_tree_size);
-+  delete bst_fail;
-   if (node != NULL)
-     {
-       /* Calculate the unrolling factor based on the smallest type.  */
diff --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff
index 81a7d00..adbc1d9 100644
--- a/debian/patches/svn-updates.diff
+++ b/debian/patches/svn-updates.diff
@@ -1,10 +1,10 @@
-# DP: updates from the 7 branch upto 20170824 (r251336).
+# DP: updates from the 7 branch upto 20170830 (r251446).
 
 last_update()
 {
 	cat > ${dir}LAST_UPDATED <EOF
-Thu Aug 24 17:23:18 CEST 2017
-Thu Aug 24 15:23:18 UTC 2017 (revision 251336)
+Wed Aug 30 08:55:14 CEST 2017
+Wed Aug 30 06:55:14 UTC 2017 (revision 251446)
 EOF
 }
 
@@ -407,18 +407,408 @@ Index: libstdc++-v3/config/io/basic_file_stdio.cc
  	if (!__err)
  	  {
  	    _M_cfile = __file;
+Index: gcc/tree-chkp.c
+===================================================================
+--- a/src/gcc/tree-chkp.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/tree-chkp.c	(.../branches/gcc-7-branch)
+@@ -3277,7 +3277,7 @@
+   return DECL_SIZE (field) && TREE_CODE (DECL_SIZE (field)) == INTEGER_CST
+     && tree_to_uhwi (DECL_SIZE (field)) != 0
+     && !(flag_chkp_flexible_struct_trailing_arrays
+-	 && array_at_struct_end_p (ref, true))
++	 && array_at_struct_end_p (ref))
+     && (!DECL_FIELD_OFFSET (field)
+ 	|| TREE_CODE (DECL_FIELD_OFFSET (field)) == INTEGER_CST)
+     && (!DECL_FIELD_BIT_OFFSET (field)
 Index: gcc/DATESTAMP
 ===================================================================
 --- a/src/gcc/DATESTAMP	(.../tags/gcc_7_2_0_release)
 +++ b/src/gcc/DATESTAMP	(.../branches/gcc-7-branch)
 @@ -1 +1 @@
 -20170814
-+20170824
++20170830
+Index: gcc/tree.c
+===================================================================
+--- a/src/gcc/tree.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/tree.c	(.../branches/gcc-7-branch)
+@@ -13219,18 +13219,26 @@
+   return NULL_TREE;
+ }
+ 
+-/* Returns true if REF is an array reference to an array at the end of
+-   a structure.  If this is the case, the array may be allocated larger
+-   than its upper bound implies.  When ALLOW_COMPREF is true considers
+-   REF when it's a COMPONENT_REF in addition ARRAY_REF and
+-   ARRAY_RANGE_REF.  */
++/* Returns true if REF is an array reference or a component reference
++   to an array at the end of a structure.
++   If this is the case, the array may be allocated larger
++   than its upper bound implies.  */
+ 
+ bool
+-array_at_struct_end_p (tree ref, bool allow_compref)
++array_at_struct_end_p (tree ref)
+ {
+-  if (TREE_CODE (ref) != ARRAY_REF
+-      && TREE_CODE (ref) != ARRAY_RANGE_REF
+-      && (!allow_compref || TREE_CODE (ref) != COMPONENT_REF))
++  tree atype;
++
++  if (TREE_CODE (ref) == ARRAY_REF
++      || TREE_CODE (ref) == ARRAY_RANGE_REF)
++    {
++      atype = TREE_TYPE (TREE_OPERAND (ref, 0));
++      ref = TREE_OPERAND (ref, 0);
++    }
++  else if (TREE_CODE (ref) == COMPONENT_REF
++	   && TREE_CODE (TREE_TYPE (TREE_OPERAND (ref, 1))) == ARRAY_TYPE)
++    atype = TREE_TYPE (TREE_OPERAND (ref, 1));
++  else
+     return false;
+ 
+   while (handled_component_p (ref))
+@@ -13238,19 +13246,42 @@
+       /* If the reference chain contains a component reference to a
+          non-union type and there follows another field the reference
+ 	 is not at the end of a structure.  */
+-      if (TREE_CODE (ref) == COMPONENT_REF
+-	  && TREE_CODE (TREE_TYPE (TREE_OPERAND (ref, 0))) == RECORD_TYPE)
++      if (TREE_CODE (ref) == COMPONENT_REF)
+ 	{
+-	  tree nextf = DECL_CHAIN (TREE_OPERAND (ref, 1));
+-	  while (nextf && TREE_CODE (nextf) != FIELD_DECL)
+-	    nextf = DECL_CHAIN (nextf);
+-	  if (nextf)
+-	    return false;
++	  if (TREE_CODE (TREE_TYPE (TREE_OPERAND (ref, 0))) == RECORD_TYPE)
++	    {
++	      tree nextf = DECL_CHAIN (TREE_OPERAND (ref, 1));
++	      while (nextf && TREE_CODE (nextf) != FIELD_DECL)
++		nextf = DECL_CHAIN (nextf);
++	      if (nextf)
++		return false;
++	    }
+ 	}
++      /* If we have a multi-dimensional array we do not consider
++         a non-innermost dimension as flex array if the whole
++	 multi-dimensional array is at struct end.
++	 Same for an array of aggregates with a trailing array
++	 member.  */
++      else if (TREE_CODE (ref) == ARRAY_REF)
++	return false;
++      else if (TREE_CODE (ref) == ARRAY_RANGE_REF)
++	;
++      /* If we view an underlying object as sth else then what we
++         gathered up to now is what we have to rely on.  */
++      else if (TREE_CODE (ref) == VIEW_CONVERT_EXPR)
++	break;
++      else
++	gcc_unreachable ();
+ 
+       ref = TREE_OPERAND (ref, 0);
+     }
+ 
++  /* The array now is at struct end.  Treat flexible arrays as
++     always subject to extend, even into just padding constrained by
++     an underlying decl.  */
++  if (! TYPE_SIZE (atype))
++    return true;
++
+   tree size = NULL;
+ 
+   if (TREE_CODE (ref) == MEM_REF
+Index: gcc/tree.h
+===================================================================
+--- a/src/gcc/tree.h	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/tree.h	(.../branches/gcc-7-branch)
+@@ -4870,12 +4870,10 @@
+    EXP, an ARRAY_REF or an ARRAY_RANGE_REF.  */
+ extern tree array_ref_low_bound (tree);
+ 
+-/* Returns true if REF is an array reference to an array at the end of
+-   a structure.  If this is the case, the array may be allocated larger
+-   than its upper bound implies.  When second argument is true considers
+-   REF when it's a COMPONENT_REF in addition ARRAY_REF and
+-   ARRAY_RANGE_REF.  */
+-extern bool array_at_struct_end_p (tree, bool = false);
++/* Returns true if REF is an array reference or a component reference
++   to an array at the end of a structure.  If this is the case, the array
++   may be allocated larger than its upper bound implies.  */
++extern bool array_at_struct_end_p (tree);
+ 
+ /* Return a tree representing the offset, in bytes, of the field referenced
+    by EXP.  This does not include any offset in DECL_FIELD_BIT_OFFSET.  */
+Index: gcc/gcc.c
+===================================================================
+--- a/src/gcc/gcc.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/gcc.c	(.../branches/gcc-7-branch)
+@@ -872,8 +872,7 @@
+ #endif
+ 
+ #ifdef ENABLE_DEFAULT_PIE
+-#define NO_PIE_SPEC		"no-pie|static"
+-#define PIE_SPEC		NO_PIE_SPEC "|r|shared:;"
++#define PIE_SPEC		"!no-pie"
+ #define NO_FPIE1_SPEC		"fno-pie"
+ #define FPIE1_SPEC		NO_FPIE1_SPEC ":;"
+ #define NO_FPIE2_SPEC		"fno-PIE"
+@@ -894,7 +893,6 @@
+ #define FPIE_OR_FPIC_SPEC	NO_FPIE_AND_FPIC_SPEC ":;"
+ #else
+ #define PIE_SPEC		"pie"
+-#define NO_PIE_SPEC		PIE_SPEC "|r|shared:;"
+ #define FPIE1_SPEC		"fpie"
+ #define NO_FPIE1_SPEC		FPIE1_SPEC ":;"
+ #define FPIE2_SPEC		"fPIE"
+@@ -923,7 +921,7 @@
+ #else
+ #define LD_PIE_SPEC ""
+ #endif
+-#define LINK_PIE_SPEC "%{no-pie:} " "%{" PIE_SPEC ":" LD_PIE_SPEC "} "
++#define LINK_PIE_SPEC "%{static|shared|r:;" PIE_SPEC ":" LD_PIE_SPEC "} "
+ #endif
+ 
+ #ifndef LINK_BUILDID_SPEC
+@@ -1011,8 +1009,10 @@
+ #endif
+ 
+ /* -u* was put back because both BSD and SysV seem to support it.  */
+-/* %{static:} simply prevents an error message if the target machine
+-   doesn't handle -static.  */
++/* %{static|no-pie:} simply prevents an error message:
++   1. If the target machine doesn't handle -static.
++   2. If PIE isn't enabled by default.
++ */
+ /* We want %{T*} after %{L*} and %D so that it can be used to specify linker
+    scripts which exist in user specified directories, or in standard
+    directories.  */
+@@ -1029,7 +1029,7 @@
+    "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
+    "%X %{o*} %{e*} %{N} %{n} %{r}\
+     %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \
+-    %{static:} %{L*} %(mfwrap) %(link_libgcc) " \
++    %{static|no-pie:} %{L*} %(mfwrap) %(link_libgcc) " \
+     VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \
+     %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
+ 	%:include(libgomp.spec)%(link_gomp)}\
+Index: gcc/fold-const.c
+===================================================================
+--- a/src/gcc/fold-const.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/fold-const.c	(.../branches/gcc-7-branch)
+@@ -877,6 +877,13 @@
+ 	}
+     }
+ 
++  if (*litp
++      && TREE_OVERFLOW_P (*litp))
++    *litp = drop_tree_overflow (*litp);
++  if (*minus_litp
++      && TREE_OVERFLOW_P (*minus_litp))
++    *minus_litp = drop_tree_overflow (*minus_litp);
++
+   return var;
+ }
+ 
+@@ -6175,6 +6182,7 @@
+       t1 = extract_muldiv (op0, c, code, wide_type, &sub_strict_overflow_p);
+       t2 = extract_muldiv (op1, c, code, wide_type, &sub_strict_overflow_p);
+       if (t1 != 0 && t2 != 0
++	  && TYPE_OVERFLOW_WRAPS (ctype)
+ 	  && (code == MULT_EXPR
+ 	      /* If not multiplication, we can only do this if both operands
+ 		 are divisible by c.  */
+@@ -6237,11 +6245,6 @@
+       if (TYPE_UNSIGNED (ctype) && ctype != type)
+ 	break;
+ 
+-      /* If we were able to eliminate our operation from the first side,
+-	 apply our operation to the second side and reform the PLUS.  */
+-      if (t1 != 0 && (TREE_CODE (t1) != code || code == MULT_EXPR))
+-	return fold_build2 (tcode, ctype, fold_convert (ctype, t1), op1);
+-
+       /* The last case is if we are a multiply.  In that case, we can
+ 	 apply the distributive law to commute the multiply and addition
+ 	 if the multiplication of the constants doesn't overflow
+@@ -8879,7 +8882,7 @@
+       tree op0 = fold_convert_loc (loc, type, TREE_OPERAND (aref0, 1));
+       tree op1 = fold_convert_loc (loc, type, TREE_OPERAND (aref1, 1));
+       tree esz = fold_convert_loc (loc, type, array_ref_element_size (aref0));
+-      tree diff = build2 (MINUS_EXPR, type, op0, op1);
++      tree diff = fold_build2_loc (loc, MINUS_EXPR, type, op0, op1);
+       return fold_build2_loc (loc, PLUS_EXPR, type,
+ 			      base_offset,
+ 			      fold_build2_loc (loc, MULT_EXPR, type,
+@@ -9638,11 +9641,6 @@
+ 		       + (lit0 != 0) + (lit1 != 0)
+ 		       + (minus_lit0 != 0) + (minus_lit1 != 0))))
+ 	    {
+-	      bool any_overflows = false;
+-	      if (lit0) any_overflows |= TREE_OVERFLOW (lit0);
+-	      if (lit1) any_overflows |= TREE_OVERFLOW (lit1);
+-	      if (minus_lit0) any_overflows |= TREE_OVERFLOW (minus_lit0);
+-	      if (minus_lit1) any_overflows |= TREE_OVERFLOW (minus_lit1);
+ 	      var0 = associate_trees (loc, var0, var1, code, atype);
+ 	      con0 = associate_trees (loc, con0, con1, code, atype);
+ 	      lit0 = associate_trees (loc, lit0, lit1, code, atype);
+@@ -9673,9 +9671,8 @@
+ 		}
+ 
+ 	      /* Don't introduce overflows through reassociation.  */
+-	      if (!any_overflows
+-		  && ((lit0 && TREE_OVERFLOW_P (lit0))
+-		      || (minus_lit0 && TREE_OVERFLOW_P (minus_lit0))))
++	      if ((lit0 && TREE_OVERFLOW_P (lit0))
++		  || (minus_lit0 && TREE_OVERFLOW_P (minus_lit0)))
+ 		return NULL_TREE;
+ 
+ 	      if (minus_lit0)
+Index: gcc/tree-ssa-sccvn.c
+===================================================================
+--- a/src/gcc/tree-ssa-sccvn.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/tree-ssa-sccvn.c	(.../branches/gcc-7-branch)
+@@ -2304,7 +2304,7 @@
+       memset (&op, 0, sizeof (op));
+       op.type = vr->type;
+       op.opcode = MEM_REF;
+-      op.op0 = build_int_cst (ptr_type_node, at - rhs_offset);
++      op.op0 = build_int_cst (ptr_type_node, at - lhs_offset + rhs_offset);
+       op.off = at - lhs_offset + rhs_offset;
+       vr->operands[0] = op;
+       op.type = TREE_TYPE (rhs);
 Index: gcc/ChangeLog
 ===================================================================
 --- a/src/gcc/ChangeLog	(.../tags/gcc_7_2_0_release)
 +++ b/src/gcc/ChangeLog	(.../branches/gcc-7-branch)
-@@ -1,3 +1,87 @@
+@@ -1,3 +1,216 @@
++2017-08-29  Michael Meissner  <meissner at linux.vnet.ibm.com>
++
++	Back port from trunk
++	2017-08-07  Michael Meissner  <meissner at linux.vnet.ibm.com>
++
++	PR target/81593
++	* config/rs6000/vsx.md (vsx_concat_<mode>_1): New combiner insns
++	to recognize inserting into a vector from a double word element
++	that was extracted from another vector, and eliminate extra
++	XXPERMDI instructions.
++	(vsx_concat_<mode>_2): Likewise.
++	(vsx_concat_<mode>_3): Likewise.
++	(vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
++	concat to allow optimizing inserts from previous extracts.
++
++2017-08-29  Alan Modra  <amodra at gmail.com>
++
++	Apply from mainline
++	2017-08-12  Alan Modra  <amodra at gmail.com>
++	PR target/81170
++	PR target/81295
++	* config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
++	match gnu-user.h startfile.
++	(ENDFILE_LINUX_SPEC): Similarly.
++
++	2017-08-08  Alan Modra  <amodra at gmail.com>
++		    H.J. Lu  <hongjiu.lu at intel.com>
++	PR target/81170
++	PR target/81295
++	PR driver/81523
++	* gcc.c (NO_PIE_SPEC): Delete.
++	(PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
++	exclusion..
++	(LINK_PIE_SPEC): ..to here.
++	(LINK_COMMAND_SPEC): Support -no-pie.
++	* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
++	chain of crtbegin*.o selection, update for PIE_SPEC changes and
++	format.
++	(GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
++	* config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
++	(ENDFILE_CRTEND_SPEC): Similarly.
++
++2017-08-29  Richard Biener  <rguenther at suse.de>
++
++	Backport from mainline
++	2017-08-28  Richard Biener  <rguenther at suse.de>
++
++	PR tree-optimization/81977
++	* tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through
++	memcpy.
++
++	2017-08-28  Richard Biener  <rguenther at suse.de>
++
++	PR debug/81993
++	* dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes):
++	Do nothing for removed DIEs.
++
++2017-08-28  Richard Biener  <rguenther at suse.de>
++
++	Backport from mainline
++	2017-06-14  Richard Biener  <rguenther at suse.de>
++
++	PR middle-end/81088
++	* fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
++	literal constants.
++	(fold_binary_loc): When associating do not treat pre-existing
++	TREE_OVERFLOW on literal constants as a reason to allow
++	TREE_OVERFLOW on associated literal constants.
++
++	2017-06-13  Richard Biener  <rguenther at suse.de>
++
++	PR middle-end/81065
++	* fold-const.c (extract_muldiv_1): Remove bogus distribution
++	case of C * (x * C2 + C3).
++	(fold_addr_of_array_ref_difference): Properly fold index difference.
++
++	2017-06-07  Marek Polacek  <polacek at redhat.com>
++
++	PR sanitizer/80932
++	* fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
++	TYPE_OVERFLOW_WRAPS check. 
++
++2017-08-28  Richard Biener  <rguenther at suse.de>
++
++	Backport from mainline
++	2017-08-21  Richard Biener  <rguenther at suse.de>
++
++	PR middle-end/81884
++	* tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
++	at struct end conservatively when comparing common bases.
++
++	2017-05-04  Richard Biener  <rguenther at suse.de>
++ 
++	* tree.c (array_at_struct_end_p): Handle arrays at struct
++	end with flexarrays more conservatively.  Refactor and treat
++	arrays of arrays or aggregates more strict.  Fix
++	VIEW_CONVERT_EXPR handling.  Remove allow_compref argument.
++	* tree.h (array_at_struct_end_p): Adjust prototype.
++	* gimple-fold.c (get_range_strlen): Likewise.
++	* tree-chkp.c (chkp_may_narrow_to_field): Likewise.
++
++2017-08-28  Richard Biener  <rguenther at suse.de>
++
++	Backport from mainline
++	2017-08-01  Richard Biener  <rguenther at suse.de>
++
++	PR tree-optimization/81181
++	* tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
++	(compute_antic): ... end of iteration here.
++
++	2017-08-08  Richard Biener  <rguenther at suse.de>
++
++	PR tree-optimization/81723
++	* tree-vect-slp.c (struct bst_traits): New hash traits.
++	(bst_fail): New global.
++	(vect_build_slp_tree_2): New worker, split out from ...
++	(vect_build_slp_tree): ... this now wrapping it with using
++	bst_fail set to cache SLP tree build fails.  Properly handle
++	max_tree_size.
++	(vect_analyze_slp_instance): Allocate and free bst_fail.
++
++	2017-08-24  Richard Biener  <rguenther at suse.de>
++
++	PR target/81921
++	* config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
++	and ipa-inline.h.
++	(ix86_can_inline_p): When ix86_fpmath flags do not match
++	check whether the callee uses FP math at all.
++
 +2017-08-23  Peter Bergner  <bergner at vnet.ibm.com>
 +
 +	Backport from mainline
@@ -506,6 +896,470 @@ Index: gcc/ChangeLog
  2017-08-14  Release Manager
  
  	* GCC 7.2.0 released.
+Index: gcc/testsuite/gcc.target/powerpc/vec-setup-be-long.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/powerpc/vec-setup-be-long.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/gcc.target/powerpc/vec-setup-be-long.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,11 @@
++/* { dg-do run { target { powerpc64le*-*-linux* } } } */
++/* { dg-require-effective-target vsx_hw } */
++/* { dg-options "-O2 -mvsx -maltivec=be" } */
++
++/* Test various ways of creating vectors with 2 double words and accessing the
++   elements.  This test uses the long (on 64-bit systems) or long long datatype
++   (on 32-bit systems).
++
++   This test explicitly tests -maltivec=be to make sure things are correct.  */
++
++#include "vec-setup.h"
+Index: gcc/testsuite/gcc.target/powerpc/vec-setup.h
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/powerpc/vec-setup.h	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/gcc.target/powerpc/vec-setup.h	(.../branches/gcc-7-branch)
+@@ -0,0 +1,366 @@
++#include <altivec.h>
++
++/* Test various ways of creating vectors with 2 double words and accessing the
++   elements.  This include files supports:
++
++	 testing double
++	 testing long on 64-bit systems
++	 testing long long on 32-bit systems.
++
++   The endian support is:
++
++	big endian
++	little endian with little endian element ordering
++	little endian with big endian element ordering.  */
++
++#ifdef DEBUG
++#include <stdio.h>
++#define DEBUG0(STR)		fputs (STR, stdout)
++#define DEBUG2(STR,A,B)		printf (STR, A, B)
++
++static int errors = 0;
++
++#else
++#include <stdlib.h>
++#define DEBUG0(STR)
++#define DEBUG2(STR,A,B)
++#endif
++
++#if defined(DO_DOUBLE)
++#define TYPE	double
++#define STYPE	"double"
++#define ZERO	0.0
++#define ONE	1.0
++#define TWO	2.0
++#define THREE	3.0
++#define FOUR	4.0
++#define FIVE	5.0
++#define SIX	6.0
++#define FMT	"g"
++
++#elif defined(_ARCH_PPC64)
++#define TYPE	long
++#define STYPE	"long"
++#define ZERO	0L
++#define ONE	1L
++#define TWO	2L
++#define THREE	3L
++#define FOUR	4L
++#define FIVE	5L
++#define SIX	6L
++#define FMT	"ld"
++
++#else
++#define TYPE	long long
++#define STYPE	"long long"
++#define ZERO	0LL
++#define ONE	1LL
++#define TWO	2LL
++#define THREE	3LL
++#define FOUR	4LL
++#define FIVE	5LL
++#define SIX	6LL
++#define FMT	"lld"
++#endif
++
++/* Macros to order the left/right values correctly.  Note, -maltivec=be does
++   not change the order for static initializations, so we have to handle it
++   specially.  */
++
++#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
++#define INIT_ORDER(A, B)	(TYPE) A, (TYPE) B
++#define ELEMENT_ORDER(A, B)	(TYPE) A, (TYPE) B
++#define ENDIAN			"-mbig"
++
++#elif __VEC_ELEMENT_REG_ORDER__ == __ORDER_BIG_ENDIAN__
++#define NO_ARRAY
++#define INIT_ORDER(A, B)	(TYPE) B, (TYPE) A
++#define ELEMENT_ORDER(A, B)	(TYPE) A, (TYPE) B
++#define ENDIAN			"-mlittle -maltivec=be"
++
++#else
++#define INIT_ORDER(A, B)	(TYPE) B, (TYPE) A
++#define ELEMENT_ORDER(A, B)	(TYPE) B, (TYPE) A
++#define ENDIAN			"-mlittle"
++#endif
++
++static volatile TYPE		five	= FIVE;
++static volatile TYPE		six	= SIX;
++static volatile vector TYPE	s_v12 = { ONE,   TWO };
++static volatile vector TYPE	g_v34 = { THREE, FOUR };
++
++
++__attribute__((__noinline__))
++static void
++vector_check (vector TYPE v, TYPE expect_hi, TYPE expect_lo)
++{
++  TYPE actual_hi, actual_lo;
++#ifdef DEBUG
++  const char *pass_fail;
++#endif
++
++  __asm__ ("xxlor %x0,%x1,%x1"		: "=&wa" (actual_hi) : "wa" (v));
++  __asm__ ("xxpermdi %x0,%x1,%x1,3"	: "=&wa" (actual_lo) : "wa" (v));
++
++#ifdef DEBUG
++  if ((actual_hi == expect_hi) && (actual_lo == expect_lo))
++    pass_fail = ", pass";
++  else
++    {
++      pass_fail = ", fail";
++      errors++;
++    }
++
++  printf ("Expected %" FMT ", %" FMT ", got %" FMT ", %" FMT "%s\n",
++	  expect_hi, expect_lo,
++	  actual_hi, actual_lo,
++	  pass_fail);
++#else
++  if ((actual_hi != expect_hi) || (actual_lo != expect_lo))
++    abort ();
++#endif
++}
++
++__attribute__((__noinline__))
++static vector TYPE
++combine (TYPE op0, TYPE op1)
++{
++  return (vector TYPE) { op0, op1 };
++}
++
++__attribute__((__noinline__))
++static vector TYPE
++combine_insert (TYPE op0, TYPE op1)
++{
++  vector TYPE ret = (vector TYPE) { ZERO, ZERO };
++  ret = vec_insert (op0, ret, 0);
++  ret = vec_insert (op1, ret, 1);
++  return ret;
++}
++
++__attribute__((__noinline__))
++static vector TYPE
++concat_extract_00 (vector TYPE a, vector TYPE b)
++{
++  return (vector TYPE) { vec_extract (a, 0), vec_extract (b, 0) };
++}
++
++__attribute__((__noinline__))
++static vector TYPE
++concat_extract_01 (vector TYPE a, vector TYPE b)
++{
++  return (vector TYPE) { vec_extract (a, 0), vec_extract (b, 1) };
++}
++
++__attribute__((__noinline__))
++static vector TYPE
++concat_extract_10 (vector TYPE a, vector TYPE b)
++{
++  return (vector TYPE) { vec_extract (a, 1), vec_extract (b, 0) };
++}
++
++__attribute__((__noinline__))
++static vector TYPE
++concat_extract_11 (vector TYPE a, vector TYPE b)
++{
++  return (vector TYPE) { vec_extract (a, 1), vec_extract (b, 1) };
++}
++
++__attribute__((__noinline__))
++static vector TYPE
++concat_extract2_0s (vector TYPE a, TYPE b)
++{
++  return (vector TYPE) { vec_extract (a, 0), b };
++}
++
++__attribute__((__noinline__))
++static vector TYPE
++concat_extract2_1s (vector TYPE a, TYPE b)
++{
++  return (vector TYPE) { vec_extract (a, 1), b };
++}
++
++__attribute__((__noinline__))
++static vector TYPE
++concat_extract2_s0 (TYPE a, vector TYPE b)
++{
++  return (vector TYPE) { a, vec_extract (b, 0) };
++}
++
++__attribute__((__noinline__))
++static vector TYPE
++concat_extract2_s1 (TYPE a, vector TYPE b)
++{
++  return (vector TYPE) { a, vec_extract (b, 1) };
++}
++
++__attribute__((__noinline__))
++static vector TYPE
++concat_extract_nn (vector TYPE a, vector TYPE b, size_t i, size_t j)
++{
++  return (vector TYPE) { vec_extract (a, i), vec_extract (b, j) };
++}
++
++#ifndef NO_ARRAY
++__attribute__((__noinline__))
++static vector TYPE
++array_0 (vector TYPE v, TYPE a)
++{
++  v[0] = a;
++  return v;
++}
++
++__attribute__((__noinline__))
++static vector TYPE
++array_1 (vector TYPE v, TYPE a)
++{
++  v[1] = a;
++  return v;
++}
++
++__attribute__((__noinline__))
++static vector TYPE
++array_01 (vector TYPE v, TYPE a, TYPE b)
++{
++  v[0] = a;
++  v[1] = b;
++  return v;
++}
++
++__attribute__((__noinline__))
++static vector TYPE
++array_01b (TYPE a, TYPE b)
++{
++  vector TYPE v = (vector TYPE) { 0, 0 };
++  v[0] = a;
++  v[1] = b;
++  return v;
++}
++#endif
++
++int
++main (void)
++{
++  vector TYPE a = (vector TYPE) { ONE,   TWO  };
++  vector TYPE b = (vector TYPE) { THREE, FOUR };
++  size_t i, j;
++
++#ifndef NO_ARRAY
++  vector TYPE z = (vector TYPE) { ZERO,  ZERO };
++#endif
++
++  DEBUG2 ("Endian: %s, type: %s\n", ENDIAN, STYPE);
++  DEBUG0 ("\nStatic/global initialization\n");
++  vector_check (s_v12, INIT_ORDER (1, 2));
++  vector_check (g_v34, INIT_ORDER (3, 4));
++
++  DEBUG0 ("\nVector via constant runtime intiialization\n");
++  vector_check (a, INIT_ORDER (1, 2));
++  vector_check (b, INIT_ORDER (3, 4));
++
++  DEBUG0 ("\nCombine scalars using vector initialization\n");
++  vector_check (combine (1, 2), INIT_ORDER (1, 2));
++  vector_check (combine (3, 4), INIT_ORDER (3, 4));
++
++  DEBUG0 ("\nSetup with vec_insert\n");
++  a = combine_insert (1, 2);
++  b = combine_insert (3, 4);
++  vector_check (a, ELEMENT_ORDER (1, 2));
++  vector_check (b, ELEMENT_ORDER (3, 4));
++
++#ifndef NO_ARRAY
++  DEBUG0 ("\nTesting array syntax\n");
++  vector_check (array_0   (a, FIVE),      ELEMENT_ORDER (5, 2));
++  vector_check (array_1   (b, SIX),       ELEMENT_ORDER (3, 6));
++  vector_check (array_01  (z, FIVE, SIX), ELEMENT_ORDER (5, 6));
++  vector_check (array_01b (FIVE, SIX),    ELEMENT_ORDER (5, 6));
++
++  vector_check (array_0   (a, five),      ELEMENT_ORDER (5, 2));
++  vector_check (array_1   (b, six),       ELEMENT_ORDER (3, 6));
++  vector_check (array_01  (z, five, six), ELEMENT_ORDER (5, 6));
++  vector_check (array_01b (five, six),    ELEMENT_ORDER (5, 6));
++#else
++  DEBUG0 ("\nSkipping array syntax on -maltivec=be\n");
++#endif
++
++  DEBUG0 ("\nTesting concat and extract\n");
++  vector_check (concat_extract_00 (a, b), INIT_ORDER (1, 3));
++  vector_check (concat_extract_01 (a, b), INIT_ORDER (1, 4));
++  vector_check (concat_extract_10 (a, b), INIT_ORDER (2, 3));
++  vector_check (concat_extract_11 (a, b), INIT_ORDER (2, 4));
++
++  DEBUG0 ("\nTesting concat and extract #2\n");
++  vector_check (concat_extract2_0s (a, FIVE), INIT_ORDER (1, 5));
++  vector_check (concat_extract2_1s (a, FIVE), INIT_ORDER (2, 5));
++  vector_check (concat_extract2_s0 (SIX, a),  INIT_ORDER (6, 1));
++  vector_check (concat_extract2_s1 (SIX, a),  INIT_ORDER (6, 2));
++
++  DEBUG0 ("\nTesting variable concat and extract\n");
++  for (i = 0; i < 2; i++)
++    {
++      for (j = 0; j < 2; j++)
++	{
++	  static struct {
++	    TYPE hi;
++	    TYPE lo;
++	  } hilo[2][2] =
++	      { { { ONE, THREE }, { ONE, FOUR } },
++		{ { TWO, THREE }, { TWO, FOUR } } };
++
++	  vector_check (concat_extract_nn (a, b, i, j),
++			INIT_ORDER (hilo[i][j].hi, hilo[i][j].lo));
++	}
++    }
++
++  DEBUG0 ("\nTesting separate function\n");
++  vector_check (combine (vec_extract (a, 0), vec_extract (b, 0)),
++		INIT_ORDER (1, 3));
++
++  vector_check (combine (vec_extract (a, 0), vec_extract (b, 1)),
++		INIT_ORDER (1, 4));
++
++  vector_check (combine (vec_extract (a, 1), vec_extract (b, 0)),
++		INIT_ORDER (2, 3));
++
++  vector_check (combine (vec_extract (a, 1), vec_extract (b, 1)),
++		INIT_ORDER (2, 4));
++
++  vector_check (combine_insert (vec_extract (a, 0), vec_extract (b, 0)),
++		ELEMENT_ORDER (1, 3));
++
++  vector_check (combine_insert (vec_extract (a, 0), vec_extract (b, 1)),
++		ELEMENT_ORDER (1, 4));
++
++  vector_check (combine_insert (vec_extract (a, 1), vec_extract (b, 0)),
++		ELEMENT_ORDER (2, 3));
++
++  vector_check (combine_insert (vec_extract (a, 1), vec_extract (b, 1)),
++		ELEMENT_ORDER (2, 4));
++
++
++#if defined(DO_DOUBLE)
++  DEBUG0 ("\nTesting explicit 2df concat\n");
++  vector_check (__builtin_vsx_concat_2df (FIVE, SIX), INIT_ORDER (5, 6));
++  vector_check (__builtin_vsx_concat_2df (five, six), INIT_ORDER (5, 6));
++
++#elif defined(_ARCH_PPC64)
++  DEBUG0 ("\nTesting explicit 2di concat\n");
++  vector_check (__builtin_vsx_concat_2di (FIVE, SIX), INIT_ORDER (5, 6));
++  vector_check (__builtin_vsx_concat_2di (five, six), INIT_ORDER (5, 6));
++
++#else
++  DEBUG0 ("\nSkip explicit 2di concat on 32-bit\n");
++#endif
++
++#ifdef DEBUG
++  if (errors)
++    printf ("\n%d error%s were found", errors, (errors == 1) ? "" : "s");
++  else
++    printf ("\nNo errors were found.\n");
++
++  return errors;
++
++#else
++  return 0;
++#endif
++}
+Index: gcc/testsuite/gcc.target/powerpc/vec-setup-be-double.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/powerpc/vec-setup-be-double.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/gcc.target/powerpc/vec-setup-be-double.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,12 @@
++/* { dg-do run { target { powerpc*-*-linux* } } } */
++/* { dg-require-effective-target vsx_hw } */
++/* { dg-options "-O2 -mvsx" } */
++
++/* Test various ways of creating vectors with 2 double words and accessing the
++   elements.  This test uses the double datatype.
++
++   This test explicitly tests -maltivec=be to make sure things are correct.  */
++
++#define DO_DOUBLE
++
++#include "vec-setup.h"
+Index: gcc/testsuite/gcc.target/powerpc/vsx-extract-6.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-extract-6.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-extract-6.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,25 @@
++/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
++/* { dg-skip-if "" { powerpc*-*-darwin* } } */
++/* { dg-require-effective-target powerpc_vsx_ok } */
++/* { dg-options "-O2 -mvsx" } */
++
++vector unsigned long
++test_vpasted (vector unsigned long high, vector unsigned long low)
++{
++  vector unsigned long res;
++  res[1] = high[1];
++  res[0] = low[0];
++  return res;
++}
++
++/* { dg-final { scan-assembler-times {\mxxpermdi\M} 1    } } */
++/* { dg-final { scan-assembler-not   {\mvspltisw\M}      } } */
++/* { dg-final { scan-assembler-not   {\mxxlor\M}         } } */
++/* { dg-final { scan-assembler-not   {\mxxlxor\M}        } } */
++/* { dg-final { scan-assembler-not   {\mxxspltib\M}      } } */
++/* { dg-final { scan-assembler-not   {\mlxvx?\M}         } } */
++/* { dg-final { scan-assembler-not   {\mlxv[dw][24]x\M}  } } */
++/* { dg-final { scan-assembler-not   {\mlvx\M}           } } */
++/* { dg-final { scan-assembler-not   {\mstxvx?\M}        } } */
++/* { dg-final { scan-assembler-not   {\mstxv[dw][24]x\M} } } */
++/* { dg-final { scan-assembler-not   {\mstvx\M}          } } */
+Index: gcc/testsuite/gcc.target/powerpc/vsx-extract-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-extract-7.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-extract-7.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,25 @@
++/* { dg-do compile { target { powerpc*-*-* } } } */
++/* { dg-skip-if "" { powerpc*-*-darwin* } } */
++/* { dg-require-effective-target powerpc_vsx_ok } */
++/* { dg-options "-O2 -mvsx" } */
++
++vector double
++test_vpasted (vector double high, vector double low)
++{
++  vector double res;
++  res[1] = high[1];
++  res[0] = low[0];
++  return res;
++}
++
++/* { dg-final { scan-assembler-times {\mxxpermdi\M} 1    } } */
++/* { dg-final { scan-assembler-not   {\mvspltisw\M}      } } */
++/* { dg-final { scan-assembler-not   {\mxxlor\M}         } } */
++/* { dg-final { scan-assembler-not   {\mxxlxor\M}        } } */
++/* { dg-final { scan-assembler-not   {\mxxspltib\M}      } } */
++/* { dg-final { scan-assembler-not   {\mlxvx?\M}         } } */
++/* { dg-final { scan-assembler-not   {\mlxv[dw][24]x\M}  } } */
++/* { dg-final { scan-assembler-not   {\mlvx\M}           } } */
++/* { dg-final { scan-assembler-not   {\mstxvx?\M}        } } */
++/* { dg-final { scan-assembler-not   {\mstxv[dw][24]x\M} } } */
++/* { dg-final { scan-assembler-not   {\mstvx\M}          } } */
 Index: gcc/testsuite/gcc.target/powerpc/pr80210.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.target/powerpc/pr80210.c	(.../tags/gcc_7_2_0_release)
@@ -521,6 +1375,22 @@ Index: gcc/testsuite/gcc.target/powerpc/pr80210.c
 +  return __builtin_sqrt (a);
 +}
 +#pragma GCC target "no-powerpc-gpopt"
+Index: gcc/testsuite/gcc.target/powerpc/vec-setup-double.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/powerpc/vec-setup-double.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/gcc.target/powerpc/vec-setup-double.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,11 @@
++/* { dg-do run { target { powerpc*-*-linux* } } } */
++/* { dg-require-effective-target vsx_hw } */
++/* { dg-options "-O2 -mvsx" } */
++
++/* Test various ways of creating vectors with 2 double words and accessing the
++   elements.  This test uses the double datatype and the default endian
++   order.  */
++
++#define DO_DOUBLE
++
++#include "vec-setup.h"
 Index: gcc/testsuite/gcc.target/powerpc/pr72804.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.target/powerpc/pr72804.c	(.../tags/gcc_7_2_0_release)
@@ -551,6 +1421,39 @@ Index: gcc/testsuite/gcc.target/powerpc/pr72804.c
 +/* { dg-final { scan-assembler-not "xxpermdi" } } */
 +/* { dg-final { scan-assembler-not "mfvsrd" } } */
 +/* { dg-final { scan-assembler-not "mfvsrd" } } */
+Index: gcc/testsuite/gcc.target/powerpc/vec-setup-long.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/powerpc/vec-setup-long.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/gcc.target/powerpc/vec-setup-long.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,9 @@
++/* { dg-do run { target { powerpc*-*-linux* } } } */
++/* { dg-require-effective-target vsx_hw } */
++/* { dg-options "-O2 -mvsx" } */
++
++/* Test various ways of creating vectors with 2 double words and accessing the
++   elements.  This test uses the long (on 64-bit systems) or long long datatype
++   (on 32-bit systems).  The default endian order is used.  */
++
++#include "vec-setup.h"
+Index: gcc/testsuite/gcc.target/i386/pr81921.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/pr81921.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/gcc.target/i386/pr81921.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,14 @@
++/* { dg-do compile } */
++/* { dg-require-effective-target lto } */
++/* { dg-options "-flto -march=x86-64" } */
++
++extern __inline int  __attribute__((__gnu_inline__, __always_inline__, __artificial__, target("sse2")))
++_mm_loadu_si128 (int const *__P)
++{
++    return *__P;
++}
++
++void __attribute__((target("ssse3"))) foo (void *p)
++{
++  volatile int x = _mm_loadu_si128 (p);
++}
 Index: gcc/testsuite/lib/target-supports.exp
 ===================================================================
 --- a/src/gcc/testsuite/lib/target-supports.exp	(.../tags/gcc_7_2_0_release)
@@ -643,6 +1546,67 @@ Index: gcc/testsuite/gfortran.dg/array_temporaries_4.f90
 +  x = (/a (0, "one"),a (0, "two"),a (0, "three"),a (0, "four")/) ! { dg-warning "Creating array temporary" }
 +  y = x
 +end program test 
+Index: gcc/testsuite/gfortran.dg/pr81723.f
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr81723.f	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr81723.f	(.../branches/gcc-7-branch)
+@@ -0,0 +1,56 @@
++! { dg-do compile }
++! { dg-options "-O3 -fno-automatic" }
++
++      FUNCTION WWERF(Z)
++
++      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
++      COMPLEX*16 WWERF
++      COMPLEX*16 Z,ZH,R(37),S,T,V,W
++
++      PARAMETER (Z1 = 1, HF = Z1/2, Z10 = 10)
++      PARAMETER (C1 = 74/Z10, C2 = 83/Z10, C3 = Z10/32, C4 = 16/Z10)
++      PARAMETER (C = 1.12837 91670 95512 57D0, P = (2*C4)**33)
++
++      DOUBLE PRECISION GREAL,GIMAG,XARG,YARG
++      COMPLEX*16 ZARG,GCONJG,GCMPLX
++      GREAL( ZARG)=DREAL( ZARG)
++      GIMAG( ZARG)=DIMAG( ZARG)
++      GCONJG(ZARG)=DCONJG(ZARG)
++      GCMPLX(XARG,YARG)=DCMPLX(XARG,YARG)
++
++      X=Z
++      Y=GIMAG(Z)
++      XA=ABS(X)
++      YA=ABS(Y)
++      IF(YA .LT. C1 .AND. XA .LT. C2) THEN
++       ZH=GCMPLX(YA+C4,XA)
++       R(37)=0
++       DO 1 N = 36,1,-1
++       T=ZH+N*GCONJG(R(N+1))
++    1  R(N)=HF*T/(GREAL(T)**2+GIMAG(T)**2)
++       XL=P
++       S=0
++       DO 2 N = 33,1,-1
++       XL=C3*XL
++    2  S=R(N)*(S+XL)
++       V=C*S
++      ELSE
++       ZH=GCMPLX(YA,XA)
++       R(1)=0
++       DO 3 N = 9,1,-1
++       T=ZH+N*GCONJG(R(1))
++    3  R(1)=HF*T/(GREAL(T)**2+GIMAG(T)**2)
++       V=C*R(1)
++      END IF
++      IF(YA .EQ. 0) V=GCMPLX(EXP(-XA**2),GIMAG(V))
++      IF(Y .LT. 0) THEN
++       V=2*EXP(-GCMPLX(XA,YA)**2)-V
++       IF(X .GT. 0) V=GCONJG(V)
++      ELSE
++       IF(X .LT. 0) V=GCONJG(V)
++      END IF
++
++      WWERF=V
++
++      RETURN
++      END
 Index: gcc/testsuite/gcc.c-torture/compile/string-large-1.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.c-torture/compile/string-large-1.c	(.../tags/gcc_7_2_0_release)
@@ -767,6 +1731,41 @@ Index: gcc/testsuite/gcc.c-torture/compile/string-large-1.c
 +  vp3 = __builtin_strncpy (a, b, SIZE3);
 +  vp4 = __builtin_strncpy (a, b, SIZE4);
 +}
+Index: gcc/testsuite/gcc.dg/torture/pr81181.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/torture/pr81181.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/gcc.dg/torture/pr81181.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,30 @@
++/* { dg-do compile } */
++
++unsigned int lh;
++
++void
++ny (int t3, int ys, int rt, int p8)
++{
++  if (lh != 0)
++    {
++      if (0)
++	{
++oo:
++	  do
++	    {
++	      rt = (p8 != 0) ? t3 : 0;
++	      rt = (rt != 0 || lh != (unsigned int)ys);
++	      rt += lh + ys;
++	    }
++	  while (t3 <= 0);
++
++	  lh = ys;
++	  ys = rt;
++	}
++
++      if (lh != 0)
++	p8 = lh;
++    }
++
++  goto oo;
++}
 Index: gcc/testsuite/gcc.dg/ipa/ipcp-cstagg-7.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.dg/ipa/ipcp-cstagg-7.c	(.../tags/gcc_7_2_0_release)
@@ -781,7 +1780,80 @@ Index: gcc/testsuite/ChangeLog
 ===================================================================
 --- a/src/gcc/testsuite/ChangeLog	(.../tags/gcc_7_2_0_release)
 +++ b/src/gcc/testsuite/ChangeLog	(.../branches/gcc-7-branch)
-@@ -1,3 +1,66 @@
+@@ -1,3 +1,139 @@
++2017-08-29  Michael Meissner  <meissner at linux.vnet.ibm.com>
++
++	Back port from trunk
++	2017-08-07  Michael Meissner  <meissner at linux.vnet.ibm.com>
++
++	PR target/81593
++	* gcc.target/powerpc/vec-setup.h: New tests to test various
++	combinations of setting up vectors of 2 double word elements.
++	* gcc.target/powerpc/vec-setup-long.c: Likewise.
++	* gcc.target/powerpc/vec-setup-double.c: Likewise.
++	* gcc.target/powerpc/vec-setup-be-long.c: Likewise.
++	* gcc.target/powerpc/vec-setup-be-double.c: Likewise.
++	* gcc.target/powerpc/vsx-extract-6.c: New tests for optimzing
++	vector inserts from vector extracts.
++	* gcc.target/powerpc/vsx-extract-7.c: Likewise.
++
++2017-08-29  Richard Biener  <rguenther at suse.de>
++
++	Backport from mainline
++	2017-08-28  Richard Biener  <rguenther at suse.de>
++
++	PR tree-optimization/81977
++	* g++.dg/torture/pr81977.C: New testcase.
++
++2017-08-28  Richard Biener  <rguenther at suse.de>
++
++	Backport from mainline
++	2017-06-14  Richard Biener  <rguenther at suse.de>
++
++	PR middle-end/81088
++	* c-c++-common/ubsan/pr81088.c: New testcase.
++
++	2017-06-13  Richard Biener  <rguenther at suse.de>
++
++	PR middle-end/81065
++	* c-c++-common/ubsan/pr81065.c: New testcase.
++
++	2017-06-08  Marek Polacek  <polacek at redhat.com>
++
++	PR sanitize/80932
++	* c-c++-common/ubsan/pr80932.c: Test with ints, not with long ints.
++
++	2017-06-07  Marek Polacek  <polacek at redhat.com>
++
++	PR sanitizer/80932
++	* c-c++-common/ubsan/pr80932.c: New test.
++
++2017-08-28  Richard Biener  <rguenther at suse.de>
++
++	Backport from mainline
++	2017-08-21  Richard Biener  <rguenther at suse.de>
++
++	PR middle-end/81884
++	* g++.dg/torture/pr81884.C: New testcase.
++
++2017-08-28  Richard Biener  <rguenther at suse.de>
++
++	Backport from mainline
++	2017-08-01  Richard Biener  <rguenther at suse.de>
++
++	PR tree-optimization/81181
++	* gcc.dg/torture/pr81181.c: New testcase.
++
++	2017-08-08  Richard Biener  <rguenther at suse.de>
++
++	PR tree-optimization/81723
++	* gfortran.dg/pr81723.f: New testcase.
++
++	2017-08-24  Richard Biener  <rguenther at suse.de>
++
++	PR target/81921
++	* gcc/testsuite/gcc.target/i386/pr81921.c: New testcase.
++
 +2017-05-19  Uros Bizjak  <ubizjak at gmail.com>
 +
 +	Backport from mainline
@@ -848,6 +1920,50 @@ Index: gcc/testsuite/ChangeLog
  2017-08-14  Release Manager
  
  	* GCC 7.2.0 released.
+Index: gcc/testsuite/g++.dg/torture/pr81884.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/torture/pr81884.C	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/g++.dg/torture/pr81884.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,39 @@
++/* { dg-do run } */
++
++typedef unsigned long uint64_t;
++
++struct value_t {
++    uint64_t _count;
++    value_t(uint64_t c) : _count(c) {}
++};
++
++struct X {
++    value_t eventTime;
++    uint64_t arr[0];
++};
++
++X* x;
++
++__attribute__((noclone, noinline))
++void initialize()
++{
++  x->arr[0] = 11;
++  x->arr[1] = 12;
++  x->eventTime = value_t(10);
++  x->arr[2] = 13;
++  x->arr[3] = 14;
++}
++
++int main()
++{
++  char buffer[sizeof(X) + sizeof(uint64_t)*4];
++  x = (X*)buffer;
++  x->eventTime = value_t(999);
++  x->arr[0] = 1;
++  x->arr[1] = 2;
++  x->arr[2] = 3;
++  x->arr[3] = 4;
++  initialize();
++  if (x->arr[0] != 11 || x->arr[1] != 12 || x->arr[2] != 13 || x->arr[3] != 14)
++    __builtin_abort ();
++}
 Index: gcc/testsuite/g++.dg/torture/pr81354.C
 ===================================================================
 --- a/src/gcc/testsuite/g++.dg/torture/pr81354.C	(.../tags/gcc_7_2_0_release)
@@ -877,6 +1993,66 @@ Index: gcc/testsuite/g++.dg/torture/pr81354.C
 +    }
 +  }
 +}
+Index: gcc/testsuite/g++.dg/torture/pr81977.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/torture/pr81977.C	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/g++.dg/torture/pr81977.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,55 @@
++/* { dg-do run } */
++/* { dg-require-effective-target int32plus } */
++
++#include <cstdint>
++
++typedef struct
++{
++  uint16_t  x ;
++  uint16_t  y ;
++  uint64_t  z ;
++} __attribute__((packed, aligned(1))) TestMsgType;
++
++struct Payload
++{
++  uint16_t header_info[2];
++  TestMsgType _pref;
++  void Pack(uint8_t *buffer)
++    {
++      __builtin_memcpy(buffer, &_pref, sizeof(_pref));
++    }
++  void UnPack(uint8_t *buffer)
++    {
++      __builtin_memcpy(&_pref, buffer, sizeof(_pref));
++    }
++};
++
++
++struct Msg
++{
++  Payload _payload;
++  void Pack(uint8_t *buffer)
++    {
++      _payload.Pack(buffer);
++    }
++
++  void UnPack(uint8_t *buffer)
++    {
++      _payload.UnPack(buffer);
++    }
++};
++
++int main()
++{
++  uint8_t * buffer = new uint8_t [30];
++  Msg msg;
++  Msg msg1;
++  msg._payload._pref.x             = 0xabcd;
++  msg._payload._pref.y             = 0xa;
++  msg._payload._pref.z             = 0x0001020304051617;
++  msg.Pack(&buffer[0]);
++  msg1.UnPack(&buffer[0]);
++  if (msg1._payload._pref.x != 0xabcd)
++    __builtin_abort ();
++  delete [] buffer;
++}
 Index: gcc/testsuite/g++.dg/pr80287.C
 ===================================================================
 --- a/src/gcc/testsuite/g++.dg/pr80287.C	(.../tags/gcc_7_2_0_release)
@@ -895,6 +2071,192 @@ Index: gcc/testsuite/g++.dg/pr80287.C
 +} a;
 +
 +char b = a.ino;
+Index: gcc/testsuite/g++.dg/other/bitfield6.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/other/bitfield6.C	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/g++.dg/other/bitfield6.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,9 @@
++// PR c++/81607
++
++int a;
++
++struct b {
++  long c : 32;
++} d;
++
++char f = (903092 ? int(d.c) : 0) << a;
+Index: gcc/testsuite/c-c++-common/ubsan/pr81065.c
+===================================================================
+--- a/src/gcc/testsuite/c-c++-common/ubsan/pr81065.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/c-c++-common/ubsan/pr81065.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,13 @@
++/* { dg-do run } */
++/* { dg-options "-fsanitize=undefined -fsanitize-undefined-trap-on-error" } */
++
++unsigned char x = 154;
++int foo() {
++  // 8575 * (254408 - 9057) = 8575 * 245351 = 2103884825 = 0x7d66bc19
++  return 8575 * (1652 * x - 9057);
++}
++
++int main() {
++  foo();
++  return 0;
++}
+Index: gcc/testsuite/c-c++-common/ubsan/pr80932.c
+===================================================================
+--- a/src/gcc/testsuite/c-c++-common/ubsan/pr80932.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/c-c++-common/ubsan/pr80932.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,17 @@
++/* PR sanitizer/80932 */
++/* { dg-do run } */
++/* { dg-options "-fsanitize=undefined -fsanitize-undefined-trap-on-error" } */
++
++int x = 1;
++
++int
++foo (void)
++{
++  return ((int) (2855545792U * x) - (int) (3269399503U * x)) * -5;
++}
++
++int
++main ()
++{
++  foo ();
++}
+Index: gcc/testsuite/c-c++-common/ubsan/pr81088.c
+===================================================================
+--- a/src/gcc/testsuite/c-c++-common/ubsan/pr81088.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/c-c++-common/ubsan/pr81088.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,11 @@
++/* { dg-do run } */
++/* { dg-options "-fsanitize=undefined -fsanitize-undefined-trap-on-error" } */
++
++short s = 2;
++short y = 1;
++int i;
++int main()
++{
++  i = -(s + (int)(~(unsigned)(0 / y))) + 0x7fffffff;
++  return 0;
++}
+Index: gcc/cp/ChangeLog
+===================================================================
+--- a/src/gcc/cp/ChangeLog	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/cp/ChangeLog	(.../branches/gcc-7-branch)
+@@ -1,3 +1,13 @@
++2017-08-25  Marek Polacek  <polacek at redhat.com>
++
++	Backported from mainline
++	2017-08-08  Marek Polacek  <polacek at redhat.com>
++
++	PR c++/81607
++	* cp-gimplify.c (cp_fold): If folding exposed a branch of
++	a COND_EXPR, convert it to the original type of the COND_EXPR, if
++	they differ.		   
++
+ 2017-08-14  Release Manager
+ 
+ 	* GCC 7.2.0 released.
+@@ -4,8 +14,8 @@
+ 
+ 2017-08-09  Leonid Koppel  <lkoppel at uwaterloo.ca>
+ 
+-        PR c++/67054 - Inherited ctor with non-default-constructible members
+-        * method.c (walk_field_subobs) Consider member initializers (NSDMIs)
++	PR c++/67054 - Inherited ctor with non-default-constructible members
++	* method.c (walk_field_subobs) Consider member initializers (NSDMIs)
+ 	when deducing an inheriting constructor.
+ 
+ 2017-07-27  Paolo Carlini  <paolo.carlini at oracle.com>
+Index: gcc/cp/cp-gimplify.c
+===================================================================
+--- a/src/gcc/cp/cp-gimplify.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/cp/cp-gimplify.c	(.../branches/gcc-7-branch)
+@@ -2311,9 +2311,9 @@
+ 
+       /* A COND_EXPR might have incompatible types in branches if one or both
+ 	 arms are bitfields.  If folding exposed such a branch, fix it up.  */
+-      if (TREE_CODE (x) != code)
+-	if (tree type = is_bitfield_expr_with_lowered_type (x))
+-	  x = fold_convert (type, x);
++      if (TREE_CODE (x) != code
++	  && !useless_type_conversion_p (TREE_TYPE (org_x), TREE_TYPE (x)))
++	x = fold_convert (TREE_TYPE (org_x), x);
+ 
+       break;
+ 
+Index: gcc/tree-ssa-alias.c
+===================================================================
+--- a/src/gcc/tree-ssa-alias.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/tree-ssa-alias.c	(.../branches/gcc-7-branch)
+@@ -2415,6 +2415,7 @@
+       if (ref->ref)
+ 	{
+ 	  tree base = ref->ref;
++	  tree innermost_dropped_array_ref = NULL_TREE;
+ 	  if (handled_component_p (base))
+ 	    {
+ 	      tree saved_lhs0 = NULL_TREE;
+@@ -2434,6 +2435,11 @@
+ 		  TREE_OPERAND (base, 0) = saved_base0;
+ 		  if (res)
+ 		    break;
++		  /* Remember if we drop an array-ref that we need to
++		     double-check not being at struct end.  */ 
++		  if (TREE_CODE (base) == ARRAY_REF
++		      || TREE_CODE (base) == ARRAY_RANGE_REF)
++		    innermost_dropped_array_ref = base;
+ 		  /* Otherwise drop handled components of the access.  */
+ 		  base = saved_base0;
+ 		}
+@@ -2442,15 +2448,22 @@
+ 		TREE_OPERAND (lhs, 0) = saved_lhs0;
+ 	    }
+ 	  /* Finally check if the lhs has the same address and size as the
+-	     base candidate of the access.  */
+-	  if (lhs == base
+-	      || (((TYPE_SIZE (TREE_TYPE (lhs))
+-		    == TYPE_SIZE (TREE_TYPE (base)))
+-		   || (TYPE_SIZE (TREE_TYPE (lhs))
+-		       && TYPE_SIZE (TREE_TYPE (base))
+-		       && operand_equal_p (TYPE_SIZE (TREE_TYPE (lhs)),
+-					   TYPE_SIZE (TREE_TYPE (base)), 0)))
+-		  && operand_equal_p (lhs, base, OEP_ADDRESS_OF)))
++	     base candidate of the access.  Watch out if we have dropped
++	     an array-ref that was at struct end, this means ref->ref may
++	     be outside of the TYPE_SIZE of its base.  */
++	  if ((! innermost_dropped_array_ref
++	       || ! array_at_struct_end_p (innermost_dropped_array_ref))
++	      && (lhs == base
++		  || (((TYPE_SIZE (TREE_TYPE (lhs))
++			== TYPE_SIZE (TREE_TYPE (base)))
++		       || (TYPE_SIZE (TREE_TYPE (lhs))
++			   && TYPE_SIZE (TREE_TYPE (base))
++			   && operand_equal_p (TYPE_SIZE (TREE_TYPE (lhs)),
++					       TYPE_SIZE (TREE_TYPE (base)),
++					       0)))
++		      && operand_equal_p (lhs, base,
++					  OEP_ADDRESS_OF
++					  | OEP_MATCH_SIDE_EFFECTS))))
+ 	    return true;
+ 	}
+ 
+Index: gcc/dwarf2out.c
+===================================================================
+--- a/src/gcc/dwarf2out.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/dwarf2out.c	(.../branches/gcc-7-branch)
+@@ -26058,7 +26058,8 @@
+       j = 0;
+       FOR_EACH_VEC_ELT (*tmpl_value_parm_die_table, i, e)
+ 	{
+-	  if (!tree_add_const_value_attribute (e->die, e->arg))
++	  if (!e->die->removed
++	      && !tree_add_const_value_attribute (e->die, e->arg))
+ 	    {
+ 	      dw_loc_descr_ref loc = NULL;
+ 	      if (! early_dwarf
 Index: gcc/gimple-ssa-strength-reduction.c
 ===================================================================
 --- a/src/gcc/gimple-ssa-strength-reduction.c	(.../tags/gcc_7_2_0_release)
@@ -1045,6 +2407,57 @@ Index: gcc/fortran/trans-io.c
  
    if (ts->type == BT_CLASS)
      derived = ts->u.derived->components->ts.u.derived;
+Index: gcc/gimple-fold.c
+===================================================================
+--- a/src/gcc/gimple-fold.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/gimple-fold.c	(.../branches/gcc-7-branch)
+@@ -1236,7 +1236,7 @@
+ 		 the NUL.
+ 		 Set *FLEXP to true if the array whose bound is being
+ 		 used is at the end of a struct.  */
+-	      if (array_at_struct_end_p (arg, true))
++	      if (array_at_struct_end_p (arg))
+ 		*flexp = true;
+ 
+ 	      arg = TREE_OPERAND (arg, 1);
+Index: gcc/tree-ssa-pre.c
+===================================================================
+--- a/src/gcc/tree-ssa-pre.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/tree-ssa-pre.c	(.../branches/gcc-7-branch)
+@@ -2090,8 +2090,9 @@
+      ANTIC_OUT[BLOCK] = phi_translate (ANTIC_IN[succ(BLOCK)])
+ 
+    ANTIC_IN[BLOCK] = clean(ANTIC_OUT[BLOCK] U EXP_GEN[BLOCK] - TMP_GEN[BLOCK])
+-*/
+ 
++   Note that clean() is deferred until after the iteration.  */
++
+ static bool
+ compute_antic_aux (basic_block block, bool block_has_abnormal_pred_edge)
+ {
+@@ -2190,7 +2191,8 @@
+     bitmap_value_insert_into_set (ANTIC_IN (block),
+ 				  expression_for_id (bii));
+ 
+-  clean (ANTIC_IN (block));
++  /* clean (ANTIC_IN (block)) is defered to after the iteration converged
++     because it can cause non-convergence, see for example PR81181.  */
+ 
+   if (!was_visited || !bitmap_set_equal (old, ANTIC_IN (block)))
+     changed = true;
+@@ -2424,6 +2426,12 @@
+       gcc_checking_assert (num_iterations < 500);
+     }
+ 
++  /* We have to clean after the dataflow problem converged as cleaning
++     can cause non-convergence because it is based on expressions
++     rather than values.  */
++  FOR_EACH_BB_FN (block, cfun)
++    clean (ANTIC_IN (block));
++
+   statistics_histogram_event (cfun, "compute_antic iterations",
+ 			      num_iterations);
+ 
 Index: gcc/po/es.po
 ===================================================================
 --- a/src/gcc/po/es.po	(.../tags/gcc_7_2_0_release)
@@ -303149,7 +304562,17 @@ Index: gcc/config/i386/i386.c
 ===================================================================
 --- a/src/gcc/config/i386/i386.c	(.../tags/gcc_7_2_0_release)
 +++ b/src/gcc/config/i386/i386.c	(.../branches/gcc-7-branch)
-@@ -6288,12 +6288,6 @@
+@@ -85,6 +85,9 @@
+ #include "print-rtl.h"
+ #include "intl.h"
+ #include "ifcvt.h"
++#include "symbol-summary.h"
++#include "ipa-prop.h"
++#include "ipa-inline.h"
+ 
+ /* This file should be included last.  */
+ #include "target-def.h"
+@@ -6288,12 +6291,6 @@
    gcc_assert ((opts->x_target_flags & MASK_LONG_DOUBLE_64) == 0
  	      || (opts->x_target_flags & MASK_LONG_DOUBLE_128) == 0);
  
@@ -303162,7 +304585,7 @@ Index: gcc/config/i386/i386.c
    /* Handle stack protector */
    if (!opts_set->x_ix86_stack_protector_guard)
      opts->x_ix86_stack_protector_guard
-@@ -6314,6 +6308,12 @@
+@@ -6314,6 +6311,12 @@
        free (str);
      }
  
@@ -303175,6 +304598,52 @@ Index: gcc/config/i386/i386.c
    return true;
  }
  
+@@ -7114,7 +7117,14 @@
+       else if (caller_opts->tune != callee_opts->tune)
+ 	ret = false;
+ 
+-      else if (caller_opts->x_ix86_fpmath != callee_opts->x_ix86_fpmath)
++      else if (caller_opts->x_ix86_fpmath != callee_opts->x_ix86_fpmath
++	       /* If the calle doesn't use FP expressions differences in
++		  ix86_fpmath can be ignored.  We are called from FEs
++		  for multi-versioning call optimization, so beware of
++		  inline_summaries not available.  */
++	       && (! inline_summaries
++		   || inline_summaries->get
++			(cgraph_node::get (callee))->fp_expressions))
+ 	ret = false;
+ 
+       else if (caller_opts->branch_cost != callee_opts->branch_cost)
+Index: gcc/config/sol2.h
+===================================================================
+--- a/src/gcc/config/sol2.h	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/config/sol2.h	(.../branches/gcc-7-branch)
+@@ -174,9 +174,9 @@
+ 			    %{!ansi:values-Xa.o%s}"
+ 
+ #if defined(HAVE_LD_PIE) && defined(HAVE_SOLARIS_CRTS)
+-#define STARTFILE_CRTBEGIN_SPEC "%{shared:crtbeginS.o%s} \
+-				 %{" PIE_SPEC ":crtbeginS.o%s} \
+-				 %{" NO_PIE_SPEC ":crtbegin.o%s}"
++#define STARTFILE_CRTBEGIN_SPEC "%{static:crtbegin.o%s; \
++				   shared|" PIE_SPEC ":crtbeginS.o%s; \
++				   :crtbegin.o%s}"
+ #else
+ #define STARTFILE_CRTBEGIN_SPEC	"crtbegin.o%s"
+ #endif
+@@ -224,9 +224,9 @@
+ #endif
+ 
+ #if defined(HAVE_LD_PIE) && defined(HAVE_SOLARIS_CRTS)
+-#define ENDFILE_CRTEND_SPEC "%{shared:crtendS.o%s;: \
+-			       %{" PIE_SPEC ":crtendS.o%s} \
+-			       %{" NO_PIE_SPEC ":crtend.o%s}}"
++#define ENDFILE_CRTEND_SPEC "%{static:crtend.o%s; \
++			       shared|" PIE_SPEC ":crtendS.o%s; \
++			       :crtend.o%s}"
+ #else
+ #define ENDFILE_CRTEND_SPEC "crtend.o%s"
+ #endif
 Index: gcc/config/sh/sh-mem.cc
 ===================================================================
 --- a/src/gcc/config/sh/sh-mem.cc	(.../tags/gcc_7_2_0_release)
@@ -303290,6 +304759,72 @@ Index: gcc/config/avr/avr.c
      false },
    { "absdata",   0, 0, true, false, false,  avr_handle_absdata_attribute,
      false },
+Index: gcc/config/gnu-user.h
+===================================================================
+--- a/src/gcc/config/gnu-user.h	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/config/gnu-user.h	(.../branches/gcc-7-branch)
+@@ -50,11 +50,15 @@
+ 
+ #if defined HAVE_LD_PIE
+ #define GNU_USER_TARGET_STARTFILE_SPEC \
+-  "%{!shared: %{pg|p|profile:gcrt1.o%s;: \
+-    %{" PIE_SPEC ":Scrt1.o%s} %{" NO_PIE_SPEC ":crt1.o%s}}} \
+-   crti.o%s %{static:crtbeginT.o%s;: %{shared:crtbeginS.o%s} \
+-	      %{" PIE_SPEC ":crtbeginS.o%s} \
+-	      %{" NO_PIE_SPEC ":crtbegin.o%s}} \
++  "%{shared:; \
++     pg|p|profile:gcrt1.o%s; \
++     static:crt1.o%s; \
++     " PIE_SPEC ":Scrt1.o%s; \
++     :crt1.o%s} \
++   crti.o%s \
++   %{static:crtbeginT.o%s; \
++     shared|" PIE_SPEC ":crtbeginS.o%s; \
++     :crtbegin.o%s} \
+    %{fvtable-verify=none:%s; \
+      fvtable-verify=preinit:vtv_start_preinit.o%s; \
+      fvtable-verify=std:vtv_start.o%s} \
+@@ -61,8 +65,13 @@
+    " CRTOFFLOADBEGIN
+ #else
+ #define GNU_USER_TARGET_STARTFILE_SPEC \
+-  "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \
+-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \
++  "%{shared:; \
++     pg|p|profile:gcrt1.o%s; \
++     :crt1.o%s} \
++   crti.o%s \
++   %{static:crtbeginT.o%s; \
++     shared|pie:crtbeginS.o%s; \
++     :crtbegin.o%s} \
+    %{fvtable-verify=none:%s; \
+      fvtable-verify=preinit:vtv_start_preinit.o%s; \
+      fvtable-verify=std:vtv_start.o%s} \
+@@ -82,8 +91,10 @@
+   "%{fvtable-verify=none:%s; \
+      fvtable-verify=preinit:vtv_end_preinit.o%s; \
+      fvtable-verify=std:vtv_end.o%s} \
+-   %{shared:crtendS.o%s;: %{" PIE_SPEC ":crtendS.o%s} \
+-   %{" NO_PIE_SPEC ":crtend.o%s}} crtn.o%s \
++   %{static:crtend.o%s; \
++     shared|" PIE_SPEC ":crtendS.o%s; \
++     :crtend.o%s} \
++   crtn.o%s \
+    " CRTOFFLOADEND
+ #else
+ #define GNU_USER_TARGET_ENDFILE_SPEC \
+@@ -90,7 +101,10 @@
+   "%{fvtable-verify=none:%s; \
+      fvtable-verify=preinit:vtv_end_preinit.o%s; \
+      fvtable-verify=std:vtv_end.o%s} \
+-   %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s \
++   %{static:crtend.o%s; \
++     shared|pie:crtendS.o%s; \
++     :crtend.o%s} \
++   crtn.o%s \
+    " CRTOFFLOADEND
+ #endif
+ #undef  ENDFILE_SPEC
 Index: gcc/config/riscv/rtems.h
 ===================================================================
 --- a/src/gcc/config/riscv/rtems.h	(.../tags/gcc_7_2_0_release)
@@ -303665,3 +305200,315 @@ Index: gcc/config/rs6000/vsx.md
  ;; Peephole to catch memory to memory transfers for TImode if TImode landed in
  ;; VSX registers on a little endian system.  The vector types and IEEE 128-bit
  ;; floating point are handled by the more generic swap elimination pass.
+@@ -2017,6 +2049,80 @@
+ }
+   [(set_attr "type" "vecperm")])
+ 
++;; Combiner patterns to allow creating XXPERMDI's to access either double
++;; word element in a vector register.
++(define_insn "*vsx_concat_<mode>_1"
++  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSa>")
++	(vec_concat:VSX_D
++	 (vec_select:<VS_scalar>
++	  (match_operand:VSX_D 1 "gpc_reg_operand" "<VSa>")
++	  (parallel [(match_operand:QI 2 "const_0_to_1_operand" "n")]))
++	 (match_operand:<VS_scalar> 3 "gpc_reg_operand" "<VSa>")))]
++  "VECTOR_MEM_VSX_P (<MODE>mode)"
++{
++  HOST_WIDE_INT dword = INTVAL (operands[2]);
++  if (BYTES_BIG_ENDIAN)
++    {
++      operands[4] = GEN_INT (2*dword);
++      return "xxpermdi %x0,%x1,%x3,%4";
++    }
++  else
++    {
++      operands[4] = GEN_INT (!dword);
++      return "xxpermdi %x0,%x3,%x1,%4";
++    }
++}
++  [(set_attr "type" "vecperm")])
++
++(define_insn "*vsx_concat_<mode>_2"
++  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSa>")
++	(vec_concat:VSX_D
++	 (match_operand:<VS_scalar> 1 "gpc_reg_operand" "<VSa>")
++	 (vec_select:<VS_scalar>
++	  (match_operand:VSX_D 2 "gpc_reg_operand" "<VSa>")
++	  (parallel [(match_operand:QI 3 "const_0_to_1_operand" "n")]))))]
++  "VECTOR_MEM_VSX_P (<MODE>mode)"
++{
++  HOST_WIDE_INT dword = INTVAL (operands[3]);
++  if (BYTES_BIG_ENDIAN)
++    {
++      operands[4] = GEN_INT (dword);
++      return "xxpermdi %x0,%x1,%x2,%4";
++    }
++  else
++    {
++      operands[4] = GEN_INT (2 * !dword);
++      return "xxpermdi %x0,%x2,%x1,%4";
++    }
++}
++  [(set_attr "type" "vecperm")])
++
++(define_insn "*vsx_concat_<mode>_3"
++  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSa>")
++	(vec_concat:VSX_D
++	 (vec_select:<VS_scalar>
++	  (match_operand:VSX_D 1 "gpc_reg_operand" "<VSa>")
++	  (parallel [(match_operand:QI 2 "const_0_to_1_operand" "n")]))
++	 (vec_select:<VS_scalar>
++	  (match_operand:VSX_D 3 "gpc_reg_operand" "<VSa>")
++	  (parallel [(match_operand:QI 4 "const_0_to_1_operand" "n")]))))]
++  "VECTOR_MEM_VSX_P (<MODE>mode)"
++{
++  HOST_WIDE_INT dword1 = INTVAL (operands[2]);
++  HOST_WIDE_INT dword2 = INTVAL (operands[4]);
++  if (BYTES_BIG_ENDIAN)
++    {
++      operands[5] = GEN_INT ((2 * dword1) + dword2);
++      return "xxpermdi %x0,%x1,%x3,%5";
++    }
++  else
++    {
++      operands[5] = GEN_INT ((2 * !dword2) + !dword1);
++      return "xxpermdi %x0,%x3,%x1,%5";
++    }
++}
++  [(set_attr "type" "vecperm")])
++
+ ;; Special purpose concat using xxpermdi to glue two single precision values
+ ;; together, relying on the fact that internally scalar floats are represented
+ ;; as doubles.  This is used to initialize a V4SF vector with 4 floats
+@@ -2217,25 +2323,35 @@
+   DONE;
+ })
+ 
+-;; Set the element of a V2DI/VD2F mode
+-(define_insn "vsx_set_<mode>"
+-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?<VSa>")
+-	(unspec:VSX_D
+-	 [(match_operand:VSX_D 1 "vsx_register_operand" "wd,<VSa>")
+-	  (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")
+-	  (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
+-	 UNSPEC_VSX_SET))]
++;; Rewrite V2DF/V2DI set in terms of VEC_CONCAT
++(define_expand "vsx_set_<mode>"
++  [(use (match_operand:VSX_D 0 "vsx_register_operand"))
++   (use (match_operand:VSX_D 1 "vsx_register_operand"))
++   (use (match_operand:<VS_scalar> 2 "gpc_reg_operand"))
++   (use (match_operand:QI 3 "const_0_to_1_operand"))]
+   "VECTOR_MEM_VSX_P (<MODE>mode)"
+ {
+-  int idx_first = BYTES_BIG_ENDIAN ? 0 : 1;
+-  if (INTVAL (operands[3]) == idx_first)
+-    return \"xxpermdi %x0,%x2,%x1,1\";
+-  else if (INTVAL (operands[3]) == 1 - idx_first)
+-    return \"xxpermdi %x0,%x1,%x2,0\";
++  rtx dest = operands[0];
++  rtx vec_reg = operands[1];
++  rtx value = operands[2];
++  rtx ele = operands[3];
++  rtx tmp = gen_reg_rtx (<VS_scalar>mode);
++
++  if (ele == const0_rtx)
++    {
++      emit_insn (gen_vsx_extract_<mode> (tmp, vec_reg, const1_rtx));
++      emit_insn (gen_vsx_concat_<mode> (dest, value, tmp));
++      DONE;
++    }
++  else if (ele == const1_rtx)
++    {
++      emit_insn (gen_vsx_extract_<mode> (tmp, vec_reg, const0_rtx));
++      emit_insn (gen_vsx_concat_<mode> (dest, tmp, value));
++      DONE;
++    }
+   else
+     gcc_unreachable ();
+-}
+-  [(set_attr "type" "vecperm")])
++})
+ 
+ ;; Extract a DF/DI element from V2DF/V2DI
+ ;; Optimize cases were we can do a simple or direct move.
+Index: gcc/config/rs6000/sysv4.h
+===================================================================
+--- a/src/gcc/config/rs6000/sysv4.h	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/config/rs6000/sysv4.h	(.../branches/gcc-7-branch)
+@@ -757,24 +757,34 @@
+ #define CRTOFFLOADEND ""
+ #endif
+ 
+-#ifdef HAVE_LD_PIE
+-#define	STARTFILE_LINUX_SPEC "\
+-%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
+-%{mnewlib:ecrti.o%s;:crti.o%s} \
+-%{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \
+-" CRTOFFLOADBEGIN
+-#else
+-#define	STARTFILE_LINUX_SPEC "\
+-%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \
+-%{mnewlib:ecrti.o%s;:crti.o%s} \
+-%{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \
+-" CRTOFFLOADBEGIN
+-#endif
++/* STARTFILE_LINUX_SPEC should be the same as GNU_USER_TARGET_STARTFILE_SPEC
++   but with the mnewlib ecrti.o%s selection substituted for crti.o%s.  */
++#define	STARTFILE_LINUX_SPEC \
++  "%{shared:; \
++     pg|p|profile:gcrt1.o%s; \
++     static:crt1.o%s; \
++     " PIE_SPEC ":Scrt1.o%s; \
++     :crt1.o%s} \
++   %{mnewlib:ecrti.o%s;:crti.o%s} \
++   %{static:crtbeginT.o%s; \
++     shared|" PIE_SPEC ":crtbeginS.o%s; \
++     :crtbegin.o%s} \
++   %{fvtable-verify=none:%s; \
++     fvtable-verify=preinit:vtv_start_preinit.o%s; \
++     fvtable-verify=std:vtv_start.o%s} \
++   " CRTOFFLOADBEGIN
+ 
+-#define	ENDFILE_LINUX_SPEC "\
+-%{shared|pie:crtendS.o%s;:crtend.o%s} \
+-%{mnewlib:ecrtn.o%s;:crtn.o%s} \
+-" CRTOFFLOADEND
++/* ENDFILE_LINUX_SPEC should be the same as GNU_USER_TARGET_ENDFILE_SPEC
++   but with the mnewlib ecrtn.o%s selection substituted for crtn.o%s.  */
++#define ENDFILE_LINUX_SPEC \
++  "%{fvtable-verify=none:%s; \
++     fvtable-verify=preinit:vtv_end_preinit.o%s; \
++     fvtable-verify=std:vtv_end.o%s} \
++   %{static:crtend.o%s; \
++     shared|" PIE_SPEC ":crtendS.o%s; \
++     :crtend.o%s} \
++   %{mnewlib:ecrtn.o%s;:crtn.o%s} \
++   " CRTOFFLOADEND
+ 
+ #define LINK_START_LINUX_SPEC ""
+ 
+Index: gcc/tree-vect-slp.c
+===================================================================
+--- a/src/gcc/tree-vect-slp.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/tree-vect-slp.c	(.../branches/gcc-7-branch)
+@@ -905,14 +905,51 @@
+   return true;
+ }
+ 
+-/* Recursively build an SLP tree starting from NODE.
+-   Fail (and return a value not equal to zero) if def-stmts are not
+-   isomorphic, require data permutation or are of unsupported types of
+-   operation.  Otherwise, return 0.
+-   The value returned is the depth in the SLP tree where a mismatch
+-   was found.  */
++/* Traits for the hash_set to record failed SLP builds for a stmt set.
++   Note we never remove apart from at destruction time so we do not
++   need a special value for deleted that differs from empty.  */
++struct bst_traits
++{
++  typedef vec <gimple *> value_type;
++  typedef vec <gimple *> compare_type;
++  static inline hashval_t hash (value_type);
++  static inline bool equal (value_type existing, value_type candidate);
++  static inline bool is_empty (value_type x) { return !x.exists (); }
++  static inline bool is_deleted (value_type x) { return !x.exists (); }
++  static inline void mark_empty (value_type &x) { x.release (); }
++  static inline void mark_deleted (value_type &x) { x.release (); }
++  static inline void remove (value_type &x) { x.release (); }
++};
++inline hashval_t
++bst_traits::hash (value_type x)
++{
++  inchash::hash h;
++  for (unsigned i = 0; i < x.length (); ++i)
++    h.add_int (gimple_uid (x[i]));
++  return h.end ();
++}
++inline bool
++bst_traits::equal (value_type existing, value_type candidate)
++{
++  if (existing.length () != candidate.length ())
++    return false;
++  for (unsigned i = 0; i < existing.length (); ++i)
++    if (existing[i] != candidate[i])
++      return false;
++  return true;
++}
+ 
++static hash_set <vec <gimple *>, bst_traits> *bst_fail;
++
+ static slp_tree
++vect_build_slp_tree_2 (vec_info *vinfo,
++		       vec<gimple *> stmts, unsigned int group_size,
++		       unsigned int *max_nunits,
++		       vec<slp_tree> *loads,
++		       bool *matches, unsigned *npermutes, unsigned *tree_size,
++		       unsigned max_tree_size);
++
++static slp_tree
+ vect_build_slp_tree (vec_info *vinfo,
+                      vec<gimple *> stmts, unsigned int group_size,
+                      unsigned int *max_nunits,
+@@ -920,6 +957,39 @@
+ 		     bool *matches, unsigned *npermutes, unsigned *tree_size,
+ 		     unsigned max_tree_size)
+ {
++  if (bst_fail->contains (stmts))
++    return NULL;
++  slp_tree res = vect_build_slp_tree_2 (vinfo, stmts, group_size, max_nunits,
++					loads, matches, npermutes, tree_size,
++					max_tree_size);
++  /* When SLP build fails for stmts record this, otherwise SLP build
++     can be exponential in time when we allow to construct parts from
++     scalars, see PR81723.  */
++  if (! res)
++    {
++      vec <gimple *> x;
++      x.create (stmts.length ());
++      x.splice (stmts);
++      bst_fail->add (x);
++    }
++  return res;
++}
++
++/* Recursively build an SLP tree starting from NODE.
++   Fail (and return a value not equal to zero) if def-stmts are not
++   isomorphic, require data permutation or are of unsupported types of
++   operation.  Otherwise, return 0.
++   The value returned is the depth in the SLP tree where a mismatch
++   was found.  */
++
++static slp_tree
++vect_build_slp_tree_2 (vec_info *vinfo,
++		       vec<gimple *> stmts, unsigned int group_size,
++		       unsigned int *max_nunits,
++		       vec<slp_tree> *loads,
++		       bool *matches, unsigned *npermutes, unsigned *tree_size,
++		       unsigned max_tree_size)
++{
+   unsigned nops, i, this_tree_size = 0, this_max_nunits = *max_nunits;
+   gimple *stmt;
+   slp_tree node;
+@@ -979,6 +1049,9 @@
+ 
+   stmt = stmts[0];
+ 
++  if (tree_size)
++    max_tree_size -= *tree_size;
++
+   /* Create SLP_TREE nodes for the definition node/s.  */
+   FOR_EACH_VEC_ELT (oprnds_info, i, oprnd_info)
+     {
+@@ -1874,9 +1947,11 @@
+   /* Build the tree for the SLP instance.  */
+   bool *matches = XALLOCAVEC (bool, group_size);
+   unsigned npermutes = 0;
++  bst_fail = new hash_set <vec <gimple *>, bst_traits> ();
+   node = vect_build_slp_tree (vinfo, scalar_stmts, group_size,
+ 				   &max_nunits, &loads, matches, &npermutes,
+ 			      NULL, max_tree_size);
++  delete bst_fail;
+   if (node != NULL)
+     {
+       /* Calculate the unrolling factor based on the smallest type.  */
diff --git a/debian/rules.patch b/debian/rules.patch
index 4a4330a..db21e02 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -71,7 +71,6 @@ debian_patches += \
 	gcc-foffload-default \
 	gcc-fuse-ld-lld \
 	libgo-s390x-default-isa \
-	pr81723 \
 	pr81829 \
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/gcc-7.git



More information about the Reproducible-commits mailing list