[gcc-6] 375/401: * Update to SVN 20170218 (r245414) from the gcc-6-branch.

Ximin Luo infinity0 at debian.org
Wed Apr 5 15:50:41 UTC 2017


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

infinity0 pushed a commit to branch pu/reproducible_builds
in repository gcc-6.

commit aa7b9e2832f2e68e90512f92e4ae605f6d1b6f02
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Sat Feb 18 05:18:47 2017 +0000

      * Update to SVN 20170218 (r245414) from the gcc-6-branch.
    
    
    git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@9300 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
 debian/changelog                |   15 +-
 debian/patches/svn-updates.diff | 5365 ++++++++++++++++++++++++++++++++++++++-
 2 files changed, 5362 insertions(+), 18 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index e692135..adec25c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,13 +1,22 @@
 gcc-6 (6.3.0-7) UNRELEASED; urgency=medium
 
-  * Update to SVN 20170214 (r245414) from the gcc-6-branch.
+  * Update to SVN 20170218 (r245414) from the gcc-6-branch.
     - Fix PR target/78945 (ARM), PR translation/79397,
       PR tree-optimization/71824, PR tree-optimization/71824,
       PR tree-optimization/77318, PR target/71017 (x86), PR c++/78897,
-      PR c++/78908, PR c++/79296 (closes: #854692).
+      PR c++/78908, PR c++/79296 (closes: #854692), PR sanitizer/79562,
+      PR libstdc++/79114, PR libstdc++/59170, PR libstdc++/59161,
+      PR libstdc++/72792, PR libstdc++/72792, PR libstdc++/72793,
+      PR libstdc++/69321, PR libstdc++/69301, PR libstdc++/79114,
+      PR libstdc++/78702, PR libstdc++/78134, PR libstdc++/78273,
+      PR c/79431, PR target 79545 (PPC), PR target/76731 (x86), PR c/79428,
+      PR tree-optimization/79411, PR c/79431, PR middle-end/79399,
+      PR tree-optimization/79338, PR target/79197 (PPC), PR target/79079,
+      PR tree-optimization/79267, PR target/79495 (x86), PR c/79471,
+      PR c++/79429, PR c/79431, PR c++/79377.
   * Update the Linaro support to the 6.3-2017.02 snapshot.
 
- -- Matthias Klose <doko at debian.org>  Tue, 14 Feb 2017 03:32:01 +0100
+ -- Matthias Klose <doko at debian.org>  Sat, 18 Feb 2017 06:18:49 +0100
 
 gcc-6 (6.3.0-6) unstable; urgency=medium
 
diff --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff
index 23a68b4..471c65c 100644
--- a/debian/patches/svn-updates.diff
+++ b/debian/patches/svn-updates.diff
@@ -1,10 +1,10 @@
-# DP: updates from the 6 branch upto 20170214 (r245414).
+# DP: updates from the 6 branch upto 20170218 (r245558).
 
 last_update()
 {
 	cat > ${dir}LAST_UPDATED <EOF
-Tue Feb 14 03:16:34 CET 2017
-Tue Feb 14 02:16:34 UTC 2017 (revision 245414)
+Sat Feb 18 05:58:19 CET 2017
+Sat Feb 18 04:58:19 UTC 2017 (revision 245558)
 EOF
 }
 
@@ -65,6 +65,465 @@ Index: libgomp/testsuite/libgomp.oacc-c-c++-common/crash-1.c
 +  
 +  return 0;
 +}
+Index: libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+===================================================================
+--- a/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc	(.../branches/gcc-6-branch)
+@@ -21,11 +21,6 @@
+ #ifdef _FILE_OFFSET_BITS
+ #undef _FILE_OFFSET_BITS
+ #endif
+-#if SANITIZER_FREEBSD
+-#define _WANT_RTENTRY
+-#include <sys/param.h>
+-#include <sys/socketvar.h>
+-#endif
+ #include <arpa/inet.h>
+ #include <dirent.h>
+ #include <errno.h>
+@@ -411,6 +406,7 @@
+   unsigned struct_input_absinfo_sz = sizeof(struct input_absinfo);
+   unsigned struct_input_id_sz = sizeof(struct input_id);
+   unsigned struct_mtpos_sz = sizeof(struct mtpos);
++  unsigned struct_rtentry_sz = sizeof(struct rtentry);
+   unsigned struct_termio_sz = sizeof(struct termio);
+   unsigned struct_vt_consize_sz = sizeof(struct vt_consize);
+   unsigned struct_vt_sizes_sz = sizeof(struct vt_sizes);
+@@ -430,7 +426,6 @@
+   unsigned struct_midi_info_sz = sizeof(struct midi_info);
+   unsigned struct_mtget_sz = sizeof(struct mtget);
+   unsigned struct_mtop_sz = sizeof(struct mtop);
+-  unsigned struct_rtentry_sz = sizeof(struct rtentry);
+   unsigned struct_sbi_instrument_sz = sizeof(struct sbi_instrument);
+   unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec);
+   unsigned struct_synth_info_sz = sizeof(struct synth_info);
+Index: libsanitizer/ChangeLog
+===================================================================
+--- a/src/libsanitizer/ChangeLog	(.../tags/gcc_6_3_0_release)
++++ b/src/libsanitizer/ChangeLog	(.../branches/gcc-6-branch)
+@@ -1,3 +1,12 @@
++2017-02-17  Andreas Tobler  <andreast at gcc.gnu.org>
++
++	Backported from mainline
++	2017-02-16  Andreas Tobler  <andreast at gcc.gnu.org>
++
++	PR sanitizer/79562
++	* sanitizer_common/sanitizer_platform_limits_posix.cc: Cherry-pick
++	upstream r294806.
++
+ 2016-12-21  Release Manager
+ 
+ 	* GCC 6.3.0 released.
+Index: libstdc++-v3/python/libstdcxx/v6/xmethods.py
+===================================================================
+--- a/src/libstdc++-v3/python/libstdcxx/v6/xmethods.py	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/python/libstdcxx/v6/xmethods.py	(.../branches/gcc-6-branch)
+@@ -565,8 +565,14 @@
+ # Xmethods for std::unique_ptr
+ 
+ class UniquePtrGetWorker(gdb.xmethod.XMethodWorker):
++    "Implements std::unique_ptr<T>::get() and std::unique_ptr<T>::operator->()"
++
+     def __init__(self, elem_type):
+-        self._elem_type = elem_type
++        self._is_array = elem_type.code == gdb.TYPE_CODE_ARRAY
++        if self._is_array:
++            self._elem_type = elem_type.target()
++        else:
++            self._elem_type = elem_type
+ 
+     def get_arg_types(self):
+         return None
+@@ -574,10 +580,16 @@
+     def get_result_type(self, obj):
+         return self._elem_type.pointer()
+ 
++    def _supports(self, method_name):
++        "operator-> is not supported for unique_ptr<T[]>"
++        return method_name == 'get' or not self._is_array
++
+     def __call__(self, obj):
+         return obj['_M_t']['_M_head_impl']
+ 
+ class UniquePtrDerefWorker(UniquePtrGetWorker):
++    "Implements std::unique_ptr<T>::operator*()"
++
+     def __init__(self, elem_type):
+         UniquePtrGetWorker.__init__(self, elem_type)
+ 
+@@ -584,9 +596,32 @@
+     def get_result_type(self, obj):
+         return self._elem_type
+ 
++    def _supports(self, method_name):
++        "operator* is not supported for unique_ptr<T[]>"
++        return not self._is_array
++
+     def __call__(self, obj):
+         return UniquePtrGetWorker.__call__(self, obj).dereference()
+ 
++class UniquePtrSubscriptWorker(UniquePtrGetWorker):
++    "Implements std::unique_ptr<T>::operator[](size_t)"
++
++    def __init__(self, elem_type):
++        UniquePtrGetWorker.__init__(self, elem_type)
++
++    def get_arg_types(self):
++        return get_std_size_type()
++
++    def get_result_type(self, obj, index):
++        return self._elem_type
++
++    def _supports(self, method_name):
++        "operator[] is only supported for unique_ptr<T[]>"
++        return self._is_array
++
++    def __call__(self, obj, index):
++        return UniquePtrGetWorker.__call__(self, obj)[index]
++
+ class UniquePtrMethodsMatcher(gdb.xmethod.XMethodMatcher):
+     def __init__(self):
+         gdb.xmethod.XMethodMatcher.__init__(self,
+@@ -595,6 +630,7 @@
+             'get': LibStdCxxXMethod('get', UniquePtrGetWorker),
+             'operator->': LibStdCxxXMethod('operator->', UniquePtrGetWorker),
+             'operator*': LibStdCxxXMethod('operator*', UniquePtrDerefWorker),
++            'operator[]': LibStdCxxXMethod('operator[]', UniquePtrSubscriptWorker),
+         }
+         self.methods = [self._method_dict[m] for m in self._method_dict]
+ 
+@@ -604,6 +640,112 @@
+         method = self._method_dict.get(method_name)
+         if method is None or not method.enabled:
+             return None
++        worker = method.worker_class(class_type.template_argument(0))
++        if worker._supports(method_name):
++            return worker
++        return None
++
++# Xmethods for std::shared_ptr
++
++class SharedPtrGetWorker(gdb.xmethod.XMethodWorker):
++    "Implements std::shared_ptr<T>::get() and std::shared_ptr<T>::operator->()"
++
++    def __init__(self, elem_type):
++        self._is_array = elem_type.code == gdb.TYPE_CODE_ARRAY
++        if self._is_array:
++            self._elem_type = elem_type.target()
++        else:
++            self._elem_type = elem_type
++
++    def get_arg_types(self):
++        return None
++
++    def get_result_type(self, obj):
++        return self._elem_type.pointer()
++
++    def __call__(self, obj):
++        return obj['_M_ptr']
++
++class SharedPtrDerefWorker(SharedPtrGetWorker):
++    "Implements std::shared_ptr<T>::operator*()"
++
++    def __init__(self, elem_type):
++        SharedPtrGetWorker.__init__(self, elem_type)
++
++    def get_result_type(self, obj):
++        return self._elem_type
++
++    def __call__(self, obj):
++        return SharedPtrGetWorker.__call__(self, obj).dereference()
++
++class SharedPtrSubscriptWorker(SharedPtrGetWorker):
++    "Implements std::shared_ptr<T>::operator[](size_t)"
++
++    def __init__(self, elem_type):
++        SharedPtrGetWorker.__init__(self, elem_type)
++
++    def get_arg_types(self):
++        return get_std_size_type()
++
++    def get_result_type(self, obj, index):
++        return self._elem_type
++
++    def __call__(self, obj, index):
++        # Check bounds if _elem_type is an array of known bound
++        m = re.match('.*\[(\d+)]$', str(self._elem_type))
++        if m and index >= int(m.group(1)):
++            raise IndexError('shared_ptr<%s> index "%d" should not be >= %d.' %
++                             (self._elem_type, int(index), int(m.group(1))))
++        return SharedPtrGetWorker.__call__(self, obj)[index]
++
++class SharedPtrUseCountWorker(gdb.xmethod.XMethodWorker):
++    "Implements std::shared_ptr<T>::use_count()"
++
++    def __init__(self, elem_type):
++        SharedPtrUseCountWorker.__init__(self, elem_type)
++
++    def get_arg_types(self):
++        return None
++
++    def get_result_type(self, obj):
++        return gdb.lookup_type('long')
++
++    def __call__(self, obj):
++        refcounts = ['_M_refcount']['_M_pi']
++        return refcounts['_M_use_count'] if refcounts else 0
++
++class SharedPtrUniqueWorker(SharedPtrUseCountWorker):
++    "Implements std::shared_ptr<T>::unique()"
++
++    def __init__(self, elem_type):
++        SharedPtrUseCountWorker.__init__(self, elem_type)
++
++    def get_result_type(self, obj):
++        return gdb.lookup_type('bool')
++
++    def __call__(self, obj):
++        return SharedPtrUseCountWorker.__call__(self, obj) == 1
++
++class SharedPtrMethodsMatcher(gdb.xmethod.XMethodMatcher):
++    def __init__(self):
++        gdb.xmethod.XMethodMatcher.__init__(self,
++                                            matcher_name_prefix + 'shared_ptr')
++        self._method_dict = {
++            'get': LibStdCxxXMethod('get', SharedPtrGetWorker),
++            'operator->': LibStdCxxXMethod('operator->', SharedPtrGetWorker),
++            'operator*': LibStdCxxXMethod('operator*', SharedPtrDerefWorker),
++            'operator[]': LibStdCxxXMethod('operator[]', SharedPtrSubscriptWorker),
++            'use_count': LibStdCxxXMethod('use_count', SharedPtrUseCountWorker),
++            'unique': LibStdCxxXMethod('unique', SharedPtrUniqueWorker),
++        }
++        self.methods = [self._method_dict[m] for m in self._method_dict]
++
++    def match(self, class_type, method_name):
++        if not re.match('^std::shared_ptr<.*>$', class_type.tag):
++            return None
++        method = self._method_dict.get(method_name)
++        if method is None or not method.enabled:
++            return None
+         return method.worker_class(class_type.template_argument(0))
+ 

