[gcc-7] 262/354: * GCC 7.2 release candidate 1. * Update to SVN 20170803 (r250853) from the gcc-7-branch.

Ximin Luo infinity0 at debian.org
Thu Nov 23 15:51:04 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 93dfc42a8649247b09ea56a7803747386d01369b
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Thu Aug 3 13:46:18 2017 +0000

      * GCC 7.2 release candidate 1.
      * Update to SVN 20170803 (r250853) from the gcc-7-branch.
    
    
    git-svn-id: svn+ssh://svn.debian.org/svn/gcccvs/branches/sid/gcc-7@9601 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
 debian/changelog                |   7 +
 debian/patches/svn-updates.diff | 983 +++++++++++++++++++++++++++++++++++++++-
 debian/rules.defs               |   2 +-
 3 files changed, 968 insertions(+), 24 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3ae1b1e..ca15f66 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+gcc-7 (7.1.0-12) UNRELEASED; urgency=medium
+
+  * GCC 7.2 release candidate 1.
+  * Update to SVN 20170803 (r250853) from the gcc-7-branch.
+
+ -- Matthias Klose <doko at debian.org>  Thu, 03 Aug 2017 09:20:48 -0400
+
 gcc-7 (7.1.0-11) unstable; urgency=medium
 
   * Update to SVN 20170731 (r250749) from the gcc-7-branch.
diff --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff
index ef2b8ec..0dfec84 100644
--- a/debian/patches/svn-updates.diff
+++ b/debian/patches/svn-updates.diff
@@ -1,10 +1,10 @@
-# DP: updates from the 7 branch upto 20170731 (r250749).
+# DP: updates from the 7 branch upto 20170803 (r250853).
 
 last_update()
 {
 	cat > ${dir}LAST_UPDATED <EOF
-Mon Jul 31 19:33:17 CEST 2017
-Mon Jul 31 17:33:17 UTC 2017 (revision 250749)
+Thu Aug  3 15:18:51 CEST 2017
+Thu Aug  3 13:18:51 UTC 2017 (revision 250853)
 EOF
 }
 
@@ -6317,7 +6317,144 @@ Index: gcc/DATESTAMP
 +++ b/src/gcc/DATESTAMP	(.../branches/gcc-7-branch)
 @@ -1 +1 @@
 -20170502
-+20170731
++20170803
+Index: gcc/tree-ssa-strlen.c
+===================================================================
+--- a/src/gcc/tree-ssa-strlen.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/tree-ssa-strlen.c	(.../branches/gcc-7-branch)
+@@ -61,7 +61,13 @@
+   tree length;
+   /* Any of the corresponding pointers for querying alias oracle.  */
+   tree ptr;
+-  /* Statement for delayed length computation.  */
++  /* This is used for two things:
++
++     - To record the statement that should be used for delayed length
++       computations.  We maintain the invariant that all related strinfos
++       have delayed lengths or none do.
++
++     - To record the malloc or calloc call that produced this result.  */
+   gimple *stmt;
+   /* Pointer to '\0' if known, if NULL, it can be computed as
+      ptr + length.  */
+@@ -156,6 +162,19 @@
+   return (*stridx_to_strinfo)[idx];
+ }
+ 
++/* Get the next strinfo in the chain after SI, or null if none.  */
++
++static inline strinfo *
++get_next_strinfo (strinfo *si)
++{
++  if (si->next == 0)
++    return NULL;
++  strinfo *nextsi = get_strinfo (si->next);
++  if (nextsi == NULL || nextsi->first != si->first || nextsi->prev != si->idx)
++    return NULL;
++  return nextsi;
++}
++
+ /* Helper function for get_stridx.  */
+ 
+ static int
+@@ -438,6 +457,45 @@
+   (*stridx_to_strinfo)[idx] = si;
+ }
+ 
++/* Return the first strinfo in the related strinfo chain
++   if all strinfos in between belong to the chain, otherwise NULL.  */
++
++static strinfo *
++verify_related_strinfos (strinfo *origsi)
++{
++  strinfo *si = origsi, *psi;
++
++  if (origsi->first == 0)
++    return NULL;
++  for (; si->prev; si = psi)
++    {
++      if (si->first != origsi->first)
++	return NULL;
++      psi = get_strinfo (si->prev);
++      if (psi == NULL)
++	return NULL;
++      if (psi->next != si->idx)
++	return NULL;
++    }
++  if (si->idx != si->first)
++    return NULL;
++  return si;
++}
++
++/* Set SI's endptr to ENDPTR and compute its length based on SI->ptr.
++   Use LOC for folding.  */
++
++static void
++set_endptr_and_length (location_t loc, strinfo *si, tree endptr)
++{
++  si->endptr = endptr;
++  si->stmt = NULL;
++  tree start_as_size = fold_convert_loc (loc, size_type_node, si->ptr);
++  tree end_as_size = fold_convert_loc (loc, size_type_node, endptr);
++  si->length = fold_build2_loc (loc, MINUS_EXPR, size_type_node,
++				end_as_size, start_as_size);
++}
++
+ /* Return string length, or NULL if it can't be computed.  */
+ 
+ static tree
+@@ -533,12 +591,12 @@
+ 	case BUILT_IN_STPCPY_CHK_CHKP:
+ 	  gcc_assert (lhs != NULL_TREE);
+ 	  loc = gimple_location (stmt);
+-	  si->endptr = lhs;
+-	  si->stmt = NULL;
+-	  lhs = fold_convert_loc (loc, size_type_node, lhs);
+-	  si->length = fold_convert_loc (loc, size_type_node, si->ptr);
+-	  si->length = fold_build2_loc (loc, MINUS_EXPR, size_type_node,
+-					lhs, si->length);
++	  set_endptr_and_length (loc, si, lhs);
++	  for (strinfo *chainsi = verify_related_strinfos (si);
++	       chainsi != NULL;
++	       chainsi = get_next_strinfo (chainsi))
++	    if (chainsi->length == NULL)
++	      set_endptr_and_length (loc, chainsi, lhs);
+ 	  break;
+ 	case BUILT_IN_MALLOC:
+ 	  break;
+@@ -607,32 +665,6 @@
+   return nsi;
+ }
+ 
+-/* Return first strinfo in the related strinfo chain
+-   if all strinfos in between belong to the chain, otherwise
+-   NULL.  */
+-
+-static strinfo *
+-verify_related_strinfos (strinfo *origsi)
+-{
+-  strinfo *si = origsi, *psi;
+-
+-  if (origsi->first == 0)
+-    return NULL;
+-  for (; si->prev; si = psi)
+-    {
+-      if (si->first != origsi->first)
+-	return NULL;
+-      psi = get_strinfo (si->prev);
+-      if (psi == NULL)
+-	return NULL;
+-      if (psi->next != si->idx)
+-	return NULL;
+-    }
+-  if (si->idx != si->first)
+-    return NULL;
+-  return si;
+-}
+-
+ /* Attempt to create a new strinfo for BASESI + OFF, or find existing
+    strinfo if there is any.  Return it's idx, or 0 if no strinfo has
+    been created.  */
 Index: gcc/configure
 ===================================================================
 --- a/src/gcc/configure	(.../tags/gcc_7_1_0_release)
