[gcc-7] 214/354: * Update to SVN 20170617 (r249338) from the gcc-7-branch.

Ximin Luo infinity0 at debian.org
Thu Nov 23 15:50:55 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 3c43f5eda08bcf69296c6a31ae05890feb1e4a38
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Sat Jun 17 13:52:03 2017 +0000

      * Update to SVN 20170617 (r249338) from the gcc-7-branch.
    
    
    git-svn-id: svn+ssh://svn.debian.org/svn/gcccvs/branches/sid/gcc-7@9517 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
 debian/changelog                              |    2 +
 debian/patches/ada-link-lib.diff              |   12 -
 debian/patches/ada-system-freebsd-rename.diff |   35 -
 debian/patches/svn-updates.diff               | 9664 ++++++++++++++++++++++++-
 debian/rules.patch                            |    1 -
 5 files changed, 9626 insertions(+), 88 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f1d26b3..4444013 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,7 @@
 gcc-7 (7.1.0-7) UNRELEASED; urgency=medium
 
+  * Update to SVN 20170617 (r249338) from the gcc-7-branch.
+
   [ Matthias Klose ]
   * Update to SVN 20170524 (r248432) from the gcc-7-branch.
   * Don't build libada with -O3 (ftbfs on ppc64el).
diff --git a/debian/patches/ada-link-lib.diff b/debian/patches/ada-link-lib.diff
index c43d67c..dcb4e16 100644
--- a/debian/patches/ada-link-lib.diff
+++ b/debian/patches/ada-link-lib.diff
@@ -183,15 +183,3 @@
  
  GCC_LINK=$(LINKER) $(GCC_LINKERFLAGS) $(LDFLAGS)
  GCC_LLINK=$(LLINKER) $(GCC_LINKERFLAGS) $(LDFLAGS)
---- a/src/libada/configure.ac
-+++ b/src/libada/configure.ac
-@@ -127,8 +127,7 @@
- AC_PROG_LN_S
- 
- # Determine what to build for 'gnatlib'
--if test $build = $target \
--   && test ${enable_shared} = yes ; then
-+if test ${enable_shared} = yes ; then
-   # Note that build=target is almost certainly the wrong test; FIXME
-   default_gnatlib_target="gnatlib-shared"
- else
diff --git a/debian/patches/ada-system-freebsd-rename.diff b/debian/patches/ada-system-freebsd-rename.diff
deleted file mode 100644
index 375b15c..0000000
--- a/debian/patches/ada-system-freebsd-rename.diff
+++ /dev/null
@@ -1,35 +0,0 @@
-Description: link system.ads to system-freebsd.ads on hurd and *freebsd
- system-freebsd-x86.ads does not exist anymore.
-Author: Nicolas Boulenguez <nicolas at debian.org>
-Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=861735
-Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=861737
-
---- a/src/gcc/ada/gcc-interface/Makefile.in
-+++ b/src/gcc/ada/gcc-interface/Makefile.in
-@@ -1424,7 +1424,7 @@
-   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
-   $(ATOMICS_TARGET_PAIRS) \
-   $(X86_TARGET_PAIRS) \
--  system.ads<system-freebsd-x86.ads
-+  system.ads<system-freebsd.ads
- 
-   TOOLS_TARGET_PAIRS =  \
-     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
-@@ -1454,7 +1454,7 @@
-   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
-   $(ATOMICS_TARGET_PAIRS) \
-   $(X86_TARGET_PAIRS) \
--  system.ads<system-freebsd-x86.ads
-+  system.ads<system-freebsd.ads
- 
-   TOOLS_TARGET_PAIRS =  \
-     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
-@@ -1482,7 +1482,7 @@
-   s-taprop.adb<s-taprop-posix.adb \
-   s-taspri.ads<s-taspri-posix.ads \
-   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
--  system.ads<system-freebsd-x86.ads
-+  system.ads<system-freebsd.ads
- 
-   TOOLS_TARGET_PAIRS =  \
-     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
diff --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff
index 302bf72..411c7a5 100644
--- a/debian/patches/svn-updates.diff
+++ b/debian/patches/svn-updates.diff
@@ -1,10 +1,10 @@
-# DP: updates from the 7 branch upto 20170524 (r248432).
+# DP: updates from the 7 branch upto 20170617 (r249338).
 
 last_update()
 {
 	cat > ${dir}LAST_UPDATED <EOF
-Wed May 24 15:20:51 PDT 2017
-Wed May 24 22:20:51 UTC 2017 (revision 248432)
+Sat Jun 17 15:23:02 CEST 2017
+Sat Jun 17 13:23:02 UTC 2017 (revision 249338)
 EOF
 }
 
@@ -12,24 +12,460 @@ LANG=C svn diff svn://gcc.gnu.org/svn/gcc/tags/gcc_7_1_0_release svn://gcc.gnu.o
 	| sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \
 	| awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0'
 
+Index: libgomp/ChangeLog
+===================================================================
+--- a/src/libgomp/ChangeLog	(.../tags/gcc_7_1_0_release)
++++ b/src/libgomp/ChangeLog	(.../branches/gcc-7-branch)
+@@ -1,3 +1,29 @@
++2017-06-02  Jakub Jelinek  <jakub at redhat.com>
++
++	Backported from mainline
++	2017-05-30  Jakub Jelinek  <jakub at redhat.com>
++
++	PR libgomp/80822
++	* config/linux/affinity.c (gomp_affinity_init_level_1): New function.
++	(gomp_affinity_init_level): Use it.  Always analyze the core and thread
++	sibling lists, depending on level just pick up what CPUs to put
++	together into a place vs. whether add multiple ordered places.
++
++2017-05-26  Jakub Jelinek  <jakub at redhat.com>
++
++	Backported from mainline
++	2017-05-22  Jakub Jelinek  <jakub at redhat.com>
++
++	PR middle-end/80809
++	* testsuite/libgomp.c/pr80809-2.c: New test.
++	* testsuite/libgomp.c/pr80809-3.c: New test.
++
++	PR middle-end/80809
++	* testsuite/libgomp.c/pr80809-1.c: New test.
++
++	PR middle-end/80853
++	* testsuite/libgomp.c/pr80853.c: New test.
++
+ 2017-05-02  Release Manager
+ 
+ 	* GCC 7.1.0 released.
+Index: libgomp/testsuite/libgomp.c/pr80809-1.c
+===================================================================
+--- a/src/libgomp/testsuite/libgomp.c/pr80809-1.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgomp/testsuite/libgomp.c/pr80809-1.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,29 @@
++/* PR middle-end/80809 */
++/* { dg-do run } */
++
++__attribute__((noinline, noclone)) void
++foo (int x)
++{
++  int i, j, v[x], *w[16];
++  for (i = 0; i < x; i++)
++    v[i] = i;
++#pragma omp parallel
++#pragma omp single
++  for (i = 0; i < 16; i++)
++  /* Make sure v is implicitly determined shared in task, because it
++     is shared on the parallel.  */
++#pragma omp task private (j)
++    w[i] = v;
++  for (i = 0; i < 16; i++)
++    if (w[i] != v)
++      __builtin_abort ();
++}
++
++int
++main ()
++{
++  foo (4);
++  foo (27);
++  foo (196);
++  return 0;
++}
+Index: libgomp/testsuite/libgomp.c/pr80853.c
+===================================================================
+--- a/src/libgomp/testsuite/libgomp.c/pr80853.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgomp/testsuite/libgomp.c/pr80853.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,29 @@
++/* PR middle-end/80853 */
++/* { dg-do run } */
++
++__attribute__((noinline, noclone)) void
++foo (int *p)
++{
++  #pragma omp for reduction(+:p[:4])
++  for (int i = 0; i < 64; i++)
++    {
++      p[0] += i;
++      p[1] += i / 2;
++      p[2] += 2 * i;
++      p[3] += 3 * i;
++    }
++}
++
++int
++main ()
++{
++  int p[4] = { 0, 0, 0, 0 };
++  #pragma omp parallel
++  foo (p);
++  if (p[0] != 63 * 64 / 2
++      || p[1] != 31 * 32
++      || p[2] != 63 * 64
++      || p[3] != 3 * 63 * 64 / 2)
++    __builtin_abort ();
++  return 0;
++}
+Index: libgomp/testsuite/libgomp.c/pr80809-2.c
+===================================================================
+--- a/src/libgomp/testsuite/libgomp.c/pr80809-2.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgomp/testsuite/libgomp.c/pr80809-2.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,35 @@
++/* PR middle-end/80809 */
++/* { dg-do run } */
++
++__attribute__((noinline, noclone)) void
++foo (int x)
++{
++  int i, v[x], w[16];
++  for (i = 0; i < x; i++)
++    v[i] = i;
++  for (i = 0; i < 16; i++)
++    w[i] = 0;
++#pragma omp parallel
++#pragma omp single
++  for (i = 0; i < 16; i++)
++#pragma omp task firstprivate (v)
++    {
++      int j;
++      for (j = 0; j < x; j++)
++	v[j] += i;
++      for (j = 0; j < x; j++)
++	w[i] += v[j];
++    }
++  for (i = 0; i < 16; i++)
++    if (w[i] != (x - 1) * x / 2 + x * i)
++      __builtin_abort ();
++}
++
++int
++main ()
++{
++  foo (4);
++  foo (27);
++  foo (196);
++  return 0;
++}
+Index: libgomp/testsuite/libgomp.c/pr80809-3.c
+===================================================================
+--- a/src/libgomp/testsuite/libgomp.c/pr80809-3.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgomp/testsuite/libgomp.c/pr80809-3.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,42 @@
++/* PR middle-end/80809 */
++/* { dg-do run } */
++
++__attribute__((noinline, noclone)) void
++foo (int x)
++{
++  int i, v[x], w[16];
++  for (i = 0; i < x; i++)
++    v[i] = i;
++  for (i = 0; i < 16; i++)
++    w[i] = 0;
++#pragma omp parallel
++#pragma omp single
++  {
++    int z[x];
++    for (i = 0; i < x; i++)
++      z[0] = 0;
++    for (i = 0; i < 16; i++)
++#pragma omp task firstprivate (z) firstprivate (v)
++      {
++	int j;
++	for (j = 0; j < x; j++)
++	  z[j] = i;
++	for (j = 0; j < x; j++)
++	  v[j] += z[j];
++	for (j = 0; j < x; j++)
++	  w[i] += v[j];
++      }
++  }
++  for (i = 0; i < 16; i++)
++    if (w[i] != (x - 1) * x / 2 + x * i)
++      __builtin_abort ();
++}
++
++int
++main ()
++{
++  foo (4);
++  foo (27);
++  foo (196);
++  return 0;
++}
+Index: libgomp/config/linux/affinity.c
+===================================================================
+--- a/src/libgomp/config/linux/affinity.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgomp/config/linux/affinity.c	(.../branches/gcc-7-branch)
+@@ -222,10 +222,87 @@
+   return true;
+ }
+ 
++static void
++gomp_affinity_init_level_1 (int level, int this_level, unsigned long count,
++			    cpu_set_t *copy, char *name, bool quiet)
++{
++  size_t prefix_len = sizeof ("/sys/devices/system/cpu/cpu") - 1;
++  FILE *f;
++  char *line = NULL;
++  size_t linelen = 0;
++  unsigned long i, max = 8 * gomp_cpuset_size;
++
++  for (i = 0; i < max && gomp_places_list_len < count; i++)
++    if (CPU_ISSET_S (i, gomp_cpuset_size, copy))
++      {
++	sprintf (name + prefix_len, "%lu/topology/%s_siblings_list",
++		 i, this_level == 3 ? "core" : "thread");
++	f = fopen (name, "r");
++	if (f == NULL)
++	  {
++	    CPU_CLR_S (i, gomp_cpuset_size, copy);
++	    continue;
++	  }
++	if (getline (&line, &linelen, f) > 0)
++	  {
++	    char *p = line;
++	    void *pl = gomp_places_list[gomp_places_list_len];
++	    if (level == this_level)
++	      gomp_affinity_init_place (pl);
++	    while (*p && *p != '\n')
++	      {
++		unsigned long first, last;
++		errno = 0;
++		first = strtoul (p, &p, 10);
++		if (errno)
++		  break;
++		last = first;
++		if (*p == '-')
++		  {
++		    errno = 0;
++		    last = strtoul (p + 1, &p, 10);
++		    if (errno || last < first)
++		      break;
++		  }
++		for (; first <= last; first++)
++		  if (!CPU_ISSET_S (first, gomp_cpuset_size, copy))
++		    continue;
++		  else if (this_level == 3 && level < this_level)
++		    gomp_affinity_init_level_1 (level, 2, count, copy,
++						name, quiet);
++		  else
++		    {
++		      if (level == 1)
++			{
++			  pl = gomp_places_list[gomp_places_list_len];
++			  gomp_affinity_init_place (pl);
++			}
++		      if (gomp_affinity_add_cpus (pl, first, 1, 0, true))
++			{
++			  CPU_CLR_S (first, gomp_cpuset_size, copy);
++			  if (level == 1)
++			    gomp_places_list_len++;
++			}
++		    }
++		if (*p == ',')
++		  ++p;
++	      }
++	    if (level == this_level
++		&& !CPU_ISSET_S (i, gomp_cpuset_size, copy))
++	      gomp_places_list_len++;
++	    CPU_CLR_S (i, gomp_cpuset_size, copy);
++	  }
++	fclose (f);
++      }
++  free (line);
++}
++
+ bool
+ gomp_affinity_init_level (int level, unsigned long count, bool quiet)
+ {
+-  unsigned long i, max = 8 * gomp_cpuset_size;
++  char name[sizeof ("/sys/devices/system/cpu/cpu/topology/"
++		    "thread_siblings_list") + 3 * sizeof (unsigned long)];
++  cpu_set_t *copy;
+ 
+   if (gomp_cpusetp)
+     {
+@@ -238,90 +315,20 @@
+   gomp_places_list_len = 0;
+   if (gomp_places_list == NULL)
+     return false;
+-  /* SMT (threads).  */
+-  if (level == 1)
++
++  copy = gomp_alloca (gomp_cpuset_size);
++  strcpy (name, "/sys/devices/system/cpu/cpu");
++  memcpy (copy, gomp_cpusetp, gomp_cpuset_size);
++  gomp_affinity_init_level_1 (level, 3, count, copy, name, quiet);
++  if (gomp_places_list_len == 0)
+     {
+-      for (i = 0; i < max && gomp_places_list_len < count; i++)
+-	if (CPU_ISSET_S (i, gomp_cpuset_size, gomp_cpusetp))
+-	  {
+-	    gomp_affinity_init_place (gomp_places_list[gomp_places_list_len]);
+-	    gomp_affinity_add_cpus (gomp_places_list[gomp_places_list_len],
+-				    i, 1, 0, true);
+-	    ++gomp_places_list_len;
+-	  }
+-      return true;
++      if (!quiet)
++	gomp_error ("Error reading core/socket topology");
++      free (gomp_places_list);
++      gomp_places_list = NULL;
++      return false;
+     }
+-  else
+-    {
+-      char name[sizeof ("/sys/devices/system/cpu/cpu/topology/"
+-			"thread_siblings_list") + 3 * sizeof (unsigned long)];
+-      size_t prefix_len = sizeof ("/sys/devices/system/cpu/cpu") - 1;
+-      cpu_set_t *copy = gomp_alloca (gomp_cpuset_size);
+-      FILE *f;
+-      char *line = NULL;
+-      size_t linelen = 0;
+-
+-      memcpy (name, "/sys/devices/system/cpu/cpu", prefix_len);
+-      memcpy (copy, gomp_cpusetp, gomp_cpuset_size);
+-      for (i = 0; i < max && gomp_places_list_len < count; i++)
+-	if (CPU_ISSET_S (i, gomp_cpuset_size, copy))
+-	  {
+-	    sprintf (name + prefix_len, "%lu/topology/%s_siblings_list",
+-		     i, level == 2 ? "thread" : "core");
+-	    f = fopen (name, "r");
+-	    if (f != NULL)
+-	      {
+-		if (getline (&line, &linelen, f) > 0)
+-		  {
+-		    char *p = line;
+-		    bool seen_i = false;
+-		    void *pl = gomp_places_list[gomp_places_list_len];
+-		    gomp_affinity_init_place (pl);
+-		    while (*p && *p != '\n')
+-		      {
+-			unsigned long first, last;
+-			errno = 0;
+-			first = strtoul (p, &p, 10);
+-			if (errno)
+-			  break;
+-			last = first;
+-			if (*p == '-')
+-			  {
+-			    errno = 0;
+-			    last = strtoul (p + 1, &p, 10);
+-			    if (errno || last < first)
+-			      break;
+-			  }
+-			for (; first <= last; first++)
+-			  if (CPU_ISSET_S (first, gomp_cpuset_size, copy)
+-			      && gomp_affinity_add_cpus (pl, first, 1, 0,
+-							 true))
+-			    {
+-			      CPU_CLR_S (first, gomp_cpuset_size, copy);
+-			      if (first == i)
+-				seen_i = true;
+-			    }
+-			if (*p == ',')
+-			  ++p;
+-		      }
+-		    if (seen_i)
+-		      gomp_places_list_len++;
+-		  }
+-		fclose (f);
+-	      }
+-	  }
+-      if (gomp_places_list_len == 0)
+-	{
+-	  if (!quiet)
+-	    gomp_error ("Error reading %s topology",
+-			level == 2 ? "core" : "socket");
+-	  free (gomp_places_list);
+-	  gomp_places_list = NULL;
+-	  return false;
+-	}
+-      return true;
+-    }
+-  return false;
++  return true;
+ }
+ 
+ void
+Index: libstdc++-v3/doc/xml/manual/mt_allocator.xml
+===================================================================
+--- a/src/libstdc++-v3/doc/xml/manual/mt_allocator.xml	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/doc/xml/manual/mt_allocator.xml	(.../branches/gcc-7-branch)
+@@ -307,7 +307,7 @@
+ as part of a container's constructor. However, this assumption is
+ implementation-specific, and subject to change. For an example of a
+ pool that frees memory, see the following
+-    <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-6.cc?view=markup">
++    <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-6.cc?view=markup">
+     example.</link>
+ </para>
+ 
+Index: libstdc++-v3/doc/xml/manual/allocator.xml
+===================================================================
+--- a/src/libstdc++-v3/doc/xml/manual/allocator.xml	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/doc/xml/manual/allocator.xml	(.../branches/gcc-7-branch)
+@@ -185,8 +185,8 @@
+        Over multiple iterations, various STL container
+      objects have elements inserted to some maximum amount. A variety
+      of allocators are tested.
+-     Test source for <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/sequence.cc?view=markup">sequence</link>
+-     and <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/associative.cc?view=markup">associative</link>
++     Test source for <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/sequence.cc?view=markup">sequence</link>
++     and <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/associative.cc?view=markup">associative</link>
+      containers.
+        </para>
+ 
+@@ -201,7 +201,7 @@
+      on a per-thread basis, as well as measuring thread contention
+      for memory resources.
+      Test source
+-    <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert_erase/associative.cc?view=markup">here</link>.
++    <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert_erase/associative.cc?view=markup">here</link>.
+        </para>
+      </listitem>
+ 
+@@ -211,9 +211,9 @@
+        </para>
+        <para>
+        Test source for
+-     <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/sequence.cc?view=markup">sequence</link>
++     <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/sequence.cc?view=markup">sequence</link>
+      and
+-     <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/associative.cc?view=markup">associative</link>
++     <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/associative.cc?view=markup">associative</link>
+      containers.
+      </para>
+      </listitem>
 Index: libstdc++-v3/doc/xml/manual/abi.xml
 ===================================================================
 --- a/src/libstdc++-v3/doc/xml/manual/abi.xml	(.../tags/gcc_7_1_0_release)
 +++ b/src/libstdc++-v3/doc/xml/manual/abi.xml	(.../branches/gcc-7-branch)
-@@ -264,6 +264,8 @@
+@@ -264,6 +264,9 @@
      <listitem><para>GCC 4.8.3: libstdc++.so.6.0.19</para></listitem>
      <listitem><para>GCC 4.9.0: libstdc++.so.6.0.20</para></listitem>
      <listitem><para>GCC 5.1.0: libstdc++.so.6.0.21</para></listitem>
 +    <listitem><para>GCC 6.1.0: libstdc++.so.6.0.22</para></listitem>
 +    <listitem><para>GCC 7.1.0: libstdc++.so.6.0.23</para></listitem>
++    <listitem><para>GCC 7.2.0: libstdc++.so.6.0.24</para></listitem>
      </itemizedlist>
      <para>
        Note 1: Error should be libstdc++.so.3.0.3.
-@@ -331,6 +333,7 @@
+@@ -331,6 +334,8 @@
      <listitem><para>GCC 4.9.0: GLIBCXX_3.4.20, CXXABI_1.3.8</para></listitem>
      <listitem><para>GCC 5.1.0: GLIBCXX_3.4.21, CXXABI_1.3.9</para></listitem>
      <listitem><para>GCC 6.1.0: GLIBCXX_3.4.22, CXXABI_1.3.10</para></listitem>
 +    <listitem><para>GCC 7.1.0: GLIBCXX_3.4.23, CXXABI_1.3.11</para></listitem>
++    <listitem><para>GCC 7.2.0: GLIBCXX_3.4.24, CXXABI_1.3.11</para></listitem>
      </itemizedlist>
      </listitem>
  
@@ -78,6 +514,52 @@ Index: libstdc++-v3/doc/xml/manual/policy_data_structures.xml
  	  underlying data structure can support. These differences pose a
  	  challenge when creating a uniform interface for priority queues.
  	</para>
+Index: libstdc++-v3/doc/xml/manual/appendix_contributing.xml
+===================================================================
+--- a/src/libstdc++-v3/doc/xml/manual/appendix_contributing.xml	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/doc/xml/manual/appendix_contributing.xml	(.../branches/gcc-7-branch)
+@@ -358,7 +358,9 @@
+     library.  Support for "make check" and "make check-install" is
+     complete, and runs through all the subdirectories here when this
+     command is issued from the build directory.  Please note that
+-    "make check" requires DejaGNU 1.4 or later to be installed.
++    "make check" requires DejaGnu 1.4 or later to be installed,
++    or for extra <link linkend="test.run.permutations">permutations</link>
++    DejaGnu 1.5.3 or later.
+     </listitem>
+   </varlistentry>
+ </variablelist>
+@@ -898,7 +900,7 @@
+       Examples: <code>_S_max_elements  _S_default_value</code>
+ 
+       Don't use names in the same scope that differ only in the prefix,
+-      e.g. _S_top and _M_top. See BADNAMES for a list of forbidden names.
++      e.g. _S_top and _M_top. See <link linkend="coding_style.bad_identifiers">BADNAMES</link> for a list of forbidden names.
+       (The most tempting of these seem to be and "_T" and "__sz".)
+ 
+       Names must never have "__" internally; it would confuse name
+Index: libstdc++-v3/doc/xml/manual/test.xml
+===================================================================
+--- a/src/libstdc++-v3/doc/xml/manual/test.xml	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/doc/xml/manual/test.xml	(.../branches/gcc-7-branch)
+@@ -569,7 +569,7 @@
+       For example, to run the tests with
+       <option>-O1 -D_GLIBCXX_ASSERTIONS</option>
+       you could use:
+-<programlisting>    make RUNTESTFLAGS=--target_board=unix/-O1/-D_GLIBCXX_ASSERTIONS</programlisting>
++<programlisting>    make check RUNTESTFLAGS=--target_board=unix/-O1/-D_GLIBCXX_ASSERTIONS</programlisting>
+     </para>
+ 
+     <para>
+@@ -577,7 +577,7 @@
+       tests multiple times in different variations. For example, to run the
+       entire testsuite three times using <option>-O3</option> but with
+       different <option>-std</option> options:
+-<programlisting>    make 'RUNTESTFLAGS=--target_board=unix/-O3\"{-std=gnu++98,-std=gnu++11,-std=gnu++14}\"'</programlisting>
++<programlisting>    make check 'RUNTESTFLAGS=--target_board=unix/-O3\"{-std=gnu++98,-std=gnu++11,-std=gnu++14}\"'</programlisting>
+       N.B. that set of variations could also be written as
+       <literal>unix/-O3\"{-std=gnu++98,-std=gnu++11,}\"</literal> so that
+       the third variation would use the default for <option>-std</option>
 Index: libstdc++-v3/doc/html/manual/policy_data_structures.html
 ===================================================================
 --- a/src/libstdc++-v3/doc/html/manual/policy_data_structures.html	(.../tags/gcc_7_1_0_release)
@@ -113,7 +595,7 @@ Index: libstdc++-v3/doc/html/manual/abi.html
  	preceding release.
        </p><p>It is versioned as follows:
 -    </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: libstdc++.so.3.0.0</p></li><li class="listitem"><p>GCC 3.0.1: libstdc++.so.3.0.1</p></li><li class="listitem"><p>GCC 3.0.2: libstdc++.so.3.0.2</p></li><li class="listitem"><p>GCC 3.0.3: libstdc++.so.3.0.2 (See Note 1)</p></li><li class="listitem"><p>GCC 3.0.4: libstdc++.so.3.0.4</p></li><li class="listitem"><p>GCC 3.1.0: libstdc++.so.4.0.0 <span class="emphasis"> [...]
-+    </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: libstdc++.so.3.0.0</p></li><li class="listitem"><p>GCC 3.0.1: libstdc++.so.3.0.1</p></li><li class="listitem"><p>GCC 3.0.2: libstdc++.so.3.0.2</p></li><li class="listitem"><p>GCC 3.0.3: libstdc++.so.3.0.2 (See Note 1)</p></li><li class="listitem"><p>GCC 3.0.4: libstdc++.so.3.0.4</p></li><li class="listitem"><p>GCC 3.1.0: libstdc++.so.4.0.0 <span class="emphasis"> [...]
++    </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: libstdc++.so.3.0.0</p></li><li class="listitem"><p>GCC 3.0.1: libstdc++.so.3.0.1</p></li><li class="listitem"><p>GCC 3.0.2: libstdc++.so.3.0.2</p></li><li class="listitem"><p>GCC 3.0.3: libstdc++.so.3.0.2 (See Note 1)</p></li><li class="listitem"><p>GCC 3.0.4: libstdc++.so.3.0.4</p></li><li class="listitem"><p>GCC 3.1.0: libstdc++.so.4.0.0 <span class="emphasis"> [...]
        Note 1: Error should be libstdc++.so.3.0.3.
      </p><p>
        Note 2: Not strictly required.
@@ -122,10 +604,58 @@ Index: libstdc++-v3/doc/html/manual/abi.html
     release.) If a particular release is not listed, it has the same
     version labels as the preceding release.
 -   </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.1: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.2: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.3: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.4: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.1.0: GLIBCPP_3.1, CXXABI_1</p></li><li cl [...]
-+   </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.1: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.2: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.3: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.4: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.1.0: GLIBCPP_3.1, CXXABI_1</p></li><li cl [...]
++   </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.1: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.2: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.3: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.4: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.1.0: GLIBCPP_3.1, CXXABI_1</p></li><li cl [...]
      __GXX_ABI_VERSION. This macro is defined as the version of the
      compiler v3 ABI, with g++ 3.0 being version 100. This macro will
      be automatically defined whenever g++ is used (the curious can
+Index: libstdc++-v3/doc/html/manual/memory.html
+===================================================================
+--- a/src/libstdc++-v3/doc/html/manual/memory.html	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/doc/html/manual/memory.html	(.../branches/gcc-7-branch)
+@@ -119,8 +119,8 @@
+        Over multiple iterations, various STL container
+      objects have elements inserted to some maximum amount. A variety
+      of allocators are tested.
+-     Test source for <a class="link" href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/sequence.cc?view=markup" target="_top">sequence</a>
+-     and <a class="link" href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/associative.cc?view=markup" target="_top">associative</a>
++     Test source for <a class="link" href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/sequence.cc?view=markup" target="_top">sequence</a>
++     and <a class="link" href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/associative.cc?view=markup" target="_top">associative</a>
+      containers.
+        </p></li><li class="listitem"><p>
+        Insertion and erasure in a multi-threaded environment.
+@@ -129,14 +129,14 @@
+      on a per-thread basis, as well as measuring thread contention
+      for memory resources.
+      Test source
+-    <a class="link" href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert_erase/associative.cc?view=markup" target="_top">here</a>.
++    <a class="link" href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert_erase/associative.cc?view=markup" target="_top">here</a>.
+        </p></li><li class="listitem"><p>
+ 	 A threaded producer/consumer model.
+        </p><p>
+        Test source for
+-     <a class="link" href="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/sequence.cc?view=markup" target="_top">sequence</a>
++     <a class="link" href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/sequence.cc?view=markup" target="_top">sequence</a>
+      and
+-     <a class="link" href="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/associative.cc?view=markup" target="_top">associative</a>
++     <a class="link" href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/associative.cc?view=markup" target="_top">associative</a>
+      containers.
+      </p></li></ol></div><p>
+      The current default choice for
+Index: libstdc++-v3/doc/html/manual/source_organization.html
+===================================================================
+--- a/src/libstdc++-v3/doc/html/manual/source_organization.html	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/doc/html/manual/source_organization.html	(.../branches/gcc-7-branch)
+@@ -70,7 +70,9 @@
+     library.  Support for "make check" and "make check-install" is
+     complete, and runs through all the subdirectories here when this
+     command is issued from the build directory.  Please note that
+-    "make check" requires DejaGNU 1.4 or later to be installed.
++    "make check" requires DejaGnu 1.4 or later to be installed,
++    or for extra <a class="link" href="test.html#test.run.permutations" title="Permutations">permutations</a>
++    DejaGnu 1.5.3 or later.
+     </dd></dl></div><p>
+ Other subdirectories contain variant versions of certain files
+ that are meant to be copied or linked by the configure script.
 Index: libstdc++-v3/doc/html/manual/appendix_porting.html
 ===================================================================
 --- a/src/libstdc++-v3/doc/html/manual/appendix_porting.html	(.../tags/gcc_7_1_0_release)
@@ -143,6 +673,52 @@ Index: libstdc++-v3/doc/html/manual/appendix_porting.html
  </p></li></ul></div><p>
  Once the new symbol version has been added you can add the names of your new
  symbols in the new version node:
+Index: libstdc++-v3/doc/html/manual/test.html
+===================================================================
+--- a/src/libstdc++-v3/doc/html/manual/test.html	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/doc/html/manual/test.html	(.../branches/gcc-7-branch)
+@@ -327,13 +327,13 @@
+       For example, to run the tests with
+       <code class="option">-O1 -D_GLIBCXX_ASSERTIONS</code>
+       you could use:
+-</p><pre class="programlisting">    make RUNTESTFLAGS=--target_board=unix/-O1/-D_GLIBCXX_ASSERTIONS</pre><p>
++</p><pre class="programlisting">    make check RUNTESTFLAGS=--target_board=unix/-O1/-D_GLIBCXX_ASSERTIONS</pre><p>
+     </p><p>
+       The <code class="option">--target_board</code> option can also be used to run the
+       tests multiple times in different variations. For example, to run the
+       entire testsuite three times using <code class="option">-O3</code> but with
+       different <code class="option">-std</code> options:
+-</p><pre class="programlisting">    make 'RUNTESTFLAGS=--target_board=unix/-O3\"{-std=gnu++98,-std=gnu++11,-std=gnu++14}\"'</pre><p>
++</p><pre class="programlisting">    make check 'RUNTESTFLAGS=--target_board=unix/-O3\"{-std=gnu++98,-std=gnu++11,-std=gnu++14}\"'</pre><p>
+       N.B. that set of variations could also be written as
+       <code class="literal">unix/-O3\"{-std=gnu++98,-std=gnu++11,}\"</code> so that
+       the third variation would use the default for <code class="option">-std</code>
+Index: libstdc++-v3/doc/html/manual/mt_allocator_impl.html
+===================================================================
+--- a/src/libstdc++-v3/doc/html/manual/mt_allocator_impl.html	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/doc/html/manual/mt_allocator_impl.html	(.../branches/gcc-7-branch)
+@@ -155,6 +155,6 @@
+ as part of a container's constructor. However, this assumption is
+ implementation-specific, and subject to change. For an example of a
+ pool that frees memory, see the following
+-    <a class="link" href="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-6.cc?view=markup" target="_top">
++    <a class="link" href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-6.cc?view=markup" target="_top">
+     example.</a>
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mt_allocator_design.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mt_allocator.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="mt_allocator_ex_single.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design Issues </td><td width="20%" align="center"><a accesskey="h" href [...]
+\ No newline at end of file
+Index: libstdc++-v3/doc/html/manual/source_code_style.html
+===================================================================
+--- a/src/libstdc++-v3/doc/html/manual/source_code_style.html	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/doc/html/manual/source_code_style.html	(.../branches/gcc-7-branch)
+@@ -478,7 +478,7 @@
+       Examples: <code class="code">_S_max_elements  _S_default_value</code><br />
+ <br />
+       Don't use names in the same scope that differ only in the prefix,<br />
+-      e.g. _S_top and _M_top. See BADNAMES for a list of forbidden names.<br />
++      e.g. _S_top and _M_top. See <a class="link" href="source_code_style.html#coding_style.bad_identifiers" title="Bad Identifiers">BADNAMES</a> for a list of forbidden names.<br />
+       (The most tempting of these seem to be and "_T" and "__sz".)<br />
+ <br />
+       Names must never have "__" internally; it would confuse name<br />
 Index: libstdc++-v3/include/std/utility
 ===================================================================
 --- a/src/libstdc++-v3/include/std/utility	(.../tags/gcc_7_1_0_release)
@@ -200,6 +776,45 @@ Index: libstdc++-v3/include/std/functional
  #undef _GLIBCXX_MEM_FN_TRAITS
  #undef _GLIBCXX_MEM_FN_TRAITS2
  
+Index: libstdc++-v3/include/bits/regex_compiler.h
+===================================================================
+--- a/src/libstdc++-v3/include/bits/regex_compiler.h	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/include/bits/regex_compiler.h	(.../branches/gcc-7-branch)
+@@ -209,9 +209,10 @@
+ 		  const typename _TraitsT::locale_type& __loc,
+ 		  regex_constants::syntax_option_type __flags)
+     {
+-      basic_string<typename _TraitsT::char_type> __str(__first, __last);
+-      return __compile_nfa(__str.data(), __str.data() + __str.size(), __loc,
+-          __flags);
++      using char_type = typename _TraitsT::char_type;
++      const basic_string<char_type> __str(__first, __last);
++      return __compile_nfa<const char_type*, _TraitsT>(__str.data(),
++	  __str.data() + __str.size(), __loc, __flags);
+     }
+ 
+   // [28.13.14]
+Index: libstdc++-v3/include/bits/locale_conv.h
+===================================================================
+--- a/src/libstdc++-v3/include/bits/locale_conv.h	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/include/bits/locale_conv.h	(.../branches/gcc-7-branch)
+@@ -375,7 +375,7 @@
+     protected:
+       int
+       sync()
+-      { return _M_buf && _M_conv_put() && _M_buf->pubsync() ? 0 : -1; }
++      { return _M_buf && _M_conv_put() && !_M_buf->pubsync() ? 0 : -1; }
+ 
+       typename _Wide_streambuf::int_type
+       overflow(typename _Wide_streambuf::int_type __out)
+@@ -482,6 +482,7 @@
+       {
+ 	if (_M_buf->sputn(__p, __n) < __n)
+ 	  return false;
++	return true;
+       }
+ 
+       // convert the put area and write to the byte stream buffer
 Index: libstdc++-v3/include/bits/node_handle.h
 ===================================================================
 --- a/src/libstdc++-v3/include/bits/node_handle.h	(.../tags/gcc_7_1_0_release)
@@ -281,7 +896,59 @@ Index: libstdc++-v3/ChangeLog
 ===================================================================
 --- a/src/libstdc++-v3/ChangeLog	(.../tags/gcc_7_1_0_release)
 +++ b/src/libstdc++-v3/ChangeLog	(.../branches/gcc-7-branch)
-@@ -1,3 +1,47 @@
+@@ -1,3 +1,99 @@
++2017-06-16  Jakub Jelinek  <jakub at redhat.com>
++
++	PR libstdc++/81092
++	* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
++
++2017-06-16  Jonathan Wakely  <jwakely at redhat.com>
++
++	* include/bits/locale_conv.h (wbuffer_convert::sync): Fix condition.
++	* testsuite/22_locale/conversions/buffer/2.cc: New.
++
++	* doc/xml/manual/appendix_contributing.xml: Link to the list of bad
++	names, and link to the test docs and note higher DejaGnu version
++	requirement.
++	* doc/xml/manual/allocator.xml: Fix ViewCVS URLs.
++	* doc/xml/manual/mt_allocator.xml: Likewise.
++	* doc/xml/manual/test.xml: Correct instructions on running tests.
++	* doc/html/*: Regenerate.
++
++	PR libstdc++/81092
++	* acinclude.m4: Bump libtool_VERSION.
++	* config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
++	* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
++	* config/abi/pre/gnu.ver: Add wstring constructor symbols to new
++	GLIBCXX_3.4.24 version.
++	* doc/xml/manual/abi.xml: Document new versions.
++	* doc/html/*: Regenerate.
++	* testsuite/21_strings/basic_string/cons/char/8.cc: Use base object
++	constructors to ensure required symbols are exported.
++	* testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
++	* testsuite/util/testsuite_abi.cc: Add new version.
++
++	* include/bits/locale_conv.h (wbuffer_convert::_M_put): Add missing
++	return statement.
++	* testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
++	Return void.
++	* testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
++	Likewise.
++	* testsuite/23_containers/map/modifiers/insert_or_assign/1.cc: Add
++	missing return statements.
++	* testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
++	Likewise.
++	* testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc:
++	Return void.
++	* testsuite/special_functions/14_expint/pr68397.cc: Likewise.
++
++2017-06-07  Jonathan Wakely  <jwakely at redhat.com>
++
++	PR libstdc++/81002
++	* include/bits/regex_compiler.h (__compile_nfa): Add template argument
++	list to specify traits type.
++	* testsuite/28_regex/basic_regex/ctors/basic/iter.cc: New.
++
 +2017-05-19  Jonathan Wakely  <jwakely at redhat.com>
 +
 +	PR libstdc++/80796
@@ -381,6 +1048,102 @@ Index: libstdc++-v3/testsuite/25_algorithms/search/searcher.cc
 +{
 +  test01();
 +}
+Index: libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/iter.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/iter.cc	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/iter.cc	(.../branches/gcc-7-branch)
+@@ -0,0 +1,30 @@
++// Copyright (C) 2017 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3.  If not see
++// <http://www.gnu.org/licenses/>.
++
++// { dg-do compile { target c++11 } }
++
++#include <regex>
++#include <testsuite_iterators.h>
++
++void
++test01()
++{
++  char s[] = "";
++  __gnu_test::test_container<char, __gnu_test::forward_iterator_wrapper> c(s);
++  std::regex r1(c.begin(), c.end());
++  std::regex r2(c.begin(), c.end(), std::regex_constants::grep);
++}
+Index: libstdc++-v3/testsuite/22_locale/conversions/buffer/2.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/22_locale/conversions/buffer/2.cc	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/testsuite/22_locale/conversions/buffer/2.cc	(.../branches/gcc-7-branch)
+@@ -0,0 +1,39 @@
++// Copyright (C) 2017 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3.  If not see
++// <http://www.gnu.org/licenses/>.
++
++// { dg-do run { target c++11 } }
++
++#include <locale>
++#include <sstream>
++#include <testsuite_hooks.h>
++
++void
++test01()
++{
++  struct Cvt : std::codecvt<char, char, std::mbstate_t> { };
++  std::stringstream ss;
++  std::wbuffer_convert<Cvt, char> cvt(ss.rdbuf());
++  auto p = ss.std::ios::rdbuf(&cvt);
++  ss << "hello";
++  VERIFY( ss.flush().good() );
++  ss.std::ios::rdbuf(p);
++}
++
++int main()
++{
++  test01();
++}
+Index: libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc	(.../branches/gcc-7-branch)
+@@ -38,10 +38,12 @@
+   {
+     val = other.val;
+     other.moved_from_assign = true;
++    return *this;
+   }
+   Val& operator=(const Val& other)
+   {
+     val = other.val;
++    return *this;
+   }
+ };
+ 
 Index: libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/extract.cc
 ===================================================================
 --- a/src/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/extract.cc	(.../tags/gcc_7_1_0_release)
@@ -447,6 +1210,23 @@ Index: libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/extract.cc
  int
  main()
  {
+Index: libstdc++-v3/testsuite/23_containers/map/modifiers/insert_or_assign/1.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/23_containers/map/modifiers/insert_or_assign/1.cc	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/testsuite/23_containers/map/modifiers/insert_or_assign/1.cc	(.../branches/gcc-7-branch)
+@@ -39,10 +39,12 @@
+   {
+     val = other.val;
+     other.moved_from_assign = true;
++    return *this;
+   }
+   Val& operator=(const Val& other)
+   {
+     val = other.val;
++    return *this;
+   }
+ };
+ 
 Index: libstdc++-v3/testsuite/23_containers/map/modifiers/extract.cc
 ===================================================================
 --- a/src/libstdc++-v3/testsuite/23_containers/map/modifiers/extract.cc	(.../tags/gcc_7_1_0_release)
@@ -469,6 +1249,140 @@ Index: libstdc++-v3/testsuite/23_containers/map/modifiers/extract.cc
  int
  main()
  {
+Index: libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc	(.../branches/gcc-7-branch)
+@@ -50,7 +50,7 @@
+   VERIFY(is.fail());
+ }
+ 
+-bool test12()
++void test12()
+ {
+   test12_aux<short>(true);
+   test12_aux<int>(true);
+Index: libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc	(.../branches/gcc-7-branch)
+@@ -22,7 +22,7 @@
+ #include <string_view>
+ #include <testsuite_hooks.h>
+ 
+-bool
++void
+ test01()
+ {
+   typedef std::wstring_view::size_type csize_type;
+Index: libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc	(.../branches/gcc-7-branch)
+@@ -22,7 +22,7 @@
+ #include <string_view>
+ #include <testsuite_hooks.h>
+ 
+-bool
++void
+ test01()
+ {
+   typedef std::string_view::size_type csize_type;
+Index: libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/8.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/8.cc	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/8.cc	(.../branches/gcc-7-branch)
+@@ -15,16 +15,31 @@
+ // with this library; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
++// { dg-options "-O0" }
+ // { dg-do run { target c++11 } }
+ 
+ #include <string>
+ #include <testsuite_hooks.h>
+ 
++struct TestBaseObjCtor : std::wstring
++{
++  template<typename... Args>
++    TestBaseObjCtor(Args&&... args)
++    : std::wstring(std::forward<Args>(args)...)
++    { }
++};
++
+ template<typename... Args>
+ std::size_t
+ construct(Args&&... args)
+ {
+-  return std::wstring( std::forward<Args>(args)... ).length();
++  // Use static_cast<Args> to produce either an lvalue or prvalue,
++  // so args... not left in moved-from state and can be reused below:
++  TestBaseObjCtor as_base_obj( static_cast<Args>(args)... );
++
++  std::wstring as_complete_obj( std::forward<Args>(args)... );
++
++  return as_complete_obj.length();
+ }
+ 
+ void
+Index: libstdc++-v3/testsuite/21_strings/basic_string/cons/char/8.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/8.cc	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/8.cc	(.../branches/gcc-7-branch)
+@@ -15,16 +15,31 @@
+ // with this library; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
++// { dg-options "-O0" }
+ // { dg-do run { target c++11 } }
+ 
+ #include <string>
+ #include <testsuite_hooks.h>
+ 
++struct TestBaseObjCtor : std::string
++{
++  template<typename... Args>
++    TestBaseObjCtor(Args&&... args)
++    : std::string(std::forward<Args>(args)...)
++    { }
++};
++
+ template<typename... Args>
+ std::size_t
+ construct(Args&&... args)
+ {
+-  return std::string( std::forward<Args>(args)... ).length();
++  // Use static_cast<Args> to produce either an lvalue or prvalue,
++  // so args... not left in moved-from state and can be reused below:
++  TestBaseObjCtor as_base_obj( static_cast<Args>(args)... );
++
++  std::string as_complete_obj( std::forward<Args>(args)... );
++
++  return as_complete_obj.length();
+ }
+ 
+ void
+Index: libstdc++-v3/testsuite/util/testsuite_abi.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/util/testsuite_abi.cc	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/testsuite/util/testsuite_abi.cc	(.../branches/gcc-7-branch)
+@@ -204,6 +204,7 @@
+       known_versions.push_back("GLIBCXX_LDBL_3.4.21");
+       known_versions.push_back("GLIBCXX_3.4.22");
+       known_versions.push_back("GLIBCXX_3.4.23");
++      known_versions.push_back("GLIBCXX_3.4.24");
+       known_versions.push_back("CXXABI_1.3");
+       known_versions.push_back("CXXABI_LDBL_1.3");
+       known_versions.push_back("CXXABI_1.3.1");
+@@ -234,7 +235,7 @@
+ 	test.version_status = symbol::incompatible;
+ 
+       // Check that added symbols are added in the latest pre-release version.
+-      bool latestp = (test.version_name == "GLIBCXX_3.4.23"
++      bool latestp = (test.version_name == "GLIBCXX_3.4.24"
+ 		     || test.version_name == "CXXABI_1.3.11"
+ 		     || test.version_name == "CXXABI_FLOAT128"
+ 		     || test.version_name == "CXXABI_TM_1");
 Index: libstdc++-v3/testsuite/20_util/function_objects/mem_fn/80478.cc
 ===================================================================
 --- a/src/libstdc++-v3/testsuite/20_util/function_objects/mem_fn/80478.cc	(.../tags/gcc_7_1_0_release)
@@ -555,6 +1469,129 @@ Index: libstdc++-v3/testsuite/20_util/tuple/78939.cc
 +  const volatile auto [i, j] = a;
 +  return i + j;
 +}
+Index: libstdc++-v3/config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt
+===================================================================
+--- a/src/libstdc++-v3/config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt	(.../branches/gcc-7-branch)
+@@ -1329,6 +1329,7 @@
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1EPKwjRKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ERKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ERKS2_@@GLIBCXX_3.4
++FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ERKS2_jRKS1_@@GLIBCXX_3.4.24
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ERKS2_jj@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ERKS2_jjRKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ESt16initializer_listIwERKS1_@@GLIBCXX_3.4.11
+@@ -1342,6 +1343,7 @@
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2EPKwjRKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ERKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ERKS2_@@GLIBCXX_3.4
++FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ERKS2_jRKS1_@@GLIBCXX_3.4.24
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ERKS2_jj@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ERKS2_jjRKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ESt16initializer_listIwERKS1_@@GLIBCXX_3.4.11
+@@ -4002,6 +4004,7 @@
+ OBJECT:0:GLIBCXX_3.4.21
+ OBJECT:0:GLIBCXX_3.4.22
+ OBJECT:0:GLIBCXX_3.4.23
++OBJECT:0:GLIBCXX_3.4.24
+ OBJECT:0:GLIBCXX_3.4.3
+ OBJECT:0:GLIBCXX_3.4.4
+ OBJECT:0:GLIBCXX_3.4.5
+Index: libstdc++-v3/config/abi/post/i386-linux-gnu/baseline_symbols.txt
+===================================================================
+--- a/src/libstdc++-v3/config/abi/post/i386-linux-gnu/baseline_symbols.txt	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/config/abi/post/i386-linux-gnu/baseline_symbols.txt	(.../branches/gcc-7-branch)
+@@ -1329,6 +1329,7 @@
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1EPKwjRKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ERKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ERKS2_@@GLIBCXX_3.4
++FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ERKS2_jRKS1_@@GLIBCXX_3.4.24
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ERKS2_jj@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ERKS2_jjRKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ESt16initializer_listIwERKS1_@@GLIBCXX_3.4.11
+@@ -1342,6 +1343,7 @@
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2EPKwjRKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ERKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ERKS2_@@GLIBCXX_3.4
++FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ERKS2_jRKS1_@@GLIBCXX_3.4.24
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ERKS2_jj@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ERKS2_jjRKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ESt16initializer_listIwERKS1_@@GLIBCXX_3.4.11
+@@ -4002,6 +4004,7 @@
+ OBJECT:0:GLIBCXX_3.4.21
+ OBJECT:0:GLIBCXX_3.4.22
+ OBJECT:0:GLIBCXX_3.4.23
++OBJECT:0:GLIBCXX_3.4.24
+ OBJECT:0:GLIBCXX_3.4.3
+ OBJECT:0:GLIBCXX_3.4.4
+ OBJECT:0:GLIBCXX_3.4.5
+Index: libstdc++-v3/config/abi/post/i486-linux-gnu/baseline_symbols.txt
+===================================================================
+--- a/src/libstdc++-v3/config/abi/post/i486-linux-gnu/baseline_symbols.txt	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/config/abi/post/i486-linux-gnu/baseline_symbols.txt	(.../branches/gcc-7-branch)
+@@ -1329,6 +1329,7 @@
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1EPKwjRKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ERKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ERKS2_@@GLIBCXX_3.4
++FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ERKS2_jRKS1_@@GLIBCXX_3.4.24
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ERKS2_jj@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ERKS2_jjRKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC1ESt16initializer_listIwERKS1_@@GLIBCXX_3.4.11
+@@ -1342,6 +1343,7 @@
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2EPKwjRKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ERKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ERKS2_@@GLIBCXX_3.4
++FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ERKS2_jRKS1_@@GLIBCXX_3.4.24
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ERKS2_jj@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ERKS2_jjRKS1_@@GLIBCXX_3.4
+ FUNC:_ZNSbIwSt11char_traitsIwESaIwEEC2ESt16initializer_listIwERKS1_@@GLIBCXX_3.4.11
+@@ -4002,6 +4004,7 @@
+ OBJECT:0:GLIBCXX_3.4.21
+ OBJECT:0:GLIBCXX_3.4.22
+ OBJECT:0:GLIBCXX_3.4.23
++OBJECT:0:GLIBCXX_3.4.24
+ OBJECT:0:GLIBCXX_3.4.3
+ OBJECT:0:GLIBCXX_3.4.4
+ OBJECT:0:GLIBCXX_3.4.5
+Index: libstdc++-v3/config/abi/pre/gnu.ver
+===================================================================
+--- a/src/libstdc++-v3/config/abi/pre/gnu.ver	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/config/abi/pre/gnu.ver	(.../branches/gcc-7-branch)
+@@ -1953,6 +1953,7 @@
+     # basic_string<C, T, A>::basic_string(const basic_string&, size_type, const A&)
+     _ZNSt7__cxx1112basic_stringI[cw]St11char_traitsI[cw]ESaI[cw]EEC[12]ERKS4_[jmy]RKS3_;
+     _ZNSsC[12]ERKSs[jmy]RKSaIcE;
++    # This should have been _[jmy]RKS1_ not _mRKS1_ (PR libstdc++/81092):
+     _ZNSbIwSt11char_traitsIwESaIwEEC[12]ERKS2_mRKS1_;
+ 
+ #ifndef HAVE_EXCEPTION_PTR_SINCE_GCC46
+@@ -1967,6 +1968,13 @@
+ 
+ } GLIBCXX_3.4.22;
+ 
++GLIBCXX_3.4.24 {
++
++    # These should have been in GLIBCXX_3.4.23 (PR libstdc++/81092):
++    _ZNSbIwSt11char_traitsIwESaIwEEC[12]ERKS2_[jy]RKS1_;
++
++} GLIBCXX_3.4.23;
++
+ # Symbols in the support library (libsupc++) have their own tag.
+ CXXABI_1.3 {
+ 
+Index: libstdc++-v3/acinclude.m4
+===================================================================
+--- a/src/libstdc++-v3/acinclude.m4	(.../tags/gcc_7_1_0_release)
++++ b/src/libstdc++-v3/acinclude.m4	(.../branches/gcc-7-branch)
+@@ -3750,7 +3750,7 @@
+ fi
+ 
+ # For libtool versioning info, format is CURRENT:REVISION:AGE
+-libtool_VERSION=6:23:0
++libtool_VERSION=6:24:0
+ 
+ # Everything parsed; figure out what files and settings to use.
+ case $enable_symvers in
 Index: maintainer-scripts/ChangeLog
 ===================================================================
 --- a/src/maintainer-scripts/ChangeLog	(.../tags/gcc_7_1_0_release)
@@ -742,7 +1779,12 @@ Index: libgcc/ChangeLog
 ===================================================================
 --- a/src/libgcc/ChangeLog	(.../tags/gcc_7_1_0_release)
 +++ b/src/libgcc/ChangeLog	(.../branches/gcc-7-branch)
-@@ -1,3 +1,25 @@
+@@ -1,3 +1,30 @@
++2017-05-26  Richard Henderson  <rth at redhat.com>
++
++	PR libgcc/80037
++	* config/alpha/t-alpha (CRTSTUFF_T_CFLAGS): New.
++
 +2017-05-19  Andreas Tobler  <andreast at gcc.gnu.org>
 +
 +	Backport from mainline
@@ -768,6 +1810,17 @@ Index: libgcc/ChangeLog
  2017-05-02  Release Manager
  
  	* GCC 7.1.0 released.
+Index: libgcc/config/alpha/t-alpha
+===================================================================
+--- a/src/libgcc/config/alpha/t-alpha	(.../tags/gcc_7_1_0_release)
++++ b/src/libgcc/config/alpha/t-alpha	(.../branches/gcc-7-branch)
+@@ -1,2 +1,6 @@
+ # This is a support routine for longlong.h, used by libgcc2.c.
+ LIB2ADD += $(srcdir)/config/alpha/qrnnd.S
++
++# When GAS-generated unwind tables are created, they get created
++# after the __FRAME_END__ terminator, which causes an ld error.
++CRTSTUFF_T_CFLAGS = -fno-unwind-tables
 Index: libgcc/config/sparc/lb1spc.S
 ===================================================================
 --- a/src/libgcc/config/sparc/lb1spc.S	(.../tags/gcc_7_1_0_release)
@@ -840,11 +1893,188 @@ Index: libgcc/config/arm/unwind-arm.h
  
  #ifdef __cplusplus
  }   /* extern "C" */
+Index: gcc/graphite-isl-ast-to-gimple.c
+===================================================================
+--- a/src/gcc/graphite-isl-ast-to-gimple.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/graphite-isl-ast-to-gimple.c	(.../branches/gcc-7-branch)
+@@ -229,8 +229,9 @@
+   tree add_close_phis_to_outer_loops (tree last_merge_name, edge merge_e,
+ 				      gimple *old_close_phi);
+   bool copy_loop_close_phi_args (basic_block old_bb, basic_block new_bb,
+-				 bool postpone);
+-  bool copy_loop_close_phi_nodes (basic_block old_bb, basic_block new_bb);
++				 vec<tree> iv_map, bool postpone);
++  bool copy_loop_close_phi_nodes (basic_block old_bb, basic_block new_bb,
++				  vec<tree> iv_map);
+   bool copy_cond_phi_args (gphi *phi, gphi *new_phi, vec<tree> iv_map,
+ 			   bool postpone);
+   bool copy_cond_phi_nodes (basic_block bb, basic_block new_bb,
+@@ -2079,7 +2080,8 @@
+ /* Copy all the loop-close phi args from BB to NEW_BB.  */
+ 
+ bool translate_isl_ast_to_gimple::
+-copy_loop_close_phi_args (basic_block old_bb, basic_block new_bb, bool postpone)
++copy_loop_close_phi_args (basic_block old_bb, basic_block new_bb,
++			  vec<tree> iv_map, bool postpone)
+ {
+   for (gphi_iterator psi = gsi_start_phis (old_bb); !gsi_end_p (psi);
+        gsi_next (&psi))
+@@ -2089,10 +2091,6 @@
+       if (virtual_operand_p (res))
+ 	continue;
+ 
+-      if (is_gimple_reg (res) && scev_analyzable_p (res, region->region))
+-	/* Loop close phi nodes should not be scev_analyzable_p.  */
+-	gcc_unreachable ();
+-
+       gphi *new_close_phi = create_phi_node (NULL_TREE, new_bb);
+       tree new_res = create_new_def_for (res, new_close_phi,
+ 					 gimple_phi_result_ptr (new_close_phi));
+@@ -2099,12 +2097,23 @@
+       set_rename (res, new_res);
+ 
+       tree old_name = gimple_phi_arg_def (old_close_phi, 0);
+-      tree new_name = get_new_name (new_bb, old_name, old_bb, close_phi);
++      tree new_name;
++      if (is_gimple_reg (res) && scev_analyzable_p (res, region->region))
++	{
++	  gimple_seq stmts;
++	  new_name = get_rename_from_scev (old_name, &stmts,
++					   old_bb->loop_father,
++					   new_bb, old_bb, iv_map);
++	  if (! codegen_error_p ())
++	    gsi_insert_earliest (stmts);
++	}
++      else
++	new_name = get_new_name (new_bb, old_name, old_bb, close_phi);
+ 
+       /* Predecessor basic blocks of a loop close phi should have been code
+ 	 generated before.  FIXME: This is fixable by merging PHIs from inner
+ 	 loops as well.  See: gfortran.dg/graphite/interchange-3.f90.  */
+-      if (!new_name)
++      if (!new_name || codegen_error_p ())
+ 	return false;
+ 
+       add_phi_arg (new_close_phi, new_name, single_pred_edge (new_bb),
+@@ -2152,7 +2161,8 @@
+ /* Copy loop close phi nodes from BB to NEW_BB.  */
+ 
+ bool translate_isl_ast_to_gimple::
+-copy_loop_close_phi_nodes (basic_block old_bb, basic_block new_bb)
++copy_loop_close_phi_nodes (basic_block old_bb, basic_block new_bb,
++			   vec<tree> iv_map)
+ {
+   if (dump_file)
+     fprintf (dump_file, "[codegen] copying loop close phi nodes in bb_%d.\n",
+@@ -2160,7 +2170,7 @@
+   /* Loop close phi nodes should have only one argument.  */
+   gcc_assert (1 == EDGE_COUNT (old_bb->preds));
+ 
+-  return copy_loop_close_phi_args (old_bb, new_bb, true);
++  return copy_loop_close_phi_args (old_bb, new_bb, iv_map, true);
+ }
+ 
+ 
+@@ -2690,7 +2700,7 @@
+       gcc_assert (single_pred_edge (phi_bb)->src->loop_father
+ 		  != single_pred_edge (phi_bb)->dest->loop_father);
+ 
+-      if (!copy_loop_close_phi_nodes (bb, phi_bb))
++      if (!copy_loop_close_phi_nodes (bb, phi_bb, iv_map))
+ 	{
+ 	  codegen_error = true;
+ 	  return NULL;
+@@ -2824,7 +2834,7 @@
+ 	codegen_error = !copy_loop_phi_args (old_phi, ibp_old_bb, new_phi,
+ 					    ibp_new_bb, false);
+       else if (bb_contains_loop_close_phi_nodes (new_bb))
+-	codegen_error = !copy_loop_close_phi_args (old_bb, new_bb, false);
++	codegen_error = !copy_loop_close_phi_args (old_bb, new_bb, iv_map, false);
+       else
+ 	codegen_error = !copy_cond_phi_args (old_phi, new_phi, iv_map, false);
+ 
+Index: gcc/c-family/c-warn.c
+===================================================================
+--- a/src/gcc/c-family/c-warn.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/c-family/c-warn.c	(.../branches/gcc-7-branch)
+@@ -521,10 +521,10 @@
+ 	    = get_alias_set (TREE_TYPE (TREE_OPERAND (expr, 0)));
+ 	  alias_set_type set2 = get_alias_set (TREE_TYPE (type));
+ 
+-	  if (set1 != set2 && set2 != 0
+-	      && (set1 == 0
+-		  || (!alias_set_subset_of (set2, set1)
+-		      && !alias_sets_conflict_p (set1, set2))))
++	  if (set2 != 0
++	      && set1 != set2
++	      && !alias_set_subset_of (set2, set1)
++	      && !alias_sets_conflict_p (set1, set2))
+ 	    {
+ 	      warning (OPT_Wstrict_aliasing, "dereferencing type-punned "
+ 		       "pointer will break strict-aliasing rules");
+Index: gcc/c-family/ChangeLog
+===================================================================
+--- a/src/gcc/c-family/ChangeLog	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/c-family/ChangeLog	(.../branches/gcc-7-branch)
+@@ -1,3 +1,21 @@
++2017-06-07  Richard Biener  <rguenther at suse.de>
++
++	Backport from mainline
++	2017-05-19  Richard Biener  <rguenther at suse.de>
++
++	PR c++/80593
++	* c-warn.c (strict_aliasing_warning): Do not warn for accesses
++	to alias-set zero memory.
++
++2017-06-07  Marek Polacek  <polacek at redhat.com>
++
++	Backport from mainline
++	2017-06-04  Marek Polacek  <polacek at redhat.com>
++
++	PR c/80919
++	* c-format.c (matching_type_p): Return false if any of the types
++	requires structural equality.
++
+ 2017-05-02  Release Manager
+ 
+ 	* GCC 7.1.0 released.
+Index: gcc/c-family/c-format.c
+===================================================================
+--- a/src/gcc/c-family/c-format.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/c-family/c-format.c	(.../branches/gcc-7-branch)
+@@ -3147,6 +3147,12 @@
+   gcc_assert (spec_type);
+   gcc_assert (arg_type);
+ 
++  /* If any of the types requires structural equality, we can't compare
++     their canonical types.  */
++  if (TYPE_STRUCTURAL_EQUALITY_P (spec_type)
++      || TYPE_STRUCTURAL_EQUALITY_P (arg_type))
++    return false;
++
+   spec_type = TYPE_CANONICAL (spec_type);
+   arg_type = TYPE_CANONICAL (arg_type);
+ 
 Index: gcc/c/ChangeLog
 ===================================================================
 --- a/src/gcc/c/ChangeLog	(.../tags/gcc_7_1_0_release)
 +++ b/src/gcc/c/ChangeLog	(.../branches/gcc-7-branch)
-@@ -1,3 +1,12 @@
+@@ -1,3 +1,27 @@
++2017-06-08  Jakub Jelinek  <jakub at redhat.com>
++
++	PR c/81006
++	* c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
++	to sizetype before size_binop.
++
++2017-05-26  Marek Polacek  <polacek at redhat.com>
++
++	Backported from mainline
++	2017-05-17  Marek Polacek  <polacek at redhat.com>
++
++	PR sanitizer/80659
++	* c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
++	DECL_IGNORED_P even for non-static compound literals.
++
 +2017-05-03  Jakub Jelinek <jakub at redhat.com>
 +
 +	Backported from mainline
@@ -857,10 +2087,45 @@ Index: gcc/c/ChangeLog
  2017-05-02  Release Manager
  
  	* GCC 7.1.0 released.
+Index: gcc/c/c-typeck.c
+===================================================================
+--- a/src/gcc/c/c-typeck.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/c/c-typeck.c	(.../branches/gcc-7-branch)
+@@ -12355,9 +12355,9 @@
+ 	  && TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type)))
+ 			== INTEGER_CST)
+ 	{
+-	  tree size = size_binop (PLUS_EXPR,
+-				  TYPE_MAX_VALUE (TYPE_DOMAIN (type)),
+-				  size_one_node);
++	  tree size
++	    = fold_convert (sizetype, TYPE_MAX_VALUE (TYPE_DOMAIN (type)));
++	  size = size_binop (PLUS_EXPR, size, size_one_node);
+ 	  if (TREE_CODE (low_bound) == INTEGER_CST)
+ 	    {
+ 	      if (tree_int_cst_lt (size, low_bound))
 Index: gcc/c/c-decl.c
 ===================================================================
 --- a/src/gcc/c/c-decl.c	(.../tags/gcc_7_1_0_release)
 +++ b/src/gcc/c/c-decl.c	(.../branches/gcc-7-branch)
+@@ -5261,6 +5261,8 @@
+   DECL_CONTEXT (decl) = current_function_decl;
+   TREE_USED (decl) = 1;
+   DECL_READ_P (decl) = 1;
++  DECL_ARTIFICIAL (decl) = 1;
++  DECL_IGNORED_P (decl) = 1;
+   TREE_TYPE (decl) = type;
+   TREE_READONLY (decl) = (TYPE_READONLY (type)
+ 			  || (TREE_CODE (type) == ARRAY_TYPE
+@@ -5297,8 +5299,6 @@
+       set_compound_literal_name (decl);
+       DECL_DEFER_OUTPUT (decl) = 1;
+       DECL_COMDAT (decl) = 1;
+-      DECL_ARTIFICIAL (decl) = 1;
+-      DECL_IGNORED_P (decl) = 1;
+       pushdecl (decl);
+       rest_of_decl_compilation (decl, 1, 0);
+     }
 @@ -10929,9 +10929,12 @@
      case cts_int_n:
        gcc_assert (!specs->long_p && !specs->short_p && !specs->long_long_p);
@@ -883,7 +2148,137 @@ Index: gcc/DATESTAMP
 +++ b/src/gcc/DATESTAMP	(.../branches/gcc-7-branch)
 @@ -1 +1 @@
 -20170502
-+20170524
++20170617
+Index: gcc/fold-const.c
+===================================================================
+--- a/src/gcc/fold-const.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/fold-const.c	(.../branches/gcc-7-branch)
+@@ -9808,6 +9808,7 @@
+ 	  if (TREE_CODE (op1) == INTEGER_CST
+ 	      && tree_int_cst_sgn (op1) == -1
+ 	      && negate_expr_p (op0)
++	      && negate_expr_p (op1)
+ 	      && (tem = negate_expr (op1)) != op1
+ 	      && ! TREE_OVERFLOW (tem))
+ 	    return fold_build2_loc (loc, MULT_EXPR, type,
+Index: gcc/omp-low.c
+===================================================================
+--- a/src/gcc/omp-low.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/omp-low.c	(.../branches/gcc-7-branch)
+@@ -1913,7 +1913,30 @@
+     }
+ }
+ 
++/* Helper function for finish_taskreg_scan, called through walk_tree.
++   If maybe_lookup_decl_in_outer_context returns non-NULL for some
++   tree, replace it in the expression.  */
+ 
++static tree
++finish_taskreg_remap (tree *tp, int *walk_subtrees, void *data)
++{
++  if (VAR_P (*tp))
++    {
++      omp_context *ctx = (omp_context *) data;
++      tree t = maybe_lookup_decl_in_outer_ctx (*tp, ctx);
++      if (t != *tp)
++	{
++	  if (DECL_HAS_VALUE_EXPR_P (t))
++	    t = unshare_expr (DECL_VALUE_EXPR (t));
++	  *tp = t;
++	}
++      *walk_subtrees = 0;
++    }
++  else if (IS_TYPE_OR_DECL_P (*tp))
++    *walk_subtrees = 0;
++  return NULL_TREE;
++}
++
+ /* If any decls have been made addressable during scan_omp,
+    adjust their fields if needed, and layout record types
+    of parallel/task constructs.  */
+@@ -2033,6 +2056,11 @@
+ 	layout_type (ctx->srecord_type);
+       tree t = fold_convert_loc (loc, long_integer_type_node,
+ 				 TYPE_SIZE_UNIT (ctx->record_type));
++      if (TREE_CODE (t) != INTEGER_CST)
++	{
++	  t = unshare_expr (t);
++	  walk_tree (&t, finish_taskreg_remap, ctx, NULL);
++	}
+       gimple_omp_task_set_arg_size (ctx->stmt, t);
+       t = build_int_cst (long_integer_type_node,
+ 			 TYPE_ALIGN_UNIT (ctx->record_type));
+@@ -5140,6 +5168,7 @@
+       if (OMP_CLAUSE_CODE (c) != OMP_CLAUSE_REDUCTION)
+ 	continue;
+ 
++      enum omp_clause_code ccode = OMP_CLAUSE_REDUCTION;
+       orig_var = var = OMP_CLAUSE_DECL (c);
+       if (TREE_CODE (var) == MEM_REF)
+ 	{
+@@ -5146,9 +5175,18 @@
+ 	  var = TREE_OPERAND (var, 0);
+ 	  if (TREE_CODE (var) == POINTER_PLUS_EXPR)
+ 	    var = TREE_OPERAND (var, 0);
+-	  if (TREE_CODE (var) == INDIRECT_REF
+-	      || TREE_CODE (var) == ADDR_EXPR)
++	  if (TREE_CODE (var) == ADDR_EXPR)
+ 	    var = TREE_OPERAND (var, 0);
++	  else
++	    {
++	      /* If this is a pointer or referenced based array
++		 section, the var could be private in the outer
++		 context e.g. on orphaned loop construct.  Pretend this
++		 is private variable's outer reference.  */
++	      ccode = OMP_CLAUSE_PRIVATE;
++	      if (TREE_CODE (var) == INDIRECT_REF)
++		var = TREE_OPERAND (var, 0);
++	    }
+ 	  orig_var = var;
+ 	  if (is_variable_sized (var))
+ 	    {
+@@ -5162,7 +5200,7 @@
+       new_var = lookup_decl (var, ctx);
+       if (var == OMP_CLAUSE_DECL (c) && omp_is_reference (var))
+ 	new_var = build_simple_mem_ref_loc (clause_loc, new_var);
+-      ref = build_outer_var_ref (var, ctx);
++      ref = build_outer_var_ref (var, ctx, ccode);
+       code = OMP_CLAUSE_REDUCTION_CODE (c);
+ 
+       /* reduction(-:var) sums up the partial results, so it acts
+Index: gcc/reorg.c
+===================================================================
+--- a/src/gcc/reorg.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/reorg.c	(.../branches/gcc-7-branch)
+@@ -1694,9 +1694,8 @@
+ }
+ 

+ /* Called when INSN is being moved from a location near the target of a jump.
+-   We leave a marker of the form (use (INSN)) immediately in front
+-   of WHERE for mark_target_live_regs.  These markers will be deleted when
+-   reorg finishes.
++   We leave a marker of the form (use (INSN)) immediately in front of WHERE
++   for mark_target_live_regs.  These markers will be deleted at the end.
+ 
+    We used to try to update the live status of registers if WHERE is at
+    the start of a basic block, but that can't work since we may remove a
+@@ -1705,16 +1704,10 @@
+ static void
+ update_block (rtx_insn *insn, rtx_insn *where)
+ {
+-  /* Ignore if this was in a delay slot and it came from the target of
+-     a branch.  */
+-  if (INSN_FROM_TARGET_P (insn))
+-    return;
+-
+   emit_insn_before (gen_rtx_USE (VOIDmode, insn), where);
+ 
+   /* INSN might be making a value live in a block where it didn't use to
+      be.  So recompute liveness information for this block.  */
+-
+   incr_ticks_for_insn (insn);
+ }
+ 
 Index: gcc/tree-chrec.c
 ===================================================================
 --- a/src/gcc/tree-chrec.c	(.../tags/gcc_7_1_0_release)
@@ -1012,7 +2407,284 @@ Index: gcc/ChangeLog
 ===================================================================
 --- a/src/gcc/ChangeLog	(.../tags/gcc_7_1_0_release)
 +++ b/src/gcc/ChangeLog	(.../branches/gcc-7-branch)
-@@ -1,3 +1,159 @@
+@@ -1,3 +1,436 @@
++2017-06-15  Eric Botcazou  <ebotcazou at adacore.com>
++
++	PR rtl-optimization/80474
++	* reorg.c (update_block): Do not ignore instructions in a delay slot.
++
++2017-06-14  Eric Botcazou  <ebotcazou at adacore.com>
++
++	* config/sparc/sparc.h (MASK_ISA): Add MASK_LEON and MASK_LEON3.
++	(MASK_FEATURES): New macro.
++	* config/sparc/sparc.c (sparc_option_override): Remove the special
++	handling of -mfpu and generalize it to all MASK_FEATURES switches.
++
++2017-06-14  Eric Botcazou  <ebotcazou at adacore.com>
++
++	* config/sparc/driver-sparc.c (cpu_names): Add SPARC-T5 entry.
++
++2017-06-12  David S. Miller  <davem at davemloft.net>
++
++	PR target/80968
++	* config/sparc/sparc.md (return expander): Emit frame blockage if
++	function uses alloca.
++
++2017-06-08  Uros Bizjak  <ubizjak at gmail.com>
++
++	PR target/81015
++	Revert:
++	2016-12-14  Uros Bizjak  <ubizjak at gmail.com>
++
++	PR target/59874
++	* config/i386/i386.md (*ctzhi2): New insn_and_split pattern.
++	(*clzhi2): Ditto.
++
++2017-06-08  David Edelsohn  <dje.gcc at gmail.com>
++
++	Backport from mainline
++	2017-06-02  David Edelsohn  <dje.gcc at gmail.com>
++
++	* dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE_STR): New.
++	(dl_section_ref): New.
++	(dwarf2out_finish): Copy debug_line_section_label to dl_section_ref.
++	On AIX, append an expression to subtract the size of the
++	section length to dl_section_ref.
++
++2017-06-07  Richard Biener  <rguenther at suse.de>
++
++	Backport from mainline
++	2017-05-02  Richard Biener  <rguenther at suse.de>
++
++	PR tree-optimization/80549
++	* tree-cfgcleanup.c (mfb_keep_latches): New helper.
++	(cleanup_tree_cfg_noloop): Create forwarders to known loop
++	headers if they do not have a preheader.
++
++	2017-05-26  Richard Biener  <rguenther at suse.de>
++
++	PR tree-optimization/80842
++	* tree-ssa-ccp.c (set_lattice_value): Always meet with the old
++	value.
++
++	2017-05-31  Richard Biener  <rguenther at suse.de>
++
++	PR tree-optimization/80906
++	* graphite-isl-ast-to-gimple.c (copy_loop_close_phi_nodes): Get
++	and pass through iv_map.
++	(copy_bb_and_scalar_dependences): Adjust.
++	(translate_pending_phi_nodes): Likewise.
++	(copy_loop_close_phi_args): Handle code-generating IVs instead
++	of ICEing.
++
++	2017-05-11  Richard Biener  <rguenther at suse.de>
++
++	PR tree-optimization/80705
++	* tree-vect-data-refs.c (vect_analyze_data_refs): DECL_NONALIASED
++	bases are not vectorizable.
++
++2017-06-06  Michael Meissner  <meissner at linux.vnet.ibm.com>
++
++	Back port from mainline
++	2017-05-19  Michael Meissner  <meissner at linux.vnet.ibm.com>
++
++	PR target/80718
++	* config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Prefer
++	VSX registers over GPRs, particularly on ISA 2.07 which does not
++	have the MTVSRDD instruction.
++
++2017-06-06  David S. Miller  <davem at davemloft.net>
++
++	PR target/80968
++	* config/sparc/sparc.c (sparc_expand_prologue): Emit frame
++	blockage if function uses alloca.
++
++2017-06-05  Volker Reichelt  <v.reichelt at netcologne.de>
++
++	* doc/invoke.texi (-Wduplicated-branches): Add to warning list.
++
++2017-06-02  Prakhar Bahuguna  <prakhar.bahuguna at arm.com>
++
++	Backport from mainline
++	2017-05-05  Andre Vieira  <andre.simoesdiasvieira at arm.com>
++		    Prakhar Bahuguna  <prakhar.bahuguna at arm.com>
++
++	PR target/71607
++	* config/arm/arm.md (use_literal_pool): Remove.
++	(64-bit immediate split): No longer takes cost into consideration
++	if arm_disable_literal_pool is enabled.
++	* config/arm/arm.c (arm_tls_referenced_p): Add diagnostic if TLS is
++	used when arm_disable_literal_pool is enabled.
++	(arm_max_const_double_inline_cost): Remove use of
++	arm_disable_literal_pool.
++	(push_minipool_fix): Add assert.
++	(arm_reorg): Add return if arm_disable_literal_pool is enabled.
++	* config/arm/vfp.md (no_literal_pool_df_immediate): New.
++	(no_literal_pool_sf_immediate): New.
++
++2017-06-02  Jakub Jelinek  <jakub at redhat.com>
++
++	PR rtl-optimization/80903
++	* loop-doloop.c (add_test): Unshare sequence.
++
++2017-05-31  Martin Jambor  <mjambor at suse.cz>
++
++	Backport from mainline
++	2017-04-24  Martin Jambor  <mjambor at suse.cz>
++
++	PR tree-optimization/80293
++	* tree-sra.c (scalarizable_type_p): New parameter const_decl, make
++	char arrays not totally scalarizable if it is false.
++	(analyze_all_variable_accesses): Pass correct value in the new
++	parameter.  Add a statistics counter.
++
++2017-05-30  Max Filippov  <jcmvbkbc at gmail.com>
++
++	Backport from mainline
++	2017-05-29  Max Filippov  <jcmvbkbc at gmail.com>
++
++	* config/xtensa/xtensa.c (xtensa_emit_call): Use
++	HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
++	(print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
++	format string.
++
++2017-05-29  Eric Botcazou  <ebotcazou at adacore.com>
++
++	* doc/install.texi (Options specification): Restore entry of
++	--enable-sjlj-exceptions.
++
++2017-05-29  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
++
++	Backport from mainline
++	2017-05-24  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
++
++	PR target/80725
++	* config/s390/s390.c (s390_check_qrst_address): Check incoming
++	address against address_operand predicate.
++	* config/s390/s390.md ("*indirect_jump"): Swap alternatives.
++
++2017-05-28  Uros Bizjak  <ubizjak at gmail.com>
++
++	Backport from mainline
++	2017-05-23  Uros Bizjak  <ubizjak at gmail.com>
++
++	* config/i386/i386.md (*movdi_internal): Remove SSE4
++	alternative 18 (?r, *v).  Update insn attributes.
++	(*movsi_internal): Remove SSE4 alternative 13 (?r, *v).
++	Update insn attributes.
++	(*zero_extendsidi2): Remove SSE4 alternative (?r, *x).
++	Update insn attributes.
++	* config/i386/sse.md (vec_extract<ssevecmodelower>_0): Remove SSE4
++	alternative 1 (r, v). Remove isa attribute.
++	* config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
++	Always move value through stack for !TARGET_INTER_UNIT_MOVES_TO_VEC
++	and !TARGET_INTER_UNIT_MOVES_TO_VEC targets.
++
++	2017-05-16  Uros Bizjak  <ubizjak at gmail.com>
++
++	* config/i386/i386.md (*movsi_internal): Split (?rm,*y) alternative
++	to (?r,*Yn) and (?m,*y) alternatives, and (?*y,rm) to (?*Ym,r)
++	and (?*y,m).  Update insn attributes.
++
++2017-05-26  Sheldon Lobo  <smlobo at sheldon.us.oracle.com>
++
++	Backported from mainline
++	2017-05-24  Sheldon Lobo  <smlobo at sheldon.us.oracle.com>
++
++	* config/sparc/sparc.md (length): Return the correct value for -mflat
++	sibcalls to match output_sibcall.
++
++2017-05-26  Marek Polacek  <polacek at redhat.com>
++
++	Backported from mainline
++	2017-05-26  Marek Polacek  <polacek at redhat.com>
++
++	PR sanitizer/80875
++	* fold-const.c (fold_binary_loc) <case MULT_EXPR>: Check if OP1
++	can be negated.
++
++2017-05-26  Jakub Jelinek  <jakub at redhat.com>
++
++	Backported from mainline
++	2017-05-22  Jakub Jelinek  <jakub at redhat.com>
++
++	PR middle-end/80809
++	* omp-low.c (finish_taskreg_remap): New function.
++	(finish_taskreg_scan): If unit size of ctx->record_type
++	is non-constant, unshare the size expression and replace
++	decls in it with possible outer var refs.
++
++	PR middle-end/80809
++	* gimplify.c (omp_add_variable): For GOVD_DEBUG_PRIVATE use
++	GOVD_SHARED rather than GOVD_PRIVATE with it.
++	(gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Expect
++	GOVD_SHARED rather than GOVD_PRIVATE with GOVD_DEBUG_PRIVATE.
++
++	PR middle-end/80853
++	* omp-low.c (lower_reduction_clauses): Pass OMP_CLAUSE_PRIVATE
++	as last argument to build_outer_var_ref for pointer bases of array
++	section reductions.
++
++2017-05-25  Michael Meissner  <meissner at linux.vnet.ibm.com>
++
++	Backport from trunk
++	2017-05-18  Michael Meissner  <meissner at linux.vnet.ibm.com>
++
++	PR target/80510
++	* config/rs6000/predicates.md (simple_offsettable_mem_operand):
++	New predicate.
++
++	* config/rs6000/rs6000.md (ALTIVEC_DFORM): New iterator.
++	(define_peephole2 for Altivec d-form load): Add peepholes to catch
++	cases where the register allocator uses a move and an offsettable
++	memory operation to/from a FPR register on ISA 2.06/2.07.
++	(define_peephole2 for Altivec d-form store): Likewise.
++
++	Backport from trunk
++	2017-05-09  Michael Meissner  <meissner at linux.vnet.ibm.com>
++
++	PR target/68163
++	* config/rs6000/rs6000.md (f32_lr): Delete mode attributes that
++	are now unused after splitting mov{sf,sd}_hardfloat.
++	(f32_lr2): Likewise.
++	(f32_lm): Likewise.
++	(f32_lm2): Likewise.
++	(f32_li): Likewise.
++	(f32_li2): Likewise.
++	(f32_lv): Likewise.
++	(f32_sr): Likewise.
++	(f32_sr2): Likewise.
++	(f32_sm): Likewise.
++	(f32_sm2): Likewise.
++	(f32_si): Likewise.
++	(f32_si2): Likewise.
++	(f32_sv): Likewise.
++	(f32_dm): Likewise.
++	(f32_vsx): Likewise.
++	(f32_av): Likewise.
++	(mov<mode>_hardfloat): Split into separate movsf and movsd pieces.
++	For movsf, order stores so the VSX stores occur before the GPR
++	store which encourages the register allocator to use a traditional
++	FPR instead of a GPR.  For movsd, order the stores so that the GPR
++	store comes before the VSX stores to allow the power6 to work.
++	This is due to the power6 not having a 32-bit integer store
++	instruction from a FPR.
++	(movsf_hardfloat): Likewise.
++	(movsd_hardfloat): Likewise.
++
++2017-05-25  Wilco Dijkstra  <wdijkstr at arm.com>
++
++	Backport from mainlin
++	PR rtl-optimization/80754
++	* lra-remat.c (do_remat): Add overlap checks for dst_regno.
++
++2017-05-25  Wilco Dijkstra  <wdijkstr at arm.com>
++
++	Backport from mainline
++	PR target/80671
++	* config/aarch64/cortex-a57-fma-steering.c (merge_forest):
++	Move member access before delete.
++
 +2017-05-23  Sheldon Lobo  <sheldon.lobo at oracle.com>
 +
 +	Backport from mainline
@@ -1172,6 +2844,131 @@ Index: gcc/ChangeLog
  2017-05-02  Release Manager
  
  	* GCC 7.1.0 released.
+@@ -110,9 +547,9 @@
+ 	Backport from mainline
+ 	2017-04-25  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
+ 
+-        PR target/80464
+-        * config/s390/vector.md: Split MEM->GPR vector moves for
+-        non-s_operand addresses.
++	PR target/80464
++	* config/s390/vector.md: Split MEM->GPR vector moves for
++	non-s_operand addresses.
+ 
+ 2017-04-25  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
+ 
+@@ -119,11 +556,11 @@
+ 	Backport from mainline
+ 	2017-04-25  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
+ 
+-        PR target/79895
+-        * config/s390/predicates.md (reload_const_wide_int_operand): New
+-        predicate.
+-        * config/s390/s390.md ("movti"): Remove d/P alternative.
+-        ("movti_bigconst"): New pattern definition.
++	PR target/79895
++	* config/s390/predicates.md (reload_const_wide_int_operand): New
++	predicate.
++	* config/s390/s390.md ("movti"): Remove d/P alternative.
++	("movti_bigconst"): New pattern definition.
+ 
+ 2017-04-25  Dominik Vogt  <vogt at linux.vnet.ibm.com>
+ 
+@@ -130,30 +567,30 @@
+ 	Backport from maineline
+ 	2017-04-25  Dominik Vogt  <vogt at linux.vnet.ibm.com>
+ 
+-        PR target/80080
+-        * s390-protos.h (s390_expand_cs_hqi): Removed.
+-        (s390_expand_cs, s390_expand_atomic_exchange_tdsi): New prototypes.
+-        * config/s390/s390.c (s390_emit_compare_and_swap): Handle all integer
+-        modes as well as CCZ1mode and CCZmode.
+-        (s390_expand_atomic_exchange_tdsi, s390_expand_atomic): Adapt to new
+-        signature of s390_emit_compare_and_swap.
+-        (s390_expand_cs_hqi): Likewise, make static.
+-        (s390_expand_cs_tdsi): Generate an explicit compare before trying
+-        compare-and-swap, in some cases.
+-        (s390_expand_cs): Wrapper function.
+-        (s390_expand_atomic_exchange_tdsi): New backend specific expander for
+-        atomic_exchange.
+-        (s390_match_ccmode_set): Allow CCZmode <-> CCZ1 mode.
+-        * config/s390/s390.md ("atomic_compare_and_swap<mode>"): Merge the
+-        patterns for small and large integers.  Forbid symref memory operands.
+-        Move expander to s390.c.  Require cc register.
+-        ("atomic_compare_and_swap<DGPR:mode><CCZZ1:mode>_internal")
+-        ("*atomic_compare_and_swap<TDI:mode><CCZZ1:mode>_1")
+-        ("*atomic_compare_and_swapdi<CCZZ1:mode>_2")
+-        ("*atomic_compare_and_swapsi<CCZZ1:mode>_3"): Use s_operand to forbid
+-        symref memory operands.  Remove CC mode and call s390_match_ccmode
+-        instead.
+-        ("atomic_exchange<mode>"): Allow and implement all integer modes.
++	PR target/80080
++	* s390-protos.h (s390_expand_cs_hqi): Removed.
++	(s390_expand_cs, s390_expand_atomic_exchange_tdsi): New prototypes.
++	* config/s390/s390.c (s390_emit_compare_and_swap): Handle all integer
++	modes as well as CCZ1mode and CCZmode.
++	(s390_expand_atomic_exchange_tdsi, s390_expand_atomic): Adapt to new
++	signature of s390_emit_compare_and_swap.
++	(s390_expand_cs_hqi): Likewise, make static.
++	(s390_expand_cs_tdsi): Generate an explicit compare before trying
++	compare-and-swap, in some cases.
++	(s390_expand_cs): Wrapper function.
++	(s390_expand_atomic_exchange_tdsi): New backend specific expander for
++	atomic_exchange.
++	(s390_match_ccmode_set): Allow CCZmode <-> CCZ1 mode.
++	* config/s390/s390.md ("atomic_compare_and_swap<mode>"): Merge the
++	patterns for small and large integers.  Forbid symref memory operands.
++	Move expander to s390.c.  Require cc register.
++	("atomic_compare_and_swap<DGPR:mode><CCZZ1:mode>_internal")
++	("*atomic_compare_and_swap<TDI:mode><CCZZ1:mode>_1")
++	("*atomic_compare_and_swapdi<CCZZ1:mode>_2")
++	("*atomic_compare_and_swapsi<CCZZ1:mode>_3"): Use s_operand to forbid
++	symref memory operands.  Remove CC mode and call s390_match_ccmode
++	instead.
++	("atomic_exchange<mode>"): Allow and implement all integer modes.
+ 
+ 2017-04-25  Dominik Vogt  <vogt at linux.vnet.ibm.com>
+ 
+@@ -160,8 +597,8 @@
+ 	Backport from mainline
+ 	2017-04-25  Dominik Vogt  <vogt at linux.vnet.ibm.com>
+ 
+-        * config/s390/s390.md (define_peephole2): New peephole to help
+-        combining the load-and-test pattern with volatile memory.
++	* config/s390/s390.md (define_peephole2): New peephole to help
++	combining the load-and-test pattern with volatile memory.
+ 
+ 
+ 2017-04-25  Dominik Vogt  <vogt at linux.vnet.ibm.com>
+@@ -169,8 +606,8 @@
+ 	Backport from mainline
+ 	2017-04-25  Dominik Vogt  <vogt at linux.vnet.ibm.com>
+ 
+-        * config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
+-        with CCZmode for TARGET_Z196.
++	* config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
++	with CCZmode for TARGET_Z196.
+ 
+ 2017-04-25  Jakub Jelinek  <jakub at redhat.com>
+ 
+@@ -229,7 +666,7 @@
+ 	(build_array_type): Likewise.  Add typeless_storage argument.
+ 
+ 2017-04-19  Eric Botcazou  <ebotcazou at adacore.com>
+-            Jakub Jelinek  <jakub at redhat.com>
++	    Jakub Jelinek  <jakub at redhat.com>
+ 
+ 	PR tree-optimization/80426
+ 	* tree-vrp.c (extract_range_from_binary_expr_1): For an additive
+@@ -271,7 +708,7 @@
+ 	are only used in debug insns.
+ 
+ 2017-04-19  Eric Botcazou  <ebotcazou at adacore.com>
+-            Vladimir Makarov  <vmakarov at redhat.com>
++	    Vladimir Makarov  <vmakarov at redhat.com>
+ 
+ 	* config/sparc/predicates.md (input_operand): Add comment.  Return
+ 	true for any memory operand when LRA is in progress.
 Index: gcc/testsuite/gcc.target/powerpc/p8-vec-xl-xst.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.target/powerpc/p8-vec-xl-xst.c	(.../tags/gcc_7_1_0_release)
@@ -1239,6 +3036,220 @@ Index: gcc/testsuite/gcc.target/powerpc/p8-vec-xl-xst.c
 +/* { dg-final { scan-assembler-times "lxvd2x"   4 } } */
 +/* { dg-final { scan-assembler-times "stxvd2x"  4 } } */
 +/* { dg-final { scan-assembler-times "xxpermdi" 8 } } */
+Index: gcc/testsuite/gcc.target/powerpc/pr68163.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/powerpc/pr68163.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/powerpc/pr68163.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,209 @@
++/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
++/* { dg-require-effective-target powerpc_p8vector_ok } */
++/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
++/* { dg-options "-mcpu=power8 -O2" } */
++
++/* Make sure that the register allocator does not move SF values to GPR
++   registers in order to do an offsettable store.  */
++
++#ifndef TYPE
++#define TYPE float
++#endif
++
++#ifndef TYPE_IN
++#define TYPE_IN TYPE
++#endif
++
++#ifndef TYPE_OUT
++#define TYPE_OUT TYPE
++#endif
++
++#ifndef ITYPE
++#define ITYPE long
++#endif
++
++#ifdef DO_CALL
++extern ITYPE get_bits (ITYPE);
++
++#else
++#define get_bits(X) (X)
++#endif
++
++void test (ITYPE *bits, ITYPE n, TYPE one, TYPE_IN *p, TYPE_OUT *q)
++{
++  TYPE x_00 = p[ 0];
++  TYPE x_01 = p[ 1];
++  TYPE x_02 = p[ 2];
++  TYPE x_03 = p[ 3];
++  TYPE x_04 = p[ 4];
++  TYPE x_05 = p[ 5];
++  TYPE x_06 = p[ 6];
++  TYPE x_07 = p[ 7];
++  TYPE x_08 = p[ 8];
++  TYPE x_09 = p[ 9];
++
++  TYPE x_10 = p[10];
++  TYPE x_11 = p[11];
++  TYPE x_12 = p[12];
++  TYPE x_13 = p[13];
++  TYPE x_14 = p[14];
++  TYPE x_15 = p[15];
++  TYPE x_16 = p[16];
++  TYPE x_17 = p[17];
++  TYPE x_18 = p[18];
++  TYPE x_19 = p[19];
++
++  TYPE x_20 = p[20];
++  TYPE x_21 = p[21];
++  TYPE x_22 = p[22];
++  TYPE x_23 = p[23];
++  TYPE x_24 = p[24];
++  TYPE x_25 = p[25];
++  TYPE x_26 = p[26];
++  TYPE x_27 = p[27];
++  TYPE x_28 = p[28];
++  TYPE x_29 = p[29];
++
++  TYPE x_30 = p[30];
++  TYPE x_31 = p[31];
++  TYPE x_32 = p[32];
++  TYPE x_33 = p[33];
++  TYPE x_34 = p[34];
++  TYPE x_35 = p[35];
++  TYPE x_36 = p[36];
++  TYPE x_37 = p[37];
++  TYPE x_38 = p[38];
++  TYPE x_39 = p[39];
++
++  TYPE x_40 = p[40];
++  TYPE x_41 = p[41];
++  TYPE x_42 = p[42];
++  TYPE x_43 = p[43];
++  TYPE x_44 = p[44];
++  TYPE x_45 = p[45];
++  TYPE x_46 = p[46];
++  TYPE x_47 = p[47];
++  TYPE x_48 = p[48];
++  TYPE x_49 = p[49];
++
++  ITYPE i;
++
++  for (i = 0; i < n; i++)
++    {
++      ITYPE bit = get_bits (bits[i]);
++
++      if ((bit & ((ITYPE)1) << 	0) != 0) x_00 += one;
++      if ((bit & ((ITYPE)1) << 	1) != 0) x_01 += one;
++      if ((bit & ((ITYPE)1) << 	2) != 0) x_02 += one;
++      if ((bit & ((ITYPE)1) << 	3) != 0) x_03 += one;
++      if ((bit & ((ITYPE)1) << 	4) != 0) x_04 += one;
++      if ((bit & ((ITYPE)1) << 	5) != 0) x_05 += one;
++      if ((bit & ((ITYPE)1) << 	6) != 0) x_06 += one;
++      if ((bit & ((ITYPE)1) << 	7) != 0) x_07 += one;
++      if ((bit & ((ITYPE)1) << 	8) != 0) x_08 += one;
++      if ((bit & ((ITYPE)1) << 	9) != 0) x_09 += one;
++
++      if ((bit & ((ITYPE)1) << 10) != 0) x_10 += one;
++      if ((bit & ((ITYPE)1) << 11) != 0) x_11 += one;
++      if ((bit & ((ITYPE)1) << 12) != 0) x_12 += one;
++      if ((bit & ((ITYPE)1) << 13) != 0) x_13 += one;
++      if ((bit & ((ITYPE)1) << 14) != 0) x_14 += one;
++      if ((bit & ((ITYPE)1) << 15) != 0) x_15 += one;
++      if ((bit & ((ITYPE)1) << 16) != 0) x_16 += one;
++      if ((bit & ((ITYPE)1) << 17) != 0) x_17 += one;
++      if ((bit & ((ITYPE)1) << 18) != 0) x_18 += one;
++      if ((bit & ((ITYPE)1) << 19) != 0) x_19 += one;
++
++      if ((bit & ((ITYPE)1) << 20) != 0) x_20 += one;
++      if ((bit & ((ITYPE)1) << 21) != 0) x_21 += one;
++      if ((bit & ((ITYPE)1) << 22) != 0) x_22 += one;
++      if ((bit & ((ITYPE)1) << 23) != 0) x_23 += one;
++      if ((bit & ((ITYPE)1) << 24) != 0) x_24 += one;
++      if ((bit & ((ITYPE)1) << 25) != 0) x_25 += one;
++      if ((bit & ((ITYPE)1) << 26) != 0) x_26 += one;
++      if ((bit & ((ITYPE)1) << 27) != 0) x_27 += one;
++      if ((bit & ((ITYPE)1) << 28) != 0) x_28 += one;
++      if ((bit & ((ITYPE)1) << 29) != 0) x_29 += one;
++
++      if ((bit & ((ITYPE)1) << 30) != 0) x_30 += one;
++      if ((bit & ((ITYPE)1) << 31) != 0) x_31 += one;
++      if ((bit & ((ITYPE)1) << 32) != 0) x_32 += one;
++      if ((bit & ((ITYPE)1) << 33) != 0) x_33 += one;
++      if ((bit & ((ITYPE)1) << 34) != 0) x_34 += one;
++      if ((bit & ((ITYPE)1) << 35) != 0) x_35 += one;
++      if ((bit & ((ITYPE)1) << 36) != 0) x_36 += one;
++      if ((bit & ((ITYPE)1) << 37) != 0) x_37 += one;
++      if ((bit & ((ITYPE)1) << 38) != 0) x_38 += one;
++      if ((bit & ((ITYPE)1) << 39) != 0) x_39 += one;
++
++      if ((bit & ((ITYPE)1) << 40) != 0) x_40 += one;
++      if ((bit & ((ITYPE)1) << 41) != 0) x_41 += one;
++      if ((bit & ((ITYPE)1) << 42) != 0) x_42 += one;
++      if ((bit & ((ITYPE)1) << 43) != 0) x_43 += one;
++      if ((bit & ((ITYPE)1) << 44) != 0) x_44 += one;
++      if ((bit & ((ITYPE)1) << 45) != 0) x_45 += one;
++      if ((bit & ((ITYPE)1) << 46) != 0) x_46 += one;
++      if ((bit & ((ITYPE)1) << 47) != 0) x_47 += one;
++      if ((bit & ((ITYPE)1) << 48) != 0) x_48 += one;
++      if ((bit & ((ITYPE)1) << 49) != 0) x_49 += one;
++    }
++
++  q[ 0] = x_00;
++  q[ 1] = x_01;
++  q[ 2] = x_02;
++  q[ 3] = x_03;
++  q[ 4] = x_04;
++  q[ 5] = x_05;
++  q[ 6] = x_06;
++  q[ 7] = x_07;
++  q[ 8] = x_08;
++  q[ 9] = x_09;
++
++  q[10] = x_10;
++  q[11] = x_11;
++  q[12] = x_12;
++  q[13] = x_13;
++  q[14] = x_14;
++  q[15] = x_15;
++  q[16] = x_16;
++  q[17] = x_17;
++  q[18] = x_18;
++  q[19] = x_19;
++
++  q[20] = x_20;
++  q[21] = x_21;
++  q[22] = x_22;
++  q[23] = x_23;
++  q[24] = x_24;
++  q[25] = x_25;
++  q[26] = x_26;
++  q[27] = x_27;
++  q[28] = x_28;
++  q[29] = x_29;
++
++  q[30] = x_30;
++  q[31] = x_31;
++  q[32] = x_32;
++  q[33] = x_33;
++  q[34] = x_34;
++  q[35] = x_35;
++  q[36] = x_36;
++  q[37] = x_37;
++  q[38] = x_38;
++  q[39] = x_39;
++
++  q[40] = x_40;
++  q[41] = x_41;
++  q[42] = x_42;
++  q[43] = x_43;
++  q[44] = x_44;
++  q[45] = x_45;
++  q[46] = x_46;
++  q[47] = x_47;
++  q[48] = x_48;
++  q[49] = x_49;
++}
++
++/* { dg-final { scan-assembler-not {\mmfvsrd\M} } } */
++/* { dg-final { scan-assembler-not {\mstw\M}    } } */
 Index: gcc/testsuite/gcc.target/powerpc/versioned-copy-loop.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.target/powerpc/versioned-copy-loop.c	(.../tags/gcc_7_1_0_release)
@@ -1361,6 +3372,974 @@ Index: gcc/testsuite/gcc.target/powerpc/ppc-round3.c
 +{
 +  return (float)(unsigned int)a;
 +}
+Index: gcc/testsuite/gcc.target/powerpc/pr80510-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/powerpc/pr80510-1.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/powerpc/pr80510-1.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,211 @@
++/* { dg-do compile { target { powerpc*-*-* } } } */
++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
++/* { dg-require-effective-target powerpc_vsx_ok } */
++/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
++/* { dg-options "-mcpu=power7 -O2" } */
++
++/* Make sure that STXSDX is generated for double scalars in Altivec registers
++   on power7 instead of moving the value to a FPR register and doing a X-FORM
++   store.  */
++
++#ifndef TYPE
++#define TYPE double
++#endif
++
++#ifndef TYPE_IN
++#define TYPE_IN TYPE
++#endif
++
++#ifndef TYPE_OUT
++#define TYPE_OUT TYPE
++#endif
++
++#ifndef ITYPE
++#define ITYPE long
++#endif
++
++#ifdef DO_CALL
++extern ITYPE get_bits (ITYPE);
++
++#else
++#define get_bits(X) (X)
++#endif
++
++void test (ITYPE *bits, ITYPE n, TYPE one, TYPE_IN *p, TYPE_OUT *q)
++{
++  TYPE x_00 = p[ 0];
++  TYPE x_01 = p[ 1];
++  TYPE x_02 = p[ 2];
++  TYPE x_03 = p[ 3];
++  TYPE x_04 = p[ 4];
++  TYPE x_05 = p[ 5];
++  TYPE x_06 = p[ 6];
++  TYPE x_07 = p[ 7];
++  TYPE x_08 = p[ 8];
++  TYPE x_09 = p[ 9];
++
++  TYPE x_10 = p[10];
++  TYPE x_11 = p[11];
++  TYPE x_12 = p[12];
++  TYPE x_13 = p[13];
++  TYPE x_14 = p[14];
++  TYPE x_15 = p[15];
++  TYPE x_16 = p[16];
++  TYPE x_17 = p[17];
++  TYPE x_18 = p[18];
++  TYPE x_19 = p[19];
++
++  TYPE x_20 = p[20];
++  TYPE x_21 = p[21];
++  TYPE x_22 = p[22];
++  TYPE x_23 = p[23];
++  TYPE x_24 = p[24];
++  TYPE x_25 = p[25];
++  TYPE x_26 = p[26];
++  TYPE x_27 = p[27];
++  TYPE x_28 = p[28];
++  TYPE x_29 = p[29];
++
++  TYPE x_30 = p[30];
++  TYPE x_31 = p[31];
++  TYPE x_32 = p[32];
++  TYPE x_33 = p[33];
++  TYPE x_34 = p[34];
++  TYPE x_35 = p[35];
++  TYPE x_36 = p[36];
++  TYPE x_37 = p[37];
++  TYPE x_38 = p[38];
++  TYPE x_39 = p[39];
++
++  TYPE x_40 = p[40];
++  TYPE x_41 = p[41];
++  TYPE x_42 = p[42];
++  TYPE x_43 = p[43];
++  TYPE x_44 = p[44];
++  TYPE x_45 = p[45];
++  TYPE x_46 = p[46];
++  TYPE x_47 = p[47];
++  TYPE x_48 = p[48];
++  TYPE x_49 = p[49];
++
++  ITYPE i;
++
++  for (i = 0; i < n; i++)
++    {
++      ITYPE bit = get_bits (bits[i]);
++
++      if ((bit & ((ITYPE)1) << 	0) != 0) x_00 += one;
++      if ((bit & ((ITYPE)1) << 	1) != 0) x_01 += one;
++      if ((bit & ((ITYPE)1) << 	2) != 0) x_02 += one;
++      if ((bit & ((ITYPE)1) << 	3) != 0) x_03 += one;
++      if ((bit & ((ITYPE)1) << 	4) != 0) x_04 += one;
++      if ((bit & ((ITYPE)1) << 	5) != 0) x_05 += one;
++      if ((bit & ((ITYPE)1) << 	6) != 0) x_06 += one;
++      if ((bit & ((ITYPE)1) << 	7) != 0) x_07 += one;
++      if ((bit & ((ITYPE)1) << 	8) != 0) x_08 += one;
++      if ((bit & ((ITYPE)1) << 	9) != 0) x_09 += one;
++
++      if ((bit & ((ITYPE)1) << 10) != 0) x_10 += one;
++      if ((bit & ((ITYPE)1) << 11) != 0) x_11 += one;
++      if ((bit & ((ITYPE)1) << 12) != 0) x_12 += one;
++      if ((bit & ((ITYPE)1) << 13) != 0) x_13 += one;
++      if ((bit & ((ITYPE)1) << 14) != 0) x_14 += one;
++      if ((bit & ((ITYPE)1) << 15) != 0) x_15 += one;
++      if ((bit & ((ITYPE)1) << 16) != 0) x_16 += one;
++      if ((bit & ((ITYPE)1) << 17) != 0) x_17 += one;
++      if ((bit & ((ITYPE)1) << 18) != 0) x_18 += one;
++      if ((bit & ((ITYPE)1) << 19) != 0) x_19 += one;
++
++      if ((bit & ((ITYPE)1) << 20) != 0) x_20 += one;
++      if ((bit & ((ITYPE)1) << 21) != 0) x_21 += one;
++      if ((bit & ((ITYPE)1) << 22) != 0) x_22 += one;
++      if ((bit & ((ITYPE)1) << 23) != 0) x_23 += one;
++      if ((bit & ((ITYPE)1) << 24) != 0) x_24 += one;
++      if ((bit & ((ITYPE)1) << 25) != 0) x_25 += one;
++      if ((bit & ((ITYPE)1) << 26) != 0) x_26 += one;
++      if ((bit & ((ITYPE)1) << 27) != 0) x_27 += one;
++      if ((bit & ((ITYPE)1) << 28) != 0) x_28 += one;
++      if ((bit & ((ITYPE)1) << 29) != 0) x_29 += one;
++
++      if ((bit & ((ITYPE)1) << 30) != 0) x_30 += one;
++      if ((bit & ((ITYPE)1) << 31) != 0) x_31 += one;
++      if ((bit & ((ITYPE)1) << 32) != 0) x_32 += one;
++      if ((bit & ((ITYPE)1) << 33) != 0) x_33 += one;
++      if ((bit & ((ITYPE)1) << 34) != 0) x_34 += one;
++      if ((bit & ((ITYPE)1) << 35) != 0) x_35 += one;
++      if ((bit & ((ITYPE)1) << 36) != 0) x_36 += one;
++      if ((bit & ((ITYPE)1) << 37) != 0) x_37 += one;
++      if ((bit & ((ITYPE)1) << 38) != 0) x_38 += one;
++      if ((bit & ((ITYPE)1) << 39) != 0) x_39 += one;
++
++      if ((bit & ((ITYPE)1) << 40) != 0) x_40 += one;
++      if ((bit & ((ITYPE)1) << 41) != 0) x_41 += one;
++      if ((bit & ((ITYPE)1) << 42) != 0) x_42 += one;
++      if ((bit & ((ITYPE)1) << 43) != 0) x_43 += one;
++      if ((bit & ((ITYPE)1) << 44) != 0) x_44 += one;
++      if ((bit & ((ITYPE)1) << 45) != 0) x_45 += one;
++      if ((bit & ((ITYPE)1) << 46) != 0) x_46 += one;
++      if ((bit & ((ITYPE)1) << 47) != 0) x_47 += one;
++      if ((bit & ((ITYPE)1) << 48) != 0) x_48 += one;
++      if ((bit & ((ITYPE)1) << 49) != 0) x_49 += one;
++    }
++
++  q[ 0] = x_00;
++  q[ 1] = x_01;
++  q[ 2] = x_02;
++  q[ 3] = x_03;
++  q[ 4] = x_04;
++  q[ 5] = x_05;
++  q[ 6] = x_06;
++  q[ 7] = x_07;
++  q[ 8] = x_08;
++  q[ 9] = x_09;
++
++  q[10] = x_10;
++  q[11] = x_11;
++  q[12] = x_12;
++  q[13] = x_13;
++  q[14] = x_14;
++  q[15] = x_15;
++  q[16] = x_16;
++  q[17] = x_17;
++  q[18] = x_18;
++  q[19] = x_19;
++
++  q[20] = x_20;
++  q[21] = x_21;
++  q[22] = x_22;
++  q[23] = x_23;
++  q[24] = x_24;
++  q[25] = x_25;
++  q[26] = x_26;
++  q[27] = x_27;
++  q[28] = x_28;
++  q[29] = x_29;
++
++  q[30] = x_30;
++  q[31] = x_31;
++  q[32] = x_32;
++  q[33] = x_33;
++  q[34] = x_34;
++  q[35] = x_35;
++  q[36] = x_36;
++  q[37] = x_37;
++  q[38] = x_38;
++  q[39] = x_39;
++
++  q[40] = x_40;
++  q[41] = x_41;
++  q[42] = x_42;
++  q[43] = x_43;
++  q[44] = x_44;
++  q[45] = x_45;
++  q[46] = x_46;
++  q[47] = x_47;
++  q[48] = x_48;
++  q[49] = x_49;
++}
++
++/* { dg-final { scan-assembler     {\mxsadddp\M} } } */
++/* { dg-final { scan-assembler     {\mstxsdx\M}  } } */
++/* { dg-final { scan-assembler-not {\mmfvsrd\M}  } } */
+Index: gcc/testsuite/gcc.target/powerpc/pr80510-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/powerpc/pr80510-2.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/powerpc/pr80510-2.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,212 @@
++/* { dg-do compile { target { powerpc*-*-* } } } */
++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
++/* { dg-require-effective-target powerpc_p8vector_ok } */
++/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
++/* { dg-options "-mcpu=power8 -O2" } */
++
++/* Make sure that STXSSPX is generated for float scalars in Altivec registers
++   on power7 instead of moving the value to a FPR register and doing a X-FORM
++   store.  */
++
++#ifndef TYPE
++#define TYPE float
++#endif
++
++#ifndef TYPE_IN
++#define TYPE_IN TYPE
++#endif
++
++#ifndef TYPE_OUT
++#define TYPE_OUT TYPE
++#endif
++
++#ifndef ITYPE
++#define ITYPE long
++#endif
++
++#ifdef DO_CALL
++extern ITYPE get_bits (ITYPE);
++
++#else
++#define get_bits(X) (X)
++#endif
++
++void test (ITYPE *bits, ITYPE n, TYPE one, TYPE_IN *p, TYPE_OUT *q)
++{
++  TYPE x_00 = p[ 0];
++  TYPE x_01 = p[ 1];
++  TYPE x_02 = p[ 2];
++  TYPE x_03 = p[ 3];
++  TYPE x_04 = p[ 4];
++  TYPE x_05 = p[ 5];
++  TYPE x_06 = p[ 6];
++  TYPE x_07 = p[ 7];
++  TYPE x_08 = p[ 8];
++  TYPE x_09 = p[ 9];
++
++  TYPE x_10 = p[10];
++  TYPE x_11 = p[11];
++  TYPE x_12 = p[12];
++  TYPE x_13 = p[13];
++  TYPE x_14 = p[14];
++  TYPE x_15 = p[15];
++  TYPE x_16 = p[16];
++  TYPE x_17 = p[17];
++  TYPE x_18 = p[18];
++  TYPE x_19 = p[19];
++
++  TYPE x_20 = p[20];
++  TYPE x_21 = p[21];
++  TYPE x_22 = p[22];
++  TYPE x_23 = p[23];
++  TYPE x_24 = p[24];
++  TYPE x_25 = p[25];
++  TYPE x_26 = p[26];
++  TYPE x_27 = p[27];
++  TYPE x_28 = p[28];
++  TYPE x_29 = p[29];
++
++  TYPE x_30 = p[30];
++  TYPE x_31 = p[31];
++  TYPE x_32 = p[32];
++  TYPE x_33 = p[33];
++  TYPE x_34 = p[34];
++  TYPE x_35 = p[35];
++  TYPE x_36 = p[36];
++  TYPE x_37 = p[37];
++  TYPE x_38 = p[38];
++  TYPE x_39 = p[39];
++
++  TYPE x_40 = p[40];
++  TYPE x_41 = p[41];
++  TYPE x_42 = p[42];
++  TYPE x_43 = p[43];
++  TYPE x_44 = p[44];
++  TYPE x_45 = p[45];
++  TYPE x_46 = p[46];
++  TYPE x_47 = p[47];
++  TYPE x_48 = p[48];
++  TYPE x_49 = p[49];
++
++  ITYPE i;
++
++  for (i = 0; i < n; i++)
++    {
++      ITYPE bit = get_bits (bits[i]);
++
++      if ((bit & ((ITYPE)1) << 	0) != 0) x_00 += one;
++      if ((bit & ((ITYPE)1) << 	1) != 0) x_01 += one;
++      if ((bit & ((ITYPE)1) << 	2) != 0) x_02 += one;
++      if ((bit & ((ITYPE)1) << 	3) != 0) x_03 += one;
++      if ((bit & ((ITYPE)1) << 	4) != 0) x_04 += one;
++      if ((bit & ((ITYPE)1) << 	5) != 0) x_05 += one;
++      if ((bit & ((ITYPE)1) << 	6) != 0) x_06 += one;
++      if ((bit & ((ITYPE)1) << 	7) != 0) x_07 += one;
++      if ((bit & ((ITYPE)1) << 	8) != 0) x_08 += one;
++      if ((bit & ((ITYPE)1) << 	9) != 0) x_09 += one;
++
++      if ((bit & ((ITYPE)1) << 10) != 0) x_10 += one;
++      if ((bit & ((ITYPE)1) << 11) != 0) x_11 += one;
++      if ((bit & ((ITYPE)1) << 12) != 0) x_12 += one;
++      if ((bit & ((ITYPE)1) << 13) != 0) x_13 += one;
++      if ((bit & ((ITYPE)1) << 14) != 0) x_14 += one;
++      if ((bit & ((ITYPE)1) << 15) != 0) x_15 += one;
++      if ((bit & ((ITYPE)1) << 16) != 0) x_16 += one;
++      if ((bit & ((ITYPE)1) << 17) != 0) x_17 += one;
++      if ((bit & ((ITYPE)1) << 18) != 0) x_18 += one;
++      if ((bit & ((ITYPE)1) << 19) != 0) x_19 += one;
++
++      if ((bit & ((ITYPE)1) << 20) != 0) x_20 += one;
++      if ((bit & ((ITYPE)1) << 21) != 0) x_21 += one;
++      if ((bit & ((ITYPE)1) << 22) != 0) x_22 += one;
++      if ((bit & ((ITYPE)1) << 23) != 0) x_23 += one;
++      if ((bit & ((ITYPE)1) << 24) != 0) x_24 += one;
++      if ((bit & ((ITYPE)1) << 25) != 0) x_25 += one;
++      if ((bit & ((ITYPE)1) << 26) != 0) x_26 += one;
++      if ((bit & ((ITYPE)1) << 27) != 0) x_27 += one;
++      if ((bit & ((ITYPE)1) << 28) != 0) x_28 += one;
++      if ((bit & ((ITYPE)1) << 29) != 0) x_29 += one;
++
++      if ((bit & ((ITYPE)1) << 30) != 0) x_30 += one;
++      if ((bit & ((ITYPE)1) << 31) != 0) x_31 += one;
++      if ((bit & ((ITYPE)1) << 32) != 0) x_32 += one;
++      if ((bit & ((ITYPE)1) << 33) != 0) x_33 += one;
++      if ((bit & ((ITYPE)1) << 34) != 0) x_34 += one;
++      if ((bit & ((ITYPE)1) << 35) != 0) x_35 += one;
++      if ((bit & ((ITYPE)1) << 36) != 0) x_36 += one;
++      if ((bit & ((ITYPE)1) << 37) != 0) x_37 += one;
++      if ((bit & ((ITYPE)1) << 38) != 0) x_38 += one;
++      if ((bit & ((ITYPE)1) << 39) != 0) x_39 += one;
++
++      if ((bit & ((ITYPE)1) << 40) != 0) x_40 += one;
++      if ((bit & ((ITYPE)1) << 41) != 0) x_41 += one;
++      if ((bit & ((ITYPE)1) << 42) != 0) x_42 += one;
++      if ((bit & ((ITYPE)1) << 43) != 0) x_43 += one;
++      if ((bit & ((ITYPE)1) << 44) != 0) x_44 += one;
++      if ((bit & ((ITYPE)1) << 45) != 0) x_45 += one;
++      if ((bit & ((ITYPE)1) << 46) != 0) x_46 += one;
++      if ((bit & ((ITYPE)1) << 47) != 0) x_47 += one;
++      if ((bit & ((ITYPE)1) << 48) != 0) x_48 += one;
++      if ((bit & ((ITYPE)1) << 49) != 0) x_49 += one;
++    }
++
++  q[ 0] = x_00;
++  q[ 1] = x_01;
++  q[ 2] = x_02;
++  q[ 3] = x_03;
++  q[ 4] = x_04;
++  q[ 5] = x_05;
++  q[ 6] = x_06;
++  q[ 7] = x_07;
++  q[ 8] = x_08;
++  q[ 9] = x_09;
++
++  q[10] = x_10;
++  q[11] = x_11;
++  q[12] = x_12;
++  q[13] = x_13;
++  q[14] = x_14;
++  q[15] = x_15;
++  q[16] = x_16;
++  q[17] = x_17;
++  q[18] = x_18;
++  q[19] = x_19;
++
++  q[20] = x_20;
++  q[21] = x_21;
++  q[22] = x_22;
++  q[23] = x_23;
++  q[24] = x_24;
++  q[25] = x_25;
++  q[26] = x_26;
++  q[27] = x_27;
++  q[28] = x_28;
++  q[29] = x_29;
++
++  q[30] = x_30;
++  q[31] = x_31;
++  q[32] = x_32;
++  q[33] = x_33;
++  q[34] = x_34;
++  q[35] = x_35;
++  q[36] = x_36;
++  q[37] = x_37;
++  q[38] = x_38;
++  q[39] = x_39;
++
++  q[40] = x_40;
++  q[41] = x_41;
++  q[42] = x_42;
++  q[43] = x_43;
++  q[44] = x_44;
++  q[45] = x_45;
++  q[46] = x_46;
++  q[47] = x_47;
++  q[48] = x_48;
++  q[49] = x_49;
++}
++
++/* { dg-final { scan-assembler     {\mxsaddsp\M} } } */
++/* { 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/pr80718.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/powerpc/pr80718.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/powerpc/pr80718.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,298 @@
++/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
++/* { dg-require-effective-target powerpc_p8vector_ok } */
++/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
++/* { dg-options "-mcpu=power8 -O3 -ffast-math" } */
++
++/* Taken from the Spec 2006 milc brenchmark.  Ultimately, GCC wants to generate
++   a DF splat from offsettable memory.  The register allocator decided it was
++   better to do the load in the GPR registers and do a move direct, rather than
++   doing a load in the VSX register sets.  */
++
++typedef struct
++{
++  double real;
++  double imag;
++} complex;
++
++typedef struct
++{
++  double real;
++  double imag;
++} double_complex;
++
++complex cmplx (double x, double y);
++complex cadd (complex * a, complex * b);
++complex cmul (complex * a, complex * b);
++complex csub (complex * a, complex * b);
++complex cdiv (complex * a, complex * b);
++complex conjg (complex * a);
++complex ce_itheta (double theta);
++
++double_complex dcmplx (double x, double y);
++double_complex dcadd (double_complex * a, double_complex * b);
++double_complex dcmul (double_complex * a, double_complex * b);
++double_complex dcsub (double_complex * a, double_complex * b);
++double_complex dcdiv (double_complex * a, double_complex * b);
++double_complex dconjg (double_complex * a);
++double_complex dcexp (double_complex * a);
++double_complex dclog (double_complex * a);
++double_complex dcsqrt (double_complex * z);
++double_complex dce_itheta (double theta);
++
++typedef struct
++{
++  unsigned long r0, r1, r2, r3, r4, r5, r6;
++  unsigned long multiplier, addend, ic_state;
++  double scale;
++} double_prn;
++
++double myrand (double_prn * prn_pt);
++
++typedef struct
++{
++  complex e[3][3];
++} su3_matrix;
++
++typedef struct
++{
++  complex c[3];
++} su3_vector;
++
++typedef struct
++{
++  complex m01, m02, m12;
++  double m00im, m11im, m22im;
++  double space;
++} anti_hermitmat;
++
++typedef struct
++{
++  complex e[2][2];
++} su2_matrix;
++typedef struct
++{
++  su3_vector d[4];
++} wilson_vector;
++typedef struct
++{
++  su3_vector h[2];
++} half_wilson_vector;
++typedef struct
++{
++  wilson_vector c[3];
++} color_wilson_vector;
++typedef struct
++{
++  wilson_vector d[4];
++} spin_wilson_vector;
++typedef struct
++{
++  color_wilson_vector d[4];
++} wilson_matrix;
++typedef struct
++{
++  spin_wilson_vector c[3];
++} wilson_propagator;
++
++void mult_su3_nn (su3_matrix * a, su3_matrix * b, su3_matrix * c);
++void mult_su3_na (su3_matrix * a, su3_matrix * b, su3_matrix * c);
++void mult_su3_an (su3_matrix * a, su3_matrix * b, su3_matrix * c);
++double realtrace_su3 (su3_matrix * a, su3_matrix * b);
++complex trace_su3 (su3_matrix * a);
++complex complextrace_su3 (su3_matrix * a, su3_matrix * b);
++complex det_su3 (su3_matrix * a);
++void add_su3_matrix (su3_matrix * a, su3_matrix * b, su3_matrix * c);
++void sub_su3_matrix (su3_matrix * a, su3_matrix * b, su3_matrix * c);
++void scalar_mult_su3_matrix (su3_matrix * src, double scalar,
++			     su3_matrix * dest);
++void scalar_mult_add_su3_matrix (su3_matrix * src1, su3_matrix * src2,
++				 double scalar, su3_matrix * dest);
++void scalar_mult_sub_su3_matrix (su3_matrix * src1, su3_matrix * src2,
++				 double scalar, su3_matrix * dest);
++void c_scalar_mult_su3mat (su3_matrix * src, complex * scalar,
++			   su3_matrix * dest);
++void c_scalar_mult_add_su3mat (su3_matrix * src1, su3_matrix * src2,
++			       complex * scalar, su3_matrix * dest);
++void c_scalar_mult_sub_su3mat (su3_matrix * src1, su3_matrix * src2,
++			       complex * scalar, su3_matrix * dest);
++void su3_adjoint (su3_matrix * a, su3_matrix * b);
++void make_anti_hermitian (su3_matrix * m3, anti_hermitmat * ah3);
++void random_anti_hermitian (anti_hermitmat * mat_antihermit,
++			    double_prn * prn_pt);
++void uncompress_anti_hermitian (anti_hermitmat * mat_anti, su3_matrix * mat);
++void compress_anti_hermitian (su3_matrix * mat, anti_hermitmat * mat_anti);
++void clear_su3mat (su3_matrix * dest);
++void su3mat_copy (su3_matrix * a, su3_matrix * b);
++void dumpmat (su3_matrix * m);
++
++void su3_projector (su3_vector * a, su3_vector * b, su3_matrix * c);
++complex su3_dot (su3_vector * a, su3_vector * b);
++double su3_rdot (su3_vector * a, su3_vector * b);
++double magsq_su3vec (su3_vector * a);
++void su3vec_copy (su3_vector * a, su3_vector * b);
++void dumpvec (su3_vector * v);
++void clearvec (su3_vector * v);
++
++void mult_su3_mat_vec (su3_matrix * a, su3_vector * b, su3_vector * c);
++void mult_su3_mat_vec_sum (su3_matrix * a, su3_vector * b, su3_vector * c);
++void mult_su3_mat_vec_sum_4dir (su3_matrix * a, su3_vector * b0,
++				su3_vector * b1, su3_vector * b2,
++				su3_vector * b3, su3_vector * c);
++void mult_su3_mat_vec_nsum (su3_matrix * a, su3_vector * b, su3_vector * c);
++void mult_adj_su3_mat_vec (su3_matrix * a, su3_vector * b, su3_vector * c);
++void mult_adj_su3_mat_vec_4dir (su3_matrix * a, su3_vector * b,
++				su3_vector * c);
++void mult_adj_su3_mat_4vec (su3_matrix * mat, su3_vector * src,
++			    su3_vector * dest0, su3_vector * dest1,
++			    su3_vector * dest2, su3_vector * dest3);
++void mult_adj_su3_mat_vec_sum (su3_matrix * a, su3_vector * b,
++			       su3_vector * c);
++void mult_adj_su3_mat_vec_nsum (su3_matrix * a, su3_vector * b,
++				su3_vector * c);
++
++void add_su3_vector (su3_vector * a, su3_vector * b, su3_vector * c);
++void sub_su3_vector (su3_vector * a, su3_vector * b, su3_vector * c);
++void sub_four_su3_vecs (su3_vector * a, su3_vector * b1, su3_vector * b2,
++			su3_vector * b3, su3_vector * b4);
++
++void scalar_mult_su3_vector (su3_vector * src, double scalar,
++			     su3_vector * dest);
++void scalar_mult_add_su3_vector (su3_vector * src1, su3_vector * src2,
++				 double scalar, su3_vector * dest);
++void scalar_mult_sum_su3_vector (su3_vector * src1, su3_vector * src2,
++				 double scalar);
++void scalar_mult_sub_su3_vector (su3_vector * src1, su3_vector * src2,
++				 double scalar, su3_vector * dest);
++void scalar_mult_wvec (wilson_vector * src, double s, wilson_vector * dest);
++void scalar_mult_hwvec (half_wilson_vector * src, double s,
++			half_wilson_vector * dest);
++void scalar_mult_add_wvec (wilson_vector * src1, wilson_vector * src2,
++			   double scalar, wilson_vector * dest);
++void scalar_mult_addtm_wvec (wilson_vector * src1, wilson_vector * src2,
++			     double scalar, wilson_vector * dest);
++void c_scalar_mult_wvec (wilson_vector * src1, complex * phase,
++			 wilson_vector * dest);
++void c_scalar_mult_add_wvec (wilson_vector * src1, wilson_vector * src2,
++			     complex * phase, wilson_vector * dest);
++void c_scalar_mult_add_wvec2 (wilson_vector * src1, wilson_vector * src2,
++			      complex s, wilson_vector * dest);
++void c_scalar_mult_su3vec (su3_vector * src, complex * phase,
++			   su3_vector * dest);
++void c_scalar_mult_add_su3vec (su3_vector * v1, complex * phase,
++			       su3_vector * v2);
++void c_scalar_mult_sub_su3vec (su3_vector * v1, complex * phase,
++			       su3_vector * v2);
++
++void left_su2_hit_n (su2_matrix * u, int p, int q, su3_matrix * link);
++void right_su2_hit_a (su2_matrix * u, int p, int q, su3_matrix * link);
++void dumpsu2 (su2_matrix * u);
++void mult_su2_mat_vec_elem_n (su2_matrix * u, complex * x0, complex * x1);
++void mult_su2_mat_vec_elem_a (su2_matrix * u, complex * x0, complex * x1);
++
++void mult_mat_wilson_vec (su3_matrix * mat, wilson_vector * src,
++			  wilson_vector * dest);
++void mult_su3_mat_hwvec (su3_matrix * mat, half_wilson_vector * src,
++			 half_wilson_vector * dest);
++void mult_adj_mat_wilson_vec (su3_matrix * mat, wilson_vector * src,
++			      wilson_vector * dest);
++void mult_adj_su3_mat_hwvec (su3_matrix * mat, half_wilson_vector * src,
++			     half_wilson_vector * dest);
++
++void add_wilson_vector (wilson_vector * src1, wilson_vector * src2,
++			wilson_vector * dest);
++void sub_wilson_vector (wilson_vector * src1, wilson_vector * src2,
++			wilson_vector * dest);
++double magsq_wvec (wilson_vector * src);
++complex wvec_dot (wilson_vector * src1, wilson_vector * src2);
++complex wvec2_dot (wilson_vector * src1, wilson_vector * src2);
++double wvec_rdot (wilson_vector * a, wilson_vector * b);
++
++void wp_shrink (wilson_vector * src, half_wilson_vector * dest,
++		int dir, int sign);
++void wp_shrink_4dir (wilson_vector * a, half_wilson_vector * b1,
++		     half_wilson_vector * b2, half_wilson_vector * b3,
++		     half_wilson_vector * b4, int sign);
++void wp_grow (half_wilson_vector * src, wilson_vector * dest,
++	      int dir, int sign);
++void wp_grow_add (half_wilson_vector * src, wilson_vector * dest,
++		  int dir, int sign);
++void grow_add_four_wvecs (wilson_vector * a, half_wilson_vector * b1,
++			  half_wilson_vector * b2, half_wilson_vector * b3,
++			  half_wilson_vector * b4, int sign, int sum);
++void mult_by_gamma (wilson_vector * src, wilson_vector * dest, int dir);
++void mult_by_gamma_left (wilson_matrix * src, wilson_matrix * dest, int dir);
++void mult_by_gamma_right (wilson_matrix * src, wilson_matrix * dest, int dir);
++void mult_swv_by_gamma_l (spin_wilson_vector * src, spin_wilson_vector * dest,
++			  int dir);
++void mult_swv_by_gamma_r (spin_wilson_vector * src, spin_wilson_vector * dest,
++			  int dir);
++void su3_projector_w (wilson_vector * a, wilson_vector * b, su3_matrix * c);
++void clear_wvec (wilson_vector * dest);
++void copy_wvec (wilson_vector * src, wilson_vector * dest);
++void dump_wilson_vec (wilson_vector * src);
++
++double gaussian_rand_no (double_prn * prn_pt);
++typedef int int32type;
++typedef unsigned int u_int32type;
++void byterevn (int32type w[], int n);
++
++void
++mult_adj_su3_mat_vec (su3_matrix * a, su3_vector * b, su3_vector * c)
++{
++  int i;
++  register double t, ar, ai, br, bi, cr, ci;
++  for (i = 0; i < 3; i++)
++    {
++      ar = a->e[0][i].real;
++      ai = a->e[0][i].imag;
++
++      br = b->c[0].real;
++      bi = b->c[0].imag;
++
++      cr = ar * br;
++      t = ai * bi;
++      cr += t;
++
++      ci = ar * bi;
++      t = ai * br;
++      ci -= t;
++
++      ar = a->e[1][i].real;
++      ai = a->e[1][i].imag;
++
++      br = b->c[1].real;
++      bi = b->c[1].imag;
++
++      t = ar * br;
++      cr += t;
++      t = ai * bi;
++      cr += t;
++
++      t = ar * bi;
++      ci += t;
++      t = ai * br;
++      ci -= t;
++
++      ar = a->e[2][i].real;
++      ai = a->e[2][i].imag;
++
++      br = b->c[2].real;
++      bi = b->c[2].imag;
++
++      t = ar * br;
++      cr += t;
++      t = ai * bi;
++      cr += t;
++
++      t = ar * bi;
++      ci += t;
++      t = ai * br;
++      ci -= t;
++
++      c->c[i].real = cr;
++      c->c[i].imag = ci;
++    }
++}
++
++/* { dg-final { scan-assembler-not "mtvsrd" } } */
+Index: gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-2.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-2.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,28 @@
++/* { dg-do compile } */
++/* { dg-require-effective-target arm_cortex_m } */
++/* { dg-require-effective-target arm_thumb2_ok } */
++/* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mcpu=*" } { "-mcpu=cortex-m4" "-mcpu=cortex-m7" } } */
++/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
++/* { dg-options "-march=armv7e-m -mfloat-abi=hard -O2 -mthumb -mslow-flash-data" } */
++
++float f (float);
++
++const float max = 0.01f;
++
++int
++g (float in)
++{
++  if (f (in) + f (in) < max)
++    return 0;
++  return 1;
++}
++
++double foo (void)
++{
++  return 0xF1EC7A5239123AF;
++}
++
++double bar (void)
++{
++  return 0.0f;
++}
+Index: gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-3.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-3.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,25 @@
++/* { dg-do compile } */
++/* { dg-require-effective-target arm_cortex_m } */
++/* { dg-require-effective-target arm_thumb2_ok } */
++/* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mcpu=*" } { "-mcpu=cortex-m4" "-mcpu=cortex-m7" } } */
++/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
++/* { dg-options "-march=armv7e-m -mfloat-abi=hard -mthumb -mslow-flash-data" } */
++
++/* From PR71607 */
++
++float b;
++void fn1 ();
++
++float
++fn2 ()
++{
++  return 1.1f;
++}
++
++void
++fn3 ()
++{
++  float a[2];
++  a[1] = b;
++  fn1 (a);
++}
+Index: gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-4.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-4.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,26 @@
++/* { dg-do compile } */
++/* { dg-require-effective-target arm_cortex_m } */
++/* { dg-require-effective-target arm_thumb2_ok } */
++/* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mcpu=*" } { "-mcpu=cortex-m4" "-mcpu=cortex-m7" } } */
++/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
++/* { dg-options "-march=armv7e-m -mfloat-abi=hard -O2 -mthumb -mslow-flash-data" } */
++
++double __attribute__ ((target ("fpu=fpv5-d16")))
++foo (void)
++{
++  return 1.0f;
++}
++
++float __attribute__ ((target ("fpu=fpv5-d16")))
++bar (void)
++{
++  return 1.0f;
++}
++
++float __attribute__ ((target ("fpu=fpv5-sp-d16")))
++baz (void)
++{
++  return 1.0f;
++}
++
++/* { dg-final { scan-assembler-times "#1\\.0e\\+0" 3 } } */
+Index: gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-5.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-5.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-5.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,14 @@
++/* { dg-do compile } */
++/* { dg-require-effective-target arm_cortex_m } */
++/* { dg-require-effective-target arm_thumb2_ok } */
++/* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mcpu=*" } { "-mcpu=cortex-m4" "-mcpu=cortex-m7" } } */
++/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
++/* { dg-options "-march=armv7e-m -mfloat-abi=hard -O2 -mthumb -mslow-flash-data" } */
++
++double __attribute__ ((target ("fpu=fpv5-sp-d16")))
++foo (void)
++{
++  return 1.0f;
++}
++
++/* { dg-final { scan-assembler-not "#1\\.0e\\+0" } } */
+Index: gcc/testsuite/gcc.target/arm/tls-disable-literal-pool.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/arm/tls-disable-literal-pool.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/arm/tls-disable-literal-pool.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,14 @@
++/* { dg-do compile } */
++/* { dg-require-effective-target tls_native } */
++/* { dg-require-effective-target arm_cortex_m } */
++/* { dg-require-effective-target arm_thumb2_ok } */
++/* { dg-options "-mslow-flash-data" } */
++
++__thread int x = 0;
++
++int
++bar ()
++{
++  return x; /* { dg-message "sorry, unimplemented: accessing thread-local storage is not currently supported with -mpure-code or -mslow-flash-data" } */
++}
++
+Index: gcc/testsuite/gcc.target/s390/pr80725.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/s390/pr80725.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/s390/pr80725.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,26 @@
++/* Regression test for PR/80725.  */
++
++/* { dg-do compile } */
++/* { dg-options "-O2 -march=zEC12" } */
++
++int a, e;
++const char b;
++char c;
++const int d;
++void bar (short);
++
++void
++foo (int x, int y)
++{
++  long f = d;
++  short g = 0;
++  while (e)
++    while (a < x)
++      {
++	if (y)
++	  goto *d;
++	g = b | b + g;
++	bar (g);
++	c = (char) (long) foo;
++      }
++}
+Index: gcc/testsuite/gcc.target/sparc/sparc-ret-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/sparc/sparc-ret-3.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/sparc/sparc-ret-3.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,53 @@
++/* PR target/80968 */
++/* { dg-do compile } */
++/* { dg-skip-if "no register windows" { *-*-* } { "-mflat" } { "" } } */
++/* { dg-require-effective-target ilp32 } */
++/* { dg-options "-mcpu=ultrasparc -O" } */
++
++/* Make sure references to the stack frame do not slip into the delay slot
++   of a return instruction.  */
++
++struct crypto_shash {
++	unsigned int descsize;
++};
++struct crypto_shash *tfm;
++
++struct shash_desc {
++	struct crypto_shash *tfm;
++	unsigned int flags;
++
++	void *__ctx[] __attribute__((aligned(8)));
++};
++
++static inline unsigned int crypto_shash_descsize(struct crypto_shash *tfm)
++{
++	return tfm->descsize;
++}
++
++static inline void *shash_desc_ctx(struct shash_desc *desc)
++{
++	return desc->__ctx;
++}
++
++#define SHASH_DESC_ON_STACK(shash, ctx)				  \
++	char __##shash##_desc[sizeof(struct shash_desc) +	  \
++			      crypto_shash_descsize(ctx)] __attribute__((aligned(8))); \
++	struct shash_desc *shash = (struct shash_desc *)__##shash##_desc
++
++extern int crypto_shash_update(struct shash_desc *, const void *, unsigned int);
++
++unsigned int bug(unsigned int crc, const void *address, unsigned int length)
++{
++	SHASH_DESC_ON_STACK(shash, tfm);
++	unsigned int *ctx = (unsigned int *)shash_desc_ctx(shash);
++	int err;
++
++	shash->tfm = tfm;
++	shash->flags = 0;
++	*ctx = crc;
++
++	err = crypto_shash_update(shash, address, length);
++
++	return *ctx;
++}
++/* { dg-final { scan-assembler "ld\[ \t\]*\\\[%i5\\+8\\\], %i0\n\[^\n\]*return\[ \t\]*%i7\\+8" } } */
+Index: gcc/testsuite/gcc.target/sparc/overflow-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/sparc/overflow-4.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/sparc/overflow-4.c	(.../branches/gcc-7-branch)
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O" } */
++/* { dg-options "-O -mno-vis3" } */
+ /* { dg-require-effective-target lp64 } */
+ 
+ #include <stdbool.h>
 Index: gcc/testsuite/gcc.target/sparc/niagara7-align.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.target/sparc/niagara7-align.c	(.../tags/gcc_7_1_0_release)
@@ -1435,6 +4414,69 @@ Index: gcc/testsuite/gcc.target/i386/pr80706.c
 +    __builtin_abort ();
 +  return 0;
 +}
+Index: gcc/testsuite/gcc.target/i386/pr81015.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/pr81015.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/i386/pr81015.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,21 @@
++/* { dg-do run } */
++/* { dg-options "-O2 -mlzcnt" } */
++/* { dg-require-effective-target lzcnt } */
++
++#include "lzcnt-check.h"
++
++int
++__attribute__ ((noinline, noclone))
++foo (unsigned short a)
++{
++  return __builtin_clz (a);
++}
++
++static void
++lzcnt_test ()
++{
++  int res = foo (1);
++
++  if (res != 31)
++    abort ();
++}
+Index: gcc/testsuite/gcc.target/i386/pr59874-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/pr59874-1.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/i386/pr59874-1.c	(.../branches/gcc-7-branch)
+@@ -6,5 +6,5 @@
+ unsigned int
+ foo (unsigned short x)
+ {
+-  return x ? __builtin_ctz (x) : 16U;
++  return x ? __builtin_ctzs (x) : 16U;
+ }
+Index: gcc/testsuite/gcc.target/i386/pr59874-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/pr59874-2.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.target/i386/pr59874-2.c	(.../branches/gcc-7-branch)
+@@ -6,5 +6,5 @@
+ unsigned int
+ foo (unsigned short x)
+ {
+-  return x ? __builtin_clz (x) : 16U;
++  return x ? __builtin_clzs (x) : 16U;
+ }
+Index: gcc/testsuite/gfortran.dg/gomp/pr80918.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/gomp/pr80918.f90	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/gomp/pr80918.f90	(.../branches/gcc-7-branch)
+@@ -0,0 +1,10 @@
++! PR fortran/80918
++! { dg-do compile }
++
++subroutine foo (a)
++  integer :: a(*)
++  !$omp task depend(inout:a)
++  !$omp end task
++  !$omp task depend(inout:a)
++  !$omp end task
++end subroutine foo
 Index: gcc/testsuite/gfortran.dg/pr80752.f90
 ===================================================================
 --- a/src/gcc/testsuite/gfortran.dg/pr80752.f90	(.../tags/gcc_7_1_0_release)
@@ -1625,6 +4667,91 @@ Index: gcc/testsuite/gfortran.dg/namelist_91.f90
 +   class(t), allocatable :: x
 +   namelist /nml/ x
 +end
+Index: gcc/testsuite/gfortran.dg/inline_matmul_18.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/inline_matmul_18.f90	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/inline_matmul_18.f90	(.../branches/gcc-7-branch)
+@@ -0,0 +1,16 @@
++! { dg-do  run }
++! { dg-options "-O -finline-matmul-limit=100 -fdump-tree-optimized" }
++! PR 80975 - this did not zero the result array in the library version;
++! make sure this also doesn't happen in the inline version.
++program bogus_matmul
++  implicit none
++  real :: M(3,0), v(0), w(3)
++
++  w = 7
++  w = matmul(M,v)
++  if( any(w .ne. 0) ) then
++    call abort
++  end if
++end program bogus_matmul
++! { dg-final { scan-tree-dump-times "matmul_r4" 0 "optimized" } }
++
+Index: gcc/testsuite/gfortran.dg/matmul_bounds_12.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/matmul_bounds_12.f90	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/matmul_bounds_12.f90	(.../branches/gcc-7-branch)
+@@ -0,0 +1,17 @@
++! { dg-do run }
++program main
++  real, dimension(3,2) :: a
++  real, dimension(3) :: bp
++  real, dimension(3) :: res1
++  real, dimension(:), allocatable :: c3
++  real, dimension(2) :: res2
++
++  data a /-2., 3., -5., 7., -11., 13./
++  data bp /-23., -31., -41./
++  data res2 /158., -353./
++
++  c3 = matmul(bp,a)
++  if (size(c3,1) /= 2) call abort
++  if (any(c3 /= res2)) call abort
++
++end program main
+Index: gcc/testsuite/gfortran.dg/typebound_call_28.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/typebound_call_28.f90	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/typebound_call_28.f90	(.../branches/gcc-7-branch)
+@@ -0,0 +1,37 @@
++! { dg-do compile }
++!
++! PR 80766: [7/8 Regression] [OOP] ICE with type-bound procedure returning an array
++!
++! Contributed by Vladimir Fuka <vladimir.fuka at gmail.com>
++
++module m1
++
++  type :: base
++  contains
++     procedure :: fun
++  end type
++
++  type, extends(base) :: child
++  end type
++
++contains
++
++  function fun(o) result(res)
++    real :: res(3)
++    class(base) :: o
++    res = 0
++  end function
++end module
++
++
++module m2
++contains
++
++  subroutine sub(o)
++    use m1
++    class(child) :: o
++    real :: res(3)
++
++    res = o%fun()
++  end subroutine
++end module
 Index: gcc/testsuite/gfortran.dg/intent_out_9.f90
 ===================================================================
 --- a/src/gcc/testsuite/gfortran.dg/intent_out_9.f90	(.../tags/gcc_7_1_0_release)
@@ -1749,6 +4876,37 @@ Index: gcc/testsuite/gfortran.dg/read_4.f90
 +  read(io, *, iostat=ios) line
 +  if (line.ne.'done') call abort
 +end
+Index: gcc/testsuite/gfortran.dg/proc_ptr_comp_50.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/proc_ptr_comp_50.f90	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/proc_ptr_comp_50.f90	(.../branches/gcc-7-branch)
+@@ -0,0 +1,26 @@
++! { dg-do compile }
++!
++! PR 70601: [5/6/7 Regression] [OOP] ICE on procedure pointer component call
++!
++! Contributed by zmi <zmi007 at gmail.com>
++
++program test
++  implicit none
++
++  type :: concrete_type
++    procedure (run_concrete_type), pointer :: run
++  end type
++
++  type(concrete_type), allocatable :: concrete
++
++  allocate(concrete)
++  concrete % run => run_concrete_type
++  call concrete % run()
++
++contains
++
++   subroutine run_concrete_type(this)
++      class(concrete_type) :: this
++   end subroutine
++
++end
 Index: gcc/testsuite/gfortran.dg/namelist_94.f90
 ===================================================================
 --- a/src/gcc/testsuite/gfortran.dg/namelist_94.f90	(.../tags/gcc_7_1_0_release)
@@ -1786,6 +4944,24 @@ Index: gcc/testsuite/gfortran.dg/namelist_94.f90
 +  WRITE (*, nml)
 +  READ (*, nml) ! { dg-error "is polymorphic and requires a defined input/output procedure" }
 +END
+Index: gcc/testsuite/gfortran.dg/matmul_16.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/matmul_16.f90	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/matmul_16.f90	(.../branches/gcc-7-branch)
+@@ -0,0 +1,13 @@
++! { dg-do  run }
++! { dg-options "-finline-matmul-limit=0" }
++! PR 80975 - this did not zero the result array
++program bogus_matmul
++  implicit none
++  real :: M(3,0), v(0), w(3)
++
++  w = 7
++  w = matmul(M,v)
++  if( any(w .ne. 0) ) then
++    call abort
++  end if
++end program bogus_matmul
 Index: gcc/testsuite/gnat.dg/specs/not_null1.ads
 ===================================================================
 --- a/src/gcc/testsuite/gnat.dg/specs/not_null1.ads	(.../tags/gcc_7_1_0_release)
@@ -1817,6 +4993,134 @@ 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/asan/pr80659.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/asan/pr80659.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.dg/asan/pr80659.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,13 @@
++/* PR sanitizer/80659 */
++/* { dg-do compile } */
++
++void
++foo (int a)
++{
++  switch (a)
++    {
++    case 0:
++      (int[3]) { };
++      int h;
++    }
++}
+Index: gcc/testsuite/gcc.dg/graphite/pr80906.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/graphite/pr80906.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.dg/graphite/pr80906.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,28 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -floop-nest-optimize -fdump-tree-graphite" } */
++
++int qc;
++
++int
++ec (int lh[][2])
++{
++  const int jv = 3;
++  int zf, hp, c5 = 0, m3 = 1;
++
++  for (zf = 0; zf < jv; ++zf)
++    for (hp = 0; hp < jv; ++hp)
++      {
++	short int bm = 0;
++
++	for (qc = 0; qc < jv; ++qc)
++	  --bm;
++	if (bm != 0)
++	  --c5;
++	lh[0][0] = 0;
++	m3 *= jv;
++      }
++
++  return c5 + m3;
++}
++
++/* { dg-final { scan-tree-dump "isl AST to Gimple succeeded" "graphite" } } */
+Index: gcc/testsuite/gcc.dg/pr80903.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/pr80903.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.dg/pr80903.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,34 @@
++/* PR rtl-optimization/80903 */
++/* { dg-do compile } */
++/* { dg-options "-O3 -funroll-loops" } */
++
++short int a;
++
++void
++foo (int x, short int y, short int z)
++{
++  if (y != 0)
++    {
++      const short int b = 37;
++      y = 0;
++      while (y < b)
++	{
++	  while (y < b)
++	    {
++	    lab:
++	      ++y;
++	    }
++	  for (y = 0; y < b - 1; ++y)
++	    ;
++	  if (z != 0)
++	    {
++	      --a;
++	      y *= a;
++	    }
++	  z = x;
++	}
++      x = 0;
++    }
++
++  goto lab;
++}
+Index: gcc/testsuite/gcc.dg/torture/pr80549.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/torture/pr80549.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.dg/torture/pr80549.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,33 @@
++/* { dg-do run } */
++
++signed char a, b;
++int c;
++short d;
++void fn1(int p1)
++{
++  short e = 4;
++  int f;
++  d = 0;
++  for (; d <= 0; d++)
++    e = 0;
++  if (e)
++    goto L1;
++L2:
++  if (p1) {
++      a = 9;
++      for (; a; ++a) {
++	  f = 5;
++	  for (; f != 32; ++f)
++	    c = 8;
++L1:
++	  if (b)
++	    goto L2;
++      }
++  }
++}
++
++int main()
++{
++  fn1(1);
++  return 0;
++}
 Index: gcc/testsuite/gcc.dg/torture/pr80539.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.dg/torture/pr80539.c	(.../tags/gcc_7_1_0_release)
@@ -1844,6 +5148,34 @@ Index: gcc/testsuite/gcc.dg/torture/pr80539.c
 +    goto l1;
 +  a = c;
 +}
+Index: gcc/testsuite/gcc.dg/torture/pr80842.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/torture/pr80842.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.dg/torture/pr80842.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,23 @@
++/* { dg-do compile } */
++
++unsigned a;
++short b;
++char c, d, e;
++void fn1();
++void fn2() {
++    a++;
++    for (; a;)
++      fn1(0, 0);
++}
++void fn3() {
++    fn2();
++l1:;
++   unsigned char f;
++   short g;
++   unsigned char *h = &f;
++   g += &h ? e ? g = 1 : 0 : 0;
++   d = g;
++   c *f;
++   if (d & (b %= *h) < f * d / (d -= 0))
++     goto l1;
++}
 Index: gcc/testsuite/gcc.dg/pr80492.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.dg/pr80492.c	(.../tags/gcc_7_1_0_release)
@@ -1869,11 +5201,242 @@ Index: gcc/testsuite/gcc.dg/pr80492.c
 +}
 +
 +/* { dg-final { scan-tree-dump-times "reg = " 4 "optimized" } } */
+Index: gcc/testsuite/gcc.dg/vect/bb-slp-pr80705.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/vect/bb-slp-pr80705.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.dg/vect/bb-slp-pr80705.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,44 @@
++/* { dg-do compile } */
++/* { dg-require-profiling "-fprofile-generate" } */
++/* { dg-additional-options "-fprofile-generate" } */
++
++extern int isspace (int);
++
++int foo(const char *txt, char *buf)
++{
++  const char *s;
++  char *d;
++  int ws = 1;
++  for (s=txt, d=buf; *s; )
++    {
++      if (*s=='/' && *(s+1)=='/') {
++
++	  s += 2;
++	  while (*s && *s!='\r' && *s!='\n')
++	    s++;
++      }
++      else if (*s=='"') {
++
++	  s++;
++	  while (*s && *s!='\r' && *s!='\n' && *s!='"')
++	    if (*s++=='\\')
++	      s++;
++	  if (*s=='"')
++	    s++;
++      }
++      else {
++	  if (*s && !isspace(*s))
++	    ws = 0;
++
++
++	  *d++ = *s++;
++
++      }
++    }
++  *d = '\0';
++
++  return ws;
++}
++
++/* { 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/format/pr80919.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/format/pr80919.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/gcc.dg/format/pr80919.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,16 @@
++/* PR c/80919 */
++/* { dg-do compile } */
++/* { dg-options "-Wall" } */
++
++void
++fn (void)
++{
++  int a[0];
++  __builtin_printf("%d\n", &a); /* { dg-warning "expects argument of type" } */
++  __builtin_printf("%i\n", &a); /* { dg-warning "expects argument of type" } */
++
++  __builtin_printf("%o\n", &a); /* { dg-warning "expects argument of type" } */
++  __builtin_printf("%u\n", &a); /* { dg-warning "expects argument of type" } */
++  __builtin_printf("%x\n", &a); /* { dg-warning "expects argument of type" } */
++  __builtin_printf("%X\n", &a); /* { dg-warning "expects argument of type" } */
++}
 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,146 @@
+@@ -1,3 +1,307 @@
++2017-06-14  Eric Botcazou  <ebotcazou at adacore.com>
++
++	* gcc.target/sparc/overflow-4.c: Add -mno-vis3.
++
++2017-06-09  Janus Weil  <janus at gcc.gnu.org>
++
++	Backport from trunk
++	PR fortran/70601
++	* gfortran.dg/proc_ptr_comp_50.f90: New test.
++
++2017-06-08  Uros Bizjak  <ubizjak at gmail.com>
++
++	PR target/81015
++	* gcc.target/i386/pr59874-1.c (foo): Call __builtin_ctzs.
++	* gcc.target/i386/pr59874-2.c (foo): Call __builtin_clzs.
++	* gcc.target/i386/pr81015.c: New test.
++
++2017-06-08  Jakub Jelinek  <jakub at redhat.com>
++
++	PR c/81006
++	* c-c++-common/gomp/pr81006.c: New test.
++
++	PR c++/81011
++	* g++.dg/gomp/pr81011.C: New test.
++
++2017-06-07  Richard Biener  <rguenther at suse.de>
++
++	Backport from mainline
++	2017-05-02  Richard Biener  <rguenther at suse.de>
++
++	PR tree-optimization/80549
++	* gcc.dg/torture/pr80549.c: New testcase.
++
++	2017-05-19  Richard Biener  <rguenther at suse.de>
++
++	PR c++/80593
++	* g++.dg/warn/Wstrict-aliasing-bogus-char-2.C: New testcase.
++	* g++.dg/warn/Wstrict-aliasing-6.C: Adjust expected outcome.
++
++	2017-05-26  Richard Biener  <rguenther at suse.de>
++
++	PR tree-optimization/80842
++	* gcc.dg/torture/pr80842.c: New testcase.
++
++	2017-05-31  Richard Biener  <rguenther at suse.de>
++
++	PR tree-optimization/80906
++	* gcc.dg/graphite/pr80906.c: New testcase.
++
++	2017-05-11  Richard Biener  <rguenther at suse.de>
++
++	PR tree-optimization/80705
++	* gcc.dg/vect/bb-slp-pr80705.c: New testcase.
++
++2017-06-07  Marek Polacek  <polacek at redhat.com>
++
++	Backport from mainline
++	2017-06-04  Marek Polacek  <polacek at redhat.com>
++
++	PR c/80919
++	* gcc.dg/format/pr80919.c: New test.
++
++2017-06-06  Michael Meissner  <meissner at linux.vnet.ibm.com>
++
++	Back port from mainline
++	2017-05-19  Michael Meissner  <meissner at linux.vnet.ibm.com>
++
++	PR target/80718
++	* gcc.target/powerpc/pr80718.c: New test.
++
++2017-06-06  Thomas Koenig  <tkoenig at gcc.gnu.org>
++
++	Backport from trunk
++	PR fortran/80975
++	* gfortran.dg/matmul_16.f90: New test.
++	* gfortran.dg/inline_matmul_18.f90: New test.
++
++2017-06-06  David S. Miller  <davem at davemloft.net>
++
++	* gcc.target/sparc/sparc-ret-3.c: New test.
++
++2017-06-05  Janus Weil  <janus at gcc.gnu.org>
++
++	Backport from trunk
++	PR fortran/80766
++	* gfortran.dg/typebound_call_28.f90: New test.
++
++2017-06-02  Thomas Koenig  <tkoenig at gcc.gnu.org>
++
++	PR fortran/80904
++	* gfortran.dg/matmul_bounds_12.f90:  New test.
++
++2017-06-02  Prakhar Bahuguna  <prakhar.bahuguna at arm.com>
++
++	Backport from mainline
++	2017-05-05  Andre Vieira  <andre.simoesdiasvieira at arm.com>
++		    Prakhar Bahuguna  <prakhar.bahuguna at arm.com>
++
++	PR target/71607
++	* gcc.target/arm/thumb2-slow-flash-data.c: Renamed to ...
++	* gcc.target/arm/thumb2-slow-flash-data-1.c: ... this.
++	* gcc.target/arm/thumb2-slow-flash-data-2.c: New.
++	* gcc.target/arm/thumb2-slow-flash-data-3.c: New.
++	* gcc.target/arm/thumb2-slow-flash-data-4.c: New.
++	* gcc.target/arm/thumb2-slow-flash-data-5.c: New.
++	* gcc.target/arm/tls-disable-literal-pool.c: New.
++
++2017-06-02  Jakub Jelinek  <jakub at redhat.com>
++
++	PR rtl-optimization/80903
++	* gcc.dg/pr80903.c: New test.
++
++	PR fortran/80918
++	* gfortran.dg/gomp/pr80918.f90: New test.
++
++2017-05-31  Martin Jambor  <mjambor at suse.cz>
++
++	Backport from mainline
++	2017-04-24  Martin Jambor  <mjambor at suse.cz>
++
++	PR tree-optimization/80293
++	* g++.dg/tree-ssa/pr80293.C: New test.
++
++2017-05-29  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
++
++	Backport from mainline
++	2017-05-24  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
++
++	* gcc.target/s390/pr80725.c: New test.
++
++2017-05-26  Marek Polacek  <polacek at redhat.com>
++
++	Backported from mainline
++	2017-05-17  Marek Polacek  <polacek at redhat.com>
++
++	PR sanitizer/80659
++	* gcc.dg/asan/pr80659.c: New test.
++
++2017-05-26  Marek Polacek  <polacek at redhat.com>
++
++	Backported from mainline
++	2017-05-26  Marek Polacek  <polacek at redhat.com>
++
++	PR sanitizer/80875
++	* c-c++-common/ubsan/pr80875.c: New test.
++
++2017-05-25  Michael Meissner  <meissner at linux.vnet.ibm.com>
++
++	Backport from trunk
++	2017-05-18  Michael Meissner  <meissner at linux.vnet.ibm.com>
++
++	PR target/80510
++	* gcc.target/powerpc/pr80510-1.c: New test.
++	* gcc.target/powerpc/pr80510-2.c: Likewise.
++
++	Backport from trunk
++	2017-05-09  Michael Meissner  <meissner at linux.vnet.ibm.com>
++
++	PR target/68163
++	* gcc.target/powerpc/pr68163.c: New test.
++
 +2017-05-23  Jerry DeLisle  <jvdelisle at gcc.gnu.org>
 +
 +	Backport from trunk
@@ -2020,6 +5583,340 @@ Index: gcc/testsuite/ChangeLog
  2017-05-02  Release Manager
  
  	* GCC 7.1.0 released.
+@@ -52,8 +356,8 @@
+ 	Backport from mainline
+ 	2017-04-25  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
+ 
+-        PR target/80464
+-        * gfortran.fortran-torture/compile/pr80464.f90: New test.
++	PR target/80464
++	* gfortran.fortran-torture/compile/pr80464.f90: New test.
+ 
+ 2017-04-25  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
+ 
+@@ -60,8 +364,8 @@
+ 	Backport from mainline
+ 	2017-04-25  Andreas Krebbel  <krebbel at linux.vnet.ibm.com>
+ 
+-        PR target/79895
+-        * gcc.target/s390/pr79895.c: New test.
++	PR target/79895
++	* gcc.target/s390/pr79895.c: New test.
+ 
+ 2017-04-25  Dominik Vogt  <vogt at linux.vnet.ibm.com>
+ 
+@@ -68,10 +372,10 @@
+ 	Backport from maineline
+ 	2017-04-25  Dominik Vogt  <vogt at linux.vnet.ibm.com>
+ 
+-        PR target/80080
+-        * gcc.target/s390/md/atomic_compare_exchange-1.c: New test.
+-        * gcc.target/s390/md/atomic_compare_exchange-1.inc: New test.
+-        * gcc.target/s390/md/atomic_exchange-1.inc: New test.
++	PR target/80080
++	* gcc.target/s390/md/atomic_compare_exchange-1.c: New test.
++	* gcc.target/s390/md/atomic_compare_exchange-1.inc: New test.
++	* gcc.target/s390/md/atomic_exchange-1.inc: New test.
+ 
+ 2017-04-25  Jakub Jelinek  <jakub at redhat.com>
+ 
+@@ -132,7 +436,7 @@
+ 	* gcc.dg/torture/pr80341.c: Require int32plus.
+ 
+ 2017-04-19  Eric Botcazou  <ebotcazou at adacore.com>
+-            Jeff Law  <law at redhat.com>
++	    Jeff Law  <law at redhat.com>
+ 
+ 	* gcc.c-torture/compile/20170419-1.c: New test.
+ 
+Index: gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C	(.../branches/gcc-7-branch)
+@@ -16,7 +16,7 @@
+ struct complex 			// { dg-message "no constexpr constructor" }
+ {
+   complex(double r, double i) : re(r), im(i) { }
+-  constexpr double real() const { return re; } // { dg-error "not a literal type" }
++  constexpr double real() const { return re; } // { dg-error "not a literal type" "" { target c++11_only } }
+   double imag() const { return im; }
+ 
+ private:
+@@ -25,7 +25,7 @@
+ };
+ 
+ constexpr complex co1(0, 1);	   // { dg-error "not literal" }
+-constexpr double dd2 = co1.real(); // { dg-error "non-constexpr function" }
++constexpr double dd2 = co1.real(); // { dg-error "" }
+ 
+ // --------------------
+ 
+Index: gcc/testsuite/g++.dg/cpp0x/constexpr-data1.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-data1.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-data1.C	(.../branches/gcc-7-branch)
+@@ -36,7 +36,7 @@
+ {
+ public:
+    explicit debug_flag(bool);
+-   constexpr bool is_on(); // { dg-error "enclosing class .* not a literal type" }
++   constexpr bool is_on(); // { dg-error "enclosing class .* not a literal type" "" { target c++11_only } }
+ private:
+    bool flag;
+ };
+Index: gcc/testsuite/g++.dg/cpp0x/constexpr-neg1.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-neg1.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-neg1.C	(.../branches/gcc-7-branch)
+@@ -45,7 +45,7 @@
+ class debug_flag {
+ public:
+   explicit debug_flag(bool);
+-  constexpr bool is_on();	// { dg-error "not a literal type" } debug_flag not literal type
++  constexpr bool is_on(); // { dg-error "not a literal type" "" { target c++11_only } } debug_flag not literal type
+ private:
+   bool flag;
+ };
+Index: gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C	(.../branches/gcc-7-branch)
+@@ -13,6 +13,6 @@
+ struct Y
+ {
+   Y() { }
+-  constexpr Y f(Y y);		// { dg-error "not a literal type" }
++  constexpr Y f(Y y) {}		// { dg-error "constexpr" }
+   static constexpr Y g(Y y) {}	// { dg-error "constexpr" }
+ };
+Index: gcc/testsuite/g++.dg/cpp0x/constexpr-diag1.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-diag1.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-diag1.C	(.../branches/gcc-7-branch)
+@@ -5,7 +5,7 @@
+ struct A
+ {
+   T t;
+-  constexpr int f() const { return 42; } // { dg-error "enclosing class" }
++  constexpr int f() const { return 42; } // { dg-error "enclosing class" "" { target c++11_only } }
+ };
+ 
+ struct B { B(); operator int(); };
+@@ -13,7 +13,7 @@
+ constexpr A<int> ai = { 42 };
+ constexpr int i = ai.f();
+ 
+-constexpr int b = A<B>().f();	// { dg-error "non-constexpr function" }
++constexpr int b = A<B>().f();	// { dg-error "" }
+ 
+ template <class T>
+ constexpr int f (T t) { return 42; } // { dg-error "parameter" }
+Index: gcc/testsuite/g++.dg/cpp1y/auto-fn27.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp1y/auto-fn27.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/cpp1y/auto-fn27.C	(.../branches/gcc-7-branch)
+@@ -31,7 +31,7 @@
+ {
+   auto s = I;
+   typedef decltype (s) L;
+-  auto u =[&](L) { auto t = foo (J::K (), 0); }; // { dg-error "25:'void t' has incomplete type" }
++  auto u =[&](L) { auto t = foo (J::K (), 0); }; // { dg-error "25:declared void" }
+ }
+ struct B {
+   typedef int G;
+Index: gcc/testsuite/g++.dg/cpp1y/constexpr-dr1684.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp1y/constexpr-dr1684.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/cpp1y/constexpr-dr1684.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,7 @@
++// DR 1684
++// { dg-do compile { target c++11 } }
++
++struct A {
++  A(int);
++  constexpr int foo() { return 0; } // { dg-error "literal" "" { target c++11_only } }
++};
+Index: gcc/testsuite/g++.dg/cpp1y/auto-fn39.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp1y/auto-fn39.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/cpp1y/auto-fn39.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,48 @@
++// PR c++/81045
++// { dg-do compile { target c++14 } }
++
++template<typename T> class vectorIterator;
++
++template<typename T> class vector {
++  public:
++  auto get(unsigned int i) { return data[i]; }
++
++  auto begin() { return vectorIterator<T>{*this, 0}; }
++  auto end() { return vectorIterator<T>{*this, 10}; }
++
++  private:
++  T data[10] = {};
++};
++
++template<typename T> class vectorIterator {
++  public:
++  vectorIterator(vector<T>& self, unsigned int offset) : self(self), offset(offset) {}
++
++  auto operator*() -> T& { return self.get(offset); }
++  auto operator!=(const vectorIterator& source) -> bool { return offset != source.offset; }
++  auto operator++() -> vectorIterator& { ++offset; return *this; }
++
++  private:
++  vector<T>& self;
++  unsigned int offset;
++};
++
++class Object {
++  public:
++  template<typename T> auto cast() -> T {
++    return T();
++  }
++};
++
++class Group : public Object {
++  public:
++  template<typename T = Object> auto objects() const -> void {
++    vector<Object> easyObjects;
++    for(auto obj : easyObjects) {
++      auto casted = obj.cast<T>();
++    }
++  }
++};
++
++int main() { return 0; }
++
+Index: gcc/testsuite/g++.dg/cpp1z/noexcept-type15.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp1z/noexcept-type15.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/cpp1z/noexcept-type15.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,11 @@
++// PR c++/80384
++// { dg-options -std=c++17 }
++
++template<class> struct foo;
++template<bool B>
++struct foo<int() noexcept(B)> {
++    static const bool value = B; 
++};
++
++static_assert(!foo<int()>::value);
++static_assert(foo<int() noexcept>::value);
+Index: gcc/testsuite/g++.dg/cpp1z/lambda-this3.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp1z/lambda-this3.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/cpp1z/lambda-this3.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,10 @@
++// { dg-options -std=c++1z }
++
++struct S {
++  int i;
++  constexpr S() : i(5) { 
++    ([*this] () { return i + 10; }());
++  }
++  constexpr operator int() const { return i; }
++};
++constexpr int x = S();
+Index: gcc/testsuite/g++.dg/cpp1z/noexcept-type16.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp1z/noexcept-type16.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/cpp1z/noexcept-type16.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,11 @@
++// PR c++/80614
++// { dg-options -std=c++1z }
++
++template <typename T> void fn() {}
++
++int main() {
++  // { dg-final { scan-assembler "_Z2fnIKFvvEEvv" } }
++  fn<void() const>();
++  // { dg-final { scan-assembler "_Z2fnIKDoFvvEEvv" } }
++  fn<void() const noexcept>();
++}
+Index: gcc/testsuite/g++.dg/cpp1z/noexcept-type17.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/cpp1z/noexcept-type17.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/cpp1z/noexcept-type17.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,7 @@
++// PR c++/80465
++// { dg-options -std=c++1z }
++
++int foo(...);
++int main() {
++  [](auto a) noexcept(noexcept(foo(a))){}(42);
++}
+Index: gcc/testsuite/g++.dg/ext/flexary24.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/ext/flexary24.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/ext/flexary24.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,12 @@
++// PR c++/80179
++// { dg-options "" }
++
++struct S {
++  int n;
++  const char *a[];
++};
++
++void bar (const char *a)
++{
++  static const S t = { 1, { a, "b" } };
++}
+Index: gcc/testsuite/g++.dg/ext/is_std_layout1.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/ext/is_std_layout1.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/ext/is_std_layout1.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,12 @@
++// { dg-do compile { target c++11 } }
++
++template <int> struct E { };
++
++struct E1: E<0>, E<1> { };
++struct E2: E<2>, E<3> { };
++
++struct A1x { int n; };
++struct D2: A1x, E1, E2 { };
++
++#define SA(X) static_assert((X),#X)
++SA(__is_standard_layout (D2));
+Index: gcc/testsuite/g++.dg/ext/is_std_layout2.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/ext/is_std_layout2.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/ext/is_std_layout2.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,6 @@
++// { dg-do compile { target c++11 } }
++// { dg-options "" }
++
++struct S { int a[0]; };
++struct T : public S { int b[0]; int c; };
++static_assert(!__is_standard_layout (T), "");
+Index: gcc/testsuite/g++.dg/gomp/pr81011.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/gomp/pr81011.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/gomp/pr81011.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,19 @@
++// PR c++/81011
++// { dg-do compile }
++
++class A { A (const A&); };		// { dg-message "declared private here" }
++void foo (const A&);
++
++void
++bar (A& a)
++{
++#pragma omp task			// { dg-error "is private within this context" }
++  foo (a);
++}
++
++void
++baz (A& a)
++{
++#pragma omp task firstprivate (a)	// { dg-error "is private within this context" }
++  foo (a);
++}
 Index: gcc/testsuite/g++.dg/other/i386-11.C
 ===================================================================
 --- a/src/gcc/testsuite/g++.dg/other/i386-11.C	(.../tags/gcc_7_1_0_release)
@@ -2082,6 +5979,1094 @@ Index: gcc/testsuite/g++.dg/other/i386-11.C
 +}
 +
 +// { dg-final { scan-assembler-not "%mm" } }
+Index: gcc/testsuite/g++.dg/other/fsyntax-only1.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/other/fsyntax-only1.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/other/fsyntax-only1.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,45 @@
++// PR c++/80831
++// { dg-options -fsyntax-only }
++// { dg-do compile { target c++11 } }
++
++class A
++{
++public:
++    virtual ~A() { }
++};
++
++class B { };
++
++class C : public A { };
++
++template<class J>
++class D : public C
++{
++public:
++    D() { }
++    ~D() { }
++};
++
++class E
++{
++public:
++    static E& p();
++    B q();
++    template<class J>
++    B q(void (J::*r)())
++    {
++        new D<J>();
++        return q();
++    }
++};
++
++void t()
++{
++  class F
++  {
++  public:
++    virtual void s() { }
++  };
++  E& x = E::p();
++  B y = x.q(&F::s);
++}
+Index: gcc/testsuite/g++.dg/tree-ssa/pr80293.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/tree-ssa/pr80293.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/tree-ssa/pr80293.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,45 @@
++// { dg-do compile }
++// { dg-options "-O2 -std=gnu++11 -fdump-tree-optimized" } */
++
++#include <array>
++
++// Return a copy of the underlying memory of an arbitrary value.
++template <
++    typename T,
++    typename = typename std::enable_if<std::is_trivially_copyable<T>::value>::type
++>
++auto getMem(
++    T const & value
++) -> std::array<char, sizeof(T)> {
++    auto ret = std::array<char, sizeof(T)>{};
++    __builtin_memcpy(ret.data(), &value, sizeof(T));
++    return ret;
++}
++
++template <
++    typename T,
++    typename = typename std::enable_if<std::is_trivially_copyable<T>::value>::type
++>
++auto fromMem(
++    std::array<char, sizeof(T)> const & buf
++) -> T {
++    auto ret = T{};
++    __builtin_memcpy(&ret, buf.data(), sizeof(T));
++    return ret;
++}
++
++double foo1(std::uint64_t arg) {
++    return fromMem<double>(getMem(arg));
++}
++
++double foo2(std::uint64_t arg) {
++    return *reinterpret_cast<double*>(&arg);
++}
++
++double foo3(std::uint64_t arg) {
++    double ret;
++    __builtin_memcpy(&ret, &arg, sizeof(arg));
++    return ret;
++}
++
++// { dg-final { scan-tree-dump-not "BIT_FIELD_REF" "optimized" } }
+Index: gcc/testsuite/g++.dg/warn/Wstrict-aliasing-6.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-6.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-6.C	(.../branches/gcc-7-branch)
+@@ -4,6 +4,6 @@
+ int foo ()
+ {
+   char buf[8];
+-  return *((int *)buf); /* { dg-warning "strict-aliasing" } */
++  return *((int *)buf); /* { dg-bogus "strict-aliasing" } */
+ }
+ 
+Index: gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-char-2.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-char-2.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-char-2.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,19 @@
++// { dg-do compile }
++// { dg-options "-O2 -Wstrict-aliasing" }
++
++template<unsigned _Len, unsigned _Align>
++struct aligned_storage
++{
++  union type
++    {
++      unsigned char __data[_Len];
++      struct __attribute__((__aligned__((_Align)))) { } __align;
++    };
++};
++
++aligned_storage<sizeof(int), __alignof__(int)>::type storage;
++
++int main()
++{
++  *reinterpret_cast<int*>(&storage) = 42; // { dg-bogus "break strict-aliasing" }
++}
+Index: gcc/testsuite/g++.dg/template/ptrmem31.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/template/ptrmem31.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/template/ptrmem31.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,23 @@
++// PR c++/80639
++// { dg-do compile { target c++14 } }
++
++template < typename > struct A;
++
++struct B
++{ 
++  template < int > void m ();
++  template < int > struct K { static void n (); };
++  void p () { K < 0 >::n (); }
++};
++
++template <> struct A < B >
++{ 
++  using T = void (A::*)();
++  template < int u > static constexpr T h = &B::m < u >; // { dg-error "cannot convert" }
++};
++
++template < int v > void B::K < v >::n ()
++{ 
++  using S = A < B >;
++  S::h < 0 >;
++}
+Index: gcc/testsuite/g++.dg/template/ref10.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/template/ref10.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/template/ref10.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,13 @@
++// PR c++/80840
++// { dg-do compile { target c++11 } }
++
++template <class T, T X>
++struct Just;
++
++template <const double& X>
++struct Number {
++    static constexpr double value = X;
++    using result = Just<const double&, value>;
++};
++
++int main() {}
+Index: gcc/testsuite/g++.dg/template/partial-specialization6.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/template/partial-specialization6.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/template/partial-specialization6.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,28 @@
++// PR c++/80174
++
++typedef unsigned char uint8_t; 
++
++template <typename T>
++struct HighestMaxFieldIdx {
++  static const uint8_t maxFieldIdx = T::fieldIdx;
++};
++
++template <typename This>
++struct Outer {
++
++  template <uint8_t _fieldIdx, typename T, T This::*field>
++  struct Varint {};
++
++
++  template <uint8_t _fieldIdx, uint8_t This::*field>
++  struct Varint<_fieldIdx, uint8_t, field> {
++    static const uint8_t fieldIdx = _fieldIdx;
++  };
++};
++
++struct Msg {
++  uint8_t a;
++
++  static const uint8_t t
++  = HighestMaxFieldIdx<Outer<Msg>::Varint<1, uint8_t, &Msg::a> >::maxFieldIdx;
++};
+Index: gcc/testsuite/g++.dg/template/nontype-array1.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/template/nontype-array1.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/template/nontype-array1.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,27 @@
++// { dg-do compile { target c++11 } }
++
++template <char const* STR>
++class Message {
++};
++
++extern char const s1[] = "hi";
++char const s2[] = "hi";
++constexpr char const s3[] = "hi";  // OK since C++11
++
++constexpr char const * f() { return s3; }
++
++int main()
++{
++  Message<s1> m1;  // OK (all versions)
++  Message<s2> m2;  // OK for clang since C++14, for gcc since C++17
++  Message<s3> m3;  // OK for clang/gcc since C++11
++
++  static char const s4[] = "hi";
++  static constexpr char const s5[] = "hi";  // OK since C++11
++  Message<s4> m4;  // { dg-error "no linkage" "" { target c++14_down } }
++  Message<s5> m5;  // { dg-error "no linkage" "" { target c++14_down } }
++  Message<f()> m6; // { dg-error "" "" { target c++14_down } }
++
++  char const s8[] = "hi";
++  Message<s8> m8;  // { dg-error "" }
++}
+Index: gcc/testsuite/g++.dg/template/partial5.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/template/partial5.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/template/partial5.C	(.../branches/gcc-7-branch)
+@@ -14,7 +14,7 @@
+ struct Y { };
+ 
+ template<typename T, typename U, U v>
+-struct Y<T, v> { }; // { dg-error "" }
++struct Y<T, v> { }; // { dg-error "" "" { target { ! c++1z } } }
+ 
+ 
+ template<typename T, T V>
+Index: gcc/testsuite/g++.dg/template/local-fn2.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/template/local-fn2.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/template/local-fn2.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,21 @@
++// PR c++/80856
++// { dg-do compile { target c++11 } }
++
++template<typename T>
++inline T WrapToCycle(T degrees)
++{
++  int Wrap(int x, int lower_bound, int upper_bound);
++
++  auto p = Wrap;
++  p (1, 0, 360);
++
++  double Wrap(double x, int lower_bound, int upper_bound);
++
++  Wrap(1, 0, 360);
++  return Wrap(degrees, 0, 360);
++}
++
++void GenerateOldReportPage()
++{
++  WrapToCycle(0);
++}
+Index: gcc/testsuite/g++.dg/template/function1.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/template/function1.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/template/function1.C	(.../branches/gcc-7-branch)
+@@ -1,10 +1,8 @@
+ // PR c++/38647
+-// { dg-do compile { target { ! c++1z } } }
+-// { dg-prune-output "note" }
+ 
+ template<const char *, int> struct A {};
+ const char func[] = "abc";
+-template<int N> struct A<func, N> {};	// { dg-error "cannot appear|is invalid|not a valid|constant expression" }
++template<int N> struct A<func, N> {};	// { dg-error "cannot appear|is invalid|not a valid|constant expression" "" { target c++98_only } }
+ 
+ char a1[1];
+ A<a1, 0> a;
+Index: gcc/testsuite/g++.dg/template/partial-specialization7.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/template/partial-specialization7.C	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/g++.dg/template/partial-specialization7.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,40 @@
++// PR c++/81102
++
++template <typename FuncSig, FuncSig f>
++struct HelperWrapper;
++
++// [...]
++
++template <typename Ret, Ret (&Func)()>
++struct HelperWrapper<Ret (&)(), Func>
++{
++    static inline int WrapFuncT(const int)
++    {
++        return 0; // Changed
++    }
++};
++
++// Unary
++template <typename Ret, typename Arg1, Ret (&Func)(Arg1)>
++struct HelperWrapper<Ret (&)(Arg1), Func>
++{
++    static inline int WrapFuncT(const int)
++    {
++        return 1; // Changed
++    }
++};
++
++// Binary
++template <typename Ret, typename Arg1, typename Arg2, Ret (&Func)(Arg1, Arg2)>
++struct HelperWrapper<Ret (&)(Arg1, Arg2), Func>
++{
++    static inline int WrapFuncT(const int)
++    {
++        return 2; // Changed
++    }
++};
++
++int main()
++{
++  return 0;
++}
+Index: gcc/testsuite/c-c++-common/ubsan/pr80875.c
+===================================================================
+--- a/src/gcc/testsuite/c-c++-common/ubsan/pr80875.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/c-c++-common/ubsan/pr80875.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,9 @@
++/* PR sanitizer/80875 */
++/* { dg-do compile } */
++/* { dg-options "-fsanitize=undefined" } */
++
++int
++foo (void)
++{
++  return ~__INT_MAX__ * (0 / 0); /* { dg-warning "division by zero" } */
++}
+Index: gcc/testsuite/c-c++-common/gomp/pr81006.c
+===================================================================
+--- a/src/gcc/testsuite/c-c++-common/gomp/pr81006.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/testsuite/c-c++-common/gomp/pr81006.c	(.../branches/gcc-7-branch)
+@@ -0,0 +1,10 @@
++/* PR c/81006 */
++/* { dg-do compile } */
++
++int a[] = {};
++
++void foo()
++{
++  #pragma omp task depend(out: a[:])	/* { dg-error "zero length array section in .depend. clause" } */
++    {}
++}
+Index: gcc/cp/typeck.c
+===================================================================
+--- a/src/gcc/cp/typeck.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/cp/typeck.c	(.../branches/gcc-7-branch)
+@@ -8499,9 +8499,10 @@
+ 	      if (rhstype == unknown_type_node)
+ 		{
+ 		  tree r = instantiate_type (type, rhs, tf_warning_or_error);
+-		  /* -fpermissive might allow this.  */
++		  /* -fpermissive might allow this; recurse.  */
+ 		  if (!seen_error ())
+-		    return r;
++		    return convert_for_assignment (type, r, errtype, fndecl,
++						   parmnum, complain, flags);
+ 		}
+ 	      else if (fndecl)
+ 		error ("cannot convert %qT to %qT for argument %qP to %qD",
+Index: gcc/cp/class.c
+===================================================================
+--- a/src/gcc/cp/class.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/cp/class.c	(.../branches/gcc-7-branch)
+@@ -1861,7 +1861,9 @@
+ 	       members */
+ 	    for (basefield = TYPE_FIELDS (basetype); basefield;
+ 		 basefield = DECL_CHAIN (basefield))
+-	      if (TREE_CODE (basefield) == FIELD_DECL)
++	      if (TREE_CODE (basefield) == FIELD_DECL
++		  && !(DECL_FIELD_IS_BASE (basefield)
++		       && integer_zerop (DECL_SIZE (basefield))))
+ 		{
+ 		  if (field)
+ 		    CLASSTYPE_NON_STD_LAYOUT (t) = 1;
+@@ -5758,7 +5760,9 @@
+ 	   && !TYPE_HAS_CONSTEXPR_CTOR (t))
+     CLASSTYPE_LITERAL_P (t) = false;
+ 
+-  if (!CLASSTYPE_LITERAL_P (t))
++  /* C++14 DR 1684 removed this restriction.  */
++  if (cxx_dialect < cxx14
++      && !CLASSTYPE_LITERAL_P (t) && !LAMBDA_TYPE_P (t))
+     for (fn = TYPE_METHODS (t); fn; fn = DECL_CHAIN (fn))
+       if (DECL_DECLARED_CONSTEXPR_P (fn)
+ 	  && TREE_CODE (fn) != TEMPLATE_DECL
+@@ -5766,12 +5770,11 @@
+ 	  && !DECL_CONSTRUCTOR_P (fn))
+ 	{
+ 	  DECL_DECLARED_CONSTEXPR_P (fn) = false;
+-	  if (!DECL_GENERATED_P (fn) && !LAMBDA_TYPE_P (t))
+-	    {
+-	      error ("enclosing class of constexpr non-static member "
+-		     "function %q+#D is not a literal type", fn);
+-	      explain_non_literal_class (t);
+-	    }
++	  if (!DECL_GENERATED_P (fn)
++	      && pedwarn (DECL_SOURCE_LOCATION (fn), OPT_Wpedantic,
++			  "enclosing class of constexpr non-static member "
++			  "function %q+#D is not a literal type", fn))
++	    explain_non_literal_class (t);
+ 	}
+ }
+ 
+Index: gcc/cp/constexpr.c
+===================================================================
+--- a/src/gcc/cp/constexpr.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/cp/constexpr.c	(.../branches/gcc-7-branch)
+@@ -209,16 +209,17 @@
+ 	    }
+ 	}
+ 
+-      if (DECL_NONSTATIC_MEMBER_FUNCTION_P (fun)
++      /* C++14 DR 1684 removed this restriction.  */
++      if (cxx_dialect < cxx14
++	  && DECL_NONSTATIC_MEMBER_FUNCTION_P (fun)
+ 	  && !CLASSTYPE_LITERAL_P (DECL_CONTEXT (fun)))
+ 	{
+ 	  ret = false;
+-	  if (complain)
+-	    {
+-	      error ("enclosing class of constexpr non-static member "
+-		     "function %q+#D is not a literal type", fun);
+-	      explain_non_literal_class (DECL_CONTEXT (fun));
+-	    }
++	  if (complain
++	      && pedwarn (DECL_SOURCE_LOCATION (fun), OPT_Wpedantic,
++			  "enclosing class of constexpr non-static member "
++			  "function %q+#D is not a literal type", fun))
++	    explain_non_literal_class (DECL_CONTEXT (fun));
+ 	}
+     }
+   else if (CLASSTYPE_VBASECLASSES (DECL_CONTEXT (fun)))
+@@ -2643,8 +2644,16 @@
+   /* We used to check that ctx->ctor was empty, but that isn't the case when
+      the object is zero-initialized before calling the constructor.  */
+   if (ctx->object)
+-    gcc_assert (same_type_ignoring_top_level_qualifiers_p
+-		(type, TREE_TYPE (ctx->object)));
++    {
++      tree otype = TREE_TYPE (ctx->object);
++      gcc_assert (same_type_ignoring_top_level_qualifiers_p (type, otype)
++		  /* Handle flexible array members.  */
++		  || (TREE_CODE (otype) == ARRAY_TYPE
++		      && TYPE_DOMAIN (otype) == NULL_TREE
++		      && TREE_CODE (type) == ARRAY_TYPE
++		      && (same_type_ignoring_top_level_qualifiers_p
++			  (TREE_TYPE (type), TREE_TYPE (otype)))));
++    }
+   gcc_assert (!ctx->object || !DECL_P (ctx->object)
+ 	      || *(ctx->values->get (ctx->object)) == ctx->ctor);
+ }
+@@ -5284,7 +5293,7 @@
+       {
+         tree x = TREE_OPERAND (t, 0);
+         STRIP_NOPS (x);
+-        if (is_this_parameter (x))
++        if (is_this_parameter (x) && !is_capture_proxy (x))
+ 	  {
+ 	    if (DECL_CONTEXT (x)
+ 		&& !DECL_DECLARED_CONSTEXPR_P (DECL_CONTEXT (x)))
+Index: gcc/cp/ChangeLog
+===================================================================
+--- a/src/gcc/cp/ChangeLog	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/cp/ChangeLog	(.../branches/gcc-7-branch)
+@@ -1,3 +1,87 @@
++2017-06-16  Jason Merrill  <jason at redhat.com>
++
++	PR c++/81045 - Wrong type-dependence with auto return type.
++	* pt.c (type_dependent_expression_p): An undeduced auto outside the
++	template isn't dependent.
++	* call.c (build_over_call): Instantiate undeduced auto even in a
++	template.
++
++	PR c++/81102 - Wrong error with partial specialization.
++	* pt.c (unify) [TEMPLATE_PARM_INDEX]: Strip reference when comparing
++	types.  Do type deduction later.
++
++	PR c++/81074 - ICE with partial specialization of member template.
++	PR c++/71747
++	* pt.c (get_partial_spec_bindings): Only coerce innermost args.
++
++	PR c++/80831 - ICE with -fsyntax-only.
++	* decl2.c (c_parse_final_cleanups): Use cgraph_node::get_create.
++
++	PR c++/80639 - ICE with invalid PMF initialization.
++	PR c++/80043 - ICE with -fpermissive
++	* typeck.c (convert_for_assignment): Recurse when instantiate_type
++	returns without an error.
++
++	PR c++/80465 - ICE with generic lambda with noexcept-specifier.
++	* lambda.c (maybe_add_lambda_conv_op): Keep processing_template_decl
++	set longer for a generic lambda.
++
++	PR c++/80614 - Wrong mangling for C++17 noexcept type
++	* mangle.c (write_type): Put the eh spec back on the function type.
++
++	PR c++/80384 - ICE with dependent noexcept-specifier
++	* pt.c (dependent_type_p_r) [FUNCTION_TYPE]: Check for dependent
++	noexcept-specifier.
++
++	* parser.c (cp_parser_constant_expression): Check
++	potential_rvalue_constant_expression after decay_conversion.
++	* pt.c (convert_nontype_argument): Don't require linkage in C++17.
++
++	* constexpr.c (potential_constant_expression_1): Allow 'this' capture.
++
++2017-06-08  Jakub Jelinek  <jakub at redhat.com>
++
++	PR c/81006
++	* semantics.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
++	to sizetype before size_binop.
++
++	PR c++/81011
++	* cp-gimplify.c (cxx_omp_finish_clause): When changing clause
++	to OMP_CLAUSE_SHARED, also clear OMP_CLAUSE_SHARED_FIRSTPRIVATE
++	and OMP_CLAUSE_SHARED_READONLY flags.
++
++2017-06-05  Volker Reichelt  <v.reichelt at netcologne.de>
++
++	* parser.c (cp_parser_base_specifier): Fix typos in error messages.
++
++2017-05-31  Jason Merrill  <jason at redhat.com>
++
++	PR c++/80840 - ICE with constexpr and reference
++	* pt.c (convert_nontype_argument): Don't test whether a decl is
++	value-dependent when binding to a reference.
++
++	PR c++/80856 - ICE with local extern in template
++	* semantics.c (finish_call_expr): Replace a local extern overload
++	set in a template with the IDENTIFIER_NODE.
++
++	PR c++/80605 - __is_standard_layout and zero-length array
++	* class.c (check_bases): Use DECL_FIELD_IS_BASE.
++
++	PR c++/80605 - __is_standard_layout and empty base
++	* class.c (check_bases): Ignore empty bases.
++
++	PR c++/66297, DR 1684 - literal class and constexpr member fns
++	* constexpr.c (is_valid_constexpr_fn): Only complain about
++	non-literal enclosing class in C++11.
++	* class.c (finalize_literal_type_property): Likewise.
++
++	PR c++/80179 - ICE with initialized flexible array member.
++	* constexpr.c (verify_ctor_sanity): Handle flexible array members.
++
++2017-05-29  Alexandre Oliva <aoliva at redhat.com>
++
++	* cp-tree.h (lang_identifier): Drop oracle_looked_up, unused.
++
+ 2017-05-02  Release Manager
+ 
+ 	* GCC 7.1.0 released.
+Index: gcc/cp/cp-gimplify.c
+===================================================================
+--- a/src/gcc/cp/cp-gimplify.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/cp/cp-gimplify.c	(.../branches/gcc-7-branch)
+@@ -1944,7 +1944,11 @@
+     make_shared = true;
+ 
+   if (make_shared)
+-    OMP_CLAUSE_CODE (c) = OMP_CLAUSE_SHARED;
++    {
++      OMP_CLAUSE_CODE (c) = OMP_CLAUSE_SHARED;
++      OMP_CLAUSE_SHARED_FIRSTPRIVATE (c) = 0;
++      OMP_CLAUSE_SHARED_READONLY (c) = 0;
++    }
+ }
+ 
+ /* Return true if DECL's DECL_VALUE_EXPR (if any) should be
+Index: gcc/cp/pt.c
+===================================================================
+--- a/src/gcc/cp/pt.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/cp/pt.c	(.../branches/gcc-7-branch)
+@@ -6603,7 +6603,8 @@
+ 		       expr, type, decl);
+ 	      return NULL_TREE;
+ 	    }
+-	  else if (cxx_dialect >= cxx11 && decl_linkage (decl) == lk_none)
++	  else if ((cxx_dialect >= cxx11 && cxx_dialect < cxx1z)
++		   && decl_linkage (decl) == lk_none)
+ 	    {
+ 	      if (complain & tf_error)
+ 		error ("%qE is not a valid template argument of type %qT "
+@@ -6610,6 +6611,38 @@
+ 		       "because %qD has no linkage", expr, type, decl);
+ 	      return NULL_TREE;
+ 	    }
++	  /* C++17: For a non-type template-parameter of reference or pointer
++	     type, the value of the constant expression shall not refer to (or
++	     for a pointer type, shall not be the address of):
++	       * a subobject (4.5),
++	       * a temporary object (15.2),
++	       * a string literal (5.13.5),
++	       * the result of a typeid expression (8.2.8), or
++	       * a predefined __func__ variable (11.4.1).  */
++	  else if (DECL_ARTIFICIAL (decl))
++	    {
++	      if (complain & tf_error)
++		error ("the address of %qD is not a valid template argument",
++		       decl);
++	      return NULL_TREE;
++	    }
++	  else if (!same_type_ignoring_top_level_qualifiers_p
++		   (strip_array_types (TREE_TYPE (type)),
++		    strip_array_types (TREE_TYPE (decl))))
++	    {
++	      if (complain & tf_error)
++		error ("the address of the %qT subobject of %qD is not a "
++		       "valid template argument", TREE_TYPE (type), decl);
++	      return NULL_TREE;
++	    }
++	  else if (!TREE_STATIC (decl) && !DECL_EXTERNAL (decl))
++	    {
++	      if (complain & tf_error)
++		error ("the address of %qD is not a valid template argument "
++		       "because it does not have static storage duration",
++		       decl);
++	      return NULL_TREE;
++	    }
+ 	}
+ 
+       expr = decay_conversion (expr, complain);
+@@ -6669,7 +6702,11 @@
+ 	    }
+ 	}
+ 
+-      if (!value_dependent_expression_p (expr))
++      if (TYPE_REF_OBJ_P (TREE_TYPE (expr))
++	  && value_dependent_expression_p (expr))
++	/* OK, dependent reference.  We don't want to ask whether a DECL is
++	   itself value-dependent, since what we want here is its address.  */;
++      else
+ 	{
+ 	  if (!DECL_P (expr))
+ 	    {
+@@ -6691,8 +6728,11 @@
+ 	      return NULL_TREE;
+ 	    }
+ 
+-	  expr = build_nop (type, build_address (expr));
++	  expr = build_address (expr);
+ 	}
++
++      if (!same_type_p (type, TREE_TYPE (expr)))
++	expr = build_nop (type, expr);
+     }
+   /* [temp.arg.nontype]/5, bullet 4
+ 
+@@ -20563,18 +20603,6 @@
+ 	  return x;
+ 	}
+ 
+-      if (cxx_dialect >= cxx1z
+-	  /* We deduce from array bounds in try_array_deduction.  */
+-	  && !(strict & UNIFY_ALLOW_INTEGER)
+-	  && uses_template_parms (TREE_TYPE (parm))
+-	  && !type_uses_auto (TREE_TYPE (parm)))
+-	{
+-	  tree atype = TREE_TYPE (arg);
+-	  RECUR_AND_CHECK_FAILURE (tparms, targs,
+-				   TREE_TYPE (parm), atype,
+-				   UNIFY_ALLOW_NONE, explain_p);
+-	}
+-
+       /* [temp.deduct.type] If, in the declaration of a function template
+ 	 with a non-type template-parameter, the non-type
+ 	 template-parameter is used in an expression in the function
+@@ -20595,7 +20623,8 @@
+ 	/* Template-parameter dependent expression.  Just accept it for now.
+ 	   It will later be processed in convert_template_argument.  */
+ 	;
+-      else if (same_type_p (TREE_TYPE (arg), tparm))
++      else if (same_type_p (non_reference (TREE_TYPE (arg)),
++			    non_reference (tparm)))
+ 	/* OK */;
+       else if ((strict & UNIFY_ALLOW_INTEGER)
+ 	       && CP_INTEGRAL_TYPE_P (tparm))
+@@ -20604,9 +20633,22 @@
+ 	   corresponding parameter.  */
+ 	arg = fold (build_nop (tparm, arg));
+       else if (uses_template_parms (tparm))
+-	/* We haven't deduced the type of this parameter yet.  Try again
+-	   later.  */
+-	return unify_success (explain_p);
++	{
++	  /* We haven't deduced the type of this parameter yet.  */
++	  if (cxx_dialect >= cxx1z
++	      /* We deduce from array bounds in try_array_deduction.  */
++	      && !(strict & UNIFY_ALLOW_INTEGER))
++	    {
++	      /* Deduce it from the non-type argument.  */
++	      tree atype = TREE_TYPE (arg);
++	      RECUR_AND_CHECK_FAILURE (tparms, targs,
++				       tparm, atype,
++				       UNIFY_ALLOW_NONE, explain_p);
++	    }
++	  else
++	    /* Try again later.  */
++	    return unify_success (explain_p);
++	}
+       else
+ 	return unify_type_mismatch (explain_p, tparm, TREE_TYPE (arg));
+ 
+@@ -21598,10 +21640,12 @@
+      `T' is `A' but unify () does not check whether `typename T::X'
+      is `int'.  */
+   spec_args = tsubst (spec_args, deduced_args, tf_none, NULL_TREE);
+-  spec_args = coerce_template_parms (DECL_INNERMOST_TEMPLATE_PARMS (tmpl),
+-				     spec_args, tmpl,
+-				     tf_none, false, false);
+ 
++  if (spec_args != error_mark_node)
++    spec_args = coerce_template_parms (DECL_INNERMOST_TEMPLATE_PARMS (tmpl),
++				       INNERMOST_TEMPLATE_ARGS (spec_args),
++				       tmpl, tf_none, false, false);
++
+   pop_tinst_level ();
+ 
+   if (spec_args == error_mark_node
+@@ -23372,6 +23416,14 @@
+ 	   arg_type = TREE_CHAIN (arg_type))
+ 	if (dependent_type_p (TREE_VALUE (arg_type)))
+ 	  return true;
++      if (cxx_dialect >= cxx1z)
++	{
++	  /* A value-dependent noexcept-specifier makes the type dependent.  */
++	  tree spec = TYPE_RAISES_EXCEPTIONS (type);
++	  if (spec && TREE_PURPOSE (spec)
++	      && value_dependent_expression_p (TREE_PURPOSE (spec)))
++	    return true;
++	}
+       return false;
+     }
+   /* -- an array type constructed from any dependent type or whose
+@@ -23920,18 +23972,35 @@
+    return true;
+ 
+   /* A function or variable template-id is type-dependent if it has any
+-     dependent template arguments.  Note that we only consider the innermost
+-     template arguments here, since those are the ones that come from the
+-     template-id; the template arguments for the enclosing class do not make it
+-     type-dependent, they only make a member function value-dependent.  */
++     dependent template arguments.  */
+   if (VAR_OR_FUNCTION_DECL_P (expression)
+       && DECL_LANG_SPECIFIC (expression)
+-      && DECL_TEMPLATE_INFO (expression)
+-      && PRIMARY_TEMPLATE_P (DECL_TI_TEMPLATE (expression))
+-      && (any_dependent_template_arguments_p
+-	  (INNERMOST_TEMPLATE_ARGS (DECL_TI_ARGS (expression)))))
+-    return true;
++      && DECL_TEMPLATE_INFO (expression))
++    {
++      /* Consider the innermost template arguments, since those are the ones
++	 that come from the template-id; the template arguments for the
++	 enclosing class do not make it type-dependent unless they are used in
++	 the type of the decl.  */
++      if (PRIMARY_TEMPLATE_P (DECL_TI_TEMPLATE (expression))
++	  && (any_dependent_template_arguments_p
++	      (INNERMOST_TEMPLATE_ARGS (DECL_TI_ARGS (expression)))))
++	return true;
+ 
++      /* Otherwise, if the decl isn't from a dependent scope, it can't be
++	 type-dependent.  Checking this is important for functions with auto
++	 return type, which looks like a dependent type.  */
++      if (TREE_CODE (expression) == FUNCTION_DECL
++	  && undeduced_auto_decl (expression)
++	  && (!DECL_CLASS_SCOPE_P (expression)
++	      || !dependent_type_p (DECL_CONTEXT (expression)))
++	  && (!DECL_FRIEND_CONTEXT (expression)
++	      || !dependent_type_p (DECL_FRIEND_CONTEXT (expression)))
++	  && !DECL_LOCAL_FUNCTION_P (expression))
++	{
++	  return false;
++	}
++    }
++
+   /* Always dependent, on the number of arguments if nothing else.  */
+   if (TREE_CODE (expression) == EXPR_PACK_EXPANSION)
+     return true;
+Index: gcc/cp/semantics.c
+===================================================================
+--- a/src/gcc/cp/semantics.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/cp/semantics.c	(.../branches/gcc-7-branch)
+@@ -2298,6 +2298,16 @@
+ 
+   if (processing_template_decl)
+     {
++      /* If FN is a local extern declaration or set thereof, look them up
++	 again at instantiation time.  */
++      if (is_overloaded_fn (fn))
++	{
++	  tree ifn = get_first_fn (fn);
++	  if (TREE_CODE (ifn) == FUNCTION_DECL
++	      && DECL_LOCAL_FUNCTION_P (ifn))
++	    orig_fn = DECL_NAME (ifn);
++	}
++
+       /* If the call expression is dependent, build a CALL_EXPR node
+ 	 with no type; type_dependent_expression_p recognizes
+ 	 expressions with no type as being dependent.  */
+@@ -2304,7 +2314,7 @@
+       if (type_dependent_expression_p (fn)
+ 	  || any_type_dependent_arguments_p (*args))
+ 	{
+-	  result = build_nt_call_vec (fn, *args);
++	  result = build_nt_call_vec (orig_fn, *args);
+ 	  SET_EXPR_LOCATION (result, EXPR_LOC_OR_LOC (fn, input_location));
+ 	  KOENIG_LOOKUP_P (result) = koenig_p;
+ 	  if (cfun)
+@@ -4697,9 +4707,9 @@
+ 	  && TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type)))
+ 			== INTEGER_CST)
+ 	{
+-	  tree size = size_binop (PLUS_EXPR,
+-				  TYPE_MAX_VALUE (TYPE_DOMAIN (type)),
+-				  size_one_node);
++	  tree size
++	    = fold_convert (sizetype, TYPE_MAX_VALUE (TYPE_DOMAIN (type)));
++	  size = size_binop (PLUS_EXPR, size, size_one_node);
+ 	  if (TREE_CODE (low_bound) == INTEGER_CST)
+ 	    {
+ 	      if (tree_int_cst_lt (size, low_bound))
+Index: gcc/cp/decl2.c
+===================================================================
+--- a/src/gcc/cp/decl2.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/cp/decl2.c	(.../branches/gcc-7-branch)
+@@ -4661,6 +4661,8 @@
+ 	  if (!DECL_SAVED_TREE (decl))
+ 	    continue;
+ 
++	  cgraph_node *node = cgraph_node::get_create (decl);
++
+ 	  /* We lie to the back end, pretending that some functions
+ 	     are not defined when they really are.  This keeps these
+ 	     functions from being put out unnecessarily.  But, we must
+@@ -4681,9 +4683,6 @@
+ 	      && DECL_INITIAL (decl)
+ 	      && decl_needed_p (decl))
+ 	    {
+-	      struct cgraph_node *node, *next;
+-
+-	      node = cgraph_node::get (decl);
+ 	      if (node->cpp_implicit_alias)
+ 		node = node->get_alias_target ();
+ 
+@@ -4693,7 +4692,8 @@
+ 		 group, we need to mark all symbols in the same comdat group
+ 		 that way.  */
+ 	      if (node->same_comdat_group)
+-		for (next = dyn_cast<cgraph_node *> (node->same_comdat_group);
++		for (cgraph_node *next
++		       = dyn_cast<cgraph_node *> (node->same_comdat_group);
+ 		     next != node;
+ 		     next = dyn_cast<cgraph_node *> (next->same_comdat_group))
+ 		  next->call_for_symbol_thunks_and_aliases (clear_decl_external,
+@@ -4707,7 +4707,7 @@
+ 	  if (!DECL_EXTERNAL (decl)
+ 	      && decl_needed_p (decl)
+ 	      && !TREE_ASM_WRITTEN (decl)
+-	      && !cgraph_node::get (decl)->definition)
++	      && !node->definition)
+ 	    {
+ 	      /* We will output the function; no longer consider it in this
+ 		 loop.  */
+Index: gcc/cp/parser.c
+===================================================================
+--- a/src/gcc/cp/parser.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/cp/parser.c	(.../branches/gcc-7-branch)
+@@ -9447,10 +9447,14 @@
+       /* Require an rvalue constant expression here; that's what our
+ 	 callers expect.  Reference constant expressions are handled
+ 	 separately in e.g. cp_parser_template_argument.  */
+-      bool is_const = potential_rvalue_constant_expression (expression);
++      tree decay = expression;
++      if (TREE_TYPE (expression)
++	  && TREE_CODE (TREE_TYPE (expression)) == ARRAY_TYPE)
++	decay = build_address (expression);
++      bool is_const = potential_rvalue_constant_expression (decay);
+       parser->non_integral_constant_expression_p = !is_const;
+       if (!is_const && !allow_non_constant_p)
+-	require_potential_rvalue_constant_expression (expression);
++	require_potential_rvalue_constant_expression (decay);
+     }
+   if (allow_non_constant_p)
+     *non_constant_p = parser->non_integral_constant_expression_p;
+@@ -23677,7 +23681,7 @@
+ 	  if (virtual_p && !duplicate_virtual_error_issued_p)
+ 	    {
+ 	      cp_parser_error (parser,
+-			       "%<virtual%> specified more than once in base-specified");
++			       "%<virtual%> specified more than once in base-specifier");
+ 	      duplicate_virtual_error_issued_p = true;
+ 	    }
+ 
+@@ -23697,7 +23701,7 @@
+ 	      && !duplicate_access_error_issued_p)
+ 	    {
+ 	      cp_parser_error (parser,
+-			       "more than one access specifier in base-specified");
++			       "more than one access specifier in base-specifier");
+ 	      duplicate_access_error_issued_p = true;
+ 	    }
+ 
+Index: gcc/cp/call.c
+===================================================================
+--- a/src/gcc/cp/call.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/cp/call.c	(.../branches/gcc-7-branch)
+@@ -7552,6 +7552,9 @@
+       const tree *argarray;
+       unsigned int nargs;
+ 
++      if (undeduced_auto_decl (fn))
++	mark_used (fn, complain);
++
+       return_type = TREE_TYPE (TREE_TYPE (fn));
+       nargs = vec_safe_length (args);
+       if (first_arg == NULL_TREE)
+Index: gcc/cp/lambda.c
+===================================================================
+--- a/src/gcc/cp/lambda.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/cp/lambda.c	(.../branches/gcc-7-branch)
+@@ -999,6 +999,8 @@
+ 			    null_pointer_node);
+   if (generic_lambda_p)
+     {
++      ++processing_template_decl;
++
+       /* Prepare the dependent member call for the static member function
+ 	 '_FUN' and, potentially, prepare another call to be used in a decltype
+ 	 return expression for a deduced return call op to allow for simple
+@@ -1048,9 +1050,7 @@
+ 
+ 	if (generic_lambda_p)
+ 	  {
+-	    ++processing_template_decl;
+ 	    tree a = forward_parm (tgt);
+-	    --processing_template_decl;
+ 
+ 	    CALL_EXPR_ARG (call, ix) = a;
+ 	    if (decltype_call)
+@@ -1074,11 +1074,9 @@
+     {
+       if (decltype_call)
+ 	{
+-	  ++processing_template_decl;
+ 	  fn_result = finish_decltype_type
+ 	    (decltype_call, /*id_expression_or_member_access_p=*/false,
+ 	     tf_warning_or_error);
+-	  --processing_template_decl;
+ 	}
+     }
+   else
+@@ -1096,6 +1094,9 @@
+       && TYPE_NOTHROW_P (TREE_TYPE (callop)))
+     stattype = build_exception_variant (stattype, noexcept_true_spec);
+ 
++  if (generic_lambda_p)
++    --processing_template_decl;
++
+   /* First build up the conversion op.  */
+ 
+   tree rettype = build_pointer_type (stattype);
+Index: gcc/cp/mangle.c
+===================================================================
+--- a/src/gcc/cp/mangle.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/cp/mangle.c	(.../branches/gcc-7-branch)
+@@ -2100,6 +2100,11 @@
+ 	  || TREE_CODE (t) == METHOD_TYPE)
+ 	{
+ 	  t = build_ref_qualified_type (t, type_memfn_rqual (type));
++	  if (flag_noexcept_type)
++	    {
++	      tree r = TYPE_RAISES_EXCEPTIONS (type);
++	      t = build_exception_variant (t, r);
++	    }
+ 	  if (abi_version_at_least (8)
+ 	      || type == TYPE_MAIN_VARIANT (type))
+ 	    /* Avoid adding the unqualified function type as a substitution.  */
+Index: gcc/cp/cp-tree.h
+===================================================================
+--- a/src/gcc/cp/cp-tree.h	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/cp/cp-tree.h	(.../branches/gcc-7-branch)
+@@ -332,7 +332,6 @@
+   cxx_binding *bindings;
+   tree class_template_info;
+   tree label_value;
+-  bool oracle_looked_up;
+ };
+ 
+ /* Return a typed pointer version of T if it designates a
+Index: gcc/tree-ssa-ccp.c
+===================================================================
+--- a/src/gcc/tree-ssa-ccp.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/tree-ssa-ccp.c	(.../branches/gcc-7-branch)
+@@ -497,9 +497,7 @@
+      use the meet operator to retain a conservative value.
+      Missed optimizations like PR65851 makes this necessary.
+      It also ensures we converge to a stable lattice solution.  */
+-  if (new_val->lattice_val == CONSTANT
+-      && old_val->lattice_val == CONSTANT
+-      && TREE_CODE (new_val->value) != SSA_NAME)
++  if (old_val->lattice_val != UNINITIALIZED)
+     ccp_lattice_meet (new_val, old_val);
+ 
+   gcc_checking_assert (valid_lattice_transition (*old_val, *new_val));
+Index: gcc/dwarf2out.c
+===================================================================
+--- a/src/gcc/dwarf2out.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/dwarf2out.c	(.../branches/gcc-7-branch)
+@@ -189,6 +189,10 @@
+ #define DWARF_INITIAL_LENGTH_SIZE (DWARF_OFFSET_SIZE == 4 ? 4 : 12)
+ #endif
+ 
++#ifndef DWARF_INITIAL_LENGTH_SIZE_STR
++#define DWARF_INITIAL_LENGTH_SIZE_STR (DWARF_OFFSET_SIZE == 4 ? "-4" : "-12")
++#endif
++
+ /* Round SIZE up to the nearest BOUNDARY.  */
+ #define DWARF_ROUND(SIZE,BOUNDARY) \
+   ((((SIZE) + (BOUNDARY) - 1) / (BOUNDARY)) * (BOUNDARY))
+@@ -29649,6 +29653,7 @@
+   comdat_type_node *ctnode;
+   dw_die_ref main_comp_unit_die;
+   unsigned char checksum[16];
++  char dl_section_ref[MAX_ARTIFICIAL_LABEL_BYTES];
+ 
+   /* Flush out any latecomers to the limbo party.  */
+   flush_limbo_die_list ();
+@@ -29766,9 +29771,15 @@
+ 	}
+     }
+ 
++  /* AIX Assembler inserts the length, so adjust the reference to match the
++     offset expected by debuggers.  */
++  strcpy (dl_section_ref, debug_line_section_label);
++  if (XCOFF_DEBUGGING_INFO)
++    strcat (dl_section_ref, DWARF_INITIAL_LENGTH_SIZE_STR);
++
+   if (debug_info_level >= DINFO_LEVEL_TERSE)
+     add_AT_lineptr (main_comp_unit_die, DW_AT_stmt_list,
+-		    debug_line_section_label);
++		    dl_section_ref);
+ 
+   if (have_macinfo)
+     add_AT_macptr (comp_unit_die (),
+@@ -29844,7 +29855,7 @@
+       if (debug_info_level >= DINFO_LEVEL_TERSE)
+         add_AT_lineptr (ctnode->root_die, DW_AT_stmt_list,
+                         (!dwarf_split_debug_info
+-                         ? debug_line_section_label
++                         ? dl_section_ref
+                          : debug_skeleton_line_section_label));
+ 
+       output_comdat_type_unit (ctnode);
 Index: gcc/expr.c
 ===================================================================
 --- a/src/gcc/expr.c	(.../tags/gcc_7_1_0_release)
@@ -2599,6 +7584,124 @@ Index: gcc/go/gofrontend/types.cc
  	{
  	  if (reason != NULL)
  	    {
+Index: gcc/ada/s-tpopsp-rtems.adb
+===================================================================
+--- a/src/gcc/ada/s-tpopsp-rtems.adb	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/ada/s-tpopsp-rtems.adb	(.../branches/gcc-7-branch)
+@@ -1,113 +0,0 @@
+-------------------------------------------------------------------------------
+---                                                                          --
+---                GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS               --
+---                                                                          --
+---    S Y S T E M . T A S K _ P R I M I T I V E S . O P E R A T I O N S .   --
+---                              S P E C I F I C                             --
+---                                                                          --
+---                                  B o d y                                 --
+---                                                                          --
+---                             $Revision: 1.2 $
+---                                                                          --
+---            Copyright (C) 1991-2003, Florida State University             --
+---            Copyright (C) 2008-2012, Free Software Foundation, Inc.       --
+---                                                                          --
+--- GNARL is free software; you can  redistribute it  and/or modify it under --
+--- terms of the  GNU General Public License as published  by the Free Soft- --
+--- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+--- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+--- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+--- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+---                                                                          --
+--- As a special exception under Section 7 of GPL version 3, you are granted --
+--- additional permissions described in the GCC Runtime Library Exception,   --
+--- version 3.1, as published by the Free Software Foundation.               --
+---                                                                          --
+--- You should have received a copy of the GNU General Public License and    --
+--- a copy of the GCC Runtime Library Exception along with this program;     --
+--- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+--- <http://www.gnu.org/licenses/>.                                          --
+---                                                                          --
+--- GNARL was developed by the GNARL team at Florida State University. It is --
+--- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
+--- State University (http://www.gnat.com).                                  --
+---                                                                          --
+-------------------------------------------------------------------------------
+-
+---  This is a RTEMS version of this package which uses a special
+---  variable for Ada self which is context switched implicitly by RTEMS.
+---
+---  This is the same as the POSIX version except that an RTEMS variable
+---  is used instead of a POSIX key.
+-
+-separate (System.Task_Primitives.Operations)
+-package body Specific is
+-
+-   --  The following gives the Ada run-time direct access to a variable
+-   --  context switched by RTEMS at the lowest level.
+-
+-   ATCB_Key : System.Address;
+-   pragma Import (C, ATCB_Key, "rtems_ada_self");
+-
+-   ----------------
+-   -- Initialize --
+-   ----------------
+-
+-   procedure Initialize (Environment_Task : Task_Id) is
+-      pragma Warnings (Off, Environment_Task);
+-
+-   begin
+-      ATCB_Key := To_Address (Environment_Task);
+-   end Initialize;
+-
+-   -------------------
+-   -- Is_Valid_Task --
+-   -------------------
+-
+-   function Is_Valid_Task return Boolean is
+-   begin
+-      return ATCB_Key /= System.Null_Address;
+-   end Is_Valid_Task;
+-
+-   ---------
+-   -- Set --
+-   ---------
+-
+-   procedure Set (Self_Id : Task_Id) is
+-   begin
+-      ATCB_Key := To_Address (Self_Id);
+-   end Set;
+-
+-   ----------
+-   -- Self --
+-   ----------
+-
+-   --  To make Ada tasks and C threads interoperate better, we have added some
+-   --  functionality to Self. Suppose a C main program (with threads) calls an
+-   --  Ada procedure and the Ada procedure calls the tasking runtime system.
+-   --  Eventually, a call will be made to self. Since the call is not coming
+-   --  from an Ada task, there will be no corresponding ATCB.
+-
+-   --  What we do in Self is to catch references that do not come from
+-   --  recognized Ada tasks, and create an ATCB for the calling thread.
+-
+-   --  The new ATCB will be "detached" from the normal Ada task master
+-   --  hierarchy, much like the existing implicitly created signal-server
+-   --  tasks.
+-
+-   function Self return Task_Id is
+-      Result : System.Address;
+-
+-   begin
+-      Result := ATCB_Key;
+-
+-      --  If the key value is Null, then it is a non-Ada task.
+-
+-      if Result /= System.Null_Address then
+-         return To_Task_Id (Result);
+-      else
+-         return Register_Foreign_Thread;
+-      end if;
+-   end Self;
+-
+-end Specific;
 Index: gcc/ada/system-linux-aarch64-ilp32.ads
 ===================================================================
 --- a/src/gcc/ada/system-linux-aarch64-ilp32.ads	(.../tags/gcc_7_1_0_release)
@@ -2761,11 +7864,1153 @@ Index: gcc/ada/system-linux-aarch64-ilp32.ads
 -   ZCX_By_Default            : constant Boolean := True;
 -
 -end System;
+Index: gcc/ada/s-interr-hwint.adb
+===================================================================
+--- a/src/gcc/ada/s-interr-hwint.adb	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/ada/s-interr-hwint.adb	(.../branches/gcc-7-branch)
+@@ -0,0 +1,1110 @@
++------------------------------------------------------------------------------
++--                                                                          --
++--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
++--                                                                          --
++--                     S Y S T E M . I N T E R R U P T S                    --
++--                                                                          --
++--                                  B o d y                                 --
++--                                                                          --
++--         Copyright (C) 1992-2014, Free Software Foundation, Inc.          --
++--                                                                          --
++-- GNARL is free software; you can  redistribute it  and/or modify it under --
++-- terms of the  GNU General Public License as published  by the Free Soft- --
++-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
++-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
++-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
++-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
++--                                                                          --
++-- As a special exception under Section 7 of GPL version 3, you are granted --
++-- additional permissions described in the GCC Runtime Library Exception,   --
++-- version 3.1, as published by the Free Software Foundation.               --
++--                                                                          --
++-- You should have received a copy of the GNU General Public License and    --
++-- a copy of the GCC Runtime Library Exception along with this program;     --
++-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
++-- <http://www.gnu.org/licenses/>.                                          --
++--                                                                          --
++-- GNARL was developed by the GNARL team at Florida State University.       --
++-- Extensive contributions were provided by Ada Core Technologies, Inc.     --
++--                                                                          --
++------------------------------------------------------------------------------
++
++--  Invariants:
++
++--  All user-handlable signals are masked at all times in all tasks/threads
++--  except possibly for the Interrupt_Manager task.
++
++--  When a user task wants to have the effect of masking/unmasking an signal,
++--  it must call Block_Interrupt/Unblock_Interrupt, which will have the effect
++--  of unmasking/masking the signal in the Interrupt_Manager task. These
++--  comments do not apply to vectored hardware interrupts, which may be masked
++--  or unmasked using routined interfaced to the relevant embedded RTOS system
++--  calls.
++
++--  Once we associate a Signal_Server_Task with an signal, the task never goes
++--  away, and we never remove the association. On the other hand, it is more
++--  convenient to terminate an associated Interrupt_Server_Task for a vectored
++--  hardware interrupt (since we use a binary semaphore for synchronization
++--  with the umbrella handler).
++
++--  There is no more than one signal per Signal_Server_Task and no more than
++--  one Signal_Server_Task per signal. The same relation holds for hardware
++--  interrupts and Interrupt_Server_Task's at any given time. That is, only
++--  one non-terminated Interrupt_Server_Task exists for a give interrupt at
++--  any time.
++
++--  Within this package, the lock L is used to protect the various status
++--  tables. If there is a Server_Task associated with a signal or interrupt,
++--  we use the per-task lock of the Server_Task instead so that we protect the
++--  status between Interrupt_Manager and Server_Task. Protection among service
++--  requests are ensured via user calls to the Interrupt_Manager entries.
++
++--  This is reasonably generic version of this package, supporting vectored
++--  hardware interrupts using non-RTOS specific adapter routines which should
++--  easily implemented on any RTOS capable of supporting GNAT.
++
++with Ada.Unchecked_Conversion;
++with Ada.Task_Identification;
++
++with Interfaces.C; use Interfaces.C;
++with System.OS_Interface; use System.OS_Interface;
++with System.Interrupt_Management;
++with System.Task_Primitives.Operations;
++with System.Storage_Elements;
++with System.Tasking.Utilities;
++
++with System.Tasking.Rendezvous;
++pragma Elaborate_All (System.Tasking.Rendezvous);
++
++package body System.Interrupts is
++
++   use Tasking;
++
++   package POP renames System.Task_Primitives.Operations;
++
++   function To_Ada is new Ada.Unchecked_Conversion
++     (System.Tasking.Task_Id, Ada.Task_Identification.Task_Id);
++
++   function To_System is new Ada.Unchecked_Conversion
++     (Ada.Task_Identification.Task_Id, Task_Id);
++
++   -----------------
++   -- Local Tasks --
++   -----------------
++
++   --  WARNING: System.Tasking.Stages performs calls to this task with low-
++   --  level constructs. Do not change this spec without synchronizing it.
++
++   task Interrupt_Manager is
++      entry Detach_Interrupt_Entries (T : Task_Id);
++
++      entry Attach_Handler
++        (New_Handler : Parameterless_Handler;
++         Interrupt   : Interrupt_ID;
++         Static      : Boolean;
++         Restoration : Boolean := False);
++
++      entry Exchange_Handler
++        (Old_Handler : out Parameterless_Handler;
++         New_Handler : Parameterless_Handler;
++         Interrupt   : Interrupt_ID;
++         Static      : Boolean);
++
++      entry Detach_Handler
++        (Interrupt : Interrupt_ID;
++         Static    : Boolean);
++
++      entry Bind_Interrupt_To_Entry
++        (T         : Task_Id;
++         E         : Task_Entry_Index;
++         Interrupt : Interrupt_ID);
++
++      pragma Interrupt_Priority (System.Interrupt_Priority'First);
++   end Interrupt_Manager;
++
++   task type Interrupt_Server_Task
++     (Interrupt : Interrupt_ID;
++      Int_Sema  : Binary_Semaphore_Id)
++   is
++      --  Server task for vectored hardware interrupt handling
++
++      pragma Interrupt_Priority (System.Interrupt_Priority'First + 2);
++   end Interrupt_Server_Task;
++
++   type Interrupt_Task_Access is access Interrupt_Server_Task;
++
++   -------------------------------
++   -- Local Types and Variables --
++   -------------------------------
++
++   type Entry_Assoc is record
++      T : Task_Id;
++      E : Task_Entry_Index;
++   end record;
++
++   type Handler_Assoc is record
++      H      : Parameterless_Handler;
++      Static : Boolean;   --  Indicates static binding;
++   end record;
++
++   User_Handler : array (Interrupt_ID) of Handler_Assoc :=
++     (others => (null, Static => False));
++   pragma Volatile_Components (User_Handler);
++   --  Holds the protected procedure handler (if any) and its Static
++   --  information for each interrupt or signal. A handler is static iff it
++   --  is specified through the pragma Attach_Handler.
++
++   User_Entry : array (Interrupt_ID) of Entry_Assoc :=
++                  (others => (T => Null_Task, E => Null_Task_Entry));
++   pragma Volatile_Components (User_Entry);
++   --  Holds the task and entry index (if any) for each interrupt / signal
++
++   --  Type and Head, Tail of the list containing Registered Interrupt
++   --  Handlers. These definitions are used to register the handlers
++   --  specified by the pragma Interrupt_Handler.
++
++   type Registered_Handler;
++   type R_Link is access all Registered_Handler;
++
++   type Registered_Handler is record
++      H    : System.Address := System.Null_Address;
++      Next : R_Link := null;
++   end record;
++
++   Registered_Handler_Head : R_Link := null;
++   Registered_Handler_Tail : R_Link := null;
++
++   Server_ID : array (Interrupt_ID) of System.Tasking.Task_Id :=
++                 (others => System.Tasking.Null_Task);
++   pragma Atomic_Components (Server_ID);
++   --  Holds the Task_Id of the Server_Task for each interrupt / signal.
++   --  Task_Id is needed to accomplish locking per interrupt base. Also
++   --  is needed to determine whether to create a new Server_Task.
++
++   Semaphore_ID_Map : array
++     (Interrupt_ID range 0 .. System.OS_Interface.Max_HW_Interrupt) of
++        Binary_Semaphore_Id := (others => 0);
++   --  Array of binary semaphores associated with vectored interrupts. Note
++   --  that the last bound should be Max_HW_Interrupt, but this will raise
++   --  Storage_Error if Num_HW_Interrupts is null so use extra 4 bytes instead.
++
++   Interrupt_Access_Hold : Interrupt_Task_Access;
++   --  Variable for allocating an Interrupt_Server_Task
++
++   Handler_Installed : array (HW_Interrupt) of Boolean := (others => False);
++   --  True if Notify_Interrupt was connected to the interrupt. Handlers can
++   --  be connected but disconnection is not possible on VxWorks. Therefore
++   --  we ensure Notify_Installed is connected at most once.
++
++   -----------------------
++   -- Local Subprograms --
++   -----------------------
++
++   procedure Check_Reserved_Interrupt (Interrupt : Interrupt_ID);
++   --  Check if Id is a reserved interrupt, and if so raise Program_Error
++   --  with an appropriate message, otherwise return.
++
++   procedure Finalize_Interrupt_Servers;
++   --  Unbind the handlers for hardware interrupt server tasks at program
++   --  termination.
++
++   function Is_Registered (Handler : Parameterless_Handler) return Boolean;
++   --  See if Handler has been "pragma"ed using Interrupt_Handler.
++   --  Always consider a null handler as registered.
++
++   procedure Notify_Interrupt (Param : System.Address);
++   pragma Convention (C, Notify_Interrupt);
++   --  Umbrella handler for vectored interrupts (not signals)
++
++   procedure Install_Umbrella_Handler
++     (Interrupt : HW_Interrupt;
++      Handler   : System.OS_Interface.Interrupt_Handler);
++   --  Install the runtime umbrella handler for a vectored hardware
++   --  interrupt
++
++   procedure Unimplemented (Feature : String);
++   pragma No_Return (Unimplemented);
++   --  Used to mark a call to an unimplemented function. Raises Program_Error
++   --  with an appropriate message noting that Feature is unimplemented.
++
++   --------------------
++   -- Attach_Handler --
++   --------------------
++
++   --  Calling this procedure with New_Handler = null and Static = True
++   --  means we want to detach the current handler regardless of the previous
++   --  handler's binding status (i.e. do not care if it is a dynamic or static
++   --  handler).
++
++   --  This option is needed so that during the finalization of a PO, we can
++   --  detach handlers attached through pragma Attach_Handler.
++
++   procedure Attach_Handler
++     (New_Handler : Parameterless_Handler;
++      Interrupt   : Interrupt_ID;
++      Static      : Boolean := False) is
++   begin
++      Check_Reserved_Interrupt (Interrupt);
++      Interrupt_Manager.Attach_Handler (New_Handler, Interrupt, Static);
++   end Attach_Handler;
++
++   -----------------------------
++   -- Bind_Interrupt_To_Entry --
++   -----------------------------
++
++   --  This procedure raises a Program_Error if it tries to
++   --  bind an interrupt to which an Entry or a Procedure is
++   --  already bound.
++
++   procedure Bind_Interrupt_To_Entry
++     (T       : Task_Id;
++      E       : Task_Entry_Index;
++      Int_Ref : System.Address)
++   is
++      Interrupt : constant Interrupt_ID :=
++                    Interrupt_ID (Storage_Elements.To_Integer (Int_Ref));
++   begin
++      Check_Reserved_Interrupt (Interrupt);
++      Interrupt_Manager.Bind_Interrupt_To_Entry (T, E, Interrupt);
++   end Bind_Interrupt_To_Entry;
++
++   ---------------------
++   -- Block_Interrupt --
++   ---------------------
++
++   procedure Block_Interrupt (Interrupt : Interrupt_ID) is
++   begin
++      Unimplemented ("Block_Interrupt");
++   end Block_Interrupt;
++
++   ------------------------------
++   -- Check_Reserved_Interrupt --
++   ------------------------------
++
++   procedure Check_Reserved_Interrupt (Interrupt : Interrupt_ID) is
++   begin
++      if Is_Reserved (Interrupt) then
++         raise Program_Error with
++           "interrupt" & Interrupt_ID'Image (Interrupt) & " is reserved";
++      else
++         return;
++      end if;
++   end Check_Reserved_Interrupt;
++
++   ---------------------
++   -- Current_Handler --
++   ---------------------
++
++   function Current_Handler
++     (Interrupt : Interrupt_ID) return Parameterless_Handler
++   is
++   begin
++      Check_Reserved_Interrupt (Interrupt);
++
++      --  ??? Since Parameterless_Handler is not Atomic, the current
++      --  implementation is wrong. We need a new service in Interrupt_Manager
++      --  to ensure atomicity.
++
++      return User_Handler (Interrupt).H;
++   end Current_Handler;
++
++   --------------------
++   -- Detach_Handler --
++   --------------------
++
++   --  Calling this procedure with Static = True means we want to Detach the
++   --  current handler regardless of the previous handler's binding status
++   --  (i.e. do not care if it is a dynamic or static handler).
++
++   --  This option is needed so that during the finalization of a PO, we can
++   --  detach handlers attached through pragma Attach_Handler.
++
++   procedure Detach_Handler
++     (Interrupt : Interrupt_ID;
++      Static    : Boolean := False)
++   is
++   begin
++      Check_Reserved_Interrupt (Interrupt);
++      Interrupt_Manager.Detach_Handler (Interrupt, Static);
++   end Detach_Handler;
++
++   ------------------------------
++   -- Detach_Interrupt_Entries --
++   ------------------------------
++
++   procedure Detach_Interrupt_Entries (T : Task_Id) is
++   begin
++      Interrupt_Manager.Detach_Interrupt_Entries (T);
++   end Detach_Interrupt_Entries;
++
++   ----------------------
++   -- Exchange_Handler --
++   ----------------------
++
++   --  Calling this procedure with New_Handler = null and Static = True
++   --  means we want to detach the current handler regardless of the previous
++   --  handler's binding status (i.e. we do not care if it is a dynamic or
++   --  static handler).
++
++   --  This option is needed so that during the finalization of a PO, we can
++   --  detach handlers attached through pragma Attach_Handler.
++
++   procedure Exchange_Handler
++     (Old_Handler : out Parameterless_Handler;
++      New_Handler : Parameterless_Handler;
++      Interrupt   : Interrupt_ID;
++      Static      : Boolean := False)
++   is
++   begin
++      Check_Reserved_Interrupt (Interrupt);
++      Interrupt_Manager.Exchange_Handler
++        (Old_Handler, New_Handler, Interrupt, Static);
++   end Exchange_Handler;
++
++   --------------
++   -- Finalize --
++   --------------
++
++   procedure Finalize (Object : in out Static_Interrupt_Protection) is
++   begin
++      --  ??? loop to be executed only when we're not doing library level
++      --  finalization, since in this case all interrupt / signal tasks are
++      --  gone.
++
++      if not Interrupt_Manager'Terminated then
++         for N in reverse Object.Previous_Handlers'Range loop
++            Interrupt_Manager.Attach_Handler
++              (New_Handler => Object.Previous_Handlers (N).Handler,
++               Interrupt   => Object.Previous_Handlers (N).Interrupt,
++               Static      => Object.Previous_Handlers (N).Static,
++               Restoration => True);
++         end loop;
++      end if;
++
++      Tasking.Protected_Objects.Entries.Finalize
++        (Tasking.Protected_Objects.Entries.Protection_Entries (Object));
++   end Finalize;
++
++   --------------------------------
++   -- Finalize_Interrupt_Servers --
++   --------------------------------
++
++   --  Restore default handlers for interrupt servers
++
++   --  This is called by the Interrupt_Manager task when it receives the abort
++   --  signal during program finalization.
++
++   procedure Finalize_Interrupt_Servers is
++      HW_Interrupts : constant Boolean := HW_Interrupt'Last >= 0;
++   begin
++      if HW_Interrupts then
++         for Int in HW_Interrupt loop
++            if Server_ID (Interrupt_ID (Int)) /= null
++              and then
++                not Ada.Task_Identification.Is_Terminated
++                 (To_Ada (Server_ID (Interrupt_ID (Int))))
++            then
++               Interrupt_Manager.Attach_Handler
++                 (New_Handler => null,
++                  Interrupt   => Interrupt_ID (Int),
++                  Static      => True,
++                  Restoration => True);
++            end if;
++         end loop;
++      end if;
++   end Finalize_Interrupt_Servers;
++
++   -------------------------------------
++   -- Has_Interrupt_Or_Attach_Handler --
++   -------------------------------------
++
++   function Has_Interrupt_Or_Attach_Handler
++     (Object : access Dynamic_Interrupt_Protection)
++      return   Boolean
++   is
++      pragma Unreferenced (Object);
++   begin
++      return True;
++   end Has_Interrupt_Or_Attach_Handler;
++
++   function Has_Interrupt_Or_Attach_Handler
++     (Object : access Static_Interrupt_Protection)
++      return   Boolean
++   is
++      pragma Unreferenced (Object);
++   begin
++      return True;
++   end Has_Interrupt_Or_Attach_Handler;
++
++   ----------------------
++   -- Ignore_Interrupt --
++   ----------------------
++
++   procedure Ignore_Interrupt (Interrupt : Interrupt_ID) is
++   begin
++      Unimplemented ("Ignore_Interrupt");
++   end Ignore_Interrupt;
++
++   ----------------------
++   -- Install_Handlers --
++   ----------------------
++
++   procedure Install_Handlers
++     (Object       : access Static_Interrupt_Protection;
++      New_Handlers : New_Handler_Array)
++   is
++   begin
++      for N in New_Handlers'Range loop
++
++         --  We need a lock around this ???
++
++         Object.Previous_Handlers (N).Interrupt := New_Handlers (N).Interrupt;
++         Object.Previous_Handlers (N).Static    := User_Handler
++           (New_Handlers (N).Interrupt).Static;
++
++         --  We call Exchange_Handler and not directly Interrupt_Manager.
++         --  Exchange_Handler so we get the Is_Reserved check.
++
++         Exchange_Handler
++           (Old_Handler => Object.Previous_Handlers (N).Handler,
++            New_Handler => New_Handlers (N).Handler,
++            Interrupt   => New_Handlers (N).Interrupt,
++            Static      => True);
++      end loop;
++   end Install_Handlers;
++
++   ---------------------------------
++   -- Install_Restricted_Handlers --
++   ---------------------------------
++
++   procedure Install_Restricted_Handlers
++      (Prio     : Any_Priority;
++       Handlers : New_Handler_Array)
++   is
++      pragma Unreferenced (Prio);
++   begin
++      for N in Handlers'Range loop
++         Attach_Handler (Handlers (N).Handler, Handlers (N).Interrupt, True);
++      end loop;
++   end Install_Restricted_Handlers;
++
++   ------------------------------
++   -- Install_Umbrella_Handler --
++   ------------------------------
++
++   procedure Install_Umbrella_Handler
++     (Interrupt : HW_Interrupt;
++      Handler   : System.OS_Interface.Interrupt_Handler)
++   is
++      Vec : constant Interrupt_Vector :=
++              Interrupt_Number_To_Vector (int (Interrupt));
++
++      Status : int;
++
++   begin
++      --  Only install umbrella handler when no Ada handler has already been
++      --  installed. Note that the interrupt number is passed as a parameter
++      --  when an interrupt occurs, so the umbrella handler has a different
++      --  wrapper generated by intConnect for each interrupt number.
++
++      if not Handler_Installed (Interrupt) then
++         Status :=
++            Interrupt_Connect (Vec, Handler, System.Address (Interrupt));
++         pragma Assert (Status = 0);
++
++         Handler_Installed (Interrupt) := True;
++      end if;
++   end Install_Umbrella_Handler;
++
++   ----------------
++   -- Is_Blocked --
++   ----------------
++
++   function Is_Blocked (Interrupt : Interrupt_ID) return Boolean is
++   begin
++      Unimplemented ("Is_Blocked");
++      return False;
++   end Is_Blocked;
++
++   -----------------------
++   -- Is_Entry_Attached --
++   -----------------------
++
++   function Is_Entry_Attached (Interrupt : Interrupt_ID) return Boolean is
++   begin
++      Check_Reserved_Interrupt (Interrupt);
++      return User_Entry (Interrupt).T /= Null_Task;
++   end Is_Entry_Attached;
++
++   -------------------------
++   -- Is_Handler_Attached --
++   -------------------------
++
++   function Is_Handler_Attached (Interrupt : Interrupt_ID) return Boolean is
++   begin
++      Check_Reserved_Interrupt (Interrupt);
++      return User_Handler (Interrupt).H /= null;
++   end Is_Handler_Attached;
++
++   ----------------
++   -- Is_Ignored --
++   ----------------
++
++   function Is_Ignored (Interrupt : Interrupt_ID) return Boolean is
++   begin
++      Unimplemented ("Is_Ignored");
++      return False;
++   end Is_Ignored;
++
++   -------------------
++   -- Is_Registered --
++   -------------------
++
++   function Is_Registered (Handler : Parameterless_Handler) return Boolean is
++      type Fat_Ptr is record
++         Object_Addr  : System.Address;
++         Handler_Addr : System.Address;
++      end record;
++
++      function To_Fat_Ptr is new Ada.Unchecked_Conversion
++        (Parameterless_Handler, Fat_Ptr);
++
++      Ptr : R_Link;
++      Fat : Fat_Ptr;
++
++   begin
++      if Handler = null then
++         return True;
++      end if;
++
++      Fat := To_Fat_Ptr (Handler);
++
++      Ptr := Registered_Handler_Head;
++      while Ptr /= null loop
++         if Ptr.H = Fat.Handler_Addr then
++            return True;
++         end if;
++
++         Ptr := Ptr.Next;
++      end loop;
++
++      return False;
++   end Is_Registered;
++
++   -----------------
++   -- Is_Reserved --
++   -----------------
++
++   function Is_Reserved (Interrupt : Interrupt_ID) return Boolean is
++      use System.Interrupt_Management;
++   begin
++      return Reserve (System.Interrupt_Management.Interrupt_ID (Interrupt));
++   end Is_Reserved;
++
++   ----------------------
++   -- Notify_Interrupt --
++   ----------------------
++
++   --  Umbrella handler for vectored hardware interrupts (as opposed to signals
++   --  and exceptions). As opposed to the signal implementation, this handler
++   --  is installed in the vector table when the first Ada handler is attached
++   --  to the interrupt. However because VxWorks don't support disconnecting
++   --  handlers, this subprogram always test whether or not an Ada handler is
++   --  effectively attached.
++
++   --  Otherwise, the handler that existed prior to program startup is in the
++   --  vector table. This ensures that handlers installed by the BSP are active
++   --  unless explicitly replaced in the program text.
++
++   --  Each Interrupt_Server_Task has an associated binary semaphore on which
++   --  it pends once it's been started. This routine determines The appropriate
++   --  semaphore and issues a semGive call, waking the server task. When
++   --  a handler is unbound, System.Interrupts.Unbind_Handler issues a
++   --  Binary_Semaphore_Flush, and the server task deletes its semaphore
++   --  and terminates.
++
++   procedure Notify_Interrupt (Param : System.Address) is
++      Interrupt : constant Interrupt_ID := Interrupt_ID (Param);
++      Id        : constant Binary_Semaphore_Id := Semaphore_ID_Map (Interrupt);
++      Status    : int;
++   begin
++      if Id /= 0 then
++         Status := Binary_Semaphore_Release (Id);
++         pragma Assert (Status = 0);
++      end if;
++   end Notify_Interrupt;
++
++   ---------------
++   -- Reference --
++   ---------------
++
++   function Reference (Interrupt : Interrupt_ID) return System.Address is
++   begin
++      Check_Reserved_Interrupt (Interrupt);
++      return Storage_Elements.To_Address
++               (Storage_Elements.Integer_Address (Interrupt));
++   end Reference;
++
++   --------------------------------
++   -- Register_Interrupt_Handler --
++   --------------------------------
++
++   procedure Register_Interrupt_Handler (Handler_Addr : System.Address) is
++      New_Node_Ptr : R_Link;
++
++   begin
++      --  This routine registers a handler as usable for dynamic interrupt
++      --  handler association. Routines attaching and detaching handlers
++      --  dynamically should determine whether the handler is registered.
++      --  Program_Error should be raised if it is not registered.
++
++      --  Pragma Interrupt_Handler can only appear in a library level PO
++      --  definition and instantiation. Therefore, we do not need to implement
++      --  an unregister operation. Nor do we need to protect the queue
++      --  structure with a lock.
++
++      pragma Assert (Handler_Addr /= System.Null_Address);
++
++      New_Node_Ptr := new Registered_Handler;
++      New_Node_Ptr.H := Handler_Addr;
++
++      if Registered_Handler_Head = null then
++         Registered_Handler_Head := New_Node_Ptr;
++         Registered_Handler_Tail := New_Node_Ptr;
++      else
++         Registered_Handler_Tail.Next := New_Node_Ptr;
++         Registered_Handler_Tail := New_Node_Ptr;
++      end if;
++   end Register_Interrupt_Handler;
++
++   -----------------------
++   -- Unblock_Interrupt --
++   -----------------------
++
++   procedure Unblock_Interrupt (Interrupt : Interrupt_ID) is
++   begin
++      Unimplemented ("Unblock_Interrupt");
++   end Unblock_Interrupt;
++
++   ------------------
++   -- Unblocked_By --
++   ------------------
++
++   function Unblocked_By
++     (Interrupt : Interrupt_ID) return System.Tasking.Task_Id
++   is
++   begin
++      Unimplemented ("Unblocked_By");
++      return Null_Task;
++   end Unblocked_By;
++
++   ------------------------
++   -- Unignore_Interrupt --
++   ------------------------
++
++   procedure Unignore_Interrupt (Interrupt : Interrupt_ID) is
++   begin
++      Unimplemented ("Unignore_Interrupt");
++   end Unignore_Interrupt;
++
++   -------------------
++   -- Unimplemented --
++   -------------------
++
++   procedure Unimplemented (Feature : String) is
++   begin
++      raise Program_Error with Feature & " not implemented on VxWorks";
++   end Unimplemented;
++
++   -----------------------
++   -- Interrupt_Manager --
++   -----------------------
++
++   task body Interrupt_Manager is
++      --  By making this task independent of any master, when the process goes
++      --  away, the Interrupt_Manager will terminate gracefully.
++
++      Ignore : constant Boolean := System.Tasking.Utilities.Make_Independent;
++      pragma Unreferenced (Ignore);
++
++      --------------------
++      -- Local Routines --
++      --------------------
++
++      procedure Bind_Handler (Interrupt : Interrupt_ID);
++      --  This procedure does not do anything if a signal is blocked.
++      --  Otherwise, we have to interrupt Server_Task for status change
++      --  through a wakeup signal.
++
++      procedure Unbind_Handler (Interrupt : Interrupt_ID);
++      --  This procedure does not do anything if a signal is blocked.
++      --  Otherwise, we have to interrupt Server_Task for status change
++      --  through an abort signal.
++
++      procedure Unprotected_Exchange_Handler
++        (Old_Handler : out Parameterless_Handler;
++         New_Handler : Parameterless_Handler;
++         Interrupt   : Interrupt_ID;
++         Static      : Boolean;
++         Restoration : Boolean := False);
++
++      procedure Unprotected_Detach_Handler
++        (Interrupt : Interrupt_ID;
++         Static    : Boolean);
++
++      ------------------
++      -- Bind_Handler --
++      ------------------
++
++      procedure Bind_Handler (Interrupt : Interrupt_ID) is
++      begin
++         Install_Umbrella_Handler
++           (HW_Interrupt (Interrupt), Notify_Interrupt'Access);
++      end Bind_Handler;
++
++      --------------------
++      -- Unbind_Handler --
++      --------------------
++
++      procedure Unbind_Handler (Interrupt : Interrupt_ID) is
++         Status : int;
++
++      begin
++         --  Flush server task off semaphore, allowing it to terminate
++
++         Status := Binary_Semaphore_Flush (Semaphore_ID_Map (Interrupt));
++         pragma Assert (Status = 0);
++      end Unbind_Handler;
++
++      --------------------------------
++      -- Unprotected_Detach_Handler --
++      --------------------------------
++
++      procedure Unprotected_Detach_Handler
++        (Interrupt : Interrupt_ID;
++         Static    : Boolean)
++      is
++         Old_Handler : Parameterless_Handler;
++      begin
++         if User_Entry (Interrupt).T /= Null_Task then
++
++            --  If an interrupt entry is installed raise Program_Error
++            --  (propagate it to the caller).
++
++            raise Program_Error with
++              "an interrupt entry is already installed";
++         end if;
++
++         --  Note : Static = True will pass the following check. This is the
++         --  case when we want to detach a handler regardless of the static
++         --  status of the Current_Handler.
++
++         if not Static and then User_Handler (Interrupt).Static then
++
++            --  Trying to detach a static Interrupt Handler, raise
++            --  Program_Error.
++
++            raise Program_Error with
++              "trying to detach a static Interrupt Handler";
++         end if;
++
++         Old_Handler := User_Handler (Interrupt).H;
++
++         --  The new handler
++
++         User_Handler (Interrupt).H := null;
++         User_Handler (Interrupt).Static := False;
++
++         if Old_Handler /= null then
++            Unbind_Handler (Interrupt);
++         end if;
++      end Unprotected_Detach_Handler;
++
++      ----------------------------------
++      -- Unprotected_Exchange_Handler --
++      ----------------------------------
++
++      procedure Unprotected_Exchange_Handler
++        (Old_Handler : out Parameterless_Handler;
++         New_Handler : Parameterless_Handler;
++         Interrupt   : Interrupt_ID;
++         Static      : Boolean;
++         Restoration : Boolean := False)
++      is
++      begin
++         if User_Entry (Interrupt).T /= Null_Task then
++
++            --  If an interrupt entry is already installed, raise
++            --  Program_Error (propagate it to the caller).
++
++            raise Program_Error with "an interrupt is already installed";
++         end if;
++
++         --  Note : A null handler with Static = True will pass the following
++         --  check. This is the case when we want to detach a handler
++         --  regardless of the Static status of Current_Handler.
++
++         --  We don't check anything if Restoration is True, since we may be
++         --  detaching a static handler to restore a dynamic one.
++
++         if not Restoration and then not Static
++           and then (User_Handler (Interrupt).Static
++
++            --  Trying to overwrite a static Interrupt Handler with a dynamic
++            --  Handler
++
++            --  The new handler is not specified as an Interrupt Handler by a
++            --  pragma.
++
++           or else not Is_Registered (New_Handler))
++         then
++            raise Program_Error with
++               "trying to overwrite a static interrupt handler with a "
++               & "dynamic handler";
++         end if;
++
++         --  Save the old handler
++
++         Old_Handler := User_Handler (Interrupt).H;
++
++         --  The new handler
++
++         User_Handler (Interrupt).H := New_Handler;
++
++         if New_Handler = null then
++
++            --  The null handler means we are detaching the handler
++
++            User_Handler (Interrupt).Static := False;
++
++         else
++            User_Handler (Interrupt).Static := Static;
++         end if;
++
++         --  Invoke a corresponding Server_Task if not yet created. Place
++         --  Task_Id info in Server_ID array.
++
++         if New_Handler /= null
++           and then
++            (Server_ID (Interrupt) = Null_Task
++              or else
++                Ada.Task_Identification.Is_Terminated
++                  (To_Ada (Server_ID (Interrupt))))
++         then
++            Interrupt_Access_Hold :=
++              new Interrupt_Server_Task (Interrupt, Binary_Semaphore_Create);
++            Server_ID (Interrupt) :=
++              To_System (Interrupt_Access_Hold.all'Identity);
++         end if;
++
++         if (New_Handler = null) and then Old_Handler /= null then
++
++            --  Restore default handler
++
++            Unbind_Handler (Interrupt);
++
++         elsif Old_Handler = null then
++
++            --  Save default handler
++
++            Bind_Handler (Interrupt);
++         end if;
++      end Unprotected_Exchange_Handler;
++
++   --  Start of processing for Interrupt_Manager
++
++   begin
++      loop
++         --  A block is needed to absorb Program_Error exception
++
++         declare
++            Old_Handler : Parameterless_Handler;
++
++         begin
++            select
++               accept Attach_Handler
++                 (New_Handler : Parameterless_Handler;
++                  Interrupt   : Interrupt_ID;
++                  Static      : Boolean;
++                  Restoration : Boolean := False)
++               do
++                  Unprotected_Exchange_Handler
++                    (Old_Handler, New_Handler, Interrupt, Static, Restoration);
++               end Attach_Handler;
++
++            or
++               accept Exchange_Handler
++                 (Old_Handler : out Parameterless_Handler;
++                  New_Handler : Parameterless_Handler;
++                  Interrupt   : Interrupt_ID;
++                  Static      : Boolean)
++               do
++                  Unprotected_Exchange_Handler
++                    (Old_Handler, New_Handler, Interrupt, Static);
++               end Exchange_Handler;
++
++            or
++               accept Detach_Handler
++                  (Interrupt : Interrupt_ID;
++                   Static    : Boolean)
++               do
++                  Unprotected_Detach_Handler (Interrupt, Static);
++               end Detach_Handler;
++
++            or
++               accept Bind_Interrupt_To_Entry
++                 (T         : Task_Id;
++                  E         : Task_Entry_Index;
++                  Interrupt : Interrupt_ID)
++               do
++                  --  If there is a binding already (either a procedure or an
++                  --  entry), raise Program_Error (propagate it to the caller).
++
++                  if User_Handler (Interrupt).H /= null
++                    or else User_Entry (Interrupt).T /= Null_Task
++                  then
++                     raise Program_Error with
++                       "a binding for this interrupt is already present";
++                  end if;
++
++                  User_Entry (Interrupt) := Entry_Assoc'(T => T, E => E);
++
++                  --  Indicate the attachment of interrupt entry in the ATCB.
++                  --  This is needed so when an interrupt entry task terminates
++                  --  the binding can be cleaned. The call to unbinding must be
++                  --  make by the task before it terminates.
++
++                  T.Interrupt_Entry := True;
++
++                  --  Invoke a corresponding Server_Task if not yet created.
++                  --  Place Task_Id info in Server_ID array.
++
++                  if Server_ID (Interrupt) = Null_Task
++                    or else
++                      Ada.Task_Identification.Is_Terminated
++                        (To_Ada (Server_ID (Interrupt)))
++                  then
++                     Interrupt_Access_Hold := new Interrupt_Server_Task
++                       (Interrupt, Binary_Semaphore_Create);
++                     Server_ID (Interrupt) :=
++                       To_System (Interrupt_Access_Hold.all'Identity);
++                  end if;
++
++                  Bind_Handler (Interrupt);
++               end Bind_Interrupt_To_Entry;
++
++            or
++               accept Detach_Interrupt_Entries (T : Task_Id) do
++                  for Int in Interrupt_ID'Range loop
++                     if not Is_Reserved (Int) then
++                        if User_Entry (Int).T = T then
++                           User_Entry (Int) :=
++                             Entry_Assoc'
++                               (T => Null_Task, E => Null_Task_Entry);
++                           Unbind_Handler (Int);
++                        end if;
++                     end if;
++                  end loop;
++
++                  --  Indicate in ATCB that no interrupt entries are attached
++
++                  T.Interrupt_Entry := False;
++               end Detach_Interrupt_Entries;
++            end select;
++
++         exception
++            --  If there is a Program_Error we just want to propagate it to
++            --  the caller and do not want to stop this task.
++
++            when Program_Error =>
++               null;
++
++            when others =>
++               pragma Assert (False);
++               null;
++         end;
++      end loop;
++
++   exception
++      when Standard'Abort_Signal =>
++
++         --  Flush interrupt server semaphores, so they can terminate
++
++         Finalize_Interrupt_Servers;
++         raise;
++   end Interrupt_Manager;
++
++   ---------------------------
++   -- Interrupt_Server_Task --
++   ---------------------------
++
++   --  Server task for vectored hardware interrupt handling
++
++   task body Interrupt_Server_Task is
++      Ignore : constant Boolean := System.Tasking.Utilities.Make_Independent;
++
++      Self_Id         : constant Task_Id := Self;
++      Tmp_Handler     : Parameterless_Handler;
++      Tmp_ID          : Task_Id;
++      Tmp_Entry_Index : Task_Entry_Index;
++      Status          : int;
++
++   begin
++      Semaphore_ID_Map (Interrupt) := Int_Sema;
++
++      loop
++         --  Pend on semaphore that will be triggered by the umbrella handler
++         --  when the associated interrupt comes in.
++
++         Status := Binary_Semaphore_Obtain (Int_Sema);
++         pragma Assert (Status = 0);
++
++         if User_Handler (Interrupt).H /= null then
++
++            --  Protected procedure handler
++
++            Tmp_Handler := User_Handler (Interrupt).H;
++            Tmp_Handler.all;
++
++         elsif User_Entry (Interrupt).T /= Null_Task then
++
++            --  Interrupt entry handler
++
++            Tmp_ID := User_Entry (Interrupt).T;
++            Tmp_Entry_Index := User_Entry (Interrupt).E;
++            System.Tasking.Rendezvous.Call_Simple
++              (Tmp_ID, Tmp_Entry_Index, System.Null_Address);
++
++         else
++            --  Semaphore has been flushed by an unbind operation in the
++            --  Interrupt_Manager. Terminate the server task.
++
++            --  Wait for the Interrupt_Manager to complete its work
++
++            POP.Write_Lock (Self_Id);
++
++            --  Unassociate the interrupt handler
++
++            Semaphore_ID_Map (Interrupt) := 0;
++
++            --  Delete the associated semaphore
++
++            Status := Binary_Semaphore_Delete (Int_Sema);
++
++            pragma Assert (Status = 0);
++
++            --  Set status for the Interrupt_Manager
++
++            Server_ID (Interrupt) := Null_Task;
++            POP.Unlock (Self_Id);
++
++            exit;
++         end if;
++      end loop;
++   end Interrupt_Server_Task;
++
++begin
++   --  Get Interrupt_Manager's ID so that Abort_Interrupt can be sent
++
++   Interrupt_Manager_ID := To_System (Interrupt_Manager'Identity);
++end System.Interrupts;
+
+Property changes on: gcc/ada/s-interr-hwint.adb
+___________________________________________________________________
+Added: svn:mergeinfo
+## -0,0 +0,1 ##
+   Merged /trunk/gcc/ada/s-interr-hwint.adb:r239173,239656,239797,243528,243962
 Index: gcc/ada/ChangeLog
 ===================================================================
 --- a/src/gcc/ada/ChangeLog	(.../tags/gcc_7_1_0_release)
 +++ b/src/gcc/ada/ChangeLog	(.../branches/gcc-7-branch)
-@@ -1,3 +1,48 @@
+@@ -1,3 +1,69 @@
++2017-06-15  Nicolas Boulenguez  <nicolas.boulenguez at free.fr>
++
++	PR ada/81105
++	* gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
++	(i[3456]86-pc-gnu): Likewise.
++	(x86_64 kfreebsd): Likewise.
++
++2017-06-12  Eric Botcazou  <ebotcazou at adacore.com>
++
++	PR ada/81070
++	* s-interr-hwint.adb: Reinstate.
++	* gcc-interface/Makefile.in (RTEMS): Use it again.
++
++2017-06-12  Sebastian Huber  <sebastian.huber at embedded-brains.de>
++
++	Backport from mainline
++	2017-06-07  Sebastian Huber  <sebastian.huber at embedded-brains.de>
++
++	* Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
++	* s-tpopsp-rtems.adb: Delete.
++
 +2017-05-22  Eric Botcazou  <ebotcazou at adacore.com>
 +
 +	* gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
@@ -2831,6 +9076,45 @@ Index: gcc/ada/gcc-interface/Makefile.in
 ===================================================================
 --- a/src/gcc/ada/gcc-interface/Makefile.in	(.../tags/gcc_7_1_0_release)
 +++ b/src/gcc/ada/gcc-interface/Makefile.in	(.../branches/gcc-7-branch)
+@@ -1424,7 +1424,7 @@
+   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
+   $(ATOMICS_TARGET_PAIRS) \
+   $(X86_TARGET_PAIRS) \
+-  system.ads<system-freebsd-x86.ads
++  system.ads<system-freebsd.ads
+ 
+   TOOLS_TARGET_PAIRS =  \
+     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
+@@ -1454,7 +1454,7 @@
+   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
+   $(ATOMICS_TARGET_PAIRS) \
+   $(X86_TARGET_PAIRS) \
+-  system.ads<system-freebsd-x86.ads
++  system.ads<system-freebsd.ads
+ 
+   TOOLS_TARGET_PAIRS =  \
+     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
+@@ -1482,7 +1482,7 @@
+   s-taprop.adb<s-taprop-posix.adb \
+   s-taspri.ads<s-taspri-posix.ads \
+   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
+-  system.ads<system-freebsd-x86.ads
++  system.ads<system-freebsd.ads
+ 
+   TOOLS_TARGET_PAIRS =  \
+     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
+@@ -1734,9 +1734,9 @@
+   s-parame.adb<s-parame-rtems.adb \
+   s-taprop.adb<s-taprop-posix.adb \
+   s-taspri.ads<s-taspri-posix.ads \
+-  s-tpopsp.adb<s-tpopsp-rtems.adb \
++  s-tpopsp.adb<s-tpopsp-tls.adb \
+   s-stchop.adb<s-stchop-rtems.adb \
+-  s-interr.adb<s-interr-vxworks.adb
++  s-interr.adb<s-interr-hwint.adb
+ endif
+ 
+ # PikeOS
 @@ -1973,7 +1973,7 @@
  
  # AArch64 Linux
@@ -2941,6 +9225,73 @@ Index: gcc/ada/exp_ch3.adb
        end if;
  
        if Mode_Set then
+Index: gcc/lra-remat.c
+===================================================================
+--- a/src/gcc/lra-remat.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/lra-remat.c	(.../branches/gcc-7-branch)
+@@ -1122,6 +1122,7 @@
+ 		  break;
+ 	    }
+ 	  int i, hard_regno, nregs;
++	  int dst_hard_regno, dst_nregs;
+ 	  rtx_insn *remat_insn = NULL;
+ 	  HOST_WIDE_INT cand_sp_offset = 0;
+ 	  if (cand != NULL)
+@@ -1136,6 +1137,12 @@
+ 	      gcc_assert (REG_P (saved_op));
+ 	      int ignore_regno = REGNO (saved_op); 
+ 
++	      dst_hard_regno = dst_regno < FIRST_PSEUDO_REGISTER
++		? dst_regno : reg_renumber[dst_regno];
++	      gcc_assert (dst_hard_regno >= 0);
++	      machine_mode mode = GET_MODE (SET_DEST (set));
++	      dst_nregs = hard_regno_nregs[dst_hard_regno][mode];
++
+ 	      for (reg = cand_id->regs; reg != NULL; reg = reg->next)
+ 		if (reg->type != OP_IN && reg->regno != ignore_regno)
+ 		  {
+@@ -1146,6 +1153,10 @@
+ 			break;
+ 		    if (i < nregs)
+ 		      break;
++		    /* Ensure the clobber also doesn't overlap dst_regno.  */
++		    if (hard_regno + nregs > dst_hard_regno
++			&& hard_regno < dst_hard_regno + dst_nregs)
++		      break;
+ 		  }
+ 
+ 	      if (reg == NULL)
+@@ -1153,9 +1164,14 @@
+ 		  for (reg = static_cand_id->hard_regs;
+ 		       reg != NULL;
+ 		       reg = reg->next)
+-		    if (reg->type != OP_IN
+-			&& TEST_HARD_REG_BIT (live_hard_regs, reg->regno))
+-		      break;
++		    if (reg->type != OP_IN)
++		      {
++			if (TEST_HARD_REG_BIT (live_hard_regs, reg->regno))
++			  break;
++			if (reg->regno >= dst_hard_regno
++			    && reg->regno < dst_hard_regno + dst_nregs)
++			  break;
++		      }
+ 		}
+ 
+ 	      if (reg == NULL)
+Index: gcc/fortran/openmp.c
+===================================================================
+--- a/src/gcc/fortran/openmp.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/fortran/openmp.c	(.../branches/gcc-7-branch)
+@@ -4374,7 +4374,7 @@
+ 		    else
+ 		      resolve_oacc_data_clauses (n->sym, n->where, name);
+ 		  }
+-		else if (list != OMP_CLAUSE_DEPEND
++		else if (list != OMP_LIST_DEPEND
+ 			 && n->sym->as
+ 			 && n->sym->as->type == AS_ASSUMED_SIZE)
+ 		  gfc_error ("Assumed size array %qs in %s clause at %L",
 Index: gcc/fortran/trans-expr.c
 ===================================================================
 --- a/src/gcc/fortran/trans-expr.c	(.../tags/gcc_7_1_0_release)
@@ -2962,11 +9313,45 @@ Index: gcc/fortran/trans-expr.c
  		  tmp = build_fold_indirect_ref_loc (input_location,
  						     parmse.expr);
  		  if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (tmp)))
+@@ -6122,7 +6132,7 @@
+      after use. This necessitates the creation of a temporary to
+      hold the result to prevent duplicate calls.  */
+   if (!byref && sym->ts.type != BT_CHARACTER
+-      && sym->attr.allocatable && !sym->attr.dimension)
++      && sym->attr.allocatable && !sym->attr.dimension && !comp)
+     {
+       tmp = gfc_create_var (TREE_TYPE (se->expr), NULL);
+       gfc_add_modify (&se->pre, tmp, se->expr);
 Index: gcc/fortran/ChangeLog
 ===================================================================
 --- a/src/gcc/fortran/ChangeLog	(.../tags/gcc_7_1_0_release)
 +++ b/src/gcc/fortran/ChangeLog	(.../branches/gcc-7-branch)
-@@ -1,3 +1,60 @@
+@@ -1,3 +1,85 @@
++2017-06-09  Janus Weil  <janus at gcc.gnu.org>
++
++	Backport from trunk
++	PR fortran/70601
++	* trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
++	function results.
++
++2017-06-05  Janus Weil  <janus at gcc.gnu.org>
++
++	Backport from trunk
++	PR fortran/80766
++	* resolve.c (resolve_fl_derived): Make sure that vtype symbols are
++	properly resolved.
++
++2017-06-02  Thomas Koenig  <tkoenig at gcc.gnu.org>
++
++	PR fortran/80904
++	* frontend-passes.c (matmul_lhs_realloc):  Correct
++	allocation size for case A1B2.
++
++2017-06-02  Jakub Jelinek  <jakub at redhat.com>
++
++	PR fortran/80918
++	* openmp.c (resolve_omp_clauses): Fix a typo.
++
 +2017-05-23  Jerry DeLisle  <jvdelisle at gcc.gnu.org>
 +
 +	Backport from trunk
@@ -3322,11 +9707,33 @@ Index: gcc/fortran/io.c
  	}
      }
  
+Index: gcc/fortran/frontend-passes.c
+===================================================================
+--- a/src/gcc/fortran/frontend-passes.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/fortran/frontend-passes.c	(.../branches/gcc-7-branch)
+@@ -2362,7 +2362,7 @@
+       break;
+ 
+     case A1B2:
+-      ar->start[0] = get_array_inq_function (GFC_ISYM_SIZE, b, 1);
++      ar->start[0] = get_array_inq_function (GFC_ISYM_SIZE, b, 2);
+       cond = build_logical_expr (INTRINSIC_NE,
+ 				 get_array_inq_function (GFC_ISYM_SIZE, c, 1),
+ 				 get_array_inq_function (GFC_ISYM_SIZE, b, 2));
 Index: gcc/fortran/resolve.c
 ===================================================================
 --- a/src/gcc/fortran/resolve.c	(.../tags/gcc_7_1_0_release)
 +++ b/src/gcc/fortran/resolve.c	(.../branches/gcc-7-branch)
-@@ -13849,31 +13849,11 @@
+@@ -13835,6 +13835,8 @@
+ 	  gfc_symbol *vtab = gfc_find_derived_vtab (data->ts.u.derived);
+ 	  gcc_assert (vtab);
+ 	  vptr->ts.u.derived = vtab->ts.u.derived;
++	  if (!resolve_fl_derived0 (vptr->ts.u.derived))
++	    return false;
+ 	}
+     }
+ 
+@@ -13849,31 +13851,11 @@
  }
  
  
@@ -3358,7 +9765,7 @@ Index: gcc/fortran/resolve.c
  
    for (nl = sym->namelist; nl; nl = nl->next)
      {
-@@ -13907,27 +13887,6 @@
+@@ -13907,27 +13889,6 @@
  			      sym->name, &sym->declared_at))
  	return false;
  
@@ -3386,7 +9793,7 @@ Index: gcc/fortran/resolve.c
      }
  
    /* Reject PRIVATE objects in a PUBLIC namelist.  */
-@@ -13945,10 +13904,17 @@
+@@ -13945,10 +13906,17 @@
  	      return false;
  	    }
  
@@ -3485,6 +9892,236 @@ Index: gcc/alias.c
    /* Declarations of non-automatic variables may have aliases.  All other
       decls are unique.  */
    if (!decl_in_symtab_p (base1)
+Index: gcc/tree-vect-data-refs.c
+===================================================================
+--- a/src/gcc/tree-vect-data-refs.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/tree-vect-data-refs.c	(.../branches/gcc-7-branch)
+@@ -3957,6 +3957,27 @@
+ 	  datarefs[i] = dr;
+ 	}
+ 
++      if (TREE_CODE (DR_BASE_ADDRESS (dr)) == ADDR_EXPR
++	  && VAR_P (TREE_OPERAND (DR_BASE_ADDRESS (dr), 0))
++	  && DECL_NONALIASED (TREE_OPERAND (DR_BASE_ADDRESS (dr), 0)))
++	{
++          if (dump_enabled_p ())
++            {
++              dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
++                               "not vectorized: base object not addressable "
++			       "for stmt: ");
++              dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
++            }
++          if (is_a <bb_vec_info> (vinfo))
++	    {
++	      /* In BB vectorization the ref can still participate
++	         in dependence analysis, we just can't vectorize it.  */
++	      STMT_VINFO_VECTORIZABLE (stmt_info) = false;
++	      continue;
++	    }
++	  return false;
++	}
++
+       /* Set vectype for STMT.  */
+       scalar_type = TREE_TYPE (DR_REF (dr));
+       STMT_VINFO_VECTYPE (stmt_info)
+Index: gcc/gimplify.c
+===================================================================
+--- a/src/gcc/gimplify.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/gimplify.c	(.../branches/gcc-7-branch)
+@@ -6669,7 +6669,7 @@
+ 	 of PRIVATE.  The sharing would take place via the pointer variable
+ 	 which we remapped above.  */
+       if (flags & GOVD_SHARED)
+-	flags = GOVD_PRIVATE | GOVD_DEBUG_PRIVATE
++	flags = GOVD_SHARED | GOVD_DEBUG_PRIVATE
+ 		| (flags & (GOVD_SEEN | GOVD_EXPLICIT));
+ 
+       /* We're going to make use of the TYPE_SIZE_UNIT at least in the
+@@ -8576,7 +8576,7 @@
+     return 0;
+   if (flags & GOVD_DEBUG_PRIVATE)
+     {
+-      gcc_assert ((flags & GOVD_DATA_SHARE_CLASS) == GOVD_PRIVATE);
++      gcc_assert ((flags & GOVD_DATA_SHARE_CLASS) == GOVD_SHARED);
+       private_debug = true;
+     }
+   else if (flags & GOVD_MAP)
+@@ -8819,7 +8819,7 @@
+ 		{
+ 		  gcc_assert ((n->value & GOVD_DEBUG_PRIVATE) == 0
+ 			      || ((n->value & GOVD_DATA_SHARE_CLASS)
+-				  == GOVD_PRIVATE));
++				  == GOVD_SHARED));
+ 		  OMP_CLAUSE_SET_CODE (c, OMP_CLAUSE_PRIVATE);
+ 		  OMP_CLAUSE_PRIVATE_DEBUG (c) = 1;
+ 		}
+Index: gcc/loop-doloop.c
+===================================================================
+--- a/src/gcc/loop-doloop.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/loop-doloop.c	(.../branches/gcc-7-branch)
+@@ -367,6 +367,7 @@
+     }
+ 
+   seq = get_insns ();
++  unshare_all_rtl_in_chain (seq);
+   end_sequence ();
+ 
+   /* There always is at least the jump insn in the sequence.  */
+Index: gcc/tree-cfgcleanup.c
+===================================================================
+--- a/src/gcc/tree-cfgcleanup.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/tree-cfgcleanup.c	(.../branches/gcc-7-branch)
+@@ -739,6 +739,11 @@
+   return retval;
+ }
+ 
++static bool
++mfb_keep_latches (edge e)
++{
++  return ! dominated_by_p (CDI_DOMINATORS, e->src, e->dest);
++}
+ 
+ /* Remove unreachable blocks and other miscellaneous clean up work.
+    Return true if the flowgraph was modified, false otherwise.  */
+@@ -766,6 +771,64 @@
+       changed = false;
+     }
+ 
++  /* Ensure that we have single entries into loop headers.  Otherwise
++     if one of the entries is becoming a latch due to CFG cleanup
++     (from formerly being part of an irreducible region) then we mess
++     up loop fixup and associate the old loop with a different region
++     which makes niter upper bounds invalid.  See for example PR80549.
++     This needs to be done before we remove trivially dead edges as
++     we need to capture the dominance state before the pending transform.  */
++  if (current_loops)
++    {
++      loop_p loop;
++      unsigned i;
++      FOR_EACH_VEC_ELT (*get_loops (cfun), i, loop)
++	if (loop && loop->header)
++	  {
++	    basic_block bb = loop->header;
++	    edge_iterator ei;
++	    edge e;
++	    bool found_latch = false;
++	    bool any_abnormal = false;
++	    unsigned n = 0;
++	    /* We are only interested in preserving existing loops, but
++	       we need to check whether they are still real and of course
++	       if we need to add a preheader at all.  */
++	    FOR_EACH_EDGE (e, ei, bb->preds)
++	      {
++		if (e->flags & EDGE_ABNORMAL)
++		  {
++		    any_abnormal = true;
++		    break;
++		  }
++		if (dominated_by_p (CDI_DOMINATORS, e->src, bb))
++		  {
++		    found_latch = true;
++		    continue;
++		  }
++		n++;
++	      }
++	    /* If we have more than one entry to the loop header
++	       create a forwarder.  */
++	    if (found_latch && ! any_abnormal && n > 1)
++	      {
++		edge fallthru = make_forwarder_block (bb, mfb_keep_latches,
++						      NULL);
++		loop->header = fallthru->dest;
++		if (! loops_state_satisfies_p (LOOPS_NEED_FIXUP))
++		  {
++		    /* The loop updating from the CFG hook is incomplete
++		       when we have multiple latches, fixup manually.  */
++		    remove_bb_from_loops (fallthru->src);
++		    loop_p cloop = loop;
++		    FOR_EACH_EDGE (e, ei, fallthru->src->preds)
++		      cloop = find_common_loop (cloop, e->src->loop_father);
++		    add_bb_to_loop (fallthru->src, cloop);
++		  }
++	      }
++	  }
++    }
++
+   changed |= cleanup_tree_cfg_1 ();
+ 
+   gcc_assert (dom_info_available_p (CDI_DOMINATORS));
+Index: gcc/tree-sra.c
+===================================================================
+--- a/src/gcc/tree-sra.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/tree-sra.c	(.../branches/gcc-7-branch)
+@@ -949,10 +949,12 @@
+ 
+ /* Return true iff TYPE is scalarizable - i.e. a RECORD_TYPE or fixed-length
+    ARRAY_TYPE with fields that are either of gimple register types (excluding
+-   bit-fields) or (recursively) scalarizable types.  */
++   bit-fields) or (recursively) scalarizable types.  CONST_DECL must be true if
++   we are considering a decl from constant pool.  If it is false, char arrays
++   will be refused.  */
+ 
+ static bool
+-scalarizable_type_p (tree type)
++scalarizable_type_p (tree type, bool const_decl)
+ {
+   gcc_assert (!is_gimple_reg_type (type));
+   if (type_contains_placeholder_p (type))
+@@ -970,7 +972,7 @@
+ 	    return false;
+ 
+ 	  if (!is_gimple_reg_type (ft)
+-	      && !scalarizable_type_p (ft))
++	      && !scalarizable_type_p (ft, const_decl))
+ 	    return false;
+ 	}
+ 
+@@ -978,10 +980,16 @@
+ 
+   case ARRAY_TYPE:
+     {
++      HOST_WIDE_INT min_elem_size;
++      if (const_decl)
++	min_elem_size = 0;
++      else
++	min_elem_size = BITS_PER_UNIT;
++
+       if (TYPE_DOMAIN (type) == NULL_TREE
+ 	  || !tree_fits_shwi_p (TYPE_SIZE (type))
+ 	  || !tree_fits_shwi_p (TYPE_SIZE (TREE_TYPE (type)))
+-	  || (tree_to_shwi (TYPE_SIZE (TREE_TYPE (type))) <= 0)
++	  || (tree_to_shwi (TYPE_SIZE (TREE_TYPE (type))) <= min_elem_size)
+ 	  || !tree_fits_shwi_p (TYPE_MIN_VALUE (TYPE_DOMAIN (type))))
+ 	return false;
+       if (tree_to_shwi (TYPE_SIZE (type)) == 0
+@@ -995,7 +1003,7 @@
+ 
+       tree elem = TREE_TYPE (type);
+       if (!is_gimple_reg_type (elem)
+-	 && !scalarizable_type_p (elem))
++	  && !scalarizable_type_p (elem, const_decl))
+ 	return false;
+       return true;
+     }
+@@ -2660,7 +2668,8 @@
+       {
+ 	tree var = candidate (i);
+ 
+-	if (VAR_P (var) && scalarizable_type_p (TREE_TYPE (var)))
++	if (VAR_P (var) && scalarizable_type_p (TREE_TYPE (var),
++						constant_decl_p (var)))
+ 	  {
+ 	    if (tree_to_uhwi (TYPE_SIZE (TREE_TYPE (var)))
+ 		<= max_scalarization_size)
+@@ -2667,6 +2676,8 @@
+ 	      {
+ 		create_total_scalarization_access (var);
+ 		completely_scalarize (var, TREE_TYPE (var), 0, var);
++		statistics_counter_event (cfun,
++					  "Totally-scalarized aggregates", 1);
+ 		if (dump_file && (dump_flags & TDF_DETAILS))
+ 		  {
+ 		    fprintf (dump_file, "Will attempt to totally scalarize ");
 Index: gcc/po/es.po
 ===================================================================
 --- a/src/gcc/po/es.po	(.../tags/gcc_7_1_0_release)
@@ -3507,7 +10144,7 @@ Index: gcc/po/es.po
 -"POT-Creation-Date: 2017-04-24 20:38+0000\n"
 -"PO-Revision-Date: 2017-04-16 10:33+0200\n"
 +"POT-Creation-Date: 2017-05-01 22:24+0000\n"
-+"PO-Revision-Date: 2017-05-20 12:16+0200\n"
++"PO-Revision-Date: 2017-05-29 00:00+0200\n"
  "Last-Translator: Antonio Ceballos <aceballos at gmail.com>\n"
  "Language-Team: Spanish <es at tp.org.es>\n"
  "Language: es\n"
@@ -7601,7 +14238,7 @@ Index: gcc/po/es.po
  
  #: config/i386/i386.c:5938
  #, gcc-internal-format
-@@ -27910,10 +27700,9 @@
+@@ -27910,28 +27700,24 @@
  msgstr "-mincoming-stack-boundary=%d no está entre %d y 12"
  
  #: config/i386/i386.c:5977
@@ -7613,8 +14250,385 @@ Index: gcc/po/es.po
 +msgstr "-mnop-mcount no es compatible con este objetivo"
  
  #: config/i386/i386.c:5980
+-#, fuzzy, gcc-internal-format
+-#| msgid "inter-module optimizations not implemented for C++"
++#, gcc-internal-format
+ msgid "-mnop-mcount is not implemented for -fPIC"
+-msgstr "no se han implementado las optimizaciones intermódulos para C++"
++msgstr "-mnop-mcount no está implementada para -fPIC"
+ 
+ #: config/i386/i386.c:5986
+-#, fuzzy, gcc-internal-format
+-#| msgid "%ssseregparm%s used without SSE enabled"
++#, gcc-internal-format
+ msgid "%<-msseregparm%> used without SSE enabled"
+-msgstr "se usó %ssseregparm%s sin SSE activado"
++msgstr "se usó %<-msseregparm%> sin SSE activado"
+ 
+ #: config/i386/i386.c:5987
+-#, fuzzy, gcc-internal-format
+-#| msgid "%ssseregparm%s used without SSE enabled"
++#, gcc-internal-format
+ msgid "%<target(\"sseregparm\")%> used without SSE enabled"
+-msgstr "se usó %ssseregparm%s sin SSE activado"
++msgstr "se usó %<target(\"ssseregparm\")%> sin SSE activado"
+ 
+ #: config/i386/i386.c:5997
+ #, gcc-internal-format
+@@ -27944,28 +27730,24 @@
+ msgstr "el conjunto de instrucciones 387 está desactivado, usando la aritmética SSE"
+ 
+ #: config/i386/i386.c:6054
+-#, fuzzy, gcc-internal-format
+-#| msgid "stack probing requires %saccumulate-outgoing-args%s for correctness"
++#, gcc-internal-format
+ msgid "stack probing requires %<-maccumulate-outgoing-args%> for correctness"
+-msgstr "actualmente la prueba de pila requiere un puntero de marco o %saccumulate-outgoing-args%s para ser correctas"
++msgstr "la prueba de pila requiere %<-maccumulate-outgoing-args%> para ser correcta"
+ 
+ #: config/i386/i386.c:6056
+-#, fuzzy, gcc-internal-format
+-#| msgid "stack probing requires %saccumulate-outgoing-args%s for correctness"
++#, gcc-internal-format
+ msgid "stack probing requires %<target(\"accumulate-outgoing-args\")%> for correctness"
+-msgstr "actualmente la prueba de pila requiere un puntero de marco o %saccumulate-outgoing-args%s para ser correctas"
++msgstr "la prueba de pila requiere %<target(\"accumulate-outgoing-args\"%> para ser correcta"
+ 
+ #: config/i386/i386.c:6070
+-#, fuzzy, gcc-internal-format
+-#| msgid "stack probing requires %saccumulate-outgoing-args%s for correctness"
++#, gcc-internal-format
+ msgid "fixed ebp register requires %<-maccumulate-outgoing-args%>"
+-msgstr "actualmente la prueba de pila requiere un puntero de marco o %saccumulate-outgoing-args%s para ser correctas"
++msgstr "el registro ebp fijo requiere %<-maccumulate-outgoing-args%>"
+ 
+ #: config/i386/i386.c:6072
+-#, fuzzy, gcc-internal-format
+-#| msgid "stack probing requires %saccumulate-outgoing-args%s for correctness"
++#, gcc-internal-format
+ msgid "fixed ebp register requires %<target(\"accumulate-outgoing-args\")%>"
+-msgstr "actualmente la prueba de pila requiere un puntero de marco o %saccumulate-outgoing-args%s para ser correctas"
++msgstr "el registro ebp fijo requiere %<target(\"accumulate-outgoing-args\")%>"
+ 
+ #: config/i386/i386.c:6178
+ #, gcc-internal-format
+@@ -27990,19 +27772,17 @@
+ #: config/i386/i386.c:7168
+ #, gcc-internal-format
+ msgid "Only DWARF debug format is supported for interrupt service routine."
+-msgstr ""
++msgstr "Solo se admite el formato de depuración DWARF para la rutina de servicio de interrupciones."
+ 
+ #: config/i386/i386.c:7267
+-#, fuzzy, gcc-internal-format, gfc-internal-format
+-#| msgid "2 byte cop instructions are not allowed in 64-bit VLIW mode"
++#, gcc-internal-format, gfc-internal-format
+ msgid "%s instructions aren't allowed in %s service routine"
+-msgstr "las instrucciones cop de 2 bytes no se permiten en modo VLIW de 64-bit"
++msgstr "las instrucciones %s no se permiten en la rutina de servicio %s"
+ 
+ #: config/i386/i386.c:7271
+-#, fuzzy, gcc-internal-format, gfc-internal-format
+-#| msgid "Use a stack protection method for every function"
++#, gcc-internal-format, gfc-internal-format
+ msgid "%s instructions aren't allowed in function with no_caller_saved_registers attribute"
+-msgstr "Usa un método de protección de pila para cada función."
++msgstr "Las instrucciones %s no están permitidas en funciones con el atributo no_caller_saved_registers"
+ 
+ #: config/i386/i386.c:7683 config/i386/i386.c:7734
+ #, gcc-internal-format
+@@ -28060,10 +27840,9 @@
+ msgstr "los atributos cdecl y thiscall no son compatibles"
+ 
+ #: config/i386/i386.c:7779
+-#, fuzzy, gcc-internal-format
+-#| msgid "%qE attribute is used for none class-method"
++#, gcc-internal-format
+ msgid "%qE attribute is used for non-class method"
+-msgstr "se usó el atributo %qE para clases-métodos none"
++msgstr "se usó el atributo %qE para método no de clase"
+ 
+ #: config/i386/i386.c:8023
+ #, gcc-internal-format
+@@ -28076,10 +27855,9 @@
+ msgstr "se llama a %qT con el atributo sseregparm sin activar SSE/SSE2"
+ 
+ #: config/i386/i386.c:8342
+-#, fuzzy, gcc-internal-format
+-#| msgid "does not support multilib"
++#, gcc-internal-format
+ msgid "X32 does not support ms_abi attribute"
+-msgstr "no se admite multilib"
++msgstr "X32 no admite el atributo ms_abi"
+ 
+ #: config/i386/i386.c:8374
+ #, gcc-internal-format
+@@ -28087,16 +27865,14 @@
+ msgstr "ms_hook_prologue no es compatible con la función anidada"
+ 
+ #: config/i386/i386.c:8687
+-#, fuzzy, gcc-internal-format
+-#| msgid "AVX vector argument without AVX enabled changes the ABI"
++#, gcc-internal-format
+ msgid "AVX512F vector argument without AVX512F enabled changes the ABI"
+-msgstr "el argumento de vector AVX sin AVX activado cambia la ABI"
++msgstr "el argumento de vector AVX512F sin AVX512F activado cambia la ABI"
+ 
+ #: config/i386/i386.c:8693
+-#, fuzzy, gcc-internal-format
+-#| msgid "AVX vector argument without AVX enabled changes the ABI"
++#, gcc-internal-format
+ msgid "AVX512F vector return without AVX512F enabled changes the ABI"
+-msgstr "el argumento de vector AVX sin AVX activado cambia la ABI"
++msgstr "el retorno de vector AVX512F sin AVX512F activado cambia la ABI"
+ 
+ #: config/i386/i386.c:8707
+ #, gcc-internal-format
+@@ -28104,10 +27880,9 @@
+ msgstr "el argumento de vector AVX sin AVX activado cambia la ABI"
+ 
+ #: config/i386/i386.c:8713
+-#, fuzzy, gcc-internal-format
+-#| msgid "AVX vector argument without AVX enabled changes the ABI"
++#, gcc-internal-format
+ msgid "AVX vector return without AVX enabled changes the ABI"
+-msgstr "el argumento de vector AVX sin AVX activado cambia la ABI"
++msgstr "el retorno de vector AVX sin AVX activado cambia la ABI"
+ 
+ #: config/i386/i386.c:8729
+ #, gcc-internal-format
+@@ -28160,15 +27935,14 @@
+ msgstr "se devuelve el registro x87 con x87 desactivado"
+ 
+ #: config/i386/i386.c:9655 config/i386/i386.c:9926 config/i386/i386.c:10449
+-#, fuzzy, gcc-internal-format
+-#| msgid "calling %qD with attribute sseregparm without SSE/SSE2 enabled"
++#, gcc-internal-format
+ msgid "calling %qD with SSE calling convention without SSE/SSE2 enabled"
+-msgstr "se llama a %qD con el atributo sseregparm sin activar SSE/SSE2"
++msgstr "se llama a %qD con el convenio de llamadas SSE sin activar SSE/SSE2"
+ 
+ #: config/i386/i386.c:9657 config/i386/i386.c:9928 config/i386/i386.c:10451
+ #, gcc-internal-format
+ msgid "this is a GCC bug that can be worked around by adding attribute used to function called"
+-msgstr ""
++msgstr "esto es un error de GCC que se puede sortear añadiendo el atributo usado a la función llamada"
+ 
+ #: config/i386/i386.c:10351
+ #, gcc-internal-format, gfc-internal-format
+@@ -28183,7 +27957,7 @@
+ #: config/i386/i386.c:13824
+ #, gcc-internal-format
+ msgid "Dynamic Realign Argument Pointer (DRAP) not supported in interrupt service routine.  This may be worked around by avoiding functions with aggregate return."
+-msgstr ""
++msgstr "No se admite Puntero de Argumento de Realineamiento Dinámico (DRAP) en la rutina de servicio de interrupciones.  Esto puede sortearse evitando funciones con retorno agregado."
+ 
+ #: config/i386/i386.c:14836
+ #, gcc-internal-format
+@@ -28191,8 +27965,7 @@
+ msgstr "-fsplit-stack no admite fastcall con funciones anidadas"
+ 
+ #: config/i386/i386.c:14856
+-#, fuzzy, gcc-internal-format
+-#| msgid "-fsplit-stack does not support 2 register  parameters for a nested function"
++#, gcc-internal-format
+ msgid "-fsplit-stack does not support 2 register parameters for a nested function"
+ msgstr "-fsplit-stack no admite 2 parámetros de registro para una función anidada"
+ 
+@@ -28204,10 +27977,9 @@
+ msgstr "-fsplit-stack no admite 3 parámetros de registro"
+ 
+ #: config/i386/i386.c:17672 config/i386/i386.c:17686
+-#, fuzzy, gcc-internal-format
+-#| msgid "unsupported operand size for extended register"
++#, gcc-internal-format
+ msgid "unsupported size for integer register"
+-msgstr "no se admite el tamaño de operando para el registro extendido"
++msgstr "no se admite el tamaño para registro de enteros"
+ 
+ #: config/i386/i386.c:17718
+ #, gcc-internal-format
+@@ -28220,72 +27992,64 @@
+ msgstr "no se admite el tamaño de operando para el registro extendido"
+ 
+ #: config/i386/i386.c:17924
+-#, fuzzy, gcc-internal-format
+-#| msgid "non-integer operand used with operand code '%c'"
++#, gcc-internal-format
+ msgid "non-integer operand used with operand code 'z'"
+-msgstr "se usó un operando que no es entero con el código de operando '%c'"
++msgstr "se usó un operando que no es entero con el código de operando 'z'"
+ 
+ #: config/i386/i386.c:28283
+-#, fuzzy, gcc-internal-format
+-#| msgid "interrupt Service Routines cannot be coded in Thumb mode"
++#, gcc-internal-format
+ msgid "interrupt service routine can't be called directly"
+-msgstr "no se pueden codificar las Rutinas de Servicios de Interrupción en el modo Thumb"
++msgstr "no se puede llamar directamente a la rutina de servicio de interrupciones"
+ 
+ #: config/i386/i386.c:32550
+ #, gcc-internal-format
+ msgid "No dispatcher found for the versioning attributes"
+-msgstr ""
++msgstr "No se ha encontrado despachador para los atributos de versión"
+ 
+ #: config/i386/i386.c:32600
+-#, fuzzy, gcc-internal-format, gfc-internal-format
+-#| msgid "No label definition found for %qs"
++#, gcc-internal-format, gfc-internal-format
+ msgid "No dispatcher found for %s"
+-msgstr "No se encontró una definición de etiqueta para %qs"
++msgstr "No se encontró despachador para %s"
+ 
+ #: config/i386/i386.c:32610
+ #, gcc-internal-format, gfc-internal-format
+ msgid "No dispatcher found for the versioning attributes : %s"
+-msgstr ""
++msgstr "No se encontró despachador para los atributos de versión : %s"
+ 
+ #: config/i386/i386.c:32858
+ #, gcc-internal-format
+ msgid "Function versions cannot be marked as gnu_inline, bodies have to be generated"
+-msgstr ""
++msgstr "Las versiones de funciones no pueden marcarse como gnu_inline; hay que generar cuerpos"
+ 
+ #: config/i386/i386.c:32863 config/i386/i386.c:33291
+-#, fuzzy, gcc-internal-format
+-#| msgid "static linking is not supported"
++#, gcc-internal-format
+ msgid "Virtual function multiversioning not supported"
+-msgstr "no se admite enlace estático"
++msgstr "No se admiten versiones múltiples de funciones virtuales"
+ 
+ #: config/i386/i386.c:32926
+ #, gcc-internal-format
+ msgid "missing %<target%> attribute for multi-versioned %D"
+-msgstr ""
++msgstr "falta el atributo %<target%> para %D multiversionado"
+ 
+ #: config/i386/i386.c:32929
+-#, fuzzy, gcc-internal-format
+-#| msgid "previous declaration of %q+D"
++#, gcc-internal-format
+ msgid "previous declaration of %D"
+-msgstr "declaración previa de %q+D"
++msgstr "declaración previa de %D"
+ 
+ #: config/i386/i386.c:33148
+-#, fuzzy, gcc-internal-format
+-#| msgid "nested functions not supported on this target"
++#, gcc-internal-format
+ msgid "multiversioning needs ifunc which is not supported on this target"
+-msgstr "no se admiten funciones anidadas en este objetivo"
++msgstr "el versionado múltiple necesita ifunc, que no se admite en este objetivo"
+ 
+ #: config/i386/i386.c:33540
+-#, fuzzy, gcc-internal-format
+-#| msgid "argument to %qs must be a 2-bit unsigned literal"
++#, gcc-internal-format
+ msgid "Parameter to builtin must be a string constant or literal"
+-msgstr "el argumento para %qs debe ser una literal sin signo de 2-bit"
++msgstr "El parámetro para la función interna debe ser una cadena constante o literal"
+ 
+ #: config/i386/i386.c:33565 config/i386/i386.c:33615
+-#, fuzzy, gcc-internal-format, gfc-internal-format
+-#| msgid "Argument to -ffpe-trap is not valid: %s"
++#, gcc-internal-format, gfc-internal-format
+ msgid "Parameter to builtin not valid: %s"
+-msgstr "El argumento para -ffpe-trap no es válido: %s"
++msgstr "El parámetro para la función interna no es válido: %s"
+ 
+ #: config/i386/i386.c:34294 config/i386/i386.c:35692
+ #, gcc-internal-format
+@@ -28308,10 +28072,9 @@
+ msgstr "el último argumento debe ser un inmediato de 1-bit"
+ 
+ #: config/i386/i386.c:35638
+-#, fuzzy, gcc-internal-format
+-#| msgid "the last argument must be a 32-bit immediate"
++#, gcc-internal-format
+ msgid "the last argument must be a 3-bit immediate"
+-msgstr "el último argumento debe ser un inmediato de 32-bit"
++msgstr "el último argumento debe ser un inmediato de 3-bit"
+ 
+ #: config/i386/i386.c:35671
+ #, gcc-internal-format
+@@ -28339,40 +28102,34 @@
+ msgstr "el último argumento debe ser un inmediato de 8-bit"
+ 
+ #: config/i386/i386.c:35907
+-#, fuzzy, gcc-internal-format
+-#| msgid "argument must be a constant"
++#, gcc-internal-format
+ msgid "the third argument must be comparison constant"
+-msgstr "el argumento debe ser una constante"
++msgstr "el tercer argumento debe ser una constante de comparación"
+ 
+ #: config/i386/i386.c:35912
+-#, fuzzy, gcc-internal-format
+-#| msgid "incorrect insn:"
++#, gcc-internal-format
+ msgid "incorrect comparison mode"
+-msgstr "insn incorrecta:"
++msgstr "modo de comparación incorrecto"
+ 
+ #: config/i386/i386.c:35918 config/i386/i386.c:36119
+-#, fuzzy, gcc-internal-format
+-#| msgid "incorrect sharing of tree nodes"
++#, gcc-internal-format
+ msgid "incorrect rounding operand"
+-msgstr "compartición incorrecta de nodos de árbol"
++msgstr "operando de redondeo incorrecto"
+ 
+ #: config/i386/i386.c:36101
+-#, fuzzy, gcc-internal-format
+-#| msgid "the last argument must be a 4-bit immediate"
++#, gcc-internal-format
+ msgid "the immediate argument must be a 4-bit immediate"
+-msgstr "el último argumento debe ser un inmediato de 4-bit"
++msgstr "el argumento inmediato debe ser un inmediato de 4-bit"
+ 
+ #: config/i386/i386.c:36107
+-#, fuzzy, gcc-internal-format
+-#| msgid "the last argument must be a 5-bit immediate"
++#, gcc-internal-format
+ msgid "the immediate argument must be a 5-bit immediate"
+-msgstr "el tercer argumento debe ser un inmediato de 5-bit"
++msgstr "el argumento inmediato debe ser un inmediato de 5-bit"
+ 
+ #: config/i386/i386.c:36110
+-#, fuzzy, gcc-internal-format
+-#| msgid "the last argument must be an 8-bit immediate"
++#, gcc-internal-format
+ msgid "the immediate argument must be an 8-bit immediate"
+-msgstr "el último argumento debe ser un inmediato de 8-bit"
++msgstr "el argumento inmediato debe ser un inmediato de 8-bit"
+ 
+ #: config/i386/i386.c:36527
+ #, gcc-internal-format
+@@ -28400,16 +28157,14 @@
+ msgstr "el último argumento debe ser un inmediato"
+ 
+ #: config/i386/i386.c:38270 config/i386/i386.c:38452
+-#, fuzzy, gcc-internal-format
+-#| msgid "last argument must be scale 1, 2, 4, 8"
++#, gcc-internal-format
+ msgid "the last argument must be scale 1, 2, 4, 8"
+-msgstr "el argumento izquierdo debe ser un escalar 1, 2, 4, 8"
++msgstr "el último argumento debe ser un escalar 1, 2, 4, 8"
+ 
+ #: config/i386/i386.c:38505
+-#, fuzzy, gcc-internal-format
+-#| msgid "last argument must be scale 1, 2, 4, 8"
++#, gcc-internal-format
+ msgid "the forth argument must be scale 1, 2, 4, 8"
+-msgstr "el argumento izquierdo debe ser un escalar 1, 2, 4, 8"
++msgstr "el argumento delantero debe ser un escalar 1, 2, 4, 8"
+ 
+ #: config/i386/i386.c:38511
  #, fuzzy, gcc-internal-format
-@@ -29775,7 +29564,7 @@
+@@ -29775,7 +29530,7 @@
  msgid "vec_cmpne only accepts 2 arguments"
  msgstr "vec_insert sólo acepta 3 argumentos"
  
@@ -7623,7 +14637,7 @@ Index: gcc/po/es.po
  #, fuzzy, gcc-internal-format
  #| msgid "vec_insert only accepts 3 arguments"
  msgid "vec_adde only accepts 3 arguments"
-@@ -29787,44 +29576,44 @@
+@@ -29787,44 +29542,44 @@
  msgid "vec_addec only accepts 3 arguments"
  msgstr "vec_insert sólo acepta 3 argumentos"
  
@@ -7676,7 +14690,7 @@ Index: gcc/po/es.po
  #, fuzzy, gcc-internal-format, gfc-internal-format
  #| msgid "invalid parameter combination for AltiVec intrinsic"
  msgid "invalid parameter combination for AltiVec intrinsic %s"
-@@ -30935,112 +30724,112 @@
+@@ -30935,112 +30690,112 @@
  msgid "requested %qE attribute is not a comma separated pair of non-negative integer constants or too large (max. %d)"
  msgstr ""
  
@@ -7810,7 +14824,7 @@ Index: gcc/po/es.po
  #, fuzzy, gcc-internal-format
  #| msgid "argument to %qE attribute larger than %d"
  msgid "argument to %qs is too large (max. %d)"
-@@ -31047,7 +30836,7 @@
+@@ -31047,7 +30802,7 @@
  msgstr "el argumento para el atributo %qE es más grande que %d"
  
  #. Value is not allowed for the target attribute.
@@ -14258,7 +21272,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,36 @@
+@@ -1,3 +1,40 @@
++2017-06-01  Joseph Myers  <joseph at codesourcery.com>
++
++	* es.po: Update.
++
 +2017-05-22  Joseph Myers  <joseph at codesourcery.com>
 +
 +	* da.po, es.po: Update.
@@ -50624,11 +57642,159 @@ Index: gcc/Makefile.in
  	$(AWK) -f $(srcdir)/opt-gather.awk $(ALL_OPT_FILES) > tmp-optionlist
  	$(SHELL) $(srcdir)/../move-if-change tmp-optionlist optionlist
  	$(STAMP) s-options
+Index: gcc/config/s390/s390.md
+===================================================================
+--- a/src/gcc/config/s390/s390.md	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/config/s390/s390.md	(.../branches/gcc-7-branch)
+@@ -9660,14 +9660,16 @@
+     operands[0] = force_reg (Pmode, operands[0]);
+ })
+ 
++; The first constraint must be an "extra address constraint" in order
++; to trigger address reloading in LRA/reload
+ (define_insn "*indirect_jump"
+   [(set (pc)
+-	(match_operand 0 "address_operand" "a,ZR"))]
++	(match_operand 0 "address_operand" "ZR,a"))]
+  ""
+  "@
+-  br\t%0
+-  b\t%a0"
+- [(set_attr "op_type" "RR,RX")
++  b\t%a0
++  br\t%0"
++ [(set_attr "op_type" "RX,RR")
+   (set_attr "type"  "branch")
+   (set_attr "atype" "agen")
+   (set_attr "cpu_facility" "*")])
+Index: gcc/config/s390/s390.c
+===================================================================
+--- a/src/gcc/config/s390/s390.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/config/s390/s390.c	(.../branches/gcc-7-branch)
+@@ -3102,6 +3102,9 @@
+   struct s390_address addr;
+   bool decomposed = false;
+ 
++  if (!address_operand (op, GET_MODE (op)))
++    return 0;
++
+   /* This check makes sure that no symbolic address (except literal
+      pool references) are accepted by the R or T constraints.  */
+   if (s390_loadrelative_operand_p (op, NULL, NULL))
+Index: gcc/config/sparc/driver-sparc.c
+===================================================================
+--- a/src/gcc/config/sparc/driver-sparc.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/config/sparc/driver-sparc.c	(.../branches/gcc-7-branch)
+@@ -57,6 +57,7 @@
+   { "UltraSPARC-T2+",	"niagara2" },
+   { "SPARC-T3",		"niagara3" },
+   { "SPARC-T4",		"niagara4" },
++  { "SPARC-T5",		"niagara4" },
+ #else
+   { "SuperSparc",	"supersparc" },
+   { "HyperSparc",	"hypersparc" },
+@@ -73,6 +74,7 @@
+   { "UltraSparc T2",	"niagara2" },
+   { "UltraSparc T3",	"niagara3" },
+   { "UltraSparc T4",	"niagara4" },
++  { "UltraSparc T5",	"niagara4" },
+   { "LEON",		"leon3" },
+ #endif
+   { "SPARC-M7",		"niagara7" },
+Index: gcc/config/sparc/sparc.md
+===================================================================
+--- a/src/gcc/config/sparc/sparc.md	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/config/sparc/sparc.md	(.../branches/gcc-7-branch)
+@@ -338,7 +338,8 @@
+ 	     (const_int 2)
+ 	     (const_int 1))
+ 	 (eq_attr "type" "sibcall")
+-	   (if_then_else (eq_attr "leaf_function" "true")
++	   (if_then_else (ior (eq_attr "leaf_function" "true")
++	                      (eq_attr "flat" "true"))
+ 	     (if_then_else (eq_attr "empty_delay_slot" "true")
+ 	       (const_int 3)
+ 	       (const_int 2))
+@@ -7097,7 +7098,10 @@
+ (define_expand "return"
+   [(return)]
+   "sparc_can_use_return_insn_p ()"
+-  "")
++{
++  if (cfun->calls_alloca)
++    emit_insn (gen_frame_blockage ());
++})
+ 
+ (define_insn "*return_internal"
+   [(return)]
 Index: gcc/config/sparc/sparc.c
 ===================================================================
 --- a/src/gcc/config/sparc/sparc.c	(.../tags/gcc_7_1_0_release)
 +++ b/src/gcc/config/sparc/sparc.c	(.../branches/gcc-7-branch)
-@@ -1528,15 +1528,18 @@
+@@ -1341,7 +1341,6 @@
+   };
+   const struct cpu_table *cpu;
+   unsigned int i;
+-  int fpu;
+ 
+   if (sparc_debug_string != NULL)
+     {
+@@ -1433,8 +1432,6 @@
+         call_used_regs [i] = 1;
+       }
+ 
+-  fpu = target_flags & MASK_FPU; /* save current -mfpu status */
+-
+   /* Set the default CPU.  */
+   if (!global_options_set.x_sparc_cpu_and_features)
+     {
+@@ -1473,22 +1470,18 @@
+ #ifndef HAVE_AS_LEON
+ 		   & ~(MASK_LEON | MASK_LEON3)
+ #endif
++		   & ~(target_flags_explicit & MASK_FEATURES)
+ 		   );
+ 
+-  /* If -mfpu or -mno-fpu was explicitly used, don't override with
+-     the processor default.  */
+-  if (target_flags_explicit & MASK_FPU)
+-    target_flags = (target_flags & ~MASK_FPU) | fpu;
+-
+-  /* -mvis2 implies -mvis */
++  /* -mvis2 implies -mvis.  */
+   if (TARGET_VIS2)
+     target_flags |= MASK_VIS;
+ 
+-  /* -mvis3 implies -mvis2 and -mvis */
++  /* -mvis3 implies -mvis2 and -mvis.  */
+   if (TARGET_VIS3)
+     target_flags |= MASK_VIS2 | MASK_VIS;
+ 
+-  /* -mvis4 implies -mvis3, -mvis2 and -mvis */
++  /* -mvis4 implies -mvis3, -mvis2 and -mvis.  */
+   if (TARGET_VIS4)
+     target_flags |= MASK_VIS3 | MASK_VIS2 | MASK_VIS;
+ 
+@@ -1499,8 +1492,7 @@
+ 		      | MASK_FMAF);
+ 
+   /* -mvis assumes UltraSPARC+, so we are sure v9 instructions
+-     are available.
+-     -m64 also implies v9.  */
++     are available; -m64 also implies v9.  */
+   if (TARGET_VIS || TARGET_ARCH64)
+     {
+       target_flags |= MASK_V9;
+@@ -1507,7 +1499,7 @@
+       target_flags &= ~(MASK_V8 | MASK_SPARCLET | MASK_SPARCLITE);
+     }
+ 
+-  /* -mvis also implies -mv8plus on 32-bit */
++  /* -mvis also implies -mv8plus on 32-bit.  */
+   if (TARGET_VIS && ! TARGET_ARCH64)
+     target_flags |= MASK_V8PLUS;
+ 
+@@ -1528,15 +1520,18 @@
      target_flags |= MASK_LRA;
  
    /* Supply a default value for align_functions.  */
@@ -50652,11 +57818,39 @@ Index: gcc/config/sparc/sparc.c
  
    /* Validate PCC_STRUCT_RETURN.  */
    if (flag_pcc_struct_return == DEFAULT_PCC_STRUCT_RETURN)
+@@ -5789,6 +5784,9 @@
+ {
+   HOST_WIDE_INT size = sparc_frame_size;
+ 
++  if (cfun->calls_alloca)
++    emit_insn (gen_frame_blockage ());
++
+   if (sparc_n_global_fp_regs > 0)
+     emit_save_or_restore_global_fp_regs (sparc_frame_base_reg,
+ 				         sparc_frame_base_offset
 Index: gcc/config/sparc/sparc.h
 ===================================================================
 --- a/src/gcc/config/sparc/sparc.h	(.../tags/gcc_7_1_0_release)
 +++ b/src/gcc/config/sparc/sparc.h	(.../branches/gcc-7-branch)
-@@ -1566,8 +1566,11 @@
+@@ -423,10 +423,15 @@
+ #define WCHAR_TYPE_SIZE 16
+ 

+ /* Mask of all CPU selection flags.  */
+-#define MASK_ISA					\
+-  (MASK_SPARCLITE + MASK_SPARCLET			\
++#define MASK_ISA						\
++  (MASK_SPARCLITE + MASK_SPARCLET + MASK_LEON + MASK_LEON3	\
+    + MASK_V8 + MASK_V9 + MASK_DEPRECATED_V8_INSNS)
+ 
++/* Mask of all CPU feature flags.  */
++#define MASK_FEATURES						\
++  (MASK_FPU + MASK_HARD_QUAD + MASK_VIS + MASK_VIS2 + MASK_VIS3	\
++   + MASK_VIS4 + MASK_CBCOND + MASK_FMAF + MASK_POPC + MASK_SUBXC)
++ 
+ /* TARGET_HARD_MUL: Use 32-bit hardware multiply instructions but not %y.  */
+ #define TARGET_HARD_MUL				\
+   (TARGET_SPARCLITE || TARGET_SPARCLET		\
+@@ -1566,8 +1571,11 @@
     and annulled branches insert 4 bubbles.
  
     On Niagara-2 and Niagara-3, a not-taken branch costs 1 cycle whereas
@@ -50669,7 +57863,7 @@ Index: gcc/config/sparc/sparc.h
  #define BRANCH_COST(speed_p, predictable_p) \
  	((sparc_cpu == PROCESSOR_V9 \
  	  || sparc_cpu == PROCESSOR_ULTRASPARC) \
-@@ -1579,7 +1582,11 @@
+@@ -1579,7 +1587,11 @@
  	 : ((sparc_cpu == PROCESSOR_NIAGARA2 \
  	     || sparc_cpu == PROCESSOR_NIAGARA3) \
  	    ? 5 \
@@ -50695,6 +57889,317 @@ Index: gcc/config/sparc/sol2.h
  #undef ASM_CPU64_DEFAULT_SPEC
  #define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG AS_NIAGARA7_FLAG
  #endif
+Index: gcc/config/i386/i386.md
+===================================================================
+--- a/src/gcc/config/i386/i386.md	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/config/i386/i386.md	(.../branches/gcc-7-branch)
+@@ -2146,9 +2146,9 @@
+ 
+ (define_insn "*movdi_internal"
+   [(set (match_operand:DI 0 "nonimmediate_operand"
+-    "=r  ,o  ,r,r  ,r,m ,*y,*y,?*y,?m,?r ,?*Ym,*v,*v,*v,m ,m,?r ,?r,?*Yi,?*Ym,?*Yi,*k,*k ,*r,*m")
++    "=r  ,o  ,r,r  ,r,m ,*y,*y,?*y,?m,?r ,?*Ym,*v,*v,*v,m ,m,?r ,?*Yi,?*Ym,?*Yi,*k,*k ,*r,*m")
+ 	(match_operand:DI 1 "general_operand"
+-    "riFo,riF,Z,rem,i,re,C ,*y,m  ,*y,*Yn,r   ,C ,*v,m ,*v,v,*Yj,*v,r   ,*Yj ,*Yn ,*r,*km,*k,*k"))]
++    "riFo,riF,Z,rem,i,re,C ,*y,m  ,*y,*Yn,r   ,C ,*v,m ,*v,v,*Yj,r   ,*Yj ,*Yn ,*r,*km,*k,*k"))]
+   "!(MEM_P (operands[0]) && MEM_P (operands[1]))"
+ {
+   switch (get_attr_type (insn))
+@@ -2170,9 +2170,6 @@
+       return "movq\t{%1, %0|%0, %1}";
+ 
+     case TYPE_SSELOG1:
+-      if (GENERAL_REG_P (operands[0]))
+-	return "%vpextrq\t{$0, %1, %0|%0, %1, 0}";
+-
+       return standard_sse_constant_opcode (insn, operands[1]);
+ 
+     case TYPE_SSEMOV:
+@@ -2226,10 +2223,8 @@
+   [(set (attr "isa")
+      (cond [(eq_attr "alternative" "0,1")
+ 	      (const_string "nox64")
+-	    (eq_attr "alternative" "2,3,4,5,10,11,17,19,22,24")
++	    (eq_attr "alternative" "2,3,4,5,10,11,17,18,21,23")
+ 	      (const_string "x64")
+-	    (eq_attr "alternative" "18")
+-	      (const_string "x64_sse4")
+ 	   ]
+ 	   (const_string "*")))
+    (set (attr "type")
+@@ -2239,13 +2234,13 @@
+ 	      (const_string "mmx")
+ 	    (eq_attr "alternative" "7,8,9,10,11")
+ 	      (const_string "mmxmov")
+-	    (eq_attr "alternative" "12,18")
++	    (eq_attr "alternative" "12")
+ 	      (const_string "sselog1")
+-	    (eq_attr "alternative" "13,14,15,16,17,19")
++	    (eq_attr "alternative" "13,14,15,16,17,18")
+ 	      (const_string "ssemov")
+-	    (eq_attr "alternative" "20,21")
++	    (eq_attr "alternative" "19,20")
+ 	      (const_string "ssecvt")
+-	    (eq_attr "alternative" "22,23,24,25")
++	    (eq_attr "alternative" "21,22,23,24")
+ 	      (const_string "mskmov")
+ 	    (and (match_operand 0 "register_operand")
+ 		 (match_operand 1 "pic_32bit_operand"))
+@@ -2255,23 +2250,18 @@
+    (set (attr "modrm")
+      (if_then_else
+        (and (eq_attr "alternative" "4") (eq_attr "type" "imov"))
+-	 (const_string "0")
+-	 (const_string "*")))
++       (const_string "0")
++       (const_string "*")))
+    (set (attr "length_immediate")
+-     (cond [(and (eq_attr "alternative" "4") (eq_attr "type" "imov"))
+-	      (const_string "8")
+-	    (eq_attr "alternative" "18")
+-	      (const_string "1")
+-	   ]
+-	   (const_string "*")))
++     (if_then_else
++       (and (eq_attr "alternative" "4") (eq_attr "type" "imov"))
++       (const_string "8")
++       (const_string "*")))
+    (set (attr "prefix_rex")
+-     (if_then_else (eq_attr "alternative" "10,11,17,18,19")
++     (if_then_else
++       (eq_attr "alternative" "10,11,17,18")
+        (const_string "1")
+        (const_string "*")))
+-   (set (attr "prefix_extra")
+-     (if_then_else (eq_attr "alternative" "18")
+-       (const_string "1")
+-       (const_string "*")))
+    (set (attr "prefix")
+      (if_then_else (eq_attr "type" "sselog1,ssemov")
+        (const_string "maybe_vex")
+@@ -2300,8 +2290,6 @@
+ 	    (and (eq_attr "alternative" "14,15,16")
+ 		 (not (match_test "TARGET_SSE2")))
+ 	      (const_string "V2SF")
+-	    (eq_attr "alternative" "18")
+-	      (const_string "TI")
+ 	   ]
+ 	   (const_string "DI")))
+    (set (attr "enabled")
+@@ -2327,17 +2315,14 @@
+ 
+ (define_insn "*movsi_internal"
+   [(set (match_operand:SI 0 "nonimmediate_operand"
+-			"=r,m ,*y,*y,?rm,?*y,*v,*v,*v,m ,?r ,?r,?*Yi,*k,*k ,*rm")
++    "=r,m ,*y,*y,?*y,?m,?r ,?*Ym,*v,*v,*v,m ,?r ,?*Yi,*k,*k ,*rm")
+ 	(match_operand:SI 1 "general_operand"
+-			"g ,re,C ,*y,*y ,rm ,C ,*v,m ,*v,*Yj,*v,r   ,*r,*km,*k"))]
++    "g ,re,C ,*y,m  ,*y,*Yn,r   ,C ,*v,m ,*v,*Yj,r   ,*r,*km,*k"))]
+   "!(MEM_P (operands[0]) && MEM_P (operands[1]))"
+ {
+   switch (get_attr_type (insn))
+     {
+     case TYPE_SSELOG1:
+-      if (GENERAL_REG_P (operands[0]))
+-	return "%vpextrd\t{$0, %1, %0|%0, %1, 0}";
+-
+       return standard_sse_constant_opcode (insn, operands[1]);
+ 
+     case TYPE_MSKMOV:
+@@ -2393,20 +2378,16 @@
+       gcc_unreachable ();
+     }
+ }
+-  [(set (attr "isa")
+-     (if_then_else (eq_attr "alternative" "11")
+-       (const_string "sse4")
+-       (const_string "*")))
+-   (set (attr "type")
++  [(set (attr "type")
+      (cond [(eq_attr "alternative" "2")
+ 	      (const_string "mmx")
+-	    (eq_attr "alternative" "3,4,5")
++	    (eq_attr "alternative" "3,4,5,6,7")
+ 	      (const_string "mmxmov")
+-	    (eq_attr "alternative" "6,11")
++	    (eq_attr "alternative" "8")
+ 	      (const_string "sselog1")
+-	    (eq_attr "alternative" "7,8,9,10,12")
++	    (eq_attr "alternative" "9,10,11,12,13")
+ 	      (const_string "ssemov")
+-	    (eq_attr "alternative" "13,14,15")
++	    (eq_attr "alternative" "14,15,16")
+ 	      (const_string "mskmov")
+ 	    (and (match_operand 0 "register_operand")
+ 		 (match_operand 1 "pic_32bit_operand"))
+@@ -2413,14 +2394,6 @@
+ 	      (const_string "lea")
+ 	   ]
+ 	   (const_string "imov")))
+-   (set (attr "length_immediate")
+-     (if_then_else (eq_attr "alternative" "11")
+-       (const_string "1")
+-       (const_string "*")))
+-   (set (attr "prefix_extra")
+-     (if_then_else (eq_attr "alternative" "11")
+-       (const_string "1")
+-       (const_string "*")))
+    (set (attr "prefix")
+      (if_then_else (eq_attr "type" "sselog1,ssemov")
+        (const_string "maybe_vex")
+@@ -2432,7 +2405,7 @@
+    (set (attr "mode")
+      (cond [(eq_attr "alternative" "2,3")
+ 	      (const_string "DI")
+-	    (eq_attr "alternative" "6,7")
++	    (eq_attr "alternative" "8,9")
+ 	      (cond [(ior (match_operand 0 "ext_sse_reg_operand")
+ 			  (match_operand 1 "ext_sse_reg_operand"))
+ 		       (const_string "XI")
+@@ -2446,11 +2419,9 @@
+ 		    ]
+ 		    (const_string "TI"))
+ 
+-	    (and (eq_attr "alternative" "8,9")
++	    (and (eq_attr "alternative" "10,11")
+ 	         (not (match_test "TARGET_SSE2")))
+ 	      (const_string "SF")
+-	    (eq_attr "alternative" "11")
+-	      (const_string "TI")
+ 	   ]
+ 	   (const_string "SI")))])
+ 
+@@ -3767,10 +3738,10 @@
+ 
+ (define_insn "*zero_extendsidi2"
+   [(set (match_operand:DI 0 "nonimmediate_operand"
+-		"=r,?r,?o,r   ,o,?*Ym,?!*y,?r ,?r,?*Yi,?*x,?*x,?*v,*r")
++		"=r,?r,?o,r   ,o,?*Ym,?!*y,?r ,?*Yi,?*x,?*x,?*v,*r")
+ 	(zero_extend:DI
+ 	 (match_operand:SI 1 "x86_64_zext_operand"
+-	        "0 ,rm,r ,rmWz,0,r   ,m   ,*Yj,*x,r   ,m  , *x, *v,*k")))]
++	        "0 ,rm,r ,rmWz,0,r   ,m   ,*Yj,r   ,m  , *x, *v,*k")))]
+   ""
+ {
+   switch (get_attr_type (insn))
+@@ -3787,9 +3758,6 @@
+     case TYPE_MMXMOV:
+       return "movd\t{%1, %0|%0, %1}";
+ 
+-    case TYPE_SSELOG1:
+-      return "%vpextrd\t{$0, %1, %k0|%k0, %1, 0}";
+-
+     case TYPE_SSEMOV:
+       if (SSE_REG_P (operands[0]) && SSE_REG_P (operands[1]))
+ 	{
+@@ -3817,15 +3785,13 @@
+ 	      (const_string "nox64")
+ 	    (eq_attr "alternative" "3,7")
+ 	      (const_string "x64")
+-	    (eq_attr "alternative" "8")
+-	      (const_string "x64_sse4")
++	    (eq_attr "alternative" "9")
++	      (const_string "sse2")
+ 	    (eq_attr "alternative" "10")
+-	      (const_string "sse2")
++	      (const_string "sse4")
+ 	    (eq_attr "alternative" "11")
+-	      (const_string "sse4")
++	      (const_string "avx512f")
+ 	    (eq_attr "alternative" "12")
+-	      (const_string "avx512f")
+-	    (eq_attr "alternative" "13")
+ 	      (const_string "x64_avx512bw")
+ 	   ]
+ 	   (const_string "*")))
+@@ -3834,24 +3800,18 @@
+ 	      (const_string "multi")
+ 	    (eq_attr "alternative" "5,6")
+ 	      (const_string "mmxmov")
+-	    (eq_attr "alternative" "7,9,10,11,12")
++	    (eq_attr "alternative" "7,8,9,10,11")
+ 	      (const_string "ssemov")
+-	    (eq_attr "alternative" "8")
+-	      (const_string "sselog1")
+-	    (eq_attr "alternative" "13")
++	    (eq_attr "alternative" "12")
+ 	      (const_string "mskmov")
+ 	   ]
+ 	   (const_string "imovx")))
+    (set (attr "prefix_extra")
+-     (if_then_else (eq_attr "alternative" "8,11,12")
++     (if_then_else (eq_attr "alternative" "10,11")
+        (const_string "1")
+        (const_string "*")))
+-   (set (attr "length_immediate")
+-     (if_then_else (eq_attr "alternative" "8")
+-       (const_string "1")
+-       (const_string "*")))
+    (set (attr "prefix")
+-     (if_then_else (eq_attr "type" "ssemov,sselog1")
++     (if_then_else (eq_attr "type" "ssemov")
+        (const_string "maybe_vex")
+        (const_string "orig")))
+    (set (attr "prefix_0f")
+@@ -3861,7 +3821,7 @@
+    (set (attr "mode")
+      (cond [(eq_attr "alternative" "5,6")
+ 	      (const_string "DI")
+-	    (eq_attr "alternative" "7,8,9,11,12")
++	    (eq_attr "alternative" "7,8,10,11")
+ 	      (const_string "TI")
+ 	   ]
+ 	   (const_string "SI")))])
+@@ -12730,24 +12690,6 @@
+    (set_attr "znver1_decode" "vector")
+    (set_attr "mode" "<MODE>")])
+ 
+-(define_insn_and_split "*ctzhi2"
+-  [(set (match_operand:SI 0 "register_operand")
+-	(ctz:SI
+-	  (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand"))))
+-   (clobber (reg:CC FLAGS_REG))]
+-  "TARGET_BMI
+-   && can_create_pseudo_p ()"
+-  "#"
+-  "&& 1"
+-  [(const_int 0)]
+-{
+-  rtx tmp = gen_reg_rtx (HImode);
+-
+-  emit_insn (gen_tzcnt_hi (tmp, operands[1]));
+-  emit_insn (gen_zero_extendhisi2 (operands[0], tmp));
+-  DONE;
+-})
+-
+ (define_insn_and_split "ctz<mode>2"
+   [(set (match_operand:SWI48 0 "register_operand" "=r")
+ 	(ctz:SWI48
+@@ -12867,24 +12809,6 @@
+   operands[2] = GEN_INT (GET_MODE_BITSIZE (<MODE>mode)-1);
+ })
+ 
+-(define_insn_and_split "*clzhi2"
+-  [(set (match_operand:SI 0 "register_operand")
+-	(clz:SI
+-	  (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand"))))
+-   (clobber (reg:CC FLAGS_REG))]
+-  "TARGET_LZCNT
+-   && can_create_pseudo_p ()"
+-  "#"
+-  "&& 1"
+-  [(const_int 0)]
+-{
+-  rtx tmp = gen_reg_rtx (HImode);
+-
+-  emit_insn (gen_lzcnt_hi (tmp, operands[1]));
+-  emit_insn (gen_zero_extendhisi2 (operands[0], tmp));
+-  DONE;
+-})
+-
+ (define_insn_and_split "clz<mode>2_lzcnt"
+   [(set (match_operand:SWI48 0 "register_operand" "=r")
+ 	(clz:SWI48
 Index: gcc/config/i386/mmx.md
 ===================================================================
 --- a/src/gcc/config/i386/mmx.md	(.../tags/gcc_7_1_0_release)
@@ -50786,7 +58291,24 @@ Index: gcc/config/i386/sse.md
 ===================================================================
 --- a/src/gcc/config/i386/sse.md	(.../tags/gcc_7_1_0_release)
 +++ b/src/gcc/config/i386/sse.md	(.../branches/gcc-7-branch)
-@@ -13842,10 +13842,10 @@
+@@ -13508,13 +13508,12 @@
+   "#")
+ 
+ (define_insn "*vec_extract<ssevecmodelower>_0"
+-  [(set (match_operand:SWI48 0 "nonimmediate_operand"	       "=r ,r,v ,m")
++  [(set (match_operand:SWI48 0 "nonimmediate_operand"	       "=r ,v ,m")
+ 	(vec_select:SWI48
+-	  (match_operand:<ssevecmode> 1 "nonimmediate_operand" "mYj,v,vm,v")
++	  (match_operand:<ssevecmode> 1 "nonimmediate_operand" "mYj,vm,v")
+ 	  (parallel [(const_int 0)])))]
+   "TARGET_SSE && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
+-  "#"
+-  [(set_attr "isa" "*,sse4,*,*")])
++  "#")
+ 
+ (define_insn "*vec_extractv2di_0_sse"
+   [(set (match_operand:DI 0 "nonimmediate_operand"     "=v,m")
+@@ -13842,10 +13841,10 @@
  ;; movd instead of movq is required to handle broken assemblers.
  (define_insn "vec_concatv2di"
    [(set (match_operand:V2DI 0 "register_operand"
@@ -50799,7 +58321,7 @@ Index: gcc/config/i386/sse.md
  	  (match_operand:DI 2 "vector_move_operand"
  	  "*rm,rm,rm,rm,C ,C ,C ,x,Yv,x,m,m")))]
    "TARGET_SSE"
-@@ -17105,12 +17105,12 @@
+@@ -17105,12 +17104,12 @@
     (set_attr "mode" "TI")])
  
  (define_insn "xop_vpermil2<mode>3"
@@ -50938,6 +58460,191 @@ Index: gcc/config/i386/sync.md
  (define_expand "atomic_compare_and_swap<mode>"
    [(match_operand:QI 0 "register_operand")	;; bool success output
     (match_operand:SWI124 1 "register_operand")	;; oldval output
+Index: gcc/config/i386/i386.c
+===================================================================
+--- a/src/gcc/config/i386/i386.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/config/i386/i386.c	(.../branches/gcc-7-branch)
+@@ -3536,8 +3536,17 @@
+ 	rtx_insn *insn = DF_REF_INSN (ref);
+ 
+ 	start_sequence ();
+-	if (TARGET_SSE4_1)
++	if (!TARGET_INTER_UNIT_MOVES_TO_VEC)
+ 	  {
++	    rtx tmp = assign_386_stack_local (DImode, SLOT_STV_TEMP);
++	    emit_move_insn (adjust_address (tmp, SImode, 0),
++			    gen_rtx_SUBREG (SImode, reg, 0));
++	    emit_move_insn (adjust_address (tmp, SImode, 4),
++			    gen_rtx_SUBREG (SImode, reg, 4));
++	    emit_move_insn (vreg, tmp);
++	  }
++	else if (TARGET_SSE4_1)
++	  {
+ 	    emit_insn (gen_sse2_loadld (gen_rtx_SUBREG (V4SImode, vreg, 0),
+ 					CONST0_RTX (V4SImode),
+ 					gen_rtx_SUBREG (SImode, reg, 0)));
+@@ -3546,7 +3555,7 @@
+ 					  gen_rtx_SUBREG (SImode, reg, 4),
+ 					  GEN_INT (2)));
+ 	  }
+-	else if (TARGET_INTER_UNIT_MOVES_TO_VEC)
++	else
+ 	  {
+ 	    rtx tmp = gen_reg_rtx (DImode);
+ 	    emit_insn (gen_sse2_loadld (gen_rtx_SUBREG (V4SImode, vreg, 0),
+@@ -3560,15 +3569,6 @@
+ 			gen_rtx_SUBREG (V4SImode, vreg, 0),
+ 			gen_rtx_SUBREG (V4SImode, tmp, 0)));
+ 	  }
+-	else
+-	  {
+-	    rtx tmp = assign_386_stack_local (DImode, SLOT_STV_TEMP);
+-	    emit_move_insn (adjust_address (tmp, SImode, 0),
+-			    gen_rtx_SUBREG (SImode, reg, 0));
+-	    emit_move_insn (adjust_address (tmp, SImode, 4),
+-			    gen_rtx_SUBREG (SImode, reg, 4));
+-	    emit_move_insn (vreg, tmp);
+-	  }
+ 	rtx_insn *seq = get_insns ();
+ 	end_sequence ();
+ 	emit_conversion_insns (seq, insn);
+@@ -3625,8 +3625,17 @@
+       if (scalar_copy)
+ 	{
+ 	  start_sequence ();
+-	  if (TARGET_SSE4_1)
++	  if (!TARGET_INTER_UNIT_MOVES_FROM_VEC)
+ 	    {
++	      rtx tmp = assign_386_stack_local (DImode, SLOT_STV_TEMP);
++	      emit_move_insn (tmp, reg);
++	      emit_move_insn (gen_rtx_SUBREG (SImode, scopy, 0),
++			      adjust_address (tmp, SImode, 0));
++	      emit_move_insn (gen_rtx_SUBREG (SImode, scopy, 4),
++			      adjust_address (tmp, SImode, 4));
++	    }
++	  else if (TARGET_SSE4_1)
++	    {
+ 	      rtx tmp = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (1, const0_rtx));
+ 	      emit_insn
+ 		(gen_rtx_SET
+@@ -3641,7 +3650,7 @@
+ 		  gen_rtx_VEC_SELECT (SImode,
+ 				      gen_rtx_SUBREG (V4SImode, reg, 0), tmp)));
+ 	    }
+-	  else if (TARGET_INTER_UNIT_MOVES_FROM_VEC)
++	  else
+ 	    {
+ 	      rtx vcopy = gen_reg_rtx (V2DImode);
+ 	      emit_move_insn (vcopy, gen_rtx_SUBREG (V2DImode, reg, 0));
+@@ -3652,15 +3661,6 @@
+ 	      emit_move_insn (gen_rtx_SUBREG (SImode, scopy, 4),
+ 			      gen_rtx_SUBREG (SImode, vcopy, 0));
+ 	    }
+-	  else
+-	    {
+-	      rtx tmp = assign_386_stack_local (DImode, SLOT_STV_TEMP);
+-	      emit_move_insn (tmp, reg);
+-	      emit_move_insn (gen_rtx_SUBREG (SImode, scopy, 0),
+-			      adjust_address (tmp, SImode, 0));
+-	      emit_move_insn (gen_rtx_SUBREG (SImode, scopy, 4),
+-			      adjust_address (tmp, SImode, 4));
+-	    }
+ 	  rtx_insn *seq = get_insns ();
+ 	  end_sequence ();
+ 	  emit_conversion_insns (seq, insn);
+Index: gcc/config/xtensa/xtensa.c
+===================================================================
+--- a/src/gcc/config/xtensa/xtensa.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/config/xtensa/xtensa.c	(.../branches/gcc-7-branch)
+@@ -1780,7 +1780,8 @@
+   rtx tgt = operands[callop];
+ 
+   if (GET_CODE (tgt) == CONST_INT)
+-    sprintf (result, "call%d\t0x%lx", WINDOW_SIZE, INTVAL (tgt));
++    sprintf (result, "call%d\t" HOST_WIDE_INT_PRINT_HEX,
++	     WINDOW_SIZE, INTVAL (tgt));
+   else if (register_operand (tgt, VOIDmode))
+     sprintf (result, "callx%d\t%%%d", WINDOW_SIZE, callop);
+   else
+@@ -2351,7 +2352,7 @@
+ 
+     case 'L':
+       if (GET_CODE (x) == CONST_INT)
+-	fprintf (file, "%ld", (32 - INTVAL (x)) & 0x1f);
++	fprintf (file, HOST_WIDE_INT_PRINT_DEC, (32 - INTVAL (x)) & 0x1f);
+       else
+ 	output_operand_lossage ("invalid %%L value");
+       break;
+@@ -2358,7 +2359,7 @@
+ 
+     case 'R':
+       if (GET_CODE (x) == CONST_INT)
+-	fprintf (file, "%ld", INTVAL (x) & 0x1f);
++	fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) & 0x1f);
+       else
+ 	output_operand_lossage ("invalid %%R value");
+       break;
+@@ -2372,7 +2373,7 @@
+ 
+     case 'd':
+       if (GET_CODE (x) == CONST_INT)
+-	fprintf (file, "%ld", INTVAL (x));
++	fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
+       else
+ 	output_operand_lossage ("invalid %%d value");
+       break;
+@@ -2437,7 +2438,7 @@
+       else if (GET_CODE (x) == MEM)
+ 	output_address (GET_MODE (x), XEXP (x, 0));
+       else if (GET_CODE (x) == CONST_INT)
+-	fprintf (file, "%ld", INTVAL (x));
++	fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
+       else
+ 	output_addr_const (file, x);
+     }
+Index: gcc/config/aarch64/cortex-a57-fma-steering.c
+===================================================================
+--- a/src/gcc/config/aarch64/cortex-a57-fma-steering.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/config/aarch64/cortex-a57-fma-steering.c	(.../branches/gcc-7-branch)
+@@ -411,9 +411,9 @@
+      the list of tree roots of ref_forest.  */
+   this->m_globals->remove_forest (other_forest);
+   this->m_roots->splice (this->m_roots->begin (), *other_roots);
++  this->m_nb_nodes += other_forest->m_nb_nodes;
++
+   delete other_forest;
+-
+-  this->m_nb_nodes += other_forest->m_nb_nodes;
+ }
+ 
+ /* Dump information about the forest FOREST.  */
+Index: gcc/config/rs6000/predicates.md
+===================================================================
+--- a/src/gcc/config/rs6000/predicates.md	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/config/rs6000/predicates.md	(.../branches/gcc-7-branch)
+@@ -847,6 +847,22 @@
+   (and (match_operand 0 "memory_operand")
+        (match_test "offsettable_nonstrict_memref_p (op)")))
+ 
++;; Return 1 if the operand is a simple offsettable memory operand
++;; that does not include pre-increment, post-increment, etc.
++(define_predicate "simple_offsettable_mem_operand"
++  (match_operand 0 "offsettable_mem_operand")
++{
++  rtx addr = XEXP (op, 0);
++
++  if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
++    return 0;
++
++  if (!CONSTANT_P (XEXP (addr, 1)))
++    return 0;
++
++  return base_reg_operand (XEXP (addr, 0), Pmode);
++})
++
+ ;; Return 1 if the operand is suitable for load/store quad memory.
+ ;; This predicate only checks for non-atomic loads/stores (not lqarx/stqcx).
+ (define_predicate "quad_memory_operand"
 Index: gcc/config/rs6000/rs6000.c
 ===================================================================
 --- a/src/gcc/config/rs6000/rs6000.c	(.../tags/gcc_7_1_0_release)
@@ -51015,11 +58722,80 @@ Index: gcc/config/rs6000/rs6000.c
  
    def_builtin ("__builtin_vec_vsx_ld", opaque_ftype_long_pcvoid,
  	       VSX_BUILTIN_VEC_LD);
+Index: gcc/config/rs6000/vsx.md
+===================================================================
+--- a/src/gcc/config/rs6000/vsx.md	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/config/rs6000/vsx.md	(.../branches/gcc-7-branch)
+@@ -3068,10 +3068,11 @@
+ ;; V2DF/V2DI splat
+ (define_insn_and_split "vsx_splat_<mode>"
+   [(set (match_operand:VSX_D 0 "vsx_register_operand"
+-					"=<VSa>,    <VSa>,we,<VS_64dm>")
++			"=<VSa>,    <VSa>,?we,??<VS_64dm>")
++
+ 	(vec_duplicate:VSX_D
+ 	 (match_operand:<VS_scalar> 1 "splat_input_operand"
+-					"<VS_64reg>,Z,    b, wA")))]
++			"<VS_64reg>,Z,    b,  wA")))]
+   "VECTOR_MEM_VSX_P (<MODE>mode)"
+   "@
+    xxpermdi %x0,%x1,%x1,0
+@@ -3078,8 +3079,12 @@
+    lxvdsx %x0,%y1
+    mtvsrdd %x0,%1,%1
+    #"
+-  "&& reload_completed && TARGET_POWERPC64 && !TARGET_P9_VECTOR
+-   && int_reg_operand (operands[1], <VS_scalar>mode)"
++  "&& reload_completed
++   && !vsx_register_operand (operands[1], <VS_scalar>mode)
++   && !(MEM_P (operands[1])
++        && indexed_or_indirect_address (XEXP (operands[1], 0), Pmode))
++   && !(TARGET_POWERPC64 && TARGET_P9_VECTOR
++	&& base_reg_operand (operands[1], <VS_scalar>mode))"
+   [(set (match_dup 2)
+ 	(match_dup 1))
+    (set (match_dup 0)
 Index: gcc/config/rs6000/rs6000.md
 ===================================================================
 --- a/src/gcc/config/rs6000/rs6000.md	(.../tags/gcc_7_1_0_release)
 +++ b/src/gcc/config/rs6000/rs6000.md	(.../branches/gcc-7-branch)
-@@ -566,7 +566,9 @@
+@@ -445,35 +445,6 @@
+ 			   (DD "wn")
+ 			   (TD "wn")])
+ 
+-; Definitions for load to 32-bit fpr register
+-(define_mode_attr f32_lr  [(SF "f")		  (SD "wz")])
+-(define_mode_attr f32_lr2 [(SF "wb")		  (SD "wn")])
+-(define_mode_attr f32_lm  [(SF "m")		  (SD "Z")])
+-(define_mode_attr f32_lm2 [(SF "wY")		  (SD "wn")])
+-(define_mode_attr f32_li  [(SF "lfs%U1%X1 %0,%1") (SD "lfiwzx %0,%y1")])
+-(define_mode_attr f32_li2 [(SF "lxssp %0,%1")     (SD "lfiwzx %0,%y1")])
+-(define_mode_attr f32_lv  [(SF "lxsspx %x0,%y1")  (SD "lxsiwzx %x0,%y1")])
+-
+-; Definitions for store from 32-bit fpr register
+-(define_mode_attr f32_sr  [(SF "f")		   (SD "wx")])
+-(define_mode_attr f32_sr2 [(SF "wb")		   (SD "wn")])
+-(define_mode_attr f32_sm  [(SF "m")		   (SD "Z")])
+-(define_mode_attr f32_sm2 [(SF "wY")		   (SD "wn")])
+-(define_mode_attr f32_si  [(SF "stfs%U0%X0 %1,%0") (SD "stfiwx %1,%y0")])
+-(define_mode_attr f32_si2 [(SF "stxssp %1,%0")     (SD "stfiwx %1,%y0")])
+-(define_mode_attr f32_sv  [(SF "stxsspx %x1,%y0")  (SD "stxsiwx %x1,%y0")])
+-
+-; Definitions for 32-bit fpr direct move
+-; At present, the decimal modes are not allowed in the traditional altivec
+-; registers, so restrict the constraints to just the traditional FPRs.
+-(define_mode_attr f32_dm [(SF "wn") (SD "wh")])
+-
+-; Definitions for 32-bit VSX
+-(define_mode_attr f32_vsx [(SF "ww") (SD "wn")])
+-
+-; Definitions for 32-bit use of altivec registers
+-(define_mode_attr f32_av  [(SF "wu") (SD "wn")])
+-
+ ; Definitions for 64-bit VSX
+ (define_mode_attr f64_vsx [(DF "ws") (DD "wn")])
+ 
+@@ -566,7 +537,9 @@
  (define_code_iterator any_float		[float unsigned_float])
  
  (define_code_attr u  [(sign_extend	"")
@@ -51030,7 +58806,19 @@ Index: gcc/config/rs6000/rs6000.md
  
  (define_code_attr su [(sign_extend	"s")
  		      (zero_extend	"u")
-@@ -1027,8 +1029,8 @@
+@@ -728,6 +701,11 @@
+ (define_code_attr     SMINMAX	[(smin "SMIN")
+ 				 (smax "SMAX")])
+ 
++;; Iterator to optimize the following cases:
++;;	D-form load to FPR register & move to Altivec register
++;;	Move Altivec register to FPR register and store
++(define_mode_iterator ALTIVEC_DFORM [DI DF SF])
++
+ 

+ ;; Start with fixed-point load and store insns.  Here we put only the more
+ ;; complex forms.  Basic data transfer is done later.
+@@ -1027,8 +1005,8 @@
  
  
  (define_insn "extendsi<mode>2"
@@ -51041,7 +58829,7 @@ Index: gcc/config/rs6000/rs6000.md
    ""
    "@
     lwa%U1%X1 %0,%1
-@@ -1036,10 +1038,39 @@
+@@ -1036,10 +1014,39 @@
     lfiwax %0,%y1
     lxsiwax %x0,%y1
     mtvsrwa %x0,%1
@@ -51084,7 +58872,7 @@ Index: gcc/config/rs6000/rs6000.md
  (define_insn_and_split "*extendsi<mode>2_dot"
    [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y")
  	(compare:CC (sign_extend:EXTSI (match_operand:SI 1 "gpc_reg_operand" "r,r"))
-@@ -5570,7 +5601,7 @@
+@@ -5570,7 +5577,7 @@
    "TARGET_HARD_FLOAT && ((TARGET_FPRS && <TARGET_FLOAT>) || <E500_CONVERT>)"
    "
  {
@@ -51093,7 +58881,7 @@ Index: gcc/config/rs6000/rs6000.md
      {
        rtx src = force_reg (<MODE>mode, operands[1]);
  
-@@ -5596,7 +5627,8 @@
+@@ -5596,7 +5603,8 @@
     (clobber (match_scratch:DI 2 "=d"))]
    "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
     && (<MODE>mode != SFmode || TARGET_SINGLE_FLOAT)
@@ -51103,7 +58891,7 @@ Index: gcc/config/rs6000/rs6000.md
    "#"
    ""
    [(pc)]
-@@ -5637,7 +5669,8 @@
+@@ -5637,7 +5645,8 @@
  	(fix:SI (match_operand:SFDF 1 "gpc_reg_operand" "d,<rreg>")))
     (clobber (match_operand:DI 2 "gpc_reg_operand" "=1,d"))
     (clobber (match_operand:DI 3 "offsettable_mem_operand" "=o,o"))]
@@ -51113,7 +58901,7 @@ Index: gcc/config/rs6000/rs6000.md
    "#"
    ""
    [(pc)]
-@@ -5721,7 +5754,7 @@
+@@ -5721,7 +5730,7 @@
         || <E500_CONVERT>)"
    "
  {
@@ -51122,7 +58910,7 @@ Index: gcc/config/rs6000/rs6000.md
      {
        emit_insn (gen_fixuns_trunc<mode>si2_stfiwx (operands[0], operands[1]));
        DONE;
-@@ -5733,7 +5766,8 @@
+@@ -5733,7 +5742,8 @@
  	(unsigned_fix:SI (match_operand:SFDF 1 "gpc_reg_operand" "d")))
     (clobber (match_scratch:DI 2 "=d"))]
    "TARGET_HARD_FLOAT && TARGET_FPRS && <TARGET_FLOAT> && TARGET_FCTIWUZ
@@ -51132,7 +58920,7 @@ Index: gcc/config/rs6000/rs6000.md
    "#"
    ""
    [(pc)]
-@@ -5818,13 +5852,43 @@
+@@ -5818,13 +5828,43 @@
      }
    DONE;
  })
@@ -51181,6 +58969,310 @@ Index: gcc/config/rs6000/rs6000.md
  		   UNSPEC_FCTIWZ))]
    "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT"
    "@
+@@ -7168,40 +7208,82 @@
+   operands[3] = gen_int_mode (l, SImode);
+ }")
+ 
+-(define_insn "mov<mode>_hardfloat"
+-  [(set (match_operand:FMOVE32 0 "nonimmediate_operand"
+-	 "=!r,       <f32_lr>,  <f32_lr2>, <f32_av>,  m,         <f32_sm>,
+-	  <f32_sm2>, Z,         <f32_vsx>, !r,        ?<f32_dm>, ?r,
+-	  f,         <f32_vsx>, !r,        *c*l,      !r,        *h")
+-	(match_operand:FMOVE32 1 "input_operand"
+-	 "m,         <f32_lm>,  <f32_lm2>, Z,         r,         <f32_sr>,
+-	  <f32_sr2>, <f32_av>,  <zero_fp>, <zero_fp>, r,         <f32_dm>,
+-	  f,         <f32_vsx>, r,         r,         *h,        0"))]
+-  "(register_operand (operands[0], <MODE>mode)
+-   || register_operand (operands[1], <MODE>mode))
++;; Originally, we tried to keep movsf and movsd common, but the differences
++;; addressing was making it rather difficult to hide with mode attributes.  In
++;; particular for SFmode, on ISA 2.07 (power8) systems, having the GPR store
++;; before the VSX stores meant that the register allocator would tend to do a
++;; direct move to the GPR (which involves conversion from scalar to
++;; vector/memory formats) to save values in the traditional Altivec registers,
++;; while SDmode had problems on power6 if the GPR store was not first due to
++;; the power6 not having an integer store operation.
++;;
++;;	LWZ          LFS        LXSSP       LXSSPX     STFS       STXSSP
++;;	STXSSPX      STW        XXLXOR      LI         FMR        XSCPSGNDP
++;;	MR           MT<x>      MF<x>       NOP
++
++(define_insn "movsf_hardfloat"
++  [(set (match_operand:SF 0 "nonimmediate_operand"
++	 "=!r,       f,         wb,         wu,        m,         wY,
++	  Z,         m,         ww,         !r,        f,         ww,
++	  !r,        *c*l,      !r,         *h")
++	(match_operand:SF 1 "input_operand"
++	 "m,         m,         wY,         Z,         f,         wb,
++	  wu,        r,         j,          j,         f,         ww,
++	  r,         r,         *h,         0"))]
++  "(register_operand (operands[0], SFmode)
++   || register_operand (operands[1], SFmode))
+    && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT
+    && (TARGET_ALLOW_SF_SUBREG
+-       || valid_sf_si_move (operands[0], operands[1], <MODE>mode))"
++       || valid_sf_si_move (operands[0], operands[1], SFmode))"
+   "@
+    lwz%U1%X1 %0,%1
+-   <f32_li>
+-   <f32_li2>
+-   <f32_lv>
++   lfs%U1%X1 %0,%1
++   lxssp %0,%1
++   lxsspx %x0,%y1
++   stfs%U0%X0 %1,%0
++   stxssp %1,%0
++   stxsspx %x1,%y0
+    stw%U0%X0 %1,%0
+-   <f32_si>
+-   <f32_si2>
+-   <f32_sv>
+    xxlxor %x0,%x0,%x0
+    li %0,0
++   fmr %0,%1
++   xscpsgndp %x0,%x1,%x1
++   mr %0,%1
++   mt%0 %1
++   mf%1 %0
++   nop"
++  [(set_attr "type"
++	"load,       fpload,    fpload,     fpload,    fpstore,   fpstore,
++	 fpstore,    store,     veclogical, integer,   fpsimple,  fpsimple,
++	 *,          mtjmpr,    mfjmpr,     *")])
++
++;;	LWZ          LFIWZX     STW        STFIWX     MTVSRWZ    MFVSRWZ
++;;	FMR          MR         MT%0       MF%1       NOP
++(define_insn "movsd_hardfloat"
++  [(set (match_operand:SD 0 "nonimmediate_operand"
++	 "=!r,       wz,        m,         Z,         ?wh,       ?r,
++	  f,         !r,        *c*l,      !r,        *h")
++	(match_operand:SD 1 "input_operand"
++	 "m,         Z,         r,         wx,        r,         wh,
++	  f,         r,         r,         *h,        0"))]
++  "(register_operand (operands[0], SDmode)
++   || register_operand (operands[1], SDmode))
++   && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT"
++  "@
++   lwz%U1%X1 %0,%1
++   lfiwzx %0,%y1
++   stw%U0%X0 %1,%0
++   stfiwx %1,%y0
+    mtvsrwz %x0,%1
+    mfvsrwz %0,%x1
+    fmr %0,%1
+-   xscpsgndp %x0,%x1,%x1
+    mr %0,%1
+    mt%0 %1
+    mf%1 %0
+    nop"
+-  [(set_attr "type" "load,fpload,fpload,fpload,store,fpstore,fpstore,fpstore,veclogical,integer,mffgpr,mftgpr,fpsimple,fpsimple,*,mtjmpr,mfjmpr,*")])
++  [(set_attr "type"
++	"load,       fpload,    store,     fpstore,   mffgpr,    mftgpr,
++	 fpsimple,   *,         mtjmpr,    mfjmpr,    *")])
+ 
+ (define_insn "*mov<mode>_softfloat"
+   [(set (match_operand:FMOVE32 0 "nonimmediate_operand" "=r,cl,r,r,m,r,r,r,r,*h")
+@@ -13999,6 +14081,74 @@
+    (set_attr "length" "8")])
+ 
+ 

++;; Optimize cases where we want to do a D-form load (register+offset) on
++;; ISA 2.06/2.07 to an Altivec register, and the register allocator
++;; has generated:
++;;	load fpr
++;;	move fpr->altivec
++
++(define_peephole2
++  [(match_scratch:DI 0 "b")
++   (set (match_operand:ALTIVEC_DFORM 1 "fpr_reg_operand")
++	(match_operand:ALTIVEC_DFORM 2 "simple_offsettable_mem_operand"))
++   (set (match_operand:ALTIVEC_DFORM 3 "altivec_register_operand")
++	(match_dup 1))]
++  "TARGET_VSX && TARGET_POWERPC64 && TARGET_UPPER_REGS_<MODE>
++   && !TARGET_P9_DFORM_SCALAR && peep2_reg_dead_p (2, operands[1])"
++  [(set (match_dup 0)
++	(match_dup 4))
++   (set (match_dup 3)
++	(match_dup 5))]
++{
++  rtx tmp_reg = operands[0];
++  rtx mem = operands[2];
++  rtx addr = XEXP (mem, 0);
++  rtx add_op0, add_op1, new_addr;
++
++  gcc_assert (GET_CODE (addr) == PLUS || GET_CODE (addr) == LO_SUM);
++  add_op0 = XEXP (addr, 0);
++  add_op1 = XEXP (addr, 1);
++  gcc_assert (REG_P (add_op0));
++  new_addr = gen_rtx_PLUS (DImode, add_op0, tmp_reg);
++
++  operands[4] = add_op1;
++  operands[5] = change_address (mem, <MODE>mode, new_addr);
++})
++
++;; Optimize cases were want to do a D-form store on ISA 2.06/2.07 from an
++;; Altivec register, and the register allocator has generated:
++;;	move altivec->fpr
++;;	store fpr
++
++(define_peephole2
++  [(match_scratch:DI 0 "b")
++   (set (match_operand:ALTIVEC_DFORM 1 "fpr_reg_operand")
++	(match_operand:ALTIVEC_DFORM 2 "altivec_register_operand"))
++   (set (match_operand:ALTIVEC_DFORM 3 "simple_offsettable_mem_operand")
++	(match_dup 1))]
++  "TARGET_VSX && TARGET_POWERPC64 && TARGET_UPPER_REGS_<MODE>
++   && !TARGET_P9_DFORM_SCALAR && peep2_reg_dead_p (2, operands[1])"
++  [(set (match_dup 0)
++	(match_dup 4))
++   (set (match_dup 5)
++	(match_dup 2))]
++{
++  rtx tmp_reg = operands[0];
++  rtx mem = operands[3];
++  rtx addr = XEXP (mem, 0);
++  rtx add_op0, add_op1, new_addr;
++
++  gcc_assert (GET_CODE (addr) == PLUS || GET_CODE (addr) == LO_SUM);
++  add_op0 = XEXP (addr, 0);
++  add_op1 = XEXP (addr, 1);
++  gcc_assert (REG_P (add_op0));
++  new_addr = gen_rtx_PLUS (DImode, add_op0, tmp_reg);
++
++  operands[4] = add_op1;
++  operands[5] = change_address (mem, <MODE>mode, new_addr);
++})
++   
++

+ ;; Miscellaneous ISA 2.06 (power7) instructions
+ (define_insn "addg6s"
+   [(set (match_operand:SI 0 "register_operand" "=r")
+Index: gcc/config/arm/arm.c
+===================================================================
+--- a/src/gcc/config/arm/arm.c	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/config/arm/arm.c	(.../branches/gcc-7-branch)
+@@ -8670,8 +8670,17 @@
+     {
+       const_rtx x = *iter;
+       if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_TLS_MODEL (x) != 0)
+-	return true;
++	{
++	  /* ARM currently does not provide relocations to encode TLS variables
++	     into AArch32 instructions, only data, so there is no way to
++	     currently implement these if a literal pool is disabled.  */
++	  if (arm_disable_literal_pool)
++	    sorry ("accessing thread-local storage is not currently supported "
++		   "with -mpure-code or -mslow-flash-data");
+ 
++	  return true;
++	}
++
+       /* Don't recurse into UNSPEC_TLS looking for TLS symbols; these are
+ 	 TLS offsets, not real symbol references.  */
+       if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_TLS)
+@@ -16377,6 +16386,7 @@
+ push_minipool_fix (rtx_insn *insn, HOST_WIDE_INT address, rtx *loc,
+ 		   machine_mode mode, rtx value)
+ {
++  gcc_assert (!arm_disable_literal_pool);
+   Mfix * fix = (Mfix *) obstack_alloc (&minipool_obstack, sizeof (* fix));
+ 
+   fix->insn = insn;
+@@ -16428,10 +16438,6 @@
+ int
+ arm_max_const_double_inline_cost ()
+ {
+-  /* Let the value get synthesized to avoid the use of literal pools.  */
+-  if (arm_disable_literal_pool)
+-    return 99;
+-
+   return ((optimize_size || arm_ld_sched) ? 3 : 4);
+ }
+ 
+@@ -17378,6 +17384,11 @@
+   if (!optimize)
+     split_all_insns_noflow ();
+ 
++  /* Make sure we do not attempt to create a literal pool even though it should
++     no longer be necessary to create any.  */
++  if (arm_disable_literal_pool)
++    return ;
++
+   minipool_fix_head = minipool_fix_tail = NULL;
+ 
+   /* The first insn must always be a note, or the code below won't
+Index: gcc/config/arm/vfp.md
+===================================================================
+--- a/src/gcc/config/arm/vfp.md	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/config/arm/vfp.md	(.../branches/gcc-7-branch)
+@@ -2079,3 +2079,40 @@
+ ;; fmdhr et al (VFPv1)
+ ;; Support for xD (single precision only) variants.
+ ;; fmrrs, fmsrr
++
++;; Split an immediate DF move to two immediate SI moves.
++(define_insn_and_split "no_literal_pool_df_immediate"
++  [(set (match_operand:DF 0 "s_register_operand" "")
++	(match_operand:DF 1 "const_double_operand" ""))]
++  "TARGET_THUMB2 && arm_disable_literal_pool
++  && !(TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE
++       && vfp3_const_double_rtx (operands[1]))"
++  "#"
++  "&& !reload_completed"
++  [(set (subreg:SI (match_dup 1) 0) (match_dup 2))
++   (set (subreg:SI (match_dup 1) 4) (match_dup 3))
++   (set (match_dup 0) (match_dup 1))]
++  "
++  long buf[2];
++  real_to_target (buf, CONST_DOUBLE_REAL_VALUE (operands[1]), DFmode);
++  operands[2] = GEN_INT ((int) buf[0]);
++  operands[3] = GEN_INT ((int) buf[1]);
++  operands[1] = gen_reg_rtx (DFmode);
++  ")
++
++;; Split an immediate SF move to one immediate SI move.
++(define_insn_and_split "no_literal_pool_sf_immediate"
++  [(set (match_operand:SF 0 "s_register_operand" "")
++	(match_operand:SF 1 "const_double_operand" ""))]
++  "TARGET_THUMB2 && arm_disable_literal_pool
++  && !(TARGET_HARD_FLOAT && vfp3_const_double_rtx (operands[1]))"
++  "#"
++  "&& !reload_completed"
++  [(set (subreg:SI (match_dup 1) 0) (match_dup 2))
++   (set (match_dup 0) (match_dup 1))]
++  "
++  long buf;
++  real_to_target (&buf, CONST_DOUBLE_REAL_VALUE (operands[1]), SFmode);
++  operands[2] = GEN_INT ((int) buf);
++  operands[1] = gen_reg_rtx (SFmode);
++  ")
+Index: gcc/config/arm/arm.md
+===================================================================
+--- a/src/gcc/config/arm/arm.md	(.../tags/gcc_7_1_0_release)
++++ b/src/gcc/config/arm/arm.md	(.../branches/gcc-7-branch)
+@@ -233,10 +233,6 @@
+ 	       (match_test "arm_restrict_it"))
+ 	  (const_string "no")
+ 
+-	  (and (eq_attr "use_literal_pool" "yes")
+-	       (match_test "arm_disable_literal_pool"))
+-	  (const_string "no")
+-
+ 	  (eq_attr "arch_enabled" "no")
+ 	  (const_string "no")]
+ 	 (const_string "yes")))
+@@ -5878,8 +5874,9 @@
+ 	(match_operand:ANY64 1 "immediate_operand" ""))]
+   "TARGET_32BIT
+    && reload_completed
+-   && (arm_const_double_inline_cost (operands[1])
+-       <= arm_max_const_double_inline_cost ())"
++   && (arm_disable_literal_pool
++       || (arm_const_double_inline_cost (operands[1])
++	   <= arm_max_const_double_inline_cost ()))"
+   [(const_int 0)]
+   "
+   arm_split_constant (SET, SImode, curr_insn,
 Index: gcc/config/pa/pa.c
 ===================================================================
 --- a/src/gcc/config/pa/pa.c	(.../tags/gcc_7_1_0_release)
@@ -51286,6 +59378,46 @@ Index: libgo/Makefile.am
  
  # How to build a .gox file from a .lo file.
  BUILDGOX = \
+Index: libgfortran/m4/matmul_internal.m4
+===================================================================
+--- a/src/libgfortran/m4/matmul_internal.m4	(.../tags/gcc_7_1_0_release)
++++ b/src/libgfortran/m4/matmul_internal.m4	(.../branches/gcc-7-branch)
+@@ -223,15 +223,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = ('rtype_name`)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+Index: libgfortran/Makefile.in
+===================================================================
+--- a/src/libgfortran/Makefile.in	(.../tags/gcc_7_1_0_release)
++++ b/src/libgfortran/Makefile.in	(.../branches/gcc-7-branch)
+@@ -137,8 +137,9 @@
+ 	$(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
+ 	$(top_srcdir)/acinclude.m4 $(top_srcdir)/../config/acx.m4 \
+ 	$(top_srcdir)/../config/no-executables.m4 \
+-	$(top_srcdir)/../config/math.m4 $(top_srcdir)/../libtool.m4 \
+-	$(top_srcdir)/configure.ac
++	$(top_srcdir)/../config/math.m4 \
++	$(top_srcdir)/../config/ax_check_define.m4 \
++	$(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ 	$(ACLOCAL_M4)
+ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
 Index: libgfortran/runtime/environ.c
 ===================================================================
 --- a/src/libgfortran/runtime/environ.c	(.../tags/gcc_7_1_0_release)
@@ -51315,7 +59447,26 @@ Index: libgfortran/ChangeLog
 ===================================================================
 --- a/src/libgfortran/ChangeLog	(.../tags/gcc_7_1_0_release)
 +++ b/src/libgfortran/ChangeLog	(.../branches/gcc-7-branch)
-@@ -1,3 +1,38 @@
+@@ -1,3 +1,57 @@
++2017-06-06  Thomas Koenig  <tkoenig at gcc.gnu.org>
++
++	Backport from trunk
++	PR fortran/80975
++	* m4/matmul_internal.m4:  Move zeroing before early return.
++	* generated/matmul_c10.c: Regenerated.
++	* generated/matmul_c16.c: Regenerated.
++	* generated/matmul_c4.c: Regenerated.
++	* generated/matmul_c8.c: Regenerated.
++	* generated/matmul_i1.c: Regenerated.
++	* generated/matmul_i16.c: Regenerated.
++	* generated/matmul_i2.c: Regenerated.
++	* generated/matmul_i4.c: Regenerated.
++	* generated/matmul_i8.c: Regenerated.
++	* generated/matmul_r10.c: Regenerated.
++	* generated/matmul_r16.c: Regenerated.
++	* generated/matmul_r4.c: Regenerated.
++	* generated/matmul_r8.c: Regenerated.
++
 +2017-05-23  Jerry DeLisle  <jvdelisle at gcc.gnu.org>
 +
 +	Backport from trunk
@@ -51354,6 +59505,1358 @@ Index: libgfortran/ChangeLog
  2017-05-02  Release Manager
  
  	* GCC 7.1.0 released.
+Index: libgfortran/generated/matmul_r8.c
+===================================================================
+--- a/src/libgfortran/generated/matmul_r8.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgfortran/generated/matmul_r8.c	(.../branches/gcc-7-branch)
+@@ -307,15 +307,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_8)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -850,15 +850,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_8)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1393,15 +1393,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_8)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1932,15 +1932,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_8)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -2529,15 +2529,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_8)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+Index: libgfortran/generated/matmul_r16.c
+===================================================================
+--- a/src/libgfortran/generated/matmul_r16.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgfortran/generated/matmul_r16.c	(.../branches/gcc-7-branch)
+@@ -307,15 +307,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_16)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -850,15 +850,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_16)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1393,15 +1393,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_16)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1932,15 +1932,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_16)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -2529,15 +2529,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_16)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+Index: libgfortran/generated/matmul_c8.c
+===================================================================
+--- a/src/libgfortran/generated/matmul_c8.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgfortran/generated/matmul_c8.c	(.../branches/gcc-7-branch)
+@@ -307,15 +307,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_8)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -850,15 +850,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_8)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1393,15 +1393,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_8)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1932,15 +1932,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_8)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -2529,15 +2529,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_8)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+Index: libgfortran/generated/matmul_i8.c
+===================================================================
+--- a/src/libgfortran/generated/matmul_i8.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgfortran/generated/matmul_i8.c	(.../branches/gcc-7-branch)
+@@ -307,15 +307,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_8)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -850,15 +850,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_8)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1393,15 +1393,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_8)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1932,15 +1932,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_8)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -2529,15 +2529,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_8)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+Index: libgfortran/generated/matmul_c16.c
+===================================================================
+--- a/src/libgfortran/generated/matmul_c16.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgfortran/generated/matmul_c16.c	(.../branches/gcc-7-branch)
+@@ -307,15 +307,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_16)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -850,15 +850,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_16)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1393,15 +1393,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_16)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1932,15 +1932,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_16)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -2529,15 +2529,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_16)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+Index: libgfortran/generated/matmul_r10.c
+===================================================================
+--- a/src/libgfortran/generated/matmul_r10.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgfortran/generated/matmul_r10.c	(.../branches/gcc-7-branch)
+@@ -307,15 +307,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_10)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -850,15 +850,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_10)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1393,15 +1393,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_10)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1932,15 +1932,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_10)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -2529,15 +2529,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_10)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+Index: libgfortran/generated/matmul_i1.c
+===================================================================
+--- a/src/libgfortran/generated/matmul_i1.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgfortran/generated/matmul_i1.c	(.../branches/gcc-7-branch)
+@@ -307,15 +307,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_1)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -850,15 +850,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_1)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1393,15 +1393,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_1)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1932,15 +1932,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_1)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -2529,15 +2529,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_1)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+Index: libgfortran/generated/matmul_r4.c
+===================================================================
+--- a/src/libgfortran/generated/matmul_r4.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgfortran/generated/matmul_r4.c	(.../branches/gcc-7-branch)
+@@ -307,15 +307,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_4)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -850,15 +850,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_4)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1393,15 +1393,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_4)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1932,15 +1932,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_4)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -2529,15 +2529,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_REAL_4)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+Index: libgfortran/generated/matmul_i2.c
+===================================================================
+--- a/src/libgfortran/generated/matmul_i2.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgfortran/generated/matmul_i2.c	(.../branches/gcc-7-branch)
+@@ -307,15 +307,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_2)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -850,15 +850,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_2)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1393,15 +1393,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_2)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1932,15 +1932,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_2)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -2529,15 +2529,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_2)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+Index: libgfortran/generated/matmul_c10.c
+===================================================================
+--- a/src/libgfortran/generated/matmul_c10.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgfortran/generated/matmul_c10.c	(.../branches/gcc-7-branch)
+@@ -307,15 +307,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_10)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -850,15 +850,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_10)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1393,15 +1393,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_10)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1932,15 +1932,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_10)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -2529,15 +2529,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_10)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+Index: libgfortran/generated/matmul_c4.c
+===================================================================
+--- a/src/libgfortran/generated/matmul_c4.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgfortran/generated/matmul_c4.c	(.../branches/gcc-7-branch)
+@@ -307,15 +307,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_4)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -850,15 +850,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_4)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1393,15 +1393,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_4)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1932,15 +1932,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_4)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -2529,15 +2529,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_COMPLEX_4)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+Index: libgfortran/generated/matmul_i4.c
+===================================================================
+--- a/src/libgfortran/generated/matmul_i4.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgfortran/generated/matmul_i4.c	(.../branches/gcc-7-branch)
+@@ -307,15 +307,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_4)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -850,15 +850,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_4)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1393,15 +1393,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_4)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1932,15 +1932,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_4)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -2529,15 +2529,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_4)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+Index: libgfortran/generated/matmul_i16.c
+===================================================================
+--- a/src/libgfortran/generated/matmul_i16.c	(.../tags/gcc_7_1_0_release)
++++ b/src/libgfortran/generated/matmul_i16.c	(.../branches/gcc-7-branch)
+@@ -307,15 +307,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_16)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -850,15 +850,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_16)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1393,15 +1393,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_16)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -1932,15 +1932,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_16)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
+@@ -2529,15 +2529,15 @@
+       b_offset = 1 + b_dim1;
+       b -= b_offset;
+ 
+-      /* Early exit if possible */
+-      if (m == 0 || n == 0 || k == 0)
+-	return;
+-
+       /* Empty c first.  */
+       for (j=1; j<=n; j++)
+ 	for (i=1; i<=m; i++)
+ 	  c[i + j * c_dim1] = (GFC_INTEGER_16)0;
+ 
++      /* Early exit if possible */
++      if (m == 0 || n == 0 || k == 0)
++	return;
++
+       /* Start turning the crank. */
+       i1 = n;
+       for (jj = 1; jj <= i1; jj += 512)
 Index: libgfortran/libgfortran.h
 ===================================================================
 --- a/src/libgfortran/libgfortran.h	(.../tags/gcc_7_1_0_release)
@@ -51539,3 +61042,84 @@ Index: libgfortran/io/transfer.c
    next_record (dtp, 1);
  
   done:
+Index: libada/configure
+===================================================================
+--- a/src/libada/configure	(.../tags/gcc_7_1_0_release)
++++ b/src/libada/configure	(.../branches/gcc-7-branch)
+@@ -2960,9 +2960,7 @@
+ 
+ 
+ # Determine what to build for 'gnatlib'
+-if test $build = $target \
+-   && test ${enable_shared} = yes ; then
+-  # Note that build=target is almost certainly the wrong test; FIXME
++if test ${enable_shared} = yes; then
+   default_gnatlib_target="gnatlib-shared"
+ else
+   default_gnatlib_target="gnatlib-plain"
+@@ -3006,9 +3004,10 @@
+ 
+   fi
+ 
+-have_getipinfo=
+ if test x$have_unwind_getipinfo = xyes; then
+   have_getipinfo=-DHAVE_GETIPINFO
++else
++  have_getipinfo=
+ fi
+ 
+ 
+Index: libada/configure.ac
+===================================================================
+--- a/src/libada/configure.ac	(.../tags/gcc_7_1_0_release)
++++ b/src/libada/configure.ac	(.../branches/gcc-7-branch)
+@@ -127,9 +127,7 @@
+ AC_PROG_LN_S
+ 
+ # Determine what to build for 'gnatlib'
+-if test $build = $target \
+-   && test ${enable_shared} = yes ; then
+-  # Note that build=target is almost certainly the wrong test; FIXME
++if test ${enable_shared} = yes; then
+   default_gnatlib_target="gnatlib-shared"
+ else
+   default_gnatlib_target="gnatlib-plain"
+@@ -138,11 +136,12 @@
+ 
+ # Check for _Unwind_GetIPInfo
+ GCC_CHECK_UNWIND_GETIPINFO
+-have_getipinfo=
+ if test x$have_unwind_getipinfo = xyes; then
+   have_getipinfo=-DHAVE_GETIPINFO
++else
++  have_getipinfo=
+ fi
+-AC_SUBST(have_getipinfo)
++AC_SUBST([have_getipinfo])
+ 
+ # Determine what GCC version number to use in filesystem paths.
+ GCC_BASE_VER
+Index: libada/ChangeLog
+===================================================================
+--- a/src/libada/ChangeLog	(.../tags/gcc_7_1_0_release)
++++ b/src/libada/ChangeLog	(.../branches/gcc-7-branch)
+@@ -1,3 +1,10 @@
++2017-06-01  Eric Botcazou  <ebotcazou at adacore.com>
++
++	PR ada/80921
++	* configure.ac (default_gnatlib_target): Remove bogus condition.
++	(have_getipinfo): Tweak.
++	* configure: Regenerate.
++
+ 2017-05-02  Release Manager
+ 
+ 	* GCC 7.1.0 released.
+@@ -8,7 +15,7 @@
+ 	* configure.ac: Add GCC_BASE_VER.
+ 	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
+ 	version from BASE-VER file.
+-	* configure: Regenerated.
++	* configure: Regenerate.
+ 
+ 2017-01-04  Alan Modra  <amodra at gmail.com>
+ 
diff --git a/debian/rules.patch b/debian/rules.patch
index ef5cc0b..13f7a8f 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -231,7 +231,6 @@ debian_patches += gcc-ice-apport
 debian_patches += skip-bootstrap-multilib
 debian_patches += libffi-ro-eh_frame_sect
 debian_patches += libffi-mips
-debian_patches += ada-system-freebsd-rename
 debian_patches += ada-kfreebsd
 debian_patches += ada-drop-termio-h
 

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