+ def register_libstdcxx_xmethods(locus):
+@@ -629,3 +771,4 @@
+     gdb.xmethod.register_xmethod_matcher(
+         locus, AssociativeContainerMethodsMatcher('unordered_multimap'))
+     gdb.xmethod.register_xmethod_matcher(locus, UniquePtrMethodsMatcher())
++    gdb.xmethod.register_xmethod_matcher(locus, SharedPtrMethodsMatcher())
+Index: libstdc++-v3/python/libstdcxx/v6/printers.py
+===================================================================
+--- a/src/libstdc++-v3/python/libstdcxx/v6/printers.py	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/python/libstdcxx/v6/printers.py	(.../branches/gcc-6-branch)
+@@ -127,8 +127,8 @@
+ 
+     def to_string (self):
+         v = self.val['_M_t']['_M_head_impl']
+-        return ('std::unique_ptr<%s> containing %s' % (str(v.type.target()),
+-                                                       str(v)))
++        return 'std::unique_ptr<%s> containing %s' % (str(v.type.target()),
++                                                      str(v))
+ 
+ def get_value_from_list_node(node):
+     """Returns the value held in an _List_node<_Val>"""
+@@ -191,10 +191,12 @@
+         self.typename = typename
+ 
+     def to_string(self):
++        if not self.val['_M_node']:
++            return 'non-dereferenceable iterator for std::list'
+         nodetype = find_type(self.val.type, '_Node')
+         nodetype = nodetype.strip_typedefs().pointer()
+         node = self.val['_M_node'].cast(nodetype).dereference()
+-        return get_value_from_list_node(node)
++        return str(get_value_from_list_node(node))
+ 
+ class StdSlistPrinter:
+     "Print a __gnu_cxx::slist"
+@@ -237,9 +239,11 @@
+         self.val = val
+ 
+     def to_string(self):
++        if not self.val['_M_node']:
++            return 'non-dereferenceable iterator for __gnu_cxx::slist'
+         nodetype = find_type(self.val.type, '_Node')
+         nodetype = nodetype.strip_typedefs().pointer()
+-        return self.val['_M_node'].cast(nodetype).dereference()['_M_data']
++        return str(self.val['_M_node'].cast(nodetype).dereference()['_M_data'])
+ 
+ class StdVectorPrinter:
+     "Print a std::vector"
+@@ -324,7 +328,9 @@
+         self.val = val
+ 
+     def to_string(self):
+-        return self.val['_M_current'].dereference()
++        if not self.val['_M_current']:
++            return 'non-dereferenceable iterator for std::vector'
++        return str(self.val['_M_current'].dereference())
+ 
+ class StdTuplePrinter:
+     "Print a std::tuple"
+@@ -419,6 +425,11 @@
+         return None
+ 
+ class RbtreeIterator(Iterator):
++    """
++    Turn an RB-tree-based container (std::map, std::set etc.) into
++    a Python iterable object.
++    """
++
+     def __init__(self, rbtree):
+         self.size = rbtree['_M_t']['_M_impl']['_M_node_count']
+         self.node = rbtree['_M_t']['_M_impl']['_M_header']['_M_left']
+@@ -472,7 +483,7 @@
+ # std::map::iterator), and has nothing to do with the RbtreeIterator
+ # class above.
+ class StdRbtreeIteratorPrinter:
+-    "Print std::map::iterator"
++    "Print std::map::iterator, std::set::iterator, etc."
+ 
+     def __init__ (self, typename, val):
+         self.val = val
+@@ -481,8 +492,10 @@
+         self.link_type = nodetype.strip_typedefs().pointer()
+ 
+     def to_string (self):
++        if not self.val['_M_node']:
++            return 'non-dereferenceable iterator for associative container'
+         node = self.val['_M_node'].cast(self.link_type).dereference()
+-        return get_value_from_Rb_tree_node(node)
++        return str(get_value_from_Rb_tree_node(node))
+ 
+ class StdDebugIteratorPrinter:
+     "Print a debug enabled version of an iterator"
+@@ -494,7 +507,7 @@
+     # and return the wrapped iterator value.
+     def to_string (self):
+         itype = self.val.type.template_argument(0)
+-        return self.val.cast(itype)
++        return str(self.val.cast(itype))
+ 
+ class StdMapPrinter:
+     "Print a std::map or std::multimap"
+@@ -687,7 +700,9 @@
+         self.val = val
+ 
+     def to_string(self):
+-        return self.val['_M_cur'].dereference()
++        if not self.val['_M_cur']:
++            return 'non-dereferenceable iterator for std::deque'
++        return str(self.val['_M_cur'].dereference())
+ 
+ class StdStringPrinter:
+     "Print a std::basic_string of some kind"
+@@ -873,8 +888,8 @@
+ 
+     def to_string(self):
+         if self.val['_M_impl']['_M_head']['_M_next'] == 0:
+-            return 'empty %s' % (self.typename)
+-        return '%s' % (self.typename)
++            return 'empty %s' % self.typename
++        return '%s' % self.typename
+ 
+ class SingleObjContainerPrinter(object):
+     "Base class for printers of containers of single objects"
+@@ -975,9 +990,10 @@
+ 
+     def to_string (self):
+         if self.contained_value is None:
+-            return self.typename + " [no contained value]"
++            return "%s [no contained value]" % self.typename
+         if hasattr (self.visualizer, 'children'):
+-            return self.typename + " containing " + self.visualizer.to_string ()
++            return "%s containing %s" % (self.typename,
++                                         self.visualizer.to_string())
+         return self.typename
+ 
+ class StdExpStringViewPrinter:
+@@ -1133,7 +1149,8 @@
+ libstdcxx_printer = None
+ 
+ class TemplateTypePrinter(object):
+-    r"""A type printer for class templates.
++    r"""
++    A type printer for class templates.
+ 
+     Recognizes type names that match a regular expression.
+     Replaces them with a formatted string which can use replacement field
+Index: libstdc++-v3/src/c++11/cxx11-shim_facets.cc
+===================================================================
+--- a/src/libstdc++-v3/src/c++11/cxx11-shim_facets.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/src/c++11/cxx11-shim_facets.cc	(.../branches/gcc-6-branch)
+@@ -226,8 +226,14 @@
+ 
+   namespace // unnamed
+   {
++    struct __shim_accessor : facet
++    {
++      using facet::__shim;  // Redeclare protected member as public.
++    };
++    using __shim = __shim_accessor::__shim;
++
+     template<typename _CharT>
+-      struct numpunct_shim : std::numpunct<_CharT>, facet::__shim
++      struct numpunct_shim : std::numpunct<_CharT>, __shim
+       {
+ 	typedef typename numpunct<_CharT>::__cache_type __cache_type;
+ 
+@@ -251,7 +257,7 @@
+       };
+ 
+     template<typename _CharT>
+-      struct collate_shim : std::collate<_CharT>, facet::__shim
++      struct collate_shim : std::collate<_CharT>, __shim
+       {
+ 	typedef basic_string<_CharT>	string_type;
+ 
+@@ -276,7 +282,7 @@
+       };
+ 
+     template<typename _CharT>
+-      struct time_get_shim : std::time_get<_CharT>, facet::__shim
++      struct time_get_shim : std::time_get<_CharT>, __shim
+       {
+ 	typedef typename std::time_get<_CharT>::iter_type iter_type;
+ 	typedef typename std::time_get<_CharT>::char_type char_type;
+@@ -330,7 +336,7 @@
+       };
+ 
+     template<typename _CharT, bool _Intl>
+-      struct moneypunct_shim : std::moneypunct<_CharT, _Intl>, facet::__shim
++      struct moneypunct_shim : std::moneypunct<_CharT, _Intl>, __shim
+       {
+ 	typedef typename moneypunct<_CharT, _Intl>::__cache_type __cache_type;
+ 
+@@ -357,7 +363,7 @@
+       };
+ 
+     template<typename _CharT>
+-      struct money_get_shim : std::money_get<_CharT>, facet::__shim
++      struct money_get_shim : std::money_get<_CharT>, __shim
+       {
+ 	typedef typename std::money_get<_CharT>::iter_type iter_type;
+ 	typedef typename std::money_get<_CharT>::char_type char_type;
+@@ -398,7 +404,7 @@
+       };
+ 
+     template<typename _CharT>
+-      struct money_put_shim : std::money_put<_CharT>, facet::__shim
++      struct money_put_shim : std::money_put<_CharT>, __shim
+       {
+ 	typedef typename std::money_put<_CharT>::iter_type iter_type;
+ 	typedef typename std::money_put<_CharT>::char_type char_type;
+@@ -427,7 +433,7 @@
+       };
+ 
+     template<typename _CharT>
+-      struct messages_shim : std::messages<_CharT>, facet::__shim
++      struct messages_shim : std::messages<_CharT>, __shim
+       {
+ 	typedef messages_base::catalog  catalog;
+ 	typedef basic_string<_CharT>	string_type;
 Index: libstdc++-v3/doc/xml/faq.xml
 ===================================================================
 --- a/src/libstdc++-v3/doc/xml/faq.xml	(.../tags/gcc_6_3_0_release)
@@ -147,6 +606,115 @@ Index: libstdc++-v3/include/std/thread
  
      thread(thread&& __t) noexcept
      { swap(__t); }
+Index: libstdc++-v3/include/std/type_traits
+===================================================================
+--- a/src/libstdc++-v3/include/std/type_traits	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/include/std/type_traits	(.../branches/gcc-6-branch)
+@@ -2576,12 +2576,6 @@
+     using __detected_or_t
+       = typename __detected_or<_Default, _Op, _Args...>::type;
+ 
+-  // _Op<_Args...> if that is a valid type, otherwise _Default<_Args...>.
+-  template<template<typename...> class _Default,
+-	   template<typename...> class _Op, typename... _Args>
+-    using __detected_or_t_ =
+-      __detected_or_t<_Default<_Args...>, _Op, _Args...>;
+-
+   /// @} group metaprogramming
+ 
+   /**
+Index: libstdc++-v3/include/std/atomic
+===================================================================
+--- a/src/libstdc++-v3/include/std/atomic	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/include/std/atomic	(.../branches/gcc-6-branch)
+@@ -230,35 +230,39 @@
+ 
+       _Tp
+       load(memory_order __m = memory_order_seq_cst) const noexcept
+-      { 
+-        _Tp tmp;
+-	__atomic_load(&_M_i, &tmp, __m);
+-	return tmp;
++      {
++	alignas(_Tp) unsigned char __buf[sizeof(_Tp)];
++	_Tp* __ptr = reinterpret_cast<_Tp*>(__buf);
++	__atomic_load(&_M_i, __ptr, __m);
++	return *__ptr;
+       }
+ 
+       _Tp
+       load(memory_order __m = memory_order_seq_cst) const volatile noexcept
+-      { 
+-        _Tp tmp;
+-	__atomic_load(&_M_i, &tmp, __m);
+-	return tmp;
++      {
++        alignas(_Tp) unsigned char __buf[sizeof(_Tp)];
++	_Tp* __ptr = reinterpret_cast<_Tp*>(__buf);
++	__atomic_load(&_M_i, __ptr, __m);
++	return *__ptr;
+       }
+ 
+       _Tp
+       exchange(_Tp __i, memory_order __m = memory_order_seq_cst) noexcept
+-      { 
+-        _Tp tmp;
+-	__atomic_exchange(&_M_i, &__i, &tmp, __m);
+-	return tmp;
++      {
++        alignas(_Tp) unsigned char __buf[sizeof(_Tp)];
++	_Tp* __ptr = reinterpret_cast<_Tp*>(__buf);
++	__atomic_exchange(&_M_i, &__i, __ptr, __m);
++	return *__ptr;
+       }
+ 
+       _Tp
+       exchange(_Tp __i, 
+ 	       memory_order __m = memory_order_seq_cst) volatile noexcept
+-      { 
+-        _Tp tmp;
+-	__atomic_exchange(&_M_i, &__i, &tmp, __m);
+-	return tmp;
++      {
++        alignas(_Tp) unsigned char __buf[sizeof(_Tp)];
++	_Tp* __ptr = reinterpret_cast<_Tp*>(__buf);
++	__atomic_exchange(&_M_i, &__i, __ptr, __m);
++	return *__ptr;
+       }
+ 
+       bool
+Index: libstdc++-v3/include/experimental/any
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/any	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/include/experimental/any	(.../branches/gcc-6-branch)
+@@ -425,7 +425,10 @@
+   template<typename _Tp>
+     void* __any_caster(const any* __any)
+     {
+-      if (__any->_M_manager != &any::_Manager<decay_t<_Tp>>::_S_manage)
++      struct _None { };
++      using _Up = decay_t<_Tp>;
++      using _Vp = conditional_t<is_copy_constructible<_Up>::value, _Up, _None>;
++      if (__any->_M_manager != &any::_Manager<_Vp>::_S_manage)
+ 	return nullptr;
+       any::_Arg __arg;
+       __any->_M_manager(any::_Op_access, __any, &__arg);
+Index: libstdc++-v3/include/experimental/memory
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/memory	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/include/experimental/memory	(.../branches/gcc-6-branch)
+@@ -124,9 +124,9 @@
+       constexpr __pointer
+       release() noexcept
+       {
+-	__pointer tmp = get();
++	__pointer __tmp = get();
+ 	reset();
+-	return tmp;
++	return __tmp;
+       }
+ 
+       constexpr void
 Index: libstdc++-v3/include/experimental/array
 ===================================================================
 --- a/src/libstdc++-v3/include/experimental/array	(.../tags/gcc_6_3_0_release)
@@ -188,6 +756,205 @@ Index: libstdc++-v3/include/experimental/array
    {
      return __to_array(__a, make_index_sequence<_Nm>{});
    }
+Index: libstdc++-v3/include/ext/pointer.h
+===================================================================
+--- a/src/libstdc++-v3/include/ext/pointer.h	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/include/ext/pointer.h	(.../branches/gcc-6-branch)
+@@ -449,9 +449,9 @@
+       inline _Pointer_adapter 
+       operator++(int)
+       {
+-        _Pointer_adapter tmp(*this);
++        _Pointer_adapter __tmp(*this);
+         _Storage_policy::set(_Storage_policy::get() + 1);
+-        return tmp;
++        return __tmp;
+       }
+   
+       inline _Pointer_adapter& 
+@@ -464,9 +464,9 @@
+       inline _Pointer_adapter
+       operator--(int) 
+       {
+-        _Pointer_adapter tmp(*this);
++        _Pointer_adapter __tmp(*this);
+         _Storage_policy::set(_Storage_policy::get() - 1);
+-        return tmp;
++        return __tmp;
+       }
+   
+     }; // class _Pointer_adapter
+Index: libstdc++-v3/include/bits/stl_map.h
+===================================================================
+--- a/src/libstdc++-v3/include/bits/stl_map.h	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/include/bits/stl_map.h	(.../branches/gcc-6-branch)
+@@ -1129,7 +1129,7 @@
+       template<typename _Kt>
+ 	auto
+ 	count(const _Kt& __x) const -> decltype(_M_t._M_count_tr(__x))
+-	{ return _M_t._M_find_tr(__x) == _M_t.end() ? 0 : 1; }
++	{ return _M_t._M_count_tr(__x); }
+ #endif
+       //@}
+ 
+@@ -1153,8 +1153,8 @@
+       template<typename _Kt>
+ 	auto
+ 	lower_bound(const _Kt& __x)
+-	-> decltype(_M_t._M_lower_bound_tr(__x))
+-	{ return _M_t._M_lower_bound_tr(__x); }
++	-> decltype(iterator(_M_t._M_lower_bound_tr(__x)))
++	{ return iterator(_M_t._M_lower_bound_tr(__x)); }
+ #endif
+       //@}
+ 
+@@ -1178,8 +1178,8 @@
+       template<typename _Kt>
+ 	auto
+ 	lower_bound(const _Kt& __x) const
+-	-> decltype(_M_t._M_lower_bound_tr(__x))
+-	{ return _M_t._M_lower_bound_tr(__x); }
++	-> decltype(const_iterator(_M_t._M_lower_bound_tr(__x)))
++	{ return const_iterator(_M_t._M_lower_bound_tr(__x)); }
+ #endif
+       //@}
+ 
+@@ -1198,8 +1198,8 @@
+       template<typename _Kt>
+ 	auto
+ 	upper_bound(const _Kt& __x)
+-	-> decltype(_M_t._M_upper_bound_tr(__x))
+-	{ return _M_t._M_upper_bound_tr(__x); }
++	-> decltype(iterator(_M_t._M_upper_bound_tr(__x)))
++	{ return iterator(_M_t._M_upper_bound_tr(__x)); }
+ #endif
+       //@}
+ 
+@@ -1218,8 +1218,8 @@
+       template<typename _Kt>
+ 	auto
+ 	upper_bound(const _Kt& __x) const
+-	-> decltype(_M_t._M_upper_bound_tr(__x))
+-	{ return _M_t._M_upper_bound_tr(__x); }
++	-> decltype(const_iterator(_M_t._M_upper_bound_tr(__x)))
++	{ return const_iterator(_M_t._M_upper_bound_tr(__x)); }
+ #endif
+       //@}
+ 
+@@ -1247,8 +1247,8 @@
+       template<typename _Kt>
+ 	auto
+ 	equal_range(const _Kt& __x)
+-	-> decltype(_M_t._M_equal_range_tr(__x))
+-	{ return _M_t._M_equal_range_tr(__x); }
++	-> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)))
++	{ return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); }
+ #endif
+       //@}
+ 
+@@ -1276,8 +1276,12 @@
+       template<typename _Kt>
+ 	auto
+ 	equal_range(const _Kt& __x) const
+-	-> decltype(_M_t._M_equal_range_tr(__x))
+-	{ return _M_t._M_equal_range_tr(__x); }
++	-> decltype(pair<const_iterator, const_iterator>(
++	      _M_t._M_equal_range_tr(__x)))
++	{
++	  return pair<const_iterator, const_iterator>(
++	      _M_t._M_equal_range_tr(__x));
++	}
+ #endif
+       //@}
+ 
+Index: libstdc++-v3/include/bits/locale_classes.h
+===================================================================
+--- a/src/libstdc++-v3/include/bits/locale_classes.h	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/include/bits/locale_classes.h	(.../branches/gcc-6-branch)
+@@ -461,10 +461,11 @@
+ 	}
+     }
+ 
+-    class __shim;
+-
+     const facet* _M_sso_shim(const id*) const;
+     const facet* _M_cow_shim(const id*) const;
++
++  protected:
++    class __shim; // For internal use only.
+   };
+ 
+ 
+Index: libstdc++-v3/include/bits/stl_set.h
+===================================================================
+--- a/src/libstdc++-v3/include/bits/stl_set.h	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/include/bits/stl_set.h	(.../branches/gcc-6-branch)
+@@ -670,7 +670,7 @@
+ 	auto
+ 	count(const _Kt& __x) const
+ 	-> decltype(_M_t._M_count_tr(__x))
+-	{ return _M_t._M_find_tr(__x) == _M_t.end() ? 0 : 1; }
++	{ return _M_t._M_count_tr(__x); }
+ #endif
+       //@}
+ 
+@@ -735,14 +735,14 @@
+       template<typename _Kt>
+ 	auto
+ 	lower_bound(const _Kt& __x)
+-	-> decltype(_M_t._M_lower_bound_tr(__x))
+-	{ return _M_t._M_lower_bound_tr(__x); }
++	-> decltype(iterator(_M_t._M_lower_bound_tr(__x)))
++	{ return iterator(_M_t._M_lower_bound_tr(__x)); }
+ 
+       template<typename _Kt>
+ 	auto
+ 	lower_bound(const _Kt& __x) const
+-	-> decltype(_M_t._M_lower_bound_tr(__x))
+-	{ return _M_t._M_lower_bound_tr(__x); }
++	-> decltype(const_iterator(_M_t._M_lower_bound_tr(__x)))
++	{ return const_iterator(_M_t._M_lower_bound_tr(__x)); }
+ #endif
+       //@}
+ 
+@@ -765,14 +765,14 @@
+       template<typename _Kt>
+ 	auto
+ 	upper_bound(const _Kt& __x)
+-	-> decltype(_M_t._M_upper_bound_tr(__x))
+-	{ return _M_t._M_upper_bound_tr(__x); }
++	-> decltype(iterator(_M_t._M_upper_bound_tr(__x)))
++	{ return iterator(_M_t._M_upper_bound_tr(__x)); }
+ 
+       template<typename _Kt>
+ 	auto
+ 	upper_bound(const _Kt& __x) const
+-	-> decltype(_M_t._M_upper_bound_tr(__x))
+-	{ return _M_t._M_upper_bound_tr(__x); }
++	-> decltype(iterator(_M_t._M_upper_bound_tr(__x)))
++	{ return const_iterator(_M_t._M_upper_bound_tr(__x)); }
+ #endif
+       //@}
+ 
+@@ -804,14 +804,14 @@
+       template<typename _Kt>
+ 	auto
+ 	equal_range(const _Kt& __x)
+-	-> decltype(_M_t._M_equal_range_tr(__x))
+-	{ return _M_t._M_equal_range_tr(__x); }
++	-> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)))
++	{ return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); }
+ 
+       template<typename _Kt>
+ 	auto
+ 	equal_range(const _Kt& __x) const
+-	-> decltype(_M_t._M_equal_range_tr(__x))
+-	{ return _M_t._M_equal_range_tr(__x); }
++	-> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)))
++	{ return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); }
+ #endif
+       //@}
+ 
 Index: libstdc++-v3/include/bits/basic_string.h
 ===================================================================
 --- a/src/libstdc++-v3/include/bits/basic_string.h	(.../tags/gcc_6_3_0_release)
@@ -222,6 +989,80 @@ Index: libstdc++-v3/include/bits/basic_string.h
  	      }
  	    std::__alloc_on_copy(_M_get_allocator(), __str._M_get_allocator());
  	  }
+Index: libstdc++-v3/include/bits/stl_multimap.h
+===================================================================
+--- a/src/libstdc++-v3/include/bits/stl_multimap.h	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/include/bits/stl_multimap.h	(.../branches/gcc-6-branch)
+@@ -822,8 +822,8 @@
+       template<typename _Kt>
+ 	auto
+ 	lower_bound(const _Kt& __x)
+-	-> decltype(_M_t._M_lower_bound_tr(__x))
+-	{ return _M_t._M_lower_bound_tr(__x); }
++	-> decltype(iterator(_M_t._M_lower_bound_tr(__x)))
++	{ return iterator(_M_t._M_lower_bound_tr(__x)); }
+ #endif
+       //@}
+ 
+@@ -847,8 +847,8 @@
+       template<typename _Kt>
+ 	auto
+ 	lower_bound(const _Kt& __x) const
+-	-> decltype(_M_t._M_lower_bound_tr(__x))
+-	{ return _M_t._M_lower_bound_tr(__x); }
++	-> decltype(const_iterator(_M_t._M_lower_bound_tr(__x)))
++	{ return const_iterator(_M_t._M_lower_bound_tr(__x)); }
+ #endif
+       //@}
+ 
+@@ -867,8 +867,8 @@
+       template<typename _Kt>
+ 	auto
+ 	upper_bound(const _Kt& __x)
+-	-> decltype(_M_t._M_upper_bound_tr(__x))
+-	{ return _M_t._M_upper_bound_tr(__x); }
++	-> decltype(iterator(_M_t._M_upper_bound_tr(__x)))
++	{ return iterator(_M_t._M_upper_bound_tr(__x)); }
+ #endif
+       //@}
+ 
+@@ -887,8 +887,8 @@
+       template<typename _Kt>
+ 	auto
+ 	upper_bound(const _Kt& __x) const
+-	-> decltype(_M_t._M_upper_bound_tr(__x))
+-	{ return _M_t._M_upper_bound_tr(__x); }
++	-> decltype(const_iterator(_M_t._M_upper_bound_tr(__x)))
++	{ return const_iterator(_M_t._M_upper_bound_tr(__x)); }
+ #endif
+       //@}
+ 
+@@ -914,8 +914,8 @@
+       template<typename _Kt>
+ 	auto
+ 	equal_range(const _Kt& __x)
+-	-> decltype(_M_t._M_equal_range_tr(__x))
+-	{ return _M_t._M_equal_range_tr(__x); }
++	-> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)))
++	{ return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); }
+ #endif
+       //@}
+ 
+@@ -941,8 +941,12 @@
+       template<typename _Kt>
+ 	auto
+ 	equal_range(const _Kt& __x) const
+-	-> decltype(_M_t._M_equal_range_tr(__x))
+-	{ return _M_t._M_equal_range_tr(__x); }
++	-> decltype(pair<const_iterator, const_iterator>(
++	      _M_t._M_equal_range_tr(__x)))
++	{
++	  return pair<const_iterator, const_iterator>(
++	      _M_t._M_equal_range_tr(__x));
++	}
+ #endif
+       //@}
+ 
 Index: libstdc++-v3/include/bits/predefined_ops.h
 ===================================================================
 --- a/src/libstdc++-v3/include/bits/predefined_ops.h	(.../tags/gcc_6_3_0_release)
@@ -370,6 +1211,122 @@ Index: libstdc++-v3/include/bits/predefined_ops.h
        _Iter_negate(_Predicate __pred)
  	: _M_pred(__pred)
        { }
+Index: libstdc++-v3/include/bits/stl_multiset.h
+===================================================================
+--- a/src/libstdc++-v3/include/bits/stl_multiset.h	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/include/bits/stl_multiset.h	(.../branches/gcc-6-branch)
+@@ -716,14 +716,14 @@
+       template<typename _Kt>
+ 	auto
+ 	lower_bound(const _Kt& __x)
+-	-> decltype(_M_t._M_lower_bound_tr(__x))
+-	{ return _M_t._M_lower_bound_tr(__x); }
++	-> decltype(iterator(_M_t._M_lower_bound_tr(__x)))
++	{ return iterator(_M_t._M_lower_bound_tr(__x)); }
+ 
+       template<typename _Kt>
+ 	auto
+ 	lower_bound(const _Kt& __x) const
+-	-> decltype(_M_t._M_lower_bound_tr(__x))
+-	{ return _M_t._M_lower_bound_tr(__x); }
++	-> decltype(iterator(_M_t._M_lower_bound_tr(__x)))
++	{ return iterator(_M_t._M_lower_bound_tr(__x)); }
+ #endif
+       //@}
+ 
+@@ -746,14 +746,14 @@
+       template<typename _Kt>
+ 	auto
+ 	upper_bound(const _Kt& __x)
+-	-> decltype(_M_t._M_upper_bound_tr(__x))
+-	{ return _M_t._M_upper_bound_tr(__x); }
++	-> decltype(iterator(_M_t._M_upper_bound_tr(__x)))
++	{ return iterator(_M_t._M_upper_bound_tr(__x)); }
+ 
+       template<typename _Kt>
+ 	auto
+ 	upper_bound(const _Kt& __x) const
+-	-> decltype(_M_t._M_upper_bound_tr(__x))
+-	{ return _M_t._M_upper_bound_tr(__x); }
++	-> decltype(iterator(_M_t._M_upper_bound_tr(__x)))
++	{ return iterator(_M_t._M_upper_bound_tr(__x)); }
+ #endif
+       //@}
+ 
+@@ -785,14 +785,14 @@
+       template<typename _Kt>
+ 	auto
+ 	equal_range(const _Kt& __x)
+-	-> decltype(_M_t._M_equal_range_tr(__x))
+-	{ return _M_t._M_equal_range_tr(__x); }
++	-> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)))
++	{ return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); }
+ 
+       template<typename _Kt>
+ 	auto
+ 	equal_range(const _Kt& __x) const
+-	-> decltype(_M_t._M_equal_range_tr(__x))
+-	{ return _M_t._M_equal_range_tr(__x); }
++	-> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)))
++	{ return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); }
+ #endif
+       //@}
+ 
+Index: libstdc++-v3/include/bits/ptr_traits.h
+===================================================================
+--- a/src/libstdc++-v3/include/bits/ptr_traits.h	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/include/bits/ptr_traits.h	(.../branches/gcc-6-branch)
+@@ -56,7 +56,7 @@
+   // Given Template<T, ...> and U return Template<U, ...>, otherwise invalid.
+   template<typename _Tp, typename _Up>
+     struct __replace_first_arg
+-    { using type = __undefined; };
++    { };
+ 
+   template<template<typename, typename...> class _Template, typename _Up,
+            typename _Tp, typename... _Types>
+@@ -84,8 +84,12 @@
+       template<typename _Tp>
+ 	using __difference_type = typename _Tp::difference_type;
+ 
++      template<typename _Tp, typename _Up, typename = void>
++	struct __rebind : __replace_first_arg<_Tp, _Up> { };
++
+       template<typename _Tp, typename _Up>
+-	using __rebind = typename _Tp::template rebind<_Up>;
++	struct __rebind<_Tp, _Up, __void_t<typename _Tp::template rebind<_Up>>>
++	{ using type = typename _Tp::template rebind<_Up>; };
+ 
+     public:
+       /// The pointer type.
+@@ -93,7 +97,7 @@
+ 
+       /// The type pointed to.
+       using element_type
+-	= __detected_or_t_<__get_first_arg_t, __element_type, _Ptr>;
++	= __detected_or_t<__get_first_arg_t<_Ptr>, __element_type, _Ptr>;
+ 
+       /// The type used to represent the difference between two pointers.
+       using difference_type
+@@ -101,8 +105,7 @@
+ 
+       /// A pointer to a different type.
+       template<typename _Up>
+-        using rebind
+-	  = __detected_or_t_<__replace_first_arg_t, __rebind, _Ptr, _Up>;
++        using rebind = typename __rebind<_Ptr, _Up>::type;
+ 
+       static _Ptr
+       pointer_to(__make_not_void<element_type>& __e)
+@@ -110,8 +113,6 @@
+ 
+       static_assert(!is_same<element_type, __undefined>::value,
+ 	  "pointer type defines element_type or is like SomePointer<T, Args>");
+-      static_assert(!is_same<rebind<element_type>, __undefined>::value,
+-	  "pointer type defines rebind<U> or is like SomePointer<T, Args>");
+     };
+ 
+   /**
 Index: libstdc++-v3/include/bits/list.tcc
 ===================================================================
 --- a/src/libstdc++-v3/include/bits/list.tcc	(.../tags/gcc_6_3_0_release)
@@ -470,11 +1427,329 @@ Index: libstdc++-v3/include/bits/list.tcc
  	  }
        }
  
+Index: libstdc++-v3/include/bits/alloc_traits.h
+===================================================================
+--- a/src/libstdc++-v3/include/bits/alloc_traits.h	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/include/bits/alloc_traits.h	(.../branches/gcc-6-branch)
+@@ -44,9 +44,14 @@
+ 
+   struct __allocator_traits_base
+   {
+-    template<typename _Alloc, typename _Up>
+-      using __rebind = typename _Alloc::template rebind<_Up>::other;
++    template<typename _Tp, typename _Up, typename = void>
++      struct __rebind : __replace_first_arg<_Tp, _Up> { };
+ 
++    template<typename _Tp, typename _Up>
++      struct __rebind<_Tp, _Up,
++		      __void_t<typename _Tp::template rebind<_Up>::other>>
++      { using type = typename _Tp::template rebind<_Up>::other; };
++
+   protected:
+     template<typename _Tp>
+       using __pointer = typename _Tp::pointer;
+@@ -57,10 +62,6 @@
+     template<typename _Tp>
+       using __cv_pointer = typename _Tp::const_void_pointer;
+     template<typename _Tp>
+-      using __diff_type = typename _Tp::difference_type;
+-    template<typename _Tp>
+-      using __size_type = typename _Tp::size_type;
+-    template<typename _Tp>
+       using __pocca = typename _Tp::propagate_on_container_copy_assignment;
+     template<typename _Tp>
+       using __pocma = typename _Tp::propagate_on_container_move_assignment;
+@@ -71,9 +72,8 @@
+   };
+ 
+   template<typename _Alloc, typename _Up>
+-    using __alloc_rebind = __detected_or_t_<__replace_first_arg_t,
+-					    __allocator_traits_base::__rebind,
+-					    _Alloc, _Up>;
++    using __alloc_rebind
++      = typename __allocator_traits_base::template __rebind<_Alloc, _Up>::type;
+ 
+   /**
+    * @brief  Uniform interface to all allocator types.
+@@ -94,6 +94,38 @@
+       */
+       using pointer = __detected_or_t<value_type*, __pointer, _Alloc>;
+ 
++    private:
++      // Select _Func<_Alloc> or pointer_traits<pointer>::rebind<_Tp>
++      template<template<typename> class _Func, typename _Tp, typename = void>
++	struct _Ptr
++	{
++	  using type = typename pointer_traits<pointer>::template rebind<_Tp>;
++	};
++
++      template<template<typename> class _Func, typename _Tp>
++	struct _Ptr<_Func, _Tp, __void_t<_Func<_Alloc>>>
++	{
++	  using type = _Func<_Alloc>;
++	};
++
++      // Select _A2::difference_type or pointer_traits<_Ptr>::difference_type
++      template<typename _A2, typename _PtrT, typename = void>
++	struct _Diff
++	{ using type = typename pointer_traits<_PtrT>::difference_type; };
++
++      template<typename _A2, typename _PtrT>
++	struct _Diff<_A2, _PtrT, __void_t<typename _A2::difference_type>>
++	{ using type = typename _A2::difference_type; };
++
++      // Select _A2::size_type or make_unsigned<_DiffT>::type
++      template<typename _A2, typename _DiffT, typename = void>
++	struct _Size : make_unsigned<_DiffT> { };
++
++      template<typename _A2, typename _DiffT>
++	struct _Size<_A2, _DiffT, __void_t<typename _A2::size_type>>
++	{ using type = typename _A2::size_type; };
++
++    public:
+       /**
+        * @brief   The allocator's const pointer type.
+        *
+@@ -100,9 +132,7 @@
+        * @c Alloc::const_pointer if that type exists, otherwise
+        * <tt> pointer_traits<pointer>::rebind<const value_type> </tt>
+       */
+-      using const_pointer
+-	= __detected_or_t<__ptr_rebind<pointer, const value_type>,
+-			  __c_pointer, _Alloc>;
++      using const_pointer = typename _Ptr<__c_pointer, const value_type>::type;
+ 
+       /**
+        * @brief   The allocator's void pointer type.
+@@ -110,8 +140,7 @@
+        * @c Alloc::void_pointer if that type exists, otherwise
+        * <tt> pointer_traits<pointer>::rebind<void> </tt>
+       */
+-      using void_pointer
+-	= __detected_or_t<__ptr_rebind<pointer, void>, __v_pointer, _Alloc>;
++      using void_pointer = typename _Ptr<__v_pointer, void>::type;
+ 
+       /**
+        * @brief   The allocator's const void pointer type.
+@@ -119,9 +148,7 @@
+        * @c Alloc::const_void_pointer if that type exists, otherwise
+        * <tt> pointer_traits<pointer>::rebind<const void> </tt>
+       */
+-      using const_void_pointer
+-	= __detected_or_t<__ptr_rebind<pointer, const void>, __cv_pointer,
+-			  _Alloc>;
++      using const_void_pointer = typename _Ptr<__cv_pointer, const void>::type;
+ 
+       /**
+        * @brief   The allocator's difference type
+@@ -129,9 +156,7 @@
+        * @c Alloc::difference_type if that type exists, otherwise
+        * <tt> pointer_traits<pointer>::difference_type </tt>
+       */
+-      using difference_type
+-	= __detected_or_t<typename pointer_traits<pointer>::difference_type,
+-			  __diff_type, _Alloc>;
++      using difference_type = typename _Diff<_Alloc, pointer>::type;
+ 
+       /**
+        * @brief   The allocator's size type
+@@ -139,9 +164,7 @@
+        * @c Alloc::size_type if that type exists, otherwise
+        * <tt> make_unsigned<difference_type>::type </tt>
+       */
+-      using size_type
+-	= __detected_or_t<typename make_unsigned<difference_type>::type,
+-			  __size_type, _Alloc>;
++      using size_type = typename _Size<_Alloc, difference_type>::type;
+ 
+       /**
+        * @brief   How the allocator is propagated on copy assignment
+@@ -184,9 +207,6 @@
+       template<typename _Tp>
+ 	using rebind_traits = allocator_traits<rebind_alloc<_Tp>>;
+ 
+-      static_assert(!is_same<rebind_alloc<value_type>, __undefined>::value,
+-	  "allocator defines rebind or is like Alloc<T, Args>");
+-
+     private:
+       template<typename _Alloc2>
+ 	static auto
+Index: libstdc++-v3/libsupc++/nested_exception.h
+===================================================================
+--- a/src/libstdc++-v3/libsupc++/nested_exception.h	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/libsupc++/nested_exception.h	(.../branches/gcc-6-branch)
+@@ -115,7 +115,7 @@
+     inline void
+     throw_with_nested(_Tp&& __t)
+     {
+-      using _Up = typename remove_reference<_Tp>::type;
++      using _Up = typename decay<_Tp>::type;
+       using _CopyConstructible
+ 	= __and_<is_copy_constructible<_Up>, is_move_constructible<_Up>>;
+       static_assert(_CopyConstructible::value,
 Index: libstdc++-v3/ChangeLog
 ===================================================================
 --- a/src/libstdc++-v3/ChangeLog	(.../tags/gcc_6_3_0_release)
 +++ b/src/libstdc++-v3/ChangeLog	(.../branches/gcc-6-branch)
-@@ -1,3 +1,89 @@
+@@ -1,3 +1,247 @@
++2017-02-15  Jonathan Wakely  <jwakely at redhat.com>
++
++	PR libstdc++/79114
++	* testsuite/18_support/nested_exception/79114.cc: Add dg-require.
++
++	Backport from mainline
++	2016-12-15  Jonathan Wakely  <jwakely at redhat.com>
++
++	PR libstdc++/59170
++	* python/libstdcxx/v6/printers.py (StdListIteratorPrinter.to_string)
++	(StdSlistIteratorPrinter.to_string, StdVectorIteratorPrinter.to_string)
++	(StdRbtreeIteratorPrinter.to_string)
++	(StdDequeIteratorPrinter.to_string): Add check for value-initialized
++	iterators.
++	* testsuite/libstdc++-prettyprinters/simple.cc: Test them.
++	* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
++
++	Backport from mainline
++	2016-12-15  Jonathan Wakely  <jwakely at redhat.com>
++
++	PR libstdc++/59161
++	* python/libstdcxx/v6/printers.py (StdListIteratorPrinter.to_string)
++	(StdSlistIteratorPrinter.to_string, StdVectorIteratorPrinter.to_string)
++	(StdRbtreeIteratorPrinter.to_string, StdDequeIteratorPrinter.to_string)
++	(StdDebugIteratorPrinter.to_string): Return string instead of
++	gdb.Value.
++	* testsuite/libstdc++-prettyprinters/59161.cc: New test.
++
++	Backport from mainline
++	2016-12-15  Jonathan Wakely  <jwakely at redhat.com>
++
++	* python/libstdcxx/v6/printers.py (UniquePointerPrinter.to_string):
++	Remove redundant parentheses.
++	(RbtreeIterator, StdRbtreeIteratorPrinter): Add docstrings.
++	(StdForwardListPrinter.to_string): Remove redundant parentheses.
++	(StdExpOptionalPrinter.to_string): Use string formatting instead of
++	concatenation.
++	(TemplateTypePrinter): Adjust whitespace.
++
++	Backport from mainline
++	2016-12-15  Jonathan Wakely  <jwakely at redhat.com>
++
++	* python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__init__): Use
++	correct element type for unique_ptr<T[]>.
++	(UniquePtrGetWorker._supports, UniquePtrDerefWorker._supports): New
++	functions to disable unsupported operators for unique_ptr<T[]>.
++	(UniquePtrSubscriptWorker): New worker for operator[].
++	(UniquePtrMethodsMatcher.__init__): Register UniquePtrSubscriptWorker.
++	(UniquePtrMethodsMatcher.match): Call _supports on the chosen worker.
++	(SharedPtrGetWorker, SharedPtrDerefWorker, SharedPtrSubscriptWorker)
++	(SharedPtrUseCountWorker, SharedPtrUniqueWorker): New workers.
++	(SharedPtrMethodsMatcher): New matcher for shared_ptr.
++	(register_libstdcxx_xmethods): Register SharedPtrMethodsMatcher.
++	* testsuite/libstdc++-xmethods/unique_ptr.cc: Test arrays.
++	* testsuite/libstdc++-xmethods/shared_ptr.cc: New test.
++
++2017-02-14  Jonathan Wakely  <jwakely at redhat.com>
++
++	Backport from mainline
++	2017-01-20  Jonathan Wakely  <jwakely at redhat.com>
++
++	PR libstdc++/72792
++	* include/bits/alloc_traits.h (__allocator_traits_base::__diff_type)
++	(__allocator_traits_base::__size_type): Remove.
++	(allocator_traits::_Ptr): New class template to detect const and void
++	pointer types without instantiating pointer_traits::rebind
++	unnecessarily.
++	(allocator_traits::_Diff): Likewise for detecting difference_type.
++	(allocator_traits::_Size): New class template to detect size_type
++	without instantiating make_unsigned unnecessarily.
++	* include/bits/ptr_traits.h (pointer_traits::element_type): Use
++	__detected_or_t instead of __detected_or_t_.
++	* include/std/type_traits (__detected_or_t_): Remove.
++	* testsuite/20_util/allocator_traits/members/pointers.cc: New test.
++
++	Backport from mainline
++	2017-01-20  Jonathan Wakely  <jwakely at redhat.com>
++
++	PR libstdc++/72792
++	PR libstdc++/72793
++	* include/bits/alloc_traits.h (__allocator_traits_base::__rebind):
++	Replace with class template using void_t.
++	(__alloc_rebind): Define in terms of
++	__allocator_traits_base::__rebind.
++	(allocator_traits): Remove unconditional static_assert for
++	rebind_alloc.
++	* include/bits/ptr_traits.h (__replace_first_arg): Remove type member.
++	(pointer_traits::__rebind): Replace with class template using void_t.
++	(pointer_traits::rebind): Define in terms of __rebind.
++	(pointer_traits): Remove unconditional static_assert for rebind.
++	* testsuite/20_util/allocator_traits/members/rebind_alloc.cc: New test.
++	* testsuite/20_util/pointer_traits/rebind.cc: New test.
++
++	Backport from mainline
++	2017-01-20  Jonathan Wakely  <jwakely at redhat.com>
++
++	PR libstdc++/69321
++	* include/experimental/any (__any_caster): Avoid instantiating
++	manager function for types that can't be stored in any.
++	* testsuite/experimental/any/misc/any_cast.cc: Test non-copyable type.
++
++	Backport from mainline
++	2017-01-18  Jonathan Wakely  <jwakely at redhat.com>
++
++	PR libstdc++/69301
++	* include/std/atomic (atomic<T>::load, atomic<T>::exchange): Use
++	aligned buffer instead of default-initialized variable.
++	* testsuite/29_atomics/atomic/69301.cc: New test.
++	* include/experimental/memory (observer_ptr::release): Use reserved
++	name.
++	* include/ext/pointer.h (_Pointer_adapter::operator++(int))
++	(_Pointer_adapter::operator--(int)): Likewise.
++
++	Backport from mainline
++	2017-01-17  Jonathan Wakely  <jwakely at redhat.com>
++
++	PR libstdc++/79114
++	* libsupc++/nested_exception.h (throw_with_nested): Use decay instead
++	of remove_reference.
++	* testsuite/18_support/nested_exception/79114.cc: New test.
++
++	Backport from mainline
++	2017-01-16  Jonathan Wakely  <jwakely at redhat.com>
++
++	PR libstdc++/78702
++	* include/bits/locale_classes.h (locale::facet::__shim): Change from
++	private to protected.
++	* src/c++11/cxx11-shim_facets.cc (__shim_accessor): Define helper to
++	make locale::facet::__shim accessible.
++
++	Backport from mainline
++	2017-01-11  Jonathan Wakely  <jwakely at redhat.com>
++
++	PR libstdc++/78134
++	* include/bits/stl_map.h (map::lower_bound, map::upper_bound)
++	(map::equal_range): Fix return type of heterogeneous overloads.
++	* include/bits/stl_multimap.h (multimap::lower_bound)
++	(multimap::upper_bound, multimap::equal_range): Likewise.
++	* include/bits/stl_multiset.h (multiset::lower_bound)
++	(multiset::upper_bound, multiset::equal_range): Likewise.
++	* include/bits/stl_set.h (set::lower_bound, set::upper_bound)
++	(set::equal_range): Likewise.
++	* testsuite/23_containers/map/operations/2.cc: Check return types.
++	* testsuite/23_containers/multimap/operations/2.cc: Likewise.
++	* testsuite/23_containers/multiset/operations/2.cc: Likewise.
++	* testsuite/23_containers/set/operations/2.cc: Likewise.
++
++	Backport from mainline
++	2017-01-11  Jonathan Wakely  <jwakely at redhat.com>
++
++	PR libstdc++/78273
++	* include/bits/stl_map.h (map::count<_Kt>(const _Kt&)): Don't assume
++	the heterogeneous comparison can only find one match.
++	* include/bits/stl_set.h (set::count<_Kt>(const _Kt&)): Likewise.
++	* testsuite/23_containers/map/operations/2.cc: Test count works with
++	comparison function that just partitions rather than sorting.
++	* testsuite/23_containers/set/operations/2.cc: Likewise.
++
 +2017-02-01  Jonathan Wakely  <jwakely at redhat.com>
 +
 +	PR libstdc++/78346
@@ -732,6 +2007,260 @@ Index: libstdc++-v3/testsuite/25_algorithms/sort/78991.cc
 +  int a[2]{ 2, 1 };
 +  std::sort(a, a+2, function{});
 +}
+Index: libstdc++-v3/testsuite/18_support/nested_exception/79114.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/18_support/nested_exception/79114.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/testsuite/18_support/nested_exception/79114.cc	(.../branches/gcc-6-branch)
+@@ -0,0 +1,28 @@
++// 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 } }
++// { dg-require-atomic-builtins "" }
++
++#include <exception>
++
++void
++test01()
++{
++  std::throw_with_nested("");
++  std::throw_with_nested(test01);
++}
+Index: libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc	(.../branches/gcc-6-branch)
+@@ -30,6 +30,7 @@
+ #include <list>
+ #include <map>
+ #include <set>
++#include <vector>
+ #include <ext/slist>
+ 
+ int
+@@ -53,6 +54,9 @@
+   std::deque<std::string>::iterator deqiter = deq.begin();
+ // { dg-final { note-test deqiter {"one"} } }
+ 
++  std::deque<int>::iterator deqiter0;
++// { dg-final { note-test deqiter0 {non-dereferenceable iterator for std::deque} } }
++
+   std::list<std::string> lst;
+   lst.push_back("one");
+   lst.push_back("two");
+@@ -66,6 +70,9 @@
+   tem = *lstciter;
+ // { dg-final { note-test lstciter {"one"}} }
+ 
++  std::list<int>::iterator lstiter0;
++// { dg-final { note-test lstiter0 {non-dereferenceable iterator for std::list} } }
++
+   std::map<std::string, int> mp;
+   mp["zardoz"] = 23;
+ // { dg-final { note-test mp {std::map with 1 elements = {["zardoz"] = 23}} } }
+@@ -73,6 +80,9 @@
+   std::map<std::string, int>::iterator mpiter = mp.begin();
+ // { dg-final { note-test mpiter {{first = "zardoz", second = 23}} } }
+ 
++  std::map<std::string, int>::iterator mpiter0;
++// { dg-final { note-test mpiter0 {non-dereferenceable iterator for associative container} } }
++
+   // PR 67440
+   const std::set<int> const_intset = {2, 3};
+ // { dg-final { note-test const_intset {std::set with 2 elements = {[0] = 2, [1] = 3}} } }
+@@ -85,6 +95,20 @@
+   std::set<std::string>::const_iterator spciter = sp.begin();
+ // { dg-final { note-test spciter {"barrel"} } }
+ 
++  std::set<int>::iterator spiter0;
++// { dg-final { note-test spiter0 {non-dereferenceable iterator for associative container} } }
++
++  std::vector<int> v;
++  v.push_back(1);
++  v.push_back(2);
++  v.erase(v.begin());
++// { dg-final { note-test v {std::vector of length 1, capacity 2 = {2}} } }
++  std::vector<int>::iterator viter3 = v.begin();
++// { dg-final { note-test viter3 {2} } }
++
++  std::vector<int>::iterator viter0;
++// { dg-final { note-test viter0 {non-dereferenceable iterator for std::vector} } }
++
+   __gnu_cxx::slist<int> sll;
+   sll.push_front(23);
+   sll.push_front(47);
+@@ -93,6 +117,9 @@
+   __gnu_cxx::slist<int>::iterator slliter = sll.begin();
+ // { dg-final { note-test slliter {47} } }
+ 
++  __gnu_cxx::slist<int>::iterator slliter0;
++// { dg-final { note-test slliter0 {non-dereferenceable iterator for __gnu_cxx::slist} } }
++
+   std::cout << "\n";
+   return 0;			// Mark SPOT
+ }
+Index: libstdc++-v3/testsuite/libstdc++-prettyprinters/59161.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/libstdc++-prettyprinters/59161.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/testsuite/libstdc++-prettyprinters/59161.cc	(.../branches/gcc-6-branch)
+@@ -0,0 +1,70 @@
++// { dg-do run }
++// { dg-options "-g -O0" }
++
++// Copyright (C) 2011-2016 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/>.
++
++#include <deque>
++#include <list>
++#include <ext/slist>
++#include <set>
++#include <vector>
++#include <debug/vector>
++#include <iostream>
++
++struct C {
++  C(int& i) : ref(i) { }
++  int& ref;
++  bool operator<(const C& c) const { return ref < c.ref; }
++};
++
++int main()
++{
++  int i = 1;
++  C c(i);
++
++  std::deque<C> d;
++  d.push_back(c);
++  std::deque<C>::iterator diter = d.begin();
++// { dg-final { regexp-test diter {ref = @0x.*} } }
++
++  std::list<C> l;
++  l.push_back(c);
++  std::list<C>::iterator liter = l.begin();
++  // Need to ensure the list<C>::iterator::_Node typedef is in the debuginfo:
++  int tmp __attribute__((unused)) = (*liter).ref;
++// { dg-final { regexp-test liter {ref = @0x.*} } }
++
++  __gnu_cxx::slist<C> sl;
++  sl.push_front(c);
++  __gnu_cxx::slist<C>::iterator sliter = sl.begin();
++// { dg-final { regexp-test sliter {ref = @0x.*} } }
++
++  std::set<C> s;
++  s.insert(c);
++  std::set<C>::iterator siter = s.begin();
++// { dg-final { regexp-test siter {ref = @0x.*} } }
++
++  std::vector<C> v;
++  v.push_back(c);
++  std::vector<C>::iterator viter = v.begin();
++// { dg-final { regexp-test viter {ref = @0x.*} } }
++
++  std::cout << "\n";
++  return 0;			// Mark SPOT
++}
++// { dg-final { gdb-test SPOT } }
+Index: libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc	(.../branches/gcc-6-branch)
+@@ -30,6 +30,7 @@
+ #include <list>
+ #include <map>
+ #include <set>
++#include <vector>
+ #include <ext/slist>
+ 
+ int
+@@ -50,6 +51,9 @@
+   deq.push_back("two");
+ // { dg-final { note-test deq {std::deque with 2 elements = {"one", "two"}} } }
+ 
++  std::deque<int>::iterator deqiter0;
++// { dg-final { note-test deqiter0 {non-dereferenceable iterator for std::deque} } }
++
+   std::deque<std::string>::iterator deqiter = deq.begin();
+ // { dg-final { note-test deqiter {"one"} } }
+ 
+@@ -58,6 +62,9 @@
+   lst.push_back("two");
+ // { dg-final { note-test lst {std::list = {[0] = "one", [1] = "two"}} } }
+ 
++  std::list<int>::iterator lstiter0;
++// { dg-final { note-test lstiter0 {non-dereferenceable iterator for std::list} } }
++
+   std::list<std::string>::iterator lstiter = lst.begin();
+   tem = *lstiter;
+ // { dg-final { note-test lstiter {"one"}} }
+@@ -73,6 +80,9 @@
+   std::map<std::string, int>::iterator mpiter = mp.begin();
+ // { dg-final { note-test mpiter {{first = "zardoz", second = 23}} } }
+ 
++  std::map<std::string, int>::iterator mpiter0;
++// { dg-final { note-test mpiter0 {non-dereferenceable iterator for associative container} } }
++
+   // PR 67440
+   std::set<int> intset;
+   intset.insert(2);
+@@ -88,6 +98,20 @@
+   std::set<std::string>::const_iterator spciter = sp.begin();
+ // { dg-final { note-test spciter {"barrel"} } }
+ 
++  std::set<int>::iterator spiter0;
++// { dg-final { note-test spiter0 {non-dereferenceable iterator for associative container} } }
++
++  std::vector<int> v;
++  v.push_back(1);
++  v.push_back(2);
++  v.erase(v.begin());
++// { dg-final { note-test v {std::vector of length 1, capacity 2 = {2}} } }
++  std::vector<int>::iterator viter3 = v.begin();
++// { dg-final { note-test viter3 {2} } }
++
++  std::vector<int>::iterator viter0;
++// { dg-final { note-test viter0 {non-dereferenceable iterator for std::vector} } }
++
+   __gnu_cxx::slist<int> sll;
+   sll.push_front(23);
+   sll.push_front(47);
+@@ -96,6 +120,9 @@
+   __gnu_cxx::slist<int>::iterator slliter = sll.begin();
+ // { dg-final { note-test slliter {47} } }
+ 
++  __gnu_cxx::slist<int>::iterator slliter0;
++// { dg-final { note-test slliter0 {non-dereferenceable iterator for __gnu_cxx::slist} } }
++
+   std::cout << "\n";
+   return 0;			// Mark SPOT
+ }
 Index: libstdc++-v3/testsuite/30_threads/thread/cons/lwg2097.cc
 ===================================================================
 --- a/src/libstdc++-v3/testsuite/30_threads/thread/cons/lwg2097.cc	(.../tags/gcc_6_3_0_release)
@@ -766,6 +2295,301 @@ Index: libstdc++-v3/testsuite/30_threads/thread/cons/lwg2097.cc
 +static_assert( !is_constructible<thread, thread&>::value, "" );
 +static_assert( !is_constructible<thread, const thread&>::value, "" );
 +static_assert( !is_constructible<thread, const thread>::value, "" );
+Index: libstdc++-v3/testsuite/29_atomics/atomic/69301.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/29_atomics/atomic/69301.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/testsuite/29_atomics/atomic/69301.cc	(.../branches/gcc-6-branch)
+@@ -0,0 +1,57 @@
++// 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 } }
++// { dg-require-atomic-builtins "" }
++
++#include <atomic>
++#include <testsuite_hooks.h>
++
++struct NonDefaultConstructible
++{
++  NonDefaultConstructible(int i) : val(i) { }
++  int val;
++};
++
++template class std::atomic<NonDefaultConstructible>;
++
++void
++test01()
++{
++  std::atomic<NonDefaultConstructible> a(1);
++  const auto n1 = a.exchange(2);
++  VERIFY( n1.val == 1 );
++  const auto n2 = a.load();
++  VERIFY( n2.val == 2 );
++}
++
++void
++test02()
++{
++  volatile std::atomic<NonDefaultConstructible> a(1);
++  const auto n1 = a.exchange(2);
++  VERIFY( n1.val == 1 );
++  const auto n2 = a.load();
++  VERIFY( n2.val == 2 );
++}
++
++int
++main()
++{
++  test01();
++  test02();
++}
+Index: libstdc++-v3/testsuite/23_containers/multimap/operations/2.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/23_containers/multimap/operations/2.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/testsuite/23_containers/multimap/operations/2.cc	(.../branches/gcc-6-branch)
+@@ -53,7 +53,7 @@
+   cit = cx.find(2L);
+   VERIFY( cit == cx.end() );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
+ 
+   static_assert(std::is_same<decltype(it), test_type::iterator>::value,
+       "find returns iterator");
+@@ -76,7 +76,7 @@
+   cn = cx.count(2L);
+   VERIFY( cn == 0 );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
+ }
+ 
+ void
+@@ -94,7 +94,12 @@
+   cit = cx.lower_bound(2L);
+   VERIFY( cit != cx.end() && cit->second == '4' );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
++
++  static_assert(std::is_same<decltype(it), test_type::iterator>::value,
++      "lower_bound returns iterator");
++  static_assert(std::is_same<decltype(cit), test_type::const_iterator>::value,
++      "const lower_bound returns const_iterator");
+ }
+ 
+ void
+@@ -112,7 +117,12 @@
+   cit = cx.upper_bound(3L);
+   VERIFY( cit == cx.end() );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
++
++  static_assert(std::is_same<decltype(it), test_type::iterator>::value,
++      "upper_bound returns iterator");
++  static_assert(std::is_same<decltype(cit), test_type::const_iterator>::value,
++      "const upper_bound returns const_iterator");
+ }
+ 
+ void
+@@ -131,7 +141,14 @@
+   cit = cx.equal_range(2L);
+   VERIFY( cit.first == cit.second && cit.first != cx.end() );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
++
++  using pair = std::pair<test_type::iterator, test_type::iterator>;
++  static_assert(std::is_same<decltype(it), pair>::value,
++      "equal_range returns pair<iterator, iterator>");
++  using cpair = std::pair<test_type::const_iterator, test_type::const_iterator>;
++  static_assert(std::is_same<decltype(cit), cpair>::value,
++      "const equal_range returns pair<const_iterator, const_iterator>");
+ }
+ 
+ 
+Index: libstdc++-v3/testsuite/23_containers/set/operations/2.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/23_containers/set/operations/2.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/testsuite/23_containers/set/operations/2.cc	(.../branches/gcc-6-branch)
+@@ -53,7 +53,7 @@
+   cit = cx.find(2L);
+   VERIFY( cit == cx.end() );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
+ 
+   static_assert(std::is_same<decltype(it), test_type::iterator>::value,
+       "find returns iterator");
+@@ -76,7 +76,7 @@
+   cn = cx.count(2L);
+   VERIFY( cn == 0 );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
+ }
+ 
+ void
+@@ -94,7 +94,12 @@
+   cit = cx.lower_bound(2L);
+   VERIFY( cit != cx.end() && *cit == 3 );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
++
++  static_assert(std::is_same<decltype(it), test_type::iterator>::value,
++      "lower_bound returns iterator");
++  static_assert(std::is_same<decltype(cit), test_type::const_iterator>::value,
++      "const lower_bound returns const_iterator");
+ }
+ 
+ void
+@@ -112,7 +117,12 @@
+   cit = cx.upper_bound(5L);
+   VERIFY( cit == cx.end() );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
++
++  static_assert(std::is_same<decltype(it), test_type::iterator>::value,
++      "upper_bound returns iterator");
++  static_assert(std::is_same<decltype(cit), test_type::const_iterator>::value,
++      "const upper_bound returns const_iterator");
+ }
+ 
+ void
+@@ -130,7 +140,14 @@
+   cit = cx.equal_range(2L);
+   VERIFY( cit.first == cit.second && cit.first != cx.end() );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
++
++  using pair = std::pair<test_type::iterator, test_type::iterator>;
++  static_assert(std::is_same<decltype(it), pair>::value,
++      "equal_range returns pair<iterator, iterator>");
++  using cpair = std::pair<test_type::const_iterator, test_type::const_iterator>;
++  static_assert(std::is_same<decltype(cit), cpair>::value,
++      "const equal_range returns pair<const_iterator, const_iterator>");
+ }
+ 
+ void
+@@ -150,6 +167,28 @@
+   s.find(i);
+ }
+ 
++void
++test07()
++{
++  // PR libstdc++/78273
++
++  struct C {
++    bool operator()(int l, int r) const { return l < r; }
++
++    struct Partition { };
++
++    bool operator()(int l, Partition) const { return l < 2; }
++    bool operator()(Partition, int r) const { return 4 < r; }
++
++    using is_transparent = void;
++  };
++
++  std::set<int, C> s{ 1, 2, 3, 4, 5 };
++
++  auto n = s.count(C::Partition{});
++  VERIFY( n == 3 );
++}
++
+ int
+ main()
+ {
+@@ -159,4 +198,5 @@
+   test04();
+   test05();
+   test06();
++  test07();
+ }
+Index: libstdc++-v3/testsuite/23_containers/multiset/operations/2.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/23_containers/multiset/operations/2.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/testsuite/23_containers/multiset/operations/2.cc	(.../branches/gcc-6-branch)
+@@ -53,7 +53,7 @@
+   cit = cx.find(2L);
+   VERIFY( cit == cx.end() );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
+ 
+   static_assert(std::is_same<decltype(it), test_type::iterator>::value,
+       "find returns iterator");
+@@ -76,7 +76,7 @@
+   cn = cx.count(2L);
+   VERIFY( cn == 0 );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
+ }
+ 
+ void
+@@ -94,7 +94,12 @@
+   cit = cx.lower_bound(2L);
+   VERIFY( cit != cx.end() && *cit == 3 );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
++
++  static_assert(std::is_same<decltype(it), test_type::iterator>::value,
++      "lower_bound returns iterator");
++  static_assert(std::is_same<decltype(cit), test_type::const_iterator>::value,
++      "const lower_bound returns const_iterator");
+ }
+ 
+ void
+@@ -112,7 +117,12 @@
+   cit = cx.upper_bound(5L);
+   VERIFY( cit == cx.end() );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
++
++  static_assert(std::is_same<decltype(it), test_type::iterator>::value,
++      "upper_bound returns iterator");
++  static_assert(std::is_same<decltype(cit), test_type::const_iterator>::value,
++      "const upper_bound returns const_iterator");
+ }
+ 
+ void
+@@ -131,7 +141,14 @@
+   cit = cx.equal_range(2L);
+   VERIFY( cit.first == cit.second && cit.first != cx.end() );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
++
++  using pair = std::pair<test_type::iterator, test_type::iterator>;
++  static_assert(std::is_same<decltype(it), pair>::value,
++      "equal_range returns pair<iterator, iterator>");
++  using cpair = std::pair<test_type::const_iterator, test_type::const_iterator>;
++  static_assert(std::is_same<decltype(cit), cpair>::value,
++      "const equal_range returns pair<const_iterator, const_iterator>");
+ }
+ 
+ 
 Index: libstdc++-v3/testsuite/23_containers/list/operations/78389.cc
 ===================================================================
 --- a/src/libstdc++-v3/testsuite/23_containers/list/operations/78389.cc	(.../tags/gcc_6_3_0_release)
@@ -845,6 +2669,102 @@ Index: libstdc++-v3/testsuite/23_containers/list/operations/78389.cc
 +    VERIFY(ax.size() == std::distance(ax.begin(), ax.end()) &&
 +	   bx.size() == std::distance(bx.begin(), bx.end()));
 +}
+Index: libstdc++-v3/testsuite/23_containers/map/operations/2.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/23_containers/map/operations/2.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/testsuite/23_containers/map/operations/2.cc	(.../branches/gcc-6-branch)
+@@ -53,7 +53,7 @@
+   cit = cx.find(2L);
+   VERIFY( cit == cx.end() );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
+ 
+   static_assert(std::is_same<decltype(it), test_type::iterator>::value,
+       "find returns iterator");
+@@ -76,7 +76,7 @@
+   cn = cx.count(2L);
+   VERIFY( cn == 0 );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
+ }
+ 
+ void
+@@ -94,7 +94,12 @@
+   cit = cx.lower_bound(2L);
+   VERIFY( cit != cx.end() && cit->second == '4' );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
++
++  static_assert(std::is_same<decltype(it), test_type::iterator>::value,
++      "lower_bound returns iterator");
++  static_assert(std::is_same<decltype(cit), test_type::const_iterator>::value,
++      "const lower_bound returns const_iterator");
+ }
+ 
+ void
+@@ -112,7 +117,12 @@
+   cit = cx.upper_bound(3L);
+   VERIFY( cit == cx.end() );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
++
++  static_assert(std::is_same<decltype(it), test_type::iterator>::value,
++      "upper_bound returns iterator");
++  static_assert(std::is_same<decltype(cit), test_type::const_iterator>::value,
++      "const upper_bound returns const_iterator");
+ }
+ 
+ void
+@@ -130,10 +140,38 @@
+   cit = cx.equal_range(2L);
+   VERIFY( cit.first == cit.second && cit.first != cx.end() );
+ 
+-  VERIFY( Cmp::count == 0);
++  VERIFY( Cmp::count == 0 );
++
++  using pair = std::pair<test_type::iterator, test_type::iterator>;
++  static_assert(std::is_same<decltype(it), pair>::value,
++      "equal_range returns pair<iterator, iterator>");
++  using cpair = std::pair<test_type::const_iterator, test_type::const_iterator>;
++  static_assert(std::is_same<decltype(cit), cpair>::value,
++      "const equal_range returns pair<const_iterator, const_iterator>");
+ }
+ 
++void
++test06()
++{
++  // PR libstdc++/78273
+ 
++  struct C {
++    bool operator()(int l, int r) const { return l < r; }
++
++    struct Partition { };
++
++    bool operator()(int l, Partition) const { return l < 2; }
++    bool operator()(Partition, int r) const { return 4 < r; }
++
++    using is_transparent = void;
++  };
++
++  std::map<int, int, C> m{ {1,0}, {2,0}, {3,0}, {4, 0}, {5, 0} };
++
++  auto n = m.count(C::Partition{});
++  VERIFY( n == 3 );
++}
++
+ int
+ main()
+ {
+@@ -142,4 +180,5 @@
+   test03();
+   test04();
+   test05();
++  test06();
+ }
 Index: libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc
 ===================================================================
 --- a/src/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc	(.../tags/gcc_6_3_0_release)
@@ -971,6 +2891,33 @@ Index: libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy_assign
    return 0;
  }
  #else
+Index: libstdc++-v3/testsuite/experimental/any/misc/any_cast.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/any/misc/any_cast.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/testsuite/experimental/any/misc/any_cast.cc	(.../branches/gcc-6-branch)
+@@ -106,9 +106,22 @@
+   MoveDeleted&& md3 = any_cast<MoveDeleted&&>(any(std::move(md)));
+ }
+ 
++void test04()
++{
++  // PR libstdc++/69321
++  struct noncopyable {
++    noncopyable(noncopyable const&) = delete;
++  };
++
++  any a;
++  auto p = any_cast<noncopyable>(&a);
++  VERIFY( p == nullptr );
++}
++
+ int main()
+ {
+   test01();
+   test02();
+   test03();
++  test04();
+ }
 Index: libstdc++-v3/testsuite/experimental/array/make_array.cc
 ===================================================================
 --- a/src/libstdc++-v3/testsuite/experimental/array/make_array.cc	(.../tags/gcc_6_3_0_release)
@@ -1016,6 +2963,102 @@ Index: libstdc++-v3/testsuite/experimental/array/make_array.cc
 +  auto arr = std::experimental::make_array<A>(B{}, C{});
 +  static_assert(std::is_same<decltype(arr), std::array<A, 2>>::value, "");
 +}
+Index: libstdc++-v3/testsuite/libstdc++-xmethods/shared_ptr.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/libstdc++-xmethods/shared_ptr.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/testsuite/libstdc++-xmethods/shared_ptr.cc	(.../branches/gcc-6-branch)
+@@ -0,0 +1,52 @@
++// { dg-do run { target c++11 } }
++// { dg-options "-g -O0" }
++
++// Copyright (C) 2016 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/>.
++
++#include <memory>
++
++struct x_struct
++{
++  int y;
++};
++
++int
++main ()
++{
++  std::shared_ptr<int> p(new int(10));
++
++  std::shared_ptr<x_struct> q(new x_struct{23});
++
++// { dg-final { note-test *p 10 } }
++// { dg-final { regexp-test p.get() 0x.* } }
++
++// { dg-final { whatis-test *p int } }
++// { dg-final { whatis-test p.get() "int \*" } }
++
++// { dg-final { note-test *q {\{y = 23\}} } }
++// { dg-final { regexp-test q.get() 0x.* } }
++// { dg-final { note-test q->y 23 } }
++
++// { dg-final { whatis-test *q x_struct } }
++// { dg-final { whatis-test q.get() "x_struct \*" } }
++// { dg-final { whatis-test q->y int } }
++
++  return 0;  // Mark SPOT
++}
++
++// { dg-final { gdb-test SPOT {} 1 } }
+Index: libstdc++-v3/testsuite/libstdc++-xmethods/unique_ptr.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/libstdc++-xmethods/unique_ptr.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/testsuite/libstdc++-xmethods/unique_ptr.cc	(.../branches/gcc-6-branch)
+@@ -28,14 +28,12 @@
+ int
+ main ()
+ {
+-  int *i = new int;
+-  *i = 10;
+-  std::unique_ptr<int> p(i);
++  std::unique_ptr<int> p(new int(10));
+ 
+-  x_struct *x = new x_struct;
+-  x->y = 23;
+-  std::unique_ptr<x_struct> q(x);
++  std::unique_ptr<x_struct> q(new x_struct{23});
+ 
++  std::unique_ptr<x_struct[]> r(new x_struct[2]{ {46}, {69} });
++
+ // { dg-final { note-test *p 10 } }
+ // { dg-final { regexp-test p.get() 0x.* } }
+ 
+@@ -50,6 +48,15 @@
+ // { dg-final { whatis-test q.get() "x_struct \*" } }
+ // { dg-final { whatis-test q->y int } }
+ 
++// { dg-final { note-test r\[1] {\{y = 69\}} } }
++// { dg-final { regexp-test r.get() 0x.* } }
++// { dg-final { note-test r\[1].y 69 } }
++
++// { dg-final { whatis-test r\[1] x_struct } }
++// { dg-final { whatis-test r.get() "x_struct \*" } }
++// { dg-final { whatis-test r\[1].y int } }
++
++
+   return 0;  // Mark SPOT
+ }
+ 
 Index: libstdc++-v3/testsuite/util/testsuite_allocator.h
 ===================================================================
 --- a/src/libstdc++-v3/testsuite/util/testsuite_allocator.h	(.../tags/gcc_6_3_0_release)
@@ -1029,6 +3072,222 @@ Index: libstdc++-v3/testsuite/util/testsuite_allocator.h
  
      public:
        typedef typename check_consistent_alloc_value_type<Tp, Alloc>::value_type
+Index: libstdc++-v3/testsuite/20_util/allocator_traits/members/rebind_alloc.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/20_util/allocator_traits/members/rebind_alloc.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/testsuite/20_util/allocator_traits/members/rebind_alloc.cc	(.../branches/gcc-6-branch)
+@@ -0,0 +1,81 @@
++// 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 <memory>
++
++using std::is_same;
++
++template<typename T, typename U>
++  using Rebind = typename std::allocator_traits<T>::template rebind_alloc<U>;
++
++template<typename T>
++  struct HasRebind {
++    using value_type = T;
++    template<typename U> struct rebind { using other = std::allocator<U>; };
++  };
++
++static_assert(is_same<Rebind<HasRebind<int>, long>,
++		      std::allocator<long>>::value,
++	      "nested alias template is used");
++
++template<typename T>
++  struct NoRebind0 {
++    using value_type = T;
++  };
++
++static_assert(is_same<Rebind<NoRebind0<int>, long>,
++		      NoRebind0<long>>::value,
++	      "first template argument is replaced");
++
++template<typename T, typename>
++  struct NoRebind1 {
++    using value_type = T;
++  };
++
++static_assert(is_same<Rebind<NoRebind1<int, void>, long>,
++		      NoRebind1<long, void>>::value,
++	      "first template argument is replaced");
++
++template<typename T, typename, typename>
++  struct NoRebind2 {
++    using value_type = T;
++  };
++
++static_assert(is_same<Rebind<NoRebind2<int, void, void>, long>,
++		      NoRebind2<long, void, void>>::value,
++	      "first template argument is replaced");
++
++template<typename T, typename...>
++  struct NoRebindN {
++    using value_type = T;
++  };
++
++static_assert(is_same<Rebind<NoRebindN<int>, long>,
++		      NoRebindN<long>>::value,
++	      "first template argument is replaced");
++static_assert(is_same<Rebind<NoRebindN<int, void>, long>,
++		      NoRebindN<long, void>>::value,
++	      "first template argument is replaced");
++
++template<typename T, int = 0>
++  struct CannotRebind {
++    using value_type = T;
++  };
++// PR libstdc++/72792 specialization of allocator_traits is still well-formed:
++std::allocator_traits<CannotRebind<int>>::value_type v;
+Index: libstdc++-v3/testsuite/20_util/allocator_traits/members/pointers.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/20_util/allocator_traits/members/pointers.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/testsuite/20_util/allocator_traits/members/pointers.cc	(.../branches/gcc-6-branch)
+@@ -0,0 +1,52 @@
++// 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 <memory>
++
++// Non-type template param means pointer_traits::rebind can't be instantiated.
++template<typename T, int = 0>
++  struct Pointer
++  {
++    using element_type = T;
++    Pointer(T* p = nullptr) : ptr(p) { }
++    T* ptr;
++  };
++
++template<typename T>
++  struct Alloc
++  {
++    using value_type = T;
++    using pointer = Pointer<T>;
++    using const_pointer = Pointer<const T>;
++    using void_pointer = Pointer<void>;
++    using const_void_pointer = Pointer<const void>;
++
++    pointer allocate(std::size_t n)
++    { return std::allocator<T>().allocate(n); }
++
++    void allocate(pointer p, std::size_t n)
++    { return std::allocator<T>().deallocate(p, n); }
++  };
++
++// The nested pointer types in Alloc should be found without attempting to
++// instantiate pointer_traits::rebind (which would fail):
++std::allocator_traits<Alloc<int>>::pointer p;
++std::allocator_traits<Alloc<int>>::const_pointer cp;
++std::allocator_traits<Alloc<int>>::void_pointer vp;
++std::allocator_traits<Alloc<int>>::const_void_pointer cvp;
+Index: libstdc++-v3/testsuite/20_util/pointer_traits/rebind.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/20_util/pointer_traits/rebind.cc	(.../tags/gcc_6_3_0_release)
++++ b/src/libstdc++-v3/testsuite/20_util/pointer_traits/rebind.cc	(.../branches/gcc-6-branch)
+@@ -0,0 +1,68 @@
++// 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 <memory>
++
++using std::is_same;
++
++template<typename T, typename U>
++  using Rebind = typename std::pointer_traits<T>::template rebind<U>;
++
++template<typename T>
++  struct HasRebind {
++    template<typename U> using rebind = U*;
++  };
++
++static_assert(is_same<Rebind<HasRebind<int>, long>,
++		      long*>::value,
++	      "nested alias template is used");
++
++template<typename T> struct NoRebind0 { };
++
++static_assert(is_same<Rebind<NoRebind0<int>, long>,
++		      NoRebind0<long>>::value,
++	      "first template argument is replaced");
++
++template<typename T, typename> struct NoRebind1 { };
++
++static_assert(is_same<Rebind<NoRebind1<int, void>, long>,
++		      NoRebind1<long, void>>::value,
++	      "first template argument is replaced");
++
++template<typename T, typename, typename> struct NoRebind2 { };
++
++static_assert(is_same<Rebind<NoRebind2<int, void, void>, long>,
++		      NoRebind2<long, void, void>>::value,
++	      "first template argument is replaced");
++
++template<typename T, typename...> struct NoRebindN { };
++
++static_assert(is_same<Rebind<NoRebindN<int>, long>,
++		      NoRebindN<long>>::value,
++	      "first template argument is replaced");
++static_assert(is_same<Rebind<NoRebindN<int, void>, long>,
++		      NoRebindN<long, void>>::value,
++	      "first template argument is replaced");
++
++template<typename T, int = 0>
++  struct CannotRebind {
++    using element_type = T;
++  };
++// PR libstdc++/72793 specialization of pointer_traits is still well-formed:
++std::pointer_traits<CannotRebind<int>>::element_type e;
 Index: libstdc++-v3/testsuite/20_util/tuple/cons/allocator_with_any.cc
 ===================================================================
 --- a/src/libstdc++-v3/testsuite/20_util/tuple/cons/allocator_with_any.cc	(.../tags/gcc_6_3_0_release)
@@ -1387,7 +3646,16 @@ Index: gcc/c/ChangeLog
 ===================================================================
 --- a/src/gcc/c/ChangeLog	(.../tags/gcc_6_3_0_release)
 +++ b/src/gcc/c/ChangeLog	(.../branches/gcc-6-branch)
-@@ -1,3 +1,9 @@
+@@ -1,3 +1,18 @@
++2017-02-15  Jakub Jelinek  <jakub at redhat.com>
++
++	Backported from mainline
++	2017-02-09  Jakub Jelinek  <jakub at redhat.com>
++
++	PR c/79431
++	* c-parser.c (c_parser_omp_declare_target): Don't invoke
++	symtab_node::get on automatic variables.
++
 +2016-12-21  Jakub Jelinek  <jakub at redhat.com>
 +
 +	PR c/77767
@@ -1397,6 +3665,32 @@ Index: gcc/c/ChangeLog
  2016-12-21  Release Manager
  
  	* GCC 6.3.0 released.
+Index: gcc/c/c-parser.c
+===================================================================
+--- a/src/gcc/c/c-parser.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/c/c-parser.c	(.../branches/gcc-6-branch)
+@@ -15180,7 +15180,7 @@
+   if (context != pragma_stmt && context != pragma_compound)
+     {
+       c_parser_error (parser, "expected declaration specifiers");
+-      c_parser_skip_until_found (parser, CPP_PRAGMA_EOL, NULL);
++      c_parser_skip_to_pragma_eol (parser, false);
+       return false;
+     }
+ 
+@@ -16560,8 +16560,11 @@
+ 	}
+       if (!at1)
+ 	{
++	  DECL_ATTRIBUTES (t) = tree_cons (id, NULL_TREE, DECL_ATTRIBUTES (t));
++	  if (TREE_CODE (t) != FUNCTION_DECL && !is_global_var (t))
++	    continue;
++
+ 	  symtab_node *node = symtab_node::get (t);
+-	  DECL_ATTRIBUTES (t) = tree_cons (id, NULL_TREE, DECL_ATTRIBUTES (t));
+ 	  if (node != NULL)
+ 	    {
+ 	      node->offloadable = 1;
 Index: gcc/c/c-decl.c
 ===================================================================
 --- a/src/gcc/c/c-decl.c	(.../tags/gcc_6_3_0_release)
@@ -1431,7 +3725,7 @@ Index: gcc/DATESTAMP
 +++ b/src/gcc/DATESTAMP	(.../branches/gcc-6-branch)
 @@ -1 +1 @@
 -20161221
-+20170214
++20170218
 Index: gcc/postreload.c
 ===================================================================
 --- a/src/gcc/postreload.c	(.../tags/gcc_6_3_0_release)
@@ -1448,6 +3742,25 @@ Index: gcc/postreload.c
    if (GET_CODE (body) == SET)
      {
        int count = 0;
+Index: gcc/value-prof.c
+===================================================================
+--- a/src/gcc/value-prof.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/value-prof.c	(.../branches/gcc-6-branch)
+@@ -1376,7 +1376,13 @@
+   gimple_call_set_fndecl (dcall_stmt, direct_call->decl);
+   dflags = flags_from_decl_or_type (direct_call->decl);
+   if ((dflags & ECF_NORETURN) != 0)
+-    gimple_call_set_lhs (dcall_stmt, NULL_TREE);
++    {
++      tree lhs = gimple_call_lhs (dcall_stmt);
++      if (lhs
++          && TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (lhs))) == INTEGER_CST
++          && !TREE_ADDRESSABLE (TREE_TYPE (lhs)))
++	gimple_call_set_lhs (dcall_stmt, NULL_TREE);
++    }
+   gsi_insert_before (&gsi, dcall_stmt, GSI_SAME_STMT);
+ 
+   /* Fix CFG. */
 Index: gcc/tree-ssa-strlen.c
 ===================================================================
 --- a/src/gcc/tree-ssa-strlen.c	(.../tags/gcc_6_3_0_release)
@@ -1482,6 +3795,68 @@ Index: gcc/tree.c
  }
  
  /* Build a newly constructed VECTOR_CST node of length LEN.  */
+Index: gcc/internal-fn.c
+===================================================================
+--- a/src/gcc/internal-fn.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/internal-fn.c	(.../branches/gcc-6-branch)
+@@ -1271,8 +1271,8 @@
+ 	  res = expand_expr_real_2 (&ops, NULL_RTX, wmode, EXPAND_NORMAL);
+ 	  rtx hipart = expand_shift (RSHIFT_EXPR, wmode, res, prec,
+ 				     NULL_RTX, uns);
+-	  hipart = gen_lowpart (mode, hipart);
+-	  res = gen_lowpart (mode, res);
++	  hipart = convert_modes (mode, wmode, hipart, uns);
++	  res = convert_modes (mode, wmode, res, uns);
+ 	  if (uns)
+ 	    /* For the unsigned multiplication, there was overflow if
+ 	       HIPART is non-zero.  */
+@@ -1305,8 +1305,8 @@
+ 	  unsigned int hprec = GET_MODE_PRECISION (hmode);
+ 	  rtx hipart0 = expand_shift (RSHIFT_EXPR, mode, op0, hprec,
+ 				      NULL_RTX, uns);
+-	  hipart0 = gen_lowpart (hmode, hipart0);
+-	  rtx lopart0 = gen_lowpart (hmode, op0);
++	  hipart0 = convert_modes (hmode, mode, hipart0, uns);
++	  rtx lopart0 = convert_modes (hmode, mode, op0, uns);
+ 	  rtx signbit0 = const0_rtx;
+ 	  if (!uns)
+ 	    signbit0 = expand_shift (RSHIFT_EXPR, hmode, lopart0, hprec - 1,
+@@ -1313,8 +1313,8 @@
+ 				     NULL_RTX, 0);
+ 	  rtx hipart1 = expand_shift (RSHIFT_EXPR, mode, op1, hprec,
+ 				      NULL_RTX, uns);
+-	  hipart1 = gen_lowpart (hmode, hipart1);
+-	  rtx lopart1 = gen_lowpart (hmode, op1);
++	  hipart1 = convert_modes (hmode, mode, hipart1, uns);
++	  rtx lopart1 = convert_modes (hmode, mode, op1, uns);
+ 	  rtx signbit1 = const0_rtx;
+ 	  if (!uns)
+ 	    signbit1 = expand_shift (RSHIFT_EXPR, hmode, lopart1, hprec - 1,
+@@ -1505,11 +1505,12 @@
+ 	     if (loxhi >> (bitsize / 2) == 0		 (if uns).  */
+ 	  rtx hipartloxhi = expand_shift (RSHIFT_EXPR, mode, loxhi, hprec,
+ 					  NULL_RTX, 0);
+-	  hipartloxhi = gen_lowpart (hmode, hipartloxhi);
++	  hipartloxhi = convert_modes (hmode, mode, hipartloxhi, 0);
+ 	  rtx signbitloxhi = const0_rtx;
+ 	  if (!uns)
+ 	    signbitloxhi = expand_shift (RSHIFT_EXPR, hmode,
+-					 gen_lowpart (hmode, loxhi),
++					 convert_modes (hmode, mode,
++							loxhi, 0),
+ 					 hprec - 1, NULL_RTX, 0);
+ 
+ 	  do_compare_rtx_and_jump (signbitloxhi, hipartloxhi, NE, true, hmode,
+@@ -1519,7 +1520,8 @@
+ 	  /* res = (loxhi << (bitsize / 2)) | (hmode) lo0xlo1;  */
+ 	  rtx loxhishifted = expand_shift (LSHIFT_EXPR, mode, loxhi, hprec,
+ 					   NULL_RTX, 1);
+-	  tem = convert_modes (mode, hmode, gen_lowpart (hmode, lo0xlo1), 1);
++	  tem = convert_modes (mode, hmode,
++			       convert_modes (hmode, mode, lo0xlo1, 1), 1);
+ 
+ 	  tem = expand_simple_binop (mode, IOR, loxhishifted, tem, res,
+ 				     1, OPTAB_DIRECT);
 Index: gcc/gcc.c
 ===================================================================
 --- a/src/gcc/gcc.c	(.../tags/gcc_6_3_0_release)
@@ -1572,6 +3947,17 @@ Index: gcc/omp-low.c
  
    return top;
  }
+@@ -19889,7 +19890,9 @@
+ {
+   tree t = *tp;
+ 
+-  if (TREE_CODE (t) == VAR_DECL && DECL_HAS_VALUE_EXPR_P (t)
++  if (TREE_CODE (t) == VAR_DECL
++      && DECL_HAS_VALUE_EXPR_P (t)
++      && is_global_var (t)
+       && lookup_attribute ("omp declare target link", DECL_ATTRIBUTES (t)))
+     {
+       *walk_subtrees = 0;
 Index: gcc/ipa-inline-transform.c
 ===================================================================
 --- a/src/gcc/ipa-inline-transform.c	(.../tags/gcc_6_3_0_release)
@@ -1675,7 +4061,248 @@ Index: gcc/ChangeLog
 ===================================================================
 --- a/src/gcc/ChangeLog	(.../tags/gcc_6_3_0_release)
 +++ b/src/gcc/ChangeLog	(.../branches/gcc-6-branch)
-@@ -1,3 +1,468 @@
+@@ -1,3 +1,709 @@
++2017-02-17  Carl Love  <cel at us.ibm.com>
++
++	Backport from mainline commit r245460 on 2017-02-14
++
++	PR 79545
++	* config/rs6000/rs6000.c: Add case statement entry to make the xvcvuxdsp
++	built-in argument unsigned.
++	* config/rs6000/vsx.md: Fix the source and return operand types so they
++	match the instruction definitions from the ISA document.  Fix typo
++	in the instruction generation for the (define_insn "vsx_xvcvuxdsp"
++	statement.
++
++2017-01-17  Julia Koval  <julia.koval at intel.com>
++
++	PR target/76731
++	* config/i386/avx512fintrin.h
++	(_mm512_i32gather_ps): Change __addr type to void const*.
++	(_mm512_mask_i32gather_ps): Ditto.
++	(_mm512_i32gather_pd): Ditto.
++	(_mm512_mask_i32gather_pd): Ditto.
++	(_mm512_i64gather_ps): Ditto.
++	(_mm512_mask_i64gather_ps): Ditto.
++	(_mm512_i64gather_pd): Ditto.
++	(_mm512_mask_i64gather_pd): Ditto.
++	(_mm512_i32gather_epi32): Ditto.
++	(_mm512_mask_i32gather_epi32): Ditto.
++	(_mm512_i32gather_epi64): Ditto.
++	(_mm512_mask_i32gather_epi64): Ditto.
++	(_mm512_i64gather_epi32): Ditto.
++	(_mm512_mask_i64gather_epi32): Ditto.
++	(_mm512_i64gather_epi64): Ditto.
++	(_mm512_mask_i64gather_epi64): Ditto.
++	(_mm512_i32scatter_ps): Change __addr type to void*.
++	(_mm512_mask_i32scatter_ps): Ditto.
++	(_mm512_i32scatter_pd): Ditto.
++	(_mm512_mask_i32scatter_pd): Ditto.
++	(_mm512_i64scatter_ps): Ditto.
++	(_mm512_mask_i64scatter_ps): Ditto.
++	(_mm512_i64scatter_pd): Ditto.
++	(_mm512_mask_i64scatter_pd): Ditto.
++	(_mm512_i32scatter_epi32): Ditto.
++	(_mm512_mask_i32scatter_epi32): Ditto.
++	(_mm512_i32scatter_epi64): Ditto.
++	(_mm512_mask_i32scatter_epi64): Ditto.
++	(_mm512_i64scatter_epi32): Ditto.
++	(_mm512_mask_i64scatter_epi32): Ditto.
++	(_mm512_i64scatter_epi64): Ditto.
++	(_mm512_mask_i64scatter_epi64): Ditto.
++	* config/i386/avx512pfintrin.h
++	(_mm512_mask_prefetch_i32gather_pd): Change addr type to void const*.
++	(_mm512_mask_prefetch_i32gather_ps): Ditto.
++	(_mm512_mask_prefetch_i64gather_pd): Ditto.
++	(_mm512_mask_prefetch_i64gather_ps): Ditto.
++	(_mm512_prefetch_i32scatter_pd): Change addr type to void*.
++	(_mm512_prefetch_i32scatter_ps): Ditto.
++	(_mm512_mask_prefetch_i32scatter_pd): Ditto.
++	(_mm512_mask_prefetch_i32scatter_ps): Ditto.
++	(_mm512_prefetch_i64scatter_pd): Ditto.
++	(_mm512_prefetch_i64scatter_ps): Ditto.
++	(_mm512_mask_prefetch_i64scatter_pd): Ditto.
++	(_mm512_mask_prefetch_i64scatter_ps): Ditto.
++	* config/i386/avx512vlintrin.h
++	(_mm256_mmask_i32gather_ps): Change __addr type to void const*.
++	(_mm_mmask_i32gather_ps): Ditto.
++	(_mm256_mmask_i32gather_pd): Ditto.
++	(_mm_mmask_i32gather_pd): Ditto.
++	(_mm256_mmask_i64gather_ps): Ditto.
++	(_mm_mmask_i64gather_ps): Ditto.
++	(_mm256_mmask_i64gather_pd): Ditto.
++	(_mm_mmask_i64gather_pd): Ditto.
++	(_mm256_mmask_i32gather_epi32): Ditto.
++	(_mm_mmask_i32gather_epi32): Ditto.
++	(_mm256_mmask_i32gather_epi64): Ditto.
++	(_mm_mmask_i32gather_epi64): Ditto.
++	(_mm256_mmask_i64gather_epi32): Ditto.
++	(_mm_mmask_i64gather_epi32): Ditto.
++	(_mm256_mmask_i64gather_epi64): Ditto.
++	(_mm_mmask_i64gather_epi64): Ditto.
++	(_mm256_i32scatter_ps): Change __addr type to void*.
++	(_mm256_mask_i32scatter_ps): Ditto.
++	(_mm_i32scatter_ps): Ditto.
++	(_mm_mask_i32scatter_ps): Ditto.
++	(_mm256_i32scatter_pd): Ditto.
++	(_mm256_mask_i32scatter_pd): Ditto.
++	(_mm_i32scatter_pd): Ditto.
++	(_mm_mask_i32scatter_pd): Ditto.
++	(_mm256_i64scatter_ps): Ditto.
++	(_mm256_mask_i64scatter_ps): Ditto.
++	(_mm_i64scatter_ps): Ditto.
++	(_mm_mask_i64scatter_ps): Ditto.
++	(_mm256_i64scatter_pd): Ditto.
++	(_mm256_mask_i64scatter_pd): Ditto.
++	(_mm_i64scatter_pd): Ditto.
++	(_mm_mask_i64scatter_pd): Ditto.
++	(_mm256_i32scatter_epi32): Ditto.
++	(_mm256_mask_i32scatter_epi32): Ditto.
++	(_mm_i32scatter_epi32): Ditto.
++	(_mm_mask_i32scatter_epi32): Ditto.
++	(_mm256_i32scatter_epi64): Ditto.
++	(_mm256_mask_i32scatter_epi64): Ditto.
++	(_mm_i32scatter_epi64): Ditto.
++	(_mm_mask_i32scatter_epi64): Ditto.
++	(_mm256_i64scatter_epi32): Ditto.
++	(_mm256_mask_i64scatter_epi32): Ditto.
++	(_mm_i64scatter_epi32): Ditto.
++	(_mm_mask_i64scatter_epi32): Ditto.
++	(_mm256_i64scatter_epi64): Ditto.
++	(_mm256_mask_i64scatter_epi64): Ditto.
++	(_mm_i64scatter_epi64): Ditto.
++	(_mm_mask_i64scatter_epi64): Ditto.
++	* config/i386/i386-builtin-types.def (V16SF_V16SF_PCFLOAT_V16SI_HI_INT)
++	(V8DF_V8DF_PCDOUBLE_V8SI_QI_INT, V8SF_V8SF_PCFLOAT_V8DI_QI_INT)
++	(V8DF_V8DF_PCDOUBLE_V8DI_QI_INT, V16SI_V16SI_PCINT_V16SI_HI_INT)
++	(V8DI_V8DI_PCINT64_V8SI_QI_INT, V8SI_V8SI_PCINT_V8DI_QI_INT)
++	(V8DI_V8DI_PCINT64_V8DI_QI_INT, V2DF_V2DF_PCDOUBLE_V4SI_QI_INT)
++	(V4DF_V4DF_PCDOUBLE_V4SI_QI_INT, V2DF_V2DF_PCDOUBLE_V2DI_QI_INT)
++	(V4DF_V4DF_PCDOUBLE_V4DI_QI_INT, V4SF_V4SF_PCFLOAT_V4SI_QI_INT)
++	(V8SF_V8SF_PCFLOAT_V8SI_QI_INT, V4SF_V4SF_PCFLOAT_V2DI_QI_INT)
++	(V4SF_V4SF_PCFLOAT_V4DI_QI_INT, V2DI_V2DI_PCINT64_V4SI_QI_INT)
++	(V4DI_V4DI_PCINT64_V4SI_QI_INT, V2DI_V2DI_PCINT64_V2DI_QI_INT)
++	(V4DI_V4DI_PCINT64_V4DI_QI_INT, V4SI_V4SI_PCINT_V4SI_QI_INT)
++	(V8SI_V8SI_PCINT_V8SI_QI_INT, V4SI_V4SI_PCINT_V2DI_QI_INT)
++	(V4SI_V4SI_PCINT_V4DI_QI_INT, VOID_PFLOAT_HI_V16SI_V16SF_INT)
++	(VOID_PFLOAT_QI_V8SI_V8SF_INT, VOID_PFLOAT_QI_V4SI_V4SF_INT)
++	(VOID_PDOUBLE_QI_V8SI_V8DF_INT, VOID_PDOUBLE_QI_V4SI_V4DF_INT)
++	(VOID_PDOUBLE_QI_V4SI_V2DF_INT, VOID_PFLOAT_QI_V8DI_V8SF_INT)
++	(VOID_PFLOAT_QI_V4DI_V4SF_INT, VOID_PFLOAT_QI_V2DI_V4SF_INT)
++	(VOID_PDOUBLE_QI_V8DI_V8DF_INT, VOID_PDOUBLE_QI_V4DI_V4DF_INT)
++	(VOID_PDOUBLE_QI_V2DI_V2DF_INT, VOID_PINT_HI_V16SI_V16SI_INT)
++	(VOID_PINT_QI_V8SI_V8SI_INT, VOID_PINT_QI_V4SI_V4SI_INT)
++	(VOID_PLONGLONG_QI_V8SI_V8DI_INT, VOID_PLONGLONG_QI_V4SI_V4DI_INT)
++	(VOID_PLONGLONG_QI_V4SI_V2DI_INT, VOID_PINT_QI_V8DI_V8SI_INT)
++	(VOID_PINT_QI_V4DI_V4SI_INT, VOID_PINT_QI_V2DI_V4SI_INT)
++	(VOID_PLONGLONG_QI_V8DI_V8DI_INT, VOID_QI_V8SI_PCINT64_INT_INT)
++	(VOID_PLONGLONG_QI_V4DI_V4DI_INT, VOID_PLONGLONG_QI_V2DI_V2DI_INT)
++	(VOID_HI_V16SI_PCINT_INT_INT, VOID_QI_V8DI_PCINT64_INT_INT)
++	(VOID_QI_V8DI_PCINT_INT_INT): Remove.
++	(V16SF_V16SF_PCVOID_V16SI_HI_INT,  V8DF_V8DF_PCVOID_V8SI_QI_INT)
++	(V8SF_V8SF_PCVOID_V8DI_QI_INT, V8DF_V8DF_PCVOID_V8DI_QI_INT)
++	(V16SI_V16SI_PCVOID_V16SI_HI_INT, V8DI_V8DI_PCVOID_V8SI_QI_INT)
++	(V8SI_V8SI_PCVOID_V8DI_QI_INT, V8DI_V8DI_PCVOID_V8DI_QI_INT)
++	(VOID_PVOID_HI_V16SI_V16SF_INT, VOID_PVOID_QI_V8SI_V8DF_INT)
++	(VOID_PVOID_QI_V8DI_V8SF_INT, VOID_PVOID_QI_V8DI_V8DF_INT)
++	(VOID_PVOID_HI_V16SI_V16SI_INT, VOID_PVOID_QI_V8SI_V8DI_INT)
++	(VOID_PVOID_QI_V8DI_V8SI_INT, VOID_PVOID_QI_V8DI_V8DI_INT)
++	(V2DF_V2DF_PCVOID_V4SI_QI_INT, V4DF_V4DF_PCVOID_V4SI_QI_INT)
++	(V2DF_V2DF_PCVOID_V2DI_QI_INT, V4DF_V4DF_PCVOID_V4DI_QI_INT
++	(V4SF_V4SF_PCVOID_V4SI_QI_INT, V8SF_V8SF_PCVOID_V8SI_QI_INT)
++	(V4SF_V4SF_PCVOID_V2DI_QI_INT, V4SF_V4SF_PCVOID_V4DI_QI_INT)
++	(V2DI_V2DI_PCVOID_V4SI_QI_INT, V4DI_V4DI_PCVOID_V4SI_QI_INT)
++	(V2DI_V2DI_PCVOID_V2DI_QI_INT, V4DI_V4DI_PCVOID_V4DI_QI_INT)
++	(V4SI_V4SI_PCVOID_V4SI_QI_INT, V8SI_V8SI_PCVOID_V8SI_QI_INT)
++	(V4SI_V4SI_PCVOID_V2DI_QI_INT, V4SI_V4SI_PCVOID_V4DI_QI_INT)
++	(VOID_PVOID_QI_V8SI_V8SF_INT, VOID_PVOID_QI_V4SI_V4SF_INT)
++	(VOID_PVOID_QI_V4SI_V4DF_INT, VOID_PVOID_QI_V4SI_V2DF_INT)
++	(VOID_PVOID_QI_V4DI_V4SF_INT, VOID_PVOID_QI_V2DI_V4SF_INT)
++	(VOID_PVOID_QI_V4DI_V4DF_INT, VOID_PVOID_QI_V2DI_V2DF_INT)
++	(VOID_PVOID_QI_V8SI_V8SI_INT, VOID_PVOID_QI_V4SI_V4SI_INT)
++	(VOID_PVOID_QI_V4SI_V4DI_INT, VOID_PVOID_QI_V4SI_V2DI_INT)
++	(VOID_PVOID_QI_V4DI_V4SI_INT, VOID_PVOID_QI_V2DI_V4SI_INT)
++	(VOID_PVOID_QI_V4DI_V4DI_INT, VOID_PVOID_QI_V2DI_V2DI_INT)
++	(VOID_QI_V8SI_PCVOID_INT_INT, VOID_HI_V16SI_PCVOID_INT_INT)
++	(VOID_QI_V8DI_PCVOID_INT_INT): Add.
++	* config/i386/i386.c (ix86_init_mmx_sse_builtins): Adjust builtin
++	definitions accordingly.
++
++2017-02-16  Jakub Jelinek  <jakub at redhat.com>
++
++	Backported from mainline
++	2017-02-09  Marek Polacek  <polacek at redhat.com>
++
++	PR c/79428
++	* c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
++	instead of c_parser_skip_until_found.
++
++2017-02-15  Jakub Jelinek  <jakub at redhat.com>
++
++	Backported from mainline
++	2017-02-10  Jakub Jelinek  <jakub at redhat.com>
++
++	PR tree-optimization/79411
++	* tree-ssa-reassoc.c (is_reassociable_op): Return false if
++	stmt operands are SSA_NAMEs used in abnormal phis.
++	(can_reassociate_p): Return false if op is SSA_NAME used in abnormal
++	phis.
++
++	2017-02-09  Jakub Jelinek  <jakub at redhat.com>
++
++	PR c/79431
++	* gimplify.c (gimplify_adjust_omp_clauses): Ignore
++	"omp declare target link" attribute unless is_global_var.
++	* omp-low.c (find_link_var_op): Likewise.
++
++	2017-02-07  Jakub Jelinek  <jakub at redhat.com>
++		    Richard Biener  <rguenther at suse.de>
++
++	PR middle-end/79399
++	* ira-int.h (struct target_ira_int): Change x_max_struct_costs_size
++	type from int to size_t.
++	* ira-costs.c (struct_costs_size): Change type from int to size_t.
++
++	2017-02-04  Jakub Jelinek  <jakub at redhat.com>
++
++	PR tree-optimization/79338
++	* tree-parloops.c (gather_scalar_reductions): Don't call
++	vect_analyze_loop_form for loop->inner before destroying loop's
++	loop_vinfo.
++
++	2017-02-02  Jakub Jelinek  <jakub at redhat.com>
++
++	PR target/79197
++	* config/rs6000/rs6000.md (*fixuns_trunc<mode>di2_fctiduz): Rename to ...
++	(fixuns_trunc<mode>di2): ... this, remove previous expander.  Put all
++	conditions on a single line.
++
++	2017-01-31  Jakub Jelinek  <jakub at redhat.com>
++
++	PR tree-optimization/79267
++	* value-prof.c (gimple_ic): Only drop lhs for noreturn calls
++	if should_remove_lhs_p is true.
++
++	2017-01-17  Kito Cheng  <kito.cheng at gmail.com>
++		    Kuan-Lin Chen  <kuanlinchentw at gmail.com>
++
++	PR target/79079
++	* internal-fn.c (expand_mul_overflow): Use convert_modes instead of
++	gen_lowpart.
++
++2017-02-14  Uros Bizjak  <ubizjak at gmail.com>
++
++	PR target/79495
++	* config/i386/i386.md (*movxf_internal): Add (o,rC) alternative.
++
++2017-02-14  Martin Liska  <mliska at suse.cz>
++
++	Backport from mainline
++	2017-02-13  Martin Liska  <mliska at suse.cz>
++
++	PR c/79471
++	* calls.c (expand_call): Replace XALLOCAVEC with XCNEWVEC.
++
 +2017-02-13  Gerald Pfeifer  <gerald at pfeifer.com>
 +
 +	Backport from mainline
@@ -2144,6 +4771,23 @@ Index: gcc/ChangeLog
  2016-12-21  Release Manager
  
  	* GCC 6.3.0 released.
+@@ -68,11 +778,11 @@
+ 	Backport from mainline
+ 	2016-11-07  Bernd Schmidt  <bschmidt at redhat.com>
+ 
+-        PR rtl-optimization/77309
+-        * combine.c (make_compound_operation): Allow EQ for IN_CODE, and
+-        don't assume an equality comparison for plain COMPARE.
+-        (simplify_comparison): Pass a more accurate code to
+-        make_compound_operation.
++	PR rtl-optimization/77309
++	* combine.c (make_compound_operation): Allow EQ for IN_CODE, and
++	don't assume an equality comparison for plain COMPARE.
++	(simplify_comparison): Pass a more accurate code to
++	make_compound_operation.
+ 
+ 2016-12-12 Thomas Preud'homme <thomas.preudhomme at arm.com>
+ 
 Index: gcc/testsuite/gcc.target/powerpc/vsx-elemrev-4.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.target/powerpc/vsx-elemrev-4.c	(.../tags/gcc_6_3_0_release)
@@ -2969,6 +5613,68 @@ Index: gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c
 +
 +/* { dg-final { scan-assembler-times "vpksdss"  1 } } */
 +/* { dg-final { scan-assembler-times "vpkudus"  1 } } */
+Index: gcc/testsuite/gcc.target/powerpc/pr79197.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/powerpc/pr79197.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/gcc.target/powerpc/pr79197.c	(.../branches/gcc-6-branch)
+@@ -0,0 +1,11 @@
++/* PR target/79197 */
++/* { dg-do compile } */
++/* { dg-options "-O0 -mno-popcntd" } */
++
++unsigned a;
++
++void
++foo (void)
++{
++  a = *(double *) (__UINTPTR_TYPE__) 0x400000;
++}
+Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-3.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-3.c	(.../branches/gcc-6-branch)
+@@ -35,6 +35,8 @@
+ /* { dg-final { scan-assembler "xvcmpgesp" } } */
+ /* { dg-final { scan-assembler "xxsldwi" } } */
+ /* { dg-final { scan-assembler-not "call" } } */
++/* { dg-final { scan-assembler "xvcvsxdsp" } } */
++/* { dg-final { scan-assembler "xvcvuxdsp" } } */
+ 
+ extern __vector int si[][4];
+ extern __vector short ss[][4];
+@@ -50,7 +52,9 @@
+ #ifdef __VSX__
+ extern __vector double d[][4];
+ extern __vector long sl[][4];
++extern __vector long long sll[][4];
+ extern __vector unsigned long ul[][4];
++extern __vector unsigned long long ull[][4];
+ extern __vector __bool long bl[][4];
+ #endif
+ 
+@@ -211,3 +215,22 @@
+   d[i][0] = __builtin_vsx_xxsldwi (d[i][1], d[i][2], 3); i++;
+   return i;
+ }
++
++int do_xvcvsxdsp (void)
++{
++  int i = 0;
++
++  f[i][0] = __builtin_vsx_xvcvsxdsp (sll[i][1]); i++;
++
++  return i;
++}
++
++int do_xvcvuxdsp (void)
++{
++  int i = 0;
++
++  f[i][0] = __builtin_vsx_xvcvuxdsp (ull[i][1]); i++;
++
++  return i;
++}
++
 Index: gcc/testsuite/gcc.target/powerpc/swaps-p8-26.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.target/powerpc/swaps-p8-26.c	(.../tags/gcc_6_3_0_release)
@@ -3308,6 +6014,43 @@ Index: gcc/testsuite/gcc.target/aarch64/eh_return.c
 +    exit (1);
 +  exit (0);
 +}
+Index: gcc/testsuite/gcc.target/i386/pr49095.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/pr49095.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/gcc.target/i386/pr49095.c	(.../branches/gcc-6-branch)
+@@ -1,7 +1,7 @@
+ /* PR rtl-optimization/49095 */
+ /* { dg-do compile } */
+-/* { dg-options "-Os" } */
+-/* { dg-options "-Os -mregparm=2" { target ia32 } } */
++/* { dg-options "-Os -fno-shrink-wrap" } */
++/* { dg-additional-options "-mregparm=2" { target ia32 } } */
+ 
+ void foo (void *);
+ 
+@@ -70,5 +70,4 @@
+ G (int)
+ G (long)
+ 
+-/* See PR61225 for the XFAIL.  */
+-/* { dg-final { scan-assembler-not "test\[lq\]" { xfail { ia32 } } } } */
++/* { dg-final { scan-assembler-not "test\[lq\]" } } */
+Index: gcc/testsuite/gcc.target/i386/pr79495.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/pr79495.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/gcc.target/i386/pr79495.c	(.../branches/gcc-6-branch)
+@@ -0,0 +1,11 @@
++/* PR target/79495 */
++/* { dg-do compile } */
++/* { dg-options "-O2 -msoft-float" } */
++
++long double dnan = 1.0l/0.0l - 1.0l/0.0l;
++long double x = 1.0l;
++void fn1 (void)
++{
++  if (dnan != x)
++    x = 1.0;
++}
 Index: gcc/testsuite/g++.old-deja/g++.abi/vtable2.C
 ===================================================================
 --- a/src/gcc/testsuite/g++.old-deja/g++.abi/vtable2.C	(.../tags/gcc_6_3_0_release)
@@ -3607,6 +6350,48 @@ Index: gcc/testsuite/gcc.c-torture/execute/pr78617.c
 +    __builtin_abort ();
 +  return 0;
 +}
+Index: gcc/testsuite/gcc.c-torture/compile/pr79197.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.c-torture/compile/pr79197.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/gcc.c-torture/compile/pr79197.c	(.../branches/gcc-6-branch)
+@@ -0,0 +1,10 @@
++/* PR target/79197 */
++
++unsigned long b;
++
++unsigned long
++foo (float *a, float *x)
++{
++  __builtin_memcpy (a, x, sizeof (float));
++  return *a;
++}
+Index: gcc/testsuite/gcc.c-torture/compile/pr79411.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.c-torture/compile/pr79411.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/gcc.c-torture/compile/pr79411.c	(.../branches/gcc-6-branch)
+@@ -0,0 +1,22 @@
++/* PR tree-optimization/79411 */
++
++typedef struct __jmp_buf_tag { char buf[1024]; } jmp_buf[1];
++extern int setjmp (jmp_buf);
++extern int bar (unsigned int *);
++extern jmp_buf *baz (void);
++struct C { int c1; unsigned int c2, c3, c4; };
++
++void
++foo (struct C *x, const int *y, unsigned int *z, unsigned int e, unsigned int g)
++{
++  unsigned int d = 0;
++  unsigned long f;
++  setjmp (*baz ());
++  f = 1 + d;
++  if ((x->c1 || x->c2) && g && (!e || d >= 8))
++    d = 16;
++  else
++    d = 8;
++  if ((!x->c3 && !x->c4 || *y == 0) && !e && bar (z))
++    *z = 1 + f;
++}
 Index: gcc/testsuite/gnat.dg/array28.adb
 ===================================================================
 --- a/src/gcc/testsuite/gnat.dg/array28.adb	(.../tags/gcc_6_3_0_release)
@@ -4033,7 +6818,70 @@ Index: gcc/testsuite/ChangeLog
 ===================================================================
 --- a/src/gcc/testsuite/ChangeLog	(.../tags/gcc_6_3_0_release)
 +++ b/src/gcc/testsuite/ChangeLog	(.../branches/gcc-6-branch)
-@@ -1,3 +1,319 @@
+@@ -1,3 +1,382 @@
++2017-01-17  Carl Love  <cel at us.ibm.com>
++
++	Backport from mainline commit r245460 on 2017-02-14
++
++	PR 79545
++	* gcc.target/powerpc/vsx-builtin-3.c: Add missing test case for the
++	xvcvsxdsp and xvcvuxdsp instructions.
++
++2017-02-16  Jakub Jelinek  <jakub at redhat.com>
++
++	Backported from mainline
++	2017-02-09  Marek Polacek  <polacek at redhat.com>
++
++	PR c/79428
++	* c-c++-common/cilk-plus/CK/pr79428-4.c: New test.
++	* c-c++-common/cilk-plus/CK/pr79428-7.c: New test.
++	* c-c++-common/gomp/pr79428-2.c: New test.
++	* c-c++-common/gomp/pr79428-5.c: New test.
++	* c-c++-common/gomp/pr79428-6.c: New test.
++	* c-c++-common/pr79428-3.c: New test.
++
++2017-02-15  Jakub Jelinek  <jakub at redhat.com>
++
++	Backported from mainline
++	2017-02-10  Jakub Jelinek  <jakub at redhat.com>
++
++	PR tree-optimization/79411
++	* gcc.c-torture/compile/pr79411.c: New test.
++
++	2017-02-09  Jakub Jelinek  <jakub at redhat.com>
++
++	PR c++/79429
++	* c-c++-common/gomp/pr79429.c: New test.
++	* g++.dg/gomp/pr79429.C: New test.
++
++	PR c/79431
++	* c-c++-common/gomp/pr79431.c: New test.
++
++	2017-02-06  Jakub Jelinek  <jakub at redhat.com>
++
++	PR c++/79377
++	* g++.dg/lookup/pr79377.C: New test.
++
++	2017-02-02  Jakub Jelinek  <jakub at redhat.com>
++
++	PR target/79197
++	* gcc.target/powerpc/pr79197.c: New test.
++	* gcc.c-torture/compile/pr79197.c: New test.
++
++	2017-01-31  Jakub Jelinek  <jakub at redhat.com>
++
++	PR tree-optimization/79267
++	* g++.dg/opt/pr79267.C: New test.
++
++2017-02-14  Uros Bizjak  <ubizjak at gmail.com>
++
++	PR target/79495
++	* gcc.target/i386/pr79495.c: New test.
++
++	PR middle-end/61225
++	* gcc.target/i386/pr49095.c: Add -fno-shrink-wrap to dg-options.
++	Use dg-additional-options for ia32 target.  Remove XFAIL.
++
 +2017-02-13  Nathan Sidwell  <nathan at acm.org>
 +
 +	PR c++/79296
@@ -4353,6 +7201,26 @@ Index: gcc/testsuite/ChangeLog
  2016-12-21  Release Manager
  
  	* GCC 6.3.0 released.
+@@ -46,8 +425,8 @@
+ 	Backport from mainline
+ 	2016-11-07  Bernd Schmidt  <bschmidt at redhat.com>
+ 
+-        PR rtl-optimization/77309
+-        * gcc.dg/torture/pr77309.c: New test.
++	PR rtl-optimization/77309
++	* gcc.dg/torture/pr77309.c: New test.
+ 
+ 2016-12-12 Thomas Preud'homme <thomas.preudhomme at arm.com>
+ 
+@@ -456,7 +835,7 @@
+ 	* g++.dg/torture/pr77822.C: New test.
+ 
+ 2016-11-20  Harald Anlauf  <anlauf at gmx.de>
+- 
++
+ 	PR fortran/69741
+ 	* gfortran.dg/forall_18.f90: New testcase.
+ 
 Index: gcc/testsuite/g++.dg/opt/call3.C
 ===================================================================
 --- a/src/gcc/testsuite/g++.dg/opt/call3.C	(.../tags/gcc_6_3_0_release)
@@ -4412,6 +7280,80 @@ Index: gcc/testsuite/g++.dg/opt/declone3.C
 +  bool m_fn1();
 +};
 +bool Item::m_fn1() {}
+Index: gcc/testsuite/g++.dg/opt/pr79267.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/opt/pr79267.C	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/g++.dg/opt/pr79267.C	(.../branches/gcc-6-branch)
+@@ -0,0 +1,69 @@
++// PR tree-optimization/79267
++// { dg-do compile }
++// { dg-options "-O3" }
++
++struct A { A (int); };
++struct B
++{
++  virtual void av () = 0;
++  void aw ();
++  void h () { av (); aw (); }
++};
++template <class T> struct G : B
++{
++  T ba;
++  G (int, T) : ba (0) {}
++  void av () { ba (0); }
++};
++struct I
++{
++  B *bc;
++  template <class j, class T> I (j, T) try { G<T> (0, 0); } catch (...) {}
++  ~I () { bc->h (); }
++};
++template <class M> struct C { typedef M *i; };
++template <class M> struct J
++{
++  J ();
++  template <class O, class T> J (O, T p2) : be (0, p2) {}
++  typename C<M>::i operator-> ();
++  I be;
++};
++struct H : A { H () : A (0) {} };
++struct D { J<int> d; void q (); };
++template <typename = int> class bs;
++int z;
++
++void
++foo (int p1, int *, int)
++{
++  if (p1 == 0)
++    throw H ();
++}
++
++D bar ();
++template <typename T> struct L
++{
++  struct K { K (int); void operator() (int *) { bar ().q (); } };
++  static J<T> bp () { bq (0); }
++  template <typename br> static void bq (br) { J<T> (0, K (0)); }
++};
++struct F
++{
++  virtual J<int> x (int) { foo (0, 0, 0); J<bs<> > (L<bs<> >::bp ()); }
++};
++
++void
++baz ()
++{
++  if (z)
++    {
++      J<F> d, e;
++      d->x (0);
++      e->x (0);
++    }
++  J<F> v, i, j;
++  v->x (0);
++  i->x (0);
++  j->x (0);
++}
 Index: gcc/testsuite/g++.dg/opt/call2.C
 ===================================================================
 --- a/src/gcc/testsuite/g++.dg/opt/call2.C	(.../tags/gcc_6_3_0_release)
@@ -4764,6 +7706,55 @@ Index: gcc/testsuite/g++.dg/vect/pr36648.cc
 +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { { { ! vect_no_align } && { ! powerpc*-*-* } } || { powerpc*-*-* && vect_hw_misalign } } } } } */
  
 +
+Index: gcc/testsuite/g++.dg/lookup/pr79377.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/lookup/pr79377.C	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/g++.dg/lookup/pr79377.C	(.../branches/gcc-6-branch)
+@@ -0,0 +1,36 @@
++// PR c++/79377
++// { dg-do run }
++// { dg-options "-fpermissive" }
++
++struct A
++{
++  A () : a (0) {}
++  A& operator++ () { ++a; ++c; return *this; }
++  int a;
++  static int c;
++};
++
++int A::c = 0;
++
++template <typename>
++void
++foo (A& a)
++{
++  a++;		// { dg-warning "trying prefix operator instead" }
++  if (A::c != 3 || a.a != 3) __builtin_abort ();
++  ++a;
++  if (A::c != 4 || a.a != 4) __builtin_abort ();
++}
++
++int
++main ()
++{
++  A a;
++  if (A::c != 0 || a.a != 0) __builtin_abort ();
++  ++a;
++  if (A::c != 1 || a.a != 1) __builtin_abort ();
++  a++;		// { dg-warning "trying prefix operator instead" }
++  if (A::c != 2 || a.a != 2) __builtin_abort ();
++  foo<int> (a);
++  if (A::c != 4 || a.a != 4) __builtin_abort ();
++}
+Index: gcc/testsuite/g++.dg/gomp/pr79429.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/gomp/pr79429.C	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/g++.dg/gomp/pr79429.C	(.../branches/gcc-6-branch)
+@@ -0,0 +1,3 @@
++// PR c++/79429
++
++#pragma omp ordered // { dg-error "expected declaration specifiers" }
 Index: gcc/testsuite/g++.dg/template/bitfield3.C
 ===================================================================
 --- a/src/gcc/testsuite/g++.dg/template/bitfield3.C	(.../tags/gcc_6_3_0_release)
@@ -4789,6 +7780,22 @@ Index: gcc/testsuite/g++.dg/template/bitfield3.C
 +  if ((b << d) != 123)
 +    __builtin_abort ();
 +}