@@ -6508,6 +6645,25 @@ Index: gcc/gcov.c
 ===================================================================
 --- a/src/gcc/gcov.c	(.../tags/gcc_7_1_0_release)
 +++ b/src/gcc/gcov.c	(.../branches/gcc-7-branch)
+@@ -499,13 +499,13 @@
+   unsigned index = it - blocked.begin ();
+   blocked.erase (it);
+ 
+-  for (block_vector_t::iterator it2 = block_lists[index].begin ();
+-       it2 != block_lists[index].end (); it2++)
+-    unblock (*it2, blocked, block_lists);
+-  for (unsigned j = 0; j < block_lists[index].size (); j++)
+-    unblock (u, blocked, block_lists);
++  block_vector_t to_unblock (block_lists[index]);
+ 
+   block_lists.erase (block_lists.begin () + index);
++
++  for (block_vector_t::iterator it = to_unblock.begin ();
++       it != to_unblock.end (); it++)
++    unblock (*it, blocked, block_lists);
+ }
+ 
+ /* Find circuit going to block V, PATH is provisional seen cycle.
 @@ -655,7 +655,6 @@
  
    fnotice (file, "Usage: gcov [OPTION...] SOURCE|OBJ...\n\n");
@@ -6744,7 +6900,69 @@ Index: gcc/ChangeLog
 ===================================================================
 --- a/src/gcc/ChangeLog	(.../tags/gcc_7_1_0_release)
 +++ b/src/gcc/ChangeLog	(.../branches/gcc-7-branch)
-@@ -1,3 +1,1480 @@
+@@ -1,3 +1,1542 @@
++2017-08-02  Jakub Jelinek  <jakub at redhat.com>
++
++	PR middle-end/79499
++	* function.c (thread_prologue_and_epilogue_insns): Determine blocks
++	for find_many_sub_basic_blocks bitmap by looking up BLOCK_FOR_INSN
++	of first NONDEBUG_INSN_P in each of the split_prologue_seq and
++	prologue_seq sequences - if any.
++
++2017-08-01  Uros Bizjak  <ubizjak at gmail.com>
++
++	PR target/81641
++	* config/i386/i386.c (ix86_print_operand_address_as): For -masm=intel
++	print "ds:" only for immediates in generic address space.
++
++2017-08-01  Jakub Jelinek  <jakub at redhat.com>
++
++	PR target/81622
++	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
++	__builtin_vec_cmpne verify both arguments are compatible vectors
++	before looking at TYPE_MODE on the element type.  For __builtin_vec_ld
++	verify arg1_type is a pointer or array type.  For __builtin_vec_st,
++	move computation of aligned to after checking the argument types.
++	Formatting fixes.
++
++2017-08-01  Martin Liska  <mliska at suse.cz>
++
++	Backport from mainline
++	2017-07-26  Martin Liska  <mliska at suse.cz>
++
++	PR gcov-profile/81561
++	* gcov.c (unblock): Make unblocking safe as we need to preserve
++	index correspondence of blocks and block_lists.
++
++2017-08-01  Richard Biener  <rguenther at suse.de>
++
++	PR tree-optimization/71752
++	PR tree-optimization/81633
++	* tree-vect-slp.c (vect_get_slp_defs): Handle null operands
++	in the original suggested way.
++
++2017-08-01  Richard Sandiford  <richard.sandiford at linaro.org>
++
++	PR tree-optimization/80769
++	* tree-ssa-strlen.c (strinfo): Document that "stmt" is also used
++	for malloc and calloc.  Document the new invariant that all related
++	strinfos have delayed lengths or none do.
++	(get_next_strinfo): New function.
++	(verify_related_strinfos): Move earlier in file.
++	(set_endptr_and_length): New function, split out from...
++	(get_string_length): ...here.  Also set the lengths of related
++	strinfos.
++
++2017-08-01  Jakub Jelinek  <jakub at redhat.com>
++
++	PR tree-optimization/81588
++	* tree-ssa-reassoc.c (optimize_range_tests_var_bound): If
++	ranges[i].in_p, invert comparison code ccode.  For >/>=,
++	swap rhs1 and rhs2 and comparison code unconditionally,
++	for </<= don't do that.  Don't swap rhs1/rhs2 again if
++	ranges[i].in_p, instead invert comparison code ccode if
++	opcode or oe->rank is BIT_IOR_EXPR.
++
 +2017-07-31  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
 +
 +	Backport from mainline
@@ -8225,7 +8443,7 @@ Index: gcc/ChangeLog
  2017-05-02  Release Manager
  
  	* GCC 7.1.0 released.
-@@ -110,9 +1591,9 @@
+@@ -110,9 +1653,9 @@
  	Backport from mainline
  	2017-04-25  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
  
@@ -8238,7 +8456,7 @@ Index: gcc/ChangeLog
  
  2017-04-25  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
  
-@@ -119,11 +1600,11 @@
+@@ -119,11 +1662,11 @@
  	Backport from mainline
  	2017-04-25  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
  
@@ -8255,7 +8473,7 @@ Index: gcc/ChangeLog
  
  2017-04-25  Dominik Vogt  <vogt at linux.vnet.ibm.com>
  
-@@ -130,30 +1611,30 @@
+@@ -130,30 +1673,30 @@
  	Backport from maineline
  	2017-04-25  Dominik Vogt  <vogt at linux.vnet.ibm.com>
  
@@ -8310,7 +8528,7 @@ Index: gcc/ChangeLog
  
  2017-04-25  Dominik Vogt  <vogt at linux.vnet.ibm.com>
  
-@@ -160,8 +1641,8 @@
+@@ -160,8 +1703,8 @@
  	Backport from mainline
  	2017-04-25  Dominik Vogt  <vogt at linux.vnet.ibm.com>
  
@@ -8321,7 +8539,7 @@ Index: gcc/ChangeLog
  
  
  2017-04-25  Dominik Vogt  <vogt at linux.vnet.ibm.com>
-@@ -169,8 +1650,8 @@
+@@ -169,8 +1712,8 @@
  	Backport from mainline
  	2017-04-25  Dominik Vogt  <vogt at linux.vnet.ibm.com>
  
@@ -8332,7 +8550,7 @@ Index: gcc/ChangeLog
  
  2017-04-25  Jakub Jelinek  <jakub at redhat.com>
  
-@@ -229,7 +1710,7 @@
+@@ -229,7 +1772,7 @@
  	(build_array_type): Likewise.  Add typeless_storage argument.
  
  2017-04-19  Eric Botcazou  <ebotcazou at adacore.com>
@@ -8341,7 +8559,7 @@ Index: gcc/ChangeLog
  
  	PR tree-optimization/80426
  	* tree-vrp.c (extract_range_from_binary_expr_1): For an additive
-@@ -271,7 +1752,7 @@
+@@ -271,7 +1814,7 @@
  	are only used in debug insns.
  
  2017-04-19  Eric Botcazou  <ebotcazou at adacore.com>
@@ -9481,6 +9699,24 @@ Index: gcc/testsuite/gcc.target/powerpc/pr80510-2.c
 +/* { dg-final { scan-assembler     {\mstxsspx\M} } } */
 +/* { dg-final { scan-assembler-not {\mmfvsrd\M}  } } */
 +/* { dg-final { scan-assembler-not {\mmfvsrwz\M} } } */