+Index: gcc/testsuite/c-c++-common/cilk-plus/CK/pr79428-4.c
+===================================================================
+--- a/src/gcc/testsuite/c-c++-common/cilk-plus/CK/pr79428-4.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/c-c++-common/cilk-plus/CK/pr79428-4.c	(.../branches/gcc-6-branch)
+@@ -0,0 +1,3 @@
++/* PR c/79428 */
++/* { dg-options "-fcilkplus" } */
++#pragma cilk grainsize /* { dg-error "must be inside a function" } */
+Index: gcc/testsuite/c-c++-common/cilk-plus/CK/pr79428-7.c
+===================================================================
+--- a/src/gcc/testsuite/c-c++-common/cilk-plus/CK/pr79428-7.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/c-c++-common/cilk-plus/CK/pr79428-7.c	(.../branches/gcc-6-branch)
+@@ -0,0 +1,3 @@
++/* PR c/79428 */
++/* { dg-options "-fcilkplus" } */
++#pragma simd /* { dg-error "must be inside a function" } */
 Index: gcc/testsuite/c-c++-common/Wunused-var-16.c
 ===================================================================
 --- a/src/gcc/testsuite/c-c++-common/Wunused-var-16.c	(.../tags/gcc_6_3_0_release)
@@ -4809,6 +7816,63 @@ Index: gcc/testsuite/c-c++-common/Wunused-var-16.c
 +  y &= ~x;
 +  v = y;
 +}