+Index: gcc/testsuite/gcc.target/powerpc/pr81622.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/powerpc/pr81622.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/powerpc/pr81622.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,13 @@
++/* PR target/81622 */
++/* { dg-do compile { target { powerpc*-*-linux* } } } */
++/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
++/* { dg-require-effective-target powerpc_p9vector_ok } */
++/* { dg-options "-mcpu=power9 -O2" } */
++
++void
++foo (void)
++{
++  __builtin_vec_ld (1, 2);	/* { dg-error "invalid parameter combination" } */
++  __builtin_vec_cmpne (1, 2);	/* { dg-error "invalid parameter combination" } */
++  __builtin_vec_st (1, 0, 5);	/* { dg-error "invalid parameter combination" } */
++}
 Index: gcc/testsuite/gcc.target/powerpc/stack-limit.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.target/powerpc/stack-limit.c	(.../tags/gcc_7_1_0_release)
@@ -11278,6 +11514,22 @@ Index: gcc/testsuite/gcc.target/i386/pr81294-2.c
 +
 +  return 0;
 +}
+Index: gcc/testsuite/gcc.target/i386/pr81641.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/pr81641.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/i386/pr81641.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,11 @@
++/* PR target/81641 */
++/* { dg-do assemble } */
++/* { dg-options "-O -masm=intel" } */
++/* { dg-require-effective-target masm_intel } */
++
++int test(void)
++{
++  int __seg_fs *f = (int __seg_fs *)16;
++  int __seg_gs *g = (int __seg_gs *)16;
++  return *f + *g;
++}
 Index: gcc/testsuite/gcc.target/i386/pr81300.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.target/i386/pr81300.c	(.../tags/gcc_7_1_0_release)
@@ -11351,6 +11603,19 @@ Index: gcc/testsuite/gcc.target/i386/pr59874-2.c
 -  return x ? __builtin_clz (x) : 16U;
 +  return x ? __builtin_clzs (x) : 16U;
  }
+Index: gcc/testsuite/gcc.target/i386/funcspec-56.inc
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/funcspec-56.inc	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/i386/funcspec-56.inc	(.../branches/gcc-7-branch)
+@@ -99,7 +99,7 @@
+ extern void test_no_pclmul (void)		__attribute__((__target__("no-pclmul")));
+ extern void test_no_sse2 (void)			__attribute__((__target__("no-sse2")));
+ extern void test_no_sse (void)			__attribute__((__target__("no-sse")));
+-extern void test_no_3dnowa (void)		__attribute__((__target__("3dnowa")));
++extern void test_no_3dnowa (void)		__attribute__((__target__("no-3dnowa")));
+ extern void test_no_3dnow (void)		__attribute__((__target__("no-3dnow")));
+ extern void test_no_mmx (void)			__attribute__((__target__("no-mmx")));
+ extern void test_no_rtm (void)			__attribute__((__target__("no-rtm")));
 Index: gcc/testsuite/gcc.target/i386/pr81375.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.target/i386/pr81375.c	(.../tags/gcc_7_1_0_release)
@@ -11947,6 +12212,56 @@ Index: gcc/testsuite/gcc.c-torture/execute/pr81555.c
 +    __builtin_abort ();
 +  return 0;
 +}
+Index: gcc/testsuite/gcc.c-torture/execute/pr81588.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.c-torture/execute/pr81588.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.c-torture/execute/pr81588.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,45 @@
++/* PR tree-optimization/81588 */
++
++__attribute__((noinline, noclone)) int
++bar (int x)
++{
++  __asm volatile ("" : : "g" (x) : "memory");
++}
++
++__attribute__((noinline, noclone)) int
++foo (unsigned x, long long y)
++{
++  if (y < 0)
++    return 0;
++  if (y < (long long) (4 * x))
++    {
++      bar (y);
++      return 1;
++    }
++  return 0;
++}     
++
++int
++main ()
++{
++  volatile unsigned x = 10;
++  volatile long long y = -10000;
++  if (foo (x, y) != 0)
++    __builtin_abort ();
++  y = -1;
++  if (foo (x, y) != 0)
++    __builtin_abort ();
++  y = 0;
++  if (foo (x, y) != 1)
++    __builtin_abort ();
++  y = 39;
++  if (foo (x, y) != 1)
++    __builtin_abort ();
++  y = 40;
++  if (foo (x, y) != 0)
++    __builtin_abort ();
++  y = 10000;
++  if (foo (x, y) != 0)
++    __builtin_abort ();
++  return 0;
++}
 Index: gcc/testsuite/gcc.c-torture/execute/pr81556.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.c-torture/execute/pr81556.c	(.../tags/gcc_7_1_0_release)
@@ -12082,6 +12397,20 @@ Index: gcc/testsuite/gcc.dg/pr80468.c
 +  __attribute__ ((__vector_size__ (4 * sizeof (unsigned)))) __int128 b;	/* { dg-error "is not supported on this target" } */
 +  0 != b;
 +}
+Index: gcc/testsuite/gcc.dg/strlenopt-31g.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/strlenopt-31g.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.dg/strlenopt-31g.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,9 @@
++/* { dg-do run { target *-*-linux* *-*-gnu* } } */
++/* { dg-options "-O2 -fdump-tree-strlen" } */
++
++#define USE_GNU
++#include "strlenopt-31.c"
++
++/* { dg-final { scan-tree-dump-times "stpcpy \\(" 1 "strlen" } } */
++/* { dg-final { scan-tree-dump-times "memcpy \\(" 2 "strlen" } } */
++/* { dg-final { scan-tree-dump-not "strlen \\(" "strlen" } } */
 Index: gcc/testsuite/gcc.dg/ubsan/pr81162.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.dg/ubsan/pr81162.c	(.../tags/gcc_7_1_0_release)
@@ -12126,6 +12455,36 @@ Index: gcc/testsuite/gcc.dg/ubsan/pr81505.c
 +      l |= i[0][b];
 +  c = l;
 +}