+Index: gcc/testsuite/c-c++-common/pr79428-3.c
+===================================================================
+--- a/src/gcc/testsuite/c-c++-common/pr79428-3.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/c-c++-common/pr79428-3.c	(.../branches/gcc-6-branch)
+@@ -0,0 +1,3 @@
++/* PR c/79428 */
++int i;
++#pragma GCC pch_preprocess /* { dg-error "'#pragma GCC pch_preprocess' must be first" } */
+Index: gcc/testsuite/c-c++-common/gomp/pr79428-5.c
+===================================================================
+--- a/src/gcc/testsuite/c-c++-common/gomp/pr79428-5.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/c-c++-common/gomp/pr79428-5.c	(.../branches/gcc-6-branch)
+@@ -0,0 +1,3 @@
++/* PR c/79428 */
++/* { dg-options "-fopenmp" } */
++#pragma omp ordered /* { dg-error "expected declaration specifiers before end of line" } */
+Index: gcc/testsuite/c-c++-common/gomp/pr79431.c
+===================================================================
+--- a/src/gcc/testsuite/c-c++-common/gomp/pr79431.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/c-c++-common/gomp/pr79431.c	(.../branches/gcc-6-branch)
+@@ -0,0 +1,8 @@
++/* PR c/79431 */
++
++void
++foo (void)
++{
++  int a;
++  #pragma omp declare target (a)
++}
+Index: gcc/testsuite/c-c++-common/gomp/pr79428-2.c
+===================================================================
+--- a/src/gcc/testsuite/c-c++-common/gomp/pr79428-2.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/c-c++-common/gomp/pr79428-2.c	(.../branches/gcc-6-branch)
+@@ -0,0 +1,7 @@
++/* PR c/79428 */
++/* { dg-options "-fopenmp" } */
++void
++foo ()
++{
++#pragma omp sections
++#pragma omp section /* { dg-error "'#pragma omp section' may only be used in '#pragma omp sections' construct|not allowed|expected" } */
+Index: gcc/testsuite/c-c++-common/gomp/pr79429.c
+===================================================================
+--- a/src/gcc/testsuite/c-c++-common/gomp/pr79429.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/c-c++-common/gomp/pr79429.c	(.../branches/gcc-6-branch)
+@@ -0,0 +1,3 @@
++/* PR c++/79429 */
++
++#pragma omp target /* { dg-error "expected declaration specifiers" } */
+Index: gcc/testsuite/c-c++-common/gomp/pr79428-6.c
+===================================================================
+--- a/src/gcc/testsuite/c-c++-common/gomp/pr79428-6.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/testsuite/c-c++-common/gomp/pr79428-6.c	(.../branches/gcc-6-branch)
+@@ -0,0 +1,3 @@
++/* PR c/79428 */
++/* { dg-options "-fopenmp" } */
++#pragma omp target /* { dg-error "expected declaration specifiers before end of line" } */
 Index: gcc/cp/typeck.c
 ===================================================================
 --- a/src/gcc/cp/typeck.c	(.../tags/gcc_6_3_0_release)
@@ -4859,7 +7923,20 @@ Index: gcc/cp/tree.c
    TREE_SIDE_EFFECTS (t) = TREE_SIDE_EFFECTS (non_dep);
  
    for (i = 0; i < length; i++)
-@@ -4146,6 +4146,14 @@
+@@ -2830,8 +2830,10 @@
+   nargs = call_expr_nargs (non_dep);
+ 
+   expected_nargs = cp_tree_code_length (op);
+-  if (op == POSTINCREMENT_EXPR
+-      || op == POSTDECREMENT_EXPR)
++  if ((op == POSTINCREMENT_EXPR
++       || op == POSTDECREMENT_EXPR)
++      /* With -fpermissive non_dep could be operator++().  */
++      && (!flag_permissive || nargs != expected_nargs))
+     expected_nargs += 1;
+   gcc_assert (nargs == expected_nargs);
+ 
+@@ -4146,6 +4148,14 @@
    if (TREE_PUBLIC (decl))
      return lk_external;
  
@@ -4878,7 +7955,31 @@ Index: gcc/cp/ChangeLog
 ===================================================================
 --- a/src/gcc/cp/ChangeLog	(.../tags/gcc_6_3_0_release)
 +++ b/src/gcc/cp/ChangeLog	(.../branches/gcc-6-branch)
-@@ -1,3 +1,64 @@
+@@ -1,3 +1,88 @@
++2017-02-15  Jakub Jelinek  <jakub at redhat.com>
++
++	Backported from mainline
++	2017-02-09  Jakub Jelinek  <jakub at redhat.com>
++
++	PR c++/79429
++	* parser.c (cp_parser_omp_ordered): Don't check for non-pragma_stmt
++	non-pragma_compound context here.
++	(cp_parser_omp_target): Likewise.
++	(cp_parser_pragma): Don't call push_omp_privatization_clauses and
++	parsing for ordered and target omp pragmas in non-pragma_stmt
++	non-pragma_compound contexts.
++
++	PR c/79431
++	* parser.c (cp_parser_oacc_declare): Formatting fix.
++	(cp_parser_omp_declare_target): Don't invoke symtab_node::get on
++	automatic variables.
++
++	2017-02-06  Jakub Jelinek  <jakub at redhat.com>
++
++	PR c++/79377
++	* tree.c (build_min_non_dep_op_overload): For POST{INC,DEC}REMENT_EXPR
++	allow one fewer than expected arguments if flag_permissive.
++
 +2017-02-13  Nathan Sidwell  <nathan at acm.org>
 +
 +	PR c++/79296 - ICE mangling localized template instantiation
@@ -5090,6 +8191,74 @@ Index: gcc/cp/parser.c
  	  if (alignas_expr == error_mark_node)
  	    cp_parser_skip_to_end_of_statement (parser);
  	  if (alignas_expr == NULL_TREE
+@@ -34060,13 +34058,6 @@
+ {
+   location_t loc = pragma_tok->location;
+ 
+-  if (context != pragma_stmt && context != pragma_compound)
+-    {
+-      cp_parser_error (parser, "expected declaration specifiers");
+-      cp_parser_skip_to_pragma_eol (parser, pragma_tok);
+-      return false;
+-    }
+-
+   if (cp_lexer_next_token_is (parser->lexer, CPP_NAME))
+     {
+       tree id = cp_lexer_peek_token (parser->lexer)->u.value;
+@@ -34959,13 +34950,6 @@
+ {
+   tree *pc = NULL, stmt;
+ 
+-  if (context != pragma_stmt && context != pragma_compound)
+-    {
+-      cp_parser_error (parser, "expected declaration specifiers");
+-      cp_parser_skip_to_pragma_eol (parser, pragma_tok);
+-      return false;
+-    }
+-
+   if (cp_lexer_next_token_is (parser->lexer, CPP_NAME))
+     {
+       tree id = cp_lexer_peek_token (parser->lexer)->u.value;
+@@ -35347,7 +35331,7 @@
+ 	    id = get_identifier ("omp declare target");
+ 
+ 	  DECL_ATTRIBUTES (decl)
+-			   = tree_cons (id, NULL_TREE, DECL_ATTRIBUTES (decl));
++	    = tree_cons (id, NULL_TREE, DECL_ATTRIBUTES (decl));
+ 	  if (global_bindings_p ())
+ 	    {
+ 	      symtab_node *node = symtab_node::get (decl);
+@@ -35887,8 +35871,11 @@
+ 	}
+       if (!at1)
+ 	{
++	  DECL_ATTRIBUTES (t) = tree_cons (id, NULL_TREE, DECL_ATTRIBUTES (t));
++	  if (TREE_CODE (t) != FUNCTION_DECL && !is_global_var (t))
++	    continue;
++
+ 	  symtab_node *node = symtab_node::get (t);
+-	  DECL_ATTRIBUTES (t) = tree_cons (id, NULL_TREE, DECL_ATTRIBUTES (t));
+ 	  if (node != NULL)
+ 	    {
+ 	      node->offloadable = 1;
+@@ -37404,6 +37391,8 @@
+       return true;
+ 
+     case PRAGMA_OMP_ORDERED:
++      if (context != pragma_stmt && context != pragma_compound)
++	goto bad_stmt;
+       stmt = push_omp_privatization_clauses (false);
+       ret = cp_parser_omp_ordered (parser, pragma_tok, context, if_p);
+       pop_omp_privatization_clauses (stmt);
+@@ -37410,6 +37399,8 @@
+       return ret;
+ 
+     case PRAGMA_OMP_TARGET:
++      if (context != pragma_stmt && context != pragma_compound)
++	goto bad_stmt;
+       stmt = push_omp_privatization_clauses (false);
+       ret = cp_parser_omp_target (parser, pragma_tok, context, if_p);
+       pop_omp_privatization_clauses (stmt);
 Index: gcc/cp/name-lookup.c
 ===================================================================
 --- a/src/gcc/cp/name-lookup.c	(.../tags/gcc_6_3_0_release)
@@ -5166,6 +8335,19 @@ Index: gcc/ipa-pure-const.c
    return false;
  }
  
+Index: gcc/ira-int.h
+===================================================================
+--- a/src/gcc/ira-int.h	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/ira-int.h	(.../branches/gcc-6-branch)
+@@ -782,7 +782,7 @@
+ 
+   /* Initialized once.  It is a maximal possible size of the allocated
+      struct costs.  */
+-  int x_max_struct_costs_size;
++  size_t x_max_struct_costs_size;
+ 
+   /* Allocated and initialized once, and used to initialize cost values
+      for each insn.  */
 Index: gcc/dwarf2out.c
 ===================================================================
 --- a/src/gcc/dwarf2out.c	(.../tags/gcc_6_3_0_release)
@@ -5833,6 +9015,108 @@ Index: gcc/go/gofrontend/expressions.cc
  
    if (is_comparison)
      {
+Index: gcc/tree-parloops.c
+===================================================================
+--- a/src/gcc/tree-parloops.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/tree-parloops.c	(.../branches/gcc-6-branch)
+@@ -2511,8 +2511,8 @@
+ {
+   gphi_iterator gsi;
+   loop_vec_info simple_loop_info;
+-  loop_vec_info simple_inner_loop_info = NULL;
+-  bool allow_double_reduc = true;
++  auto_vec<gphi *, 4> double_reduc_phis;
++  auto_vec<gimple *, 4> double_reduc_stmts;
+ 
+   if (!stmt_vec_info_vec.exists ())
+     init_stmt_vec_info_vec ();
+@@ -2542,44 +2542,56 @@
+ 
+       if (double_reduc)
+ 	{
+-	  if (!allow_double_reduc
+-	      || loop->inner->inner != NULL)
++	  if (loop->inner->inner != NULL)
+ 	    continue;
+ 
+-	  if (!simple_inner_loop_info)
+-	    {
+-	      simple_inner_loop_info = vect_analyze_loop_form (loop->inner);
+-	      if (!simple_inner_loop_info)
+-		{
+-		  allow_double_reduc = false;
+-		  continue;
+-		}
+-	    }
+-
+-	  use_operand_p use_p;
+-	  gimple *inner_stmt;
+-	  bool single_use_p = single_imm_use (res, &use_p, &inner_stmt);
+-	  gcc_assert (single_use_p);
+-	  if (gimple_code (inner_stmt) != GIMPLE_PHI)
+-	    continue;
+-	  gphi *inner_phi = as_a <gphi *> (inner_stmt);
+-	  if (simple_iv (loop->inner, loop->inner, PHI_RESULT (inner_phi),
+-			 &iv, true))
+-	    continue;
+-
+-	  gimple *inner_reduc_stmt
+-	    = vect_force_simple_reduction (simple_inner_loop_info, inner_phi,
+-					   true, &double_reduc, true);
+-	  gcc_assert (!double_reduc);
+-	  if (inner_reduc_stmt == NULL)
+-	    continue;
++	  double_reduc_phis.safe_push (phi);
++	  double_reduc_stmts.safe_push (reduc_stmt);
++	  continue;
+ 	}
+ 
+       build_new_reduction (reduction_list, reduc_stmt, phi);
+     }
+   destroy_loop_vec_info (simple_loop_info, true);
+-  destroy_loop_vec_info (simple_inner_loop_info, true);
+ 
++  if (!double_reduc_phis.is_empty ())
++    {
++      simple_loop_info = vect_analyze_loop_form (loop->inner);
++      if (simple_loop_info)
++	{
++	  gphi *phi;
++	  unsigned int i;
++
++	  FOR_EACH_VEC_ELT (double_reduc_phis, i, phi)
++	    {
++	      affine_iv iv;
++	      tree res = PHI_RESULT (phi);
++	      bool double_reduc;
++
++	      use_operand_p use_p;
++	      gimple *inner_stmt;
++	      bool single_use_p = single_imm_use (res, &use_p, &inner_stmt);
++	      gcc_assert (single_use_p);
++	      if (gimple_code (inner_stmt) != GIMPLE_PHI)
++		continue;
++	      gphi *inner_phi = as_a <gphi *> (inner_stmt);
++	      if (simple_iv (loop->inner, loop->inner, PHI_RESULT (inner_phi),
++			     &iv, true))
++		continue;
++
++	      gimple *inner_reduc_stmt
++		= vect_force_simple_reduction (simple_loop_info, inner_phi,
++					       true, &double_reduc, true);
++	      gcc_assert (!double_reduc);
++	      if (inner_reduc_stmt == NULL)
++		continue;
++
++	      build_new_reduction (reduction_list, double_reduc_stmts[i], phi);
++	    }
++	  destroy_loop_vec_info (simple_loop_info, true);
++	}
++    }
++
+  gather_done:
+   /* Release the claim on gimple_uid.  */
+   free_stmt_vec_info_vec ();
 Index: gcc/ada/ChangeLog
 ===================================================================
 --- a/src/gcc/ada/ChangeLog	(.../tags/gcc_6_3_0_release)
@@ -6208,6 +9492,22 @@ Index: gcc/tree-data-ref.c
        A[index][0] = mult * int_cst_value (CHREC_RIGHT (chrec));
        return initialize_matrix_A (A, CHREC_LEFT (chrec), index + 1, mult);
  
+Index: gcc/gimplify.c
+===================================================================
+--- a/src/gcc/gimplify.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/gimplify.c	(.../branches/gcc-6-branch)
+@@ -8136,8 +8136,9 @@
+ 	  if ((ctx->region_type & ORT_TARGET) != 0
+ 	      && !(n->value & GOVD_SEEN)
+ 	      && GOMP_MAP_ALWAYS_P (OMP_CLAUSE_MAP_KIND (c)) == 0
+-	      && !lookup_attribute ("omp declare target link",
+-				    DECL_ATTRIBUTES (decl)))
++	      && (!is_global_var (decl)
++		  || !lookup_attribute ("omp declare target link",
++					DECL_ATTRIBUTES (decl))))
+ 	    {
+ 	      remove = true;
+ 	      /* For struct element mapping, if struct is never referenced
 Index: gcc/graphite-scop-detection.c
 ===================================================================
 --- a/src/gcc/graphite-scop-detection.c	(.../tags/gcc_6_3_0_release)
@@ -6241,6 +9541,28 @@ Index: gcc/graphite-scop-detection.c
      && graphite_can_represent_expr (scop, loop, niter);
  }
  
+Index: gcc/calls.c
+===================================================================
+--- a/src/gcc/calls.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/calls.c	(.../branches/gcc-6-branch)
+@@ -2695,8 +2695,7 @@
+     n_named_args = num_actuals;
+ 
+   /* Make a vector to hold all the information about each arg.  */
+-  args = XALLOCAVEC (struct arg_data, num_actuals);
+-  memset (args, 0, num_actuals * sizeof (struct arg_data));
++  args = XCNEWVEC (struct arg_data, num_actuals);
+ 
+   /* Build up entries in the ARGS array, compute the size of the
+      arguments into ARGS_SIZE, etc.  */
+@@ -3710,6 +3709,7 @@
+   currently_expanding_call--;
+ 
+   free (stack_usage_map_buf);
++  free (args);
+ 
+   /* Join result with returned bounds so caller may use them if needed.  */
+   target = chkp_join_splitted_slot (target, valbnd);
 Index: gcc/ubsan.c
 ===================================================================
 --- a/src/gcc/ubsan.c	(.../tags/gcc_6_3_0_release)
@@ -47710,6 +51032,19 @@ Index: gcc/varasm.c
    /* We cannot share RTX'es in pool entries.
       Mark this piece of RTL as required for unsharing.  */
    RTX_FLAG (rtl, used) = 1;
+Index: gcc/ira-costs.c
+===================================================================
+--- a/src/gcc/ira-costs.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/ira-costs.c	(.../branches/gcc-6-branch)
+@@ -73,7 +73,7 @@
+ static struct costs *total_allocno_costs;
+ 
+ /* It is the current size of struct costs.  */
+-static int struct_costs_size;
++static size_t struct_costs_size;
+ 
+ /* Return pointer to structure containing costs of allocno or pseudo
+    with given NUM in array ARR.  */
 Index: gcc/graphite-sese-to-poly.c
 ===================================================================
 --- a/src/gcc/graphite-sese-to-poly.c	(.../tags/gcc_6_3_0_release)
@@ -47800,6 +51135,39 @@ Index: gcc/config.host
      case ${target} in
        aarch64*-*-*)
  	host_extra_gcc_objs="driver-aarch64.o"
+Index: gcc/tree-ssa-reassoc.c
+===================================================================
+--- a/src/gcc/tree-ssa-reassoc.c	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/tree-ssa-reassoc.c	(.../branches/gcc-6-branch)
+@@ -599,7 +599,18 @@
+   if (is_gimple_assign (stmt)
+       && gimple_assign_rhs_code (stmt) == code
+       && has_single_use (gimple_assign_lhs (stmt)))
+-    return true;
++    {
++      tree rhs1 = gimple_assign_rhs1 (stmt);
++      tree rhs2 = gimple_assign_rhs1 (stmt);
++      if (TREE_CODE (rhs1) == SSA_NAME
++	  && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs1))
++	return false;
++      if (rhs2
++	  && TREE_CODE (rhs2) == SSA_NAME
++	  && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs2))
++	return false;
++      return true;
++    }
+ 
+   return false;
+ }
+@@ -4466,6 +4477,8 @@
+ can_reassociate_p (tree op)
+ {
+   tree type = TREE_TYPE (op);
++  if (TREE_CODE (op) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op))
++    return false;
+   if ((ANY_INTEGRAL_TYPE_P (type) && TYPE_OVERFLOW_WRAPS (type))
+       || NON_SAT_FIXED_POINT_TYPE_P (type)
+       || (flag_associative_math && FLOAT_TYPE_P (type)))
 Index: gcc/config/nvptx/nvptx.c
 ===================================================================
 --- a/src/gcc/config/nvptx/nvptx.c	(.../tags/gcc_6_3_0_release)
@@ -47869,6 +51237,251 @@ Index: gcc/config/i386/stringop.opt
 -
 -#undef DEF_ENUM
 -#undef DEF_ALG
+Index: gcc/config/i386/i386.md
+===================================================================
+--- a/src/gcc/config/i386/i386.md	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/config/i386/i386.md	(.../branches/gcc-6-branch)
+@@ -3172,9 +3172,9 @@
+ ;; in alternatives 4, 6, 7 and 8.
+ (define_insn "*movxf_internal"
+   [(set (match_operand:XF 0 "nonimmediate_operand"
+-	 "=f,m,f,?r ,!o,?*r ,!o,!o,!o,r  ,o")
++	 "=f,m,f,?r ,!o,?*r ,!o,!o,!o,r  ,o ,o")
+ 	(match_operand:XF 1 "general_operand"
+-	 "fm,f,G,roF,r , *roF,*r,F ,C,roF,rF"))]
++	 "fm,f,G,roF,r ,*roF,*r,F ,C ,roF,rF,rC"))]
+   "!(MEM_P (operands[0]) && MEM_P (operands[1]))
+    && (lra_in_progress || reload_completed
+        || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
+@@ -3201,19 +3201,19 @@
+     }
+ }
+   [(set (attr "isa")
+-	(cond [(eq_attr "alternative" "7")
++	(cond [(eq_attr "alternative" "7,10")
+ 		 (const_string "nox64")
+-	       (eq_attr "alternative" "8")
++	       (eq_attr "alternative" "8,11")
+ 		 (const_string "x64")
+ 	      ]
+ 	      (const_string "*")))
+    (set (attr "type")
+-	(cond [(eq_attr "alternative" "3,4,5,6,7,8,9,10")
++	(cond [(eq_attr "alternative" "3,4,5,6,7,8,9,10,11")
+ 		 (const_string "multi")
+ 	      ]
+ 	      (const_string "fmov")))
+    (set (attr "mode")
+-	(cond [(eq_attr "alternative" "3,4,5,6,7,8,9,10")
++	(cond [(eq_attr "alternative" "3,4,5,6,7,8,9,10,11")
+ 		 (if_then_else (match_test "TARGET_64BIT")
+ 		   (const_string "DI")
+ 		   (const_string "SI"))
+@@ -3224,7 +3224,7 @@
+               (symbol_ref "false")]
+            (symbol_ref "true")))
+    (set (attr "enabled")
+-     (cond [(eq_attr "alternative" "9,10")
++     (cond [(eq_attr "alternative" "9,10,11")
+               (if_then_else
+ 		(match_test "TARGET_HARD_XF_REGS")
+ 		(symbol_ref "false")
+Index: gcc/config/i386/avx512pfintrin.h
+===================================================================
+--- a/src/gcc/config/i386/avx512pfintrin.h	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/config/i386/avx512pfintrin.h	(.../branches/gcc-6-branch)
+@@ -49,37 +49,33 @@
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm512_mask_prefetch_i32gather_pd (__m256i index, __mmask8 mask,
+-				   void *addr, int scale, int hint)
++				   void const *addr, int scale, int hint)
+ {
+-  __builtin_ia32_gatherpfdpd (mask, (__v8si) index, (long long const *) addr,
+-			      scale, hint);
++  __builtin_ia32_gatherpfdpd (mask, (__v8si) index, addr, scale, hint);
+ }
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm512_mask_prefetch_i32gather_ps (__m512i index, __mmask16 mask,
+-				   void *addr, int scale, int hint)
++				   void const *addr, int scale, int hint)
+ {
+-  __builtin_ia32_gatherpfdps (mask, (__v16si) index, (int const *) addr,
+-			      scale, hint);
++  __builtin_ia32_gatherpfdps (mask, (__v16si) index, addr, scale, hint);
+ }
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm512_mask_prefetch_i64gather_pd (__m512i index, __mmask8 mask,
+-				   void *addr, int scale, int hint)
++				   void const *addr, int scale, int hint)
+ {
+-  __builtin_ia32_gatherpfqpd (mask, (__v8di) index, (long long const *) addr,
+-			      scale, hint);
++  __builtin_ia32_gatherpfqpd (mask, (__v8di) index, addr, scale, hint);
+ }
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm512_mask_prefetch_i64gather_ps (__m512i index, __mmask8 mask,
+-				   void *addr, int scale, int hint)
++				   void const *addr, int scale, int hint)
+ {
+-  __builtin_ia32_gatherpfqps (mask, (__v8di) index, (int const *) addr,
+-			      scale, hint);
++  __builtin_ia32_gatherpfqps (mask, (__v8di) index, addr, scale, hint);
+ }
+ 
+ extern __inline void
+@@ -87,8 +83,8 @@
+ _mm512_prefetch_i32scatter_pd (void *addr, __m256i index, int scale,
+ 			       int hint)
+ {
+-  __builtin_ia32_scatterpfdpd ((__mmask8) 0xFF, (__v8si) index, 
+-			       (long long const *)addr, scale, hint);
++  __builtin_ia32_scatterpfdpd ((__mmask8) 0xFF, (__v8si) index, addr, scale,
++			       hint);
+ }
+ 
+ extern __inline void
+@@ -96,8 +92,8 @@
+ _mm512_prefetch_i32scatter_ps (void *addr, __m512i index, int scale,
+ 			       int hint)
+ {
+-  __builtin_ia32_scatterpfdps ((__mmask16) 0xFFFF, (__v16si) index, (int const *) addr,
+-			       scale, hint);
++  __builtin_ia32_scatterpfdps ((__mmask16) 0xFFFF, (__v16si) index, addr, scale,
++			       hint);
+ }
+ 
+ extern __inline void
+@@ -105,8 +101,7 @@
+ _mm512_mask_prefetch_i32scatter_pd (void *addr, __mmask8 mask,
+ 				    __m256i index, int scale, int hint)
+ {
+-  __builtin_ia32_scatterpfdpd (mask, (__v8si) index, (long long const *) addr,
+-			       scale, hint);
++  __builtin_ia32_scatterpfdpd (mask, (__v8si) index, addr, scale, hint);
+ }
+ 
+ extern __inline void
+@@ -114,8 +109,7 @@
+ _mm512_mask_prefetch_i32scatter_ps (void *addr, __mmask16 mask,
+ 				    __m512i index, int scale, int hint)
+ {
+-  __builtin_ia32_scatterpfdps (mask, (__v16si) index, (int const *) addr,
+-			       scale, hint);
++  __builtin_ia32_scatterpfdps (mask, (__v16si) index, addr, scale, hint);
+ }
+ 
+ extern __inline void
+@@ -123,8 +117,8 @@
+ _mm512_prefetch_i64scatter_pd (void *addr, __m512i index, int scale,
+ 			       int hint)
+ {
+-  __builtin_ia32_scatterpfqpd ((__mmask8) 0xFF, (__v8di) index, (long long const *) addr,
+-			       scale, hint);
++  __builtin_ia32_scatterpfqpd ((__mmask8) 0xFF, (__v8di) index, addr, scale,
++			       hint);
+ }
+ 
+ extern __inline void
+@@ -132,8 +126,8 @@
+ _mm512_prefetch_i64scatter_ps (void *addr, __m512i index, int scale,
+ 			       int hint)
+ {
+-  __builtin_ia32_scatterpfqps ((__mmask8) 0xFF, (__v8di) index, (int const *) addr,
+-			       scale, hint);
++  __builtin_ia32_scatterpfqps ((__mmask8) 0xFF, (__v8di) index, addr, scale,
++			       hint);
+ }
+ 
+ extern __inline void
+@@ -141,8 +135,7 @@
+ _mm512_mask_prefetch_i64scatter_pd (void *addr, __mmask16 mask,
+ 				    __m512i index, int scale, int hint)
+ {
+-  __builtin_ia32_scatterpfqpd (mask, (__v8di) index, (long long const *) addr,
+-			       scale, hint);
++  __builtin_ia32_scatterpfqpd (mask, (__v8di) index, addr, scale, hint);
+ }
+ 
+ extern __inline void
+@@ -150,58 +143,57 @@
+ _mm512_mask_prefetch_i64scatter_ps (void *addr, __mmask16 mask,
+ 				    __m512i index, int scale, int hint)
+ {
+-  __builtin_ia32_scatterpfqps (mask, (__v8di) index, (int const *) addr,
+-			       scale, hint);
++  __builtin_ia32_scatterpfqps (mask, (__v8di) index, addr, scale, hint);
+ }
+ 
+ #else
+ #define _mm512_mask_prefetch_i32gather_pd(INDEX, MASK, ADDR, SCALE, HINT)    \
+   __builtin_ia32_gatherpfdpd ((__mmask8)MASK, (__v8si)(__m256i)INDEX,	     \
+-			      (long long const *)ADDR, (int)SCALE, (int)HINT)
++			      (void const *)ADDR, (int)SCALE, (int)HINT)
+ 
+ #define _mm512_mask_prefetch_i32gather_ps(INDEX, MASK, ADDR, SCALE, HINT)    \
+   __builtin_ia32_gatherpfdps ((__mmask16)MASK, (__v16si)(__m512i)INDEX,      \
+-			      (int const *)ADDR, (int)SCALE, (int)HINT)
++			      (void const *)ADDR, (int)SCALE, (int)HINT)
+ 
+ #define _mm512_mask_prefetch_i64gather_pd(INDEX, MASK, ADDR, SCALE, HINT)    \
+   __builtin_ia32_gatherpfqpd ((__mmask8)MASK, (__v8di)(__m512i)INDEX,	     \
+-			      (long long const *)ADDR, (int)SCALE, (int)HINT)
++			      (void *)ADDR, (int)SCALE, (int)HINT)
+ 
+ #define _mm512_mask_prefetch_i64gather_ps(INDEX, MASK, ADDR, SCALE, HINT)    \
+   __builtin_ia32_gatherpfqps ((__mmask8)MASK, (__v8di)(__m512i)INDEX,	     \
+-			      (int const *)ADDR, (int)SCALE, (int)HINT)
++			      (void *)ADDR, (int)SCALE, (int)HINT)
+ 
+ #define _mm512_prefetch_i32scatter_pd(ADDR, INDEX, SCALE, HINT)              \
+   __builtin_ia32_scatterpfdpd ((__mmask8)0xFF, (__v8si)(__m256i)INDEX,       \
+-			       (long long const *)ADDR, (int)SCALE, (int)HINT)
++			       (void *)ADDR, (int)SCALE, (int)HINT)
+ 
+ #define _mm512_prefetch_i32scatter_ps(ADDR, INDEX, SCALE, HINT)              \
+   __builtin_ia32_scatterpfdps ((__mmask16)0xFFFF, (__v16si)(__m512i)INDEX,   \
+-			       (int const *)ADDR, (int)SCALE, (int)HINT)
++			       (void *)ADDR, (int)SCALE, (int)HINT)
+ 
+ #define _mm512_mask_prefetch_i32scatter_pd(ADDR, MASK, INDEX, SCALE, HINT)   \
+   __builtin_ia32_scatterpfdpd ((__mmask8)MASK, (__v8si)(__m256i)INDEX,       \
+-			       (long long const *)ADDR, (int)SCALE, (int)HINT)
++			       (void *)ADDR, (int)SCALE, (int)HINT)
+ 
+ #define _mm512_mask_prefetch_i32scatter_ps(ADDR, MASK, INDEX, SCALE, HINT)   \
+   __builtin_ia32_scatterpfdps ((__mmask16)MASK, (__v16si)(__m512i)INDEX,     \
+-			       (int const *)ADDR, (int)SCALE, (int)HINT)
++			       (void *)ADDR, (int)SCALE, (int)HINT)
+ 
+ #define _mm512_prefetch_i64scatter_pd(ADDR, INDEX, SCALE, HINT)              \
+   __builtin_ia32_scatterpfqpd ((__mmask8)0xFF, (__v8di)(__m512i)INDEX,	     \
+-			       (long long const *)ADDR, (int)SCALE, (int)HINT)
++			       (void *)ADDR, (int)SCALE, (int)HINT)
+ 
+ #define _mm512_prefetch_i64scatter_ps(ADDR, INDEX, SCALE, HINT)              \
+   __builtin_ia32_scatterpfqps ((__mmask8)0xFF, (__v8di)(__m512i)INDEX,	     \
+-			       (int const *)ADDR, (int)SCALE, (int)HINT)
++			       (void *)ADDR, (int)SCALE, (int)HINT)
+ 
+ #define _mm512_mask_prefetch_i64scatter_pd(ADDR, MASK, INDEX, SCALE, HINT)   \
+   __builtin_ia32_scatterpfqpd ((__mmask8)MASK, (__v8di)(__m512i)INDEX,	     \
+-			       (long long const *)ADDR, (int)SCALE, (int)HINT)
++			       (void *)ADDR, (int)SCALE, (int)HINT)
+ 
+ #define _mm512_mask_prefetch_i64scatter_ps(ADDR, MASK, INDEX, SCALE, HINT)   \
+   __builtin_ia32_scatterpfqps ((__mmask8)MASK, (__v8di)(__m512i)INDEX,	     \
+-			       (int const *)ADDR, (int)SCALE, (int)HINT)
++			       (void *)ADDR, (int)SCALE, (int)HINT)
+ #endif
+ 
+ #ifdef __DISABLE_AVX512PF__
 Index: gcc/config/i386/x86-64.h
 ===================================================================
 --- a/src/gcc/config/i386/x86-64.h	(.../tags/gcc_6_3_0_release)
@@ -47907,6 +51520,1380 @@ Index: gcc/config/i386/cpuid.h
  
  /* %ecx */
  #define bit_PREFETCHWT1	  (1 << 0)
+Index: gcc/config/i386/i386-builtin-types.def
+===================================================================
+--- a/src/gcc/config/i386/i386-builtin-types.def	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/config/i386/i386-builtin-types.def	(.../branches/gcc-6-branch)
+@@ -969,73 +969,73 @@
+ DEF_FUNCTION_TYPE (V4SI, V4SI, PCINT, V4DI, V4SI, INT)
+ DEF_FUNCTION_TYPE (V8SI, V8SI, PCINT, V4DI, V8SI, INT)
+ 
+-DEF_FUNCTION_TYPE (V16SF, V16SF, PCFLOAT, V16SI, HI, INT)
+ DEF_FUNCTION_TYPE (V16SF, V16SF, PCFLOAT, V8DI, HI, INT)
+-DEF_FUNCTION_TYPE (V8DF, V8DF, PCDOUBLE, V8SI, QI, INT)
+ DEF_FUNCTION_TYPE (V8DF, V8DF, PCDOUBLE, V16SI, QI, INT)
+-DEF_FUNCTION_TYPE (V8SF, V8SF, PCFLOAT, V8DI, QI, INT)
+-DEF_FUNCTION_TYPE (V8DF, V8DF, PCDOUBLE, V8DI, QI, INT)
+-DEF_FUNCTION_TYPE (V16SI, V16SI, PCINT, V16SI, HI, INT)
+ DEF_FUNCTION_TYPE (V16SI, V16SI, PCINT, V8DI, HI, INT)
+-DEF_FUNCTION_TYPE (V8DI, V8DI, PCINT64, V8SI, QI, INT)
+ DEF_FUNCTION_TYPE (V8DI, V8DI, PCINT64, V16SI, QI, INT)
+-DEF_FUNCTION_TYPE (V8SI, V8SI, PCINT, V8DI, QI, INT)
+-DEF_FUNCTION_TYPE (V8DI, V8DI, PCINT64, V8DI, QI, INT)
+-DEF_FUNCTION_TYPE (V2DF, V2DF, PCDOUBLE, V4SI, QI, INT)
+-DEF_FUNCTION_TYPE (V4DF, V4DF, PCDOUBLE, V4SI, QI, INT)
+ DEF_FUNCTION_TYPE (V4DF, V4DF, PCDOUBLE, V8SI, QI, INT)
+-DEF_FUNCTION_TYPE (V2DF, V2DF, PCDOUBLE, V2DI, QI, INT)
+-DEF_FUNCTION_TYPE (V4DF, V4DF, PCDOUBLE, V4DI, QI, INT)
+-DEF_FUNCTION_TYPE (V4SF, V4SF, PCFLOAT, V4SI, QI, INT)
+-DEF_FUNCTION_TYPE (V8SF, V8SF, PCFLOAT, V8SI, QI, INT)
+-DEF_FUNCTION_TYPE (V4SF, V4SF, PCFLOAT, V2DI, QI, INT)
+-DEF_FUNCTION_TYPE (V4SF, V4SF, PCFLOAT, V4DI, QI, INT)
+ DEF_FUNCTION_TYPE (V8SF, V8SF, PCFLOAT, V4DI, QI, INT)
+-DEF_FUNCTION_TYPE (V2DI, V2DI, PCINT64, V4SI, QI, INT)
+-DEF_FUNCTION_TYPE (V4DI, V4DI, PCINT64, V4SI, QI, INT)
+ DEF_FUNCTION_TYPE (V4DI, V4DI, PCINT64, V8SI, QI, INT)
+-DEF_FUNCTION_TYPE (V2DI, V2DI, PCINT64, V2DI, QI, INT)
+-DEF_FUNCTION_TYPE (V4DI, V4DI, PCINT64, V4DI, QI, INT)
+-DEF_FUNCTION_TYPE (V4SI, V4SI, PCINT, V4SI, QI, INT)
+-DEF_FUNCTION_TYPE (V8SI, V8SI, PCINT, V8SI, QI, INT)
+-DEF_FUNCTION_TYPE (V4SI, V4SI, PCINT, V2DI, QI, INT)
+-DEF_FUNCTION_TYPE (V4SI, V4SI, PCINT, V4DI, QI, INT)
+ DEF_FUNCTION_TYPE (V8SI, V8SI, PCINT, V4DI, QI, INT)
+ 
+-DEF_FUNCTION_TYPE (VOID, PFLOAT, HI, V16SI, V16SF, INT)
+-DEF_FUNCTION_TYPE (VOID, PFLOAT, QI, V8SI, V8SF, INT)
+-DEF_FUNCTION_TYPE (VOID, PFLOAT, QI, V4SI, V4SF, INT)
+-DEF_FUNCTION_TYPE (VOID, PDOUBLE, QI, V8SI, V8DF, INT)
+-DEF_FUNCTION_TYPE (VOID, PDOUBLE, QI, V4SI, V4DF, INT)
+-DEF_FUNCTION_TYPE (VOID, PDOUBLE, QI, V4SI, V2DF, INT)
+-DEF_FUNCTION_TYPE (VOID, PFLOAT, QI, V8DI, V8SF, INT)
+-DEF_FUNCTION_TYPE (VOID, PFLOAT, QI, V4DI, V4SF, INT)
+-DEF_FUNCTION_TYPE (VOID, PFLOAT, QI, V2DI, V4SF, INT)
+-DEF_FUNCTION_TYPE (VOID, PDOUBLE, QI, V8DI, V8DF, INT)
+-DEF_FUNCTION_TYPE (VOID, PDOUBLE, QI, V4DI, V4DF, INT)
+-DEF_FUNCTION_TYPE (VOID, PDOUBLE, QI, V2DI, V2DF, INT)
+-DEF_FUNCTION_TYPE (VOID, PINT, HI, V16SI, V16SI, INT)
+-DEF_FUNCTION_TYPE (VOID, PINT, QI, V8SI, V8SI, INT)
+-DEF_FUNCTION_TYPE (VOID, PINT, QI, V4SI, V4SI, INT)
+-DEF_FUNCTION_TYPE (VOID, PLONGLONG, QI, V8SI, V8DI, INT)
+-DEF_FUNCTION_TYPE (VOID, PLONGLONG, QI, V4SI, V4DI, INT)
+-DEF_FUNCTION_TYPE (VOID, PLONGLONG, QI, V4SI, V2DI, INT)
+-DEF_FUNCTION_TYPE (VOID, PINT, QI, V8DI, V8SI, INT)
+-DEF_FUNCTION_TYPE (VOID, PINT, QI, V4DI, V4SI, INT)
+-DEF_FUNCTION_TYPE (VOID, PINT, QI, V2DI, V4SI, INT)
+-DEF_FUNCTION_TYPE (VOID, PLONGLONG, QI, V8DI, V8DI, INT)
+ DEF_FUNCTION_TYPE (VOID, PFLOAT, HI, V8DI, V16SF, INT)
+ DEF_FUNCTION_TYPE (VOID, PDOUBLE, QI, V16SI, V8DF, INT)
+ DEF_FUNCTION_TYPE (VOID, PINT, HI, V8DI, V16SI, INT)
+ DEF_FUNCTION_TYPE (VOID, PLONGLONG, QI, V16SI, V8DI, INT)
+ 
+-DEF_FUNCTION_TYPE (VOID, QI, V8SI, PCINT64, INT, INT)
+-DEF_FUNCTION_TYPE (VOID, PLONGLONG, QI, V4DI, V4DI, INT)
+-DEF_FUNCTION_TYPE (VOID, PLONGLONG, QI, V2DI, V2DI, INT)
+-DEF_FUNCTION_TYPE (VOID, HI, V16SI, PCINT, INT, INT)
+-DEF_FUNCTION_TYPE (VOID, QI, V8DI, PCINT64, INT, INT)
+-DEF_FUNCTION_TYPE (VOID, QI, V8DI, PCINT, INT, INT)
+ 
++DEF_FUNCTION_TYPE (V16SF, V16SF, PCVOID, V16SI, HI, INT)
++DEF_FUNCTION_TYPE (V8DF, V8DF, PCVOID, V8SI, QI, INT)
++DEF_FUNCTION_TYPE (V8SF, V8SF, PCVOID, V8DI, QI, INT)
++DEF_FUNCTION_TYPE (V8DF, V8DF, PCVOID, V8DI, QI, INT)
++DEF_FUNCTION_TYPE (V16SI, V16SI, PCVOID, V16SI, HI, INT)
++DEF_FUNCTION_TYPE (V8DI, V8DI, PCVOID, V8SI, QI, INT)
++DEF_FUNCTION_TYPE (V8SI, V8SI, PCVOID, V8DI, QI, INT)
++DEF_FUNCTION_TYPE (V8DI, V8DI, PCVOID, V8DI, QI, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, HI, V16SI, V16SF, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V8SI, V8DF, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V8DI, V8SF, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V8DI, V8DF, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, HI, V16SI, V16SI, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V8SI, V8DI, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V8DI, V8SI, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V8DI, V8DI, INT)
++DEF_FUNCTION_TYPE (V2DF, V2DF, PCVOID, V4SI, QI, INT)
++DEF_FUNCTION_TYPE (V4DF, V4DF, PCVOID, V4SI, QI, INT)
++DEF_FUNCTION_TYPE (V2DF, V2DF, PCVOID, V2DI, QI, INT)
++DEF_FUNCTION_TYPE (V4DF, V4DF, PCVOID, V4DI, QI, INT)
++DEF_FUNCTION_TYPE (V4SF, V4SF, PCVOID, V4SI, QI, INT)
++DEF_FUNCTION_TYPE (V8SF, V8SF, PCVOID, V8SI, QI, INT)
++DEF_FUNCTION_TYPE (V4SF, V4SF, PCVOID, V2DI, QI, INT)
++DEF_FUNCTION_TYPE (V4SF, V4SF, PCVOID, V4DI, QI, INT)
++DEF_FUNCTION_TYPE (V2DI, V2DI, PCVOID, V4SI, QI, INT)
++DEF_FUNCTION_TYPE (V4DI, V4DI, PCVOID, V4SI, QI, INT)
++DEF_FUNCTION_TYPE (V2DI, V2DI, PCVOID, V2DI, QI, INT)
++DEF_FUNCTION_TYPE (V4DI, V4DI, PCVOID, V4DI, QI, INT)
++DEF_FUNCTION_TYPE (V4SI, V4SI, PCVOID, V4SI, QI, INT)
++DEF_FUNCTION_TYPE (V8SI, V8SI, PCVOID, V8SI, QI, INT)
++DEF_FUNCTION_TYPE (V4SI, V4SI, PCVOID, V2DI, QI, INT)
++DEF_FUNCTION_TYPE (V4SI, V4SI, PCVOID, V4DI, QI, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V8SI, V8SF, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V4SI, V4SF, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V4SI, V4DF, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V4SI, V2DF, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V4DI, V4SF, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V2DI, V4SF, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V4DI, V4DF, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V2DI, V2DF, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V8SI, V8SI, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V4SI, V4SI, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V4SI, V4DI, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V4SI, V2DI, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V4DI, V4SI, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V2DI, V4SI, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V4DI, V4DI, INT)
++DEF_FUNCTION_TYPE (VOID, PVOID, QI, V2DI, V2DI, INT)
++DEF_FUNCTION_TYPE (VOID, QI, V8SI, PCVOID, INT, INT)
++DEF_FUNCTION_TYPE (VOID, HI, V16SI, PCVOID, INT, INT)
++DEF_FUNCTION_TYPE (VOID, QI, V8DI, PCVOID, INT, INT)
++
+ DEF_FUNCTION_TYPE_ALIAS (V2DF_FTYPE_V2DF, ROUND)
+ DEF_FUNCTION_TYPE_ALIAS (V4DF_FTYPE_V4DF, ROUND)
+ DEF_FUNCTION_TYPE_ALIAS (V8DF_FTYPE_V8DF, ROUND)
+Index: gcc/config/i386/avx512fintrin.h
+===================================================================
+--- a/src/gcc/config/i386/avx512fintrin.h	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/config/i386/avx512fintrin.h	(.../branches/gcc-6-branch)
+@@ -9209,7 +9209,7 @@
+ #ifdef __OPTIMIZE__
+ extern __inline __m512
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_i32gather_ps (__m512i __index, float const *__addr, int __scale)
++_mm512_i32gather_ps (__m512i __index, void const *__addr, int __scale)
+ {
+   __m512 v1_old = _mm512_undefined_ps ();
+   __mmask16 mask = 0xFFFF;
+@@ -9223,7 +9223,7 @@
+ extern __inline __m512
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm512_mask_i32gather_ps (__m512 v1_old, __mmask16 __mask,
+-			  __m512i __index, float const *__addr, int __scale)
++			  __m512i __index, void const *__addr, int __scale)
+ {
+   return (__m512) __builtin_ia32_gathersiv16sf ((__v16sf) v1_old,
+ 						__addr,
+@@ -9233,7 +9233,7 @@
+ 
+ extern __inline __m512d
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_i32gather_pd (__m256i __index, double const *__addr, int __scale)
++_mm512_i32gather_pd (__m256i __index, void const *__addr, int __scale)
+ {
+   __m512d v1_old = _mm512_undefined_pd ();
+   __mmask8 mask = 0xFF;
+@@ -9247,7 +9247,7 @@
+ extern __inline __m512d
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm512_mask_i32gather_pd (__m512d __v1_old, __mmask8 __mask,
+-			  __m256i __index, double const *__addr, int __scale)
++			  __m256i __index, void const *__addr, int __scale)
+ {
+   return (__m512d) __builtin_ia32_gathersiv8df ((__v8df) __v1_old,
+ 						__addr,
+@@ -9257,7 +9257,7 @@
+ 
+ extern __inline __m256
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_i64gather_ps (__m512i __index, float const *__addr, int __scale)
++_mm512_i64gather_ps (__m512i __index, void const *__addr, int __scale)
+ {
+   __m256 v1_old = _mm256_undefined_ps ();
+   __mmask8 mask = 0xFF;
+@@ -9271,7 +9271,7 @@
+ extern __inline __m256
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm512_mask_i64gather_ps (__m256 __v1_old, __mmask8 __mask,
+-			  __m512i __index, float const *__addr, int __scale)
++			  __m512i __index, void const *__addr, int __scale)
+ {
+   return (__m256) __builtin_ia32_gatherdiv16sf ((__v8sf) __v1_old,
+ 						__addr,
+@@ -9281,7 +9281,7 @@
+ 
+ extern __inline __m512d
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_i64gather_pd (__m512i __index, double const *__addr, int __scale)
++_mm512_i64gather_pd (__m512i __index, void const *__addr, int __scale)
+ {
+   __m512d v1_old = _mm512_undefined_pd ();
+   __mmask8 mask = 0xFF;
+@@ -9295,7 +9295,7 @@
+ extern __inline __m512d
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm512_mask_i64gather_pd (__m512d __v1_old, __mmask8 __mask,
+-			  __m512i __index, double const *__addr, int __scale)
++			  __m512i __index, void const *__addr, int __scale)
+ {
+   return (__m512d) __builtin_ia32_gatherdiv8df ((__v8df) __v1_old,
+ 						__addr,
+@@ -9305,7 +9305,7 @@
+ 
+ extern __inline __m512i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_i32gather_epi32 (__m512i __index, int const *__addr, int __scale)
++_mm512_i32gather_epi32 (__m512i __index, void const *__addr, int __scale)
+ {
+   __m512i v1_old = _mm512_undefined_epi32 ();
+   __mmask16 mask = 0xFFFF;
+@@ -9319,7 +9319,7 @@
+ extern __inline __m512i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm512_mask_i32gather_epi32 (__m512i __v1_old, __mmask16 __mask,
+-			     __m512i __index, int const *__addr, int __scale)
++			     __m512i __index, void const *__addr, int __scale)
+ {
+   return (__m512i) __builtin_ia32_gathersiv16si ((__v16si) __v1_old,
+ 						 __addr,
+@@ -9329,7 +9329,7 @@
+ 
+ extern __inline __m512i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_i32gather_epi64 (__m256i __index, long long const *__addr, int __scale)
++_mm512_i32gather_epi64 (__m256i __index, void const *__addr, int __scale)
+ {
+   __m512i v1_old = _mm512_undefined_epi32 ();
+   __mmask8 mask = 0xFF;
+@@ -9343,7 +9343,7 @@
+ extern __inline __m512i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm512_mask_i32gather_epi64 (__m512i __v1_old, __mmask8 __mask,
+-			     __m256i __index, long long const *__addr,
++			     __m256i __index, void const *__addr,
+ 			     int __scale)
+ {
+   return (__m512i) __builtin_ia32_gathersiv8di ((__v8di) __v1_old,
+@@ -9354,7 +9354,7 @@
+ 
+ extern __inline __m256i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_i64gather_epi32 (__m512i __index, int const *__addr, int __scale)
++_mm512_i64gather_epi32 (__m512i __index, void const *__addr, int __scale)
+ {
+   __m256i v1_old = _mm256_undefined_si256 ();
+   __mmask8 mask = 0xFF;
+@@ -9368,7 +9368,7 @@
+ extern __inline __m256i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm512_mask_i64gather_epi32 (__m256i __v1_old, __mmask8 __mask,
+-			     __m512i __index, int const *__addr, int __scale)
++			     __m512i __index, void const *__addr, int __scale)
+ {
+   return (__m256i) __builtin_ia32_gatherdiv16si ((__v8si) __v1_old,
+ 						 __addr,
+@@ -9378,7 +9378,7 @@
+ 
+ extern __inline __m512i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_i64gather_epi64 (__m512i __index, long long const *__addr, int __scale)
++_mm512_i64gather_epi64 (__m512i __index, void const *__addr, int __scale)
+ {
+   __m512i v1_old = _mm512_undefined_epi32 ();
+   __mmask8 mask = 0xFF;
+@@ -9392,7 +9392,7 @@
+ extern __inline __m512i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm512_mask_i64gather_epi64 (__m512i __v1_old, __mmask8 __mask,
+-			     __m512i __index, long long const *__addr,
++			     __m512i __index, void const *__addr,
+ 			     int __scale)
+ {
+   return (__m512i) __builtin_ia32_gatherdiv8di ((__v8di) __v1_old,
+@@ -9403,7 +9403,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_i32scatter_ps (float *__addr, __m512i __index, __m512 __v1, int __scale)
++_mm512_i32scatter_ps (void *__addr, __m512i __index, __m512 __v1, int __scale)
+ {
+   __builtin_ia32_scattersiv16sf (__addr, (__mmask16) 0xFFFF,
+ 				 (__v16si) __index, (__v16sf) __v1, __scale);
+@@ -9411,7 +9411,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_mask_i32scatter_ps (float *__addr, __mmask16 __mask,
++_mm512_mask_i32scatter_ps (void *__addr, __mmask16 __mask,
+ 			   __m512i __index, __m512 __v1, int __scale)
+ {
+   __builtin_ia32_scattersiv16sf (__addr, __mask, (__v16si) __index,
+@@ -9420,7 +9420,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_i32scatter_pd (double *__addr, __m256i __index, __m512d __v1,
++_mm512_i32scatter_pd (void *__addr, __m256i __index, __m512d __v1,
+ 		      int __scale)
+ {
+   __builtin_ia32_scattersiv8df (__addr, (__mmask8) 0xFF,
+@@ -9429,7 +9429,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_mask_i32scatter_pd (double *__addr, __mmask8 __mask,
++_mm512_mask_i32scatter_pd (void *__addr, __mmask8 __mask,
+ 			   __m256i __index, __m512d __v1, int __scale)
+ {
+   __builtin_ia32_scattersiv8df (__addr, __mask, (__v8si) __index,
+@@ -9438,7 +9438,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_i64scatter_ps (float *__addr, __m512i __index, __m256 __v1, int __scale)
++_mm512_i64scatter_ps (void *__addr, __m512i __index, __m256 __v1, int __scale)
+ {
+   __builtin_ia32_scatterdiv16sf (__addr, (__mmask8) 0xFF,
+ 				 (__v8di) __index, (__v8sf) __v1, __scale);
+@@ -9446,7 +9446,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_mask_i64scatter_ps (float *__addr, __mmask8 __mask,
++_mm512_mask_i64scatter_ps (void *__addr, __mmask8 __mask,
+ 			   __m512i __index, __m256 __v1, int __scale)
+ {
+   __builtin_ia32_scatterdiv16sf (__addr, __mask, (__v8di) __index,
+@@ -9455,7 +9455,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_i64scatter_pd (double *__addr, __m512i __index, __m512d __v1,
++_mm512_i64scatter_pd (void *__addr, __m512i __index, __m512d __v1,
+ 		      int __scale)
+ {
+   __builtin_ia32_scatterdiv8df (__addr, (__mmask8) 0xFF,
+@@ -9464,7 +9464,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_mask_i64scatter_pd (double *__addr, __mmask8 __mask,
++_mm512_mask_i64scatter_pd (void *__addr, __mmask8 __mask,
+ 			   __m512i __index, __m512d __v1, int __scale)
+ {
+   __builtin_ia32_scatterdiv8df (__addr, __mask, (__v8di) __index,
+@@ -9473,7 +9473,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_i32scatter_epi32 (int *__addr, __m512i __index,
++_mm512_i32scatter_epi32 (void *__addr, __m512i __index,
+ 			 __m512i __v1, int __scale)
+ {
+   __builtin_ia32_scattersiv16si (__addr, (__mmask16) 0xFFFF,
+@@ -9482,7 +9482,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_mask_i32scatter_epi32 (int *__addr, __mmask16 __mask,
++_mm512_mask_i32scatter_epi32 (void *__addr, __mmask16 __mask,
+ 			      __m512i __index, __m512i __v1, int __scale)
+ {
+   __builtin_ia32_scattersiv16si (__addr, __mask, (__v16si) __index,
+@@ -9491,7 +9491,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_i32scatter_epi64 (long long *__addr, __m256i __index,
++_mm512_i32scatter_epi64 (void *__addr, __m256i __index,
+ 			 __m512i __v1, int __scale)
+ {
+   __builtin_ia32_scattersiv8di (__addr, (__mmask8) 0xFF,
+@@ -9500,7 +9500,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_mask_i32scatter_epi64 (long long *__addr, __mmask8 __mask,
++_mm512_mask_i32scatter_epi64 (void *__addr, __mmask8 __mask,
+ 			      __m256i __index, __m512i __v1, int __scale)
+ {
+   __builtin_ia32_scattersiv8di (__addr, __mask, (__v8si) __index,
+@@ -9509,7 +9509,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_i64scatter_epi32 (int *__addr, __m512i __index,
++_mm512_i64scatter_epi32 (void *__addr, __m512i __index,
+ 			 __m256i __v1, int __scale)
+ {
+   __builtin_ia32_scatterdiv16si (__addr, (__mmask8) 0xFF,
+@@ -9518,7 +9518,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_mask_i64scatter_epi32 (int *__addr, __mmask8 __mask,
++_mm512_mask_i64scatter_epi32 (void *__addr, __mmask8 __mask,
+ 			      __m512i __index, __m256i __v1, int __scale)
+ {
+   __builtin_ia32_scatterdiv16si (__addr, __mask, (__v8di) __index,
+@@ -9527,7 +9527,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_i64scatter_epi64 (long long *__addr, __m512i __index,
++_mm512_i64scatter_epi64 (void *__addr, __m512i __index,
+ 			 __m512i __v1, int __scale)
+ {
+   __builtin_ia32_scatterdiv8di (__addr, (__mmask8) 0xFF,
+@@ -9536,7 +9536,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm512_mask_i64scatter_epi64 (long long *__addr, __mmask8 __mask,
++_mm512_mask_i64scatter_epi64 (void *__addr, __mmask8 __mask,
+ 			      __m512i __index, __m512i __v1, int __scale)
+ {
+   __builtin_ia32_scatterdiv8di (__addr, __mask, (__v8di) __index,
+@@ -9545,177 +9545,177 @@
+ #else
+ #define _mm512_i32gather_ps(INDEX, ADDR, SCALE)				\
+   (__m512) __builtin_ia32_gathersiv16sf ((__v16sf)_mm512_undefined_ps(),\
+-					 (float const *)ADDR,		\
++					 (void const *)ADDR,		\
+ 					 (__v16si)(__m512i)INDEX,	\
+ 					 (__mmask16)0xFFFF, (int)SCALE)
+ 
+ #define _mm512_mask_i32gather_ps(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m512) __builtin_ia32_gathersiv16sf ((__v16sf)(__m512)V1OLD,	\
+-					 (float const *)ADDR,		\
++					 (void const *)ADDR,		\
+ 					 (__v16si)(__m512i)INDEX,	\
+ 					 (__mmask16)MASK, (int)SCALE)
+ 
+ #define _mm512_i32gather_pd(INDEX, ADDR, SCALE)				\
+   (__m512d) __builtin_ia32_gathersiv8df ((__v8df)_mm512_undefined_pd(),	\
+-					 (double const *)ADDR,		\
++					 (void const *)ADDR,		\
+ 					 (__v8si)(__m256i)INDEX,	\
+ 					 (__mmask8)0xFF, (int)SCALE)
+ 
+ #define _mm512_mask_i32gather_pd(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m512d) __builtin_ia32_gathersiv8df ((__v8df)(__m512d)V1OLD,	\
+-					 (double const *)ADDR,		\
++					 (void const *)ADDR,		\
+ 					 (__v8si)(__m256i)INDEX,	\
+ 					 (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm512_i64gather_ps(INDEX, ADDR, SCALE)				\
+   (__m256) __builtin_ia32_gatherdiv16sf ((__v8sf)_mm256_undefined_ps(),	\
+-					 (float const *)ADDR,		\
++					 (void const *)ADDR,		\
+ 					 (__v8di)(__m512i)INDEX,	\
+ 					 (__mmask8)0xFF, (int)SCALE)
+ 
+ #define _mm512_mask_i64gather_ps(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m256) __builtin_ia32_gatherdiv16sf ((__v8sf)(__m256)V1OLD,		\
+-					 (float const *)ADDR,		\
++					 (void const *)ADDR,		\
+ 					 (__v8di)(__m512i)INDEX,	\
+ 					 (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm512_i64gather_pd(INDEX, ADDR, SCALE)				\
+   (__m512d) __builtin_ia32_gatherdiv8df ((__v8df)_mm512_undefined_pd(),	\
+-					 (double const *)ADDR,		\
++					 (void const *)ADDR,		\
+ 					 (__v8di)(__m512i)INDEX,	\
+ 					 (__mmask8)0xFF, (int)SCALE)
+ 
+ #define _mm512_mask_i64gather_pd(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m512d) __builtin_ia32_gatherdiv8df ((__v8df)(__m512d)V1OLD,	\
+-					 (double const *)ADDR,		\
++					 (void const *)ADDR,		\
+ 					 (__v8di)(__m512i)INDEX,	\
+ 					 (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm512_i32gather_epi32(INDEX, ADDR, SCALE)			\
+   (__m512i) __builtin_ia32_gathersiv16si ((__v16si)_mm512_undefined_epi32 (),	\
+-					  (int const *)ADDR,		\
++					  (void const *)ADDR,		\
+ 					  (__v16si)(__m512i)INDEX,	\
+ 					  (__mmask16)0xFFFF, (int)SCALE)
+ 
+ #define _mm512_mask_i32gather_epi32(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m512i) __builtin_ia32_gathersiv16si ((__v16si)(__m512i)V1OLD,	\
+-					  (int const *)ADDR,		\
++					  (void const *)ADDR,		\
+ 					  (__v16si)(__m512i)INDEX,	\
+ 					  (__mmask16)MASK, (int)SCALE)
+ 
+ #define _mm512_i32gather_epi64(INDEX, ADDR, SCALE)			\
+   (__m512i) __builtin_ia32_gathersiv8di ((__v8di)_mm512_undefined_epi32 (),	\
+-					 (long long const *)ADDR,	\
++					 (void const *)ADDR,		\
+ 					 (__v8si)(__m256i)INDEX,	\
+ 					 (__mmask8)0xFF, (int)SCALE)
+ 
+ #define _mm512_mask_i32gather_epi64(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m512i) __builtin_ia32_gathersiv8di ((__v8di)(__m512i)V1OLD,	\
+-					 (long long const *)ADDR,	\
++					 (void const *)ADDR,		\
+ 					 (__v8si)(__m256i)INDEX,	\
+ 					 (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm512_i64gather_epi32(INDEX, ADDR, SCALE)			  \
+   (__m256i) __builtin_ia32_gatherdiv16si ((__v8si)_mm256_undefined_si256(), \
+-					  (int const *)ADDR,		  \
++					  (void const *)ADDR,		  \
+ 					  (__v8di)(__m512i)INDEX,	  \
+ 					  (__mmask8)0xFF, (int)SCALE)
+ 
+ #define _mm512_mask_i64gather_epi32(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m256i) __builtin_ia32_gatherdiv16si ((__v8si)(__m256i)V1OLD,	\
+-					  (int const *)ADDR,		\
++					  (void const *)ADDR,		\
+ 					  (__v8di)(__m512i)INDEX,	\
+ 					  (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm512_i64gather_epi64(INDEX, ADDR, SCALE)			\
+   (__m512i) __builtin_ia32_gatherdiv8di ((__v8di)_mm512_undefined_epi32 (),	\
+-					 (long long const *)ADDR,	\
++					 (void const *)ADDR,		\
+ 					 (__v8di)(__m512i)INDEX,	\
+ 					 (__mmask8)0xFF, (int)SCALE)
+ 
+ #define _mm512_mask_i64gather_epi64(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m512i) __builtin_ia32_gatherdiv8di ((__v8di)(__m512i)V1OLD,	\
+-					 (long long const *)ADDR,	\
++					 (void const *)ADDR,		\
+ 					 (__v8di)(__m512i)INDEX,	\
+ 					 (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm512_i32scatter_ps(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scattersiv16sf ((float *)ADDR, (__mmask16)0xFFFF,	\
++  __builtin_ia32_scattersiv16sf ((void *)ADDR, (__mmask16)0xFFFF,	\
+ 				 (__v16si)(__m512i)INDEX,		\
+ 				 (__v16sf)(__m512)V1, (int)SCALE)
+ 
+ #define _mm512_mask_i32scatter_ps(ADDR, MASK, INDEX, V1, SCALE)		\
+-  __builtin_ia32_scattersiv16sf ((float *)ADDR, (__mmask16)MASK,		\
++  __builtin_ia32_scattersiv16sf ((void *)ADDR, (__mmask16)MASK,		\
+ 				 (__v16si)(__m512i)INDEX,		\
+ 				 (__v16sf)(__m512)V1, (int)SCALE)
+ 
+ #define _mm512_i32scatter_pd(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scattersiv8df ((double *)ADDR, (__mmask8)0xFF,		\
++  __builtin_ia32_scattersiv8df ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v8si)(__m256i)INDEX,			\
+ 				(__v8df)(__m512d)V1, (int)SCALE)
+ 
+ #define _mm512_mask_i32scatter_pd(ADDR, MASK, INDEX, V1, SCALE)		\
+-  __builtin_ia32_scattersiv8df ((double *)ADDR, (__mmask8)MASK,		\
++  __builtin_ia32_scattersiv8df ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v8si)(__m256i)INDEX,			\
+ 				(__v8df)(__m512d)V1, (int)SCALE)
+ 
+ #define _mm512_i64scatter_ps(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scatterdiv16sf ((float *)ADDR, (__mmask8)0xFF,		\
++  __builtin_ia32_scatterdiv16sf ((void *)ADDR, (__mmask8)0xFF,		\
+ 				 (__v8di)(__m512i)INDEX,		\
+ 				 (__v8sf)(__m256)V1, (int)SCALE)
+ 
+ #define _mm512_mask_i64scatter_ps(ADDR, MASK, INDEX, V1, SCALE)		\
+-  __builtin_ia32_scatterdiv16sf ((float *)ADDR, (__mmask16)MASK,		\
++  __builtin_ia32_scatterdiv16sf ((void *)ADDR, (__mmask16)MASK,		\
+ 				 (__v8di)(__m512i)INDEX,		\
+ 				 (__v8sf)(__m256)V1, (int)SCALE)
+ 
+ #define _mm512_i64scatter_pd(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scatterdiv8df ((double *)ADDR, (__mmask8)0xFF,		\
++  __builtin_ia32_scatterdiv8df ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v8di)(__m512i)INDEX,			\
+ 				(__v8df)(__m512d)V1, (int)SCALE)
+ 
+ #define _mm512_mask_i64scatter_pd(ADDR, MASK, INDEX, V1, SCALE)		\
+-  __builtin_ia32_scatterdiv8df ((double *)ADDR, (__mmask8)MASK,		\
++  __builtin_ia32_scatterdiv8df ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v8di)(__m512i)INDEX,			\
+ 				(__v8df)(__m512d)V1, (int)SCALE)
+ 
+ #define _mm512_i32scatter_epi32(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scattersiv16si ((int *)ADDR, (__mmask16)0xFFFF,	\
++  __builtin_ia32_scattersiv16si ((void *)ADDR, (__mmask16)0xFFFF,	\
+ 				 (__v16si)(__m512i)INDEX,		\
+ 				 (__v16si)(__m512i)V1, (int)SCALE)
+ 
+ #define _mm512_mask_i32scatter_epi32(ADDR, MASK, INDEX, V1, SCALE)	\
+-  __builtin_ia32_scattersiv16si ((int *)ADDR, (__mmask16)MASK,		\
++  __builtin_ia32_scattersiv16si ((void *)ADDR, (__mmask16)MASK,		\
+ 				 (__v16si)(__m512i)INDEX,		\
+ 				 (__v16si)(__m512i)V1, (int)SCALE)
+ 
+ #define _mm512_i32scatter_epi64(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scattersiv8di ((long long *)ADDR, (__mmask8)0xFF,	\
++  __builtin_ia32_scattersiv8di ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v8si)(__m256i)INDEX,			\
+ 				(__v8di)(__m512i)V1, (int)SCALE)
+ 
+ #define _mm512_mask_i32scatter_epi64(ADDR, MASK, INDEX, V1, SCALE)	\
+-  __builtin_ia32_scattersiv8di ((long long *)ADDR, (__mmask8)MASK,	\
++  __builtin_ia32_scattersiv8di ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v8si)(__m256i)INDEX,			\
+ 				(__v8di)(__m512i)V1, (int)SCALE)
+ 
+ #define _mm512_i64scatter_epi32(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scatterdiv16si ((int *)ADDR, (__mmask8)0xFF,		\
++  __builtin_ia32_scatterdiv16si ((void *)ADDR, (__mmask8)0xFF,		\
+ 				 (__v8di)(__m512i)INDEX,		\
+ 				 (__v8si)(__m256i)V1, (int)SCALE)
+ 
+ #define _mm512_mask_i64scatter_epi32(ADDR, MASK, INDEX, V1, SCALE)	\
+-  __builtin_ia32_scatterdiv16si ((int *)ADDR, (__mmask8)MASK,		\
++  __builtin_ia32_scatterdiv16si ((void *)ADDR, (__mmask8)MASK,		\
+ 				 (__v8di)(__m512i)INDEX,		\
+ 				 (__v8si)(__m256i)V1, (int)SCALE)
+ 
+ #define _mm512_i64scatter_epi64(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scatterdiv8di ((long long *)ADDR, (__mmask8)0xFF,	\
++  __builtin_ia32_scatterdiv8di ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v8di)(__m512i)INDEX,			\
+ 				(__v8di)(__m512i)V1, (int)SCALE)
+ 
+ #define _mm512_mask_i64scatter_epi64(ADDR, MASK, INDEX, V1, SCALE)	\
+-  __builtin_ia32_scatterdiv8di ((long long *)ADDR, (__mmask8)MASK,	\
++  __builtin_ia32_scatterdiv8di ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v8di)(__m512i)INDEX,			\
+ 				(__v8di)(__m512i)V1, (int)SCALE)
+ #endif
+Index: gcc/config/i386/avx512vlintrin.h
+===================================================================
+--- a/src/gcc/config/i386/avx512vlintrin.h	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/config/i386/avx512vlintrin.h	(.../branches/gcc-6-branch)
+@@ -10216,7 +10216,7 @@
+ extern __inline __m256
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm256_mmask_i32gather_ps (__m256 __v1_old, __mmask8 __mask,
+-			   __m256i __index, float const *__addr,
++			   __m256i __index, void const *__addr,
+ 			   int __scale)
+ {
+   return (__m256) __builtin_ia32_gather3siv8sf ((__v8sf) __v1_old,
+@@ -10228,7 +10228,7 @@
+ extern __inline __m128
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm_mmask_i32gather_ps (__m128 __v1_old, __mmask8 __mask,
+-			__m128i __index, float const *__addr,
++			__m128i __index, void const *__addr,
+ 			int __scale)
+ {
+   return (__m128) __builtin_ia32_gather3siv4sf ((__v4sf) __v1_old,
+@@ -10240,7 +10240,7 @@
+ extern __inline __m256d
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm256_mmask_i32gather_pd (__m256d __v1_old, __mmask8 __mask,
+-			   __m128i __index, double const *__addr,
++			   __m128i __index, void const *__addr,
+ 			   int __scale)
+ {
+   return (__m256d) __builtin_ia32_gather3siv4df ((__v4df) __v1_old,
+@@ -10252,7 +10252,7 @@
+ extern __inline __m128d
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm_mmask_i32gather_pd (__m128d __v1_old, __mmask8 __mask,
+-			__m128i __index, double const *__addr,
++			__m128i __index, void const *__addr,
+ 			int __scale)
+ {
+   return (__m128d) __builtin_ia32_gather3siv2df ((__v2df) __v1_old,
+@@ -10264,7 +10264,7 @@
+ extern __inline __m128
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm256_mmask_i64gather_ps (__m128 __v1_old, __mmask8 __mask,
+-			   __m256i __index, float const *__addr,
++			   __m256i __index, void const *__addr,
+ 			   int __scale)
+ {
+   return (__m128) __builtin_ia32_gather3div8sf ((__v4sf) __v1_old,
+@@ -10276,7 +10276,7 @@
+ extern __inline __m128
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm_mmask_i64gather_ps (__m128 __v1_old, __mmask8 __mask,
+-			__m128i __index, float const *__addr,
++			__m128i __index, void const *__addr,
+ 			int __scale)
+ {
+   return (__m128) __builtin_ia32_gather3div4sf ((__v4sf) __v1_old,
+@@ -10288,7 +10288,7 @@
+ extern __inline __m256d
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm256_mmask_i64gather_pd (__m256d __v1_old, __mmask8 __mask,
+-			   __m256i __index, double const *__addr,
++			   __m256i __index, void const *__addr,
+ 			   int __scale)
+ {
+   return (__m256d) __builtin_ia32_gather3div4df ((__v4df) __v1_old,
+@@ -10300,7 +10300,7 @@
+ extern __inline __m128d
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm_mmask_i64gather_pd (__m128d __v1_old, __mmask8 __mask,
+-			__m128i __index, double const *__addr,
++			__m128i __index, void const *__addr,
+ 			int __scale)
+ {
+   return (__m128d) __builtin_ia32_gather3div2df ((__v2df) __v1_old,
+@@ -10312,7 +10312,7 @@
+ extern __inline __m256i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm256_mmask_i32gather_epi32 (__m256i __v1_old, __mmask8 __mask,
+-			      __m256i __index, int const *__addr,
++			      __m256i __index, void const *__addr,
+ 			      int __scale)
+ {
+   return (__m256i) __builtin_ia32_gather3siv8si ((__v8si) __v1_old,
+@@ -10324,7 +10324,7 @@
+ extern __inline __m128i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm_mmask_i32gather_epi32 (__m128i __v1_old, __mmask8 __mask,
+-			   __m128i __index, int const *__addr,
++			   __m128i __index, void const *__addr,
+ 			   int __scale)
+ {
+   return (__m128i) __builtin_ia32_gather3siv4si ((__v4si) __v1_old,
+@@ -10336,7 +10336,7 @@
+ extern __inline __m256i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm256_mmask_i32gather_epi64 (__m256i __v1_old, __mmask8 __mask,
+-			      __m128i __index, long long const *__addr,
++			      __m128i __index, void const *__addr,
+ 			      int __scale)
+ {
+   return (__m256i) __builtin_ia32_gather3siv4di ((__v4di) __v1_old,
+@@ -10348,7 +10348,7 @@
+ extern __inline __m128i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm_mmask_i32gather_epi64 (__m128i __v1_old, __mmask8 __mask,
+-			   __m128i __index, long long const *__addr,
++			   __m128i __index, void const *__addr,
+ 			   int __scale)
+ {
+   return (__m128i) __builtin_ia32_gather3siv2di ((__v2di) __v1_old,
+@@ -10360,7 +10360,7 @@
+ extern __inline __m128i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm256_mmask_i64gather_epi32 (__m128i __v1_old, __mmask8 __mask,
+-			      __m256i __index, int const *__addr,
++			      __m256i __index, void const *__addr,
+ 			      int __scale)
+ {
+   return (__m128i) __builtin_ia32_gather3div8si ((__v4si) __v1_old,
+@@ -10372,7 +10372,7 @@
+ extern __inline __m128i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm_mmask_i64gather_epi32 (__m128i __v1_old, __mmask8 __mask,
+-			   __m128i __index, int const *__addr,
++			   __m128i __index, void const *__addr,
+ 			   int __scale)
+ {
+   return (__m128i) __builtin_ia32_gather3div4si ((__v4si) __v1_old,
+@@ -10384,7 +10384,7 @@
+ extern __inline __m256i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm256_mmask_i64gather_epi64 (__m256i __v1_old, __mmask8 __mask,
+-			      __m256i __index, long long const *__addr,
++			      __m256i __index, void const *__addr,
+ 			      int __scale)
+ {
+   return (__m256i) __builtin_ia32_gather3div4di ((__v4di) __v1_old,
+@@ -10396,7 +10396,7 @@
+ extern __inline __m128i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm_mmask_i64gather_epi64 (__m128i __v1_old, __mmask8 __mask,
+-			   __m128i __index, long long const *__addr,
++			   __m128i __index, void const *__addr,
+ 			   int __scale)
+ {
+   return (__m128i) __builtin_ia32_gather3div2di ((__v2di) __v1_old,
+@@ -10407,7 +10407,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_i32scatter_ps (float *__addr, __m256i __index,
++_mm256_i32scatter_ps (void *__addr, __m256i __index,
+ 		      __m256 __v1, const int __scale)
+ {
+   __builtin_ia32_scattersiv8sf (__addr, (__mmask8) 0xFF,
+@@ -10417,7 +10417,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_mask_i32scatter_ps (float *__addr, __mmask8 __mask,
++_mm256_mask_i32scatter_ps (void *__addr, __mmask8 __mask,
+ 			   __m256i __index, __m256 __v1,
+ 			   const int __scale)
+ {
+@@ -10427,7 +10427,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_i32scatter_ps (float *__addr, __m128i __index, __m128 __v1,
++_mm_i32scatter_ps (void *__addr, __m128i __index, __m128 __v1,
+ 		   const int __scale)
+ {
+   __builtin_ia32_scattersiv4sf (__addr, (__mmask8) 0xFF,
+@@ -10437,7 +10437,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_mask_i32scatter_ps (float *__addr, __mmask8 __mask,
++_mm_mask_i32scatter_ps (void *__addr, __mmask8 __mask,
+ 			__m128i __index, __m128 __v1,
+ 			const int __scale)
+ {
+@@ -10447,7 +10447,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_i32scatter_pd (double *__addr, __m128i __index,
++_mm256_i32scatter_pd (void *__addr, __m128i __index,
+ 		      __m256d __v1, const int __scale)
+ {
+   __builtin_ia32_scattersiv4df (__addr, (__mmask8) 0xFF,
+@@ -10457,7 +10457,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_mask_i32scatter_pd (double *__addr, __mmask8 __mask,
++_mm256_mask_i32scatter_pd (void *__addr, __mmask8 __mask,
+ 			   __m128i __index, __m256d __v1,
+ 			   const int __scale)
+ {
+@@ -10467,7 +10467,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_i32scatter_pd (double *__addr, __m128i __index,
++_mm_i32scatter_pd (void *__addr, __m128i __index,
+ 		   __m128d __v1, const int __scale)
+ {
+   __builtin_ia32_scattersiv2df (__addr, (__mmask8) 0xFF,
+@@ -10477,7 +10477,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_mask_i32scatter_pd (double *__addr, __mmask8 __mask,
++_mm_mask_i32scatter_pd (void *__addr, __mmask8 __mask,
+ 			__m128i __index, __m128d __v1,
+ 			const int __scale)
+ {
+@@ -10487,7 +10487,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_i64scatter_ps (float *__addr, __m256i __index,
++_mm256_i64scatter_ps (void *__addr, __m256i __index,
+ 		      __m128 __v1, const int __scale)
+ {
+   __builtin_ia32_scatterdiv8sf (__addr, (__mmask8) 0xFF,
+@@ -10497,7 +10497,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_mask_i64scatter_ps (float *__addr, __mmask8 __mask,
++_mm256_mask_i64scatter_ps (void *__addr, __mmask8 __mask,
+ 			   __m256i __index, __m128 __v1,
+ 			   const int __scale)
+ {
+@@ -10507,7 +10507,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_i64scatter_ps (float *__addr, __m128i __index, __m128 __v1,
++_mm_i64scatter_ps (void *__addr, __m128i __index, __m128 __v1,
+ 		   const int __scale)
+ {
+   __builtin_ia32_scatterdiv4sf (__addr, (__mmask8) 0xFF,
+@@ -10517,7 +10517,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_mask_i64scatter_ps (float *__addr, __mmask8 __mask,
++_mm_mask_i64scatter_ps (void *__addr, __mmask8 __mask,
+ 			__m128i __index, __m128 __v1,
+ 			const int __scale)
+ {
+@@ -10527,7 +10527,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_i64scatter_pd (double *__addr, __m256i __index,
++_mm256_i64scatter_pd (void *__addr, __m256i __index,
+ 		      __m256d __v1, const int __scale)
+ {
+   __builtin_ia32_scatterdiv4df (__addr, (__mmask8) 0xFF,
+@@ -10537,7 +10537,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_mask_i64scatter_pd (double *__addr, __mmask8 __mask,
++_mm256_mask_i64scatter_pd (void *__addr, __mmask8 __mask,
+ 			   __m256i __index, __m256d __v1,
+ 			   const int __scale)
+ {
+@@ -10547,7 +10547,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_i64scatter_pd (double *__addr, __m128i __index,
++_mm_i64scatter_pd (void *__addr, __m128i __index,
+ 		   __m128d __v1, const int __scale)
+ {
+   __builtin_ia32_scatterdiv2df (__addr, (__mmask8) 0xFF,
+@@ -10557,7 +10557,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_mask_i64scatter_pd (double *__addr, __mmask8 __mask,
++_mm_mask_i64scatter_pd (void *__addr, __mmask8 __mask,
+ 			__m128i __index, __m128d __v1,
+ 			const int __scale)
+ {
+@@ -10567,7 +10567,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_i32scatter_epi32 (int *__addr, __m256i __index,
++_mm256_i32scatter_epi32 (void *__addr, __m256i __index,
+ 			 __m256i __v1, const int __scale)
+ {
+   __builtin_ia32_scattersiv8si (__addr, (__mmask8) 0xFF,
+@@ -10577,7 +10577,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_mask_i32scatter_epi32 (int *__addr, __mmask8 __mask,
++_mm256_mask_i32scatter_epi32 (void *__addr, __mmask8 __mask,
+ 			      __m256i __index, __m256i __v1,
+ 			      const int __scale)
+ {
+@@ -10587,7 +10587,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_i32scatter_epi32 (int *__addr, __m128i __index,
++_mm_i32scatter_epi32 (void *__addr, __m128i __index,
+ 		      __m128i __v1, const int __scale)
+ {
+   __builtin_ia32_scattersiv4si (__addr, (__mmask8) 0xFF,
+@@ -10597,7 +10597,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_mask_i32scatter_epi32 (int *__addr, __mmask8 __mask,
++_mm_mask_i32scatter_epi32 (void *__addr, __mmask8 __mask,
+ 			   __m128i __index, __m128i __v1,
+ 			   const int __scale)
+ {
+@@ -10607,7 +10607,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_i32scatter_epi64 (long long *__addr, __m128i __index,
++_mm256_i32scatter_epi64 (void *__addr, __m128i __index,
+ 			 __m256i __v1, const int __scale)
+ {
+   __builtin_ia32_scattersiv4di (__addr, (__mmask8) 0xFF,
+@@ -10617,7 +10617,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_mask_i32scatter_epi64 (long long *__addr, __mmask8 __mask,
++_mm256_mask_i32scatter_epi64 (void *__addr, __mmask8 __mask,
+ 			      __m128i __index, __m256i __v1,
+ 			      const int __scale)
+ {
+@@ -10627,7 +10627,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_i32scatter_epi64 (long long *__addr, __m128i __index,
++_mm_i32scatter_epi64 (void *__addr, __m128i __index,
+ 		      __m128i __v1, const int __scale)
+ {
+   __builtin_ia32_scattersiv2di (__addr, (__mmask8) 0xFF,
+@@ -10637,7 +10637,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_mask_i32scatter_epi64 (long long *__addr, __mmask8 __mask,
++_mm_mask_i32scatter_epi64 (void *__addr, __mmask8 __mask,
+ 			   __m128i __index, __m128i __v1,
+ 			   const int __scale)
+ {
+@@ -10647,7 +10647,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_i64scatter_epi32 (int *__addr, __m256i __index,
++_mm256_i64scatter_epi32 (void *__addr, __m256i __index,
+ 			 __m128i __v1, const int __scale)
+ {
+   __builtin_ia32_scatterdiv8si (__addr, (__mmask8) 0xFF,
+@@ -10657,7 +10657,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_mask_i64scatter_epi32 (int *__addr, __mmask8 __mask,
++_mm256_mask_i64scatter_epi32 (void *__addr, __mmask8 __mask,
+ 			      __m256i __index, __m128i __v1,
+ 			      const int __scale)
+ {
+@@ -10667,7 +10667,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_i64scatter_epi32 (int *__addr, __m128i __index,
++_mm_i64scatter_epi32 (void *__addr, __m128i __index,
+ 		      __m128i __v1, const int __scale)
+ {
+   __builtin_ia32_scatterdiv4si (__addr, (__mmask8) 0xFF,
+@@ -10677,7 +10677,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_mask_i64scatter_epi32 (int *__addr, __mmask8 __mask,
++_mm_mask_i64scatter_epi32 (void *__addr, __mmask8 __mask,
+ 			   __m128i __index, __m128i __v1,
+ 			   const int __scale)
+ {
+@@ -10687,7 +10687,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_i64scatter_epi64 (long long *__addr, __m256i __index,
++_mm256_i64scatter_epi64 (void *__addr, __m256i __index,
+ 			 __m256i __v1, const int __scale)
+ {
+   __builtin_ia32_scatterdiv4di (__addr, (__mmask8) 0xFF,
+@@ -10697,7 +10697,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_mask_i64scatter_epi64 (long long *__addr, __mmask8 __mask,
++_mm256_mask_i64scatter_epi64 (void *__addr, __mmask8 __mask,
+ 			      __m256i __index, __m256i __v1,
+ 			      const int __scale)
+ {
+@@ -10707,7 +10707,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_i64scatter_epi64 (long long *__addr, __m128i __index,
++_mm_i64scatter_epi64 (void *__addr, __m128i __index,
+ 		      __m128i __v1, const int __scale)
+ {
+   __builtin_ia32_scatterdiv2di (__addr, (__mmask8) 0xFF,
+@@ -10717,7 +10717,7 @@
+ 
+ extern __inline void
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_mask_i64scatter_epi64 (long long *__addr, __mmask8 __mask,
++_mm_mask_i64scatter_epi64 (void *__addr, __mmask8 __mask,
+ 			   __m128i __index, __m128i __v1,
+ 			   const int __scale)
+ {
+@@ -12868,257 +12868,257 @@
+ 
+ #define _mm256_mmask_i32gather_ps(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m256) __builtin_ia32_gather3siv8sf ((__v8sf)(__m256)V1OLD,		\
+-					 (float const *)ADDR,		\
++					 (void const *)ADDR,		\
+ 					 (__v8si)(__m256i)INDEX,	\
+ 					 (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm_mmask_i32gather_ps(V1OLD, MASK, INDEX, ADDR, SCALE)		\
+   (__m128) __builtin_ia32_gather3siv4sf ((__v4sf)(__m128)V1OLD,		\
+-					 (float const *)ADDR,		\
++					 (void const *)ADDR,		\
+ 					 (__v4si)(__m128i)INDEX,	\
+ 					 (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm256_mmask_i32gather_pd(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m256d) __builtin_ia32_gather3siv4df ((__v4df)(__m256d)V1OLD,	\
+-					  (double const *)ADDR,		\
++					  (void const *)ADDR,		\
+ 					  (__v4si)(__m128i)INDEX,	\
+ 					  (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm_mmask_i32gather_pd(V1OLD, MASK, INDEX, ADDR, SCALE)		\
+   (__m128d) __builtin_ia32_gather3siv2df ((__v2df)(__m128d)V1OLD,	\
+-					  (double const *)ADDR,		\
++					  (void const *)ADDR,		\
+ 					  (__v4si)(__m128i)INDEX,	\
+ 					  (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm256_mmask_i64gather_ps(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m128) __builtin_ia32_gather3div8sf ((__v4sf)(__m128)V1OLD,		\
+-					 (float const *)ADDR,		\
++					 (void const *)ADDR,		\
+ 					 (__v4di)(__m256i)INDEX,	\
+ 					 (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm_mmask_i64gather_ps(V1OLD, MASK, INDEX, ADDR, SCALE)		\
+   (__m128) __builtin_ia32_gather3div4sf ((__v4sf)(__m128)V1OLD,		\
+-					 (float const *)ADDR,		\
++					 (void const *)ADDR,		\
+ 					 (__v2di)(__m128i)INDEX,	\
+ 					 (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm256_mmask_i64gather_pd(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m256d) __builtin_ia32_gather3div4df ((__v4df)(__m256d)V1OLD,	\
+-					  (double const *)ADDR,		\
++					  (void const *)ADDR,		\
+ 					  (__v4di)(__m256i)INDEX,	\
+ 					  (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm_mmask_i64gather_pd(V1OLD, MASK, INDEX, ADDR, SCALE)		\
+   (__m128d) __builtin_ia32_gather3div2df ((__v2df)(__m128d)V1OLD,	\
+-					  (double const *)ADDR,		\
++					  (void const *)ADDR,		\
+ 					  (__v2di)(__m128i)INDEX,	\
+ 					  (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm256_mmask_i32gather_epi32(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m256i) __builtin_ia32_gather3siv8si ((__v8si)(__m256i)V1OLD,	\
+-					  (int const *)ADDR,		\
++					  (void const *)ADDR,		\
+ 					  (__v8si)(__m256i)INDEX,	\
+ 					  (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm_mmask_i32gather_epi32(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m128i) __builtin_ia32_gather3siv4si ((__v4si)(__m128i)V1OLD,	\
+-					  (int const *)ADDR,		\
++					  (void const *)ADDR,		\
+ 					  (__v4si)(__m128i)INDEX,	\
+ 					  (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm256_mmask_i32gather_epi64(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m256i) __builtin_ia32_gather3siv4di ((__v4di)(__m256i)V1OLD,	\
+-					  (long long const *)ADDR,	\
++					  (void const *)ADDR,		\
+ 					  (__v4si)(__m128i)INDEX,	\
+ 					  (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm_mmask_i32gather_epi64(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m128i) __builtin_ia32_gather3siv2di ((__v2di)(__m128i)V1OLD,	\
+-					  (long long const *)ADDR,	\
++					  (void const *)ADDR,		\
+ 					  (__v4si)(__m128i)INDEX,	\
+ 					  (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm256_mmask_i64gather_epi32(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m128i) __builtin_ia32_gather3div8si ((__v4si)(__m128i)V1OLD,	\
+-					  (int const *)ADDR,		\
++					  (void const *)ADDR,		\
+ 					  (__v4di)(__m256i)INDEX,	\
+ 					  (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm_mmask_i64gather_epi32(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m128i) __builtin_ia32_gather3div4si ((__v4si)(__m128i)V1OLD,	\
+-					  (int const *)ADDR,		\
++					  (void const *)ADDR,		\
+ 					  (__v2di)(__m128i)INDEX,	\
+ 					  (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm256_mmask_i64gather_epi64(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m256i) __builtin_ia32_gather3div4di ((__v4di)(__m256i)V1OLD,	\
+-					  (long long const *)ADDR,	\
++					  (void const *)ADDR,		\
+ 					  (__v4di)(__m256i)INDEX,	\
+ 					  (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm_mmask_i64gather_epi64(V1OLD, MASK, INDEX, ADDR, SCALE)	\
+   (__m128i) __builtin_ia32_gather3div2di ((__v2di)(__m128i)V1OLD,	\
+-					  (long long const *)ADDR,	\
++					  (void const *)ADDR,		\
+ 					  (__v2di)(__m128i)INDEX,	\
+ 					  (__mmask8)MASK, (int)SCALE)
+ 
+ #define _mm256_i32scatter_ps(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scattersiv8sf ((float *)ADDR, (__mmask8)0xFF,		\
++  __builtin_ia32_scattersiv8sf ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v8si)(__m256i)INDEX,			\
+ 				(__v8sf)(__m256)V1, (int)SCALE)
+ 
+ #define _mm256_mask_i32scatter_ps(ADDR, MASK, INDEX, V1, SCALE)		\
+-  __builtin_ia32_scattersiv8sf ((float *)ADDR, (__mmask8)MASK,		\
++  __builtin_ia32_scattersiv8sf ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v8si)(__m256i)INDEX,			\
+ 				(__v8sf)(__m256)V1, (int)SCALE)
+ 
+ #define _mm_i32scatter_ps(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scattersiv4sf ((float *)ADDR, (__mmask8)0xFF,		\
++  __builtin_ia32_scattersiv4sf ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v4si)(__m128i)INDEX,			\
+ 				(__v4sf)(__m128)V1, (int)SCALE)
+ 
+ #define _mm_mask_i32scatter_ps(ADDR, MASK, INDEX, V1, SCALE)		\
+-  __builtin_ia32_scattersiv4sf ((float *)ADDR, (__mmask8)MASK,		\
++  __builtin_ia32_scattersiv4sf ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v4si)(__m128i)INDEX,			\
+ 				(__v4sf)(__m128)V1, (int)SCALE)
+ 
+ #define _mm256_i32scatter_pd(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scattersiv4df ((double *)ADDR, (__mmask8)0xFF,		\
++  __builtin_ia32_scattersiv4df ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v4si)(__m128i)INDEX,			\
+ 				(__v4df)(__m256d)V1, (int)SCALE)
+ 
+ #define _mm256_mask_i32scatter_pd(ADDR, MASK, INDEX, V1, SCALE)		\
+-  __builtin_ia32_scattersiv4df ((double *)ADDR, (__mmask8)MASK,		\
++  __builtin_ia32_scattersiv4df ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v4si)(__m128i)INDEX,			\
+ 				(__v4df)(__m256d)V1, (int)SCALE)
+ 
+ #define _mm_i32scatter_pd(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scattersiv2df ((double *)ADDR, (__mmask8)0xFF,		\
++  __builtin_ia32_scattersiv2df ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v4si)(__m128i)INDEX,			\
+ 				(__v2df)(__m128d)V1, (int)SCALE)
+ 
+ #define _mm_mask_i32scatter_pd(ADDR, MASK, INDEX, V1, SCALE)		\
+-  __builtin_ia32_scattersiv2df ((double *)ADDR, (__mmask8)MASK,		\
++  __builtin_ia32_scattersiv2df ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v4si)(__m128i)INDEX,			\
+ 				(__v2df)(__m128d)V1, (int)SCALE)
+ 
+ #define _mm256_i64scatter_ps(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scatterdiv8sf ((float *)ADDR, (__mmask8)0xFF,		\
++  __builtin_ia32_scatterdiv8sf ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v4di)(__m256i)INDEX,			\
+ 				(__v4sf)(__m128)V1, (int)SCALE)
+ 
+ #define _mm256_mask_i64scatter_ps(ADDR, MASK, INDEX, V1, SCALE)		\
+-  __builtin_ia32_scatterdiv8sf ((float *)ADDR, (__mmask8)MASK,		\
++  __builtin_ia32_scatterdiv8sf ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v4di)(__m256i)INDEX,			\
+ 				(__v4sf)(__m128)V1, (int)SCALE)
+ 
+ #define _mm_i64scatter_ps(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scatterdiv4sf ((float *)ADDR, (__mmask8)0xFF,		\
++  __builtin_ia32_scatterdiv4sf ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v2di)(__m128i)INDEX,			\
+ 				(__v4sf)(__m128)V1, (int)SCALE)
+ 
+ #define _mm_mask_i64scatter_ps(ADDR, MASK, INDEX, V1, SCALE)		\
+-  __builtin_ia32_scatterdiv4sf ((float *)ADDR, (__mmask8)MASK,		\
++  __builtin_ia32_scatterdiv4sf ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v2di)(__m128i)INDEX,			\
+ 				(__v4sf)(__m128)V1, (int)SCALE)
+ 
+ #define _mm256_i64scatter_pd(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scatterdiv4df ((double *)ADDR, (__mmask8)0xFF,		\
++  __builtin_ia32_scatterdiv4df ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v4di)(__m256i)INDEX,			\
+ 				(__v4df)(__m256d)V1, (int)SCALE)
+ 
+ #define _mm256_mask_i64scatter_pd(ADDR, MASK, INDEX, V1, SCALE)		\
+-  __builtin_ia32_scatterdiv4df ((double *)ADDR, (__mmask8)MASK,		\
++  __builtin_ia32_scatterdiv4df ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v4di)(__m256i)INDEX,			\
+ 				(__v4df)(__m256d)V1, (int)SCALE)
+ 
+ #define _mm_i64scatter_pd(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scatterdiv2df ((double *)ADDR, (__mmask8)0xFF,		\
++  __builtin_ia32_scatterdiv2df ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v2di)(__m128i)INDEX,			\
+ 				(__v2df)(__m128d)V1, (int)SCALE)
+ 
+ #define _mm_mask_i64scatter_pd(ADDR, MASK, INDEX, V1, SCALE)		\
+-  __builtin_ia32_scatterdiv2df ((double *)ADDR, (__mmask8)MASK,		\
++  __builtin_ia32_scatterdiv2df ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v2di)(__m128i)INDEX,			\
+ 				(__v2df)(__m128d)V1, (int)SCALE)
+ 
+ #define _mm256_i32scatter_epi32(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scattersiv8si ((int *)ADDR, (__mmask8)0xFF,		\
++  __builtin_ia32_scattersiv8si ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v8si)(__m256i)INDEX,			\
+ 				(__v8si)(__m256i)V1, (int)SCALE)
+ 
+ #define _mm256_mask_i32scatter_epi32(ADDR, MASK, INDEX, V1, SCALE)	\
+-  __builtin_ia32_scattersiv8si ((int *)ADDR, (__mmask8)MASK,		\
++  __builtin_ia32_scattersiv8si ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v8si)(__m256i)INDEX,			\
+ 				(__v8si)(__m256i)V1, (int)SCALE)
+ 
+ #define _mm_i32scatter_epi32(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scattersiv4si ((int *)ADDR, (__mmask8)0xFF,		\
++  __builtin_ia32_scattersiv4si ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v4si)(__m128i)INDEX,			\
+ 				(__v4si)(__m128i)V1, (int)SCALE)
+ 
+ #define _mm_mask_i32scatter_epi32(ADDR, MASK, INDEX, V1, SCALE)		\
+-  __builtin_ia32_scattersiv4si ((int *)ADDR, (__mmask8)MASK,		\
++  __builtin_ia32_scattersiv4si ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v4si)(__m128i)INDEX,			\
+ 				(__v4si)(__m128i)V1, (int)SCALE)
+ 
+ #define _mm256_i32scatter_epi64(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scattersiv4di ((long long *)ADDR, (__mmask8)0xFF,	\
++  __builtin_ia32_scattersiv4di ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v4si)(__m128i)INDEX,			\
+ 				(__v4di)(__m256i)V1, (int)SCALE)
+ 
+ #define _mm256_mask_i32scatter_epi64(ADDR, MASK, INDEX, V1, SCALE)	\
+-  __builtin_ia32_scattersiv4di ((long long *)ADDR, (__mmask8)MASK,	\
++  __builtin_ia32_scattersiv4di ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v4si)(__m128i)INDEX,			\
+ 				(__v4di)(__m256i)V1, (int)SCALE)
+ 
+ #define _mm_i32scatter_epi64(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scattersiv2di ((long long *)ADDR, (__mmask8)0xFF,	\
++  __builtin_ia32_scattersiv2di ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v4si)(__m128i)INDEX,			\
+ 				(__v2di)(__m128i)V1, (int)SCALE)
+ 
+ #define _mm_mask_i32scatter_epi64(ADDR, MASK, INDEX, V1, SCALE)		\
+-  __builtin_ia32_scattersiv2di ((long long *)ADDR, (__mmask8)MASK,	\
++  __builtin_ia32_scattersiv2di ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v4si)(__m128i)INDEX,			\
+ 				(__v2di)(__m128i)V1, (int)SCALE)
+ 
+ #define _mm256_i64scatter_epi32(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scatterdiv8si ((int *)ADDR, (__mmask8)0xFF,		\
++  __builtin_ia32_scatterdiv8si ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v4di)(__m256i)INDEX,			\
+ 				(__v4si)(__m128i)V1, (int)SCALE)
+ 
+ #define _mm256_mask_i64scatter_epi32(ADDR, MASK, INDEX, V1, SCALE)	\
+-  __builtin_ia32_scatterdiv8si ((int *)ADDR, (__mmask8)MASK,		\
++  __builtin_ia32_scatterdiv8si ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v4di)(__m256i)INDEX,			\
+ 				(__v4si)(__m128i)V1, (int)SCALE)
+ 
+ #define _mm_i64scatter_epi32(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scatterdiv4si ((int *)ADDR, (__mmask8)0xFF,		\
++  __builtin_ia32_scatterdiv4si ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v2di)(__m128i)INDEX,			\
+ 				(__v4si)(__m128i)V1, (int)SCALE)
+ 
+ #define _mm_mask_i64scatter_epi32(ADDR, MASK, INDEX, V1, SCALE)		\
+-  __builtin_ia32_scatterdiv4si ((int *)ADDR, (__mmask8)MASK,		\
++  __builtin_ia32_scatterdiv4si ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v2di)(__m128i)INDEX,			\
+ 				(__v4si)(__m128i)V1, (int)SCALE)
+ 
+ #define _mm256_i64scatter_epi64(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scatterdiv4di ((long long *)ADDR, (__mmask8)0xFF,	\
++  __builtin_ia32_scatterdiv4di ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v4di)(__m256i)INDEX,			\
+ 				(__v4di)(__m256i)V1, (int)SCALE)
+ 
+ #define _mm256_mask_i64scatter_epi64(ADDR, MASK, INDEX, V1, SCALE)	\
+-  __builtin_ia32_scatterdiv4di ((long long *)ADDR, (__mmask8)MASK,	\
++  __builtin_ia32_scatterdiv4di ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v4di)(__m256i)INDEX,			\
+ 				(__v4di)(__m256i)V1, (int)SCALE)
+ 
+ #define _mm_i64scatter_epi64(ADDR, INDEX, V1, SCALE)			\
+-  __builtin_ia32_scatterdiv2di ((long long *)ADDR, (__mmask8)0xFF,	\
++  __builtin_ia32_scatterdiv2di ((void *)ADDR, (__mmask8)0xFF,		\
+ 				(__v2di)(__m128i)INDEX,			\
+ 				(__v2di)(__m128i)V1, (int)SCALE)
+ 
+ #define _mm_mask_i64scatter_epi64(ADDR, MASK, INDEX, V1, SCALE)		\
+-  __builtin_ia32_scatterdiv2di ((long long *)ADDR, (__mmask8)MASK,	\
++  __builtin_ia32_scatterdiv2di ((void *)ADDR, (__mmask8)MASK,		\
+ 				(__v2di)(__m128i)INDEX,			\
+ 				(__v2di)(__m128i)V1, (int)SCALE)
+ 
 Index: gcc/config/i386/i386.c
 ===================================================================
 --- a/src/gcc/config/i386/i386.c	(.../tags/gcc_6_3_0_release)
@@ -47920,6 +52907,296 @@ Index: gcc/config/i386/i386.c
  	len++;
      }
    else
+@@ -35719,35 +35719,35 @@
+ 
+   /* AVX512F */
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_gathersiv16sf",
+-	       V16SF_FTYPE_V16SF_PCFLOAT_V16SI_HI_INT,
++	       V16SF_FTYPE_V16SF_PCVOID_V16SI_HI_INT,
+ 	       IX86_BUILTIN_GATHER3SIV16SF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_gathersiv8df",
+-	       V8DF_FTYPE_V8DF_PCDOUBLE_V8SI_QI_INT,
++	       V8DF_FTYPE_V8DF_PCVOID_V8SI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3SIV8DF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_gatherdiv16sf",
+-	       V8SF_FTYPE_V8SF_PCFLOAT_V8DI_QI_INT,
++	       V8SF_FTYPE_V8SF_PCVOID_V8DI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3DIV16SF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_gatherdiv8df",
+-	       V8DF_FTYPE_V8DF_PCDOUBLE_V8DI_QI_INT,
++	       V8DF_FTYPE_V8DF_PCVOID_V8DI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3DIV8DF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_gathersiv16si",
+-	       V16SI_FTYPE_V16SI_PCINT_V16SI_HI_INT,
++	       V16SI_FTYPE_V16SI_PCVOID_V16SI_HI_INT,
+ 	       IX86_BUILTIN_GATHER3SIV16SI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_gathersiv8di",
+-	       V8DI_FTYPE_V8DI_PCINT64_V8SI_QI_INT,
++	       V8DI_FTYPE_V8DI_PCVOID_V8SI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3SIV8DI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_gatherdiv16si",
+-	       V8SI_FTYPE_V8SI_PCINT_V8DI_QI_INT,
++	       V8SI_FTYPE_V8SI_PCVOID_V8DI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3DIV16SI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_gatherdiv8di",
+-	       V8DI_FTYPE_V8DI_PCINT64_V8DI_QI_INT,
++	       V8DI_FTYPE_V8DI_PCVOID_V8DI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3DIV8DI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_gatheraltsiv8df ",
+@@ -35767,100 +35767,100 @@
+ 	       IX86_BUILTIN_GATHER3ALTDIV16SI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_scattersiv16sf",
+-	       VOID_FTYPE_PFLOAT_HI_V16SI_V16SF_INT,
++	       VOID_FTYPE_PVOID_HI_V16SI_V16SF_INT,
+ 	       IX86_BUILTIN_SCATTERSIV16SF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_scattersiv8df",
+-	       VOID_FTYPE_PDOUBLE_QI_V8SI_V8DF_INT,
++	       VOID_FTYPE_PVOID_QI_V8SI_V8DF_INT,
+ 	       IX86_BUILTIN_SCATTERSIV8DF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_scatterdiv16sf",
+-	       VOID_FTYPE_PFLOAT_QI_V8DI_V8SF_INT,
++	       VOID_FTYPE_PVOID_QI_V8DI_V8SF_INT,
+ 	       IX86_BUILTIN_SCATTERDIV16SF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_scatterdiv8df",
+-	       VOID_FTYPE_PDOUBLE_QI_V8DI_V8DF_INT,
++	       VOID_FTYPE_PVOID_QI_V8DI_V8DF_INT,
+ 	       IX86_BUILTIN_SCATTERDIV8DF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_scattersiv16si",
+-	       VOID_FTYPE_PINT_HI_V16SI_V16SI_INT,
++	       VOID_FTYPE_PVOID_HI_V16SI_V16SI_INT,
+ 	       IX86_BUILTIN_SCATTERSIV16SI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_scattersiv8di",
+-	       VOID_FTYPE_PLONGLONG_QI_V8SI_V8DI_INT,
++	       VOID_FTYPE_PVOID_QI_V8SI_V8DI_INT,
+ 	       IX86_BUILTIN_SCATTERSIV8DI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_scatterdiv16si",
+-	       VOID_FTYPE_PINT_QI_V8DI_V8SI_INT,
++	       VOID_FTYPE_PVOID_QI_V8DI_V8SI_INT,
+ 	       IX86_BUILTIN_SCATTERDIV16SI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_scatterdiv8di",
+-	       VOID_FTYPE_PLONGLONG_QI_V8DI_V8DI_INT,
++	       VOID_FTYPE_PVOID_QI_V8DI_V8DI_INT,
+ 	       IX86_BUILTIN_SCATTERDIV8DI);
+ 
+   /* AVX512VL */
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3siv2df",
+-	       V2DF_FTYPE_V2DF_PCDOUBLE_V4SI_QI_INT,
++	       V2DF_FTYPE_V2DF_PCVOID_V4SI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3SIV2DF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3siv4df",
+-	       V4DF_FTYPE_V4DF_PCDOUBLE_V4SI_QI_INT,
++	       V4DF_FTYPE_V4DF_PCVOID_V4SI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3SIV4DF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3div2df",
+-	       V2DF_FTYPE_V2DF_PCDOUBLE_V2DI_QI_INT,
++	       V2DF_FTYPE_V2DF_PCVOID_V2DI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3DIV2DF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3div4df",
+-	       V4DF_FTYPE_V4DF_PCDOUBLE_V4DI_QI_INT,
++	       V4DF_FTYPE_V4DF_PCVOID_V4DI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3DIV4DF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3siv4sf",
+-	       V4SF_FTYPE_V4SF_PCFLOAT_V4SI_QI_INT,
++	       V4SF_FTYPE_V4SF_PCVOID_V4SI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3SIV4SF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3siv8sf",
+-	       V8SF_FTYPE_V8SF_PCFLOAT_V8SI_QI_INT,
++	       V8SF_FTYPE_V8SF_PCVOID_V8SI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3SIV8SF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3div4sf",
+-	       V4SF_FTYPE_V4SF_PCFLOAT_V2DI_QI_INT,
++	       V4SF_FTYPE_V4SF_PCVOID_V2DI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3DIV4SF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3div8sf",
+-	       V4SF_FTYPE_V4SF_PCFLOAT_V4DI_QI_INT,
++	       V4SF_FTYPE_V4SF_PCVOID_V4DI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3DIV8SF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3siv2di",
+-	       V2DI_FTYPE_V2DI_PCINT64_V4SI_QI_INT,
++	       V2DI_FTYPE_V2DI_PCVOID_V4SI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3SIV2DI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3siv4di",
+-	       V4DI_FTYPE_V4DI_PCINT64_V4SI_QI_INT,
++	       V4DI_FTYPE_V4DI_PCVOID_V4SI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3SIV4DI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3div2di",
+-	       V2DI_FTYPE_V2DI_PCINT64_V2DI_QI_INT,
++	       V2DI_FTYPE_V2DI_PCVOID_V2DI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3DIV2DI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3div4di",
+-	       V4DI_FTYPE_V4DI_PCINT64_V4DI_QI_INT,
++	       V4DI_FTYPE_V4DI_PCVOID_V4DI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3DIV4DI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3siv4si",
+-	       V4SI_FTYPE_V4SI_PCINT_V4SI_QI_INT,
++	       V4SI_FTYPE_V4SI_PCVOID_V4SI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3SIV4SI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3siv8si",
+-	       V8SI_FTYPE_V8SI_PCINT_V8SI_QI_INT,
++	       V8SI_FTYPE_V8SI_PCVOID_V8SI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3SIV8SI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3div4si",
+-	       V4SI_FTYPE_V4SI_PCINT_V2DI_QI_INT,
++	       V4SI_FTYPE_V4SI_PCVOID_V2DI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3DIV4SI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3div8si",
+-	       V4SI_FTYPE_V4SI_PCINT_V4DI_QI_INT,
++	       V4SI_FTYPE_V4SI_PCVOID_V4DI_QI_INT,
+ 	       IX86_BUILTIN_GATHER3DIV8SI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_gather3altsiv4df ",
+@@ -35880,67 +35880,67 @@
+ 	       IX86_BUILTIN_GATHER3ALTDIV8SI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_scattersiv8sf",
+-	       VOID_FTYPE_PFLOAT_QI_V8SI_V8SF_INT,
++	       VOID_FTYPE_PVOID_QI_V8SI_V8SF_INT,
+ 	       IX86_BUILTIN_SCATTERSIV8SF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_scattersiv4sf",
+-	       VOID_FTYPE_PFLOAT_QI_V4SI_V4SF_INT,
++	       VOID_FTYPE_PVOID_QI_V4SI_V4SF_INT,
+ 	       IX86_BUILTIN_SCATTERSIV4SF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_scattersiv4df",
+-	       VOID_FTYPE_PDOUBLE_QI_V4SI_V4DF_INT,
++	       VOID_FTYPE_PVOID_QI_V4SI_V4DF_INT,
+ 	       IX86_BUILTIN_SCATTERSIV4DF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_scattersiv2df",
+-	       VOID_FTYPE_PDOUBLE_QI_V4SI_V2DF_INT,
++	       VOID_FTYPE_PVOID_QI_V4SI_V2DF_INT,
+ 	       IX86_BUILTIN_SCATTERSIV2DF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_scatterdiv8sf",
+-	       VOID_FTYPE_PFLOAT_QI_V4DI_V4SF_INT,
++	       VOID_FTYPE_PVOID_QI_V4DI_V4SF_INT,
+ 	       IX86_BUILTIN_SCATTERDIV8SF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_scatterdiv4sf",
+-	       VOID_FTYPE_PFLOAT_QI_V2DI_V4SF_INT,
++	       VOID_FTYPE_PVOID_QI_V2DI_V4SF_INT,
+ 	       IX86_BUILTIN_SCATTERDIV4SF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_scatterdiv4df",
+-	       VOID_FTYPE_PDOUBLE_QI_V4DI_V4DF_INT,
++	       VOID_FTYPE_PVOID_QI_V4DI_V4DF_INT,
+ 	       IX86_BUILTIN_SCATTERDIV4DF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_scatterdiv2df",
+-	       VOID_FTYPE_PDOUBLE_QI_V2DI_V2DF_INT,
++	       VOID_FTYPE_PVOID_QI_V2DI_V2DF_INT,
+ 	       IX86_BUILTIN_SCATTERDIV2DF);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_scattersiv8si",
+-	       VOID_FTYPE_PINT_QI_V8SI_V8SI_INT,
++	       VOID_FTYPE_PVOID_QI_V8SI_V8SI_INT,
+ 	       IX86_BUILTIN_SCATTERSIV8SI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_scattersiv4si",
+-	       VOID_FTYPE_PINT_QI_V4SI_V4SI_INT,
++	       VOID_FTYPE_PVOID_QI_V4SI_V4SI_INT,
+ 	       IX86_BUILTIN_SCATTERSIV4SI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_scattersiv4di",
+-	       VOID_FTYPE_PLONGLONG_QI_V4SI_V4DI_INT,
++	       VOID_FTYPE_PVOID_QI_V4SI_V4DI_INT,
+ 	       IX86_BUILTIN_SCATTERSIV4DI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_scattersiv2di",
+-	       VOID_FTYPE_PLONGLONG_QI_V4SI_V2DI_INT,
++	       VOID_FTYPE_PVOID_QI_V4SI_V2DI_INT,
+ 	       IX86_BUILTIN_SCATTERSIV2DI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_scatterdiv8si",
+-	       VOID_FTYPE_PINT_QI_V4DI_V4SI_INT,
++	       VOID_FTYPE_PVOID_QI_V4DI_V4SI_INT,
+ 	       IX86_BUILTIN_SCATTERDIV8SI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_scatterdiv4si",
+-	       VOID_FTYPE_PINT_QI_V2DI_V4SI_INT,
++	       VOID_FTYPE_PVOID_QI_V2DI_V4SI_INT,
+ 	       IX86_BUILTIN_SCATTERDIV4SI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_scatterdiv4di",
+-	       VOID_FTYPE_PLONGLONG_QI_V4DI_V4DI_INT,
++	       VOID_FTYPE_PVOID_QI_V4DI_V4DI_INT,
+ 	       IX86_BUILTIN_SCATTERDIV4DI);
+ 
+   def_builtin (OPTION_MASK_ISA_AVX512VL, "__builtin_ia32_scatterdiv2di",
+-	       VOID_FTYPE_PLONGLONG_QI_V2DI_V2DI_INT,
++	       VOID_FTYPE_PVOID_QI_V2DI_V2DI_INT,
+ 	       IX86_BUILTIN_SCATTERDIV2DI);
+   def_builtin (OPTION_MASK_ISA_AVX512F, "__builtin_ia32_scatteraltsiv8df ",
+ 	       VOID_FTYPE_PDOUBLE_QI_V16SI_V8DF_INT,
+@@ -35960,28 +35960,28 @@
+ 
+   /* AVX512PF */
+   def_builtin (OPTION_MASK_ISA_AVX512PF, "__builtin_ia32_gatherpfdpd",
+-	       VOID_FTYPE_QI_V8SI_PCINT64_INT_INT,
++	       VOID_FTYPE_QI_V8SI_PCVOID_INT_INT,
+ 	       IX86_BUILTIN_GATHERPFDPD);
+   def_builtin (OPTION_MASK_ISA_AVX512PF, "__builtin_ia32_gatherpfdps",
+-	       VOID_FTYPE_HI_V16SI_PCINT_INT_INT,
++	       VOID_FTYPE_HI_V16SI_PCVOID_INT_INT,
+ 	       IX86_BUILTIN_GATHERPFDPS);
+   def_builtin (OPTION_MASK_ISA_AVX512PF, "__builtin_ia32_gatherpfqpd",
+-	       VOID_FTYPE_QI_V8DI_PCINT64_INT_INT,
++	       VOID_FTYPE_QI_V8DI_PCVOID_INT_INT,
+ 	       IX86_BUILTIN_GATHERPFQPD);
+   def_builtin (OPTION_MASK_ISA_AVX512PF, "__builtin_ia32_gatherpfqps",
+-	       VOID_FTYPE_QI_V8DI_PCINT_INT_INT,
++	       VOID_FTYPE_QI_V8DI_PCVOID_INT_INT,
+ 	       IX86_BUILTIN_GATHERPFQPS);
+   def_builtin (OPTION_MASK_ISA_AVX512PF, "__builtin_ia32_scatterpfdpd",
+-	       VOID_FTYPE_QI_V8SI_PCINT64_INT_INT,
++	       VOID_FTYPE_QI_V8SI_PCVOID_INT_INT,
+ 	       IX86_BUILTIN_SCATTERPFDPD);
+   def_builtin (OPTION_MASK_ISA_AVX512PF, "__builtin_ia32_scatterpfdps",
+-	       VOID_FTYPE_HI_V16SI_PCINT_INT_INT,
++	       VOID_FTYPE_HI_V16SI_PCVOID_INT_INT,
+ 	       IX86_BUILTIN_SCATTERPFDPS);
+   def_builtin (OPTION_MASK_ISA_AVX512PF, "__builtin_ia32_scatterpfqpd",
+-	       VOID_FTYPE_QI_V8DI_PCINT64_INT_INT,
++	       VOID_FTYPE_QI_V8DI_PCVOID_INT_INT,
+ 	       IX86_BUILTIN_SCATTERPFQPD);
+   def_builtin (OPTION_MASK_ISA_AVX512PF, "__builtin_ia32_scatterpfqps",
+-	       VOID_FTYPE_QI_V8DI_PCINT_INT_INT,
++	       VOID_FTYPE_QI_V8DI_PCVOID_INT_INT,
+ 	       IX86_BUILTIN_SCATTERPFQPS);
+ 
+   /* SHA */
 Index: gcc/config/tilegx/tilegx.c
 ===================================================================
 --- a/src/gcc/config/tilegx/tilegx.c	(.../tags/gcc_6_3_0_release)
@@ -48417,7 +53694,15 @@ Index: gcc/config/rs6000/rs6000.c
    else if ((fnmask & (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
  	   == (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
      error ("Builtin function %s requires the -mhard-float and"
-@@ -23084,9 +23107,7 @@
+@@ -17057,6 +17080,7 @@
+       break;
+ 
+       /* unsigned args, signed return.  */
++    case VSX_BUILTIN_XVCVUXDSP:
+     case VSX_BUILTIN_XVCVUXDDP_UNS:
+     case ALTIVEC_BUILTIN_UNSFLOAT_V4SI_V4SF:
+       h.uns_p[1] = 1;
+@@ -23084,9 +23108,7 @@
    rtx dest_di = (d_mode == DImode) ? dest : gen_lowpart (DImode, dest);
    rtx shift_reg = dest_di;
  
@@ -48428,7 +53713,7 @@ Index: gcc/config/rs6000/rs6000.c
  
    if (MEM_P (src))
      {
-@@ -23098,17 +23119,20 @@
+@@ -23098,17 +23120,20 @@
  
    else
      {
@@ -48457,7 +53742,7 @@ Index: gcc/config/rs6000/rs6000.c
      }
  
    emit_insn (gen_lshrdi3 (dest_di, shift_reg, GEN_INT (63)));
-@@ -38564,6 +38588,7 @@
+@@ -38564,6 +38589,7 @@
  	  case UNSPEC_VSX_CVSPDPN:
  	    return 0;
  	  case UNSPEC_VSPLT_DIRECT:
@@ -48465,7 +53750,7 @@ Index: gcc/config/rs6000/rs6000.c
  	    *special = SH_SPLAT;
  	    return 1;
  	  case UNSPEC_REDUC_PLUS:
-@@ -38634,6 +38659,12 @@
+@@ -38634,6 +38660,12 @@
      {
        if (GET_CODE (body) == SET)
  	{
@@ -48478,7 +53763,7 @@ Index: gcc/config/rs6000/rs6000.c
  	  *special = SH_NOSWAP_LD;
  	  return 1;
  	}
-@@ -38645,6 +38676,12 @@
+@@ -38645,6 +38677,12 @@
      {
        if (GET_CODE (body) == SET && GET_CODE (SET_SRC (body)) != UNSPEC)
  	{
@@ -48491,6 +53776,36 @@ Index: gcc/config/rs6000/rs6000.c
  	  *special = SH_NOSWAP_ST;
  	  return 1;
  	}
+Index: gcc/config/rs6000/vsx.md
+===================================================================
+--- a/src/gcc/config/rs6000/vsx.md	(.../tags/gcc_6_3_0_release)
++++ b/src/gcc/config/rs6000/vsx.md	(.../branches/gcc-6-branch)
+@@ -1827,8 +1827,8 @@
+   [(set_attr "type" "vecdouble")])
+ 
+ (define_insn "vsx_xvcvsxdsp"
+-  [(set (match_operand:V4SI 0 "vsx_register_operand" "=wd,?wa")
+-	(unspec:V4SI [(match_operand:V2DF 1 "vsx_register_operand" "wf,wa")]
++  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wd,?wa")
++	(unspec:V4SF [(match_operand:V2DI 1 "vsx_register_operand" "wf,wa")]
+ 		     UNSPEC_VSX_CVSXDSP))]
+   "VECTOR_UNIT_VSX_P (V2DFmode)"
+   "xvcvsxdsp %x0,%x1"
+@@ -1835,11 +1835,11 @@
+   [(set_attr "type" "vecfloat")])
+ 
+ (define_insn "vsx_xvcvuxdsp"
+-  [(set (match_operand:V4SI 0 "vsx_register_operand" "=wd,?wa")
+-	(unspec:V4SI [(match_operand:V2DF 1 "vsx_register_operand" "wf,wa")]
++  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wd,?wa")
++	(unspec:V4SF [(match_operand:V2DI 1 "vsx_register_operand" "wf,wa")]
+ 		     UNSPEC_VSX_CVUXDSP))]
+   "VECTOR_UNIT_VSX_P (V2DFmode)"
+-  "xvcvuxwdp %x0,%x1"
++  "xvcvuxdsp %x0,%x1"
+   [(set_attr "type" "vecdouble")])
+ 
+ ;; Convert from 32-bit to 64-bit types
 Index: gcc/config/rs6000/rs6000.h
 ===================================================================
 --- a/src/gcc/config/rs6000/rs6000.h	(.../tags/gcc_6_3_0_release)
@@ -48570,6 +53885,26 @@ Index: gcc/config/rs6000/rs6000.md
  		    (const_int 0)]
  		   UNSPEC_SIGNBIT))]
    "TARGET_POWERPC64 && TARGET_DIRECT_MOVE"
+@@ -5415,17 +5429,10 @@
+   [(set_attr "length" "12")
+    (set_attr "type" "fp")])
+ 
+-(define_expand "fixuns_trunc<mode>di2"
+-  [(set (match_operand:DI 0 "register_operand" "")
+-	(unsigned_fix:DI (match_operand:SFDF 1 "register_operand" "")))]
+-  "TARGET_HARD_FLOAT && (TARGET_FCTIDUZ || VECTOR_UNIT_VSX_P (<MODE>mode))"
+-  "")
+-
+-(define_insn "*fixuns_trunc<mode>di2_fctiduz"
++(define_insn "fixuns_trunc<mode>di2"
+   [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wi")
+ 	(unsigned_fix:DI (match_operand:SFDF 1 "gpc_reg_operand" "<Ff>,<Fa>")))]
+-  "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && TARGET_FPRS
+-    && TARGET_FCTIDUZ"
++  "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && TARGET_FPRS && TARGET_FCTIDUZ"
+   "@
+    fctiduz %0,%1
+    xscvdpuxds %x0,%x1"
 Index: gcc/config/rs6000/altivec.h
 ===================================================================
 --- a/src/gcc/config/rs6000/altivec.h	(.../tags/gcc_6_3_0_release)

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



More information about the Reproducible-commits mailing list