+Index: gcc/testsuite/gcc.dg/strlenopt-31.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/strlenopt-31.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.dg/strlenopt-31.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,25 @@
++/* { dg-do run } */
++/* { dg-options "-O2" } */
++
++#include "strlenopt.h"
++
++__attribute__((noinline, noclone)) int
++bar (char *p1, const char *q)
++{
++  strcpy (p1, "abcde");
++  char *p2 = strchr (p1, '\0');
++  strcpy (p2, q);
++  char *p3 = strchr (p2, '\0');
++  memcpy (p3, "x", 2);
++  return strlen (p1);
++}
++
++int
++main (void)
++{
++  char buffer[10];
++  int res = bar (buffer, "foo");
++  if (strcmp (buffer, "abcdefoox") != 0 || res != 9)
++    abort ();
++  return 0;
++}
 Index: gcc/testsuite/gcc.dg/asan/use-after-scope-switch-4.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.dg/asan/use-after-scope-switch-4.c	(.../tags/gcc_7_1_0_release)
@@ -12270,6 +12629,55 @@ Index: gcc/testsuite/gcc.dg/graphite/pr80906.c
 +}
 +
 +/* { dg-final { scan-tree-dump "isl AST to Gimple succeeded" "graphite" } } */
+Index: gcc/testsuite/gcc.dg/pr81588.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/pr81588.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.dg/pr81588.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,26 @@
++/* PR tree-optimization/81588 */
++/* { dg-do run } */
++/* { dg-options "-O2" } */
++
++long long int a = 5011877430933453486LL, c = 1;
++unsigned short b = 24847;
++
++#include "tree-ssa/pr81588.c"
++
++int
++main ()
++{
++  foo ();
++  if (c != 0)
++    __builtin_abort ();
++  a = 24846;
++  c = 1;
++  foo ();
++  if (c != 1)
++    __builtin_abort ();
++  a = -5;
++  foo ();
++  if (c != 0)
++    __builtin_abort ();
++  return 0;
++}
+Index: gcc/testsuite/gcc.dg/pr79499.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/pr79499.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.dg/pr79499.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,13 @@
++/* PR middle-end/79499 */
++/* { dg-do compile { target split_stack } } */
++/* { dg-options "-O2 -fsplit-stack -fno-omit-frame-pointer" } */
++
++struct S { struct S *a, *b; };
++
++void
++foo (struct S *x)
++{
++  do
++    x->b = x->a;
++  while (x = x->a);
++}
 Index: gcc/testsuite/gcc.dg/pr81192.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.dg/pr81192.c	(.../tags/gcc_7_1_0_release)
@@ -12539,6 +12947,27 @@ Index: gcc/testsuite/gcc.dg/tree-ssa/pr81388-1.c
 +}
 +
 +/* { dg-final { scan-tree-dump " zero if " "ivcanon" } } */
+Index: gcc/testsuite/gcc.dg/tree-ssa/pr81588.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/tree-ssa/pr81588.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.dg/tree-ssa/pr81588.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,16 @@
++/* PR tree-optimization/81588 */
++/* { dg-do compile { target { ! "m68k*-*-* mmix*-*-* bfin*-*-* v850*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* nios2*-*-*" } } } */
++/* { dg-options "-O2 -fdump-tree-reassoc1-details" } */
++/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
++
++extern long long int a, c;
++extern unsigned short b;
++
++/* { dg-final { scan-tree-dump-times "Optimizing range test \[^\n\r]* and comparison" 1 "reassoc1" } } */
++
++__attribute__((noinline, noclone)) void
++foo (void)
++{
++  if ((b > a) != (1 + (a < 0)))
++    c = 0;
++}
 Index: gcc/testsuite/gcc.dg/tree-ssa/pr81388-2.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.dg/tree-ssa/pr81388-2.c	(.../tags/gcc_7_1_0_release)
@@ -12701,6 +13130,44 @@ Index: gcc/testsuite/gcc.dg/vect/bb-slp-pr80705.c
 +
 +/* { dg-final { scan-tree-dump "base object not addressable" "slp1" } } */
 +/* { dg-final { scan-tree-dump-not "MEM\[^\r\n\]*__gcov\[^\r\n\]* = vect_cst" "slp1" } } */
+Index: gcc/testsuite/gcc.dg/vect/pr81633.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/vect/pr81633.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.dg/vect/pr81633.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,33 @@
++/* { dg-do run } */
++
++static double identity[4][4] = {{1, 0, 0, 0},
++                                {0, 1, 0, 0},
++                                {0, 0, 1, 0},
++                                {0, 0, 0, 1}};
++static double expected[4][4] = {{1, 0, 0, 0},
++                                {0, 0, 0, 0},
++                                {0, 0, 0, 0},
++                                {0, 0, 0, 0}};
++
++static void __attribute__((noinline,noclone))
++kernel(double A[4][4])
++{
++  double tmp[4][4];
++  for (int j = 0; j < 4; j++)
++    for (int k = 0; k < 4; k++)
++      tmp[j][k] = identity[j][0] * identity[j][k];
++  for (int j = 0; j < 4; j++ )
++    for (int k = 0; k < 4; k++)
++      A[j][k] = tmp[j][k];
++}
++
++int main(void)
++{
++  double A[4][4] = {{0.0}};
++  kernel(A);
++  for ( int i = 0; i < 4; i++ )
++    for ( int j = 0; j < 4; j++ )
++      if (A[i][j] != expected[i][j])
++	__builtin_abort ();
++  return 0;
++}
 Index: gcc/testsuite/gcc.dg/pr81455.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.dg/pr81455.c	(.../tags/gcc_7_1_0_release)
@@ -12746,7 +13213,51 @@ Index: gcc/testsuite/ChangeLog
 ===================================================================
 --- a/src/gcc/testsuite/ChangeLog	(.../tags/gcc_7_1_0_release)
 +++ b/src/gcc/testsuite/ChangeLog	(.../branches/gcc-7-branch)
-@@ -1,3 +1,690 @@
+@@ -1,3 +1,734 @@
++2017-08-02  Uros Bizjak  <ubizjak at gmail.com>
++
++	* gcc.target/i386/funcspec-56.inc (no_3dnowa): Properly
++	test "no-3dnowa" target attribute.
++
++2017-08-02  Jakub Jelinek  <jakub at redhat.com>
++
++	PR tree-optimization/81655
++	PR tree-optimization/81588
++	* gcc.dg/tree-ssa/pr81588.c: Use -mbranch-cost=2 where possible,
++	don't run the test on branch-cost=1 targets.
++
++	PR middle-end/79499
++	* gcc.dg/pr79499.c: New test.
++
++2017-08-01  Uros Bizjak  <ubizjak at gmail.com>
++
++	PR target/81641
++	* gcc.target/i386/pr81641.c: New test.
++
++2017-08-01  Jakub Jelinek  <jakub at redhat.com>
++
++	PR target/81622
++	* gcc.target/powerpc/pr81622.c: New test.
++
++2017-08-01  Richard Biener  <rguenther at suse.de>
++
++	PR tree-optimization/71752
++	PR tree-optimization/81633
++	* gcc.dg/vect/pr81633.c: New testcase.
++
++2017-08-01  Richard Sandiford  <richard.sandiford at linaro.org>
++
++	PR tree-optimization/80769
++	* gcc.dg/strlenopt-31.c: New test.
++	* gcc.dg/strlenopt-31g.c: Likewise.
++
++2017-08-01  Jakub Jelinek  <jakub at redhat.com>
++
++	PR tree-optimization/81588
++	* gcc.dg/tree-ssa/pr81588.c: New test.
++	* gcc.dg/pr81588.c: New test.
++	* gcc.c-torture/execute/pr81588.c: New test.
++
 +2017-07-31  Jakub Jelinek  <jakub at redhat.com>
 +
 +	PR sanitizer/81604
@@ -13437,7 +13948,7 @@ Index: gcc/testsuite/ChangeLog
  2017-05-02  Release Manager
  
  	* GCC 7.1.0 released.
-@@ -52,8 +739,8 @@
+@@ -52,8 +783,8 @@
  	Backport from mainline
  	2017-04-25  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
  
@@ -13448,7 +13959,7 @@ Index: gcc/testsuite/ChangeLog
  
  2017-04-25  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
  
-@@ -60,8 +747,8 @@
+@@ -60,8 +791,8 @@
  	Backport from mainline
  	2017-04-25  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
  
@@ -13459,7 +13970,7 @@ Index: gcc/testsuite/ChangeLog
  
  2017-04-25  Dominik Vogt  <vogt at linux.vnet.ibm.com>
  
-@@ -68,10 +755,10 @@
+@@ -68,10 +799,10 @@
  	Backport from maineline
  	2017-04-25  Dominik Vogt  <vogt at linux.vnet.ibm.com>
  
@@ -13474,7 +13985,7 @@ Index: gcc/testsuite/ChangeLog
  
  2017-04-25  Jakub Jelinek  <jakub at redhat.com>
  
-@@ -132,7 +819,7 @@
+@@ -132,7 +863,7 @@
  	* gcc.dg/torture/pr80341.c: Require int32plus.
  
  2017-04-19  Eric Botcazou  <ebotcazou at adacore.com>
@@ -16639,6 +17150,71 @@ Index: gcc/go/ChangeLog
  2017-05-02  Release Manager
  
  	* GCC 7.1.0 released.
+Index: gcc/go/gofrontend/gogo.cc
+===================================================================
+--- a/src/gcc/go/gofrontend/gogo.cc	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/go/gofrontend/gogo.cc	(.../branches/gcc-7-branch)
+@@ -2973,26 +2973,53 @@
+ 
+     case Type::TYPE_NAMED:
+       {
+-	// We have to finalize the methods of the real type first.
+-	// But if the real type is a struct type, then we only want to
+-	// finalize the methods of the field types, not of the struct
+-	// type itself.  We don't want to add methods to the struct,
+-	// since it has a name.
+ 	Named_type* nt = t->named_type();
+ 	Type* rt = nt->real_type();
+ 	if (rt->classification() != Type::TYPE_STRUCT)
+ 	  {
++	    // Finalize the methods of the real type first.
+ 	    if (Type::traverse(rt, this) == TRAVERSE_EXIT)
+ 	      return TRAVERSE_EXIT;
++
++	    // Finalize the methods of this type.
++	    nt->finalize_methods(this->gogo_);
+ 	  }
+ 	else
+ 	  {
++	    // We don't want to finalize the methods of a named struct
++	    // type, as the methods should be attached to the named
++	    // type, not the struct type.  We just want to finalize
++	    // the field types.
++	    //
++	    // It is possible that a field type refers indirectly to
++	    // this type, such as via a field with function type with
++	    // an argument or result whose type is this type.  To
++	    // avoid the cycle, first finalize the methods of any
++	    // embedded types, which are the only types we need to
++	    // know to finalize the methods of this type.
++	    const Struct_field_list* fields = rt->struct_type()->fields();
++	    if (fields != NULL)
++	      {
++		for (Struct_field_list::const_iterator pf = fields->begin();
++		     pf != fields->end();
++		     ++pf)
++		  {
++		    if (pf->is_anonymous())
++		      {
++			if (Type::traverse(pf->type(), this) == TRAVERSE_EXIT)
++			  return TRAVERSE_EXIT;
++		      }
++		  }
++	      }
++
++	    // Finalize the methods of this type.
++	    nt->finalize_methods(this->gogo_);
++
++	    // Finalize all the struct fields.
+ 	    if (rt->struct_type()->traverse_field_types(this) == TRAVERSE_EXIT)
+ 	      return TRAVERSE_EXIT;
+ 	  }
+ 
+-	nt->finalize_methods(this->gogo_);
+-
+ 	// If this type is defined in a different package, then finalize the
+ 	// types of all the methods, since we won't see them otherwise.
+ 	if (nt->named_object()->package() != NULL && nt->has_any_methods())
 Index: gcc/go/gofrontend/types.h
 ===================================================================
 --- a/src/gcc/go/gofrontend/types.h	(.../tags/gcc_7_1_0_release)
@@ -19505,6 +20081,56 @@ Index: gcc/function.c
    if (crtl->profile)
      {
  #ifdef PROFILE_HOOK
+@@ -6057,20 +6057,42 @@
+ 
+   if (split_prologue_seq || prologue_seq)
+     {
++      rtx_insn *split_prologue_insn = split_prologue_seq;
+       if (split_prologue_seq)
+-	insert_insn_on_edge (split_prologue_seq, orig_entry_edge);
++	{
++	  while (split_prologue_insn && !NONDEBUG_INSN_P (split_prologue_insn))
++	    split_prologue_insn = NEXT_INSN (split_prologue_insn);
++	  insert_insn_on_edge (split_prologue_seq, orig_entry_edge);
++	}
+ 
++      rtx_insn *prologue_insn = prologue_seq;
+       if (prologue_seq)
+-	insert_insn_on_edge (prologue_seq, entry_edge);
++	{
++	  while (prologue_insn && !NONDEBUG_INSN_P (prologue_insn))
++	    prologue_insn = NEXT_INSN (prologue_insn);
++	  insert_insn_on_edge (prologue_seq, entry_edge);
++	}
+ 
+       commit_edge_insertions ();
+ 
+       /* Look for basic blocks within the prologue insns.  */
+-      auto_sbitmap blocks (last_basic_block_for_fn (cfun));
+-      bitmap_clear (blocks);
+-      bitmap_set_bit (blocks, entry_edge->dest->index);
+-      bitmap_set_bit (blocks, orig_entry_edge->dest->index);
+-      find_many_sub_basic_blocks (blocks);
++      if (split_prologue_insn
++	  && BLOCK_FOR_INSN (split_prologue_insn) == NULL)
++	split_prologue_insn = NULL;
++      if (prologue_insn
++	  && BLOCK_FOR_INSN (prologue_insn) == NULL)
++	prologue_insn = NULL;
++      if (split_prologue_insn || prologue_insn)
++	{
++	  auto_sbitmap blocks (last_basic_block_for_fn (cfun));
++	  bitmap_clear (blocks);
++	  if (split_prologue_insn)
++	    bitmap_set_bit (blocks,
++			    BLOCK_FOR_INSN (split_prologue_insn)->index);
++	  if (prologue_insn)
++	    bitmap_set_bit (blocks, BLOCK_FOR_INSN (prologue_insn)->index);
++	  find_many_sub_basic_blocks (blocks);
++	}
+     }
+ 
+   default_rtl_profile ();
 Index: gcc/auto-profile.c
 ===================================================================
 --- a/src/gcc/auto-profile.c	(.../tags/gcc_7_1_0_release)
@@ -25428,7 +26054,7 @@ Index: gcc/po/fr.po
 -"POT-Creation-Date: 2017-04-24 20:38+0000\n"
 -"PO-Revision-Date: 2017-04-29 21:11+0200\n"
 +"POT-Creation-Date: 2017-05-01 22:24+0000\n"
-+"PO-Revision-Date: 2017-05-02 18:16+0200\n"
++"PO-Revision-Date: 2017-07-31 21:23+0200\n"
  "Last-Translator: Frédéric Marchal <fmarchal at perso.be>\n"
  "Language-Team: French <traduc at traduc.org>\n"
  "Language: fr\n"
@@ -26040,6 +26666,33 @@ Index: gcc/po/fr.po
  #, gcc-internal-format
  msgid "null format string"
  msgstr "chaîne de format nulle"
+@@ -18582,7 +18582,7 @@
+ #: gimplify.c:12201
+ #, gcc-internal-format
+ msgid "gimplification failed"
+-msgstr "la gimplification a échouée"
++msgstr "la gimplification a échoué"
+ 
+ #: gimplify.c:12729
+ #, gcc-internal-format
+@@ -18637,7 +18637,7 @@
+ #: hsa-gen.c:1189 hsa-gen.c:1202
+ #, gcc-internal-format
+ msgid "HSA SSA verification failed"
+-msgstr "La vérification HSA SSA a échouée"
++msgstr "La vérification HSA SSA a échoué"
+ 
+ #: hsa-gen.c:1198
+ #, gcc-internal-format
+@@ -18652,7 +18652,7 @@
+ #: hsa-gen.c:1462
+ #, gcc-internal-format
+ msgid "HSA instruction verification failed"
+-msgstr "La vérification de l'instruction HSA a échouée"
++msgstr "La vérification de l'instruction HSA a échoué"
+ 
+ #: input.c:1147
+ #, gcc-internal-format, gfc-internal-format
 @@ -20433,157 +20433,157 @@
  msgid "%D renamed after being referenced in assembly"
  msgstr "%D renommé après avoir été référencé dans l'assembleur"
@@ -27556,6 +28209,24 @@ Index: gcc/po/fr.po
  #, gcc-internal-format
  msgid "value %qs is not supported by attribute %<target%>"
  msgstr "la valeur %qs n'est pas supportée par l'attribut %<target%>"
+@@ -59191,7 +59197,7 @@
+ #: lto/lto-object.c:107
+ #, gcc-internal-format, gfc-internal-format
+ msgid "open %s failed: %s"
+-msgstr "l'ouverture de %s a échouée: %s"
++msgstr "l'ouverture de %s a échoué: %s"
+ 
+ #: lto/lto-object.c:151 lto/lto-object.c:186 lto/lto-object.c:283
+ #: lto/lto-object.c:340 lto/lto-object.c:364
+@@ -59363,7 +59369,7 @@
+ #: lto/lto.c:2316
+ #, gcc-internal-format
+ msgid "streaming subprocess failed"
+-msgstr "la mise en ligne du sous processus a échouée"
++msgstr "la mise en ligne du sous processus a échoué"
+ 
+ #: lto/lto.c:2319
+ #, gcc-internal-format
 Index: gcc/po/hr.po
 ===================================================================
 --- a/src/gcc/po/hr.po	(.../tags/gcc_7_1_0_release)
@@ -31853,7 +32524,11 @@ Index: gcc/po/ChangeLog
 ===================================================================
 --- a/src/gcc/po/ChangeLog	(.../tags/gcc_7_1_0_release)
 +++ b/src/gcc/po/ChangeLog	(.../branches/gcc-7-branch)
-@@ -1,3 +1,44 @@
+@@ -1,3 +1,48 @@
++2017-08-01  Joseph Myers  <joseph at codesourcery.com>
++
++	* fr.po: Update.
++
 +2017-07-31  Joseph Myers  <joseph at codesourcery.com>
 +
 +	* es.po, uk.po: Update.
@@ -70242,7 +70917,73 @@ Index: gcc/tree-ssa-reassoc.c
 ===================================================================
 --- a/src/gcc/tree-ssa-reassoc.c	(.../tags/gcc_7_1_0_release)
 +++ b/src/gcc/tree-ssa-reassoc.c	(.../branches/gcc-7-branch)
-@@ -4188,11 +4188,15 @@
+@@ -2941,17 +2941,26 @@
+ 	{
+ 	case GT_EXPR:
+ 	case GE_EXPR:
+-	  if (!ranges[i].in_p)
+-	    std::swap (rhs1, rhs2);
++	case LT_EXPR:
++	case LE_EXPR:
++	  break;
++	default:
++	  continue;
++	}
++      if (ranges[i].in_p)
++	ccode = invert_tree_comparison (ccode, false);
++      switch (ccode)
++	{
++	case GT_EXPR:
++	case GE_EXPR:
++	  std::swap (rhs1, rhs2);
+ 	  ccode = swap_tree_comparison (ccode);
+ 	  break;
+ 	case LT_EXPR:
+ 	case LE_EXPR:
+-	  if (ranges[i].in_p)
+-	    std::swap (rhs1, rhs2);
+ 	  break;
+ 	default:
+-	  continue;
++	  gcc_unreachable ();
+ 	}
+ 
+       int *idx = map->get (rhs1);
+@@ -2998,8 +3007,14 @@
+ 	  fprintf (dump_file, "\n");
+ 	}
+ 
+-      if (ranges[i].in_p)
+-	std::swap (rhs1, rhs2);
++      operand_entry *oe = (*ops)[ranges[i].idx];
++      ranges[i].in_p = 0;
++      if (opcode == BIT_IOR_EXPR
++	  || (opcode == ERROR_MARK && oe->rank == BIT_IOR_EXPR))
++	{
++	  ranges[i].in_p = 1;
++	  ccode = invert_tree_comparison (ccode, false);
++	}
+ 
+       unsigned int uid = gimple_uid (stmt);
+       gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
+@@ -3026,7 +3041,6 @@
+ 	}
+       else
+ 	{
+-	  operand_entry *oe = (*ops)[ranges[i].idx];
+ 	  tree ctype = oe->op ? TREE_TYPE (oe->op) : boolean_type_node;
+ 	  if (!INTEGRAL_TYPE_P (ctype)
+ 	      || (TREE_CODE (ctype) != BOOLEAN_TYPE
+@@ -3048,7 +3062,7 @@
+ 	  ranges[i].high = ranges[i].low;
+ 	}
+       ranges[i].strict_overflow_p = false;
+-      operand_entry *oe = (*ops)[ranges[*idx].idx];
++      oe = (*ops)[ranges[*idx].idx];
+       /* Now change all the other range test immediate uses, so that
+ 	 those tests will be optimized away.  */
+       if (opcode == ERROR_MARK)
+@@ -4188,11 +4202,15 @@
  
  /* Recursively rewrite our linearized statements so that the operators
     match those in OPS[OPINDEX], putting the computation in rank
@@ -70260,7 +71001,7 @@ Index: gcc/tree-ssa-reassoc.c
  {
    tree rhs1 = gimple_assign_rhs1 (stmt);
    tree rhs2 = gimple_assign_rhs2 (stmt);
-@@ -4283,7 +4287,8 @@
+@@ -4283,7 +4301,8 @@
       be the non-leaf side.  */
    tree new_rhs1
      = rewrite_expr_tree (SSA_NAME_DEF_STMT (rhs1), opindex + 1, ops,
@@ -70270,7 +71011,7 @@ Index: gcc/tree-ssa-reassoc.c
  
    if (oe->op != rhs2 || new_rhs1 != rhs1)
      {
-@@ -5637,6 +5642,7 @@
+@@ -5637,6 +5656,7 @@
  	      gimple_set_visited (stmt, true);
  	      linearize_expr_tree (&ops, stmt, true, true);
  	      ops.qsort (sort_by_operand_rank);
@@ -70278,7 +71019,7 @@ Index: gcc/tree-ssa-reassoc.c
  	      optimize_ops_list (rhs_code, &ops);
  	      if (undistribute_ops_list (rhs_code, &ops,
  					 loop_containing_stmt (stmt)))
-@@ -5727,7 +5733,8 @@
+@@ -5727,7 +5747,8 @@
  
  		      new_lhs = rewrite_expr_tree (stmt, 0, ops,
  						   powi_result != NULL
@@ -74526,6 +75267,15 @@ Index: gcc/config/i386/i386.c
    /* Validate -mpreferred-stack-boundary= value or default it to
       PREFERRED_STACK_BOUNDARY_DEFAULT.  */
    ix86_preferred_stack_boundary = PREFERRED_STACK_BOUNDARY_DEFAULT;
+@@ -18597,7 +18603,7 @@
+       /* Displacement only requires special attention.  */
+       if (CONST_INT_P (disp))
+ 	{
+-	  if (ASSEMBLER_DIALECT == ASM_INTEL && parts.seg == ADDR_SPACE_GENERIC)
++	  if (ASSEMBLER_DIALECT == ASM_INTEL && ADDR_SPACE_GENERIC_P (as))
+ 	    fputs ("ds:", file);
+ 	  fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (disp));
+ 	}
 @@ -31069,11 +31075,12 @@
     but are waiting to be built until a function is declared to use that
     ISA.  */
@@ -76231,6 +76981,104 @@ Index: gcc/config/rs6000/rs6000-c.c
  
    /* We needed to create a keyword if -mfloat128-type was used but not -mfloat,
       so we used __ieee128.  If -mfloat128 was used, create a #define back to
+@@ -5646,6 +5649,12 @@
+       tree arg1 = (*arglist)[1];
+       tree arg1_type = TREE_TYPE (arg1);
+ 
++      /* Both arguments must be vectors and the types must be compatible.  */
++      if (TREE_CODE (arg0_type) != VECTOR_TYPE)
++	goto bad;
++      if (!lang_hooks.types_compatible_p (arg0_type, arg1_type))
++	goto bad;
++
+       /* Power9 instructions provide the most efficient implementation of
+ 	 ALTIVEC_BUILTIN_VEC_CMPNE if the mode is not DImode or TImode
+ 	 or SFmode or DFmode.  */
+@@ -5655,12 +5664,6 @@
+ 	  || (TYPE_MODE (TREE_TYPE (arg0_type)) == SFmode)
+ 	  || (TYPE_MODE (TREE_TYPE (arg0_type)) == DFmode))
+ 	{
+-	  /* Both arguments must be vectors and the types must be compatible.  */
+-	  if (TREE_CODE (arg0_type) != VECTOR_TYPE)
+-	    goto bad;
+-	  if (!lang_hooks.types_compatible_p (arg0_type, arg1_type))
+-	    goto bad;
+-
+ 	  switch (TYPE_MODE (TREE_TYPE (arg0_type)))
+ 	    {
+ 	      /* vec_cmpneq (va, vb) == vec_nor (vec_cmpeq (va, vb),
+@@ -5722,8 +5725,8 @@
+ 	 __int128) and the types must be compatible.  */
+       if (TREE_CODE (arg0_type) != VECTOR_TYPE)
+ 	goto bad;
+-      if (!lang_hooks.types_compatible_p (arg0_type, arg1_type) ||
+-	  !lang_hooks.types_compatible_p (arg1_type, arg2_type))
++      if (!lang_hooks.types_compatible_p (arg0_type, arg1_type)
++	  || !lang_hooks.types_compatible_p (arg1_type, arg2_type))
+ 	goto bad;
+ 
+       switch (TYPE_MODE (TREE_TYPE (arg0_type)))
+@@ -5786,8 +5789,8 @@
+ 	 __int128) and the types must be compatible.  */
+       if (TREE_CODE (arg0_type) != VECTOR_TYPE)
+ 	goto bad;
+-      if (!lang_hooks.types_compatible_p (arg0_type, arg1_type) ||
+-	  !lang_hooks.types_compatible_p (arg1_type, arg2_type))
++      if (!lang_hooks.types_compatible_p (arg0_type, arg1_type)
++	  || !lang_hooks.types_compatible_p (arg1_type, arg2_type))
+ 	goto bad;
+ 
+       switch (TYPE_MODE (TREE_TYPE (arg0_type)))
+@@ -6215,6 +6218,9 @@
+ 
+       /* Strip qualifiers like "const" from the pointer arg.  */
+       tree arg1_type = TREE_TYPE (arg1);
++      if (!POINTER_TYPE_P (arg1_type) && TREE_CODE (arg1_type) != ARRAY_TYPE)
++	goto bad;
++
+       tree inner_type = TREE_TYPE (arg1_type);
+       if (TYPE_QUALS (TREE_TYPE (arg1_type)) != 0)
+ 	{
+@@ -6303,11 +6309,6 @@
+ 	      arg2 = build1 (ADDR_EXPR, arg2_type, arg2_elt0);
+ 	    }
+ 
+-	  tree addr = fold_build2_loc (loc, POINTER_PLUS_EXPR, arg2_type,
+-				       arg2, arg1);
+-	  tree aligned = fold_build2_loc (loc, BIT_AND_EXPR, arg2_type, addr,
+-					  build_int_cst (arg2_type, -16));
+-
+ 	  /* Find the built-in to make sure a compatible one exists; if not
+ 	     we fall back to default handling to get the error message.  */
+ 	  for (desc = altivec_overloaded_builtins;
+@@ -6320,6 +6321,12 @@
+ 		&& rs6000_builtin_type_compatible (TREE_TYPE (arg2),
+ 						   desc->op3))
+ 	      {
++		tree addr = fold_build2_loc (loc, POINTER_PLUS_EXPR, arg2_type,
++					     arg2, arg1);
++		tree aligned
++		  = fold_build2_loc (loc, BIT_AND_EXPR, arg2_type,
++				     addr, build_int_cst (arg2_type, -16));
++
+ 		tree arg0_type = TREE_TYPE (arg0);
+ 		if (TYPE_MODE (arg0_type) == V2DImode)
+ 		  /* Type-based aliasing analysis thinks vector long
+@@ -6438,9 +6445,9 @@
+       }
+   }
+  bad:
+-    {
+-      const char *name = rs6000_overloaded_builtin_name (fcode);
+-      error ("invalid parameter combination for AltiVec intrinsic %s", name);
+-      return error_mark_node;
+-    }
++  {
++    const char *name = rs6000_overloaded_builtin_name (fcode);
++    error ("invalid parameter combination for AltiVec intrinsic %s", name);
++    return error_mark_node;
++  }
+ }
 Index: gcc/config/rs6000/rs6000.c
 ===================================================================
 --- a/src/gcc/config/rs6000/rs6000.c	(.../tags/gcc_7_1_0_release)
@@ -77680,6 +78528,95 @@ Index: gcc/config/bfin/rtems.h
  /* Target OS preprocessor built-ins.  */
  #define TARGET_OS_CPP_BUILTINS()		\
    do						\
+Index: gcc/tree-vect-slp.c
+===================================================================
+--- a/src/gcc/tree-vect-slp.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/tree-vect-slp.c	(.../branches/gcc-7-branch)
+@@ -3289,19 +3289,22 @@
+ {
+   gimple *first_stmt;
+   int number_of_vects = 0, i;
++  unsigned int child_index = 0;
+   HOST_WIDE_INT lhs_size_unit, rhs_size_unit;
+   slp_tree child = NULL;
+   vec<tree> vec_defs;
+   tree oprnd;
++  bool vectorized_defs;
+   bool first_iteration = true;
+ 
+   first_stmt = SLP_TREE_SCALAR_STMTS (slp_node)[0];
+   FOR_EACH_VEC_ELT (ops, i, oprnd)
+     {
+-      bool vectorized_defs = false;
+-
+       if (oprnd == NULL)
+ 	{
++	  /* Only vectorizable_reduction will call us with a NULL op which
++	     will always match the reduction operand for which we have no
++	     SLP child.  */
+ 	  vec_defs = vNULL;
+ 	  vec_defs.create (0);
+ 	  vec_oprnds->quick_push (vec_defs);
+@@ -3312,9 +3315,10 @@
+ 	 node or we need to create them (for invariants and constants).  We
+ 	 check if the LHS of the first stmt of the next child matches OPRND.
+ 	 If it does, we found the correct child.  Otherwise, we call
+-	 vect_get_constant_vectors ().  */
+-      for (unsigned int child_index = 0;
+-	   child_index < SLP_TREE_CHILDREN (slp_node).length (); child_index++)
++	 vect_get_constant_vectors (), and not advance CHILD_INDEX in order
++	 to check this child node for the next operand.  */
++      vectorized_defs = false;
++      if (SLP_TREE_CHILDREN (slp_node).length () > child_index)
+         {
+           child = SLP_TREE_CHILDREN (slp_node)[child_index];
+ 
+@@ -3334,25 +3338,30 @@
+ 		     statements.  */
+ 		  number_of_vects = SLP_TREE_NUMBER_OF_VEC_STMTS (child);
+ 		  vectorized_defs = true;
+-		  break;
++		  child_index++;
+ 		}
+ 	    }
++	  else
++	    child_index++;
+         }
+ 
+-      if (!vectorized_defs && first_iteration)
+-	{
+-	  number_of_vects = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
+-	  /* Number of vector stmts was calculated according to LHS in
+-	     vect_schedule_slp_instance (), fix it by replacing LHS with
+-	     RHS, if necessary.  See vect_get_smallest_scalar_type () for
+-	     details.  */
+-	  vect_get_smallest_scalar_type (first_stmt, &lhs_size_unit,
+-					 &rhs_size_unit);
+-	  if (rhs_size_unit != lhs_size_unit)
+-	    {
+-	      number_of_vects *= rhs_size_unit;
+-	      number_of_vects /= lhs_size_unit;
+-	    }
++      if (!vectorized_defs)
++        {
++          if (first_iteration)
++            {
++              number_of_vects = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
++              /* Number of vector stmts was calculated according to LHS in
++                 vect_schedule_slp_instance (), fix it by replacing LHS with
++                 RHS, if necessary.  See vect_get_smallest_scalar_type () for
++                 details.  */
++              vect_get_smallest_scalar_type (first_stmt, &lhs_size_unit,
++                                             &rhs_size_unit);
++              if (rhs_size_unit != lhs_size_unit)
++                {
++                  number_of_vects *= rhs_size_unit;
++                  number_of_vects /= lhs_size_unit;
++                }
++            }
+         }
+ 
+       /* Allocate memory for vectorized defs.  */
 Index: gcc/params.def
 ===================================================================
 --- a/src/gcc/params.def	(.../tags/gcc_7_1_0_release)
diff --git a/debian/rules.defs b/debian/rules.defs
index 7c681a6..b77eeae 100644
--- a/debian/rules.defs
+++ b/debian/rules.defs
@@ -1404,7 +1404,7 @@ ifneq (,$(filter $(DEB_HOST_ARCH), hppa mips))
     with_check := disabled for $(DEB_HOST_ARCH), testsuite timeouts with expect
   endif
 endif
-with_check := disabled for this upload
+#with_check := disabled for this upload
 
 # not a dependency on all archs, but if available, use it for the testsuite
 ifneq (,$(wildcard /usr/bin/localedef))

-- 
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