-Index: libstdc++-v3/python/libstdcxx/v6/printers.py
-===================================================================
---- libstdc++-v3/python/libstdcxx/v6/printers.py (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/python/libstdcxx/v6/printers.py (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,4 +1,4 @@
--# Pretty-printers for libstc++.
-+# Pretty-printers for libstdc++.
-
- # Copyright (C) 2008-2013 Free Software Foundation, Inc.
-
-@@ -18,7 +18,51 @@
- import gdb
- import itertools
- import re
-+import sys
-
-+### Python 2 + Python 3 compatibility code
+Index: libquadmath/configure
+===================================================================
+--- libquadmath/configure (.../tags/gcc_4_8_4_release) (revision 220382)
++++ libquadmath/configure (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -613,7 +613,6 @@
+ LIBQUAD_USE_SYMVER_TRUE
+ toolexeclibdir
+ toolexecdir
+-multi_basedir
+ MAINT
+ MAINTAINER_MODE_FALSE
+ MAINTAINER_MODE_TRUE
+@@ -682,6 +681,7 @@
+ INSTALL_DATA
+ INSTALL_SCRIPT
+ INSTALL_PROGRAM
++multi_basedir
+ target_noncanonical
+ target_os
+ target_vendor
+@@ -736,6 +736,7 @@
+ ac_subst_files=''
+ ac_user_opts='
+ enable_option_checking
++enable_multilib
+ enable_version_specific_runtime_libs
+ enable_dependency_tracking
+ with_bugurl
+@@ -746,7 +747,6 @@
+ with_gnu_ld
+ enable_libtool_lock
+ enable_maintainer_mode
+-enable_multilib
+ enable_symvers
+ enable_generated_files_in_srcdir
+ '
+@@ -1379,6 +1379,7 @@
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
++ --enable-multilib build many library versions (default)
+ --enable-version-specific-runtime-libs
+ specify that runtime libraries should be installed
+ in a compiler-specific directory
+@@ -1391,7 +1392,6 @@
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+- --enable-multilib build many library versions (default)
+ --disable-symvers disable symbol versioning for libquadmath
+ --enable-generated-files-in-srcdir
+ put copies of generated files in source dir intended
+@@ -2370,6 +2370,44 @@
+
+
+
++# Default to --enable-multilib
++# Check whether --enable-multilib was given.
++if test "${enable_multilib+set}" = set; then :
++ enableval=$enable_multilib; case "$enableval" in
++ yes) multilib=yes ;;
++ no) multilib=no ;;
++ *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;;
++ esac
++else
++ multilib=yes
++fi
+
-+# Resources about compatibility:
-+#
-+# * <http://pythonhosted.org/six/>: Documentation of the "six" module
+
-+# FIXME: The handling of e.g. std::basic_string (at least on char)
-+# probably needs updating to work with Python 3's new string rules.
-+#
-+# In particular, Python 3 has a separate type (called byte) for
-+# bytestrings, and a special b"" syntax for the byte literals; the old
-+# str() type has been redefined to always store Unicode text.
-+#
-+# We probably can't do much about this until this GDB PR is addressed:
-+# <https://sourceware.org/bugzilla/show_bug.cgi?id=17138>
++# We may get other options which we leave undocumented:
++# --with-target-subdir, --with-multisrctop, --with-multisubdir
++# See config-ml.in if you want the gory details.
+
-+if sys.version_info[0] > 2:
-+ ### Python 3 stuff
-+ Iterator = object
-+ # Python 3 folds these into the normal functions.
-+ imap = map
-+ izip = zip
-+ # Also, int subsumes long
-+ long = int
-+else:
-+ ### Python 2 stuff
-+ class Iterator:
-+ """Compatibility mixin for iterators
++if test "$srcdir" = "."; then
++ if test "$with_target_subdir" != "."; then
++ multi_basedir="$srcdir/$with_multisrctop../.."
++ else
++ multi_basedir="$srcdir/$with_multisrctop.."
++ fi
++else
++ multi_basedir="$srcdir/.."
++fi
+
-+ Instead of writing next() methods for iterators, write
-+ __next__() methods and use this mixin to make them work in
-+ Python 2 as well as Python 3.
+
-+ Idea stolen from the "six" documentation:
-+ <http://pythonhosted.org/six/#six.Iterator>
-+ """
++# Even if the default multilib is not a cross compilation,
++# it may be that some of the other multilibs are.
++if test $cross_compiling = no && test $multilib = yes \
++ && test "x${with_multisubdir}" != x ; then
++ cross_compiling=maybe
++fi
+
-+ def next(self):
-+ return self.__next__()
++ac_config_commands="$ac_config_commands default-1"
+
-+ # In Python 2, we still need these from itertools
-+ from itertools import imap, izip
+
- # Try to use the new-style pretty-printing if available.
- _use_gdb_pp = True
- try:
-@@ -51,7 +95,7 @@
- # anything fancier here.
- field = typ.fields()[0]
- if not field.is_base_class:
-- raise ValueError, "Cannot find type %s::%s" % (str(orig), name)
-+ raise ValueError("Cannot find type %s::%s" % (str(orig), name))
- typ = field.type
-
- class SharedPointerPrinter:
-@@ -87,7 +131,7 @@
- class StdListPrinter:
- "Print a std::list"
-
-- class _iterator:
-+ class _iterator(Iterator):
- def __init__(self, nodetype, head):
- self.nodetype = nodetype
- self.base = head['_M_next']
-@@ -97,7 +141,7 @@
- def __iter__(self):
- return self
-
-- def next(self):
-+ def __next__(self):
- if self.base == self.head:
- raise StopIteration
- elt = self.base.cast(self.nodetype).dereference()
-@@ -135,7 +179,7 @@
- class StdSlistPrinter:
- "Print a __gnu_cxx::slist"
-
-- class _iterator:
-+ class _iterator(Iterator):
- def __init__(self, nodetype, head):
- self.nodetype = nodetype
- self.base = head['_M_head']['_M_next']
-@@ -144,7 +188,7 @@
- def __iter__(self):
- return self
-
-- def next(self):
-+ def __next__(self):
- if self.base == 0:
- raise StopIteration
- elt = self.base.cast(self.nodetype).dereference()
-@@ -180,7 +224,7 @@
- class StdVectorPrinter:
- "Print a std::vector"
-
-- class _iterator:
-+ class _iterator(Iterator):
- def __init__ (self, start, finish, bitvec):
- self.bitvec = bitvec
- if bitvec:
-@@ -198,7 +242,7 @@
- def __iter__(self):
- return self
-
-- def next(self):
-+ def __next__(self):
- count = self.count
- self.count = self.count + 1
- if self.bitvec:
-@@ -265,7 +309,7 @@
- class StdTuplePrinter:
- "Print a std::tuple"
-
-- class _iterator:
-+ class _iterator(Iterator):
- def __init__ (self, head):
- self.head = head
+ target_alias=${target_alias-$host_alias}
-@@ -276,13 +320,13 @@
- # Set the actual head to the first pair.
- self.head = self.head.cast (nodes[0].type)
- elif len (nodes) != 0:
-- raise ValueError, "Top of tuple tree does not consist of a single node."
-+ raise ValueError("Top of tuple tree does not consist of a single node.")
- self.count = 0
- def __iter__ (self):
- return self
-
-- def next (self):
-+ def __next__ (self):
- nodes = self.head.type.fields ()
- # Check for further recursions in the inheritance tree.
- if len (nodes) == 0:
-@@ -289,7 +333,7 @@
- raise StopIteration
- # Check that this iteration has an expected structure.
- if len (nodes) != 2:
-- raise ValueError, "Cannot parse more than 2 nodes in a tuple tree."
-+ raise ValueError("Cannot parse more than 2 nodes in a tuple tree.")
-
- # - Left node is the next recursion parent.
- # - Right node is the actual class contained in the tuple.
-@@ -341,7 +385,7 @@
- return self.visualizer.display_hint ()
- return None
-
--class RbtreeIterator:
-+class RbtreeIterator(Iterator):
- 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']
-@@ -353,7 +397,7 @@
- def __len__(self):
- return int (self.size)
-
-- def next(self):
-+ def __next__(self):
- if self.count == self.size:
- raise StopIteration
- result = self.node
-@@ -405,7 +449,7 @@
- "Print a std::map or std::multimap"
-
- # Turn an RbtreeIterator into a pretty-print iterator.
-- class _iter:
-+ class _iter(Iterator):
- def __init__(self, rbiter, type):
- self.rbiter = rbiter
- self.count = 0
-@@ -414,9 +458,9 @@
- def __iter__(self):
- return self
-
-- def next(self):
-+ def __next__(self):
- if self.count % 2 == 0:
-- n = self.rbiter.next()
-+ n = next(self.rbiter)
- n = n.cast(self.type).dereference()['_M_value_field']
- self.pair = n
- item = n['first']
-@@ -447,7 +491,7 @@
- "Print a std::set or std::multiset"
-
- # Turn an RbtreeIterator into a pretty-print iterator.
-- class _iter:
-+ class _iter(Iterator):
- def __init__(self, rbiter, type):
- self.rbiter = rbiter
- self.count = 0
-@@ -456,8 +500,8 @@
- def __iter__(self):
- return self
-
-- def next(self):
-- item = self.rbiter.next()
-+ def __next__(self):
-+ item = next(self.rbiter)
- item = item.cast(self.type).dereference()['_M_value_field']
- # FIXME: this is weird ... what to do?
- # Maybe a 'set' display hint?
-@@ -522,7 +566,7 @@
- class StdDequePrinter:
- "Print a std::deque"
-
-- class _iter:
-+ class _iter(Iterator):
- def __init__(self, node, start, end, last, buffer_size):
- self.node = node
- self.p = start
-@@ -534,7 +578,7 @@
- def __iter__(self):
- return self
+@@ -10527,7 +10565,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 10530 "configure"
++#line 10568 "configure"
+ #include "confdefs.h"
-- def next(self):
-+ def __next__(self):
- if self.p == self.last:
- raise StopIteration
+ #if HAVE_DLFCN_H
+@@ -10633,7 +10671,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 10636 "configure"
++#line 10674 "configure"
+ #include "confdefs.h"
-@@ -619,7 +663,7 @@
- def display_hint (self):
- return 'string'
+ #if HAVE_DLFCN_H
+@@ -10918,44 +10956,7 @@
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+-# Default to --enable-multilib
+-# Check whether --enable-multilib was given.
+-if test "${enable_multilib+set}" = set; then :
+- enableval=$enable_multilib; case "$enableval" in
+- yes) multilib=yes ;;
+- no) multilib=no ;;
+- *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;;
+- esac
+-else
+- multilib=yes
+-fi
--class Tr1HashtableIterator:
-+class Tr1HashtableIterator(Iterator):
- def __init__ (self, hash):
- self.node = hash['_M_bbegin']['_M_node']['_M_nxt']
- self.node_type = find_type(hash.type, '__node_type').pointer()
-@@ -627,7 +671,7 @@
- def __iter__ (self):
- return self
+-
+-# We may get other options which we leave undocumented:
+-# --with-target-subdir, --with-multisrctop, --with-multisubdir
+-# See config-ml.in if you want the gory details.
+-
+-if test "$srcdir" = "."; then
+- if test "$with_target_subdir" != "."; then
+- multi_basedir="$srcdir/$with_multisrctop../.."
+- else
+- multi_basedir="$srcdir/$with_multisrctop.."
+- fi
+-else
+- multi_basedir="$srcdir/.."
+-fi
+-
+-
+-# Even if the default multilib is not a cross compilation,
+-# it may be that some of the other multilibs are.
+-if test $cross_compiling = no && test $multilib = yes \
+- && test "x${with_multisubdir}" != x ; then
+- cross_compiling=maybe
+-fi
+-
+-ac_config_commands="$ac_config_commands default-1"
+-
+-
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -13644,6 +13645,20 @@
+ #
+ # INIT-COMMANDS
+ #
++
++srcdir="$srcdir"
++host="$host"
++target="$target"
++with_multisubdir="$with_multisubdir"
++with_multisrctop="$with_multisrctop"
++with_target_subdir="$with_target_subdir"
++ac_configure_args="${multilib_arg} ${ac_configure_args}"
++multi_basedir="$multi_basedir"
++CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
++CC="$CC"
++CXX="$CXX"
++GFORTRAN="$GFORTRAN"
++GCJ="$GCJ"
+ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+@@ -13906,20 +13921,6 @@
+
+
+
+-srcdir="$srcdir"
+-host="$host"
+-target="$target"
+-with_multisubdir="$with_multisubdir"
+-with_multisrctop="$with_multisrctop"
+-with_target_subdir="$with_target_subdir"
+-ac_configure_args="${multilib_arg} ${ac_configure_args}"
+-multi_basedir="$multi_basedir"
+-CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+-CC="$CC"
+-CXX="$CXX"
+-GFORTRAN="$GFORTRAN"
+-GCJ="$GCJ"
+-
+ _ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+@@ -13929,9 +13930,9 @@
+ do
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
++ "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+- "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+@@ -14517,6 +14518,14 @@
+
+
+ case $ac_file$ac_mode in
++ "default-1":C)
++# Only add multilib support code if we just rebuilt the top-level
++# Makefile.
++case " $CONFIG_FILES " in
++ *" Makefile "*)
++ ac_file=Makefile . ${multi_basedir}/config-ml.in
++ ;;
++esac ;;
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+@@ -15251,14 +15260,6 @@
+ chmod +x "$ofile"
+
+ ;;
+- "default-1":C)
+-# Only add multilib support code if we just rebuilt the top-level
+-# Makefile.
+-case " $CONFIG_FILES " in
+- *" Makefile "*)
+- ac_file=Makefile . ${multi_basedir}/config-ml.in
+- ;;
+-esac ;;
+
+ esac
+ done # for ac_tag
+Index: libquadmath/ChangeLog
+===================================================================
+--- libquadmath/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382)
++++ libquadmath/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1,3 +1,8 @@
++2015-01-26 Matthias Klose <doko@ubuntu.com>
++
++ * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
++ * configure: Regenerate.
++
+ 2014-12-19 Release Manager
+
+ * GCC 4.8.4 released.
+Index: libquadmath/configure.ac
+===================================================================
+--- libquadmath/configure.ac (.../tags/gcc_4_8_4_release) (revision 220382)
++++ libquadmath/configure.ac (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -23,6 +23,8 @@
+ AC_CANONICAL_SYSTEM
+ ACX_NONCANONICAL_TARGET
+
++AM_ENABLE_MULTILIB(, ..)
++
+ target_alias=${target_alias-$host_alias}
+ AC_SUBST(target_alias)
+
+@@ -60,7 +62,6 @@
+ AC_SUBST(enable_static)
+
+ AM_MAINTAINER_MODE
+-AM_ENABLE_MULTILIB(, ..)
+
+ AC_LANG_C
+ # The same as in boehm-gc and libstdc++. Have to borrow it from there.
+Index: libsanitizer/configure
+===================================================================
+--- libsanitizer/configure (.../tags/gcc_4_8_4_release) (revision 220382)
++++ libsanitizer/configure (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -662,7 +662,6 @@
+ MAINT
+ MAINTAINER_MODE_FALSE
+ MAINTAINER_MODE_TRUE
+-multi_basedir
+ am__untar
+ am__tar
+ AMTAR
+@@ -701,6 +700,7 @@
+ build_vendor
+ build_cpu
+ build
++multi_basedir
+ target_alias
+ host_alias
+ build_alias
+@@ -742,8 +742,8 @@
+ ac_subst_files=''
+ ac_user_opts='
+ enable_option_checking
++enable_multilib
+ enable_version_specific_runtime_libs
+-enable_multilib
+ enable_maintainer_mode
+ enable_dependency_tracking
+ enable_shared
+@@ -1388,8 +1388,8 @@
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
++ --enable-multilib build many library versions (default)
+ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory
+- --enable-multilib build many library versions (default)
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+ --disable-dependency-tracking speeds up one-time build
+@@ -2417,6 +2417,44 @@
+
+
+
++# Default to --enable-multilib
++# Check whether --enable-multilib was given.
++if test "${enable_multilib+set}" = set; then :
++ enableval=$enable_multilib; case "$enableval" in
++ yes) multilib=yes ;;
++ no) multilib=no ;;
++ *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;;
++ esac
++else
++ multilib=yes
++fi
++
++
++# We may get other options which we leave undocumented:
++# --with-target-subdir, --with-multisrctop, --with-multisubdir
++# See config-ml.in if you want the gory details.
++
++if test "$srcdir" = "."; then
++ if test "$with_target_subdir" != "."; then
++ multi_basedir="$srcdir/$with_multisrctop../.."
++ else
++ multi_basedir="$srcdir/$with_multisrctop.."
++ fi
++else
++ multi_basedir="$srcdir/.."
++fi
++
++
++# Even if the default multilib is not a cross compilation,
++# it may be that some of the other multilibs are.
++if test $cross_compiling = no && test $multilib = yes \
++ && test "x${with_multisubdir}" != x ; then
++ cross_compiling=maybe
++fi
++
++ac_config_commands="$ac_config_commands default-1"
++
++
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-version-specific-runtime-libs" >&5
+ $as_echo_n "checking for --enable-version-specific-runtime-libs... " >&6; }
+ # Check whether --enable-version-specific-runtime-libs was given.
+@@ -3078,44 +3116,7 @@
-- def next (self):
-+ def __next__ (self):
- if self.node == 0:
- raise StopIteration
- node = self.node.cast(self.node_type)
-@@ -655,8 +699,8 @@
- return '[%d]' % i
- def children (self):
-- counter = itertools.imap (self.format_count, itertools.count())
-- return itertools.izip (counter, Tr1HashtableIterator (self.hashtable()))
-+ counter = imap (self.format_count, itertools.count())
-+ return izip (counter, Tr1HashtableIterator (self.hashtable()))
- class Tr1UnorderedMapPrinter:
- "Print a tr1::unordered_map"
-@@ -688,11 +732,11 @@
- return '[%d]' % i
+-# Default to --enable-multilib
+-# Check whether --enable-multilib was given.
+-if test "${enable_multilib+set}" = set; then :
+- enableval=$enable_multilib; case "$enableval" in
+- yes) multilib=yes ;;
+- no) multilib=no ;;
+- *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;;
+- esac
+-else
+- multilib=yes
+-fi
- def children (self):
-- counter = itertools.imap (self.format_count, itertools.count())
-+ counter = imap (self.format_count, itertools.count())
- # Map over the hash table and flatten the result.
-- data = self.flatten (itertools.imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
-+ data = self.flatten (imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
- # Zip the two iterators together.
-- return itertools.izip (counter, data)
-+ return izip (counter, data)
+-
+-# We may get other options which we leave undocumented:
+-# --with-target-subdir, --with-multisrctop, --with-multisubdir
+-# See config-ml.in if you want the gory details.
+-
+-if test "$srcdir" = "."; then
+- if test "$with_target_subdir" != "."; then
+- multi_basedir="$srcdir/$with_multisrctop../.."
+- else
+- multi_basedir="$srcdir/$with_multisrctop.."
+- fi
+-else
+- multi_basedir="$srcdir/.."
+-fi
+-
+-
+-# Even if the default multilib is not a cross compilation,
+-# it may be that some of the other multilibs are.
+-if test $cross_compiling = no && test $multilib = yes \
+- && test "x${with_multisubdir}" != x ; then
+- cross_compiling=maybe
+-fi
+-
+-ac_config_commands="$ac_config_commands default-1"
+-
+-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+ $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+@@ -11117,7 +11118,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 11120 "configure"
++#line 11121 "configure"
+ #include "confdefs.h"
- def display_hint (self):
- return 'map'
-@@ -700,7 +744,7 @@
- class StdForwardListPrinter:
- "Print a std::forward_list"
+ #if HAVE_DLFCN_H
+@@ -11223,7 +11224,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 11226 "configure"
++#line 11227 "configure"
+ #include "confdefs.h"
-- class _iterator:
-+ class _iterator(Iterator):
- def __init__(self, nodetype, head):
- self.nodetype = nodetype
- self.base = head['_M_next']
-@@ -709,7 +753,7 @@
- def __iter__(self):
- return self
+ #if HAVE_DLFCN_H
+Index: libsanitizer/ChangeLog
+===================================================================
+--- libsanitizer/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382)
++++ libsanitizer/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1,3 +1,8 @@
++2015-01-27 Matthias Klose <doko@ubuntu.com>
++
++ * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
++ * configure: Regenerate.
++
+ 2014-12-19 Release Manager
-- def next(self):
-+ def __next__(self):
- if self.base == 0:
- raise StopIteration
- elt = self.base.cast(self.nodetype).dereference()
-@@ -764,7 +808,7 @@
- # A small sanity check.
- # FIXME
- if not self.compiled_rx.match(name + '<>'):
-- raise ValueError, 'libstdc++ programming error: "%s" does not match' % name
-+ raise ValueError('libstdc++ programming error: "%s" does not match' % name)
- printer = RxPrinter(name, function)
- self.subprinters.append(printer)
- self.lookup[name] = printer
-Index: libstdc++-v3/scripts/run_doxygen
+ * GCC 4.8.4 released.
+Index: libsanitizer/configure.ac
===================================================================
---- libstdc++-v3/scripts/run_doxygen (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/scripts/run_doxygen (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -193,8 +193,15 @@
- if $do_latex; then
- cd ${outdir}/${mode}
+--- libsanitizer/configure.ac (.../tags/gcc_4_8_4_release) (revision 220382)
++++ libsanitizer/configure.ac (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -5,6 +5,8 @@
+ AC_INIT(package-unused, version-unused, libsanitizer)
+ AC_CONFIG_SRCDIR([include/sanitizer/common_interface_defs.h])
-- # Also drop in the header file and style sheet
-- doxygen -w latex header.tex doxygen.sty
-+ # Grrr, Doxygen 1.8.x changed the -w latex options.
-+ need_footer=`doxygen -h | sed -n -e '/-w latex/s=.*footer.*=true=p'`
++AM_ENABLE_MULTILIB(, ..)
+
-+ # Also drop in the header file (maybe footer file) and style sheet
-+ if $need_footer; then
-+ doxygen -w latex header.tex footer.tex doxygen.sty
-+ else
-+ doxygen -w latex header.tex doxygen.sty
-+ fi
-
- echo ::
- echo :: LaTeX pages begin with
-Index: libstdc++-v3/doc/xml/manual/containers.xml
-===================================================================
---- libstdc++-v3/doc/xml/manual/containers.xml (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/doc/xml/manual/containers.xml (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -25,8 +25,9 @@
- <section xml:id="sequences.list.size" xreflabel="list::size() is O(n)"><info><title>list::size() is O(n)</title></info>
-
- <para>
-- Yes it is, and that's okay. This is a decision that we preserved
-- when we imported SGI's STL implementation. The following is
-+ Yes it is, and that was okay until the 2011 edition of the C++ standard.
-+ In future GCC will change it to O(1) but O(N) was a decision that we
-+ preserved when we imported SGI's STL implementation. The following is
- quoted from <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.sgi.com/tech/stl/FAQ.html">their FAQ</link>:
- </para>
- <blockquote>
-@@ -72,26 +73,6 @@
- </section>
- </section>
+ AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
+ AC_ARG_ENABLE(version-specific-runtime-libs,
+ [ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
+@@ -24,7 +26,6 @@
+ GCC_LIBSTDCXX_RAW_CXX_FLAGS
--<section xml:id="containers.sequences.vector" xreflabel="vector"><info><title>vector</title></info>
--<?dbhtml filename="vector.html"?>
--
-- <para>
-- </para>
-- <section xml:id="sequences.vector.management" xreflabel="Space Overhead Management"><info><title>Space Overhead Management</title></info>
--
-- <para>
-- In <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html">this
-- message to the list</link>, Daniel Kostecky announced work on an
-- alternate form of <code>std::vector</code> that would support
-- hints on the number of elements to be over-allocated. The design
-- was also described, along with possible implementation choices.
-- </para>
-- <para>
-- The first two alpha releases were announced <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00048.html">here</link>
-- and <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html">here</link>.
-- </para>
--
-- </section></section>
- </section>
+ AM_INIT_AUTOMAKE(foreign no-dist)
+-AM_ENABLE_MULTILIB(, ..)
+ AM_MAINTAINER_MODE
- <!-- Sect1 02 : Associative -->
-Index: libstdc++-v3/doc/xml/manual/status_cxx2011.xml
-===================================================================
---- libstdc++-v3/doc/xml/manual/status_cxx2011.xml (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/doc/xml/manual/status_cxx2011.xml (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -226,10 +226,12 @@
- <entry/>
- </row>
- <row>
-+ <?dbhtml bgcolor="#B0B0B0" ?>
- <entry>18.8.6</entry>
- <entry><code>nested_exception</code></entry>
-- <entry>Y</entry>
-- <entry/>
-+ <entry>Partial</entry>
-+ <entry>Follows an earlier C++0x draft, not the final specification.
-+ </entry>
- </row>
- <row>
- <entry>18.9</entry>
-@@ -612,10 +614,11 @@
- <entry/>
- </row>
- <row>
-+ <?dbhtml bgcolor="#B0B0B0" ?>
- <entry>20.6.12.4</entry>
- <entry><code>uninitialized_fill_n</code></entry>
-- <entry>Y</entry>
-- <entry/>
-+ <entry>Partial</entry>
-+ <entry>Returns <code>void</code>.</entry>
- </row>
- <row>
- <entry>20.6.13</entry>
-@@ -1119,10 +1122,13 @@
- <entry/>
- </row>
- <row>
-+ <?dbhtml bgcolor="#B0B0B0" ?>
- <entry>21.4</entry>
- <entry>Class template <code>basic_string</code></entry>
-- <entry>Y</entry>
-- <entry/>
-+ <entry>Partial</entry>
-+ <entry>Non-conforming Copy-On-Write implementation.
-+ Missing <code>getline</code> overloads for rvalue streams.
-+ </entry>
- </row>
- <row>
- <entry>21.5</entry>
-@@ -1190,10 +1196,11 @@
- <entry/>
- </row>
- <row>
-+ <?dbhtml bgcolor="#B0B0B0" ?>
- <entry>22.3.3.1</entry>
- <entry>Character classification</entry>
-- <entry>Y</entry>
-- <entry/>
-+ <entry>Partial</entry>
-+ <entry>Missing <code>isblank</code>.</entry>
- </row>
- <row>
- <entry>22.3.3.2</entry>
-@@ -1272,16 +1279,18 @@
- <entry/>
- </row>
- <row>
-+ <?dbhtml bgcolor="#B0B0B0" ?>
- <entry>22.4.5.1</entry>
- <entry>Class template <code>time_get</code></entry>
-- <entry>Y</entry>
-- <entry/>
-+ <entry>Partial</entry>
-+ <entry>Missing <code>get</code> and <code>do_get</code></entry>
- </row>
- <row>
-+ <?dbhtml bgcolor="#B0B0B0" ?>
- <entry>22.4.5.2</entry>
- <entry>Class template <code>time_get_byname</code></entry>
-- <entry>Y</entry>
-- <entry/>
-+ <entry>Partial</entry>
-+ <entry>Likewise</entry>
- </row>
- <row>
- <entry>22.4.5.3</entry>
-@@ -1434,8 +1443,10 @@
- <entry>23.3.5</entry>
- <entry>Class template <code>list</code></entry>
- <entry>Partial</entry>
-- <entry><code>insert</code> and <code>erase</code> members do not
-- take <code>const_iterator</code> arguments (N2350).</entry>
-+ <entry>O(N) size.
-+ <code>insert</code> and <code>erase</code> members do not
-+ take <code>const_iterator</code> arguments (N2350).
-+ </entry>
- </row>
- <row>
- <?dbhtml bgcolor="#B0B0B0" ?>
-@@ -1650,10 +1661,11 @@
- <entry/>
- </row>
- <row>
-+ <?dbhtml bgcolor="#B0B0B0" ?>
- <entry>25.3</entry>
- <entry>Mutating sequence operations</entry>
-- <entry>Y</entry>
-- <entry/>
-+ <entry>Partial</entry>
-+ <entry><code>rotate</code> returns <code>void</code>.</entry>
- </row>
- <row>
- <entry>25.4</entry>
-@@ -2060,10 +2072,13 @@
- <entry/>
- </row>
- <row>
-+ <?dbhtml bgcolor="#B0B0B0" ?>
- <entry>26.8</entry>
- <entry>C Library</entry>
-- <entry>Y</entry>
-- <entry/>
-+ <entry>Partial</entry>
-+ <entry><code><ctgmath></code> doesn't include
-+ <code><ccomplex></code>
-+ </entry>
- </row>
- <row>
- <entry>
-@@ -2143,6 +2158,7 @@
- Missing move and swap operations on <code>basic_ios</code>.
- Missing <code>io_errc</code> and <code>iostream_category</code>.
- <code>ios_base::failure</code> is not derived from <code>system_error</code>.
-+ Missing <code>ios_base::hexfloat</code>.
- </entry>
- </row>
- <row>
-Index: libstdc++-v3/doc/html/index.html
-===================================================================
---- libstdc++-v3/doc/html/index.html (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/doc/html/index.html (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -43,7 +43,7 @@
- </a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="manual/localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="manual/localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#idm269999753024">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="manual/facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="manual/facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="manual/facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/containers.html">9.
- Containers
-
--</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="manual/containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="manual/associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="manual/associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="manual/unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/iterators.html">10.
-+</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="manual/associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="manual/associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="manual/unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/iterators.html">10.
- Iterators
-
- </a></span></dt><dd><dl><dt><span class="section"><a href="manual/iterators.html#std.iterators.predefined">Predefined</a></span></dt><dd><dl><dt><span class="section"><a href="manual/iterators.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="section"><a href="manual/iterators.html#iterators.predefined.end">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/algorithms.html">11.
-@@ -162,4 +162,4 @@
-
- </a></span></dt><dt><span class="appendix"><a href="manual/appendix_gpl.html">D.
- <acronym class="acronym">GNU</acronym> General Public License version 3
-- </a></span></dt><dt><span class="appendix"><a href="manual/appendix_gfdl.html">E. GNU Free Documentation License</a></span></dt></dl></dd></dl></dd><dt><span class="book"><a href="bk02.html"></a></span></dt><dd><dl><dt><span class="article"><a href="api.html">The GNU C++ Library API Reference</a></span></dt></dl></dd><dt><span class="book"><a href="bk03.html"></a></span></dt><dd><dl><dt><span class="article"><a href="faq.html">Frequently Asked Questions</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left">Â </td><td width="20%" align="center">Â </td><td width="40%" align="right">Â <a accesskey="n" href="manual/index.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Â </td><td width="20%" align="center">Â </td><td width="40%" align="right" valign="top">Â The GNU C++ Library Manual</td></tr></table></div></body></html>
-\ No newline at end of file
-+ </a></span></dt><dt><span class="appendix"><a href="manual/appendix_gfdl.html">E. GNU Free Documentation License</a></span></dt></dl></dd></dl></dd><dt><span class="book"><a href="bk02.html"></a></span></dt><dd><dl><dt><span class="article"><a href="api.html">The GNU C++ Library API Reference</a></span></dt></dl></dd><dt><span class="book"><a href="bk03.html"></a></span></dt><dd><dl><dt><span class="article"><a href="faq.html">Frequently Asked Questions</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left">Â </td><td width="20%" align="center">Â </td><td width="40%" align="right">Â <a accesskey="n" href="manual/index.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Â </td><td width="20%" align="center">Â </td><td width="40%" align="right" valign="top">Â The GNU C++ Library Manual</td></tr></table></div></body></html>
-Index: libstdc++-v3/doc/html/manual/status.html
-===================================================================
---- libstdc++-v3/doc/html/manual/status.html (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/doc/html/manual/status.html (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -165,7 +165,8 @@
- <code class="code">set_new_handler</code> is not thread-safe.
- </td></tr><tr><td align="left">18.7</td><td align="left">Type identification</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">18.7.1</td><td align="left">Class type_info</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">18.7.2</td><td align="left">Class bad_cast</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">18.7.3</td><td align="left">Class bad_typeid</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">18.8</td><td align="left">Exception handling</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">18.8.1</td><td align="left">Class exception</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">18.8.2</td><td align="left">Class bad_exception</td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">18.8.3</td><td align="left">Abnormal termination</td><td align="left">Partial</td><td align="left">Missing <code class="code">get_terminate</code>.
- <code class="code">set_terminate</code> is not thread-safe.
-- </td></tr><tr><td align="left">18.8.4</td><td align="left"><code class="code">uncaught_exception</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">18.8.5</td><td align="left">Exception Propagation</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">18.8.6</td><td align="left"><code class="code">nested_exception</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">18.9</td><td align="left">Initializer lists</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">18.9.1</td><td align="left">Initializer list constructors</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">18.9.2</td><td align="left">Initializer list access</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">18.9.3</td><td align="left">Initializer list range access</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">18.10</td><td align="left">Other runtime support</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">
-+ </td></tr><tr><td align="left">18.8.4</td><td align="left"><code class="code">uncaught_exception</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">18.8.5</td><td align="left">Exception Propagation</td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">18.8.6</td><td align="left"><code class="code">nested_exception</code></td><td align="left">Partial</td><td align="left">Follows an earlier C++0x draft, not the final specification.
-+ </td></tr><tr><td align="left">18.9</td><td align="left">Initializer lists</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">18.9.1</td><td align="left">Initializer list constructors</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">18.9.2</td><td align="left">Initializer list access</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">18.9.3</td><td align="left">Initializer list range access</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">18.10</td><td align="left">Other runtime support</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">
- <span class="emphasis"><em>19</em></span>
- </td><td colspan="3" align="left">
- <span class="emphasis"><em>Diagnostics</em></span>
-@@ -173,7 +174,7 @@
- <span class="emphasis"><em>20</em></span>
- </td><td colspan="3" align="left">
- <span class="emphasis"><em>General utilities</em></span>
-- </td></tr><tr><td align="left">20.1</td><td align="left">General</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.2</td><td align="left">Utility components</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.2.1</td><td align="left">Operators</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.2.2</td><td align="left">Swap</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.2.3</td><td align="left"><code class="code">forward</code> and <code class="code">move</code> helpers</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.2.4</td><td align="left">Function template <code class="code">declval</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.3</td><td align="left">Pairs</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.3.1</td><td align="left">In general</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.3.2</td><td align="left">Class template <code class="code">pair</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.3.3</td><td align="left">Specialized algorithms</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.3.4</td><td align="left">Tuple-like access to <code class="code">pair</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.3.5</td><td align="left">Piecewise construction</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4</td><td align="left">Tuples</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.4.1</td><td align="left">In general</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.4.2</td><td align="left">Class template <code class="code">tuple</code></td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.4.2.1</td><td align="left">Construction</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4.2.2</td><td align="left">Assignment</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4.2.3</td><td align="left">Swap</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4.2.4</td><td align="left">Tuple creation functions</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4.2.5</td><td align="left">Tuple helper classes</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4.2.6</td><td align="left">Element access</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4.2.7</td><td align="left">Relational operators</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4.2.8</td><td align="left">Tuple traits</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4.2.9</td><td align="left">Tuple specialized algorithms</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.5</td><td align="left">Class template <code class="code">bitset</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.5.1</td><td align="left"><code class="code">bitset</code> constructors</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.5.2</td><td align="left"><code class="code">bitset</code> members</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.5.3</td><td align="left"><code class="code">bitset</code> hash support</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.5.4</td><td align="left"><code class="code">bitset</code> operators</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6</td><td align="left">Memory</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.6.1</td><td align="left">In general</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.6.2</td><td align="left">Header <code class="code"><memory></code> synopsis</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.6.3</td><td align="left">Pointer traits</td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">20.6.4</td><td align="left">Pointer safety</td><td align="left">Partial</td><td align="left">Â </td></tr><tr bgcolor="#C8B0B0"><td align="left">20.6.5</td><td align="left">Align</td><td align="left">N</td><td align="left">Â </td></tr><tr><td align="left">20.6.6</td><td align="left">Allocator argument tag</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.7</td><td align="left"><code class="code">uses_allocator</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.8</td><td align="left">Allocator traits</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.9</td><td align="left">The default allocator</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.10</td><td align="left">Raw storage iterator</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.11</td><td align="left">Temporary buffers</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.12</td><td align="left">Specialized algorithms</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.6.12.1</td><td align="left"><code class="code">addressof</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.12.2</td><td align="left"><code class="code">uninitialized_copy</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.12.3</td><td align="left"><code class="code">uninitialized_fill</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.12.4</td><td align="left"><code class="code">uninitialized_fill_n</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.13</td><td align="left">C library</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.7</td><td align="left">Smart pointers</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.7.1</td><td align="left">Class template <code class="code">unique_ptr</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.7.2</td><td align="left">Shared-ownership pointers</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.7.2.1</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.7.2.2</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left">Y</td><td align="left">
-+ </td></tr><tr><td align="left">20.1</td><td align="left">General</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.2</td><td align="left">Utility components</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.2.1</td><td align="left">Operators</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.2.2</td><td align="left">Swap</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.2.3</td><td align="left"><code class="code">forward</code> and <code class="code">move</code> helpers</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.2.4</td><td align="left">Function template <code class="code">declval</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.3</td><td align="left">Pairs</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.3.1</td><td align="left">In general</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.3.2</td><td align="left">Class template <code class="code">pair</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.3.3</td><td align="left">Specialized algorithms</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.3.4</td><td align="left">Tuple-like access to <code class="code">pair</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.3.5</td><td align="left">Piecewise construction</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4</td><td align="left">Tuples</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.4.1</td><td align="left">In general</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.4.2</td><td align="left">Class template <code class="code">tuple</code></td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.4.2.1</td><td align="left">Construction</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4.2.2</td><td align="left">Assignment</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4.2.3</td><td align="left">Swap</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4.2.4</td><td align="left">Tuple creation functions</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4.2.5</td><td align="left">Tuple helper classes</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4.2.6</td><td align="left">Element access</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4.2.7</td><td align="left">Relational operators</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4.2.8</td><td align="left">Tuple traits</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.4.2.9</td><td align="left">Tuple specialized algorithms</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.5</td><td align="left">Class template <code class="code">bitset</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.5.1</td><td align="left"><code class="code">bitset</code> constructors</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.5.2</td><td align="left"><code class="code">bitset</code> members</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.5.3</td><td align="left"><code class="code">bitset</code> hash support</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.5.4</td><td align="left"><code class="code">bitset</code> operators</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6</td><td align="left">Memory</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.6.1</td><td align="left">In general</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.6.2</td><td align="left">Header <code class="code"><memory></code> synopsis</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.6.3</td><td align="left">Pointer traits</td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">20.6.4</td><td align="left">Pointer safety</td><td align="left">Partial</td><td align="left">Â </td></tr><tr bgcolor="#C8B0B0"><td align="left">20.6.5</td><td align="left">Align</td><td align="left">N</td><td align="left">Â </td></tr><tr><td align="left">20.6.6</td><td align="left">Allocator argument tag</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.7</td><td align="left"><code class="code">uses_allocator</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.8</td><td align="left">Allocator traits</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.9</td><td align="left">The default allocator</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.10</td><td align="left">Raw storage iterator</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.11</td><td align="left">Temporary buffers</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.12</td><td align="left">Specialized algorithms</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.6.12.1</td><td align="left"><code class="code">addressof</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.12.2</td><td align="left"><code class="code">uninitialized_copy</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.6.12.3</td><td align="left"><code class="code">uninitialized_fill</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">20.6.12.4</td><td align="left"><code class="code">uninitialized_fill_n</code></td><td align="left">Partial</td><td align="left">Returns <code class="code">void</code>.</td></tr><tr><td align="left">20.6.13</td><td align="left">C library</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.7</td><td align="left">Smart pointers</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">20.7.1</td><td align="left">Class template <code class="code">unique_ptr</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.7.2</td><td align="left">Shared-ownership pointers</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.7.2.1</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">20.7.2.2</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left">Y</td><td align="left">
- <p>
- Uses code from
- <a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">boost::shared_ptr</a>.
-@@ -187,14 +188,16 @@
- <span class="emphasis"><em>21</em></span>
- </td><td colspan="3" align="left">
- <span class="emphasis"><em>Strings</em></span>
-- </td></tr><tr><td align="left">21.1</td><td align="left">General</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">21.2</td><td align="left">Character traits</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">21.2.1</td><td align="left">Character traits requirements</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">21.2.2</td><td align="left">traits typedefs</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">21.2.3</td><td align="left"><code class="code">char_traits</code> specializations</td><td align="left">Â </td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.2.3.1</td><td align="left">struct <code class="code">char_traits<char></code></td><td align="left">Partial</td><td align="left">Missing constexpr</td></tr><tr bgcolor="#B0B0B0"><td align="left">21.2.3.2</td><td align="left">struct <code class="code">char_traits<char16_t></code></td><td align="left">Partial</td><td align="left">Missing constexpr</td></tr><tr><td align="left">21.2.3.3</td><td align="left">struct <code class="code">char_traits<char32_t></code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">21.2.3.4</td><td align="left">struct <code class="code">char_traits<wchar_t></code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">21.3</td><td align="left">String classes</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">21.4</td><td align="left">Class template <code class="code">basic_string</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">21.5</td><td align="left">Numeric Conversions</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">21.6</td><td align="left">Hash support</td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.7</td><td align="left">Null-terminated sequence utilities</td><td align="left">Partial</td><td align="left">C library dependency.
-+ </td></tr><tr><td align="left">21.1</td><td align="left">General</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">21.2</td><td align="left">Character traits</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">21.2.1</td><td align="left">Character traits requirements</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">21.2.2</td><td align="left">traits typedefs</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">21.2.3</td><td align="left"><code class="code">char_traits</code> specializations</td><td align="left">Â </td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.2.3.1</td><td align="left">struct <code class="code">char_traits<char></code></td><td align="left">Partial</td><td align="left">Missing constexpr</td></tr><tr bgcolor="#B0B0B0"><td align="left">21.2.3.2</td><td align="left">struct <code class="code">char_traits<char16_t></code></td><td align="left">Partial</td><td align="left">Missing constexpr</td></tr><tr><td align="left">21.2.3.3</td><td align="left">struct <code class="code">char_traits<char32_t></code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">21.2.3.4</td><td align="left">struct <code class="code">char_traits<wchar_t></code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">21.3</td><td align="left">String classes</td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.4</td><td align="left">Class template <code class="code">basic_string</code></td><td align="left">Partial</td><td align="left">Non-conforming Copy-On-Write implementation.
-+ Missing <code class="code">getline</code> overloads for rvalue streams.
-+ </td></tr><tr><td align="left">21.5</td><td align="left">Numeric Conversions</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">21.6</td><td align="left">Hash support</td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.7</td><td align="left">Null-terminated sequence utilities</td><td align="left">Partial</td><td align="left">C library dependency.
- Missing <code class="filename"><cuchar></code>
- </td></tr><tr><td align="left">
- <span class="emphasis"><em>22</em></span>
- </td><td colspan="3" align="left">
- <span class="emphasis"><em>Localization</em></span>
-- </td></tr><tr><td align="left">22.1</td><td align="left">General</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.2</td><td align="left">Header <code class="code"><locale></code> synopsis</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.3</td><td align="left">Locales</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">22.3.1</td><td align="left">Class <code class="code">locale</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.3.2</td><td align="left"><code class="code">locale</code> globals</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.3.3</td><td align="left">Convenience interfaces</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">22.3.3.1</td><td align="left">Character classification</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.3.3.2</td><td align="left">Conversions</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">22.3.3.2.1</td><td align="left">Character conversions</td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#C8B0B0"><td align="left">22.3.3.2.2</td><td align="left"><code class="code">string</code> conversions</td><td align="left">N</td><td align="left">Â </td></tr><tr bgcolor="#C8B0B0"><td align="left">22.3.3.2.3</td><td align="left">Buffer conversions</td><td align="left">N</td><td align="left">Â </td></tr><tr><td align="left">22.4</td><td align="left">Standard <code class="code">locale</code> categories</td><td align="left">Â </td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">22.4.1</td><td align="left">The <code class="code">ctype</code> category</td><td align="left">Partial</td><td align="left">Missing <code class="code">codecvt<char16_t></code> and
-- <code class="code">codecvt<char32_t></code></td></tr><tr><td align="left">22.4.2</td><td align="left">The numeric category</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">22.4.2.1</td><td align="left"><code class="code">num_get</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.2.2</td><td align="left"><code class="code">num_put</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.3</td><td align="left">The numeric punctuation facet</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.4</td><td align="left">The collate category</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.5</td><td align="left">The time category</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">22.4.5.1</td><td align="left">Class template <code class="code">time_get</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.5.2</td><td align="left">Class template <code class="code">time_get_byname</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.5.3</td><td align="left">Class template <code class="code">time_put</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.5.3</td><td align="left">Class template <code class="code">time_put_byname</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.6</td><td align="left">The monetary category</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">22.4.6.1</td><td align="left">Class template <code class="code">money_get</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.6.2</td><td align="left">Class template <code class="code">money_put</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.6.3</td><td align="left">Class template <code class="code">money_punct</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.6.4</td><td align="left">Class template <code class="code">money_punct_byname</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.7</td><td align="left">The message retrieval category</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.8</td><td align="left">Program-defined facets</td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#C8B0B0"><td align="left">22.5</td><td align="left">Standard code conversion facets</td><td align="left">N</td><td align="left">Â </td></tr><tr><td align="left">22.6</td><td align="left">C Library Locales</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">
-+ </td></tr><tr><td align="left">22.1</td><td align="left">General</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.2</td><td align="left">Header <code class="code"><locale></code> synopsis</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.3</td><td align="left">Locales</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">22.3.1</td><td align="left">Class <code class="code">locale</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.3.2</td><td align="left"><code class="code">locale</code> globals</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.3.3</td><td align="left">Convenience interfaces</td><td align="left">Â </td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">22.3.3.1</td><td align="left">Character classification</td><td align="left">Partial</td><td align="left">Missing <code class="code">isblank</code>.</td></tr><tr><td align="left">22.3.3.2</td><td align="left">Conversions</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">22.3.3.2.1</td><td align="left">Character conversions</td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#C8B0B0"><td align="left">22.3.3.2.2</td><td align="left"><code class="code">string</code> conversions</td><td align="left">N</td><td align="left">Â </td></tr><tr bgcolor="#C8B0B0"><td align="left">22.3.3.2.3</td><td align="left">Buffer conversions</td><td align="left">N</td><td align="left">Â </td></tr><tr><td align="left">22.4</td><td align="left">Standard <code class="code">locale</code> categories</td><td align="left">Â </td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">22.4.1</td><td align="left">The <code class="code">ctype</code> category</td><td align="left">Partial</td><td align="left">Missing <code class="code">codecvt<char16_t></code> and
-+ <code class="code">codecvt<char32_t></code></td></tr><tr><td align="left">22.4.2</td><td align="left">The numeric category</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">22.4.2.1</td><td align="left"><code class="code">num_get</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.2.2</td><td align="left"><code class="code">num_put</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.3</td><td align="left">The numeric punctuation facet</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.4</td><td align="left">The collate category</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.5</td><td align="left">The time category</td><td align="left">Â </td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">22.4.5.1</td><td align="left">Class template <code class="code">time_get</code></td><td align="left">Partial</td><td align="left">Missing <code class="code">get</code> and <code class="code">do_get</code></td></tr><tr bgcolor="#B0B0B0"><td align="left">22.4.5.2</td><td align="left">Class template <code class="code">time_get_byname</code></td><td align="left">Partial</td><td align="left">Likewise</td></tr><tr><td align="left">22.4.5.3</td><td align="left">Class template <code class="code">time_put</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.5.3</td><td align="left">Class template <code class="code">time_put_byname</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.6</td><td align="left">The monetary category</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">22.4.6.1</td><td align="left">Class template <code class="code">money_get</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.6.2</td><td align="left">Class template <code class="code">money_put</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.6.3</td><td align="left">Class template <code class="code">money_punct</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.6.4</td><td align="left">Class template <code class="code">money_punct_byname</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.7</td><td align="left">The message retrieval category</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">22.4.8</td><td align="left">Program-defined facets</td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#C8B0B0"><td align="left">22.5</td><td align="left">Standard code conversion facets</td><td align="left">N</td><td align="left">Â </td></tr><tr><td align="left">22.6</td><td align="left">C Library Locales</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">
- <span class="emphasis"><em>23</em></span>
- </td><td colspan="3" align="left">
- <span class="emphasis"><em>Containers</em></span>
-@@ -201,8 +204,10 @@
- </td></tr><tr><td align="left">23.1</td><td align="left">General</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">23.2</td><td align="left">Container requirements</td><td align="left">Â </td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.2.1</td><td align="left">General container requirements</td><td align="left">Partial</td><td align="left">Only <code class="code">vector</code> and <code class="code">forward_list</code>
- meet the requirements
- relating to allocator use and propagation.</td></tr><tr><td align="left">23.2.2</td><td align="left">Container data races</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">23.2.3</td><td align="left">Sequence containers</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">23.2.4</td><td align="left">Associative containers</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">23.2.5</td><td align="left">Unordered associative containers</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">23.3</td><td align="left">Sequence containers</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">23.3.2</td><td align="left">Class template <code class="code">array</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.3</td><td align="left">Class template <code class="code">deque</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
-- take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr><td align="left">23.3.4</td><td align="left">Class template <code class="code">forward_list</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.5</td><td align="left">Class template <code class="code">list</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
-- take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.6</td><td align="left">Class template <code class="code">vector</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
-+ take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr><td align="left">23.3.4</td><td align="left">Class template <code class="code">forward_list</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.5</td><td align="left">Class template <code class="code">list</code></td><td align="left">Partial</td><td align="left">O(N) size.
-+ <code class="code">insert</code> and <code class="code">erase</code> members do not
-+ take <code class="code">const_iterator</code> arguments (N2350).
-+ </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.6</td><td align="left">Class template <code class="code">vector</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
- take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.7</td><td align="left">Class <code class="code">vector<bool></code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
- take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr><td align="left">23.4</td><td align="left">Associative containers</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">23.4.4</td><td align="left">Class template <code class="code">map</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">23.4.5</td><td align="left">Class template <code class="code">multimap</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">23.4.6</td><td align="left">Class template <code class="code">set</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">23.4.7</td><td align="left">Class template <code class="code">multiset</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">23.5</td><td align="left">Unordered associative containers</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">23.5.4</td><td align="left">Class template <code class="code">unordered_map</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">23.5.5</td><td align="left">Class template <code class="code">unordered_multimap</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">23.5.6</td><td align="left">Class template <code class="code">unordered_set</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">23.5.7</td><td align="left">Class template <code class="code">unordered_multiset</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">23.6</td><td align="left">Container adaptors</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">23.6.1</td><td align="left">Class template <code class="code">queue</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">23.6.2</td><td align="left">Class template <code class="code">priority_queue</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">23.6.3</td><td align="left">Class template <code class="code">stack</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">
- <span class="emphasis"><em>24</em></span>
-@@ -212,11 +217,13 @@
- <span class="emphasis"><em>25</em></span>
- </td><td colspan="3" align="left">
- <span class="emphasis"><em>Algorithms</em></span>
-- </td></tr><tr><td align="left">25.1</td><td align="left">General</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">25.2</td><td align="left">Non-modifying sequence operations</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">25.3</td><td align="left">Mutating sequence operations</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">25.4</td><td align="left">Sorting and related operations</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">25.5</td><td align="left">C library algorithms</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">
-+ </td></tr><tr><td align="left">25.1</td><td align="left">General</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">25.2</td><td align="left">Non-modifying sequence operations</td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">25.3</td><td align="left">Mutating sequence operations</td><td align="left">Partial</td><td align="left"><code class="code">rotate</code> returns <code class="code">void</code>.</td></tr><tr><td align="left">25.4</td><td align="left">Sorting and related operations</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">25.5</td><td align="left">C library algorithms</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">
- <span class="emphasis"><em>26</em></span>
- </td><td colspan="3" align="left">
- <span class="emphasis"><em>Numerics</em></span>
-- </td></tr><tr><td align="left">26.1</td><td align="left">General</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.2</td><td align="left">Numeric type requirements</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.3</td><td align="left">The floating-point environment</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.4</td><td align="left">Complex numbers</td><td align="left">Partial</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5</td><td align="left">Random number generation</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.1</td><td align="left">Requirements</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.2</td><td align="left">Header <code class="code"><random></code> synopsis</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.3</td><td align="left">Random number engine class templates</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.3.1</td><td align="left">Class template <code class="code">linear_congruential_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.3.2</td><td align="left">Class template <code class="code">mersenne_twister_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.3.3</td><td align="left">Class template <code class="code">subtract_with_carry_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.4</td><td align="left">Random number engine adaptor class templates</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.4.2</td><td align="left">Class template <code class="code">discard_block_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.4.3</td><td align="left">Class template <code class="code">independent_bits_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.4.4</td><td align="left">Class template <code class="code">shuffle_order_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.5</td><td align="left">Engines and engine adaptors with predefined parameters</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.6</td><td align="left">Class <code class="code">random_device</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.7</td><td align="left">Utilities</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.7.1</td><td align="left">Class <code class="code">seed_seq</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.7.2</td><td align="left">Function template <code class="code">generate_canonical</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8</td><td align="left">Random number distribution class templates</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.8.2</td><td align="left">Uniform distributions</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.8.2.1</td><td align="left">Class template <code class="code">uniform_int_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.2.2</td><td align="left">Class template <code class="code">uniform_real_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.3</td><td align="left">Bernoulli distributions</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.8.3.1</td><td align="left">Class <code class="code">bernoulli_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.3.2</td><td align="left">Class template <code class="code">binomial_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.3.3</td><td align="left">Class template <code class="code">geometric_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.3.4</td><td align="left">Class template <code class="code">negative_binomial_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.4</td><td align="left">Poisson distributions</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.8.4.1</td><td align="left">Class template <code class="code">poisson_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.4.2</td><td align="left">Class template <code class="code">exponential_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.4.3</td><td align="left">Class template <code class="code">gamma_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.4.4</td><td align="left">Class template <code class="code">weibull_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.4.5</td><td align="left">Class template <code class="code">extreme_value_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.5</td><td align="left">Normal distributions</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.8.5.1</td><td align="left">Class template <code class="code">normal_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.5.2</td><td align="left">Class template <code class="code">lognormal_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.5.3</td><td align="left">Class template <code class="code">chi_squared_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.5.4</td><td align="left">Class template <code class="code">cauchy_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.5.5</td><td align="left">Class template <code class="code">fisher_f_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.5.6</td><td align="left">Class template <code class="code">student_t_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.6</td><td align="left">Sampling distributions</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.8.6.1</td><td align="left">Class template <code class="code">discrete_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.6.2</td><td align="left">Class template <code class="code">piecewise_constant_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.6.3</td><td align="left">Class template <code class="code">piecewise_linear_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6</td><td align="left">Numeric arrays</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.6.1</td><td align="left">Header <code class="code"><valarray></code> synopsis</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.2</td><td align="left">Class template <code class="code">valarray</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.3</td><td align="left"><code class="code">valarray</code> non-member operations</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.4</td><td align="left">Class <code class="code">slice</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.5</td><td align="left">Class template <code class="code">slice_array</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.6</td><td align="left">The <code class="code">gslice</code> class</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.7</td><td align="left">Class template <code class="code">gslice_array</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.8</td><td align="left">Class template <code class="code">mask_array</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.9</td><td align="left">Class template <code class="code">indirect_array</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.10</td><td align="left"><code class="code">valarray</code> range access</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.7</td><td align="left">Generalized numeric operations</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.7.1</td><td align="left">Header <code class="code"><numeric></code> synopsis</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.7.2</td><td align="left"><code class="code">accumulate</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.7.3</td><td align="left"><code class="code">inner_product</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.7.4</td><td align="left"><code class="code">partial_sum</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.7.5</td><td align="left"><code class="code">adjacent_difference</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.7.6</td><td align="left">iota</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.8</td><td align="left">C Library</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">
-+ </td></tr><tr><td align="left">26.1</td><td align="left">General</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.2</td><td align="left">Numeric type requirements</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.3</td><td align="left">The floating-point environment</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.4</td><td align="left">Complex numbers</td><td align="left">Partial</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5</td><td align="left">Random number generation</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.1</td><td align="left">Requirements</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.2</td><td align="left">Header <code class="code"><random></code> synopsis</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.3</td><td align="left">Random number engine class templates</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.3.1</td><td align="left">Class template <code class="code">linear_congruential_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.3.2</td><td align="left">Class template <code class="code">mersenne_twister_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.3.3</td><td align="left">Class template <code class="code">subtract_with_carry_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.4</td><td align="left">Random number engine adaptor class templates</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.4.2</td><td align="left">Class template <code class="code">discard_block_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.4.3</td><td align="left">Class template <code class="code">independent_bits_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.4.4</td><td align="left">Class template <code class="code">shuffle_order_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.5</td><td align="left">Engines and engine adaptors with predefined parameters</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.6</td><td align="left">Class <code class="code">random_device</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.7</td><td align="left">Utilities</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.7.1</td><td align="left">Class <code class="code">seed_seq</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.7.2</td><td align="left">Function template <code class="code">generate_canonical</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8</td><td align="left">Random number distribution class templates</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.8.2</td><td align="left">Uniform distributions</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.8.2.1</td><td align="left">Class template <code class="code">uniform_int_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.2.2</td><td align="left">Class template <code class="code">uniform_real_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.3</td><td align="left">Bernoulli distributions</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.8.3.1</td><td align="left">Class <code class="code">bernoulli_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.3.2</td><td align="left">Class template <code class="code">binomial_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.3.3</td><td align="left">Class template <code class="code">geometric_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.3.4</td><td align="left">Class template <code class="code">negative_binomial_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.4</td><td align="left">Poisson distributions</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.8.4.1</td><td align="left">Class template <code class="code">poisson_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.4.2</td><td align="left">Class template <code class="code">exponential_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.4.3</td><td align="left">Class template <code class="code">gamma_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.4.4</td><td align="left">Class template <code class="code">weibull_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.4.5</td><td align="left">Class template <code class="code">extreme_value_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.5</td><td align="left">Normal distributions</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.8.5.1</td><td align="left">Class template <code class="code">normal_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.5.2</td><td align="left">Class template <code class="code">lognormal_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.5.3</td><td align="left">Class template <code class="code">chi_squared_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.5.4</td><td align="left">Class template <code class="code">cauchy_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.5.5</td><td align="left">Class template <code class="code">fisher_f_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.5.6</td><td align="left">Class template <code class="code">student_t_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.6</td><td align="left">Sampling distributions</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.5.8.6.1</td><td align="left">Class template <code class="code">discrete_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.6.2</td><td align="left">Class template <code class="code">piecewise_constant_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.5.8.6.3</td><td align="left">Class template <code class="code">piecewise_linear_distribution</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6</td><td align="left">Numeric arrays</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.6.1</td><td align="left">Header <code class="code"><valarray></code> synopsis</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.2</td><td align="left">Class template <code class="code">valarray</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.3</td><td align="left"><code class="code">valarray</code> non-member operations</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.4</td><td align="left">Class <code class="code">slice</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.5</td><td align="left">Class template <code class="code">slice_array</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.6</td><td align="left">The <code class="code">gslice</code> class</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.7</td><td align="left">Class template <code class="code">gslice_array</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.8</td><td align="left">Class template <code class="code">mask_array</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.9</td><td align="left">Class template <code class="code">indirect_array</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.6.10</td><td align="left"><code class="code">valarray</code> range access</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.7</td><td align="left">Generalized numeric operations</td><td align="left">Â </td><td align="left">Â </td></tr><tr><td align="left">26.7.1</td><td align="left">Header <code class="code"><numeric></code> synopsis</td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.7.2</td><td align="left"><code class="code">accumulate</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.7.3</td><td align="left"><code class="code">inner_product</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.7.4</td><td align="left"><code class="code">partial_sum</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.7.5</td><td align="left"><code class="code">adjacent_difference</code></td><td align="left">Y</td><td align="left">Â </td></tr><tr><td align="left">26.7.6</td><td align="left">iota</td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">26.8</td><td align="left">C Library</td><td align="left">Partial</td><td align="left"><code class="code"><ctgmath></code> doesn't include
-+ <code class="code"><ccomplex></code>
-+ </td></tr><tr><td align="left">
- <span class="emphasis"><em>27</em></span>
- </td><td colspan="3" align="left">
- <span class="emphasis"><em>Input/output library</em></span>
-@@ -224,6 +231,7 @@
- Missing move and swap operations on <code class="code">basic_ios</code>.
- Missing <code class="code">io_errc</code> and <code class="code">iostream_category</code>.
- <code class="code">ios_base::failure</code> is not derived from <code class="code">system_error</code>.
-+ Missing <code class="code">ios_base::hexfloat</code>.
- </td></tr><tr><td align="left">27.6</td><td align="left">Stream buffers</td><td align="left">Y</td><td align="left">Â </td></tr><tr bgcolor="#B0B0B0"><td align="left">27.7</td><td align="left">Formatting and manipulators</td><td align="left">Partial</td><td align="left">
- Missing move and swap operations
- Missing <code class="code">get_time</code> and <code class="code">put_time</code> manipulators.
-Index: libstdc++-v3/doc/html/manual/abi.html
-===================================================================
---- libstdc++-v3/doc/html/manual/abi.html (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/doc/html/manual/abi.html (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -96,7 +96,7 @@
- definitions, where the version definition is the maximum for a
- particular release. Labels are cumulative. If a particular release
- is not listed, it has the same version labels as the preceding
-- release.</p><p>This corresponds to the mapfile: gcc/libgcc-std.ver</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: GCC_3.0</p></li><li class="listitem"><p>GCC 3.3.0: GCC_3.3</p></li><li class="listitem"><p>GCC 3.3.1: GCC_3.3.1</p></li><li class="listitem"><p>GCC 3.3.2: GCC_3.3.2</p></li><li class="listitem"><p>GCC 3.3.4: GCC_3.3.4</p></li><li class="listitem"><p>GCC 3.4.0: GCC_3.4</p></li><li class="listitem"><p>GCC 3.4.2: GCC_3.4.2</p></li><li class="listitem"><p>GCC 3.4.4: GCC_3.4.4</p></li><li class="listitem"><p>GCC 4.0.0: GCC_4.0.0</p></li><li class="listitem"><p>GCC 4.1.0: GCC_4.1.0</p></li><li class="listitem"><p>GCC 4.2.0: GCC_4.2.0</p></li><li class="listitem"><p>GCC 4.3.0: GCC_4.3.0</p></li><li class="listitem"><p>GCC 4.4.0: GCC_4.4.0</p></li><li class="listitem"><p>GCC 4.5.0: GCC_4.5.0</p></li><li class="listitem"><p>GCC 4.6.0: GCC_4.6.0</p></li><li class="listitem"><p>GCC 4.7.0: GCC_4.7.0</p></li></ul></div></li><li class="listitem"><p>
-+ release.</p><p>This corresponds to the mapfile: gcc/libgcc-std.ver</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: GCC_3.0</p></li><li class="listitem"><p>GCC 3.3.0: GCC_3.3</p></li><li class="listitem"><p>GCC 3.3.1: GCC_3.3.1</p></li><li class="listitem"><p>GCC 3.3.2: GCC_3.3.2</p></li><li class="listitem"><p>GCC 3.3.4: GCC_3.3.4</p></li><li class="listitem"><p>GCC 3.4.0: GCC_3.4</p></li><li class="listitem"><p>GCC 3.4.2: GCC_3.4.2</p></li><li class="listitem"><p>GCC 3.4.4: GCC_3.4.4</p></li><li class="listitem"><p>GCC 4.0.0: GCC_4.0.0</p></li><li class="listitem"><p>GCC 4.1.0: GCC_4.1.0</p></li><li class="listitem"><p>GCC 4.2.0: GCC_4.2.0</p></li><li class="listitem"><p>GCC 4.3.0: GCC_4.3.0</p></li><li class="listitem"><p>GCC 4.4.0: GCC_4.4.0</p></li><li class="listitem"><p>GCC 4.5.0: GCC_4.5.0</p></li><li class="listitem"><p>GCC 4.6.0: GCC_4.6.0</p></li><li class="listitem"><p>GCC 4.7.0: GCC_4.7.0</p></li><li class="listitem"><p>GCC 4.8.0: GCC_4.8.0</p></li></ul></div></li><li class="listitem"><p>
- Release versioning on the libstdc++.so binary, implemented in
- the same way as the libgcc_s.so binary above. Listed is the
- filename: <code class="constant">DT_SONAME</code> can be deduced from
-@@ -111,7 +111,7 @@
- has the same filename and <code class="constant">DT_SONAME</code> as the
- preceding release.
- </p><p>It is versioned as follows:
-- </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: libstdc++.so.3.0.0</p></li><li class="listitem"><p>GCC 3.0.1: libstdc++.so.3.0.1</p></li><li class="listitem"><p>GCC 3.0.2: libstdc++.so.3.0.2</p></li><li class="listitem"><p>GCC 3.0.3: libstdc++.so.3.0.2 (See Note 1)</p></li><li class="listitem"><p>GCC 3.0.4: libstdc++.so.3.0.4</p></li><li class="listitem"><p>GCC 3.1.0: libstdc++.so.4.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.1.1: libstdc++.so.4.0.1</p></li><li class="listitem"><p>GCC 3.2.0: libstdc++.so.5.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.2.1: libstdc++.so.5.0.1</p></li><li class="listitem"><p>GCC 3.2.2: libstdc++.so.5.0.2</p></li><li class="listitem"><p>GCC 3.2.3: libstdc++.so.5.0.3 (See Note 2)</p></li><li class="listitem"><p>GCC 3.3.0: libstdc++.so.5.0.4</p></li><li class="listitem"><p>GCC 3.3.1: libstdc++.so.5.0.5</p></li><li class="listitem"><p>GCC 3.4.0: libstdc++.so.6.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.4.1: libstdc++.so.6.0.1</p></li><li class="listitem"><p>GCC 3.4.2: libstdc++.so.6.0.2</p></li><li class="listitem"><p>GCC 3.4.3: libstdc++.so.6.0.3</p></li><li class="listitem"><p>GCC 4.0.0: libstdc++.so.6.0.4</p></li><li class="listitem"><p>GCC 4.0.1: libstdc++.so.6.0.5</p></li><li class="listitem"><p>GCC 4.0.2: libstdc++.so.6.0.6</p></li><li class="listitem"><p>GCC 4.0.3: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.0: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.1: libstdc++.so.6.0.8</p></li><li class="listitem"><p>GCC 4.2.0: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.2.1: libstdc++.so.6.0.9 (See Note 3)</p></li><li class="listitem"><p>GCC 4.2.2: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.3.0: libstdc++.so.6.0.10</p></li><li class="listitem"><p>GCC 4.4.0: libstdc++.so.6.0.11</p></li><li class="listitem"><p>GCC 4.4.1: libstdc++.so.6.0.12</p></li><li class="listitem"><p>GCC 4.4.2: libstdc++.so.6.0.13</p></li><li class="listitem"><p>GCC 4.5.0: libstdc++.so.6.0.14</p></li><li class="listitem"><p>GCC 4.6.0: libstdc++.so.6.0.15</p></li><li class="listitem"><p>GCC 4.6.1: libstdc++.so.6.0.16</p></li><li class="listitem"><p>GCC 4.7.0: libstdc++.so.6.0.17</p></li><li class="listitem"><p>GCC 4.8.0: libstdc++.so.6.0.18</p></li></ul></div><p>
-+ </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: libstdc++.so.3.0.0</p></li><li class="listitem"><p>GCC 3.0.1: libstdc++.so.3.0.1</p></li><li class="listitem"><p>GCC 3.0.2: libstdc++.so.3.0.2</p></li><li class="listitem"><p>GCC 3.0.3: libstdc++.so.3.0.2 (See Note 1)</p></li><li class="listitem"><p>GCC 3.0.4: libstdc++.so.3.0.4</p></li><li class="listitem"><p>GCC 3.1.0: libstdc++.so.4.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.1.1: libstdc++.so.4.0.1</p></li><li class="listitem"><p>GCC 3.2.0: libstdc++.so.5.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.2.1: libstdc++.so.5.0.1</p></li><li class="listitem"><p>GCC 3.2.2: libstdc++.so.5.0.2</p></li><li class="listitem"><p>GCC 3.2.3: libstdc++.so.5.0.3 (See Note 2)</p></li><li class="listitem"><p>GCC 3.3.0: libstdc++.so.5.0.4</p></li><li class="listitem"><p>GCC 3.3.1: libstdc++.so.5.0.5</p></li><li class="listitem"><p>GCC 3.4.0: libstdc++.so.6.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.4.1: libstdc++.so.6.0.1</p></li><li class="listitem"><p>GCC 3.4.2: libstdc++.so.6.0.2</p></li><li class="listitem"><p>GCC 3.4.3: libstdc++.so.6.0.3</p></li><li class="listitem"><p>GCC 4.0.0: libstdc++.so.6.0.4</p></li><li class="listitem"><p>GCC 4.0.1: libstdc++.so.6.0.5</p></li><li class="listitem"><p>GCC 4.0.2: libstdc++.so.6.0.6</p></li><li class="listitem"><p>GCC 4.0.3: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.0: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.1: libstdc++.so.6.0.8</p></li><li class="listitem"><p>GCC 4.2.0: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.2.1: libstdc++.so.6.0.9 (See Note 3)</p></li><li class="listitem"><p>GCC 4.2.2: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.3.0: libstdc++.so.6.0.10</p></li><li class="listitem"><p>GCC 4.4.0: libstdc++.so.6.0.11</p></li><li class="listitem"><p>GCC 4.4.1: libstdc++.so.6.0.12</p></li><li class="listitem"><p>GCC 4.4.2: libstdc++.so.6.0.13</p></li><li class="listitem"><p>GCC 4.5.0: libstdc++.so.6.0.14</p></li><li class="listitem"><p>GCC 4.6.0: libstdc++.so.6.0.15</p></li><li class="listitem"><p>GCC 4.6.1: libstdc++.so.6.0.16</p></li><li class="listitem"><p>GCC 4.7.0: libstdc++.so.6.0.17</p></li><li class="listitem"><p>GCC 4.8.0: libstdc++.so.6.0.18</p></li><li class="listitem"><p>GCC 4.8.3: libstdc++.so.6.0.19</p></li></ul></div><p>
- Note 1: Error should be libstdc++.so.3.0.3.
- </p><p>
- Note 2: Not strictly required.
-@@ -129,7 +129,7 @@
- GLIBCPP_3.2 for symbols that were introduced in the GCC 3.2.0
- release.) If a particular release is not listed, it has the same
- version labels as the preceding release.
-- </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.1: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.2: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.3: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.4: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.1.0: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.1.1: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.2.0: GLIBCPP_3.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.1: GLIBCPP_3.2.1, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.2: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.3: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.4.0: GLIBCXX_3.4, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.1: GLIBCXX_3.4.1, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.2: GLIBCXX_3.4.2</p></li><li class="listitem"><p>GCC 3.4.3: GLIBCXX_3.4.3</p></li><li class="listitem"><p>GCC 4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1</p></li><li class="listitem"><p>GCC 4.0.1: GLIBCXX_3.4.5</p></li><li class="listitem"><p>GCC 4.0.2: GLIBCXX_3.4.6</p></li><li class="listitem"><p>GCC 4.0.3: GLIBCXX_3.4.7</p></li><li class="listitem"><p>GCC 4.1.1: GLIBCXX_3.4.8</p></li><li class="listitem"><p>GCC 4.2.0: GLIBCXX_3.4.9</p></li><li class="listitem"><p>GCC 4.3.0: GLIBCXX_3.4.10, CXXABI_1.3.2</p></li><li class="listitem"><p>GCC 4.4.0: GLIBCXX_3.4.11, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.1: GLIBCXX_3.4.12, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.2: GLIBCXX_3.4.13, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.5.0: GLIBCXX_3.4.14, CXXABI_1.3.4</p></li><li class="listitem"><p>GCC 4.6.0: GLIBCXX_3.4.15, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.6.1: GLIBCXX_3.4.16, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.7.0: GLIBCXX_3.4.17, CXXABI_1.3.6</p></li><li class="listitem"><p>GCC 4.8.0: GLIBCXX_3.4.18, CXXABI_1.3.7</p></li></ul></div></li><li class="listitem"><p>Incremental bumping of a compiler pre-defined macro,
-+ </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.1: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.2: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.3: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.4: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.1.0: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.1.1: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.2.0: GLIBCPP_3.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.1: GLIBCPP_3.2.1, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.2: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.3: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.4.0: GLIBCXX_3.4, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.1: GLIBCXX_3.4.1, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.2: GLIBCXX_3.4.2</p></li><li class="listitem"><p>GCC 3.4.3: GLIBCXX_3.4.3</p></li><li class="listitem"><p>GCC 4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1</p></li><li class="listitem"><p>GCC 4.0.1: GLIBCXX_3.4.5</p></li><li class="listitem"><p>GCC 4.0.2: GLIBCXX_3.4.6</p></li><li class="listitem"><p>GCC 4.0.3: GLIBCXX_3.4.7</p></li><li class="listitem"><p>GCC 4.1.1: GLIBCXX_3.4.8</p></li><li class="listitem"><p>GCC 4.2.0: GLIBCXX_3.4.9</p></li><li class="listitem"><p>GCC 4.3.0: GLIBCXX_3.4.10, CXXABI_1.3.2</p></li><li class="listitem"><p>GCC 4.4.0: GLIBCXX_3.4.11, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.1: GLIBCXX_3.4.12, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.2: GLIBCXX_3.4.13, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.5.0: GLIBCXX_3.4.14, CXXABI_1.3.4</p></li><li class="listitem"><p>GCC 4.6.0: GLIBCXX_3.4.15, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.6.1: GLIBCXX_3.4.16, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.7.0: GLIBCXX_3.4.17, CXXABI_1.3.6</p></li><li class="listitem"><p>GCC 4.8.0: GLIBCXX_3.4.18, CXXABI_1.3.7</p></li><li class="listitem"><p>GCC 4.8.3: GLIBCXX_3.4.19, CXXABI_1.3.7</p></li></ul></div></li><li class="listitem"><p>Incremental bumping of a compiler pre-defined macro,
- __GXX_ABI_VERSION. This macro is defined as the version of the
- compiler v3 ABI, with g++ 3.0 being version 100. This macro will
- be automatically defined whenever g++ is used (the curious can
-Index: libstdc++-v3/doc/html/manual/std_contents.html
-===================================================================
---- libstdc++-v3/doc/html/manual/std_contents.html (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/doc/html/manual/std_contents.html (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -21,7 +21,7 @@
- </a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#idm269999753024">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="containers.html">9.
- Containers
-
--</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10.
-+</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10.
- Iterators
-
- </a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#std.iterators.predefined">Predefined</a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="section"><a href="iterators.html#iterators.predefined.end">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="algorithms.html">11.
-@@ -42,4 +42,4 @@
- </a></span></dt><dd><dl><dt><span class="section"><a href="concurrency.html#std.concurrency.api">API Reference</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="support.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Debugging Support </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 4.Â
- Support
-
--</td></tr></table></div></body></html>
-\ No newline at end of file
-+</td></tr></table></div></body></html>
-Index: libstdc++-v3/doc/html/manual/containers.html
-===================================================================
---- libstdc++-v3/doc/html/manual/containers.html (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/doc/html/manual/containers.html (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -7,9 +7,10 @@
- </th><td width="20%" align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="std.containers"></a>Chapter 9.Â
- Containers
- <a id="idm269999493408" class="indexterm"></a>
--</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.containers.sequences"></a>Sequences</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="containers.sequences.list"></a>list</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="sequences.list.size"></a>list::size() is O(n)</h4></div></div></div><p>
-- Yes it is, and that's okay. This is a decision that we preserved
-- when we imported SGI's STL implementation. The following is
-+</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.containers.sequences"></a>Sequences</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="containers.sequences.list"></a>list</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="sequences.list.size"></a>list::size() is O(n)</h4></div></div></div><p>
-+ Yes it is, and that was okay until the 2011 edition of the C++ standard.
-+ In future GCC will change it to O(1) but O(N) was a decision that we
-+ preserved when we imported SGI's STL implementation. The following is
- quoted from <a class="link" href="http://www.sgi.com/tech/stl/FAQ.html" target="_top">their FAQ</a>:
- </p><div class="blockquote"><blockquote class="blockquote"><p>
- The size() member function, for list and slist, takes time
-@@ -41,14 +42,4 @@
- </p><pre class="programlisting">
- if (L.empty())
- ...
-- </pre></blockquote></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="containers.sequences.vector"></a>vector</h3></div></div></div><p>
-- </p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="sequences.vector.management"></a>Space Overhead Management</h4></div></div></div><p>
-- In <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html" target="_top">this
-- message to the list</a>, Daniel Kostecky announced work on an
-- alternate form of <code class="code">std::vector</code> that would support
-- hints on the number of elements to be over-allocated. The design
-- was also described, along with possible implementation choices.
-- </p><p>
-- The first two alpha releases were announced <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00048.html" target="_top">here</a>
-- and <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html" target="_top">here</a>.
-- </p></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="facets.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="std_contents.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Facets </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Associative</td></tr></table></div></body></html>
-\ No newline at end of file
-+ </pre></blockquote></div></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="facets.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="std_contents.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Facets </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Associative</td></tr></table></div></body></html>
-Index: libstdc++-v3/doc/html/manual/index.html
-===================================================================
---- libstdc++-v3/doc/html/manual/index.html (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/doc/html/manual/index.html (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -24,7 +24,7 @@
- </a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#idm269999753024">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="containers.html">9.
- Containers
-
--</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10.
-+</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10.
- Iterators
-
- </a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#std.iterators.predefined">Predefined</a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="section"><a href="iterators.html#iterators.predefined.end">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="algorithms.html">11.
-@@ -160,4 +160,4 @@
- </a></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="../index.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Part I.Â
- Introduction
-
--</td></tr></table></div></body></html>
-\ No newline at end of file
-+</td></tr></table></div></body></html>
+ # Calculate toolexeclibdir
Index: libstdc++-v3/include/std/future
===================================================================
---- libstdc++-v3/include/std/future (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/include/std/future (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -351,12 +351,14 @@
- void
- _M_set_result(function<_Ptr_type()> __res, bool __ignore_failure = false)
- {
-- bool __set = __ignore_failure;
-+ bool __set = false;
- // all calls to this function are serialized,
- // side-effects of invoking __res only happen once
- call_once(_M_once, &_State_base::_M_do_set, this, ref(__res),
- ref(__set));
-- if (!__set)
-+ if (__set)
-+ _M_cond.notify_all();
-+ else if (!__ignore_failure)
- __throw_future_error(int(future_errc::promise_already_satisfied));
- }
-
-@@ -471,7 +473,6 @@
- lock_guard<mutex> __lock(_M_mutex);
- _M_result.swap(__res);
- }
-- _M_cond.notify_all();
- __set = true;
- }
-
-@@ -983,22 +984,25 @@
- void
- set_value(const _Res& __r)
+--- libstdc++-v3/include/std/future (.../tags/gcc_4_8_4_release) (revision 220382)
++++ libstdc++-v3/include/std/future (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1417,7 +1417,8 @@
+ operator()(_ArgTypes... __args)
{
-+ auto __future = _M_future;
- auto __setter = _State::__setter(this, __r);
-- _M_future->_M_set_result(std::move(__setter));
-+ __future->_M_set_result(std::move(__setter));
+ __future_base::_State_base::_S_check(_M_state);
+- _M_state->_M_run(std::forward<_ArgTypes>(__args)...);
++ auto __state = _M_state;
++ __state->_M_run(std::forward<_ArgTypes>(__args)...);
}
void
- set_value(_Res&& __r)
- {
-+ auto __future = _M_future;
- auto __setter = _State::__setter(this, std::move(__r));
-- _M_future->_M_set_result(std::move(__setter));
-+ __future->_M_set_result(std::move(__setter));
- }
+Index: libstdc++-v3/ChangeLog
+===================================================================
+--- libstdc++-v3/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382)
++++ libstdc++-v3/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1,3 +1,9 @@
++2015-01-09 Jonathan Wakely <jwakely@redhat.com>
++
++ PR libstdc++/60966
++ * include/std/future (packaged_task::operator()): Increment the
++ reference count on the shared state until the function returns.
++
+ 2014-12-19 Release Manager
- void
- set_exception(exception_ptr __p)
- {
-+ auto __future = _M_future;
- auto __setter = _State::__setter(__p, this);
-- _M_future->_M_set_result(std::move(__setter));
-+ __future->_M_set_result(std::move(__setter));
- }
- };
+ * GCC 4.8.4 released.
+Index: libatomic/fop_n.c
+===================================================================
+--- libatomic/fop_n.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ libatomic/fop_n.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -112,9 +112,9 @@
-@@ -1081,15 +1085,17 @@
- void
- set_value(_Res& __r)
- {
-+ auto __future = _M_future;
- auto __setter = _State::__setter(this, __r);
-- _M_future->_M_set_result(std::move(__setter));
-+ __future->_M_set_result(std::move(__setter));
- }
+ pre_barrier (smodel);
- void
- set_exception(exception_ptr __p)
- {
-+ auto __future = _M_future;
- auto __setter = _State::__setter(__p, this);
-- _M_future->_M_set_result(std::move(__setter));
-+ __future->_M_set_result(std::move(__setter));
- }
- };
+- wptr = (UWORD *)mptr;
+- shift = 0;
+- mask = -1;
++ wptr = (UWORD *)((uintptr_t)mptr & -WORDSIZE);
++ shift = (((uintptr_t)mptr % WORDSIZE) * CHAR_BIT) ^ SIZE(INVERT_MASK);
++ mask = SIZE(MASK) << shift;
-@@ -1166,8 +1172,9 @@
- void
- set_exception(exception_ptr __p)
- {
-+ auto __future = _M_future;
- auto __setter = _State::__setter(__p, this);
-- _M_future->_M_set_result(std::move(__setter));
-+ __future->_M_set_result(std::move(__setter));
- }
- };
+ wopval = (UWORD)opval << shift;
+ woldval = __atomic_load_n (wptr, __ATOMIC_RELAXED);
+@@ -136,9 +136,9 @@
-@@ -1193,8 +1200,9 @@
- inline void
- promise<void>::set_value()
- {
-+ auto __future = _M_future;
- auto __setter = _State::__setter(this);
-- _M_future->_M_set_result(std::move(__setter));
-+ __future->_M_set_result(std::move(__setter));
- }
+ pre_barrier (smodel);
+- wptr = (UWORD *)mptr;
+- shift = 0;
+- mask = -1;
++ wptr = (UWORD *)((uintptr_t)mptr & -WORDSIZE);
++ shift = (((uintptr_t)mptr % WORDSIZE) * CHAR_BIT) ^ SIZE(INVERT_MASK);
++ mask = SIZE(MASK) << shift;
-Index: libstdc++-v3/include/ext/rope
+ wopval = (UWORD)opval << shift;
+ woldval = __atomic_load_n (wptr, __ATOMIC_RELAXED);
+Index: libatomic/ChangeLog
===================================================================
---- libstdc++-v3/include/ext/rope (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/include/ext/rope (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1544,7 +1544,7 @@
- typedef typename _Base::allocator_type allocator_type;
- using _Base::_M_tree_ptr;
- using _Base::get_allocator;
-- using _Base::_M_get_allocator;
-+ using _Base::_M_get_allocator;
- typedef __GC_CONST _CharT* _Cstrptr;
-
- static _CharT _S_empty_c_str[1];
-@@ -1876,8 +1876,9 @@
- const allocator_type& __a = allocator_type())
- : _Base(__a)
- {
-- this->_M_tree_ptr = (0 == __len) ?
-- 0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a);
-+ this->_M_tree_ptr = (0 == __len)
-+ ? 0
-+ : _S_new_RopeFunction(__fn, __len, __delete_fn, _M_get_allocator());
- }
+--- libatomic/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382)
++++ libatomic/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1,3 +1,8 @@
++2015-01-21 Andrew Waterman <waterman@cs.berkeley.edu>
++
++ * fop_n.c (libat_fetch_op): Align address to word boundary.
++ (libat_op_fetch): Likewise.
++
+ 2014-12-19 Release Manager
+
+ * GCC 4.8.4 released.
+Index: libbacktrace/configure
+===================================================================
+--- libbacktrace/configure (.../tags/gcc_4_8_4_release) (revision 220382)
++++ libbacktrace/configure (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -614,7 +614,6 @@
+ WARN_FLAGS
+ EXTRA_FLAGS
+ BACKTRACE_FILE
+-multi_basedir
+ OTOOL64
+ OTOOL
+ LIPO
+@@ -680,6 +679,7 @@
+ build_vendor
+ build_cpu
+ build
++multi_basedir
+ target_alias
+ host_alias
+ build_alias
+@@ -721,6 +721,7 @@
+ ac_subst_files=''
+ ac_user_opts='
+ enable_option_checking
++enable_multilib
+ enable_maintainer_mode
+ with_target_subdir
+ enable_shared
+@@ -729,7 +730,6 @@
+ enable_fast_install
+ with_gnu_ld
+ enable_libtool_lock
+-enable_multilib
+ with_system_libunwind
+ '
+ ac_precious_vars='build_alias
+@@ -1361,6 +1361,7 @@
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
++ --enable-multilib build many library versions (default)
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+ --enable-shared[=PKGS] build shared libraries [default=no]
+@@ -1368,7 +1369,6 @@
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+- --enable-multilib build many library versions (default)
+
+ Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+@@ -2451,6 +2451,46 @@
+ ac_config_headers="$ac_config_headers config.h"
+
+
++if test -n "${with_target_subdir}"; then
++ # Default to --enable-multilib
++# Check whether --enable-multilib was given.
++if test "${enable_multilib+set}" = set; then :
++ enableval=$enable_multilib; case "$enableval" in
++ yes) multilib=yes ;;
++ no) multilib=no ;;
++ *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;;
++ esac
++else
++ multilib=yes
++fi
++
++
++# We may get other options which we leave undocumented:
++# --with-target-subdir, --with-multisrctop, --with-multisubdir
++# See config-ml.in if you want the gory details.
++
++if test "$srcdir" = "."; then
++ if test "$with_target_subdir" != "."; then
++ multi_basedir="$srcdir/$with_multisrctop../.."
++ else
++ multi_basedir="$srcdir/$with_multisrctop.."
++ fi
++else
++ multi_basedir="$srcdir/.."
++fi
++
++
++# Even if the default multilib is not a cross compilation,
++# it may be that some of the other multilibs are.
++if test $cross_compiling = no && test $multilib = yes \
++ && test "x${with_multisubdir}" != x ; then
++ cross_compiling=maybe
++fi
++
++ac_config_commands="$ac_config_commands default-1"
++
++fi
++
+ ac_aux_dir=
+ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ for ac_t in install-sh install.sh shtool; do
+@@ -11087,7 +11127,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 11090 "configure"
++#line 11130 "configure"
+ #include "confdefs.h"
- rope(const rope& __x, const allocator_type& __a = allocator_type())
-Index: libstdc++-v3/include/bits/stl_tree.h
-===================================================================
---- libstdc++-v3/include/bits/stl_tree.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/include/bits/stl_tree.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -510,11 +510,11 @@
+ #if HAVE_DLFCN_H
+@@ -11193,7 +11233,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 11196 "configure"
++#line 11236 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -11437,43 +11477,6 @@
+ if test -n "${with_target_subdir}"; then
+ # We are compiling a GCC library. We can assume that the unwind
+ # library exists.
+- # Default to --enable-multilib
+-# Check whether --enable-multilib was given.
+-if test "${enable_multilib+set}" = set; then :
+- enableval=$enable_multilib; case "$enableval" in
+- yes) multilib=yes ;;
+- no) multilib=no ;;
+- *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;;
+- esac
+-else
+- multilib=yes
+-fi
+-
+-
+-# We may get other options which we leave undocumented:
+-# --with-target-subdir, --with-multisrctop, --with-multisubdir
+-# See config-ml.in if you want the gory details.
+-
+-if test "$srcdir" = "."; then
+- if test "$with_target_subdir" != "."; then
+- multi_basedir="$srcdir/$with_multisrctop../.."
+- else
+- multi_basedir="$srcdir/$with_multisrctop.."
+- fi
+-else
+- multi_basedir="$srcdir/.."
+-fi
+-
+-
+-# Even if the default multilib is not a cross compilation,
+-# it may be that some of the other multilibs are.
+-if test $cross_compiling = no && test $multilib = yes \
+- && test "x${with_multisubdir}" != x ; then
+- cross_compiling=maybe
+-fi
+-
+-ac_config_commands="$ac_config_commands default-1"
+-
+ BACKTRACE_FILE="backtrace.lo simple.lo"
+ else
+ ac_fn_c_check_header_mongrel "$LINENO" "unwind.h" "ac_cv_header_unwind_h" "$ac_includes_default"
+@@ -13128,7 +13131,21 @@
+ # INIT-COMMANDS
+ #
+
++srcdir="$srcdir"
++host="$host"
++target="$target"
++with_multisubdir="$with_multisubdir"
++with_multisrctop="$with_multisrctop"
++with_target_subdir="$with_target_subdir"
++ac_configure_args="${multilib_arg} ${ac_configure_args}"
++multi_basedir="$multi_basedir"
++CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
++CC="$CC"
++CXX="$CXX"
++GFORTRAN="$GFORTRAN"
++GCJ="$GCJ"
+
++
+ # The HP-UX ksh and POSIX shell print the target directory to stdout
+ # if CDPATH is set.
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+@@ -13388,20 +13405,6 @@
+
+
+
+-srcdir="$srcdir"
+-host="$host"
+-target="$target"
+-with_multisubdir="$with_multisubdir"
+-with_multisrctop="$with_multisrctop"
+-with_target_subdir="$with_target_subdir"
+-ac_configure_args="${multilib_arg} ${ac_configure_args}"
+-multi_basedir="$multi_basedir"
+-CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+-CC="$CC"
+-CXX="$CXX"
+-GFORTRAN="$GFORTRAN"
+-GCJ="$GCJ"
+-
+ GCC="$GCC"
+ CC="$CC"
+ acx_cv_header_stdint="$acx_cv_header_stdint"
+@@ -13434,8 +13437,8 @@
+ do
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
++ "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+- "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+ "gstdint.h") CONFIG_COMMANDS="$CONFIG_COMMANDS gstdint.h" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "backtrace-supported.h") CONFIG_FILES="$CONFIG_FILES backtrace-supported.h" ;;
+@@ -14024,6 +14027,14 @@
+
+
+ case $ac_file$ac_mode in
++ "default-1":C)
++# Only add multilib support code if we just rebuilt the top-level
++# Makefile.
++case " $CONFIG_FILES " in
++ *" Makefile "*)
++ ac_file=Makefile . ${multi_basedir}/config-ml.in
++ ;;
++esac ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options which allow our
+@@ -14663,14 +14674,6 @@
+ chmod +x "$ofile"
+
+ ;;
+- "default-1":C)
+-# Only add multilib support code if we just rebuilt the top-level
+-# Makefile.
+-case " $CONFIG_FILES " in
+- *" Makefile "*)
+- ac_file=Makefile . ${multi_basedir}/config-ml.in
+- ;;
+-esac ;;
+ "gstdint.h":C)
+ if test "$GCC" = yes; then
+ echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h
+Index: libbacktrace/ChangeLog
+===================================================================
+--- libbacktrace/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382)
++++ libbacktrace/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1,3 +1,8 @@
++2015-01-26 Matthias Klose <doko@ubuntu.com>
++
++ * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
++ * configure: Regenerate.
++
+ 2014-12-19 Release Manager
- _Link_type
- _M_end()
-- { return static_cast<_Link_type>(&this->_M_impl._M_header); }
-+ { return reinterpret_cast<_Link_type>(&this->_M_impl._M_header); }
+ * GCC 4.8.4 released.
+Index: libbacktrace/configure.ac
+===================================================================
+--- libbacktrace/configure.ac (.../tags/gcc_4_8_4_release) (revision 220382)
++++ libbacktrace/configure.ac (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -34,6 +34,10 @@
+ AC_CONFIG_SRCDIR(backtrace.h)
+ AC_CONFIG_HEADER(config.h)
- _Const_Link_type
- _M_end() const
-- { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
-+ { return reinterpret_cast<_Const_Link_type>(&this->_M_impl._M_header); }
++if test -n "${with_target_subdir}"; then
++ AM_ENABLE_MULTILIB(, ..)
++fi
++
+ AC_CANONICAL_SYSTEM
+ target_alias=${target_alias-$host_alias}
+
+@@ -83,7 +87,6 @@
+ if test -n "${with_target_subdir}"; then
+ # We are compiling a GCC library. We can assume that the unwind
+ # library exists.
+- AM_ENABLE_MULTILIB(, ..)
+ BACKTRACE_FILE="backtrace.lo simple.lo"
+ else
+ AC_CHECK_HEADER([unwind.h],
+Index: gcc/tree-vrp.c
+===================================================================
+--- gcc/tree-vrp.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/tree-vrp.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -6811,7 +6811,7 @@
+ tree type = TREE_TYPE (op0);
+ value_range_t *vr0 = get_value_range (op0);
+
+- if (vr0->type != VR_VARYING
++ if (vr0->type == VR_RANGE
+ && INTEGRAL_TYPE_P (type)
+ && vrp_val_is_min (vr0->min)
+ && vrp_val_is_max (vr0->max)
+Index: gcc/c-family/ChangeLog
+===================================================================
+--- gcc/c-family/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/c-family/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1,3 +1,12 @@
++2015-01-20 Marek Polacek <polacek@redhat.com>
++
++ Backport from mainline
++ 2014-06-23 Marek Polacek <polacek@redhat.com>
++
++ PR c/61553
++ * c-common.c (get_atomic_generic_size): Don't segfault if the
++ type doesn't have a size.
++
+ 2014-12-19 Release Manager
- static const_reference
- _S_value(_Const_Link_type __x)
-Index: libstdc++-v3/include/tr2/bool_set
+ * GCC 4.8.4 released.
+Index: gcc/c-family/c-common.c
===================================================================
---- libstdc++-v3/include/tr2/bool_set (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/include/tr2/bool_set (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -44,7 +44,7 @@
- * bool_set
- *
- * See N2136, Bool_set: multi-valued logic
-- * by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
-+ * by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
- *
- * The implicit conversion to bool is slippery! I may use the new
- * explicit conversion. This has been specialized in the language
-Index: libstdc++-v3/ChangeLog
+--- gcc/c-family/c-common.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/c-family/c-common.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -10143,7 +10143,8 @@
+ function);
+ return 0;
+ }
+- size = tree_low_cst (TYPE_SIZE_UNIT (TREE_TYPE (type)), 1);
++ tree type_size = TYPE_SIZE_UNIT (TREE_TYPE (type));
++ size = type_size ? tree_low_cst (type_size, 1) : 0;
+ if (size != size_0)
+ {
+ error_at (loc, "size mismatch in argument %d of %qE", x + 1,
+Index: gcc/c/c-typeck.c
===================================================================
---- libstdc++-v3/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,3 +1,96 @@
-+2014-10-15 Jason Merrill <jason@redhat.com>
+--- gcc/c/c-typeck.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/c/c-typeck.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -5788,7 +5788,8 @@
+ warning (OPT_Wtraditional, "traditional C rejects automatic "
+ "aggregate initialization");
+
+- DECL_INITIAL (decl) = value;
++ if (value != error_mark_node || TREE_CODE (decl) != FUNCTION_DECL)
++ DECL_INITIAL (decl) = value;
+
+ /* ANSI wants warnings about out-of-range constant initializers. */
+ STRIP_TYPE_NOPS (value);
+Index: gcc/c/ChangeLog
+===================================================================
+--- gcc/c/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/c/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1,3 +1,12 @@
++2015-02-01 Jakub Jelinek <jakub@redhat.com>
++
++ Backported from mainline
++ 2015-01-27 Jakub Jelinek <jakub@redhat.com>
+
-+ * libsupc++/dyncast.cc (__dynamic_cast): Handle mid-destruction
-+ dynamic_cast more gracefully.
++ PR c/64766
++ * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
++ of FUNCTION_DECLs with error_mark_node.
+
-+2014-10-14 Kai Tietz <ktietz@redhat.com>
+ 2014-12-19 Release Manager
+
+ * GCC 4.8.4 released.
+Index: gcc/DATESTAMP
+===================================================================
+--- gcc/DATESTAMP (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/DATESTAMP (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1 +1 @@
+-20141219
++20150203
+Index: gcc/rtlanal.c
+===================================================================
+--- gcc/rtlanal.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/rtlanal.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -873,6 +873,17 @@
+ int
+ reg_set_p (const_rtx reg, const_rtx insn)
+ {
++ /* After delay slot handling, call and branch insns might be in a
++ sequence. Check all the elements there. */
++ if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE)
++ {
++ for (int i = 0; i < XVECLEN (PATTERN (insn), 0); ++i)
++ if (reg_set_p (reg, XVECEXP (PATTERN (insn), 0, i)))
++ return true;
+
-+ PR libstdc++/57440
-+ * config/os/mingw32/os_defines.h (_GTHREAD_USE_MUTEX_INIT_FUNC):
-+ Define to avoid leak.
-+ * config/os/mingw32-w64/os_defines.h: Likewise.
++ return false;
++ }
+
-+2014-10-03 Jonathan Wakely <jwakely@redhat.com>
+ /* We can be passed an insn or part of one. If we are passed an insn,
+ check if a side-effect of the insn clobbers REG. */
+ if (INSN_P (insn)
+@@ -884,7 +895,7 @@
+ GET_MODE (reg), REGNO (reg)))
+ || MEM_P (reg)
+ || find_reg_fusage (insn, CLOBBER, reg)))))
+- return 1;
++ return true;
+
+ return set_of (reg, insn) != NULL_RTX;
+ }
+Index: gcc/DEV-PHASE
+===================================================================
+--- gcc/DEV-PHASE (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/DEV-PHASE (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -0,0 +1 @@
++prerelease
+Index: gcc/ChangeLog
+===================================================================
+--- gcc/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1,3 +1,137 @@
++2015-02-01 Jakub Jelinek <jakub@redhat.com>
+
-+ PR libstdc++/63449
-+ * doc/xml/manual/containers.xml: Remove outdated section. Update
-+ std::list notes.
-+ * doc/html/*: Regenerate.
++ Backported from mainline
++ 2015-01-27 Jakub Jelinek <jakub@redhat.com>
+
-+2014-10-01 Jonathan Wakely <jwakely@redhat.com>
++ PR rtl-optimization/61058
++ * jump.c (cleanup_barriers): Update basic block boundaries
++ if BLOCK_FOR_INSN is non-NULL on PREV.
+
-+ * doc/xml/manual/status_cxx2011.xml: Corrections.
-+ * doc/html/manual/status.html: Regenerate.
++ 2013-04-16 Steven Bosscher <steven@gcc.gnu.org>
+
-+2014-08-28 Samuel Bronson <naesten@gmail.com>
++ PR middle-end/43631
++ * jump.c (cleanup_barriers): Use reorder_insns_nobb to avoid making
++ the moved barrier the tail of the basic block it follows.
+
-+ Backport r212453 from trunk
-+ 2014-07-11 Samuel Bronson <naesten@gmail.com>
-+ Matthias Klose <doko@ubuntu.com>
++ 2015-01-26 Jakub Jelinek <jakub@redhat.com>
+
-+ PR libstdc++/58962
-+ * python/libstdcxx/v6/printers.py: Port to Python 2+3
-+ (imap): New compat function.
-+ (izip): Likewise.
-+ (Iterator): New mixin to allow writing iterators in Python 3 style
-+ regardless of which version we're running on.
-+ [Python3] (long) New compat alias for "int".
-+ * testsuite/lib/gdb-test.exp: Port to Python 2+3 (print syntax)
++ * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Add
++ OPTION_MASK_QUAD_MEMORY_ATOMIC.
+
-+ Backport r210625 from trunk
-+ 2014-05-19 Jonathan Wakely <jwakely@redhat.com>
++ 2015-01-12 Jakub Jelinek <jakub@redhat.com>
+
-+ * python/libstdcxx/v6/printers.py: Use Python3 raise syntax.
++ PR tree-optimization/64563
++ * tree-vrp.c (vrp_evaluate_conditional): Check for VR_RANGE
++ instead of != VR_VARYING.
+
-+2014-08-26 John David Anglin <danglin@gcc.gnu.org>
++ PR target/64513
++ * config/i386/i386.c (ix86_expand_prologue): Add
++ REG_FRAME_RELATED_EXPR to %rax and %r10 pushes.
+
-+ * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
++2015-01-29 Ilya Tocar <ilya.tocar@intel.com>
+
-+2014-08-26 Jonathan Wakely <jwakely@redhat.com>
++ * config/i386/avx2intrin.h (_mm256_bslli_epi128,
++ _mm256_bsrli_epi128): New.
++ * config/i386/emmintrin.h (_mm_bsrli_si128, _mm_bslli_si128): Ditto.
+
-+ * doc/xml/manual/status_cxx2011.xml: Correct status table.
-+ * doc/html/manual/*: Regenerate.
++2015-01-27 Mikael Pettersson <mikpelinux@gmail.com>
+
-+2014-08-04 Jonathan Wakely <jwakely@redhat.com>
++ Backport from mainline
+
-+ Backported from mainline
-+ 2014-07-29 Jonathan Wakely <jwakely@redhat.com>
++ 2013-09-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
-+ PR libstdc++/61946
-+ * include/ext/rope (rope::rope(char_producer<_CharT>*, size_t, bool,
-+ const allocator_type&)): Pass non-const allocator to
-+ _S_new_RopeFunction.
-+ * testsuite/ext/rope/61946.cc: New.
++ PR middle-end/57748
++ * expr.c (expand_assignment): Remove misalignp code path.
+
-+2014-08-04 Zifei Tong <zifeitong@gmail.com>
++ 2014-01-08 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
-+ * libsupc++/atexit_thread.cc (HAVE___CXA_THREAD_ATEXIT_IMPL): Add
-+ _GLIBCXX_ prefix to macro.
++ PR middle-end/57748
++ * expr.h (expand_expr_real, expand_expr_real_1): Add new parameter
++ inner_reference_p.
++ (expand_expr, expand_normal): Adjust.
++ * expr.c (expand_expr_real, expand_expr_real_1): Add new parameter
++ inner_reference_p. Use inner_reference_p to expand inner references.
++ (store_expr): Adjust.
++ * cfgexpand.c (expand_call_stmt): Adjust.
+
-+2014-06-03 Jonathan Wakely <jwakely@redhat.com>
++2015-01-26 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
-+ 2014-04-15 Jonathan Wakely <jwakely@redhat.com>
++ 2015-01-26 Uros Bizjak <ubizjak@gmail.com>
+
-+ PR libstdc++/60734
-+ * include/bits/stl_tree.h (_Rb_tree::_M_end): Fix invalid cast.
++ PR target/64795
++ * config/i386/i386.md (*movdi_internal): Also check operand 0
++ to determine TYPE_LEA operand.
++ (*movsi_internal): Ditto.
+
+ Backport from mainline
-+ 2014-05-16 Jonathan Wakely <jwakely@redhat.com>
++ 2015-01-23 Uros Bizjak <ubizjak@gmail.com>
+
-+ PR libstdc++/60966
-+ * include/std/future (__future_base::_State_baseV2::_M_set_result):
-+ Signal condition variable after call_once returns.
-+ (__future_base::_State_baseV2::_M_do_set): Do not signal here.
-+ (promise::set_value, promise::set_exception): Increment the reference
-+ count on the shared state until the function returns.
-+ * testsuite/30_threads/promise/60966.cc: New.
++ * config/i386/sse.md (sse2_loadld): Set attribute isa to sse2 for
++ alternative 1.
+
-+2014-05-29 Jonathan Wakely <jwakely@redhat.com>
++2015-01-15 Martin Liska <mliska@suse.cz>
+
-+ * include/tr2/bool_set: Use UTF-8 for accented characters.
-+ * scripts/run_doxygen: Handle Doxygen 1.8.x change.
++ Backport from mainline
++ 2014-11-27 Richard Biener <rguenther@suse.de>
+
- 2014-05-22 Release Manager
-
- * GCC 4.8.3 released.
-Index: libstdc++-v3/libsupc++/atexit_thread.cc
-===================================================================
---- libstdc++-v3/libsupc++/atexit_thread.cc (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/libsupc++/atexit_thread.cc (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -26,7 +26,7 @@
- #include <new>
- #include "bits/gthr.h"
-
--#if HAVE___CXA_THREAD_ATEXIT_IMPL
-+#if _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL
-
- extern "C" int __cxa_thread_atexit_impl (void (*func) (void *),
- void *arg, void *d);
-@@ -38,7 +38,7 @@
- return __cxa_thread_atexit_impl (dtor, obj, dso_handle);
- }
-
--#else /* HAVE___CXA_THREAD_ATEXIT_IMPL */
-+#else /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
-
- namespace {
- // One element in a singly-linked stack of cleanups.
-@@ -142,4 +142,4 @@
- return 0;
- }
-
--#endif /* HAVE___CXA_THREAD_ATEXIT_IMPL */
-+#endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
-Index: libstdc++-v3/libsupc++/dyncast.cc
-===================================================================
---- libstdc++-v3/libsupc++/dyncast.cc (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/libsupc++/dyncast.cc (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -55,6 +55,18 @@
- adjust_pointer <void> (src_ptr, prefix->whole_object);
- const __class_type_info *whole_type = prefix->whole_type;
- __class_type_info::__dyncast_result result;
++ PR middle-end/63704
++ * alias.c (mems_in_disjoint_alias_sets_p): Remove assert
++ and instead return false when !fstrict-aliasing.
+
-+ // If the whole object vptr doesn't refer to the whole object type, we're
-+ // in the middle of constructing a primary base, and src is a separate
-+ // base. This has undefined behavior and we can't find anything outside
-+ // of the base we're actually constructing, so fail now rather than
-+ // segfault later trying to use a vbase offset that doesn't exist.
-+ const void *whole_vtable = *static_cast <const void *const *> (whole_ptr);
-+ const vtable_prefix *whole_prefix =
-+ adjust_pointer <vtable_prefix> (whole_vtable,
-+ -offsetof (vtable_prefix, origin));
-+ if (whole_prefix->whole_type != whole_type)
-+ return NULL;
-
- whole_type->__do_dyncast (src2dst, __class_type_info::__contained_public,
- dst_type, whole_ptr, src_type, src_ptr, result);
-Index: libstdc++-v3/testsuite/30_threads/promise/60966.cc
-===================================================================
---- libstdc++-v3/testsuite/30_threads/promise/60966.cc (.../tags/gcc_4_8_3_release) (revision 0)
-+++ libstdc++-v3/testsuite/30_threads/promise/60966.cc (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,67 @@
-+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
-+// { dg-options " -std=gnu++11 -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* powerpc-ibm-aix* } }
-+// { dg-options " -std=gnu++11 -pthreads" { target *-*-solaris* } }
-+// { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-darwin* } }
-+// { dg-require-cstdint "" }
-+// { dg-require-gthreads "" }
-+// { dg-require-atomic-builtins "" }
++2015-01-14 Renlin Li <renlin.li@arm.com>
+
-+// Copyright (C) 2014 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.
++ Backport form mainline
++ 2014-08-12 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
-+// 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.
++ PR target/61413
++ * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Fix definition
++ of __ARM_SIZEOF_WCHAR_T.
+
-+// 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/>.
++2015-01-13 Pat Haugen <pthaugen@us.ibm.com>
+
-+// libstdc++/60966
-+// This test hangs if std::promise::~promise() destroys the
-+// shared state before std::promise::set_value() finishes using it.
++ Backport from mainline
++ 2014-12-20 Segher Boessenkool <segher@kernel.crashing.org>
+
-+#include <future>
-+#include <thread>
-+#include <vector>
++ PR target/64358
++ * config/rs6000/rs6000.c (rs6000_split_logical_inner): Swap the
++ input operands if only the second is inverted.
++ * config/rs6000/rs6000.md (*boolc<mode>3_internal1 for BOOL_128):
++ Swap BOOL_REGS_OP1 and BOOL_REGS_OP2. Correct arguments to
++ rs6000_split_logical.
++ (*boolc<mode>3_internal2 for TI2): Swap operands[1] and operands[2].
+
-+const int THREADS = 10;
++2015-01-13 Oleg Endo <olegendo@gcc.gnu.org>
+
-+void run_task(std::promise<void>* pr)
-+{
-+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
-+ pr->set_value();
-+}
++ Backport form mainline
++ 2015-01-13 Oleg Endo <olegendo@gcc.gnu.org>
+
-+int main()
-+{
-+ std::vector<std::promise<void>*> tasks(THREADS);
-+ std::vector<std::thread> threads(THREADS);
-+ std::vector<std::future<void>> futures(THREADS);
++ PR target/64479
++ * rtlanal.c (set_reg_p): Handle SEQUENCE constructs.
+
-+ for (int i = 0; i < THREADS; ++i)
-+ {
-+ std::promise<void>* task = new std::promise<void>;
-+ tasks[i] = task;
-+ futures[i] = task->get_future();
-+ threads[i] = std::thread(run_task, task);
-+ }
++2014-12-27 H.J. Lu <hongjiu.lu@intel.com>
+
-+ for (int i = 0; i < THREADS; ++i)
-+ {
-+ // the temporary future releases the state as soon as wait() returns
-+ std::future<void>(std::move(futures[i])).wait();
-+ // state is ready, should now be safe to delete promise, so it
-+ // releases the shared state too
-+ delete tasks[i];
-+ }
++ Backport from mainline:
++ 2014-12-27 H.J. Lu <hongjiu.lu@intel.com>
+
-+ for (auto& t : threads)
-+ t.join();
-+}
-Index: libstdc++-v3/testsuite/ext/rope/61946.cc
-===================================================================
---- libstdc++-v3/testsuite/ext/rope/61946.cc (.../tags/gcc_4_8_3_release) (revision 0)
-+++ libstdc++-v3/testsuite/ext/rope/61946.cc (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,31 @@
-+// Copyright (C) 2014 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.
++ PR target/64409
++ * config/i386/i386.c (ix86_function_type_abi): Issue an error
++ when ms_abi attribute is used with x32.
+
-+// 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.
++2014-12-19 H.J. Lu <hongjiu.lu@intel.com>
+
-+// 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/>.
++ Backported from mainline
++ 2014-12-14 H.J. Lu <hongjiu.lu@intel.com>
+
-+// { dg-do compile }
++ PR rtl-optimization/64037
++ * combine.c (setup_incoming_promotions): Pass the argument
++ before any promotions happen to promote_function_mode.
+
-+#include <ext/rope>
++2014-12-19 Jakub Jelinek <jakub@redhat.com>
+
-+struct empty_char_prod : __gnu_cxx::char_producer<char>
-+{
-+ virtual void operator()(size_t, size_t, char*) {}
-+};
++ * BASE-VER: Set to 4.8.5.
++ * DEV-PHASE: Set to prerelease.
+
-+int main ()
-+{
-+ empty_char_prod* ecp = new empty_char_prod;
-+ __gnu_cxx::crope excrope( ecp, 10L, true );
-+}
-Index: libstdc++-v3/testsuite/lib/gdb-test.exp
-===================================================================
---- libstdc++-v3/testsuite/lib/gdb-test.exp (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/testsuite/lib/gdb-test.exp (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -91,7 +91,7 @@
- }
- }
+ 2014-12-19 Release Manager
+
+ * GCC 4.8.4 released.
+@@ -382,7 +516,7 @@
+ * config/pa/pa.md (trap): New insn. Add "trap" to attribute type.
+ Don't allow trap insn in in_branch_delay, in_nullified_branch_delay
+ or in_call_delay.
+-
++
+ 2014-11-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Define.
+Index: gcc/testsuite/gcc.target/i386/pr64409.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/pr64409.c (.../tags/gcc_4_8_4_release) (revision 0)
++++ gcc/testsuite/gcc.target/i386/pr64409.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -0,0 +1,6 @@
++/* { dg-do compile { target { ! { ia32 } } } } */
++/* { dg-require-effective-target maybe_x32 } */
++/* { dg-options "-O0 -mx32" } */
++
++int a;
++int* __attribute__ ((ms_abi)) fn1 () { return &a; } /* { dg-error "X32 does not support ms_abi attribute" } */
+Index: gcc/testsuite/gcc.target/i386/sse-14.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/sse-14.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/testsuite/gcc.target/i386/sse-14.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -150,6 +150,8 @@
+
+ /* emmintrin.h */
+ test_2 (_mm_shuffle_pd, __m128d, __m128d, __m128d, 1)
++test_1 (_mm_bsrli_si128, __m128i, __m128i, 1)
++test_1 (_mm_bslli_si128, __m128i, __m128i, 1)
+ test_1 (_mm_srli_si128, __m128i, __m128i, 1)
+ test_1 (_mm_slli_si128, __m128i, __m128i, 1)
+ test_1 (_mm_extract_epi16, int, __m128i, 1)
+Index: gcc/testsuite/gcc.target/i386/pr57003.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/pr57003.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/testsuite/gcc.target/i386/pr57003.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1,5 +1,5 @@
+ /* PR rtl-optimization/57003 */
+-/* { dg-do run } */
++/* { dg-do run { target { ! x32 } } } */
+ /* { dg-options "-O2 -maccumulate-outgoing-args" } */
-- set do_whatis_tests [gdb_batch_check "python print gdb.type_printers" \
-+ set do_whatis_tests [gdb_batch_check "python print(gdb.type_printers)" \
- "\\\[\\\]"]
- if {!$do_whatis_tests} {
- send_log "skipping 'whatis' tests - gdb too old"
-@@ -252,6 +252,6 @@
- # but not earlier versions.
- # Return 1 if the version is ok, 0 otherwise.
- proc gdb_version_check {} {
-- return [gdb_batch_check "python print gdb.lookup_global_symbol" \
-+ return [gdb_batch_check "python print(gdb.lookup_global_symbol)" \
- "<built-in function lookup_global_symbol>"]
- }
-Index: libstdc++-v3/config/os/mingw32-w64/os_defines.h
+ #define N 2001
+Index: gcc/testsuite/gcc.target/i386/sse-22.c
===================================================================
---- libstdc++-v3/config/os/mingw32-w64/os_defines.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/config/os/mingw32-w64/os_defines.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -78,4 +78,7 @@
- #define _GLIBCXX_LLP64 1
+--- gcc/testsuite/gcc.target/i386/sse-22.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/testsuite/gcc.target/i386/sse-22.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -88,6 +88,8 @@
#endif
+ #include <emmintrin.h>
+ test_2 (_mm_shuffle_pd, __m128d, __m128d, __m128d, 1)
++test_1 (_mm_bsrli_si128, __m128i, __m128i, 1)
++test_1 (_mm_bslli_si128, __m128i, __m128i, 1)
+ test_1 (_mm_srli_si128, __m128i, __m128i, 1)
+ test_1 (_mm_slli_si128, __m128i, __m128i, 1)
+ test_1 (_mm_extract_epi16, int, __m128i, 1)
+@@ -219,6 +221,8 @@
+ test_1 ( _mm256_shuffle_epi32, __m256i, __m256i, 1)
+ test_1 ( _mm256_shufflehi_epi16, __m256i, __m256i, 1)
+ test_1 ( _mm256_shufflelo_epi16, __m256i, __m256i, 1)
++test_1 ( _mm256_bslli_epi128, __m256i, __m256i, 8)
++test_1 ( _mm256_bsrli_epi128, __m256i, __m256i, 8)
+ test_1 ( _mm256_slli_si256, __m256i, __m256i, 8)
+ test_1 ( _mm256_srli_si256, __m256i, __m256i, 8)
+ test_2 ( _mm_blend_epi32, __m128i, __m128i, __m128i, 1)
+Index: gcc/testsuite/gcc.target/i386/pr60516.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/pr60516.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/testsuite/gcc.target/i386/pr60516.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1,5 +1,5 @@
+ /* PR target/60516 */
+-/* { dg-do compile } */
++/* { dg-do compile { target { ! x32 } } } */
+ /* { dg-options "-O2" } */
-+// See libstdc++/59807
-+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
-+
- #endif
-Index: libstdc++-v3/config/os/mingw32/os_defines.h
+ struct S { char c[65536]; };
+Index: gcc/testsuite/gcc.target/i386/pr64513.c
===================================================================
---- libstdc++-v3/config/os/mingw32/os_defines.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/config/os/mingw32/os_defines.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -75,4 +75,7 @@
- #define _GLIBCXX_LLP64 1
- #endif
-
-+// See libstdc++/59807
-+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
+--- gcc/testsuite/gcc.target/i386/pr64513.c (.../tags/gcc_4_8_4_release) (revision 0)
++++ gcc/testsuite/gcc.target/i386/pr64513.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -0,0 +1,17 @@
++/* PR target/64513 */
++/* { dg-do compile } */
++/* { dg-options "-O2 -mstack-arg-probe" } */
+
- #endif
-Index: libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt
-===================================================================
---- libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -400,6 +400,7 @@
- FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE6getlocEv@@GLIBCXX_3.4
- FUNC:_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
- FUNC:_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
-+FUNC:_ZNKSt17bad_function_call4whatEv@@GLIBCXX_3.4.18
- FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
- FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE5rdbufEv@@GLIBCXX_3.4
- FUNC:_ZNKSt18basic_stringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
-@@ -587,6 +588,8 @@
- FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewm@@GLIBCXX_3.4
- FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewx@@GLIBCXX_3.4
- FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewy@@GLIBCXX_3.4
-+FUNC:_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj@@GLIBCXX_3.4.18
-+FUNC:_ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEjjj@@GLIBCXX_3.4.18
- FUNC:_ZNKSt8bad_cast4whatEv@@GLIBCXX_3.4.9
- FUNC:_ZNKSt8ios_base7failure4whatEv@@GLIBCXX_3.4
- FUNC:_ZNKSt8messagesIcE18_M_convert_to_charERKSs@@GLIBCXX_3.4
-@@ -1204,6 +1207,7 @@
- FUNC:_ZNSt11regex_errorD0Ev@@GLIBCXX_3.4.15
- FUNC:_ZNSt11regex_errorD1Ev@@GLIBCXX_3.4.15
- FUNC:_ZNSt11regex_errorD2Ev@@GLIBCXX_3.4.15
-+FUNC:_ZNSt11this_thread11__sleep_forENSt6chrono8durationIxSt5ratioILx1ELx1EEEENS1_IxS2_ILx1ELx1000000000EEEE@@GLIBCXX_3.4.18
- FUNC:_ZNSt12__basic_fileIcE2fdEv@@GLIBCXX_3.4
- FUNC:_ZNSt12__basic_fileIcE4fileEv@@GLIBCXX_3.4.1
- FUNC:_ZNSt12__basic_fileIcE4openEPKcSt13_Ios_Openmodei@@GLIBCXX_3.4
-@@ -1471,6 +1475,11 @@
- FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEt@@GLIBCXX_3.4
- FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEx@@GLIBCXX_3.4
- FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEy@@GLIBCXX_3.4
-+FUNC:_ZNSt13random_device14_M_init_pretr1ERKSs@@GLIBCXX_3.4.18
-+FUNC:_ZNSt13random_device16_M_getval_pretr1Ev@@GLIBCXX_3.4.18
-+FUNC:_ZNSt13random_device7_M_finiEv@@GLIBCXX_3.4.18
-+FUNC:_ZNSt13random_device7_M_initERKSs@@GLIBCXX_3.4.18
-+FUNC:_ZNSt13random_device9_M_getvalEv@@GLIBCXX_3.4.18
- FUNC:_ZNSt13runtime_errorC1ERKSs@@GLIBCXX_3.4
- FUNC:_ZNSt13runtime_errorC2ERKSs@@GLIBCXX_3.4
- FUNC:_ZNSt13runtime_errorD0Ev@@GLIBCXX_3.4
-@@ -1900,6 +1909,8 @@
- FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9
- FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14
- FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11
-+FUNC:_ZNSt6chrono3_V212steady_clock3nowEv@@GLIBCXX_3.4.19
-+FUNC:_ZNSt6chrono3_V212system_clock3nowEv@@GLIBCXX_3.4.19
- FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
- FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
- FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4
-@@ -2436,6 +2447,7 @@
- FUNC:__cxa_guard_release@@CXXABI_1.3
- FUNC:__cxa_pure_virtual@@CXXABI_1.3
- FUNC:__cxa_rethrow@@CXXABI_1.3
-+FUNC:__cxa_thread_atexit@@CXXABI_1.3.7
- FUNC:__cxa_throw@@CXXABI_1.3
- FUNC:__cxa_tm_cleanup@@CXXABI_TM_1
- FUNC:__cxa_vec_cctor@@CXXABI_1.3
-@@ -2482,6 +2494,7 @@
- OBJECT:0:CXXABI_1.3.4
- OBJECT:0:CXXABI_1.3.5
- OBJECT:0:CXXABI_1.3.6
-+OBJECT:0:CXXABI_1.3.7
- OBJECT:0:CXXABI_TM_1
- OBJECT:0:GLIBCXX_3.4
- OBJECT:0:GLIBCXX_3.4.1
-@@ -2493,6 +2506,8 @@
- OBJECT:0:GLIBCXX_3.4.15
- OBJECT:0:GLIBCXX_3.4.16
- OBJECT:0:GLIBCXX_3.4.17
-+OBJECT:0:GLIBCXX_3.4.18
-+OBJECT:0:GLIBCXX_3.4.19
- OBJECT:0:GLIBCXX_3.4.2
- OBJECT:0:GLIBCXX_3.4.3
- OBJECT:0:GLIBCXX_3.4.4
-@@ -2992,6 +3007,8 @@
- OBJECT:1:_ZNSt21__numeric_limits_base9is_moduloE@@GLIBCXX_3.4
- OBJECT:1:_ZNSt21__numeric_limits_base9is_signedE@@GLIBCXX_3.4
- OBJECT:1:_ZNSt6chrono12system_clock12is_monotonicE@@GLIBCXX_3.4.11
-+OBJECT:1:_ZNSt6chrono3_V212steady_clock9is_steadyE@@GLIBCXX_3.4.19
-+OBJECT:1:_ZNSt6chrono3_V212system_clock9is_steadyE@@GLIBCXX_3.4.19
- OBJECT:1:_ZSt10adopt_lock@@GLIBCXX_3.4.11
- OBJECT:1:_ZSt10defer_lock@@GLIBCXX_3.4.11
- OBJECT:1:_ZSt11try_to_lock@@GLIBCXX_3.4.11
-Index: configure.ac
-===================================================================
---- configure.ac (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ configure.ac (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1154,6 +1154,9 @@
- *-mingw*)
- host_makefile_frag="config/mh-mingw"
- ;;
-+ alpha*-*-linux*)
-+ host_makefile_frag="config/mh-alpha-linux"
-+ ;;
- hppa*-hp-hpux10*)
- host_makefile_frag="config/mh-pa-hpux10"
- ;;
-Index: ChangeLog
++struct A {};
++struct B { struct A y; };
++int foo (struct A);
++
++int
++bar (int x)
++{
++ struct B b;
++ int c;
++ while (x--)
++ c = foo (b.y);
++ return c;
++}
+Index: gcc/testsuite/gfortran.dg/pr64528.f90
===================================================================
---- ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,3 +1,9 @@
-+2014-07-26 Uros Bizjak <ubizjak@gmail.com>
+--- gcc/testsuite/gfortran.dg/pr64528.f90 (.../tags/gcc_4_8_4_release) (revision 0)
++++ gcc/testsuite/gfortran.dg/pr64528.f90 (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -0,0 +1,20 @@
++! PR fortran/64528
++! { dg-do compile }
++! { dg-options "-O -fno-tree-dce -fno-tree-ccp" }
++
++program pr64528
++ interface
++ subroutine foo(x)
++ integer, value :: x
++ end subroutine foo
++ end interface
++ integer :: x
++ x = 10
++ call foo(x)
++ if(x .ne. 10) then
++ endif
++end program pr64528
++subroutine foo(x)
++ integer, value :: x
++ x = 11
++end subroutine foo
+Index: gcc/testsuite/gfortran.dg/typebound_operator_20.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/typebound_operator_20.f90 (.../tags/gcc_4_8_4_release) (revision 0)
++++ gcc/testsuite/gfortran.dg/typebound_operator_20.f90 (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -0,0 +1,53 @@
++! { dg-do run }
++!
++! PR 63733: [4.8/4.9/5 Regression] [OOP] wrong resolution for OPERATOR generics
++!
++! Original test case from Alberto F. MartÃn Huertas <amartin@cimne.upc.edu>
++! Slightly modified by Salvatore Filippone <sfilippone@uniroma2.it>
++! Further modified by Janus Weil <janus@gcc.gnu.org>
++
++module overwrite
++ type parent
++ contains
++ procedure :: sum => sum_parent
++ generic :: operator(+) => sum
++ end type
+
-+ PR target/47230
-+ * configure.ac (alpha*-*-linux*): Use mh-alpha-linux.
-+ * configure: Regenerate.
++ type, extends(parent) :: child
++ contains
++ procedure :: sum => sum_child
++ end type
+
- 2014-05-22 Release Manager
-
- * GCC 4.8.3 released.
-Index: contrib/ChangeLog
-===================================================================
---- contrib/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ contrib/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,3 +1,7 @@
-+2014-07-07 Richard Biener <rguenther@suse.de>
++contains
+
-+ * gennews: Use gcc-3.0/index.html.
++ integer function sum_parent(op1,op2)
++ implicit none
++ class(parent), intent(in) :: op1, op2
++ sum_parent = 0
++ end function
+
- 2014-05-22 Release Manager
-
- * GCC 4.8.3 released.
-Index: contrib/gennews
-===================================================================
---- contrib/gennews (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ contrib/gennews (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -37,7 +37,7 @@
- gcc-3.3/index.html gcc-3.3/changes.html
- gcc-3.2/index.html gcc-3.2/changes.html
- gcc-3.1/index.html gcc-3.1/changes.html
-- gcc-3.0/gcc-3.0.html gcc-3.0/features.html gcc-3.0/caveats.html
-+ gcc-3.0/index.html gcc-3.0/features.html gcc-3.0/caveats.html
- gcc-2.95/index.html gcc-2.95/features.html gcc-2.95/caveats.html
- egcs-1.1/index.html egcs-1.1/features.html egcs-1.1/caveats.html
- egcs-1.0/index.html egcs-1.0/features.html egcs-1.0/caveats.html"
-Index: config/mh-alpha-linux
-===================================================================
---- config/mh-alpha-linux (.../tags/gcc_4_8_3_release) (revision 0)
-+++ config/mh-alpha-linux (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,3 @@
-+# Prevent GPREL16 relocation truncation
-+LDFLAGS += -Wl,--no-relax
-+BOOT_LDFLAGS += -Wl,--no-relax
-Index: config/ChangeLog
-===================================================================
---- config/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ config/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,3 +1,8 @@
-+2014-07-26 Uros Bizjak <ubizjak@gmail.com>
++ integer function sum_child(op1,op2)
++ implicit none
++ class(child) , intent(in) :: op1
++ class(parent), intent(in) :: op2
++ sum_child = 1
++ end function
+
-+ PR target/47230
-+ * mh-alpha-linux: New file.
++end module
+
- 2014-05-22 Release Manager
-
- * GCC 4.8.3 released.
-Index: libjava/classpath
-===================================================================
---- libjava/classpath (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libjava/classpath (.../branches/gcc-4_8-branch) (revision 217117)
-
-Property changes on: libjava/classpath
-___________________________________________________________________
-Modified: svn:mergeinfo
- Merged /trunk/libjava/classpath:r211733,215049
-Index: configure
-===================================================================
---- configure (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ configure (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -3834,6 +3834,9 @@
- *-mingw*)
- host_makefile_frag="config/mh-mingw"
- ;;
-+ alpha*-*-linux*)
-+ host_makefile_frag="config/mh-alpha-linux"
-+ ;;
- hppa*-hp-hpux10*)
- host_makefile_frag="config/mh-pa-hpux10"
- ;;
-Index: libgcc/ChangeLog
++program drive
++ use overwrite
++ implicit none
++
++ type(parent) :: m1, m2
++ class(parent), pointer :: mres
++ type(child) :: h1, h2
++ class(parent), pointer :: hres
++
++ if (m1 + m2 /= 0) call abort()
++ if (h1 + m2 /= 1) call abort()
++ if (h1%sum(h2) /= 1) call abort()
++
++end
++
++! { dg-final { cleanup-modules "overwrite" } }
+Index: gcc/testsuite/gfortran.dg/typebound_call_26.f90
===================================================================
---- libgcc/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgcc/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,3 +1,14 @@
-+2014-10-26 John David Anglin <danglin@gcc.gnu.org>
+--- gcc/testsuite/gfortran.dg/typebound_call_26.f90 (.../tags/gcc_4_8_4_release) (revision 0)
++++ gcc/testsuite/gfortran.dg/typebound_call_26.f90 (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -0,0 +1,30 @@
++! { dg-do compile }
++!
++! PR 64244: [4.8/4.9/5 Regression] ICE at class.c:236 when using non_overridable
++!
++! Contributed by OndÅ™ej ÄŒertÃk <ondrej.certik@gmail.com>
++
++module m
++ implicit none
+
-+ * config/pa/linux-unwind.h (pa32_read_access_ok): New function.
-+ (pa32_fallback_frame_state): Use pa32_read_access_ok to check if
-+ memory read accesses are ok.
++ type :: A
++ contains
++ generic :: f => g
++ procedure, non_overridable :: g
++ end type
+
-+2014-09-18 Joseph Myers <joseph@codesourcery.com>
++contains
+
-+ * config/i386/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Treat clear
-+ bits not set bits as indicating trapping exceptions.
++ subroutine g(this)
++ class(A), intent(in) :: this
++ end subroutine
+
- 2014-05-22 Release Manager
-
- * GCC 4.8.3 released.
-Index: libgcc/config/i386/sfp-machine.h
++end module
++
++
++program test_non_overridable
++ use m, only: A
++ implicit none
++ class(A), allocatable :: h
++ call h%f()
++end
+Index: gcc/testsuite/gfortran.dg/dependency_45.f90
===================================================================
---- libgcc/config/i386/sfp-machine.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgcc/config/i386/sfp-machine.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -59,7 +59,7 @@
- __sfp_handle_exceptions (_fex); \
- } while (0);
-
--#define FP_TRAPPING_EXCEPTIONS ((_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
-+#define FP_TRAPPING_EXCEPTIONS ((~_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
-
- #define FP_ROUNDMODE (_fcw & FP_RND_MASK)
- #endif
-Index: libgcc/config/pa/linux-unwind.h
+--- gcc/testsuite/gfortran.dg/dependency_45.f90 (.../tags/gcc_4_8_4_release) (revision 0)
++++ gcc/testsuite/gfortran.dg/dependency_45.f90 (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -0,0 +1,12 @@
++! { dg-do run }
++! { dg-options "-Warray-temporaries" }
++! PR 56867 - substrings were not checked for dependency.
++program main
++ character(len=4) :: a
++ character(len=4) :: c(3)
++ c(1) = 'abcd'
++ c(2) = '1234'
++ c(3) = 'wxyz'
++ c(:)(1:2) = c(2)(2:3) ! { dg-warning "array temporary" }
++ if (c(3) .ne. '23yz') call abort
++end program main
+Index: gcc/testsuite/gcc.dg/pr61058.c
===================================================================
---- libgcc/config/pa/linux-unwind.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgcc/config/pa/linux-unwind.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -32,6 +32,17 @@
- #include <signal.h>
- #include <sys/ucontext.h>
-
-+/* Return TRUE if read access to *P is allowed. */
+--- gcc/testsuite/gcc.dg/pr61058.c (.../tags/gcc_4_8_4_release) (revision 0)
++++ gcc/testsuite/gcc.dg/pr61058.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -0,0 +1,10 @@
++/* PR rtl-optimization/61058 */
++/* { dg-do compile } */
++/* { dg-options "" } */
++/* { dg-additional-options "-fno-asynchronous-unwind-tables -mtune=atom" { target i?86-*-* x86_64-*-* } } */
+
-+static inline long
-+pa32_read_access_ok (void *p)
++void
++foo (void)
+{
-+ long ret;
-+
-+ __asm__ ("proberi (%1),3,%0" : "=r" (ret) : "r" (p) :);
-+ return ret;
++ __builtin_unreachable ();
+}
+Index: gcc/testsuite/gcc.dg/pr64766.c
+===================================================================
+--- gcc/testsuite/gcc.dg/pr64766.c (.../tags/gcc_4_8_4_release) (revision 0)
++++ gcc/testsuite/gcc.dg/pr64766.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -0,0 +1,9 @@
++/* PR c/64766 */
++/* { dg-do compile } */
+
- /* Unfortunately, because of various bugs and changes to the kernel,
- we have several cases to deal with.
-
-@@ -48,8 +59,13 @@
- tell us how to locate the sigcontext structure.
-
- Note that with a 2.4 64-bit kernel, the signal context is not properly
-- passed back to userspace so the unwind will not work correctly. */
-+ passed back to userspace so the unwind will not work correctly.
-
-+ There is also a bug in various glibc versions. The (CONTEXT)->ra
-+ for the outermost frame is not marked as undefined, so we need to
-+ check whether read access is allowed for all the accesses used in
-+ searching for the signal trampoline. */
++void
++foo ()
++{
++}
+
- #define MD_FALLBACK_FRAME_STATE_FOR pa32_fallback_frame_state
-
- static _Unwind_Reason_Code
-@@ -73,14 +89,17 @@
- e4008200 be,l 0x100(%sr2, %r0), %sr0, %r31
- 08000240 nop */
-
-- if (pc[0] == 0x34190000 || pc[0] == 0x34190002)
-+ if (pa32_read_access_ok (pc)
-+ && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
- off = 4*4;
-- else if (pc[4] == 0x34190000 || pc[4] == 0x34190002)
-+ else if (pa32_read_access_ok (&pc[4])
-+ && (pc[4] == 0x34190000 || pc[4] == 0x34190002))
- {
- pc += 4;
- off = 10 * 4;
- }
-- else if (pc[5] == 0x34190000 || pc[5] == 0x34190002)
-+ else if (pa32_read_access_ok (&pc[5])
-+ && (pc[5] == 0x34190000 || pc[5] == 0x34190002))
- {
- pc += 5;
- off = 10 * 4;
-@@ -96,13 +115,16 @@
- word boundary and we can then determine the frame offset. */
- sp = (unsigned long)context->ra;
- pc = (unsigned int *)sp;
-- if ((pc[0] == 0x34190000 || pc[0] == 0x34190002) && (sp & 4))
-+ if ((sp & 4)
-+ && pa32_read_access_ok (pc)
-+ && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
- off = 5 * 4;
- else
- return _URC_END_OF_STACK;
- }
-
-- if (pc[1] != 0x3414015a
-+ if (!pa32_read_access_ok (&pc[3])
-+ || pc[1] != 0x3414015a
- || pc[2] != 0xe4008200
- || pc[3] != 0x08000240)
- return _URC_END_OF_STACK;
-Index: gcc/doc/sourcebuild.texi
++void foo () = 0; /* { dg-error "is initialized like a variable|invalid initializer" } */
+Index: gcc/testsuite/gcc.dg/pr64563.c
===================================================================
---- gcc/doc/sourcebuild.texi (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/doc/sourcebuild.texi (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1299,6 +1299,9 @@
- @item double64plus
- Target has @code{double} that is 64 bits or longer.
-
-+@item longdouble128
-+Target has 128-bit @code{long double}.
+--- gcc/testsuite/gcc.dg/pr64563.c (.../tags/gcc_4_8_4_release) (revision 0)
++++ gcc/testsuite/gcc.dg/pr64563.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -0,0 +1,14 @@
++/* PR tree-optimization/64563 */
++/* { dg-do compile } */
++/* { dg-options "-Os -Wtype-limits" } */
+
- @item int32plus
- Target has @code{int} that is at 32 bits or longer.
-
-Index: gcc/doc/extend.texi
-===================================================================
---- gcc/doc/extend.texi (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/doc/extend.texi (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -375,6 +375,8 @@
- This is more friendly to code living in shared libraries, as it reduces
- the number of dynamic relocations that are needed, and by consequence,
- allows the data to be read-only.
-+This alternative with label differences is not supported for the AVR target,
-+please use the first approach for AVR programs.
-
- The @code{&&foo} expressions for the same label might have different
- values if the containing function is inlined or cloned. If a program
-@@ -10490,7 +10492,7 @@
- name.
-
- @smallexample
--v32qi __builtin_ia32_mpsadbw256 (v32qi,v32qi,v32qi,int)
-+v32qi __builtin_ia32_mpsadbw256 (v32qi,v32qi,int)
- v32qi __builtin_ia32_pabsb256 (v32qi)
- v16hi __builtin_ia32_pabsw256 (v16hi)
- v8si __builtin_ia32_pabsd256 (v8si)
-@@ -10725,8 +10727,8 @@
- @smallexample
- v2df __builtin_ia32_vfrczpd (v2df)
- v4sf __builtin_ia32_vfrczps (v4sf)
--v2df __builtin_ia32_vfrczsd (v2df, v2df)
--v4sf __builtin_ia32_vfrczss (v4sf, v4sf)
-+v2df __builtin_ia32_vfrczsd (v2df)
-+v4sf __builtin_ia32_vfrczss (v4sf)
- v4df __builtin_ia32_vfrczpd256 (v4df)
- v8sf __builtin_ia32_vfrczps256 (v8sf)
- v2di __builtin_ia32_vpcmov (v2di, v2di, v2di)
-@@ -11855,8 +11857,6 @@
- uint64_t __builtin_ppc_get_timebase ();
- unsigned long __builtin_ppc_mftb ();
- double __builtin_unpack_longdouble (long double, int);
--double __builtin_longdouble_dw0 (long double);
--double __builtin_longdouble_dw1 (long double);
- long double __builtin_pack_longdouble (double, double);
- @end smallexample
-
-Index: gcc/doc/tm.texi
-===================================================================
---- gcc/doc/tm.texi (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/doc/tm.texi (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -3930,6 +3930,13 @@
- @c above is overfull. not sure what to do. --mew 5feb93 did
- @c something, not sure if it looks good. --mew 10feb93
-
-+@defmac INCOMING_REG_PARM_STACK_SPACE (@var{fndecl})
-+Like @code{REG_PARM_STACK_SPACE}, but for incoming register arguments.
-+Define this macro if space guaranteed when compiling a function body
-+is different to space required when making a call, a situation that
-+can arise with K&R style function definitions.
-+@end defmac
++int a, b, c, d, f;
++unsigned int e;
+
- @defmac OUTGOING_REG_PARM_STACK_SPACE (@var{fntype})
- Define this to a nonzero value if it is the responsibility of the
- caller to allocate the area reserved for arguments passed in registers
-Index: gcc/doc/tm.texi.in
++void
++foo (void)
++{
++ d = b = (a != (e | 4294967288UL));
++ if (!d)
++ c = f || b;
++}
+Index: gcc/testsuite/ChangeLog
===================================================================
---- gcc/doc/tm.texi.in (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/doc/tm.texi.in (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -3898,6 +3898,13 @@
- @c above is overfull. not sure what to do. --mew 5feb93 did
- @c something, not sure if it looks good. --mew 10feb93
-
-+@defmac INCOMING_REG_PARM_STACK_SPACE (@var{fndecl})
-+Like @code{REG_PARM_STACK_SPACE}, but for incoming register arguments.
-+Define this macro if space guaranteed when compiling a function body
-+is different to space required when making a call, a situation that
-+can arise with K&R style function definitions.
-+@end defmac
+--- gcc/testsuite/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/testsuite/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1,3 +1,103 @@
++2015-02-01 Jakub Jelinek <jakub@redhat.com>
+
- @defmac OUTGOING_REG_PARM_STACK_SPACE (@var{fntype})
- Define this to a nonzero value if it is the responsibility of the
- caller to allocate the area reserved for arguments passed in registers
-Index: gcc/doc/invoke.texi
-===================================================================
---- gcc/doc/invoke.texi (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/doc/invoke.texi (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -475,6 +475,7 @@
- -mstrict-align @gol
- -momit-leaf-frame-pointer -mno-omit-leaf-frame-pointer @gol
- -mtls-dialect=desc -mtls-dialect=traditional @gol
-+-mfix-cortex-a53-835769 -mno-fix-cortex-a53-835769 @gol
- -march=@var{name} -mcpu=@var{name} -mtune=@var{name}}
-
- @emph{Adapteva Epiphany Options}
-@@ -1009,6 +1010,7 @@
- -ffixed-@var{reg} -fexceptions @gol
- -fnon-call-exceptions -fdelete-dead-exceptions -funwind-tables @gol
- -fasynchronous-unwind-tables @gol
-+-fno-gnu-unique @gol
- -finhibit-size-directive -finstrument-functions @gol
- -finstrument-functions-exclude-function-list=@var{sym},@var{sym},@dots{} @gol
- -finstrument-functions-exclude-file-list=@var{file},@var{file},@dots{} @gol
-@@ -10933,6 +10935,14 @@
- Use traditional TLS as the thread-local storage mechanism for dynamic accesses
- of TLS variables.
-
-+@item -mfix-cortex-a53-835769
-+@itemx -mno-fix-cortex-a53-835769
-+@opindex -mfix-cortex-a53-835769
-+@opindex -mno-fix-cortex-a53-835769
-+Enable or disable the workaround for the ARM Cortex-A53 erratum number 835769.
-+This will involve inserting a NOP instruction between memory instructions and
-+64-bit integer multiply-accumulate instructions.
++ Backported from mainline
++ 2015-01-27 Jakub Jelinek <jakub@redhat.com>
+
- @item -march=@var{name}
- @opindex march
- Specify the name of the target architecture, optionally suffixed by one or
-@@ -11271,8 +11281,8 @@
-
- @option{-march=native} causes the compiler to auto-detect the architecture
- of the build computer. At present, this feature is only supported on
--Linux, and not all architectures are recognized. If the auto-detect is
--unsuccessful the option has no effect.
-+GNU/Linux, and not all architectures are recognized. If the auto-detect
-+is unsuccessful the option has no effect.
-
- @item -mtune=@var{name}
- @opindex mtune
-@@ -11317,7 +11327,7 @@
-
- @option{-mtune=native} causes the compiler to auto-detect the CPU
- of the build computer. At present, this feature is only supported on
--Linux, and not all architectures are recognized. If the auto-detect is
-+GNU/Linux, and not all architectures are recognized. If the auto-detect is
- unsuccessful the option has no effect.
-
- @item -mcpu=@var{name}
-@@ -11338,8 +11348,8 @@
-
- @option{-mcpu=native} causes the compiler to auto-detect the CPU
- of the build computer. At present, this feature is only supported on
--Linux, and not all architectures are recognized. If the auto-detect is
--unsuccessful the option has no effect.
-+GNU/Linux, and not all architectures are recognized. If the auto-detect
-+is unsuccessful the option has no effect.
-
- @item -mfpu=@var{name}
- @opindex mfpu
-@@ -12479,7 +12489,7 @@
- @item -mkernel
- @opindex mkernel
- Enable kernel development mode. The @option{-mkernel} option sets
--@option{-static}, @option{-fno-common}, @option{-fno-cxa-atexit},
-+@option{-static}, @option{-fno-common}, @option{-fno-use-cxa-atexit},
- @option{-fno-exceptions}, @option{-fno-non-call-exceptions},
- @option{-fapple-kext}, @option{-fno-weak} and @option{-fno-rtti} where
- applicable. This mode also sets @option{-mno-altivec},
-@@ -18707,6 +18717,72 @@
- @opindex m4
- Generate code for the SH4.
-
-+@item -m4-100
-+@opindex m4-100
-+Generate code for SH4-100.
++ PR rtl-optimization/61058
++ * gcc.dg/pr61058.c: New test.
+
-+@item -m4-100-nofpu
-+@opindex m4-100-nofpu
-+Generate code for SH4-100 in such a way that the
-+floating-point unit is not used.
++ PR c/64766
++ * gcc.dg/pr64766.c: New test.
+
-+@item -m4-100-single
-+@opindex m4-100-single
-+Generate code for SH4-100 assuming the floating-point unit is in
-+single-precision mode by default.
++ 2015-01-13 Jakub Jelinek <jakub@redhat.com>
+
-+@item -m4-100-single-only
-+@opindex m4-100-single-only
-+Generate code for SH4-100 in such a way that no double-precision
-+floating-point operations are used.
++ PR fortran/64528
++ * gfortran.dg/pr64528.f90: New test.
+
-+@item -m4-200
-+@opindex m4-200
-+Generate code for SH4-200.
++ 2015-01-12 Jakub Jelinek <jakub@redhat.com>
+
-+@item -m4-200-nofpu
-+@opindex m4-200-nofpu
-+Generate code for SH4-200 without in such a way that the
-+floating-point unit is not used.
++ PR tree-optimization/64563
++ * gcc.dg/pr64563.c: New test.
+
-+@item -m4-200-single
-+@opindex m4-200-single
-+Generate code for SH4-200 assuming the floating-point unit is in
-+single-precision mode by default.
++ PR target/64513
++ * gcc.target/i386/pr64513.c: New test.
+
-+@item -m4-200-single-only
-+@opindex m4-200-single-only
-+Generate code for SH4-200 in such a way that no double-precision
-+floating-point operations are used.
++2015-01-29 Ilya Tocar <ilya.tocar@intel.com>
+
-+@item -m4-300
-+@opindex m4-300
-+Generate code for SH4-300.
++ * gcc.target/i386/sse-14.c: Test new intrinsic.
++ * gcc.target/i386/sse-22.c: Ditto.
+
-+@item -m4-300-nofpu
-+@opindex m4-300-nofpu
-+Generate code for SH4-300 without in such a way that the
-+floating-point unit is not used.
++2015-01-27 Mikael Pettersson <mikpelinux@gmail.com>
+
-+@item -m4-300-single
-+@opindex m4-300-single
-+Generate code for SH4-300 in such a way that no double-precision
-+floating-point operations are used.
++ Backport from mainline
+
-+@item -m4-300-single-only
-+@opindex m4-300-single-only
-+Generate code for SH4-300 in such a way that no double-precision
-+floating-point operations are used.
++ 2013-09-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
-+@item -m4-340
-+@opindex m4-340
-+Generate code for SH4-340 (no MMU, no FPU).
++ PR middle-end/57748
++ * gcc.dg/torture/pr57748-1.c: New test.
++ * gcc.dg/torture/pr57748-2.c: New test.
+
-+@item -m4-500
-+@opindex m4-500
-+Generate code for SH4-500 (no FPU). Passes @option{-isa=sh4-nofpu} to the
-+assembler.
++ 2014-01-08 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
- @item -m4a-nofpu
- @opindex m4a-nofpu
- Generate code for the SH4al-dsp, or for a SH4a in such a way that the
-@@ -18732,6 +18808,33 @@
- @option{-dsp} to the assembler. GCC doesn't generate any DSP
- instructions at the moment.
-
-+@item -m5-32media
-+@opindex m5-32media
-+Generate 32-bit code for SHmedia.
++ PR middle-end/57748
++ * gcc.dg/torture/pr57748-3.c: New test.
++ * gcc.dg/torture/pr57748-4.c: New test.
+
-+@item -m5-32media-nofpu
-+@opindex m5-32media-nofpu
-+Generate 32-bit code for SHmedia in such a way that the
-+floating-point unit is not used.
++2015-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
+
-+@item -m5-64media
-+@opindex m5-64media
-+Generate 64-bit code for SHmedia.
++ PR fortran/56867
++ * gfortran.dg/dependency_45.f90: New test.
+
-+@item -m5-64media-nofpu
-+@opindex m5-64media-nofpu
-+Generate 64-bit code for SHmedia in such a way that the
-+floating-point unit is not used.
++2015-01-24 Thomas Koenig <tkoenig@netcologne.de>
+
-+@item -m5-compact
-+@opindex m5-compact
-+Generate code for SHcompact.
++ Backport from trunk
++ PR fortran/57023
++ * gfortran.dg/internal_pack_15.f90: New test.
+
-+@item -m5-compact-nofpu
-+@opindex m5-compact-nofpu
-+Generate code for SHcompact in such a way that the
-+floating-point unit is not used.
++2015-01-20 Marek Polacek <polacek@redhat.com>
+
- @item -mb
- @opindex mb
- Compile code for the processor in big-endian mode.
-@@ -18765,16 +18868,12 @@
- Enable the use of the instruction @code{fmovd}. Check @option{-mdalign} for
- alignment constraints.
-
--@item -mhitachi
--@opindex mhitachi
--Comply with the calling conventions defined by Renesas.
--
- @item -mrenesas
--@opindex mhitachi
-+@opindex mrenesas
- Comply with the calling conventions defined by Renesas.
-
- @item -mno-renesas
--@opindex mhitachi
-+@opindex mno-renesas
- Comply with the calling conventions defined for GCC before the Renesas
- conventions were available. This option is the default for all
- targets of the SH toolchain.
-@@ -18782,12 +18881,12 @@
- @item -mnomacsave
- @opindex mnomacsave
- Mark the @code{MAC} register as call-clobbered, even if
--@option{-mhitachi} is given.
-+@option{-mrenesas} is given.
-
- @item -mieee
- @itemx -mno-ieee
- @opindex mieee
--@opindex mnoieee
-+@opindex mno-ieee
- Control the IEEE compliance of floating-point comparisons, which affects the
- handling of cases where the result of a comparison is unordered. By default
- @option{-mieee} is implicitly enabled. If @option{-ffinite-math-only} is
-@@ -18827,7 +18926,7 @@
-
- @item none
- Disable compiler generated atomic sequences and emit library calls for atomic
--operations. This is the default if the target is not @code{sh-*-linux*}.
-+operations. This is the default if the target is not @code{sh*-*-linux*}.
-
- @item soft-gusa
- Generate GNU/Linux compatible gUSA software atomic sequences for the atomic
-@@ -18834,7 +18933,7 @@
- built-in functions. The generated atomic sequences require additional support
- from the interrupt/exception handling code of the system and are only suitable
- for SH3* and SH4* single-core systems. This option is enabled by default when
--the target is @code{sh-*-linux*} and SH3* or SH4*. When the target is SH4A,
-+the target is @code{sh*-*-linux*} and SH3* or SH4*. When the target is SH4A,
- this option will also partially utilize the hardware atomic instructions
- @code{movli.l} and @code{movco.l} to create more efficient code, unless
- @samp{strict} is specified.
-@@ -18853,7 +18952,7 @@
- in privileged mode and is only suitable for single-core systems. Additional
- support from the interrupt/exception handling code of the system is not
- required. This model is enabled by default when the target is
--@code{sh-*-linux*} and SH1* or SH2*.
-+@code{sh*-*-linux*} and SH1* or SH2*.
-
- @item hard-llcs
- Generate hardware atomic sequences using the @code{movli.l} and @code{movco.l}
-@@ -18888,10 +18987,6 @@
- processors the @code{tas.b} instruction must be used with caution since it
- can result in data corruption for certain cache configurations.
-
--@item -mspace
--@opindex mspace
--Optimize for space instead of speed. Implied by @option{-Os}.
--
- @item -mprefergot
- @opindex mprefergot
- When generating position-independent code, emit function calls using
-@@ -18898,11 +18993,14 @@
- the Global Offset Table instead of the Procedure Linkage Table.
-
- @item -musermode
-+@itemx -mno-usermode
- @opindex musermode
--Don't generate privileged mode only code. This option
--implies @option{-mno-inline-ic_invalidate}
--if the inlined code would not work in user mode.
--This is the default when the target is @code{sh-*-linux*}.
-+@opindex mno-usermode
-+Don't allow (allow) the compiler generating privileged mode code. Specifying
-+@option{-musermode} also implies @option{-mno-inline-ic_invalidate} if the
-+inlined code would not work in user mode. @option{-musermode} is the default
-+when the target is @code{sh*-*-linux*}. If the target is SH1* or SH2*
-+@option{-musermode} has no effect, since there is no user mode.
-
- @item -multcost=@var{number}
- @opindex multcost=@var{number}
-@@ -20357,6 +20455,20 @@
- table is exact at each instruction boundary, so it can be used for stack
- unwinding from asynchronous events (such as debugger or garbage collector).
-
-+@item -fno-gnu-unique
-+@opindex fno-gnu-unique
-+On systems with recent GNU assembler and C library, the C++ compiler
-+uses the @code{STB_GNU_UNIQUE} binding to make sure that definitions
-+of template static data members and static local variables in inline
-+functions are unique even in the presence of @code{RTLD_LOCAL}; this
-+is necessary to avoid problems with a library used by two different
-+@code{RTLD_LOCAL} plugins depending on a definition in one of them and
-+therefore disagreeing with the other one about the binding of the
-+symbol. But this causes @code{dlclose} to be ignored for affected
-+DSOs; if your program relies on reinitialization of a DSO via
-+@code{dlclose} and @code{dlopen}, you can use
-+@option{-fno-gnu-unique}.
++ Backport from mainline
++ 2014-06-23 Marek Polacek <polacek@redhat.com>
+
- @item -fpcc-struct-return
- @opindex fpcc-struct-return
- Return ``short'' @code{struct} and @code{union} values in memory like
-Index: gcc/doc/md.texi
-===================================================================
---- gcc/doc/md.texi (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/doc/md.texi (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -2081,6 +2081,18 @@
- @item wg
- If @option{-mmfpgpr} was used, a floating point register or NO_REGS.
-
-+@item wh
-+Floating point register if direct moves are available, or NO_REGS.
++ PR c/61553
++ * c-c++-common/pr61553.c: New test.
+
-+@item wi
-+FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS.
++2015-01-12 Janus Weil <janus@gcc.gnu.org>
+
-+@item wj
-+FP or VSX register to hold 64-bit integers for direct moves or NO_REGS.
++ Backport from mainline
++ PR fortran/63733
++ * gfortran.dg/typebound_operator_20.f90: New.
+
-+@item wk
-+FP or VSX register to hold 64-bit doubles for direct moves or NO_REGS.
++2014-12-28 H.J. Lu <hongjiu.lu@intel.com>
+
- @item wl
- Floating point register if the LFIWAX instruction is enabled or NO_REGS.
-
-@@ -2112,7 +2124,7 @@
- Floating point register if the STFIWX instruction is enabled or NO_REGS.
-
- @item wy
--VSX vector register to hold scalar float values or NO_REGS.
-+FP or VSX register to perform ISA 2.07 float ops or NO_REGS.
-
- @item wz
- Floating point register if the LFIWZX instruction is enabled or NO_REGS.
-Index: gcc/doc/install.texi
-===================================================================
---- gcc/doc/install.texi (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/doc/install.texi (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -2915,12 +2915,6 @@
- Solaris 2 (SPARC, Intel):
- @itemize
- @item
--@uref{http://www.sunfreeware.com/,,Sunfreeware}
--
--@item
--@uref{http://www.blastwave.org/,,Blastwave}
--
--@item
- @uref{http://www.opencsw.org/,,OpenCSW}
-
- @item
-@@ -2988,6 +2982,8 @@
- @ifhtml
- @itemize
- @item
-+@uref{#aarch64x-x-x,,aarch64*-*-*}
-+@item
- @uref{#alpha-x-x,,alpha*-*-*}
- @item
- @uref{#alpha-dec-osf51,,alpha*-dec-osf5.1}
-@@ -3130,6 +3126,18 @@
- <!-- -------- host/target specific issues start here ---------------- -->
- <hr />
- @end html
++ Backport from mainline:
++ 2014-12-28 H.J. Lu <hongjiu.lu@intel.com>
++
++ * gcc.target/i386/pr57003.c: Skip on x32.
++ * gcc.target/i386/pr60516.c: Likewise.
++
++2014-12-27 H.J. Lu <hongjiu.lu@intel.com>
++
++ Backport from mainline:
++ 2014-12-26 H.J. Lu <hongjiu.lu@intel.com>
+
-+@heading @anchor{aarch64x-x-x}aarch64*-*-*
-+To enable a workaround for the Cortex-A53 erratum number 835769 by default
-+(for all CPUs regardless of -mcpu option given) at configure time use the
-+@option{--enable-fix-cortex-a53-835769} option. This will enable the fix by
-+default and can be explicitly disabled during during compilation by passing the
-+@option{-mno-fix-cortex-a53-835769} option. Conversely,
-+@option{--disable-fix-cortex-a53-835769} will disable the workaround by
-+default. The workaround is disabled by default if neither of
-+@option{--enable-fix-cortex-a53-835769} or
-+@option{--disable-fix-cortex-a53-835769} is given at configure time.
++ PR target/64409
++ * gcc.target/i386/pr64409.c: New test.
+
- @heading @anchor{alpha-x-x}alpha*-*-*
++2014-12-23 Janus Weil <janus@gcc.gnu.org>
++
++ Backport from mainline
++ PR fortran/64244
++ * gfortran.dg/typebound_call_26.f90: New.
++
++2014-12-19 H.J. Lu <hongjiu.lu@intel.com>
++
++ Backported from mainline
++ 2014-12-14 H.J. Lu <hongjiu.lu@intel.com>
++
++ PR rtl-optimization/64037
++ * g++.dg/pr64037.C: New test.
++
+ 2014-12-19 Release Manager
- This section contains general configuration information for all
-Index: gcc/tree-ssa-tail-merge.c
+ * GCC 4.8.4 released.
+Index: gcc/testsuite/g++.dg/pr64037.C
===================================================================
---- gcc/tree-ssa-tail-merge.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/tree-ssa-tail-merge.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1060,6 +1060,24 @@
- gcc_unreachable ();
- }
-
-+/* Return true if gimple operands T1 and T2 have the same value. */
+--- gcc/testsuite/g++.dg/pr64037.C (.../tags/gcc_4_8_4_release) (revision 0)
++++ gcc/testsuite/g++.dg/pr64037.C (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -0,0 +1,27 @@
++// { dg-do run { target i?86-*-* x86_64-*-* } }
++// { dg-options "-std=c++11 -Os" }
+
-+static bool
-+gimple_operand_equal_value_p (tree t1, tree t2)
++enum class X : unsigned char {
++ V = 2,
++};
++
++static void
++__attribute__((noinline,noclone))
++foo(unsigned &out, unsigned a, X b)
+{
-+ if (t1 == t2)
-+ return true;
++ out = static_cast<unsigned>(b);
++}
++
++int main()
++{
++ unsigned deadbeef = 0xDEADBEEF;
++ asm volatile ("" : "+d" (deadbeef), "+c" (deadbeef));
+
-+ if (t1 == NULL_TREE
-+ || t2 == NULL_TREE)
-+ return false;
++ unsigned out;
++ foo(out, 2, X::V);
+
-+ if (operand_equal_p (t1, t2, 0))
-+ return true;
++ if (out != 2)
++ __builtin_abort ();
+
-+ return gvn_uses_equal (t1, t2);
++ return 0;
+}
+Index: gcc/testsuite/g++.dg/cpp0x/ref-qual16.C
+===================================================================
+--- gcc/testsuite/g++.dg/cpp0x/ref-qual16.C (.../tags/gcc_4_8_4_release) (revision 0)
++++ gcc/testsuite/g++.dg/cpp0x/ref-qual16.C (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -0,0 +1,12 @@
++// PR c++/64297
++// { dg-do compile { target c++11 } }
+
- /* Return true if gimple statements S1 and S2 are equal. Gimple_bb (s1) and
- gimple_bb (s2) are members of SAME_SUCC. */
-
-@@ -1122,8 +1140,9 @@
- lhs2 = gimple_get_lhs (s2);
- if (TREE_CODE (lhs1) != SSA_NAME
- && TREE_CODE (lhs2) != SSA_NAME)
-- return (vn_valueize (gimple_vdef (s1))
-- == vn_valueize (gimple_vdef (s2)));
-+ return (operand_equal_p (lhs1, lhs2, 0)
-+ && gimple_operand_equal_value_p (gimple_assign_rhs1 (s1),
-+ gimple_assign_rhs1 (s2)));
- else if (TREE_CODE (lhs1) == SSA_NAME
- && TREE_CODE (lhs2) == SSA_NAME)
- return vn_valueize (lhs1) == vn_valueize (lhs2);
-Index: gcc/DATESTAMP
++struct A {
++ typedef int X;
++ template <int> X m_fn1() const;
++};
++template <typename> struct is_function {};
++is_function<int() const &> i;
++struct D {
++ template <typename Y, typename = is_function<Y>> D(Y);
++} b(&A::m_fn1<0>);
+Index: gcc/testsuite/g++.dg/template/offsetof3.C
+===================================================================
+--- gcc/testsuite/g++.dg/template/offsetof3.C (.../tags/gcc_4_8_4_release) (revision 0)
++++ gcc/testsuite/g++.dg/template/offsetof3.C (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -0,0 +1,18 @@
++// PR c++/64487
++
++struct foo {
++ int member;
++};
++
++template < int N>
++struct bar {};
++
++template <int N>
++struct qux {
++ static bar<N+__builtin_offsetof(foo,member)> static_member;
++};
++
++template <int N>
++bar<N+__builtin_offsetof(foo,member)> qux<N>::static_member;
++
++int main() { }
+Index: gcc/testsuite/g++.dg/template/non-dependent14.C
===================================================================
---- gcc/DATESTAMP (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/DATESTAMP (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1 +1 @@
--20140522
-+20141105
-Index: gcc/ipa-cp.c
+--- gcc/testsuite/g++.dg/template/non-dependent14.C (.../tags/gcc_4_8_4_release) (revision 0)
++++ gcc/testsuite/g++.dg/template/non-dependent14.C (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -0,0 +1,7 @@
++// PR c++/64251
++
++class DictionaryValue {};
++template <typename T> void CreateValue(T) {
++ DictionaryValue(0);
++ CreateValue(0);
++}
+Index: gcc/testsuite/c-c++-common/pr61553.c
===================================================================
---- gcc/ipa-cp.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/ipa-cp.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -447,6 +447,8 @@
- else if (!opt_for_fn (node->symbol.decl, optimize)
- || !opt_for_fn (node->symbol.decl, flag_ipa_cp))
- reason = "non-optimized function";
-+ else if (node->tm_clone)
-+ reason = "transactional memory clone";
-
- if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
- fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
-@@ -2902,6 +2904,11 @@
- intersect_with_agg_replacements (cs->caller, src_idx,
- &inter, 0);
- }
-+ else
-+ {
-+ inter.release ();
-+ return vNULL;
-+ }
- }
- else
- {
-@@ -2917,6 +2924,11 @@
- else
- intersect_with_plats (src_plats, &inter, 0);
- }
-+ else
-+ {
-+ inter.release ();
-+ return vNULL;
-+ }
- }
- }
- else if (jfunc->type == IPA_JF_ANCESTOR
-@@ -3000,7 +3012,8 @@
- vec<cgraph_edge_p> callers)
- {
- struct ipa_node_params *dest_info = IPA_NODE_REF (node);
-- struct ipa_agg_replacement_value *res = NULL;
-+ struct ipa_agg_replacement_value *res;
-+ struct ipa_agg_replacement_value **tail = &res;
- struct cgraph_edge *cs;
- int i, j, count = ipa_get_param_count (dest_info);
-
-@@ -3044,8 +3057,8 @@
- v->offset = item->offset;
- v->value = item->value;
- v->by_ref = plats->aggs_by_ref;
-- v->next = res;
-- res = v;
-+ *tail = v;
-+ tail = &v->next;
- }
-
- next_param:
-@@ -3052,6 +3065,7 @@
- if (inter.exists ())
- inter.release ();
- }
-+ *tail = NULL;
- return res;
- }
-
-@@ -3060,7 +3074,8 @@
- static struct ipa_agg_replacement_value *
- known_aggs_to_agg_replacement_list (vec<ipa_agg_jump_function_t> known_aggs)
- {
-- struct ipa_agg_replacement_value *res = NULL;
-+ struct ipa_agg_replacement_value *res;
-+ struct ipa_agg_replacement_value **tail = &res;
- struct ipa_agg_jump_function *aggjf;
- struct ipa_agg_jf_item *item;
- int i, j;
-@@ -3074,9 +3089,10 @@
- v->offset = item->offset;
- v->value = item->value;
- v->by_ref = aggjf->by_ref;
-- v->next = res;
-- res = v;
-+ *tail = v;
-+ tail = &v->next;
- }
-+ *tail = NULL;
- return res;
+--- gcc/testsuite/c-c++-common/pr61553.c (.../tags/gcc_4_8_4_release) (revision 0)
++++ gcc/testsuite/c-c++-common/pr61553.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -0,0 +1,8 @@
++/* PR c/61553 */
++/* { dg-do compile } */
++
++void
++foo (char *s)
++{
++ __atomic_store (s, (void *) 0, __ATOMIC_SEQ_CST); /* { dg-error "size mismatch" } */
++}
+Index: gcc/cp/typeck.c
+===================================================================
+--- gcc/cp/typeck.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/cp/typeck.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -8639,6 +8639,12 @@
+ /* This should really have a different TYPE_MAIN_VARIANT, but that gets
+ complex. */
+ tree result = build_qualified_type (type, memfn_quals);
++ if (tree canon = TYPE_CANONICAL (result))
++ if (canon != result)
++ /* check_qualified_type doesn't check the ref-qualifier, so make sure
++ TYPE_CANONICAL is correct. */
++ TYPE_CANONICAL (result)
++ = build_ref_qualified_type (canon, type_memfn_rqual (result));
+ result = build_exception_variant (result, TYPE_RAISES_EXCEPTIONS (type));
+ return build_ref_qualified_type (result, rqual);
}
-
-Index: gcc/configure
+Index: gcc/cp/ChangeLog
===================================================================
---- gcc/configure (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/configure (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -910,6 +910,7 @@
- enable_gnu_indirect_function
- enable_initfini_array
- enable_comdat
-+enable_fix_cortex_a53_835769
- enable_gnu_unique_object
- enable_linker_build_id
- with_long_double_128
-@@ -1619,6 +1620,14 @@
- glibc systems
- --enable-initfini-array use .init_array/.fini_array sections
- --enable-comdat enable COMDAT group support
+--- gcc/cp/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/cp/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1,3 +1,15 @@
++2015-01-13 Jason Merrill <jason@redhat.com>
+
-+ --enable-fix-cortex-a53-835769
-+ enable workaround for AArch64 Cortex-A53 erratum
-+ 835769 by default
-+ --disable-fix-cortex-a53-835769
-+ disable workaround for AArch64 Cortex-A53 erratum
-+ 835769 by default
-+
- --enable-gnu-unique-object
- enable the use of the @gnu_unique_object ELF
- extension on glibc systems
-@@ -17838,7 +17847,7 @@
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 17841 "configure"
-+#line 17850 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -17944,7 +17953,7 @@
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 17947 "configure"
-+#line 17956 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -23796,6 +23805,28 @@
- $as_echo "$gcc_cv_lto_plugin" >&6; }
-
- case "$target" in
++ PR c++/64487
++ * semantics.c (finish_offsetof): Handle templates here.
++ * parser.c (cp_parser_builtin_offsetof): Not here.
+
-+ aarch64*-*-*)
-+ # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
-+ # Check whether --enable-fix-cortex-a53-835769 was given.
-+if test "${enable_fix_cortex_a53_835769+set}" = set; then :
-+ enableval=$enable_fix_cortex_a53_835769;
-+ case $enableval in
-+ yes)
-+ tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
-+ ;;
-+ no)
-+ ;;
-+ *)
-+ as_fn_error "'$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
-+ Valid choices are 'yes' and 'no'." "$LINENO" 5
-+ ;;
++ PR c++/64251
++ * decl2.c (mark_used): Don't mark if in_template_function.
+
-+ esac
++ PR c++/64297
++ * typeck.c (apply_memfn_quals): Correct wrong TYPE_CANONICAL.
+
-+fi
+ 2014-12-19 Release Manager
+
+ * GCC 4.8.4 released.
+Index: gcc/cp/semantics.c
+===================================================================
+--- gcc/cp/semantics.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/cp/semantics.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -3651,6 +3651,14 @@
+ tree
+ finish_offsetof (tree expr)
+ {
++ /* If we're processing a template, we can't finish the semantics yet.
++ Otherwise we can fold the entire expression now. */
++ if (processing_template_decl)
++ {
++ expr = build1 (OFFSETOF_EXPR, size_type_node, expr);
++ return expr;
++ }
+
-+ ;;
- # All TARGET_ABI_OSF targets.
- alpha*-*-linux* | alpha*-*-*bsd*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
-Index: gcc/fold-const.c
+ if (TREE_CODE (expr) == PSEUDO_DTOR_EXPR)
+ {
+ error ("cannot apply %<offsetof%> to destructor %<~%T%>",
+Index: gcc/cp/decl2.c
===================================================================
---- gcc/fold-const.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/fold-const.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -9213,7 +9213,7 @@
- /* Transform comparisons of the form X +- C1 CMP Y +- C2 to
- X CMP Y +- C2 +- C1 for signed X, Y. This is valid if
- the resulting offset is smaller in absolute value than the
-- original one. */
-+ original one and has the same sign. */
- if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (arg0))
- && (TREE_CODE (arg0) == PLUS_EXPR || TREE_CODE (arg0) == MINUS_EXPR)
- && (TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST
-@@ -9232,19 +9232,20 @@
- "a comparison");
-
- /* Put the constant on the side where it doesn't overflow and is
-- of lower absolute value than before. */
-+ of lower absolute value and of same sign than before. */
- cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
- ? MINUS_EXPR : PLUS_EXPR,
- const2, const1);
- if (!TREE_OVERFLOW (cst)
-- && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2))
-+ && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2)
-+ && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const2))
- {
- fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
- return fold_build2_loc (loc, code, type,
-- variable1,
-- fold_build2_loc (loc,
-- TREE_CODE (arg1), TREE_TYPE (arg1),
-- variable2, cst));
-+ variable1,
-+ fold_build2_loc (loc, TREE_CODE (arg1),
-+ TREE_TYPE (arg1),
-+ variable2, cst));
- }
-
- cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
-@@ -9251,13 +9252,15 @@
- ? MINUS_EXPR : PLUS_EXPR,
- const1, const2);
- if (!TREE_OVERFLOW (cst)
-- && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1))
-+ && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1)
-+ && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const1))
- {
- fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
- return fold_build2_loc (loc, code, type,
-- fold_build2_loc (loc, TREE_CODE (arg0), TREE_TYPE (arg0),
-- variable1, cst),
-- variable2);
-+ fold_build2_loc (loc, TREE_CODE (arg0),
-+ TREE_TYPE (arg0),
-+ variable1, cst),
-+ variable2);
- }
+--- gcc/cp/decl2.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/cp/decl2.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -4606,7 +4606,7 @@
+ --function_depth;
}
-@@ -11218,7 +11221,6 @@
- {
- double_int c1, c2, c3, msk;
- int width = TYPE_PRECISION (type), w;
-- bool try_simplify = true;
-
- c1 = tree_to_double_int (TREE_OPERAND (arg0, 1));
- c2 = tree_to_double_int (arg1);
-@@ -11255,20 +11257,7 @@
- }
- }
+- if (processing_template_decl)
++ if (processing_template_decl || in_template_function ())
+ return true;
-- /* If X is a tree of the form (Y * K1) & K2, this might conflict
-- with that optimization from the BIT_AND_EXPR optimizations.
-- This could end up in an infinite recursion. */
-- if (TREE_CODE (TREE_OPERAND (arg0, 0)) == MULT_EXPR
-- && TREE_CODE (TREE_OPERAND (TREE_OPERAND (arg0, 0), 1))
-- == INTEGER_CST)
-- {
-- tree t = TREE_OPERAND (TREE_OPERAND (arg0, 0), 1);
-- double_int masked = mask_with_tz (type, c3, tree_to_double_int (t));
--
-- try_simplify = (masked != c1);
-- }
--
-- if (try_simplify && c3 != c1)
-+ if (c3 != c1)
- return fold_build2_loc (loc, BIT_IOR_EXPR, type,
- fold_build2_loc (loc, BIT_AND_EXPR, type,
- TREE_OPERAND (arg0, 0),
-@@ -11658,16 +11647,25 @@
- && TREE_CODE (arg0) == MULT_EXPR
- && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
- {
-+ double_int darg1 = tree_to_double_int (arg1);
- double_int masked
-- = mask_with_tz (type, tree_to_double_int (arg1),
-+ = mask_with_tz (type, darg1,
- tree_to_double_int (TREE_OPERAND (arg0, 1)));
+ /* Check this too in case we're within fold_non_dependent_expr. */
+Index: gcc/cp/parser.c
+===================================================================
+--- gcc/cp/parser.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/cp/parser.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -8024,12 +8024,7 @@
+ }
- if (masked.is_zero ())
- return omit_two_operands_loc (loc, type, build_zero_cst (type),
- arg0, arg1);
-- else if (masked != tree_to_double_int (arg1))
-- return fold_build2_loc (loc, code, type, op0,
-- double_int_to_tree (type, masked));
-+ else if (masked != darg1)
+ success:
+- /* If we're processing a template, we can't finish the semantics yet.
+- Otherwise we can fold the entire expression now. */
+- if (processing_template_decl)
+- expr = build1 (OFFSETOF_EXPR, size_type_node, expr);
+- else
+- expr = finish_offsetof (expr);
++ expr = finish_offsetof (expr);
+
+ failure:
+ parser->integral_constant_expression_p = save_ice_p;
+Index: gcc/jump.c
+===================================================================
+--- gcc/jump.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/jump.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -133,7 +133,30 @@
+ if (BARRIER_P (prev))
+ delete_insn (insn);
+ else if (prev != PREV_INSN (insn))
+- reorder_insns (insn, insn, prev);
+ {
-+ /* Avoid the transform if arg1 is a mask of some
-+ mode which allows further optimizations. */
-+ int pop = darg1.popcount ();
-+ if (!(pop >= BITS_PER_UNIT
-+ && exact_log2 (pop) != -1
-+ && double_int::mask (pop) == darg1))
-+ return fold_build2_loc (loc, code, type, op0,
-+ double_int_to_tree (type, masked));
++ basic_block bb = BLOCK_FOR_INSN (prev);
++ rtx end = PREV_INSN (insn);
++ reorder_insns_nobb (insn, insn, prev);
++ if (bb)
++ {
++ /* If the backend called in machine reorg compute_bb_for_insn
++ and didn't free_bb_for_insn again, preserve basic block
++ boundaries. Move the end of basic block to PREV since
++ it is followed by a barrier now, and clear BLOCK_FOR_INSN
++ on the following notes.
++ ??? Maybe the proper solution for the targets that have
++ cfg around after machine reorg is not to run cleanup_barriers
++ pass at all. */
++ BB_END (bb) = prev;
++ do
++ {
++ prev = NEXT_INSN (prev);
++ if (prev != insn && BLOCK_FOR_INSN (prev) == bb)
++ BLOCK_FOR_INSN (prev) = NULL;
++ }
++ while (prev != end);
++ }
+ }
}
-
- /* For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,
-Index: gcc/omp-low.c
-===================================================================
---- gcc/omp-low.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/omp-low.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1586,7 +1586,6 @@
- TREE_STATIC (decl) = 1;
- TREE_USED (decl) = 1;
- DECL_ARTIFICIAL (decl) = 1;
-- DECL_NAMELESS (decl) = 1;
- DECL_IGNORED_P (decl) = 0;
- TREE_PUBLIC (decl) = 0;
- DECL_UNINLINABLE (decl) = 1;
-Index: gcc/toplev.c
-===================================================================
---- gcc/toplev.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/toplev.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1036,16 +1036,19 @@
-
- if (warn_stack_usage >= 0)
- {
-+ const location_t loc = DECL_SOURCE_LOCATION (current_function_decl);
-+
- if (stack_usage_kind == DYNAMIC)
-- warning (OPT_Wstack_usage_, "stack usage might be unbounded");
-+ warning_at (loc, OPT_Wstack_usage_, "stack usage might be unbounded");
- else if (stack_usage > warn_stack_usage)
- {
- if (stack_usage_kind == DYNAMIC_BOUNDED)
-- warning (OPT_Wstack_usage_, "stack usage might be %wd bytes",
-- stack_usage);
-+ warning_at (loc,
-+ OPT_Wstack_usage_, "stack usage might be %wd bytes",
-+ stack_usage);
- else
-- warning (OPT_Wstack_usage_, "stack usage is %wd bytes",
-- stack_usage);
-+ warning_at (loc, OPT_Wstack_usage_, "stack usage is %wd bytes",
-+ stack_usage);
- }
}
- }
-Index: gcc/DEV-PHASE
-===================================================================
---- gcc/DEV-PHASE (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/DEV-PHASE (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1 @@
-+prerelease
-Index: gcc/tree-ssa-sccvn.c
+ return 0;
+Index: gcc/expr.c
===================================================================
---- gcc/tree-ssa-sccvn.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/tree-ssa-sccvn.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -3015,33 +3015,12 @@
- /* If all value numbered to the same value, the phi node has that
- value. */
- if (allsame)
-- {
-- if (is_gimple_min_invariant (sameval))
+--- gcc/expr.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/expr.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -4708,8 +4708,6 @@
+ int unsignedp;
+ int volatilep = 0;
+ tree tem;
+- bool misalignp;
+- rtx mem = NULL_RTX;
+
+ push_temp_slots ();
+ tem = get_inner_reference (to, &bitsize, &bitpos, &offset, &mode1,
+@@ -4728,41 +4726,8 @@
+ && DECL_BIT_FIELD_TYPE (TREE_OPERAND (to, 1)))
+ get_bit_range (&bitregion_start, &bitregion_end, to, &bitpos, &offset);
+
+- /* If we are going to use store_bit_field and extract_bit_field,
+- make sure to_rtx will be safe for multiple use. */
+- mode = TYPE_MODE (TREE_TYPE (tem));
+- if (TREE_CODE (tem) == MEM_REF
+- && mode != BLKmode
+- && ((align = get_object_alignment (tem))
+- < GET_MODE_ALIGNMENT (mode))
+- && ((icode = optab_handler (movmisalign_optab, mode))
+- != CODE_FOR_nothing))
- {
-- VN_INFO (PHI_RESULT (phi))->has_constants = true;
-- VN_INFO (PHI_RESULT (phi))->expr = sameval;
+- struct expand_operand ops[2];
++ to_rtx = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_WRITE);
+
+- misalignp = true;
+- to_rtx = gen_reg_rtx (mode);
+- mem = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_WRITE);
+-
+- /* If the misaligned store doesn't overwrite all bits, perform
+- rmw cycle on MEM. */
+- if (bitsize != GET_MODE_BITSIZE (mode))
+- {
+- create_input_operand (&ops[0], to_rtx, mode);
+- create_fixed_operand (&ops[1], mem);
+- /* The movmisalign<mode> pattern cannot fail, else the assignment
+- would silently be omitted. */
+- expand_insn (icode, 2, ops);
+-
+- mem = copy_rtx (mem);
+- }
- }
- else
- {
-- VN_INFO (PHI_RESULT (phi))->has_constants = false;
-- VN_INFO (PHI_RESULT (phi))->expr = sameval;
+- misalignp = false;
+- to_rtx = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_WRITE);
- }
-+ return set_ssa_val_to (PHI_RESULT (phi), sameval);
+-
+ /* If the bitfield is volatile, we want to access it in the
+ field's mode, not the computed mode.
+ If a MEM has VOIDmode (external with incomplete type),
+@@ -4900,17 +4865,6 @@
+ get_alias_set (to), nontemporal);
+ }
-- if (TREE_CODE (sameval) == SSA_NAME)
-- return visit_copy (PHI_RESULT (phi), sameval);
+- if (misalignp)
+- {
+- struct expand_operand ops[2];
-
-- return set_ssa_val_to (PHI_RESULT (phi), sameval);
-- }
+- create_fixed_operand (&ops[0], mem);
+- create_input_operand (&ops[1], to_rtx, mode);
+- /* The movmisalign<mode> pattern cannot fail, else the assignment
+- would silently be omitted. */
+- expand_insn (icode, 2, ops);
+- }
-
- /* Otherwise, see if it is equivalent to a phi node in this block. */
- result = vn_phi_lookup (phi);
- if (result)
-- {
-- if (TREE_CODE (result) == SSA_NAME)
-- changed = visit_copy (PHI_RESULT (phi), result);
-- else
-- changed = set_ssa_val_to (PHI_RESULT (phi), result);
-- }
-+ changed = set_ssa_val_to (PHI_RESULT (phi), result);
- else
- {
- vn_phi_insert (phi, PHI_RESULT (phi));
-@@ -3142,24 +3121,18 @@
- catch those with constants. The goal here is to simultaneously
- combine constants between expressions, but avoid infinite
- expansion of expressions during simplification. */
-- if (TREE_CODE (op0) == SSA_NAME)
-- {
-- if (VN_INFO (op0)->has_constants
-+ op0 = vn_valueize (op0);
-+ if (TREE_CODE (op0) == SSA_NAME
-+ && (VN_INFO (op0)->has_constants
- || TREE_CODE_CLASS (code) == tcc_comparison
-- || code == COMPLEX_EXPR)
-- op0 = valueize_expr (vn_get_expr_for (op0));
-- else
-- op0 = vn_valueize (op0);
-- }
-+ || code == COMPLEX_EXPR))
-+ op0 = valueize_expr (vn_get_expr_for (op0));
-
-- if (TREE_CODE (op1) == SSA_NAME)
-- {
-- if (VN_INFO (op1)->has_constants
-- || code == COMPLEX_EXPR)
-- op1 = valueize_expr (vn_get_expr_for (op1));
-- else
-- op1 = vn_valueize (op1);
-- }
-+ op1 = vn_valueize (op1);
-+ if (TREE_CODE (op1) == SSA_NAME
-+ && (VN_INFO (op1)->has_constants
-+ || code == COMPLEX_EXPR))
-+ op1 = valueize_expr (vn_get_expr_for (op1));
-
- /* Pointer plus constant can be represented as invariant address.
- Do so to allow further propatation, see also tree forwprop. */
-@@ -3217,27 +3190,31 @@
- return NULL_TREE;
-
- orig_op0 = op0;
-- if (VN_INFO (op0)->has_constants)
-- op0 = valueize_expr (vn_get_expr_for (op0));
-- else if (CONVERT_EXPR_CODE_P (code)
-- || code == REALPART_EXPR
-- || code == IMAGPART_EXPR
-- || code == VIEW_CONVERT_EXPR
-- || code == BIT_FIELD_REF)
-+ op0 = vn_valueize (op0);
-+ if (TREE_CODE (op0) == SSA_NAME)
- {
-- /* We want to do tree-combining on conversion-like expressions.
-- Make sure we feed only SSA_NAMEs or constants to fold though. */
-- tree tem = valueize_expr (vn_get_expr_for (op0));
-- if (UNARY_CLASS_P (tem)
-- || BINARY_CLASS_P (tem)
-- || TREE_CODE (tem) == VIEW_CONVERT_EXPR
-- || TREE_CODE (tem) == SSA_NAME
-- || TREE_CODE (tem) == CONSTRUCTOR
-- || is_gimple_min_invariant (tem))
-- op0 = tem;
-+ if (VN_INFO (op0)->has_constants)
-+ op0 = valueize_expr (vn_get_expr_for (op0));
-+ else if (CONVERT_EXPR_CODE_P (code)
-+ || code == REALPART_EXPR
-+ || code == IMAGPART_EXPR
-+ || code == VIEW_CONVERT_EXPR
-+ || code == BIT_FIELD_REF)
-+ {
-+ /* We want to do tree-combining on conversion-like expressions.
-+ Make sure we feed only SSA_NAMEs or constants to fold though. */
-+ tree tem = valueize_expr (vn_get_expr_for (op0));
-+ if (UNARY_CLASS_P (tem)
-+ || BINARY_CLASS_P (tem)
-+ || TREE_CODE (tem) == VIEW_CONVERT_EXPR
-+ || TREE_CODE (tem) == SSA_NAME
-+ || TREE_CODE (tem) == CONSTRUCTOR
-+ || is_gimple_min_invariant (tem))
-+ op0 = tem;
-+ }
- }
-
-- /* Avoid folding if nothing changed, but remember the expression. */
-+ /* Avoid folding if nothing changed. */
- if (op0 == orig_op0)
- return NULL_TREE;
-
-Index: gcc/cgraphunit.c
-===================================================================
---- gcc/cgraphunit.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/cgraphunit.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1097,7 +1097,7 @@
- /* We use local aliases for C++ thunks to force the tailcall
- to bind locally. This is a hack - to keep it working do
- the following (which is not strictly correct). */
-- && (! TREE_CODE (target_node->symbol.decl) == FUNCTION_DECL
-+ && (TREE_CODE (target_node->symbol.decl) != FUNCTION_DECL
- || ! DECL_VIRTUAL_P (target_node->symbol.decl))
- && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
- {
-Index: gcc/ChangeLog
-===================================================================
---- gcc/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,3 +1,930 @@
-+2014-10-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-+
-+ * config/aarch64/aarch64.c (aarch64_madd_needs_nop): Restore
-+ recog state after aarch64_prev_real_insn call.
-+
-+2014-10-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-+
-+ * config.gcc (aarch64*-*-*): Define TARGET_FIX_ERR_A53_835769_DEFAULT
-+ if asked.
-+ * configure.ac: Add --enable-fix-cortex-a53-835769 option.
-+ * configure: Regenerate.
-+ * config/aarch64/aarch64.c (aarch64_override_options): Handle
-+ TARGET_FIX_ERR_A53_835769_DEFAULT.
-+ * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): Set Init value
-+ to 2.
-+ * doc/install.texi: Document --enable-fix-cortex-a53-835769 option.
-+
-+2014-10-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-+
-+ * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): New option.
-+ * config/aarch64/aarch64.h (ADJUST_INSN_LENGTH): Define.
-+ (FINAL_PRESCAN_INSN): Likewise.
-+ * config/aarch64/aarch64.h (is_mem_p): New function.
-+ (has_memory_op): Likewise.
-+ (aarch64_prev_real_insn): Likewise.
-+ (is_madd_op): Likewise.
-+ (dep_between_memop_and_curr): Likewise.
-+ (aarch64_madd_needs_nop): Likewise.
-+ (aarch64_final_prescan_insn): Likewise.
-+ * doc/invoke.texi (Document new option).
-+
-+2014-10-15 Eric Botcazou <ebotcazou@adacore.com>
-+
-+ * stor-layout.c (self_referential_size): Do not promote arguments.
-+
-+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-+
-+ Backport from mainline r215880
-+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-+
-+ * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
-+ Issue a warning message when vec_lvsl or vec_lvsr is used with a
-+ little endian target.
-+
-+ Backport from mainline r215882
-+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-+
-+ * altivec.md (altivec_lvsl): New define_expand.
-+ (altivec_lvsl_direct): Rename define_insn from altivec_lvsl.
-+ (altivec_lvsr): New define_expand.
-+ (altivec_lvsr_direct): Rename define_insn from altivec_lvsr.
-+ * rs6000.c (rs6000_expand_builtin): Change to use
-+ altivec_lvs[lr]_direct; remove commented-out code.
-+
-+2014-10-09 Uros Bizjak <ubizjak@gmail.com>
-+
-+ Backport from mainline
-+ 2014-10-09 Uros Bizjak <ubizjak@gmail.com>
-+
-+ PR rtl-optimization/57003
-+ * regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
-+ also check CALL_INSN_FUNCTION_USAGE for clobbers again after
-+ killing regs_invalidated_by_call.
-+
-+2014-10-08 Oleg Endo <olegendo@gcc.gnu.org>
-+
-+ Backport from mainline
-+ 2014-10-08 Oleg Endo <olegendo@gcc.gnu.org>
-+
-+ PR target/52941
-+ * config/sh/sync.md (atomic_exchangesi_hard, atomic_exchange<mode>_hard,
-+ atomic_fetch_<fetchop_name>si_hard,
-+ atomic_fetch_<fetchop_name><mode>_hard, atomic_fetch_nandsi_hard,
-+ atomic_fetch_nand<mode>_hard, atomic_<fetchop_name>_fetchsi_hard,
-+ atomic_<fetchop_name>_fetch<mode>_hard, atomic_nand_fetchsi_hard,
-+ atomic_nand_fetch<mode>_hard): Add missing set of T_REG.
-+
-+2014-10-02 Martin Jambor <mjambor@suse.cz>
-+
-+ PR tree-optimization/63375
-+ * tree-sra.c (build_access_from_expr_1): Disqualify volatile
-+ references.
-+
-+2014-10-01 Jakub Jelinek <jakub@redhat.com>
-+
-+ PR debug/63342
-+ * dwarf2out.c (loc_list_from_tree): Handle TARGET_MEM_REF and
-+ SSA_NAME.
-+
-+ PR target/63428
-+ * config/i386/i386.c (expand_vec_perm_pshufb): Fix up rperm[0]
-+ argument to avx2_permv2ti.
-+
-+2014-10-01 Uros Bizjak <ubizjak@gmail.com>
-+
-+ Backport from mainline
-+ 2014-09-30 Uros Bizjak <ubizjak@gmail.com>
-+
-+ * config/i386/i386.md (fmodxf3): Enable for flag_finite_math_only only.
-+ (fmod<mode>3): Ditto.
-+ (fpremxf4_i387): Ditto.
-+ (reminderxf3): Ditto.
-+ (reminder<mode>3): Ditto.
-+ (fprem1xf4_i387): Ditto.
-+
-+2014-09-30 Jakub Jelinek <jakub@redhat.com>
-+
-+ PR inline-asm/63282
-+ * ifcvt.c (dead_or_predicable): Don't call redirect_jump_1
-+ or invert_jump_1 if jump isn't any_condjump_p.
-+
-+2014-09-29 Charles Baylis <charles.baylis@linaro.org>
-+
-+ Backport from mainline r212303
-+ PR target/49423
-+ * config/arm/arm-protos.h (arm_legitimate_address_p,
-+ arm_is_constant_pool_ref): Add prototypes.
-+ * config/arm/arm.c (arm_legitimate_address_p): Remove static.
-+ (arm_is_constant_pool_ref) New function.
-+ * config/arm/arm.md (unaligned_loadhis, arm_zero_extendhisi2_v6,
-+ arm_zero_extendqisi2_v6): Use Uh constraint for memory operand.
-+ (arm_extendhisi2, arm_extendhisi2_v6): Use Uh constraint for memory
-+ operand and remove pool_range and neg_pool_range attributes.
-+ (arm_extendqihi_insn, arm_extendqisi, arm_extendqisi_v6): Remove
-+ pool_range and neg_pool_range attributes.
-+ * config/arm/constraints.md (Uh): New constraint. (Uq): Don't allow
-+ constant pool references.
-+
-+2014-09-28 John David Anglin <danglin@gcc.gnu.org>
-+
-+ * config/pa/pa.c (pa_output_function_epilogue): Only update
-+ last_address when a nonnote insn is found.
-+
-+2014-09-25 Oleg Endo <olegendo@gcc.gnu.org>
-+
-+ Backport from mainline
-+ 2014-09-25 Nick Clifton <nickc@redhat.com>
-+ 2014-09-25 Oleg Endo <olegendo@gcc.gnu.org>
-+
-+ PR target/62218
-+ * config/sh/sync.md (atomic_fetch_nand<mode>_soft_imask,
-+ atomic_test_and_set_soft_imask): Fix typo in instruction sequence.
-+
-+2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-+
-+ Backport from mainline r215559
-+ 2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-+
-+ PR target/63335
-+ * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin):
-+ Exclude VSX_BUILTIN_XVCMPGEDP_P from special handling.
-+
-+2014-09-25 Jakub Jelinek <jakub@redhat.com>
-+
-+ PR tree-optimization/63341
-+ * tree-vectorizer.h (vect_create_data_ref_ptr,
-+ vect_create_addr_base_for_vector_ref): Add another tree argument
-+ defaulting to NULL_TREE.
-+ * tree-vect-data-refs.c (vect_create_data_ref_ptr): Add byte_offset
-+ argument, pass it down to vect_create_addr_base_for_vector_ref.
-+ (vect_create_addr_base_for_vector_ref): Add byte_offset argument,
-+ add that to base_offset too if non-NULL.
-+ * tree-vect-stmts.c (vectorizable_load): Add byte_offset variable,
-+ for dr_explicit_realign_optimized set it to vector byte size
-+ - 1 instead of setting offset, pass byte_offset down to
-+ vect_create_data_ref_ptr.
-+
-+2014-09-23 Michael Meissner <meissner@linux.vnet.ibm.com>
-+
-+ Back port from trunk:
-+ 2014-09-23 Michael Meissner <meissner@linux.vnet.ibm.com>
-+
-+ * config/rs6000/rs6000.md (f32_vsx): New mode attributes to
-+ refine the constraints used on 32/64-bit floating point moves.
-+ (f32_av): Likewise.
-+ (f64_vsx): Likewise.
-+ (f64_dm): Likewise.
-+ (f64_av): Likewise.
-+ (BOOL_REGS_OUTPUT): Use wt constraint for TImode instead of wa.
-+ (BOOL_REGS_OP1): Likewise.
-+ (BOOL_REGS_OP2): Likewise.
-+ (BOOL_REGS_UNARY): Likewise.
-+ (mov<mode>_hardfloat, SFmode/SDmode): Tighten down constraints for
-+ 32/64-bit floating point moves. Do not use wa, instead use ww/ws
-+ for moves involving VSX registers. Do not use constraints that
-+ target VSX registers for decimal types.
-+ (mov<mode>_hardfloat32, DFmode/DDmode): Likewise.
-+ (mov<mode>_hardfloat64, DFmode/DDmode): Likewise.
-+
-+2014-09-19 Michael Meissner <meissner@linux.vnet.ibm.com>
-+
-+ Back port from trunk:
-+ 2014-09-19 Michael Meissner <meissner@linux.vnet.ibm.com>
-+
-+ * config/rs6000/predicates.md (fusion_gpr_mem_load): Move testing
-+ for base_reg_operand to be common between LO_SUM and PLUS.
-+ (fusion_gpr_mem_combo): New predicate to match a fused address
-+ that combines the addis and memory offset address.
-+
-+ * config/rs6000/rs6000-protos.h (fusion_gpr_load_p): Change
-+ calling signature.
-+ (emit_fusion_gpr_load): Likewise.
-+
-+ * config/rs6000/rs6000.c (fusion_gpr_load_p): Change calling
-+ signature to pass each argument separately, rather than
-+ using an operands array. Rewrite the insns found by peephole2 to
-+ be a single insn, rather than hoping the insns will still be
-+ together when the peephole pass is done. Drop being called via a
-+ normal peephole.
-+ (emit_fusion_gpr_load): Change calling signature to be called from
-+ the fusion_gpr_load_<mode> insns with a combined memory address
-+ instead of the peephole pass passing the addis and offset
-+ separately.
-+
-+ * config/rs6000/rs6000.md (UNSPEC_FUSION_GPR): New unspec for GPR
-+ fusion.
-+ (power8 fusion peephole): Drop support for doing power8 via a
-+ normal peephole that was created by the peephole2 pass.
-+ (power8 fusion peephole2): Create a new insn with the fused
-+ address, so that the fused operation is kept together after
-+ register allocation is done.
-+ (fusion_gpr_load_<mode>): Likewise.
-+
-+2014-09-17 Jakub Jelinek <jakub@redhat.com>
-+
-+ PR debug/63284
-+ * tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
-+ if there are only debug stmts after the noreturn call, instead
-+ remove the debug stmts.
-+
-+2014-09-10 Michael Meissner <meissner@linux.vnet.ibm.com>
-+
-+ * config/rs6000/vsx.md (vsx_fmav4sf4): Use correct constraints for
-+ V2DF, V4SF, DF, and DI modes.
-+ (vsx_fmav2df2): Likewise.
-+ (vsx_float_fix_<mode>2): Likewise.
-+ (vsx_reduc_<VEC_reduc_name>_v2df_scalar): Likewise.
-+
-+2014-09-10 Alan Modra <amodra@gmail.com>
-+
-+ PR debug/60655
-+ * dwarf2out.c (mem_loc_descriptor <PLUS>): Return NULL if addend
-+ can't be output.
-+
-+2014-09-09 Richard Biener <rguenther@suse.de>
-+
-+ Backport from mainline
-+ 2014-06-11 Richard Biener <rguenther@suse.de>
-+
-+ PR tree-optimization/61452
-+ * tree-ssa-sccvn.c (visit_phi): Remove pointless setting of
-+ expr and has_constants in case we found a leader.
-+ (simplify_binary_expression): Always valueize operands first.
-+ (simplify_unary_expression): Likewise.
-+
-+2014-09-09 Richard Biener <rguenther@suse.de>
-+
-+ Backport from mainline
-+ 2014-05-05 Richard Biener <rguenther@suse.de>
-+
-+ PR middle-end/61010
-+ * fold-const.c (fold_binary_loc): Consistently avoid
-+ canonicalizing X & CST away from a CST that is the mask
-+ of a mode.
-+
-+ 2014-05-28 Richard Biener <rguenther@suse.de>
-+
-+ PR middle-end/61045
-+ * fold-const.c (fold_comparison): When folding
-+ X +- C1 CMP Y +- C2 to X CMP Y +- C2 +- C1 also ensure
-+ the sign of the remaining constant operand stays the same.
-+
-+ 2014-08-11 Richard Biener <rguenther@suse.de>
-+
-+ PR tree-optimization/62075
-+ * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Properly
-+ handle uses in patterns.
-+
-+2014-09-09 James Greenhalgh <james.greenhalgh@arm.com>
-+
-+ Backport from mainline.
-+ 2014-09-09 James Greenhalgh <james.greenhalgh@arm.com>
-+
-+ * doc/invoke.texi (-march): Use GNU/Linux rather than Linux.
-+ (-mtune): Likewise.
-+ (-mcpu): Likewise.
-+
-+2014-09-08 Jakub Jelinek <jakub@redhat.com>
-+
-+ PR tree-optimization/60196
-+ PR tree-optimization/63189
-+ Backported from mainline
-+ 2013-09-17 Cong Hou <congh@google.com>
-+
-+ * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug
-+ when checking the dot production pattern. The type of rhs operand
-+ of multiply is now checked correctly.
-+
-+2014-09-08 Jakub Jelinek <jakub@redhat.com>
-+
-+ Backported from mainline
-+ 2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
-+
-+ PR debug/61923
-+ * haifa-sched.c (advance_one_cycle): Fix dump.
-+ (schedule_block): Don't advance cycle if we are already at the
-+ beginning of the cycle.
-+
-+2014-09-03 Martin Jambor <mjambor@suse.cz>
-+
-+ PR ipa/62015
-+ * ipa-cp.c (intersect_aggregates_with_edge): Handle impermissible
-+ pass-trough jump functions correctly.
-+
-+2014-09-03 Martin Jambor <mjambor@suse.cz>
-+
-+ PR ipa/61986
-+ * ipa-cp.c (find_aggregate_values_for_callers_subset): Chain
-+ created replacements in ascending order of offsets.
-+ (known_aggs_to_agg_replacement_list): Likewise.
-+
-+2014-09-01 Marek Polacek <polacek@redhat.com>
-+
-+ Backport from mainline
-+ 2014-08-21 Marek Polacek <polacek@redhat.com>
-+
-+ PR c/61271
-+ * expr.c (is_aligning_offset): Remove logical not.
-+
-+2014-09-01 Marek Polacek <polacek@redhat.com>
-+
-+ Backport from mainline
-+ 2014-08-19 Marek Polacek <polacek@redhat.com>
-+
-+ PR c/61271
-+ * cgraphunit.c (handle_alias_pairs): Fix condition.
-+
-+2014-08-30 John David Anglin <danglin@gcc.gnu.org>
-+
-+ * config/pa/pa.c (pa_assemble_integer): Don't add PLABEL relocation
-+ prefix to function labels when generating fast indirect calls.
-+
-+2014-08-26 Joel Sherrill <joel.sherrill@oarcorp.com>
-+
-+ * doc/invoke.texi: -fno-cxa-atexit should be -fno-use-cxa-atexit.
-+
-+2014-08-26 Marek Polacek <polacek@redhat.com>
-+
-+ Backport from mainline
-+ 2014-08-26 Marek Polacek <polacek@redhat.com>
-+
-+ PR c/61271
-+ * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT,
-+ LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Wrap in parens.
-+
-+2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
-+
-+ Backport from mainline
-+ 2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
-+
-+ PR target/61996
-+ * config/sh/sh.opt (musermode): Allow negative form.
-+ * config/sh/sh.c (sh_option_override): Disable TARGET_USERMODE for
-+ targets that don't support it.
-+ * doc/invoke.texi (SH Options): Rename sh-*-linux* to sh*-*-linux*.
-+ Document -mno-usermode option.
-+
-+2014-08-23 John David Anglin <danglin@gcc.gnu.org>
-+
-+ PR target/62038
-+ * config/pa/pa.c (pa_output_function_epilogue): Don't set
-+ last_address when the current function is a thunk.
-+ (pa_asm_output_mi_thunk): When we don't have named sections or they
-+ are not being used, check that thunk can reach the stub table with a
-+ short branch.
-+
-+2014-08-22 Michael Meissner <meissner@linux.vnet.ibm.com>
-+
-+ Backport fro mainline
-+ 2014-08-22 Michael Meissner <meissner@linux.vnet.ibm.com>
-+
-+ PR target/62195
-+ * doc/md.texi (Machine Constraints): Update PowerPC wi constraint
-+ documentation to state it is only for VSX operations.
-+
-+ * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Make wi
-+ constraint only active if VSX.
-+
-+ * config/rs6000/rs6000.md (lfiwax): Use wj constraint instead of
-+ wi cosntraint for ISA 2.07 lxsiwax/lxsiwzx instructions.
-+ (lfiwzx): Likewise.
-+
-+2014-08-15 Tom de Vries <tom@codesourcery.com>
-+
-+ Backport from mainline:
-+ 2014-08-14 Tom de Vries <tom@codesourcery.com>
-+
-+ PR rtl-optimization/62004
-+ PR rtl-optimization/62030
-+ * ifcvt.c (rtx_interchangeable_p): New function.
-+ (noce_try_move, noce_process_if_block): Use rtx_interchangeable_p.
-+
-+ 2014-08-05 Richard Biener <rguenther@suse.de>
-+
-+ * emit-rtl.h (mem_attrs_eq_p): Declare.
-+ * emit-rtl.c (mem_attrs_eq_p): Export.
-+
-+2014-08-16 John David Anglin <danglin@gcc.gnu.org>
-+
-+ Backport from trunk:
-+ 2014-04-06 John David Anglin <danglin@gcc.gnu.org>
-+
-+ PR debug/55794
-+ * config/pa/pa.c (pa_output_function_epilogue): Skip address and code
-+ size accounting for thunks.
-+ (pa_asm_output_mi_thunk): Use final_start_function() and
-+ final_end_function() to output function start and end directives.
-+
-+2014-08-15 Oleg Endo <olegendo@gcc.gnu.org>
-+
-+ Backport from mainline:
-+ 2014-08-15 Oleg Endo <olegendo@gcc.gnu.org>
-+
-+ * doc/invoke.texi (SH options): Document missing processor variant
-+ options. Remove references to Hitachi. Undocument deprecated mspace
-+ option.
-+
-+2014-08-13 Felix Yang <fei.yang0953@gmail.com>
-+
-+ PR tree-optimization/62073
-+ * tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has
-+ a basic block.
-+
-+2014-08-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
-+
-+ Backport from mainline
-+ 2014-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
-+
-+ PR middle-end/62103
-+ * gimple-fold.c (fold_ctor_reference): Don't fold in presence of
-+ bitfields, that is when size doesn't match the size of type or the
-+ size of the constructor.
-+
-+2014-08-12 Michael Meissner <meissner@linux.vnet.ibm.com>
-+
-+ Backport patch from mainline
-+ 2014-08-11 Michael Meissner <meissner@linux.vnet.ibm.com>
-+
-+ * config/rs6000/constraints.md (wh constraint): New constraint,
-+ for FP registers if direct move is available.
-+ (wi constraint): New constraint, for VSX/FP registers that can
-+ handle 64-bit integers.
-+ (wj constraint): New constraint for VSX/FP registers that can
-+ handle 64-bit integers for direct moves.
-+ (wk constraint): New constraint for VSX/FP registers that can
-+ handle 64-bit doubles for direct moves.
-+ (wy constraint): Make documentation match implementation.
-+
-+ * config/rs6000/rs6000.c (struct rs6000_reg_addr): Add
-+ scalar_in_vmx_p field to simplify tests of whether SFmode or
-+ DFmode can go in the Altivec registers.
-+ (rs6000_hard_regno_mode_ok): Use scalar_in_vmx_p field.
-+ (rs6000_setup_reg_addr_masks): Likewise.
-+ (rs6000_debug_print_mode): Add debug support for scalar_in_vmx_p
-+ field, and wh/wi/wj/wk constraints.
-+ (rs6000_init_hard_regno_mode_ok): Setup scalar_in_vmx_p field, and
-+ the wh/wi/wj/wk constraints.
-+ (rs6000_preferred_reload_class): If SFmode/DFmode can go in the
-+ upper registers, prefer VSX registers unless the operation is a
-+ memory operation with REG+OFFSET addressing.
-+
-+ * config/rs6000/vsx.md (VSr mode attribute): Add support for
-+ DImode. Change SFmode to use ww constraint instead of d to allow
-+ SF registers in the upper registers.
-+ (VSr2): Likewise.
-+ (VSr3): Likewise.
-+ (VSr5): Fix thinko in comment.
-+ (VSa): New mode attribute that is an alternative to wa, that
-+ returns the VSX register class that a mode can go in, but may not
-+ be the preferred register class.
-+ (VS_64dm): New mode attribute for appropriate register classes for
-+ referencing 64-bit elements of vectors for direct moves and normal
-+ moves.
-+ (VS_64reg): Likewise.
-+ (vsx_mov<mode>): Change wa constraint to <VSa> to limit the
-+ register allocator to only registers the data type can handle.
-+ (vsx_le_perm_load_<mode>): Likewise.
-+ (vsx_le_perm_store_<mode>): Likewise.
-+ (vsx_xxpermdi2_le_<mode>): Likewise.
-+ (vsx_xxpermdi4_le_<mode>): Likewise.
-+ (vsx_lxvd2x2_le_<mode>): Likewise.
-+ (vsx_lxvd2x4_le_<mode>): Likewise.
-+ (vsx_stxvd2x2_le_<mode>): Likewise.
-+ (vsx_add<mode>3): Likewise.
-+ (vsx_sub<mode>3): Likewise.
-+ (vsx_mul<mode>3): Likewise.
-+ (vsx_div<mode>3): Likewise.
-+ (vsx_tdiv<mode>3_internal): Likewise.
-+ (vsx_fre<mode>2): Likewise.
-+ (vsx_neg<mode>2): Likewise.
-+ (vsx_abs<mode>2): Likewise.
-+ (vsx_nabs<mode>2): Likewise.
-+ (vsx_smax<mode>3): Likewise.
-+ (vsx_smin<mode>3): Likewise.
-+ (vsx_sqrt<mode>2): Likewise.
-+ (vsx_rsqrte<mode>2): Likewise.
-+ (vsx_tsqrt<mode>2_internal): Likewise.
-+ (vsx_fms<mode>4): Likewise.
-+ (vsx_nfma<mode>4): Likewise.
-+ (vsx_eq<mode>): Likewise.
-+ (vsx_gt<mode>): Likewise.
-+ (vsx_ge<mode>): Likewise.
-+ (vsx_eq<mode>_p): Likewise.
-+ (vsx_gt<mode>_p): Likewise.
-+ (vsx_ge<mode>_p): Likewise.
-+ (vsx_xxsel<mode>): Likewise.
-+ (vsx_xxsel<mode>_uns): Likewise.
-+ (vsx_copysign<mode>3): Likewise.
-+ (vsx_float<VSi><mode>2): Likewise.
-+ (vsx_floatuns<VSi><mode>2): Likewise.
-+ (vsx_fix_trunc<mode><VSi>2): Likewise.
-+ (vsx_fixuns_trunc<mode><VSi>2): Likewise.
-+ (vsx_x<VSv>r<VSs>i): Likewise.
-+ (vsx_x<VSv>r<VSs>ic): Likewise.
-+ (vsx_btrunc<mode>2): Likewise.
-+ (vsx_b2trunc<mode>2): Likewise.
-+ (vsx_floor<mode>2): Likewise.
-+ (vsx_ceil<mode>2): Likewise.
-+ (vsx_<VS_spdp_insn>): Likewise.
-+ (vsx_xscvspdp): Likewise.
-+ (vsx_xvcvspuxds): Likewise.
-+ (vsx_float_fix_<mode>2): Likewise.
-+ (vsx_set_<mode>): Likewise.
-+ (vsx_extract_<mode>_internal1): Likewise.
-+ (vsx_extract_<mode>_internal2): Likewise.
-+ (vsx_extract_<mode>_load): Likewise.
-+ (vsx_extract_<mode>_store): Likewise.
-+ (vsx_splat_<mode>): Likewise.
-+ (vsx_xxspltw_<mode>): Likewise.
-+ (vsx_xxspltw_<mode>_direct): Likewise.
-+ (vsx_xxmrghw_<mode>): Likewise.
-+ (vsx_xxmrglw_<mode>): Likewise.
-+ (vsx_xxsldwi_<mode>): Likewise.
-+ (vsx_xscvdpspn): Tighten constraints to only use register classes
-+ the types use.
-+ (vsx_xscvspdpn): Likewise.
-+ (vsx_xscvdpspn_scalar): Likewise.
-+
-+ * config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wh, wi,
-+ wj, and wk constraints.
-+ (GPR_REG_CLASS_P): New helper macro for register classes targeting
-+ general purpose registers.
-+
-+ * config/rs6000/rs6000.md (f32_dm): Use wh constraint for SDmode
-+ direct moves.
-+ (zero_extendsidi2_lfiwz): Use wj constraint for direct move of
-+ DImode instead of wm. Use wk constraint for direct move of DFmode
-+ instead of wm.
-+ (extendsidi2_lfiwax): Likewise.
-+ (lfiwax): Likewise.
-+ (lfiwzx): Likewise.
-+ (movdi_internal64): Likewise.
-+
-+ * doc/md.texi (PowerPC and IBM RS6000): Document wh, wi, wj, and
-+ wk constraints. Make the wy constraint documentation match them
-+ implementation.
-+
-+2014-08-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
-+
-+ Backport from mainline
-+ 2014-06-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
-+
-+ PR tree-optimization/61375
-+ * tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if
-+ symbolic number cannot be represented in an unsigned HOST_WIDE_INT.
-+ (execute_optimize_bswap): Cancel optimization if CHAR_BIT != 8.
-+
-+2014-08-01 Richard Biener <rguenther@suse.de>
-+
-+ PR tree-optimization/61964
-+ * tree-ssa-tail-merge.c (gimple_operand_equal_value_p): New
-+ function merged from trunk.
-+ (gimple_equal_p): Handle non-SSA LHS solely by structural
-+ equality.
-+
-+2014-07-25 Uros Bizjak <ubizjak@gmail.com>
-+
-+ * config/alpha/elf.h: Define TARGET_UNWIND_TABLES_DEFAULT.
-+
-+2014-07-24 Kyle McMartin <kyle@redhat.com>
-+
-+ * config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define.
-+
-+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
-+
-+ * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p):
-+ Add prototype.
-+ * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New
-+ function. Issue -Wpsabi warning if future GCC releases will use
-+ different field alignment rules for this type.
-+ * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it.
-+ * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
-+ * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
-+
-+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
-+
-+ * config/rs6000/rs6000.c (rs6000_function_arg_boundary): Issue
-+ -Wpsabi note when encountering a type where future GCC releases
-+ will apply different alignment requirements.
-+
-+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
-+
-+ * config/rs6000/rs6000.c (rs6000_function_arg): If a float argument
-+ does not fit fully into floating-point registers, and there is still
-+ space in the register parameter area, issue -Wpsabi note that the ABI
-+ will change in a future GCC release.
-+
-+2014-07-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
-+
-+ * config/arm/t-rtems-eabi: Add
-+ mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard,
-+ mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard,
-+ mbig-endian/mthumb/march=armv7-r, and
-+ mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
-+ multilibs.
-+
-+2014-07-21 Peter Bergner <bergner@vnet.ibm.com>
-+
-+ * config/rs6000/sysv4.h (LIBASAN_EARLY_SPEC): Define.
-+ (LIBTSAN_EARLY_SPEC): Likewise.
-+ (STATIC_LIBASAN_LIBS): Likewise.
-+ (STATIC_LIBTSAN_LIBS): Likewise.
-+
-+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
-+
-+ * toplev.c (output_stack_usage): Adjust the location of the warning.
-+
-+2014-07-19 Daniel Cederman <cederman@gaisler.com>
-+
-+ * config/sparc/sync.md (*membar_storeload_leon3): New insn.
-+ (*membar_storeload): Disable for LEON3.
-+
-+2014-07-17 Richard Biener <rguenther@suse.de>
-+
-+ PR rtl-optimization/61801
-+ * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
-+ ASM_INPUT don't set reg_pending_barrier if it appears in a
-+ debug-insn.
-+
-+2014-07-16 Jakub Jelinek <jakub@redhat.com>
-+
-+ * omp-low.c (create_omp_child_function): Don't set DECL_NAMELESS
-+ on the FUNCTION_DECL.
-+
-+2014-07-10 Tom G. Christensen <tgc@jupiterrise.com>
-+
-+ * doc/install.texi: Remove links to defunct package providers for
-+ Solaris.
-+
-+2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
-+
-+ PR middle-end/53590
-+ * function.c (allocate_struct_function): Revert r188667 change.
-+
-+2014-07-04 Jakub Jelinek <jakub@redhat.com>
-+
-+ PR tree-optimization/61684
-+ * tree-ssa-ifcombine.c (recognize_single_bit_test): Make sure
-+ rhs1 of conversion is a SSA_NAME before using SSA_NAME_DEF_STMT on it.
-+
-+2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
-+
-+ Backport from Mainline
-+ 2014-06-20 Jakub Jelinek <jakub@redhat.com>
-+ 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
-+
-+ PR tree-optimization/61306
-+ * tree-ssa-math-opts.c (struct symbolic_number): Store type of
-+ expression instead of its size.
-+ (do_shift_rotate): Adapt to change in struct symbolic_number. Return
-+ false to prevent optimization when the result is unpredictable due to
-+ arithmetic right shift of signed type with highest byte is set.
-+ (verify_symbolic_number_p): Adapt to change in struct symbolic_number.
-+ (find_bswap_1): Likewise. Return NULL to prevent optimization when the
-+ result is unpredictable due to sign extension.
-+ (find_bswap): Adapt to change in struct symbolic_number.
-+
-+2014-06-27 Uros Bizjak <ubizjak@gmail.com>
-+
-+ Backport from mainline
-+ 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
-+
-+ PR target/61586
-+ * config/alpha/alpha.c (alpha_handle_trap_shadows): Handle BARRIER RTX.
-+
-+2014-06-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-+
-+ PR target/61542
-+ * config/rs6000/vsx.md (vsx_extract_v4sf): Fix bug with element
-+ extraction other than index 3.
-+
-+2014-06-24 Jakub Jelinek <jakub@redhat.com>
-+
-+ PR target/61570
-+ * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
-+ model family 6 CPU with has_longmode never use a CPU without
-+ 64-bit support.
-+
-+2014-06-20 Chung-Lin Tang <cltang@codesourcery.com>
-+
-+ Backport from mainline
-+
-+ 2014-06-20 Julian Brown <julian@codesourcery.com>
-+ Chung-Lin Tang <cltang@codesourcery.com>
-+
-+ * config/arm/arm.c (arm_output_mi_thunk): Fix offset for
-+ TARGET_THUMB1_ONLY. Add comments.
-+
-+2014-06-18 Uros Bizjak <ubizjak@gmail.com>
-+
-+ Backport from mainline
-+ 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
-+
-+ PR target/61423
-+ * config/i386/i386.md (*floatunssi<mode>2_i387_with_xmm): New
-+ define_insn_and_split pattern, merged from *floatunssi<mode>2_1
-+ and corresponding splitters. Zero extend general register
-+ or memory input operand to XMM temporary. Enable for
-+ TARGET_SSE2 and TARGET_INTER_UNIT_MOVES_TO_VEC only.
-+ (floatunssi<mode>2): Update expander predicate.
-+
-+2014-06-18 Richard Henderson <rth@redhat.com>
-+
-+ PR target/61545
-+ * config/aarch64/aarch64.md (tlsdesc_small): Clobber CC_REGNUM.
-+
-+2014-06-17 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
-+
-+ Revert on gcc-4_8-branch.
-+ * config/microblaze/microblaze.md: Add movsi4_rev insn pattern.
-+ * config/microblaze/predicates.md: Add reg_or_mem_operand predicate.
-+
-+2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
-+
-+ Backport from mainline
-+
-+ PR target/61483
-+ * config/aarch64/aarch64.c (aarch64_layout_arg): Add new local
-+ variable 'size'; calculate 'size' right in the front; use
-+ 'size' to compute 'nregs' (when 'allocate_ncrn != 0') and
-+ pcum->aapcs_stack_words.
-+
-+2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
-+
-+ Backport from mainline
-+
-+ 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
-+ PR target/61415
-+ * config/rs6000/rs6000-builtin.def (BU_MISC_1): Delete.
-+ (BU_MISC_2): Rename to ...
-+ (BU_LDBL128_2): ... this.
-+ * config/rs6000/rs6000.h (RS6000_BTM_LDBL128): New define.
-+ (RS6000_BTM_COMMON): Add RS6000_BTM_LDBL128.
-+ * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Handle
-+ RS6000_BTM_LDBL128.
-+ (rs6000_invalid_builtin): Add long double 128-bit builtin support.
-+ (rs6000_builtin_mask_names): Add RS6000_BTM_LDBL128.
-+ * config/rs6000/rs6000.md (unpacktf_0): Remove define)expand.
-+ (unpacktf_1): Likewise.
-+ * doc/extend.texi (__builtin_longdouble_dw0): Remove documentation.
-+ (__builtin_longdouble_dw1): Likewise.
-+ * doc/sourcebuild.texi (longdouble128): Document.
-+
-+2014-06-13 Jason Merrill <jason@redhat.com>
-+
-+ PR c++/60731
-+ * common.opt (-fno-gnu-unique): Add.
-+ * config/elfos.h (USE_GNU_UNIQUE_OBJECT): Check it.
-+
-+2014-06-12 Georg-Johann Lay <avr@gjlay.de>
-+
-+ Backport from 2014-05-09 trunk r210272
-+
-+ * config/avr/avr-fixed.md (round<mode>3): Use -1U instead of -1 in
-+ unsigned int initializers for regno_in, regno_out.
-+
-+ Backport from 2014-05-14 trunk r210418
-+ * config/avr/avr.h (REG_CLASS_CONTENTS): Use unsigned suffix for
-+ shifted values to avoid build warning.
-+
-+ Backport from 2014-06-12 trunk r211491
-+
-+ PR target/61443
-+ * config/avr/avr.md (push<mode>1): Avoid (subreg(mem)) when
-+ loading from address spaces.
-+
-+2014-06-12 Alan Modra <amodra@gmail.com>
-+
-+ PR target/61300
-+ * doc/tm.texi.in (INCOMING_REG_PARM_STACK_SPACE): Document.
-+ * doc/tm.texi: Regenerate.
-+ * function.c (INCOMING_REG_PARM_STACK_SPACE): Provide default.
-+ Use throughout in place of REG_PARM_STACK_SPACE.
-+ * config/rs6000/rs6000.c (rs6000_reg_parm_stack_space): Add
-+ "incoming" param. Pass to rs6000_function_parms_need_stack.
-+ (rs6000_function_parms_need_stack): Add "incoming" param, ignore
-+ prototype_p when incoming. Use function decl when incoming
-+ to handle K&R style functions.
-+ * config/rs6000/rs6000.h (REG_PARM_STACK_SPACE): Adjust.
-+ (INCOMING_REG_PARM_STACK_SPACE): Define.
-+
-+2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
-+
-+ Back port from trunk
-+ 2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
-+
-+ PR target/61431
-+ * config/rs6000/vsx.md (VSX_LE): Split VSX_D into 2 separate
-+ iterators, VSX_D that handles 64-bit types, and VSX_LE that
-+ handles swapping the two 64-bit double words on little endian
-+ systems. Include V1TImode and optionally TImode in VSX_LE so that
-+ these types are properly swapped. Change all of the insns and
-+ splits that do the 64-bit swaps to use VSX_LE.
-+ (vsx_le_perm_load_<mode>): Likewise.
-+ (vsx_le_perm_store_<mode>): Likewise.
-+ (splitters for little endian memory operations): Likewise.
-+ (vsx_xxpermdi2_le_<mode>): Likewise.
-+ (vsx_lxvd2x2_le_<mode>): Likewise.
-+ (vsx_stxvd2x2_le_<mode>): Likewise.
-+
-+2014-06-05 Martin Jambor <mjambor@suse.cz>
-+
-+ PR ipa/61393
-+ * ipa-cp.c (determine_versionability): Pretend that tm_clones are
-+ not versionable.
-+
-+2014-06-04 Richard Biener <rguenther@suse.de>
-+
-+ PR tree-optimization/61383
-+ * tree-ssa-ifcombine.c (bb_no_side_effects_p): Make sure
-+ stmts can't trap.
-+
-+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
-+
-+ Backport from mainline
-+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
-+
-+ PR rtl-optimization/60866
-+ * sel-sched-ir (sel_init_new_insn): New parameter old_seqno.
-+ Default it to -1. Pass it down to init_simplejump_data.
-+ (init_simplejump_data): New parameter old_seqno. Pass it down
-+ to get_seqno_for_a_jump.
-+ (get_seqno_for_a_jump): New parameter old_seqno. Use it for
-+ initializing new jump seqno as a last resort. Add comment.
-+ (sel_redirect_edge_and_branch): Save old seqno of the conditional
-+ jump and pass it down to sel_init_new_insn.
-+ (sel_redirect_edge_and_branch_force): Likewise.
-+
-+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
-+
-+ Backport from mainline
-+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
-+
-+ PR rtl-optimization/60901
-+ * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
-+ bb predecessor belongs to the same scheduling region. Adjust comment.
-+
-+2014-06-03 Uros Bizjak <ubizjak@gmail.com>
-+
-+ Backport from mainline
-+ 2014-06-02 Uros Bizjak <ubizjak@gmail.com>
-+
-+ PR target/61239
-+ * config/i386/i386.c (ix86_expand_vec_perm) [case V32QImode]: Use
-+ GEN_INT (-128) instead of GEN_INT (128) to set MSB of QImode constant.
-+
-+2014-05-28 Guozhi Wei <carrot@google.com>
-+
-+ PR target/61202
-+ * config/aarch64/arm_neon.h (vqdmulh_n_s16): Change the last operand's
-+ constraint.
-+ (vqdmulhq_n_s16): Likewise.
-+
-+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
-+
-+ Backport from mainline
-+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
-+
-+ * double-int.c (div_and_round_double) <ROUND_DIV_EXPR>: Use the proper
-+ predicate to detect a negative quotient.
-+
-+2014-05-28 Georg-Johann Lay <avr@gjlay.de>
-+
-+ PR target/61044
-+ * doc/extend.texi (Local Labels): Note that label differences are
-+ not supported for AVR.
-+
-+2014-05-26 Michael Tautschnig <mt@debian.org>
-+
-+ PR target/61249
-+ * doc/extend.texi (X86 Built-in Functions): Fix parameter lists of
-+ __builtin_ia32_vfrczs[sd] and __builtin_ia32_mpsadbw256.
-+
-+2014-05-23 Alan Modra <amodra@gmail.com>
-+
-+ PR target/61231
-+ * config/rs6000/rs6000.c (mem_operand_gpr): Handle SImode.
-+ * config/rs6000/rs6000.md (extendsidi2_lfiwax, extendsidi2_nocell):
-+ Use "Y" constraint rather than "m".
-+
-+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
-+
-+ Backport from mainline
-+ 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
-+
-+ * config/rs6000/htm.md (ttest): Use correct shift value to get CR0.
-+
-+2014-05-22 Richard Earnshaw <rearnsha@arm.com>
-+
-+ PR target/61208
-+ * arm.md (arm_cmpdi_unsigned): Fix length calculation for Thumb2.
-+
-+2013-05-22 Richard Biener <rguenther@suse.de>
-+
-+ * BASE-VER: Set to 4.8.4.
-+ * DEV-PHASE: Set to prerelease.
-+
- 2014-05-22 Release Manager
-
- * GCC 4.8.3 released.
-Index: gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
-===================================================================
---- gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,14 @@
-+/* Test for deprecation messages on use of lvsl and lvsr for little endian. */
-+
-+/* { dg-do compile { target { powerpc64le-*-* } } } */
-+/* { dg-options "-O0 -Wdeprecated" } */
-+
-+#include <altivec.h>
-+
-+float f[20];
-+
-+void foo ()
-+{
-+ vector unsigned char a = vec_lvsl (4, f); /* { dg-warning "vec_lvsl is deprecated for little endian; use assignment for unaligned loads and stores" } */
-+ vector unsigned char b = vec_lvsr (8, f); /* { dg-warning "vec_lvsr is deprecated for little endian; use assignment for unaligned loads and stores" } */
-+}
-Index: gcc/testsuite/gcc.target/powerpc/pr63335.c
-===================================================================
---- gcc/testsuite/gcc.target/powerpc/pr63335.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/powerpc/pr63335.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,30 @@
-+/* { dg-do run { target { powerpc64*-*-* } } } */
-+/* { dg-require-effective-target powerpc_vsx_ok } */
-+/* { dg-options "-mvsx" } */
-+
-+#include <altivec.h>
-+
-+void abort (void);
-+
-+vector double vec = (vector double) {99.0, 99.0};
-+
-+int main() {
-+
-+ int actual = vec_all_nge(vec, vec);
-+ if ( actual != 0)
-+ abort();
-+
-+ actual = vec_all_nle(vec, vec);
-+ if ( actual != 0)
-+ abort();
-+
-+ actual = vec_any_nge(vec, vec);
-+ if ( actual != 0)
-+ abort();
-+
-+ actual = vec_any_nle(vec, vec);
-+ if ( actual != 0)
-+ abort();
-+
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
-===================================================================
---- gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,7 +1,7 @@
- /* { dg-do compile { target { powerpc*-*-* } } } */
- /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
- /* { dg-require-effective-target powerpc_vsx_ok } */
--/* { dg-options "-O3 -mcpu=power7" } */
-+/* { dg-options "-O3 -mcpu=power7 -Wno-deprecated" } */
-
- /* Test the various load/store varients. */
-
-Index: gcc/testsuite/gcc.target/powerpc/tfmode_off.c
-===================================================================
---- gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,6 +1,7 @@
- /* { dg-do assemble } */
- /* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
- /* { dg-skip-if "no TFmode" { powerpc-*-eabi* } { "*" } { "" } } */
-+/* { dg-require-effective-target longdouble128 } */
- /* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */
-
- typedef float TFmode __attribute__ ((mode (TF)));
-Index: gcc/testsuite/gcc.target/powerpc/pack02.c
-===================================================================
---- gcc/testsuite/gcc.target/powerpc/pack02.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gcc.target/powerpc/pack02.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -2,6 +2,7 @@
- /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
- /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
- /* { dg-require-effective-target powerpc_fprs } */
-+/* { dg-require-effective-target longdouble128 } */
- /* { dg-options "-O2 -mhard-float" } */
-
- #include <stddef.h>
-Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c
-===================================================================
---- gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,12 @@
-+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
-+/* { dg-options "-mabi=elfv2" } */
-+
-+struct f8
-+ {
-+ float x[8];
-+ };
-+
-+void test (struct f8 a, struct f8 b) /* { dg-message "note: the ABI of passing homogeneous float aggregates will change" } */
-+{
-+}
-+
-Index: gcc/testsuite/gcc.target/powerpc/htm-ttest.c
-===================================================================
---- gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,14 @@
-+/* { dg-do compile { target { powerpc*-*-* } } } */
-+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
-+/* { dg-require-effective-target powerpc_htm_ok } */
-+/* { dg-options "-O2 -mhtm" } */
-+
-+/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,3,30,31" { target { ilp32 } } } } */
-+/* { dg-final { scan-assembler "rldicl r?\[0-9\]+,r?\[0-9\]+,35,62" { target { lp64 } } } } */
-+
-+#include <htmintrin.h>
-+long
-+ttest (void)
-+{
-+ return _HTM_STATE(__builtin_ttest());
-+}
-Index: gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
-===================================================================
---- gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,21 @@
-+/* Test expected code generation for lvsl and lvsr on little endian.
-+ Note that lvsl and lvsr are each produced once, but the filename
-+ causes them to appear twice in the file. */
-+
-+/* { dg-do compile { target { powerpc64le-*-* } } } */
-+/* { dg-options "-O0 -Wno-deprecated" } */
-+/* { dg-final { scan-assembler-times "lvsl" 2 } } */
-+/* { dg-final { scan-assembler-times "lvsr" 2 } } */
-+/* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
-+/* { dg-final { scan-assembler-times "vperm" 2 } } */
-+
-+
-+#include <altivec.h>
-+
-+float f[20];
-+
-+void foo ()
-+{
-+ vector unsigned char a = vec_lvsl (4, f);
-+ vector unsigned char b = vec_lvsr (8, f);
-+}
-Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c
-===================================================================
---- gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,12 @@
-+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
-+/* { dg-options "-mno-compat-align-parm" } */
-+
-+struct test
-+ {
-+ long a __attribute__((aligned (16)));
-+ };
-+
-+void test (struct test a) /* { dg-message "note: the ABI of passing aggregates with 16-byte alignment will change" } */
-+{
-+}
-+
-Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c
-===================================================================
---- gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
-+/* { dg-require-effective-target powerpc_altivec_ok } */
-+/* { dg-options "-maltivec" } */
-+
-+struct test
-+ {
-+ int a __attribute__((vector_size (8)));
-+ }; /* { dg-message "note: the layout of aggregates containing vectors with 8-byte alignment will change" } */
-+
-Index: gcc/testsuite/gcc.target/powerpc/altivec-6.c
-===================================================================
---- gcc/testsuite/gcc.target/powerpc/altivec-6.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gcc.target/powerpc/altivec-6.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,6 +1,6 @@
- /* { dg-do compile { target powerpc*-*-* } } */
- /* { dg-require-effective-target powerpc_altivec_ok } */
--/* { dg-options "-maltivec -O0 -Wall" } */
-+/* { dg-options "-maltivec -O0 -Wall -Wno-deprecated" } */
-
- #include <altivec.h>
-
-Index: gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c
-===================================================================
---- gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,7 +1,7 @@
- /* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
- /* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
- /* { dg-require-effective-target powerpc_altivec_ok } */
--/* { dg-options "-maltivec -O2" } */
-+/* { dg-options "-maltivec -O2 -Wno-deprecated" } */
-
- #include <altivec.h>
-
-Index: gcc/testsuite/gcc.target/powerpc/altivec-20.c
-===================================================================
---- gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target powerpc_altivec_ok } } */
--/* { dg-options "-maltivec -mcpu=G5 -O2" } */
-+/* { dg-options "-maltivec -mcpu=G5 -O2 -Wno-deprecated" } */
-
- #include <altivec.h>
-
-Index: gcc/testsuite/gcc.target/alpha/pr61586.c
-===================================================================
---- gcc/testsuite/gcc.target/alpha/pr61586.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/alpha/pr61586.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,10 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mieee" } */
-+
-+void foo (int *dimensions, double **params, int hh)
-+{
-+ if (params[hh])
-+ ;
-+ else if (dimensions[hh] > 0)
-+ params[hh][0] = 1.0f;
-+}
-Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c
-===================================================================
---- gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,35 @@
-+/* Test AAPCS64 layout and __builtin_va_start.
-+
-+ Pass named HFA/HVA argument on stack. */
-+
-+/* { dg-do run { target aarch64*-*-* } } */
-+
-+#ifndef IN_FRAMEWORK
-+#define AAPCS64_TEST_STDARG
-+#define TESTFILE "va_arg-14.c"
-+#include "type-def.h"
-+
-+struct hfa_fx2_t hfa_fx2 = {1.2f, 2.2f};
-+struct hfa_fx3_t hfa_fx3 = {3.2f, 4.2f, 5.2f};
-+vf4_t float32x4 = {6.2f, 7.2f, 8.2f, 9.2f};
-+vf4_t float32x4_2 = {10.2f, 11.2f, 12.2f, 13.2f};
-+
-+#include "abitest.h"
-+#else
-+ ARG (float, 1.0f, S0, 0)
-+ ARG (float, 2.0f, S1, 1)
-+ ARG (float, 3.0f, S2, 2)
-+ ARG (float, 4.0f, S3, 3)
-+ ARG (float, 5.0f, S4, 4)
-+ ARG (float, 6.0f, S5, 5)
-+ ARG (float, 7.0f, S6, 6)
-+ ARG (struct hfa_fx3_t, hfa_fx3, STACK, 7)
-+ /* Previous argument size has been rounded up to the nearest multiple of
-+ 8 bytes. */
-+ ARG (struct hfa_fx2_t, hfa_fx2, STACK + 16, 8)
-+ /* NSAA is rounded up to the nearest natural alignment of float32x4. */
-+ ARG (vf4_t, float32x4, STACK + 32, 9)
-+ ARG (vf4_t, float32x4_2, STACK + 48, LAST_NAMED_ARG_ID)
-+ DOTS
-+ LAST_ANON (double, 123456789.987, STACK + 64, 11)
-+#endif
-Index: gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h
-===================================================================
---- gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -34,6 +34,13 @@
- float b;
- };
-
-+struct hfa_fx3_t
-+{
-+ float a;
-+ float b;
-+ float c;
-+};
-+
- struct hfa_dx2_t
- {
- double a;
-Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c
-===================================================================
---- gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,59 @@
-+/* Test AAPCS64 layout and __builtin_va_start.
-+
-+ Pass named HFA/HVA argument on stack. */
-+
-+/* { dg-do run { target aarch64*-*-* } } */
-+
-+#ifndef IN_FRAMEWORK
-+#define AAPCS64_TEST_STDARG
-+#define TESTFILE "va_arg-13.c"
-+
-+struct float_float_t
-+{
-+ float a;
-+ float b;
-+} float_float;
-+
-+union float_int_t
-+{
-+ float b8;
-+ int b5;
-+} float_int;
-+
-+#define HAS_DATA_INIT_FUNC
-+void
-+init_data ()
-+{
-+ float_float.a = 1.2f;
-+ float_float.b = 2.2f;
-+
-+ float_int.b8 = 4983.80f;
-+}
-+
-+#include "abitest.h"
-+#else
-+ ARG (float, 1.0f, S0, 0)
-+ ARG (float, 2.0f, S1, 1)
-+ ARG (float, 3.0f, S2, 2)
-+ ARG (float, 4.0f, S3, 3)
-+ ARG (float, 5.0f, S4, 4)
-+ ARG (float, 6.0f, S5, 5)
-+ ARG (float, 7.0f, S6, 6)
-+ ARG (struct float_float_t, float_float, STACK, 7)
-+ ARG (int, 9, W0, 8)
-+ ARG (int, 10, W1, 9)
-+ ARG (int, 11, W2, 10)
-+ ARG (int, 12, W3, 11)
-+ ARG (int, 13, W4, 12)
-+ ARG (int, 14, W5, 13)
-+ ARG (int, 15, W6, LAST_NAMED_ARG_ID)
-+ DOTS
-+ /* Note on the reason of using 'X7' instead of 'W7' here:
-+ Using 'X7' makes sure the test works in the big-endian mode.
-+ According to PCS rules B.4 and C.10, the size of float_int is rounded
-+ to 8 bytes and prepared in the register X7 as if loaded via LDR from
-+ the memory, with the content of the other 4 bytes unspecified. The
-+ test framework will only compare the 4 relavent bytes. */
-+ ANON (union float_int_t, float_int, X7, 15)
-+ LAST_ANON (long long, 12683143434LL, STACK + 8, 16)
-+#endif
-Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c
-===================================================================
---- gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,39 @@
-+/* Test AAPCS64 layout and __builtin_va_start.
-+
-+ Pass named __128int argument on stack. */
-+
-+/* { dg-do run { target aarch64*-*-* } } */
-+
-+#ifndef IN_FRAMEWORK
-+#define AAPCS64_TEST_STDARG
-+#define TESTFILE "va_arg-15.c"
-+#include "type-def.h"
-+
-+union int128_t qword;
-+
-+#define HAS_DATA_INIT_FUNC
-+void
-+init_data ()
-+{
-+ /* Init signed quad-word integer. */
-+ qword.l64 = 0xfdb9753102468aceLL;
-+ qword.h64 = 0xeca8642013579bdfLL;
-+}
-+
-+#include "abitest.h"
-+#else
-+ ARG (int, 1, W0, 0)
-+ ARG (int, 2, W1, 1)
-+ ARG (int, 3, W2, 2)
-+ ARG (int, 4, W3, 3)
-+ ARG (int, 5, W4, 4)
-+ ARG (int, 6, W5, 5)
-+ ARG (int, 7, W6, 6)
-+ ARG (__int128, qword.i, STACK, LAST_NAMED_ARG_ID)
-+ DOTS
-+#ifndef __AAPCS64_BIG_ENDIAN__
-+ LAST_ANON (int, 8, STACK + 16, 8)
-+#else
-+ LAST_ANON (int, 8, STACK + 20, 8)
-+#endif
-+#endif
-Index: gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c
-===================================================================
---- gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,14 @@
-+/* { dg-do assemble } */
-+/* { dg-options "-O2 -mfix-cortex-a53-835769" } */
-+
-+int
-+test (int a, double b, int c, int d, int e)
-+{
-+ double result;
-+ __asm__ __volatile ("// %0, %1"
-+ : "=w" (result)
-+ : "0" (b)
-+ : /* No clobbers */
-+ );
-+ return c * d + e;
-+}
-Index: gcc/testsuite/gcc.target/avr/torture/pr61443.c
-===================================================================
---- gcc/testsuite/gcc.target/avr/torture/pr61443.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/avr/torture/pr61443.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,134 @@
-+/* { dg-do run } */
-+/* { dg-options "-std=gnu99" } */
-+
-+#include <stdlib.h>
-+#include <stdarg.h>
-+
-+#define NC __attribute__((noinline,noclone))
-+
-+void NC vfun (char n, ...)
-+{
-+ va_list ap;
-+
-+ va_start (ap, n);
-+
-+ switch (n)
-+ {
-+ default:
-+ abort();
-+ case 1:
-+ if (11 != va_arg (ap, int))
-+ abort();
-+ break;
-+ case 2:
-+ if (2222 != va_arg (ap, int))
-+ abort();
-+ break;
-+ case 3:
-+ if (333333 != va_arg (ap, __int24))
-+ abort();
-+ break;
-+ case 4:
-+ if (44444444 != va_arg (ap, long))
-+ abort();
-+ break;
-+ case 8:
-+ if (8888888888888888 != va_arg (ap, long long))
-+ abort();
-+ break;
-+ }
-+
-+ va_end (ap);
-+}
-+
-+
-+void NC boo_qi (const __flash char *p)
-+{
-+ vfun (1, *p);
-+}
-+
-+void NC boox_qi (const __memx char *p)
-+{
-+ vfun (1, *p);
-+}
-+
-+void NC boo_hi (const __flash int *p)
-+{
-+ vfun (2, *p);
-+}
-+
-+void NC boox_hi (const __memx int *p)
-+{
-+ vfun (2, *p);
-+}
-+
-+void NC boo_psi (const __flash __int24 *p)
-+{
-+ vfun (3, *p);
-+}
-+
-+void NC boox_psi (const __memx __int24 *p)
-+{
-+ vfun (3, *p);
-+}
-+
-+void NC boo_si (const __flash long *p)
-+{
-+ vfun (4, *p);
-+}
-+
-+void NC boox_si (const __memx long *p)
-+{
-+ vfun (4, *p);
-+}
-+
-+void NC boo_di (const __flash long long *p)
-+{
-+ vfun (8, *p);
-+}
-+
-+void NC boox_di (const __memx long long *p)
-+{
-+ vfun (8, *p);
-+}
-+
-+const __flash char f_qi = 11;
-+const __flash int f_hi = 2222;
-+const __flash __int24 f_psi = 333333;
-+const __flash long f_si = 44444444;
-+const __flash long long f_di = 8888888888888888;
-+
-+const __memx char x_qi = 11;
-+const __memx int x_hi = 2222;
-+const __memx __int24 x_psi = 333333;
-+const __memx long x_si = 44444444;
-+const __memx long long x_di = 8888888888888888;
-+
-+char r_qi = 11;
-+int r_hi = 2222;
-+__int24 r_psi = 333333;
-+long r_si = 44444444;
-+long long r_di = 8888888888888888;
-+
-+int main (void)
-+{
-+ boo_qi (&f_qi);
-+ boo_hi (&f_hi);
-+ boo_psi (&f_psi);
-+ boo_si (&f_si);
-+ boo_di (&f_di);
-+
-+ boox_qi (&x_qi);
-+ boox_hi (&x_hi);
-+ boox_psi (&x_psi);
-+ boox_si (&x_si);
-+ boox_di (&x_di);
-+
-+ boox_qi (&r_qi);
-+ boox_hi (&r_hi);
-+ boox_psi (&r_psi);
-+ boox_si (&r_si);
-+ boox_di (&r_di);
-+
-+ exit (0);
-+}
-Index: gcc/testsuite/gcc.target/i386/pr61923.c
-===================================================================
---- gcc/testsuite/gcc.target/i386/pr61923.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/i386/pr61923.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,36 @@
-+/* PR debug/61923 */
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fcompare-debug" } */
-+
-+typedef struct
-+{
-+ struct
-+ {
-+ struct
-+ {
-+ char head;
-+ } tickets;
-+ };
-+} arch_spinlock_t;
-+struct ext4_map_blocks
-+{
-+ int m_lblk;
-+ int m_len;
-+ int m_flags;
-+};
-+int ext4_da_map_blocks_ei_0;
-+void fn1 (int p1, struct ext4_map_blocks *p2)
-+{
-+ int ret;
-+ if (p2->m_flags)
-+ {
-+ ext4_da_map_blocks_ei_0++;
-+ arch_spinlock_t *lock;
-+ switch (sizeof *&lock->tickets.head)
-+ case 1:
-+ asm("" : "+m"(*&lock->tickets.head) : ""(0));
-+ __asm__("");
-+ ret = 0;
-+ }
-+ fn2 (p2->m_lblk, p2->m_len);
-+}
-Index: gcc/testsuite/gcc.target/i386/pr61423.c
-===================================================================
---- gcc/testsuite/gcc.target/i386/pr61423.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/i386/pr61423.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,38 @@
-+/* PR target/61423 */
-+/* { dg-do run { target ia32 } } */
-+/* { dg-options "-O1 -ftree-vectorize -msse2 -mfpmath=387 -mtune=core2" } */
-+
-+#define N 1024
-+static unsigned int A[N];
-+
-+double
-+__attribute__((noinline))
-+func (void)
-+{
-+ unsigned int sum = 0;
-+ unsigned i;
-+ double t;
-+
-+ for (i = 0; i < N; i++)
-+ sum += A[i];
-+
-+ t = sum;
-+ return t;
-+}
-+
-+int
-+main ()
-+{
-+ unsigned i;
-+ double d;
-+
-+ for(i = 0; i < N; i++)
-+ A[i] = 1;
-+
-+ d = func();
-+
-+ if (d != 1024.0)
-+ __builtin_abort ();
-+
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.target/i386/pr60901.c
-===================================================================
---- gcc/testsuite/gcc.target/i386/pr60901.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/i386/pr60901.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,17 @@
-+/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts" } */
-+
-+extern int n;
-+extern void bar (void);
-+extern int baz (int);
-+
-+void
-+foo (void)
-+{
-+ int i, j;
-+ for (j = 0; j < n; j++)
-+ {
-+ for (i = 1; i < j; i++)
-+ bar ();
-+ baz (0);
-+ }
-+}
-Index: gcc/testsuite/gcc.target/i386/pr61801.c
-===================================================================
---- gcc/testsuite/gcc.target/i386/pr61801.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/i386/pr61801.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,21 @@
-+/* PR rtl-optimization/61801 */
-+/* { dg-do compile } */
-+/* { dg-options "-Os -fcompare-debug" } */
-+
-+int a, c;
-+int bar (void);
-+void baz (void);
-+
-+void
-+foo (void)
-+{
-+ int d;
-+ if (bar ())
-+ {
-+ int e;
-+ baz ();
-+ asm volatile ("" : "=a" (e) : "0" (a), "i" (0));
-+ d = e;
-+ }
-+ c = d;
-+}
-Index: gcc/testsuite/gcc.target/i386/pr61446.c
-===================================================================
---- gcc/testsuite/gcc.target/i386/pr61446.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/i386/pr61446.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,14 @@
-+/* PR rtl-optimization/61446 */
-+
-+/* { dg-do compile { target { ia32 } } } */
-+/* { dg-options "-O2 -march=corei7 -mfpmath=387" } */
-+
-+unsigned long long
-+foo (float a)
-+{
-+ const double dfa = a;
-+ const unsigned int hi = dfa / 0x1p32f;
-+ const unsigned int lo = dfa - (double) hi * 0x1p32f;
-+
-+ return ((unsigned long long) hi << (4 * (8))) | lo;
-+}
-Index: gcc/testsuite/gcc.target/mips/pr62030-octeon.c
-===================================================================
---- gcc/testsuite/gcc.target/mips/pr62030-octeon.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/mips/pr62030-octeon.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,50 @@
-+/* { dg-do run } */
-+/* { dg-options "-march=octeon" } */
-+
-+extern void abort (void);
-+
-+struct node
-+{
-+ struct node *next;
-+ struct node *prev;
-+};
-+
-+struct node node;
-+
-+struct head
-+{
-+ struct node *first;
-+};
-+
-+struct head heads[5];
-+
-+int k = 2;
-+
-+struct head *head = &heads[2];
-+
-+static int __attribute__((noinline))
-+foo (void)
-+{
-+ node.prev = (void *)head;
-+ head->first = &node;
-+
-+ struct node *n = head->first;
-+ struct head *h = &heads[k];
-+ struct node *next = n->next;
-+
-+ if (n->prev == (void *)h)
-+ h->first = next;
-+ else
-+ n->prev->next = next;
-+
-+ n->next = h->first;
-+ return n->next == &node;
-+}
-+
-+int
-+main (void)
-+{
-+ if (foo ())
-+ abort ();
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.target/sh/pr61996.c
-===================================================================
---- gcc/testsuite/gcc.target/sh/pr61996.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.target/sh/pr61996.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,12 @@
-+/* Check that the option -musermode has no effect on targets that do not
-+ support user/privileged mode and that it does not interfere with option
-+ -matomic-model=soft-imask. */
-+/* { dg-do compile } */
-+/* { dg-options "-matomic-model=soft-imask" } */
-+/* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m1*" "-m2*" } } */
-+
-+int
-+test (void)
-+{
-+ return 0;
-+}
-Index: gcc/testsuite/lib/target-supports.exp
-===================================================================
---- gcc/testsuite/lib/target-supports.exp (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/lib/target-supports.exp (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1790,6 +1790,15 @@
- }]
- }
-
-+# Return 1 if the target supports long double of 128 bits,
-+# 0 otherwise.
-+
-+proc check_effective_target_longdouble128 { } {
-+ return [check_no_compiler_messages longdouble128 object {
-+ int dummy[sizeof(long double) == 16 ? 1 : -1];
-+ }]
-+}
-+
- # Return 1 if the target supports double of 64 bits,
- # 0 otherwise.
-
-@@ -5329,3 +5338,40 @@
- return 0
- }
- }
-+
-+# Return 1 if <fenv.h> is available with all the standard IEEE
-+# exceptions and floating-point exceptions are raised by arithmetic
-+# operations. (If the target requires special options for "inexact"
-+# exceptions, those need to be specified in the testcases.)
-+
-+proc check_effective_target_fenv_exceptions {} {
-+ return [check_runtime fenv_exceptions {
-+ #include <fenv.h>
-+ #include <stdlib.h>
-+ #ifndef FE_DIVBYZERO
-+ # error Missing FE_DIVBYZERO
-+ #endif
-+ #ifndef FE_INEXACT
-+ # error Missing FE_INEXACT
-+ #endif
-+ #ifndef FE_INVALID
-+ # error Missing FE_INVALID
-+ #endif
-+ #ifndef FE_OVERFLOW
-+ # error Missing FE_OVERFLOW
-+ #endif
-+ #ifndef FE_UNDERFLOW
-+ # error Missing FE_UNDERFLOW
-+ #endif
-+ volatile float a = 0.0f, r;
-+ int
-+ main (void)
-+ {
-+ r = a / a;
-+ if (fetestexcept (FE_INVALID))
-+ exit (0);
-+ else
-+ abort ();
-+ }
-+ } "-std=gnu99"]
-+}
-Index: gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,6 +1,6 @@
- ! { dg-require-effective-target fortran_large_real }
--! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
--! Test XFAILed on these platforms because the system's printf() lacks
-+! { dg-do run { xfail powerpc*-apple-darwin* } }
-+! Test XFAILed on this platform because the system's printf() lacks
- ! proper support for denormalized long doubles. See PR24685
- !
- ! This tests that the default formats for formatted I/O of reals are
-Index: gcc/testsuite/gfortran.dg/dot_product_3.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/dot_product_3.f90 (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/dot_product_3.f90 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,15 @@
-+! { dg-do compile }
-+! { dg-options "-fdump-tree-original" }
-+! PR 61999 - this used to ICE.
-+! Original test case by A. Kasahara
-+program main
-+ use, intrinsic:: iso_fortran_env, only: output_unit
-+
-+ implicit none
-+
-+ write(output_unit, *) dot_product([1, 2], [2.0, 3.0])
-+
-+ stop
-+end program main
-+! { dg-final { scan-tree-dump-times "8\\.0e\\+0" 1 "original" } }
-+! { dg-final { cleanup-tree-dump "original" } }
-Index: gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90 (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,13 @@
-+! PR fortran/59488
-+! { dg-do compile }
-+! { dg-options "-fopenmp" }
-+
-+ implicit none
-+ integer, parameter :: p(2) = (/ 11, 12 /)
-+ integer :: r
-+
-+ !$omp parallel do default(none)
-+ do r = 1, 2
-+ print *, p(r)
-+ end do
-+end
-Index: gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90 (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,16 @@
-+! PR fortran/59488
-+! { dg-do compile }
-+! { dg-options "-fopenmp" }
-+
-+ implicit none
-+ type t
-+ integer :: s1, s2, s3
-+ end type
-+ integer :: r
-+ type(t), parameter :: u = t(1, 2, 3)
-+
-+ !$omp parallel do default(none)
-+ do r = 1, 2
-+ print *, u
-+ end do
-+end
-Index: gcc/testsuite/gfortran.dg/cray_pointers_10.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/cray_pointers_10.f90 (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/cray_pointers_10.f90 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,18 @@
-+! { dg-do run }
-+! { dg-options "-fcray-pointer" }
-+!
-+! PR fortran/45187
-+!
-+module foo
-+ implicit none
-+ real :: a
-+ pointer(c_a, a)
-+end module foo
-+
-+program test
-+ use foo
-+ real :: z
-+ c_a = loc(z)
-+ a = 42
-+ if (z /= 42) call abort
-+end program test
-Index: gcc/testsuite/gfortran.dg/dependency_44.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/dependency_44.f90 (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/dependency_44.f90 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,36 @@
-+! { dg-do run }
-+! Tests fix for PR61780 in which the loop reversal mechanism was
-+! not accounting for the first index being an element so that no
-+! loop in this dimension is created.
-+!
-+! Contributed by Manfred Tietze on clf.
-+!
-+program prgm3
-+ implicit none
-+ integer, parameter :: n = 10, k = 3
-+ integer :: i, j
-+ integer, dimension(n,n) :: y
-+ integer :: res1(n), res2(n)
-+
-+1 format(10i5)
-+
-+!initialize
-+ do i=1,n
-+ do j=1,n
-+ y(i,j) = n*i + j
-+ end do
-+ end do
-+ res2 = y(k,:)
-+
-+!shift right
-+ y(k,4:n) = y(k,3:n-1)
-+ y(k,3) = 0
-+ res1 = y(k,:)
-+ y(k,:) = res2
-+ y(k,n:4:-1) = y(k,n-1:3:-1)
-+ y(k,3) = 0
-+ res2 = y(k,:)
-+! print *, res1
-+! print *, res2
-+ if (any(res1 /= res2)) call abort ()
-+end program prgm3
-Index: gcc/testsuite/gfortran.dg/oldstyle_5.f
-===================================================================
---- gcc/testsuite/gfortran.dg/oldstyle_5.f (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/oldstyle_5.f (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,8 @@
-+C { dg-do compile }
-+ TYPE T
-+ INTEGER A(2)/1,2/ ! { dg-error "Invalid old style initialization for derived type component" }
-+ END TYPE
-+ TYPE S
-+ INTEGER B/1/ ! { dg-error "Invalid old style initialization for derived type component" }
-+ END TYPE
-+ END
-Index: gcc/testsuite/gfortran.dg/nint_2.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/nint_2.f90 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gfortran.dg/nint_2.f90 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -4,7 +4,8 @@
- ! http://gcc.gnu.org/ml/fortran/2005-04/msg00139.html
- !
- ! { dg-do run }
--! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc*-*-linux* *-*-mingw* } { "-O0" } { "" } }
-+! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc-*-linux* powerpc64-*-linux* *-*-mingw* } { "-O0" } { "" } }
-+! Note that this doesn't fail on powerpc64le-*-linux*.
- real(kind=8) :: a
- integer(kind=8) :: i1, i2
- real :: b
-Index: gcc/testsuite/gfortran.dg/pointer_intent_7.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/pointer_intent_7.f90 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gfortran.dg/pointer_intent_7.f90 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -23,7 +23,7 @@
- call bar2 (c)
- call bar3 (c)
- call bar2p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
-- call bar3p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
-+ call bar3p (b) ! { dg-error "Actual argument to .n. at \\(1\\) must be polymorphic" }
- call bar2p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
- call bar3p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
- end subroutine
-Index: gcc/testsuite/gfortran.dg/array_assignment_5.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/array_assignment_5.f90 (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/array_assignment_5.f90 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,16 @@
-+! { dg-do run }
-+! { dg-options "-ffrontend-optimize" }
-+! PR 62214 - this used to give the wrong result.
-+! Original test case by Oliver Fuhrer
-+PROGRAM test
-+ IMPLICIT NONE
-+ CHARACTER(LEN=20) :: fullNames(2)
-+ CHARACTER(LEN=255) :: pathName
-+ CHARACTER(LEN=5) :: fileNames(2)
-+
-+ pathName = "/dir1/dir2/"
-+ fileNames = (/ "file1", "file2" /)
-+ fullNames = SPREAD(TRIM(pathName),1,2) // fileNames
-+ if (fullNames(1) /= '/dir1/dir2/file1' .or. &
-+ & fullnames(2) /= '/dir1/dir2/file2') call abort
-+END PROGRAM test
-Index: gcc/testsuite/gfortran.dg/pr45636.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/pr45636.f90 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gfortran.dg/pr45636.f90 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -10,5 +10,5 @@
- b = y
- call sub(a, b)
- end program main
--! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { mips*-*-* && { ! nomips16 } } } } }
-+! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { { hppa*-*-* && { ! lp64 } } || { mips*-*-* && { ! nomips16 } } } } } }
- ! { dg-final { cleanup-tree-dump "forwprop2" } }
-Index: gcc/testsuite/gfortran.dg/allocatable_function_8.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/allocatable_function_8.f90 (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/allocatable_function_8.f90 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,47 @@
-+! { dg-do run }
-+! Test the fix for PR61459.
-+!
-+! Contributed by John Wingate <johnww@tds.net>
-+!
-+module a
-+
-+ implicit none
-+ private
-+ public :: f_segfault, f_segfault_plus, f_workaround
-+ integer, dimension(2,2) :: b = reshape([1,-1,1,1],[2,2])
-+
-+contains
-+
-+ function f_segfault(x)
-+ real, dimension(:), allocatable :: f_segfault
-+ real, dimension(:), intent(in) :: x
-+ allocate(f_segfault(2))
-+ f_segfault = matmul(b,x)
-+ end function f_segfault
-+
-+! Sefaulted without the ALLOCATE as well.
-+ function f_segfault_plus(x)
-+ real, dimension(:), allocatable :: f_segfault_plus
-+ real, dimension(:), intent(in) :: x
-+ f_segfault_plus = matmul(b,x)
-+ end function f_segfault_plus
-+
-+ function f_workaround(x)
-+ real, dimension(:), allocatable :: f_workaround
-+ real, dimension(:), intent(in) :: x
-+ real, dimension(:), allocatable :: tmp
-+ allocate(f_workaround(2),tmp(2))
-+ tmp = matmul(b,x)
-+ f_workaround = tmp
-+ end function f_workaround
-+
-+end module a
-+
-+program main
-+ use a
-+ implicit none
-+ real, dimension(2) :: x = 1.0, y
-+ y = f_workaround (x)
-+ if (any (f_segfault (x) .ne. y)) call abort
-+ if (any (f_segfault_plus (x) .ne. y)) call abort
-+end program main
-Index: gcc/testsuite/gfortran.dg/bessel_7.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/bessel_7.f90 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gfortran.dg/bessel_7.f90 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -16,7 +16,7 @@
- implicit none
- real,parameter :: values(*) = [0.0, 0.5, 1.0, 0.9, 1.8,2.0,3.0,4.0,4.25,8.0,34.53, 475.78]
- real,parameter :: myeps(size(values)) = epsilon(0.0) &
-- * [2, 3, 4, 5, 8, 2, 12, 6, 7, 6, 36, 168 ]
-+ * [2, 3, 4, 5, 8, 2, 13, 6, 7, 6, 36, 168 ]
- ! The following is sufficient for me - the values above are a bit
- ! more tolerant
- ! * [0, 0, 0, 3, 3, 0, 9, 0, 2, 1, 22, 130 ]
-Index: gcc/testsuite/gcc.c-torture/execute/pr61306-1.c
-===================================================================
---- gcc/testsuite/gcc.c-torture/execute/pr61306-1.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.c-torture/execute/pr61306-1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,39 @@
-+#ifdef __INT32_TYPE__
-+typedef __INT32_TYPE__ int32_t;
-+#else
-+typedef int int32_t;
-+#endif
-+
-+#ifdef __UINT32_TYPE__
-+typedef __UINT32_TYPE__ uint32_t;
-+#else
-+typedef unsigned uint32_t;
-+#endif
-+
-+#define __fake_const_swab32(x) ((uint32_t)( \
-+ (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
-+ (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
-+ (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \
-+ (( (int32_t)(x) & (int32_t)0xff000000UL) >> 24)))
-+
-+/* Previous version of bswap optimization failed to consider sign extension
-+ and as a result would replace an expression *not* doing a bswap by a
-+ bswap. */
-+
-+__attribute__ ((noinline, noclone)) uint32_t
-+fake_bswap32 (uint32_t in)
-+{
-+ return __fake_const_swab32 (in);
-+}
-+
-+int
-+main(void)
-+{
-+ if (sizeof (int32_t) * __CHAR_BIT__ != 32)
-+ return 0;
-+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
-+ return 0;
-+ if (fake_bswap32 (0x87654321) != 0xffffff87)
-+ __builtin_abort ();
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.c-torture/execute/pr23135.x
-===================================================================
---- gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,2 @@
-+set additional_flags "-Wno-psabi"
-+return 0
-Index: gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
-===================================================================
---- gcc/testsuite/gcc.c-torture/execute/bitfld-6.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.c-torture/execute/bitfld-6.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,23 @@
-+union U
-+{
-+ const int a;
-+ unsigned b : 20;
-+};
-+
-+static union U u = { 0x12345678 };
-+
-+/* Constant folding used to fail to account for endianness when folding a
-+ union. */
-+
-+int
-+main (void)
-+{
-+#ifdef __BYTE_ORDER__
-+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
-+ return u.b - 0x45678;
-+#else
-+ return u.b - 0x12345;
-+#endif
-+#endif
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.c-torture/execute/pr61306-3.c
-===================================================================
---- gcc/testsuite/gcc.c-torture/execute/pr61306-3.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.c-torture/execute/pr61306-3.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,13 @@
-+short a = -1;
-+int b;
-+char c;
-+
-+int
-+main ()
-+{
-+ c = a;
-+ b = a | c;
-+ if (b != -1)
-+ __builtin_abort ();
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.c-torture/execute/20050604-1.x
-===================================================================
---- gcc/testsuite/gcc.c-torture/execute/20050604-1.x (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gcc.c-torture/execute/20050604-1.x (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -6,4 +6,5 @@
- set additional_flags "-mno-mmx"
- }
-
-+set additional_flags "-Wno-psabi"
- return 0
-Index: gcc/testsuite/gcc.c-torture/execute/pr61306-2.c
-===================================================================
---- gcc/testsuite/gcc.c-torture/execute/pr61306-2.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.c-torture/execute/pr61306-2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,40 @@
-+#ifdef __INT16_TYPE__
-+typedef __INT16_TYPE__ int16_t;
-+#else
-+typedef short int16_t;
-+#endif
-+
-+#ifdef __UINT32_TYPE__
-+typedef __UINT32_TYPE__ uint32_t;
-+#else
-+typedef unsigned uint32_t;
-+#endif
-+
-+#define __fake_const_swab32(x) ((uint32_t)( \
-+ (((uint32_t) (x) & (uint32_t)0x000000ffUL) << 24) | \
-+ (((uint32_t)(int16_t)(x) & (uint32_t)0x00ffff00UL) << 8) | \
-+ (((uint32_t) (x) & (uint32_t)0x00ff0000UL) >> 8) | \
-+ (((uint32_t) (x) & (uint32_t)0xff000000UL) >> 24)))
-+
-+
-+/* Previous version of bswap optimization failed to consider sign extension
-+ and as a result would replace an expression *not* doing a bswap by a
-+ bswap. */
-+
-+__attribute__ ((noinline, noclone)) uint32_t
-+fake_bswap32 (uint32_t in)
-+{
-+ return __fake_const_swab32 (in);
-+}
-+
-+int
-+main(void)
-+{
-+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
-+ return 0;
-+ if (sizeof (int16_t) * __CHAR_BIT__ != 16)
-+ return 0;
-+ if (fake_bswap32 (0x81828384) != 0xff838281)
-+ __builtin_abort ();
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.c-torture/execute/pr61375.c
-===================================================================
---- gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,35 @@
-+#ifdef __UINT64_TYPE__
-+typedef __UINT64_TYPE__ uint64_t;
-+#else
-+typedef unsigned long long uint64_t;
-+#endif
-+
-+#ifndef __SIZEOF_INT128__
-+#define __int128 long long
-+#endif
-+
-+/* Some version of bswap optimization would ICE when analyzing a mask constant
-+ too big for an HOST_WIDE_INT (PR61375). */
-+
-+__attribute__ ((noinline, noclone)) uint64_t
-+uint128_central_bitsi_ior (unsigned __int128 in1, uint64_t in2)
-+{
-+ __int128 mask = (__int128)0xffff << 56;
-+ return ((in1 & mask) >> 56) | in2;
-+}
-+
-+int
-+main (int argc)
-+{
-+ __int128 in = 1;
-+#ifdef __SIZEOF_INT128__
-+ in <<= 64;
-+#endif
-+ if (sizeof (uint64_t) * __CHAR_BIT__ != 64)
-+ return 0;
-+ if (sizeof (unsigned __int128) * __CHAR_BIT__ != 128)
-+ return 0;
-+ if (uint128_central_bitsi_ior (in, 2) != 0x102)
-+ __builtin_abort ();
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.c-torture/execute/20050316-1.x
-===================================================================
---- gcc/testsuite/gcc.c-torture/execute/20050316-1.x (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gcc.c-torture/execute/20050316-1.x (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -4,4 +4,5 @@
- return 1
- }
-
-+set additional_flags "-Wno-psabi"
- return 0;
-Index: gcc/testsuite/gcc.c-torture/execute/20050316-3.x
-===================================================================
---- gcc/testsuite/gcc.c-torture/execute/20050316-3.x (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.c-torture/execute/20050316-3.x (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,2 @@
-+set additional_flags "-Wno-psabi"
-+return 0
-Index: gcc/testsuite/gcc.c-torture/compile/pr61684.c
-===================================================================
---- gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,15 @@
-+/* PR tree-optimization/61684 */
-+
-+int a, c;
-+static int *b = 0;
-+short d;
-+static short **e = 0;
-+
-+void
-+foo ()
-+{
-+ for (; c < 1; c++)
-+ ;
-+ *e = &d;
-+ a = d && (c && 1) & *b;
-+}
-Index: gcc/testsuite/gcc.c-torture/compile/pr63282.c
-===================================================================
---- gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,13 @@
-+/* PR inline-asm/63282 */
-+
-+void bar (void);
-+
-+void
-+foo (void)
-+{
-+ asm volatile goto ("" : : : : a, b);
-+a:
-+ bar ();
-+b:
-+ return;
-+}
-Index: gcc/testsuite/gnat.dg/opt41_pkg.adb
-===================================================================
---- gcc/testsuite/gnat.dg/opt41_pkg.adb (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gnat.dg/opt41_pkg.adb (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,53 @@
-+with Ada.Streams; use Ada.Streams;\r
-+\r
-+package body Opt41_Pkg is\r
-+\r
-+ type Wstream is new Root_Stream_Type with record\r
-+ S : Unbounded_String;\r
-+ end record;\r
-+\r
-+ procedure Read (Stream : in out Wstream;\r
-+ Item : out Stream_Element_Array;\r
-+ Last : out Stream_Element_Offset) is null;\r
-+\r
-+ procedure Write (Stream : in out Wstream; Item : Stream_Element_Array) is\r
-+ begin\r
-+ for J in Item'Range loop\r
-+ Append (Stream.S, Character'Val (Item (J)));\r
-+ end loop;\r
-+ end Write;\r
-+\r
-+ function Rec_Write (R : Rec) return Unbounded_String is\r
-+ S : aliased Wstream;\r
-+ begin\r
-+ Rec'Output (S'Access, R);\r
-+ return S.S;\r
-+ end Rec_Write;\r
-+\r
-+ type Rstream is new Root_Stream_Type with record\r
-+ S : String_Access;\r
-+ Idx : Integer := 1;\r
-+ end record;\r
-+\r
-+ procedure Write (Stream : in out Rstream; Item : Stream_Element_Array) is null;\r
-+\r
-+ procedure Read (Stream : in out Rstream;\r
-+ Item : out Stream_Element_Array;\r
-+ Last : out Stream_Element_Offset) is\r
-+ begin\r
-+ Last := Stream_Element_Offset'Min\r
-+ (Item'Last, Item'First + Stream_Element_Offset (Stream.S'Last - Stream.Idx));\r
-+ for I in Item'First .. Last loop\r
-+ Item (I) := Stream_Element (Character'Pos (Stream.S (Stream.Idx)));\r
-+ Stream.Idx := Stream.Idx + 1;\r
-+ end loop;\r
-+ end Read;\r
-+\r
-+ function Rec_Read (Str : String_Access) return Rec is\r
-+ S : aliased Rstream;\r
-+ begin\r
-+ S.S := Str;\r
-+ return Rec'Input (S'Access);\r
-+ end Rec_Read;\r
-+\r
-+end Opt41_Pkg;\r
-Index: gcc/testsuite/gnat.dg/opt41_pkg.ads
-===================================================================
---- gcc/testsuite/gnat.dg/opt41_pkg.ads (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gnat.dg/opt41_pkg.ads (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,28 @@
-+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;\r
-+\r
-+package Opt41_Pkg is\r
-+\r
-+ type Enum is (One, Two, Three, Four, Five, Six);\r
-+\r
-+ type Rec (D : Enum) is record\r
-+ case D is\r
-+ when One => \r
-+ I : Integer;\r
-+ when Two | Five | Six =>\r
-+ S : Unbounded_String;\r
-+ case D is\r
-+ when Two => B : Boolean;\r
-+ when others => null;\r
-+ end case;\r
-+ when others =>\r
-+ null;\r
-+ end case;\r
-+ end record;\r
-+\r
-+ type Rec_Ptr is access all Rec;\r
-+\r
-+ function Rec_Write (R : Rec) return Unbounded_String;\r
-+\r
-+ function Rec_Read (Str : String_Access) return Rec;\r
-+\r
-+end Opt41_Pkg;\r
-Index: gcc/testsuite/gnat.dg/opt39.adb
-===================================================================
---- gcc/testsuite/gnat.dg/opt39.adb (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gnat.dg/opt39.adb (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,31 @@
-+-- { dg-do compile }
-+-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
-+
-+procedure Opt39 (I : Integer) is
-+
-+ type Rec is record
-+ I1 : Integer;
-+ I2 : Integer;
-+ I3 : Integer;
-+ I4 : Integer;
-+ I5 : Integer;
-+ end record;
-+
-+ procedure Set (A : access Rec; I : Integer) is
-+ Tmp : Rec := A.all;
-+ begin
-+ Tmp.I1 := I;
-+ A.all := Tmp;
-+ end;
-+
-+ R : aliased Rec;
-+
-+begin
-+ Set (R'Access, I);
-+ if R.I1 /= I then
-+ raise Program_Error;
-+ end if;
-+end;
-+
-+-- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } }
-+-- { dg-final { cleanup-tree-dump "optimized" } }
-Index: gcc/testsuite/gnat.dg/opt41.adb
-===================================================================
---- gcc/testsuite/gnat.dg/opt41.adb (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gnat.dg/opt41.adb (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,15 @@
-+-- { dg-do run }
-+-- { dg-options "-Os" }
-+
-+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
-+with Opt41_Pkg; use Opt41_Pkg;
-+
-+procedure Opt41 is
-+ R : Rec := (Five, To_Unbounded_String ("CONFIG"));
-+ SP : String_Access := new String'(To_String (Rec_Write (R)));
-+ RP : Rec_Ptr := new Rec'(Rec_Read (SP));
-+begin
-+ if RP.D /= R.D then
-+ raise Program_Error;
-+ end if;
-+end;
-Index: gcc/testsuite/gnat.dg/overflow_fixed.adb
-===================================================================
---- gcc/testsuite/gnat.dg/overflow_fixed.adb (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gnat.dg/overflow_fixed.adb (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,19 @@
-+-- { dg-do run }
-+-- { dg-options "-gnato -O" }
-+
-+procedure Overflow_Fixed is
-+
-+ type Unsigned_8_Bit is mod 2**8;
-+
-+ procedure Fixed_To_Eight (Value : Duration) is
-+ Item : Unsigned_8_Bit;
-+ begin
-+ Item := Unsigned_8_Bit(Value);
-+ raise Program_Error;
-+ exception
-+ when Constraint_Error => null; -- expected case
-+ end;
-+
-+begin
-+ Fixed_To_Eight (-0.5);
-+end;
-Index: gcc/testsuite/gnat.dg/aliasing1.adb
-===================================================================
---- gcc/testsuite/gnat.dg/aliasing1.adb (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gnat.dg/aliasing1.adb (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -18,5 +18,5 @@
-
- end Aliasing1;
-
---- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
-+-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
- -- { dg-final { cleanup-tree-dump "optimized" } }
-Index: gcc/testsuite/gcc.dg/pr60866.c
-===================================================================
---- gcc/testsuite/gcc.dg/pr60866.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/pr60866.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,18 @@
-+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
-+/* { dg-options "-O -fselective-scheduling -fno-if-conversion -fschedule-insns" } */
-+
-+int n;
-+
-+void
-+foo (int w, int **dnroot, int **dn)
-+{
-+ int *child;
-+ int *xchild = xchild;
-+ for (; w < n; w++)
-+ if (!dnroot)
-+ {
-+ dnroot = dn;
-+ for (child = *dn; child; child = xchild)
-+ ;
-+ }
-+}
-Index: gcc/testsuite/gcc.dg/vmx/3c-01a.c
-===================================================================
---- gcc/testsuite/gcc.dg/vmx/3c-01a.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gcc.dg/vmx/3c-01a.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,4 +1,5 @@
- /* { dg-do compile } */
-+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
- #include <altivec.h>
- typedef const volatile unsigned int _1;
- typedef const unsigned int _2;
-Index: gcc/testsuite/gcc.dg/vmx/ops.c
-===================================================================
---- gcc/testsuite/gcc.dg/vmx/ops.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gcc.dg/vmx/ops.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,4 +1,5 @@
- /* { dg-do compile } */
-+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
- #include <altivec.h>
- #include <stdlib.h>
- extern char * *var_char_ptr;
-Index: gcc/testsuite/gcc.dg/vmx/ops-long-1.c
-===================================================================
---- gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,4 +1,5 @@
- /* { dg-do compile } */
-+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
-
- /* Checks from the original ops.c that pass pointers to long or
- unsigned long for operations that support that in released versions
-Index: gcc/testsuite/gcc.dg/pr63342.c
-===================================================================
---- gcc/testsuite/gcc.dg/pr63342.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/pr63342.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,26 @@
-+/* PR debug/63342 */
-+/* { dg-do compile } */
-+/* { dg-options "-g -O2" } */
-+/* { dg-additional-options "-fpic" { target fpic } } */
-+
-+static __thread double u[9], v[9];
-+
-+void
-+foo (double **p, double **q)
-+{
-+ *p = u;
-+ *q = v;
-+}
-+
-+double
-+bar (double x)
-+{
-+ int i;
-+ double s = 0.0;
-+ for (i = 0; i < 9; i++)
-+ {
-+ double a = x + v[i];
-+ s += u[i] * a * a;
-+ }
-+ return s;
-+}
-Index: gcc/testsuite/gcc.dg/pr63284.c
-===================================================================
---- gcc/testsuite/gcc.dg/pr63284.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/pr63284.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,42 @@
-+/* PR debug/63284 */
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fcompare-debug" } */
-+
-+int a[10], *b, *d, c, f;
-+int fn2 (void);
-+void fn3 (void);
-+void fn4 (int);
-+
-+static int
-+fn1 (int x)
-+{
-+ int e = a[0];
-+ if (e)
-+ return 1;
-+ if (b)
-+ switch (x)
-+ {
-+ case 1:
-+ if (d)
-+ e = fn2 ();
-+ else
-+ fn3 ();
-+ break;
-+ case 0:
-+ if (d)
-+ {
-+ fn3 ();
-+ if (c)
-+ fn4 (1);
-+ }
-+ else
-+ fn4 (0);
-+ }
-+ return e;
-+}
-+
-+void
-+fn6 (void)
-+{
-+ f = fn1 (0);
-+}
-Index: gcc/testsuite/gcc.dg/pr61045.c
-===================================================================
---- gcc/testsuite/gcc.dg/pr61045.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/pr61045.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,12 @@
-+/* { dg-do run } */
-+/* { dg-options "-fstrict-overflow" } */
-+
-+int main ()
-+{
-+ int a = 0;
-+ int b = __INT_MAX__;
-+ int t = (a - 2) > (b - 1);
-+ if (t != 0)
-+ __builtin_abort();
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.dg/pr52769.c
-===================================================================
---- gcc/testsuite/gcc.dg/pr52769.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/pr52769.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,24 @@
-+/* PR c/52769 */
-+/* { dg-do run } */
-+/* { dg-options "-O3" } */
-+
-+typedef struct
-+{
-+ int should_be_zero;
-+ char s[6];
-+ int x;
-+} foo_t;
-+
-+int
-+main (void)
-+{
-+ volatile foo_t foo = {
-+ .s = "123456",
-+ .x = 2
-+ };
-+
-+ if (foo.should_be_zero != 0)
-+ __builtin_abort ();
-+
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.dg/pr62004.c
-===================================================================
---- gcc/testsuite/gcc.dg/pr62004.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/pr62004.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,47 @@
-+/* { dg-do run } */
-+/* { dg-options "-O2 -fno-tree-tail-merge" } */
-+
-+struct node
-+{
-+ struct node *next;
-+ struct node *prev;
-+};
-+
-+struct node node;
-+
-+struct head
-+{
-+ struct node *first;
-+};
-+
-+struct head heads[5];
-+
-+int k = 2;
-+
-+struct head *head = &heads[2];
-+
-+int
-+main ()
-+{
-+ struct node *p;
-+
-+ node.next = (void*)0;
-+
-+ node.prev = (void *)head;
-+
-+ head->first = &node;
-+
-+ struct node *n = head->first;
-+
-+ struct head *h = &heads[k];
-+
-+ heads[2].first = n->next;
-+
-+ if ((void*)n->prev == (void *)h)
-+ p = h->first;
-+ else
-+ /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
-+ p = n->prev->next;
-+
-+ return !(p == (void*)0);
-+}
-Index: gcc/testsuite/gcc.dg/pr51879-18.c
-===================================================================
---- gcc/testsuite/gcc.dg/pr51879-18.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gcc.dg/pr51879-18.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -13,5 +13,5 @@
- *q = foo ();
- }
-
--/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre"} } */
-+/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre" { xfail *-*-* } } } */
- /* { dg-final { cleanup-tree-dump "pre" } } */
-Index: gcc/testsuite/gcc.dg/torture/pr61964.c
-===================================================================
---- gcc/testsuite/gcc.dg/torture/pr61964.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/torture/pr61964.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,33 @@
-+/* { dg-do run } */
-+
-+extern void abort (void);
-+
-+struct node { struct node *next, *prev; } node;
-+struct head { struct node *first; } heads[5];
-+int k = 2;
-+struct head *head = &heads[2];
-+
-+static int __attribute__((noinline))
-+foo()
-+{
-+ node.prev = (void *)head;
-+ head->first = &node;
-+
-+ struct node *n = head->first;
-+ struct head *h = &heads[k];
-+
-+ if (n->prev == (void *)h)
-+ h->first = n->next;
-+ else
-+ n->prev->next = n->next;
-+
-+ n->next = h->first;
-+ return n->next == &node;
-+}
-+
-+int main()
-+{
-+ if (foo ())
-+ abort ();
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.dg/torture/pr61010.c
-===================================================================
---- gcc/testsuite/gcc.dg/torture/pr61010.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/torture/pr61010.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,8 @@
-+/* { dg-do compile } */
-+
-+int main (void)
-+{
-+ int a = 0;
-+ unsigned b = (a * 64 & 192) | 63U;
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.dg/torture/pr61452.c
-===================================================================
---- gcc/testsuite/gcc.dg/torture/pr61452.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/torture/pr61452.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,31 @@
-+/* { dg-do run } */
-+
-+int a, b;
-+short c, d;
-+char e, f;
-+
-+int
-+fn1 (int p1, char p2)
-+{
-+ return p1 || p2 ? 0 : p2;
-+}
-+
-+void
-+fn2 ()
-+{
-+ for (; a;)
-+ {
-+ int g;
-+ g = c = e;
-+ for (; a;)
-+ b = fn1 (g = d = e, g);
-+ f = g;
-+ }
-+}
-+
-+int
-+main ()
-+{
-+ fn2 ();
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.dg/torture/pr61383-1.c
-===================================================================
---- gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,35 @@
-+/* { dg-do run } */
-+
-+int a, b = 1, c, d, e, f, g;
-+
-+int
-+fn1 ()
-+{
-+ int h;
-+ for (;;)
-+ {
-+ g = b;
-+ g = g ? 0 : 1 % g;
-+ e = a + 1;
-+ for (; d < 1; d = e)
-+ {
-+ if (f == 0)
-+ h = 0;
-+ else
-+ h = 1 % f;
-+ if (f < 1)
-+ c = 0;
-+ else if (h)
-+ break;
-+ }
-+ if (b)
-+ return 0;
-+ }
-+}
-+
-+int
-+main ()
-+{
-+ fn1 ();
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c
-===================================================================
---- gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,41 @@
-+/* Test that exact underflow in __float128 signals the underflow
-+ exception if trapping is enabled, but does not raise the flag
-+ otherwise. */
-+
-+/* { dg-do run { target i?86-*-*gnu* x86_64-*-*gnu* } } */
-+/* { dg-options "-D_GNU_SOURCE" } */
-+/* { dg-require-effective-target fenv_exceptions } */
-+
-+#include <fenv.h>
-+#include <setjmp.h>
-+#include <signal.h>
-+#include <stdlib.h>
-+
-+volatile sig_atomic_t caught_sigfpe;
-+sigjmp_buf buf;
-+
-+static void
-+handle_sigfpe (int sig)
-+{
-+ caught_sigfpe = 1;
-+ siglongjmp (buf, 1);
-+}
-+
-+int
-+main (void)
-+{
-+ volatile __float128 a = 0x1p-16382q, b = 0x1p-2q;
-+ volatile __float128 r;
-+ r = a * b;
-+ if (fetestexcept (FE_UNDERFLOW))
-+ abort ();
-+ if (r != 0x1p-16384q)
-+ abort ();
-+ feenableexcept (FE_UNDERFLOW);
-+ signal (SIGFPE, handle_sigfpe);
-+ if (sigsetjmp (buf, 1) == 0)
-+ r = a * b;
-+ if (!caught_sigfpe)
-+ abort ();
-+ exit (0);
-+}
-Index: gcc/testsuite/gcc.dg/torture/vshuf-4.inc
-===================================================================
---- gcc/testsuite/gcc.dg/torture/vshuf-4.inc (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gcc.dg/torture/vshuf-4.inc (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -23,7 +23,8 @@
- T (20, 0, 4, 1, 5) \
- T (21, 2, 6, 3, 7) \
- T (22, 1, 2, 3, 0) \
--T (23, 2, 1, 0, 3)
-+T (23, 2, 1, 0, 3) \
-+T (24, 2, 5, 6, 3)
- #define EXPTESTS \
- T (116, 1, 2, 4, 3) \
- T (117, 7, 3, 3, 0) \
-@@ -31,7 +32,6 @@
- T (119, 0, 3, 5, 6) \
- T (120, 0, 0, 1, 5) \
- T (121, 4, 6, 2, 1) \
--T (122, 2, 5, 6, 3) \
- T (123, 4, 6, 3, 2) \
- T (124, 4, 7, 5, 6) \
- T (125, 0, 4, 2, 4) \
-Index: gcc/testsuite/gcc.dg/stack-usage-2.c
-===================================================================
---- gcc/testsuite/gcc.dg/stack-usage-2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/gcc.dg/stack-usage-2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,21 +1,21 @@
- /* { dg-do compile } */
- /* { dg-options "-Wstack-usage=512" } */
-
--int foo1 (void)
-+int foo1 (void) /* { dg-bogus "stack usage" } */
- {
- char arr[16];
- arr[0] = 1;
- return 0;
--} /* { dg-bogus "stack usage" } */
-+}
-
--int foo2 (void)
-+int foo2 (void) /* { dg-warning "stack usage is \[0-9\]* bytes" } */
- {
- char arr[1024];
- arr[0] = 1;
- return 0;
--} /* { dg-warning "stack usage is \[0-9\]* bytes" } */
-+}
-
--int foo3 (void)
-+int foo3 (void) /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
- {
- char arr[1024] __attribute__((aligned (512)));
- arr[0] = 1;
-@@ -22,12 +22,11 @@
- /* Force dynamic realignment of argument pointer. */
- __builtin_apply ((void (*)()) foo2, 0, 0);
- return 0;
-+}
-
--} /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
--
--int foo4 (int n)
-+int foo4 (int n) /* { dg-warning "stack usage might be unbounded" } */
- {
- char arr[n];
- arr[0] = 1;
- return 0;
--} /* { dg-warning "stack usage might be unbounded" } */
-+}
-Index: gcc/testsuite/gcc.dg/ipa/pr61986.c
-===================================================================
---- gcc/testsuite/gcc.dg/ipa/pr61986.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/ipa/pr61986.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,48 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O3" } */
-+
-+int a, b, c;
-+
-+struct S
-+{
-+ int f0;
-+ int f1;
-+} d;
-+
-+static int fn2 (struct S);
-+void fn3 (struct S);
-+
-+void
-+fn1 (struct S p)
-+{
-+ struct S h = { 0, 0 };
-+ fn3 (p);
-+ fn2 (h);
-+}
-+
-+int
-+fn2 (struct S p)
-+{
-+ struct S j = { 0, 0 };
-+ fn3 (p);
-+ fn2 (j);
-+ return 0;
-+}
-+
-+void
-+fn3 (struct S p)
-+{
-+ for (; b; a++)
-+ c = p.f0;
-+ fn1 (d);
-+}
-+
-+void
-+fn4 ()
-+{
-+ for (;;)
-+ {
-+ struct S f = { 0, 0 };
-+ fn1 (f);
-+ }
-+}
-Index: gcc/testsuite/gcc.dg/pr62030.c
-===================================================================
---- gcc/testsuite/gcc.dg/pr62030.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/pr62030.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,50 @@
-+/* { dg-do run } */
-+/* { dg-options "-O2" } */
-+
-+extern void abort (void);
-+
-+struct node
-+{
-+ struct node *next;
-+ struct node *prev;
-+};
-+
-+struct node node;
-+
-+struct head
-+{
-+ struct node *first;
-+};
-+
-+struct head heads[5];
-+
-+int k = 2;
-+
-+struct head *head = &heads[2];
-+
-+static int __attribute__((noinline))
-+foo (void)
-+{
-+ node.prev = (void *)head;
-+ head->first = &node;
-+
-+ struct node *n = head->first;
-+ struct head *h = &heads[k];
-+ struct node *next = n->next;
-+
-+ if (n->prev == (void *)h)
-+ h->first = next;
-+ else
-+ n->prev->next = next;
-+
-+ n->next = h->first;
-+ return n->next == &node;
-+}
-+
-+int
-+main (void)
-+{
-+ if (foo ())
-+ abort ();
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.dg/vect/pr63341-2.c
-===================================================================
---- gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,35 @@
-+/* PR tree-optimization/63341 */
-+/* { dg-do run } */
-+
-+#include "tree-vect.h"
-+
-+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
-+struct S { char e __attribute__((aligned (64))); U s[32]; };
-+struct S t = {0, {{0x5010}, {0x5111}, {0x5212}, {0x5313}, {0x5414}, {0x5515}, {0x5616}, {0x5717},
-+ {0x5818}, {0x5919}, {0x5a1a}, {0x5b1b}, {0x5c1c}, {0x5d1d}, {0x5e1e}, {0x5f1f},
-+ {0x6020}, {0x6121}, {0x6222}, {0x6323}, {0x6424}, {0x6525}, {0x6626}, {0x6727},
-+ {0x6828}, {0x6929}, {0x6a2a}, {0x6b2b}, {0x6c2c}, {0x6d2d}, {0x6e2e}, {0x6f2f}}};
-+unsigned short d[32] = { 1 };
-+
-+__attribute__((noinline, noclone)) void
-+foo ()
-+{
-+ int i;
-+ for (i = 0; i < 32; i++)
-+ d[i] = t.s[i].s + 4;
-+ for (i = 0; i < 32; i++)
-+ if (d[i] != t.s[i].s + 4)
-+ abort ();
-+ else
-+ asm volatile ("" : : : "memory");
-+}
-+
-+int
-+main ()
-+{
-+ check_vect ();
-+ foo ();
-+ return 0;
-+}
-+
-+/* { dg-final { cleanup-tree-dump "vect" } } */
-Index: gcc/testsuite/gcc.dg/vect/pr63189.c
-===================================================================
---- gcc/testsuite/gcc.dg/vect/pr63189.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/vect/pr63189.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,26 @@
-+/* PR tree-optimization/63189 */
-+/* { dg-do run } */
-+
-+#include "tree-vect.h"
-+
-+short int d[16] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
-+
-+__attribute__((noinline, noclone)) void
-+foo (void)
-+{
-+ int j, s = 0;
-+ for (j = 0; j < 8; j++)
-+ s += d[j] * j;
-+ if (s != 7)
-+ abort ();
-+}
-+
-+int
-+main ()
-+{
-+ check_vect ();
-+ foo ();
-+ return 0;
-+}
-+
-+/* { dg-final { cleanup-tree-dump "vect" } } */
-Index: gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c
-===================================================================
---- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,73 @@
-+/* { dg-require-effective-target vect_int } */
-+
-+#include <stdarg.h>
-+#include "tree-vect.h"
-+
-+#define N 64
-+#define DOT 43680
-+
-+signed short X[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
-+signed int Y[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
-+
-+/* (short, int)->int->int dot product.
-+ Not detected as a dot-product pattern. */
-+
-+__attribute__ ((noinline)) int
-+foo (int len)
-+{
-+ int i;
-+ int result = 0;
-+
-+ for (i = 0; i < len; i++)
-+ {
-+ result += (X[i] * Y[i]);
-+ }
-+ return result;
-+}
-+
-+
-+/* (int, short)->int->int dot product.
-+ Not detected as a dot-product pattern. */
-+
-+__attribute__ ((noinline)) int
-+bar (int len)
-+{
-+ int i;
-+ int result = 0;
-+
-+ for (i = 0; i < len; i++)
-+ {
-+ result += (Y[i] * X[i]);
-+ }
-+ return result;
-+}
-+
-+int
-+main (void)
-+{
-+ int i;
-+ int dot;
-+
-+ check_vect ();
-+
-+ for (i = 0; i < N; i++)
-+ {
-+ X[i] = i;
-+ Y[i] = N - i;
-+ __asm__ volatile ("");
-+ }
-+
-+ dot = foo (N);
-+ if (dot != DOT)
-+ abort ();
-+
-+ dot = bar (N);
-+ if (dot != DOT)
-+ abort ();
-+
-+ return 0;
-+}
-+
-+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
-+/* { dg-final { cleanup-tree-dump "vect" } } */
-+
-Index: gcc/testsuite/gcc.dg/vect/pr62073.c
-===================================================================
---- gcc/testsuite/gcc.dg/vect/pr62073.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/vect/pr62073.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,40 @@
-+/* { dg-do compile } */
-+/* { dg-additional-options "-O1" } */
-+
-+struct S0
-+{
-+ int f7;
-+};
-+struct S0 g_50;
-+int g_70;
-+int g_76;
-+
-+int foo (long long p_56, int * p_57)
-+{
-+ int *l_77;
-+ int l_101;
-+
-+ for (; g_70;)
-+ {
-+ int **l_78 = &l_77;
-+ if (g_50.f7)
-+ continue;
-+ *l_78 = 0;
-+ }
-+ for (g_76 = 1; g_76 >= 0; g_76--)
-+ {
-+ int *l_90;
-+ for (l_101 = 4; l_101 >= 0; l_101--)
-+ if (l_101)
-+ *l_90 = 0;
-+ else
-+ {
-+ int **l_113 = &l_77;
-+ *l_113 = p_57;
-+ }
-+ }
-+
-+ return *l_77;
-+}
-+
-+/* { dg-final { cleanup-tree-dump "vect" } } */
-Index: gcc/testsuite/gcc.dg/vect/pr60196-1.c
-===================================================================
---- gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,34 @@
-+/* PR tree-optimization/63189 */
-+/* { dg-additional-options "-fwrapv" } */
-+/* { dg-do run } */
-+
-+#include "tree-vect.h"
-+
-+__attribute__((noinline, noclone)) static int
-+bar (const short *a, int len)
-+{
-+ int x;
-+ int x1 = 0;
-+
-+ for (x = 0; x < len; x++)
-+ x1 += x * a[x];
-+ return x1;
-+}
-+
-+__attribute__((noinline, noclone)) void
-+foo (void)
-+{
-+ short stuff[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1 };
-+ if (bar (stuff, 9) != 36)
-+ abort ();
-+}
-+
-+int
-+main ()
-+{
-+ check_vect ();
-+ foo ();
-+ return 0;
-+}
-+
-+/* { dg-final { cleanup-tree-dump "vect" } } */
-Index: gcc/testsuite/gcc.dg/vect/pr62075.c
-===================================================================
---- gcc/testsuite/gcc.dg/vect/pr62075.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/vect/pr62075.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+
-+int a[16][2];
-+struct A
-+{
-+ int b[16][2];
-+ int c[16][1];
-+};
-+
-+void
-+foo (struct A *x)
-+{
-+ int i;
-+ for (i = 0; i < 16; ++i)
-+ {
-+ x->b[i][0] = a[i][0];
-+ x->c[i][0] = 0 != a[i][0];
-+ x->b[i][1] = a[i][1];
-+ }
-+}
-+
-+/* { dg-final { cleanup-tree-dump "vect" } } */
-Index: gcc/testsuite/gcc.dg/vect/pr60196-2.c
-===================================================================
---- gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,33 @@
-+/* PR tree-optimization/63189 */
-+/* { dg-do run } */
-+
-+#include "tree-vect.h"
-+
-+static const short a[8] = {1, 1, 1, 1, 1, 1, 1, 1 };
-+static const unsigned char b[8] = {0, 0, 0, 0, 0, 0, 0, 0 };
-+
-+__attribute__((noinline, noclone)) static int
-+bar (void)
-+{
-+ int sum = 0, i;
-+ for (i = 0; i < 8; ++i)
-+ sum += a[i] * b[i];
-+ return sum;
-+}
-+
-+__attribute__((noinline, noclone)) void
-+foo (void)
-+{
-+ if (bar () != 0)
-+ abort ();
-+}
-+
-+int
-+main ()
-+{
-+ check_vect ();
-+ foo ();
-+ return 0;
-+}
-+
-+/* { dg-final { cleanup-tree-dump "vect" } } */
-Index: gcc/testsuite/gcc.dg/vect/pr63341-1.c
-===================================================================
---- gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,32 @@
-+/* PR tree-optimization/63341 */
-+/* { dg-do run } */
-+
-+#include "tree-vect.h"
-+
-+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
-+struct S { char e __attribute__((aligned (64))); U s[32]; };
-+struct S t = {0, {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8},
-+ {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16},
-+ {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24},
-+ {25}, {26}, {27}, {28}, {29}, {30}, {31}, {32}}};
-+unsigned short d[32] = { 1 };
-+
-+__attribute__((noinline, noclone)) void
-+foo ()
-+{
-+ int i;
-+ for (i = 0; i < 32; i++)
-+ d[i] = t.s[i].s;
-+ if (__builtin_memcmp (d, t.s, sizeof d))
-+ abort ();
-+}
-+
-+int
-+main ()
-+{
-+ check_vect ();
-+ foo ();
-+ return 0;
-+}
-+
-+/* { dg-final { cleanup-tree-dump "vect" } } */
-Index: gcc/testsuite/ChangeLog
-===================================================================
---- gcc/testsuite/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,3 +1,433 @@
-+2014-11-03 Marek Polacek <polacek@redhat.com>
-+
-+ PR c/52769
-+ * gcc.dg/pr52769.c: New test.
-+
-+2014-10-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-+
-+ * gcc.target/aarch64/madd_after_asm_1.c: New test.
-+
-+2014-10-15 Eric Botcazou <ebotcazou@adacore.com>
-+
-+ * gnat.dg/opt41.adb: New test.
-+ * gnat.dg/opt41_pkg.ad[sb]: New helper.
-+
-+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-+
-+ Backport from mainline r215880
-+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-+
-+ * g++.dg/ext/altivec-2.C: Compile with -Wno-deprecated to avoid
-+ failing with the new warning message.
-+ * gcc.dg/vmx/3c-01a.c: Likewise.
-+ * gcc.dg/vmx/ops-long-1.c: Likewise.
-+ * gcc.dg/vmx/ops.c: Likewise.
-+ * gcc.target/powerpc/altivec-20.c: Likewise.
-+ * gcc.target/powerpc/altivec-6.c: Likewise.
-+ * gcc.target/powerpc/altivec-vec-merge.c: Likewise.
-+ * gcc.target/powerpc/vsx-builtin-8.c: Likewise.
-+ * gcc.target/powerpc/warn-lvsl-lvsr.c: New test.
-+
-+ Backport from mainline r215882
-+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-+
-+ * gcc.target/powerpc/lvsl-lvsr.c: New test.
-+
-+ Backport from mainline r216017
-+ 2014-10-08 Pat Haugen <pthaugen@us.ibm.com>
-+
-+ * gcc.dg/vmx/3c-01a.c: Add default options from vmx.exp.
-+ * gcc.dg/vmx/ops.c: Likewise.
-+ * gcc.dg/vmx/ops-long-1.c: Likewise.
-+
-+2014-10-10 Jakub Jelinek <jakub@redhat.com>
-+
-+ PR fortran/59488
-+ * gfortran.dg/gomp/pr59488-1.f90: New test.
-+ * gfortran.dg/gomp/pr59488-2.f90: New test.
-+
-+2014-10-01 Jakub Jelinek <jakub@redhat.com>
-+
-+ PR debug/63342
-+ * gcc.dg/pr63342.c: New test.
-+
-+ PR target/63428
-+ * gcc.dg/torture/vshuf-4.inc: Move test 122 from EXPTESTS
-+ to test 24 in TESTS.
-+
-+2014-10-01 Uros Bizjak <ubizjak@gmail.com>
-+
-+ Backport from mainline
-+ 2013-11-07 Joseph Myers <joseph@codesourcery.com>
-+
-+ * lib/target-supports.exp
-+ (check_effective_target_fenv_exceptions): New function.
-+
-+2014-09-30 Jakub Jelinek <jakub@redhat.com>
-+
-+ PR inline-asm/63282
-+ * gcc.c-torture/compile/pr63282.c: New test.
-+
-+2014-09-26 Jakub Jelinek <jakub@redhat.com>
-+
-+ * g++.dg/compat/struct-layout-1_generate.c: Add -Wno-abi
-+ to default options.
-+
-+2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-+
-+ Backport from mainline r215559
-+ 2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-+
-+ PR target/63335
-+ * gcc.target/powerpc/pr63335.c: New test.
-+
-+2014-09-25 Jakub Jelinek <jakub@redhat.com>
-+
-+ PR tree-optimization/63341
-+ * gcc.dg/vect/pr63341-1.c: New test.
-+ * gcc.dg/vect/pr63341-2.c: New test.
-+
-+2014-09-18 Joseph Myers <joseph@codesourcery.com>
-+
-+ * gcc.dg/torture/float128-exact-underflow.c: New test.
-+
-+2014-09-17 Jakub Jelinek <jakub@redhat.com>
-+
-+ PR debug/63284
-+ * gcc.dg/pr63284.c: New test.
-+
-+2014-09-09 Richard Biener <rguenther@suse.de>
-+
-+ Backport from mainline
-+ 2014-06-11 Richard Biener <rguenther@suse.de>
-+
-+ PR tree-optimization/61452
-+ * gcc.dg/torture/pr61452.c: New testcase.
-+
-+2014-09-09 Richard Biener <rguenther@suse.de>
-+
-+ Backport from mainline
-+ 2014-05-05 Richard Biener <rguenther@suse.de>
-+
-+ PR middle-end/61010
-+ * gcc.dg/torture/pr61010.c: New testcase.
-+
-+ 2014-05-28 Richard Biener <rguenther@suse.de>
-+
-+ PR middle-end/61045
-+ * gcc.dg/pr61045.c: New testcase.
-+
-+ 2014-08-11 Richard Biener <rguenther@suse.de>
-+
-+ PR tree-optimization/62075
-+ * gcc.dg/vect/pr62075.c: New testcase.
-+
-+2014-09-08 Jakub Jelinek <jakub@redhat.com>
-+
-+ PR tree-optimization/60196
-+ PR tree-optimization/63189
-+ * gcc.dg/vect/pr63189.c: New test.
-+ * gcc.dg/vect/pr60196-1.c: New test.
-+ * gcc.dg/vect/pr60196-2.c: New test.
-+
-+ Backported from mainline
-+ 2013-09-17 Cong Hou <congh@google.com>
-+
-+ * gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product
-+ on two arrays with short and int types. This should not be recognized
-+ as a dot product pattern.
-+
-+2014-09-08 Jakub Jelinek <jakub@redhat.com>
-+
-+ Backported from mainline
-+ 2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
-+
-+ PR debug/61923
-+ * gcc.target/i386/pr61923.c: New test.
-+
-+2014-09-06 John David Anglin <danglin@gcc.gnu.org>
-+
-+ PR testsuite/56194
-+ * g++.dg/init/const9.C: Skip scan-assembler-not "rodata" on hppa*-*-*.
-+
-+2014-09-03 Marek Polacek <polacek@redhat.com>
-+
-+ Backport from mainline
-+ 2014-09-02 Marek Polacek <polacek@redhat.com>
-+
-+ PR fortran/62270
-+ * gfortran.dg/pointer_intent_7.f90: Adjust dg-error.
-+
-+2014-09-03 Martin Jambor <mjambor@suse.cz>
-+
-+ PR ipa/62015
-+ * g++.dg/ipa/pr62015.C: New test.
-+
-+2014-09-03 Martin Jambor <mjambor@suse.cz>
-+
-+ PR ipa/61986
-+ * gcc.dg/ipa/pr61986.c: New test.
-+
-+2014-08-26 Dominik Vogt <vogt@linux.vnet.ibm.com>
-+
-+ * gfortran.dg/bessel_7.f90: Bump allowed precision to avoid
-+ failure on s390*-*-linux-gnu.
-+
-+2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
-+
-+ Backport from mainline
-+ 2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
-+
-+ PR target/61996
-+ * gcc.target/sh/pr61996.c: New.
-+
-+2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
-+
-+ Backport from trunk
-+ PR fortran/62214
-+ * gfortran.dg/array_assignment_5.f90: New test.
-+
-+2014-08-15 Tom de Vries <tom@codesourcery.com>
-+
-+ Backport from mainline:
-+ 2014-08-14 Tom de Vries <tom@codesourcery.com>
-+
-+ PR rtl-optimization/62004
-+ PR rtl-optimization/62030
-+ * gcc.dg/pr62004.c: New test.
-+ * gcc.dg/pr62030.c: Same.
-+ * gcc.target/mips/pr62030-octeon.c: Same.
-+
-+2014-08-13 Felix Yang <fei.yang0953@gmail.com>
-+
-+ PR tree-optimization/62073
-+ * gcc.dg/vect/pr62073.c: New test.
-+
-+2014-08-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
-+
-+ Backport from mainline
-+ 2014-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
-+
-+ PR middle-end/62103
-+ * gcc.c-torture/execute/bitfld-6.c: New test.
-+
-+2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
-+
-+ Backport from trunk
-+ PR fortran/61999
-+ * gfortran.dg/dot_product_3.f90: New test case.
-+
-+2014-08-07 John David Anglin <danglin@gcc.gnu.org>
-+
-+ PR tree-optimization/60707
-+ * gfortran.dg/pr45636.f90: xfail on 32-bit hppa*-*-*.
-+
-+2014-08-06 Jakub Jelinek <jakub@redhat.com>
-+
-+ PR rtl-optimization/61801
-+ * gcc.target/i386/pr61801.c: Rewritten.
-+
-+2014-08-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
-+
-+ Backport from mainline
-+ 2014-06-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
-+
-+ PR tree-optimization/61375
-+ * gcc.c-torture/execute/pr61375-1.c: New test.
-+
-+2014-08-01 Richard Biener <rguenther@suse.de>
-+
-+ PR tree-optimization/61964
-+ * gcc.dg/torture/pr61964.c: New testcase.
-+ * gcc.dg/pr51879-18.c: XFAIL.
-+
-+2014-07-28 Richard Biener <rguenther@suse.de>
-+
-+ PR rtl-optimization/61801
-+ * gcc.target/i386/pr61801.c: Fix testcase.
-+
-+2014-07-28 Richard Biener <rguenther@suse.de>
-+
-+ PR rtl-optimization/61801
-+ * gcc.target/i386/pr61801.c: New testcase.
-+
-+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
-+
-+ Backport from mainline:
-+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
-+
-+ * gcc.target/powerpc/ppc64-abi-warn-3.c: New test.
-+
-+ * gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi.
-+ * gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi.
-+ * gcc.c-torture/execute/20050316-3.x: New file. Add -Wno-psabi.
-+ * gcc.c-torture/execute/pr23135.x: Likewise.
-+
-+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
-+
-+ Backport from mainline:
-+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
-+
-+ * gcc.target/powerpc/ppc64-abi-warn-2.c: New test.
-+
-+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
-+
-+ Backport from mainline:
-+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
-+
-+ * gcc.target/powerpc/ppc64-abi-warn-1.c: New test.
-+
-+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
-+
-+ Backport from mainline:
-+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
-+
-+ * g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp.
-+
-+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
-+
-+ * gcc.dg/stack-usage-2.c: Adjust.
-+
-+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
-+
-+ Backport from trunk.
-+ PR fortran/61780
-+ * gfortran.dg/dependency_44.f90 : New test
-+
-+2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
-+
-+ * gnat.dg/opt39.adb: New test.
-+
-+2014-07-08 Paul Thomas <pault@gcc.gnu.org>
-+
-+ PR fortran/61459
-+ PR fortran/58883
-+ * gfortran.dg/allocatable_function_8.f90 : New test
-+
-+2014-07-04 Jakub Jelinek <jakub@redhat.com>
-+
-+ PR tree-optimization/61684
-+ * gcc.c-torture/compile/pr61684.c: New test.
-+
-+2014-07-02 Jakub Jelinek <jakub@redhat.com>
-+ Fritz Reese <Reese-Fritz@zai.com>
-+
-+ * gfortran.dg/oldstyle_5.f: New test.
-+
-+2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
-+
-+ Backport from mainline
-+ 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
-+
-+ PR tree-optimization/61306
-+ * gcc.c-torture/execute/pr61306-1.c: New test.
-+ * gcc.c-torture/execute/pr61306-2.c: Likewise.
-+ * gcc.c-torture/execute/pr61306-3.c: Likewise.
-+
-+2014-06-27 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-+
-+ * gfortran.dg/nint_2.f90: Don't XFAIL for powerpc64le-*-linux*.
-+
-+2014-06-27 Uros Bizjak <ubizjak@gmail.com>
-+
-+ Backport from mainline
-+ 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
-+
-+ PR target/61586
-+ * gcc.target/alpha/pr61586.c: New test.
-+
-+2014-06-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-+
-+ * gfortran.dg/default_format_denormal_2.f90: Remove xfail for
-+ powerpc*-*-linux*.
-+
-+2014-06-18 Uros Bizjak <ubizjak@gmail.com>
-+
-+ Backport from mainline
-+ 2014-06-13 Ilya Enkovich <ilya.enkovich@intel.com>
-+
-+ PR rtl-optimization/61094
-+ PR rtl-optimization/61446
-+ * gcc.target/i386/pr61446.c : New.
-+
-+ Backport from mainline
-+ 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
-+
-+ PR target/61423
-+ * gcc.target/i386/pr61423.c: New test.
-+
-+2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
-+
-+ Backport from mainline
-+
-+ PR target/61483
-+ * gcc.target/aarch64/aapcs64/type-def.h (struct hfa_fx2_t): New type.
-+ * gcc.target/aarch64/aapcs64/va_arg-13.c: New test.
-+ * gcc.target/aarch64/aapcs64/va_arg-14.c: Ditto.
-+ * gcc.target/aarch64/aapcs64/va_arg-15.c: Ditto.
-+
-+2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
-+
-+ Backport from trunk.
-+ PR fortran/45187
-+ * gfortran.dg/cray_pointers_10.f90: New file.
-+
-+2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
-+
-+ Backport from mainline
-+
-+ 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
-+ PR target/61415
-+ * lib/target-supports.exp (check_effective_target_longdouble128): New.
-+ * gcc.target/powerpc/pack02.c: Use it.
-+ * gcc.target/powerpc/tfmode_off.c: Likewise.
-+
-+2014-06-12 Georg-Johann Lay <avr@gjlay.de>
-+
-+ Backport from 2014-06-12 trunk r211491
-+
-+ PR target/61443
-+ * gcc.target/avr/torture/pr61443.c: New test.
-+
-+2014-06-04 Richard Biener <rguenther@suse.de>
-+
-+ PR tree-optimization/61383
-+ * gcc.dg/torture/pr61383-1.c: New testcase.
-+
-+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
-+
-+ Backport from mainline
-+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
-+
-+ PR rtl-optimization/60866
-+ * gcc.dg/pr60866.c: New test.
-+
-+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
-+
-+ Backport from mainline
-+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
-+
-+ PR rtl-optimization/60901
-+ * gcc.target/i386/pr60901.c: New test.
-+
-+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
-+
-+ Backport from mainline
-+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
-+
-+ * gnat.dg/overflow_fixed.adb: New test.
-+
-+2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
-+
-+ * gnat.dg/aliasing1.adb (dg-final): Robustify pattern matching.
-+
-+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
-+
-+ Backport from mainline
-+ 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
-+
-+ * gcc.target/powerpc/htm-ttest.c: New test.
-+
- 2014-05-22 Release Manager
-
- * GCC 4.8.3 released.
-Index: gcc/testsuite/g++.dg/rtti/dyncast7.C
-===================================================================
---- gcc/testsuite/g++.dg/rtti/dyncast7.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/rtti/dyncast7.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,28 @@
-+// I think this dynamic_cast has undefined behavior when destroying E::o
-+// because we're the F period of destruction has started and ap doesn't
-+// point to the object currently being destroyed--but the reasonable
-+// options are success or failure, not SEGV.
-+
-+// { dg-do run }
-+
-+extern "C" void abort();
-+
-+struct A { virtual ~A(); };
-+struct B { virtual ~B() { } };
-+struct C : B, A { };
-+struct E : virtual B { A o; };
-+struct F : virtual C, virtual E { };
-+
-+A* ap;
-+C* cp;
-+
-+A::~A() {
-+ C* cp2 = dynamic_cast<C*>(ap);
-+ if (cp2 != cp && cp2 != 0)
-+ abort();
-+}
-+
-+int main() {
-+ F f;
-+ ap = cp = &f;
-+}
-Index: gcc/testsuite/g++.dg/ext/altivec-2.C
-===================================================================
---- gcc/testsuite/g++.dg/ext/altivec-2.C (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/g++.dg/ext/altivec-2.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,6 +1,6 @@
- /* { dg-do compile { target powerpc*-*-* } } */
- /* { dg-require-effective-target powerpc_altivec_ok } */
--/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable" } */
-+/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable -Wno-deprecated" } */
-
- /* This test checks if AltiVec builtins accept const-qualified
- arguments. */
-Index: gcc/testsuite/g++.dg/ext/stmtexpr16.C
-===================================================================
---- gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,10 @@
-+// PR c++/63455
-+// { dg-options "-std=gnu++11" }
-+
-+int main()
-+{
-+ int x = 0;
-+
-+ // without '+0', gcc 4.6 gives a different error (no ICE though)
-+ decltype(({ int y = x; y; })+0) v1 = 0;
-+}
-Index: gcc/testsuite/g++.dg/expr/cond12.C
-===================================================================
---- gcc/testsuite/g++.dg/expr/cond12.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/expr/cond12.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,12 @@
-+// PR c++/58714
-+// { dg-do run }
-+
-+struct X {
-+ X& operator=(const X&){}
-+ X& operator=(X&){__builtin_abort();}
-+};
-+
-+int main(int argv,char**) {
-+ X a, b;
-+ ((argv > 2) ? a : b) = X();
-+}
-Index: gcc/testsuite/g++.dg/init/const9.C
-===================================================================
---- gcc/testsuite/g++.dg/init/const9.C (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/g++.dg/init/const9.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,5 +1,5 @@
- // PR c++/55893
--// { dg-final { scan-assembler-not "rodata" } }
-+// { dg-final { scan-assembler-not "rodata" { target { ! hppa*-*-* } } } }
-
- struct foo
- {
-Index: gcc/testsuite/g++.dg/tls/thread_local10.C
-===================================================================
---- gcc/testsuite/g++.dg/tls/thread_local10.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/tls/thread_local10.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,23 @@
-+// PR c++/58624
-+
-+// { dg-do run { target c++11 } }
-+// { dg-add-options tls }
-+// { dg-require-effective-target tls_runtime }
-+
-+int i;
-+
-+template <typename> struct A
-+{
-+ static thread_local int s;
-+
-+ A () { i = s; }
-+};
-+
-+int f() { return 42; }
-+template <typename T> thread_local int A<T>::s = f();
-+
-+int main () {
-+ A<void> a;
-+ if (i != 42)
-+ __builtin_abort();
-+}
-Index: gcc/testsuite/g++.dg/parse/typename7.C
-===================================================================
---- gcc/testsuite/g++.dg/parse/typename7.C (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/g++.dg/parse/typename7.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -7,10 +7,9 @@
-
- struct A
- {
-- template<typename> void foo(int); // { dg-message "note" }
-- template<typename T> void bar(T t) { // { dg-message "note" }
-+ template<typename> void foo(int);
-+ template<typename T> void bar(T t) {
- this->foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
-- // { dg-message "candidate" "candidate note" { target *-*-* } 12 }
- template<typename T> void bad(T t) {
- foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
- };
-@@ -20,7 +19,6 @@
- {
- void bar(T t) {
- A().bar<typename T>(t); } // { dg-error "expected|parse error|no matching" }
-- // { dg-message "candidate" "candidate note" { target *-*-* } 22 }
- void bad(T t) {
- B<typename T>::bar(t); } // { dg-error "invalid|not a template" }
- };
-Index: gcc/testsuite/g++.dg/parse/parameter-declaration-2.C
-===================================================================
---- gcc/testsuite/g++.dg/parse/parameter-declaration-2.C (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/g++.dg/parse/parameter-declaration-2.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,2 +1,2 @@
--void f (int i, int p[i]); // { dg-error "use of parameter .i. outside function body" }
-+void f (int i, int p[i]); // { dg-error "use of parameter.*outside function body" }
- // { dg-prune-output "array bound" }
-Index: gcc/testsuite/g++.dg/parse/ambig7.C
-===================================================================
---- gcc/testsuite/g++.dg/parse/ambig7.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/parse/ambig7.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,16 @@
-+// PR c++/60361
-+
-+struct Helper
-+{
-+ Helper(int a, void (*pfunc)());
-+};
-+
-+template <int I> void function();
-+
-+const int A = 1;
-+const int B = 2;
-+
-+Helper testOk(A, function<A>);
-+Helper testOk2(int(A), function<B>);
-+Helper testOk3((int(A)), function<A>);
-+Helper testFail(int(A), function<A>);
-Index: gcc/testsuite/g++.dg/compat/struct-layout-1.exp
-===================================================================
---- gcc/testsuite/g++.dg/compat/struct-layout-1.exp (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/g++.dg/compat/struct-layout-1.exp (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -89,6 +89,9 @@
- # This must be done after the compat-use-*-compiler definitions.
- load_lib compat.exp
-
-+# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
-+load_lib g++-dg.exp
-+
- g++_init
-
- # Save variables for the C++ compiler under test, which each test will
-Index: gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
-===================================================================
---- gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,5 +1,5 @@
- /* Structure layout test generator.
-- Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012
-+ Copyright (C) 2004-2014
- Free Software Foundation, Inc.
- Contributed by Jakub Jelinek <jakub@redhat.com>.
-
-@@ -44,7 +44,7 @@
- #endif
-
- const char *dg_options[] = {
--"/* { dg-options \"%s-I%s\" } */\n",
-+"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
- "/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
- "/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
- "/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* i?86-*-mingw32* x86_64-*-mingw32* i?86-*-cygwin* } } */\n",
-Index: gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
-===================================================================
---- gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,28 @@
-+// PR c++/61959
-+// { dg-do compile { target c++11 } }
-+
-+template <class Coord> struct BasePoint
-+{
-+ Coord x, y;
-+ constexpr BasePoint (Coord, Coord) : x (0), y (0) {}
-+};
-+template <class T> struct BaseCoord
-+{
-+ int value;
-+ constexpr BaseCoord (T) : value (1) {}
-+};
-+template <class units> struct IntCoordTyped : BaseCoord<int>, units
-+{
-+ typedef BaseCoord Super;
-+ constexpr IntCoordTyped (int) : Super (0) {}
-+};
-+template <class units>
-+struct IntPointTyped : BasePoint<IntCoordTyped<units> >, units
-+{
-+ typedef BasePoint<IntCoordTyped<units> > Super;
-+ constexpr IntPointTyped (int, int) : Super (0, 0) {}
-+};
-+struct A
-+{
-+};
-+IntPointTyped<A> a (0, 0);
-Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
-===================================================================
---- gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,9 @@
-+// PR c++/56710
-+// { dg-options "-std=c++11 -Wall" }
-+
-+int main()
-+{
-+ int t = 0;
-+ return [&]() -> int {int __t; __t = t; return __t; }();
-+ return [&t]() -> int {int __t; __t = t; return __t; }();
-+}
-Index: gcc/testsuite/g++.dg/cpp0x/variadic158.C
-===================================================================
---- gcc/testsuite/g++.dg/cpp0x/variadic158.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/cpp0x/variadic158.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,24 @@
-+// PR c++/61134
-+// { dg-do compile { target c++11 } }
-+
-+struct Base { };
-+
-+template <typename>
-+struct Fixed {
-+ typedef const char* name;
-+};
-+
-+template <typename VT, typename... Fields>
-+void New(const char* name,
-+ typename Fixed<Fields>::name... field_names);
-+
-+template <typename VT, typename... Fields>
-+void CreateMetric(const char* name,
-+ typename Fixed<Fields>::name... field_names,
-+ const Base&) { }
-+
-+
-+void Fn()
-+{
-+ CreateMetric<int, const char*>("abcd", "def", Base());
-+}
-Index: gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C
-===================================================================
---- gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,7 @@
-+// PR c++/63415
-+// { dg-do compile { target c++11 } }
-+
-+template <typename T>
-+struct A {
-+ static constexpr int value = int(T{});
-+};
-Index: gcc/testsuite/g++.dg/cpp0x/variadic160.C
-===================================================================
---- gcc/testsuite/g++.dg/cpp0x/variadic160.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/cpp0x/variadic160.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,49 @@
-+// PR c++/61539
-+// { dg-do compile { target c++11 } }
-+
-+template <typename _CharT> class A;
-+template <typename> class B;
-+template <class charT> class C;
-+template <> class C<char>
-+{
-+ virtual void xparse (int &, const B<A<char> > &) const;
-+};
-+template <class T, class charT = char> class G : C<charT>
-+{
-+public:
-+ G (void *) {}
-+ void default_value (const T &);
-+ void xparse (int &, const B<A<charT> > &) const;
-+};
-+template <class T, class charT>
-+void validate (int &, const B<A<charT> > &, T *, int);
-+template <class T, class charT>
-+void G<T, charT>::xparse (int &p1, const B<A<charT> > &p2) const
-+{
-+ validate (p1, p2, (T *)0, 0);
-+}
-+template <class T> G<T> *value (T *) { return new G<T>(0); }
-+namespace Eigen
-+{
-+template <typename T> struct D;
-+template <typename, int, int, int = 0, int = 0, int = 0 > class F;
-+template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
-+ int _MaxCols>
-+struct D<F<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
-+{
-+ typedef _Scalar Scalar;
-+};
-+template <typename, int, int, int, int, int _MaxCols> class F
-+{
-+public:
-+ typedef typename Eigen::D<F>::Scalar Scalar;
-+ F (const Scalar &, const Scalar &, const Scalar &);
-+};
-+template <class... T>
-+void validate (int &, const B<A<char> > &, Eigen::F<T...> *);
-+}
-+int main (int, char *[])
-+{
-+ Eigen::F<double, 3, 1> a (0, 0, 0);
-+ value (&a)->default_value (Eigen::F<double, 3, 1>(0, 0, 0));
-+}
-Index: gcc/testsuite/g++.dg/cpp0x/rv-cond1.C
-===================================================================
---- gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,13 @@
-+// PR c++/58714
-+// { dg-do compile { target c++11 } }
-+
-+struct X {
-+ X& operator=(const X&) = delete;
-+ X& operator=(X&& ) = default;
-+};
-+
-+void f(bool t) {
-+ X a, b;
-+ *(t ? &a : &b) = X();
-+ (t ? a : b) = X();
-+}
-Index: gcc/testsuite/g++.dg/cpp0x/overload3.C
-===================================================================
---- gcc/testsuite/g++.dg/cpp0x/overload3.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/cpp0x/overload3.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,17 @@
-+// PR c++/59823
-+// { dg-options "-std=c++11" }
-+
-+struct X { };
-+
-+void f(X&&); // { dg-message "void f" }
-+
-+struct wrap
-+{
-+ operator const X&() const;
-+};
-+
-+int main()
-+{
-+ wrap w;
-+ f(w); // { dg-error "lvalue" }
-+}
-Index: gcc/testsuite/g++.dg/ipa/pr62015.C
-===================================================================
---- gcc/testsuite/g++.dg/ipa/pr62015.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/ipa/pr62015.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,55 @@
-+/* { dg-do run } */
-+/* { dg-options "-O3 -std=c++11" } */
-+
-+
-+extern "C" int printf(const char *fmt, ...);
-+extern "C" void abort(void);
-+
-+struct Side {
-+ enum _Value { Left, Right, Invalid };
-+
-+ constexpr Side() : _value(Invalid) {}
-+ constexpr Side(_Value value) : _value(value) {}
-+ operator _Value() const { return (_Value)_value; }
-+
-+ private:
-+ char _value;
-+};
-+
-+struct A {
-+ void init();
-+ void adjust(Side side, bool final);
-+ void move(Side side);
-+};
-+
-+void A::init()
-+{
-+ adjust(Side::Invalid, false);
-+}
-+
-+static void __attribute__((noinline))
-+check (int v, int final)
-+{
-+ if (v != 0)
-+ abort();
-+}
-+
-+
-+__attribute__((noinline))
-+void A::adjust(Side side, bool final)
-+{
-+ check ((int)side, final);
-+}
-+
-+void A::move(Side side)
-+{
-+ adjust(side, false);
-+ adjust(side, true);
-+}
-+
-+int main()
-+{
-+ A t;
-+ t.move(Side::Left);
-+ return 0;
-+}
-Index: gcc/testsuite/g++.dg/template/local-fn1.C
-===================================================================
---- gcc/testsuite/g++.dg/template/local-fn1.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/template/local-fn1.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,8 @@
-+// PR c++/60605
-+
-+template <typename T = int>
-+struct Foo {
-+ void bar() {
-+ void bug();
-+ }
-+};
-Index: gcc/testsuite/g++.dg/template/conv14.C
-===================================================================
---- gcc/testsuite/g++.dg/template/conv14.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/template/conv14.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,30 @@
-+// PR c++/61647
-+
-+class XX;
-+
-+template<typename Container, typename Key>
-+struct Accessor;
-+
-+template<typename Container, typename Key, typename KeyStore = Key>
-+class Variant {
-+protected:
-+ KeyStore index;
-+ Container state;
-+public:
-+ Variant(Container st, const Key& i) : index(i), state(st) {}
-+
-+ template<typename T>
-+ operator T() const {
-+ return Accessor<Container, KeyStore>::template get<T>(state, index);
-+ }
-+};
-+
-+class AutoCleanVariant : public Variant<XX*, int> {
-+public:
-+ AutoCleanVariant(XX* st, int i) : Variant<XX*,int>(st,i) {}
-+
-+ template<typename T>
-+ operator T() const {
-+ return Variant<XX*, int>::operator T();
-+ }
-+};
-Index: gcc/testsuite/g++.dg/template/friend55.C
-===================================================================
---- gcc/testsuite/g++.dg/template/friend55.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/template/friend55.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,18 @@
-+// PR c++/59956
-+
-+template <int I> struct A;
-+template <int I> class B {
-+ int i;
-+ template <int A_S> friend void A<A_S>::impl();
-+};
-+
-+B<0> b1;
-+template<int I>struct A { void impl(); };
-+B<1> b2;
-+
-+template<int I> void A<I>::impl() { ++b1.i; ++b2.i; }
-+
-+int main()
-+{
-+ A<0>().impl();
-+}
-Index: gcc/testsuite/g++.dg/template/memclass5.C
-===================================================================
---- gcc/testsuite/g++.dg/template/memclass5.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/template/memclass5.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,26 @@
-+// PR c++/60241
-+
-+template <typename T>
-+struct x
-+{
-+ template <typename U>
-+ struct y
-+ {
-+ typedef T result2;
-+ };
-+
-+ typedef y<int> zy;
-+};
-+
-+template<>
-+template<class T>
-+struct x<int>::y
-+{
-+ typedef double result2;
-+};
-+
-+int main()
-+{
-+ x<int>::zy::result2 xxx;
-+ x<int>::y<int>::result2 xxx2;
-+}
-Index: gcc/testsuite/g++.dg/template/ptrmem27.C
-===================================================================
---- gcc/testsuite/g++.dg/template/ptrmem27.C (.../tags/gcc_4_8_3_release) (revision 0)
-+++ gcc/testsuite/g++.dg/template/ptrmem27.C (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -0,0 +1,22 @@
-+// PR c++/61500
-+
-+struct X {
-+ int i;
-+ int j;
-+
-+ int foo(int X::* ptr);
-+
-+ template <int X::* ptr>
-+ int bar();
-+};
-+
-+int X::foo(int X::* ptr) {
-+ int* p = &(this->*ptr); // OK.
-+ return *p;
-+}
-+
-+template <int X::* ptr>
-+int X::bar() {
-+ int* p = &(this->*ptr); // gcc 4.9.0: OK in C++98 mode, fails in C++11 mode.
-+ return *p;
-+}
-Index: gcc/cp/tree.c
-===================================================================
---- gcc/cp/tree.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/cp/tree.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,6 +97,16 @@
- case IMAGPART_EXPR:
- return lvalue_kind (TREE_OPERAND (ref, 0));
-
-+ case MEMBER_REF:
-+ case DOTSTAR_EXPR:
-+ if (TREE_CODE (ref) == MEMBER_REF)
-+ op1_lvalue_kind = clk_ordinary;
-+ else
-+ op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
-+ if (TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (ref, 1))))
-+ op1_lvalue_kind = clk_none;
-+ return op1_lvalue_kind;
-+
- case COMPONENT_REF:
- op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
- /* Look at the member designator. */
-@@ -3738,6 +3748,10 @@
- {
- init_expr = get_target_expr (exp);
- exp = TARGET_EXPR_SLOT (init_expr);
-+ if (CLASS_TYPE_P (TREE_TYPE (exp)))
-+ exp = move (exp);
-+ else
-+ exp = rvalue (exp);
- }
- else
- {
-Index: gcc/cp/ChangeLog
-===================================================================
---- gcc/cp/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/cp/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,3 +1,87 @@
-+2014-10-15 Jason Merrill <jason@redhat.com>
-+
-+ PR c++/63455
-+ Revert:
-+ * parser.c (cp_parser_abort_tentative_parse): Make sure we haven't
-+ committed to this tentative parse.
-+
-+ PR c++/63415
-+ * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
-+ (iterative_hash_template_arg): Likewise.
-+
-+ PR c++/56710
-+ * semantics.c (finish_member_declaration): Don't push closure
-+ members.
-+
-+ PR c++/58624
-+ * pt.c (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
-+ * semantics.c (finish_id_expression): Don't call TLS wrapper in a
-+ template.
-+
-+2014-08-07 Jason Merrill <jason@redhat.com>
-+
-+ PR c++/61959
-+ * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
-+
-+ PR c++/58714
-+ * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
-+
-+2014-01-27 Jason Merrill <jason@redhat.com>
-+
-+ PR c++/59823
-+ Core DR 1138
-+ * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
-+ list-initialization. A conversion to rvalue ref that involves
-+ an lvalue-rvalue conversion is bad.
-+ (convert_like_real): Give helpful error message.
-+
-+2014-01-29 Jason Merrill <jason@redhat.com>
-+
-+ PR c++/59956
-+ * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
-+ have a friend template in a class template.
-+ * pt.c (tsubst_friend_function): Look through it.
-+ (push_template_decl_real): A friend member template is
-+ primary.
-+
-+2014-02-21 Jason Merrill <jason@redhat.com>
-+
-+ PR c++/60241
-+ * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
-+ of the partial instantiation, not the most general template.
-+ (maybe_process_partial_specialization): Reassign everything on
-+ that list.
-+
-+2014-03-05 Jason Merrill <jason@redhat.com>
-+
-+ PR c++/60361
-+ * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
-+ if re-parsing might succeed.
-+ * semantics.c (finish_id_expression): Use of a parameter outside
-+ the function body is a parse error.
-+
-+2014-06-30 Jason Merrill <jason@redhat.com>
-+
-+ PR c++/61647
-+ * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
-+
-+ PR c++/61539
-+ * pt.c (unify_one_argument): Type/expression mismatch just causes
-+ deduction failure.
-+
-+ PR c++/61500
-+ * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
-+
-+2014-06-17 Jason Merrill <jason@redhat.com>
-+
-+ PR c++/60605
-+ * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
-+
-+2014-06-02 Jason Merrill <jason@redhat.com>
-+
-+ PR c++/61134
-+ * pt.c (pack_deducible_p): Handle canonicalization.
-+
- 2014-05-22 Release Manager
-
- * GCC 4.8.3 released.
-Index: gcc/cp/pt.c
-===================================================================
---- gcc/cp/pt.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/cp/pt.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -907,11 +907,13 @@
- t; t = TREE_CHAIN (t))
- {
- tree inst = TREE_VALUE (t);
-- if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst))
-+ if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst)
-+ || !COMPLETE_OR_OPEN_TYPE_P (inst))
- {
- /* We already have a full specialization of this partial
-- instantiation. Reassign it to the new member
-- specialization template. */
-+ instantiation, or a full specialization has been
-+ looked up but not instantiated. Reassign it to the
-+ new member specialization template. */
- spec_entry elt;
- spec_entry *entry;
- void **slot;
-@@ -930,7 +932,7 @@
- *entry = elt;
- *slot = entry;
- }
-- else if (COMPLETE_OR_OPEN_TYPE_P (inst))
-+ else
- /* But if we've had an implicit instantiation, that's a
- problem ([temp.expl.spec]/6). */
- error ("specialization %qT after instantiation %qT",
-@@ -1569,6 +1571,7 @@
- case CONSTRUCTOR:
- {
- tree field, value;
-+ iterative_hash_template_arg (TREE_TYPE (arg), val);
- FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (arg), i, field, value)
- {
- val = iterative_hash_template_arg (field, val);
-@@ -4308,7 +4311,8 @@
- in the template-parameter-list of the definition of a member of a
- class template. */
-
-- if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL)
-+ if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL
-+ || (TREE_CODE (decl) == FUNCTION_DECL && DECL_LOCAL_FUNCTION_P (decl)))
- /* You can't have a function template declaration in a local
- scope, nor you can you define a member of a class template in a
- local scope. */
-@@ -4572,7 +4576,8 @@
- DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace);
-
- /* See if this is a primary template. */
-- if (is_friend && ctx)
-+ if (is_friend && ctx
-+ && uses_template_parms_level (ctx, processing_template_decl))
- /* A friend template that specifies a class context, i.e.
- template <typename T> friend void A<T>::f();
- is not primary. */
-@@ -7454,7 +7459,7 @@
- }
-
- /* Let's consider the explicit specialization of a member
-- of a class template specialization that is implicitely instantiated,
-+ of a class template specialization that is implicitly instantiated,
- e.g.:
- template<class T>
- struct S
-@@ -7552,9 +7557,9 @@
-
- /* Note this use of the partial instantiation so we can check it
- later in maybe_process_partial_specialization. */
-- DECL_TEMPLATE_INSTANTIATIONS (templ)
-+ DECL_TEMPLATE_INSTANTIATIONS (found)
- = tree_cons (arglist, t,
-- DECL_TEMPLATE_INSTANTIATIONS (templ));
-+ DECL_TEMPLATE_INSTANTIATIONS (found));
-
- if (TREE_CODE (template_type) == ENUMERAL_TYPE && !is_dependent_type)
- /* Now that the type has been registered on the instantiations
-@@ -8289,10 +8294,17 @@
-
- if (COMPLETE_TYPE_P (context))
- {
-+ tree fn = new_friend;
-+ /* do_friend adds the TEMPLATE_DECL for any member friend
-+ template even if it isn't a member template, i.e.
-+ template <class T> friend A<T>::f();
-+ Look through it in that case. */
-+ if (TREE_CODE (fn) == TEMPLATE_DECL
-+ && !PRIMARY_TEMPLATE_P (fn))
-+ fn = DECL_TEMPLATE_RESULT (fn);
- /* Check to see that the declaration is really present, and,
- possibly obtain an improved declaration. */
-- tree fn = check_classfn (context,
-- new_friend, NULL_TREE);
-+ fn = check_classfn (context, fn, NULL_TREE);
-
- if (fn)
- new_friend = fn;
-@@ -14488,6 +14500,16 @@
- case PARM_DECL:
- {
- tree r = tsubst_copy (t, args, complain, in_decl);
-+ if (TREE_CODE (r) == VAR_DECL
-+ && !processing_template_decl
-+ && !cp_unevaluated_operand
-+ && DECL_THREAD_LOCAL_P (r))
-+ {
-+ if (tree wrap = get_tls_wrapper_fn (r))
-+ /* Replace an evaluated use of the thread_local variable with
-+ a call to its wrapper. */
-+ r = build_cxx_call (wrap, 0, NULL, tf_warning_or_error);
-+ }
-
- if (TREE_CODE (TREE_TYPE (t)) != REFERENCE_TYPE)
- /* If the original type was a reference, we'll be wrapped in
-@@ -14934,7 +14956,7 @@
- continue;
- for (packs = PACK_EXPANSION_PARAMETER_PACKS (type);
- packs; packs = TREE_CHAIN (packs))
-- if (TREE_VALUE (packs) == parm)
-+ if (template_args_equal (TREE_VALUE (packs), parm))
- {
- /* The template parameter pack is used in a function parameter
- pack. If this is the end of the parameter list, the
-@@ -15502,8 +15524,9 @@
- maybe_adjust_types_for_deduction (strict, &parm, &arg, arg_expr);
- }
- else
-- gcc_assert ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
-- == (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL));
-+ if ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
-+ != (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL))
-+ return unify_template_argument_mismatch (explain_p, parm, arg);
-
- /* For deduction from an init-list we need the actual list. */
- if (arg_expr && BRACE_ENCLOSED_INITIALIZER_P (arg_expr))
-@@ -19804,6 +19827,8 @@
- {
- unsigned ix;
- tree val;
-+ if (dependent_type_p (TREE_TYPE (expression)))
-+ return true;
- FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (expression), ix, val)
- if (value_dependent_expression_p (val))
- return true;
-@@ -20009,7 +20034,12 @@
- return true;
-
- if (BASELINK_P (expression))
-- expression = BASELINK_FUNCTIONS (expression);
-+ {
-+ if (BASELINK_OPTYPE (expression)
-+ && dependent_type_p (BASELINK_OPTYPE (expression)))
-+ return true;
-+ expression = BASELINK_FUNCTIONS (expression);
-+ }
-
- if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
- {
-Index: gcc/cp/semantics.c
-===================================================================
---- gcc/cp/semantics.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/cp/semantics.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -2735,8 +2735,10 @@
- /*friend_p=*/0);
- }
- }
-- /* Enter the DECL into the scope of the class. */
-- else if (pushdecl_class_level (decl))
-+ /* Enter the DECL into the scope of the class, if the class
-+ isn't a closure (whose fields are supposed to be unnamed). */
-+ else if (CLASSTYPE_LAMBDA_EXPR (current_class_type)
-+ || pushdecl_class_level (decl))
- {
- if (TREE_CODE (decl) == USING_DECL)
- {
-@@ -3108,7 +3110,7 @@
- && DECL_CONTEXT (decl) == NULL_TREE
- && !cp_unevaluated_operand)
- {
-- error ("use of parameter %qD outside function body", decl);
-+ *error_msg = "use of parameter outside function body";
- return error_mark_node;
- }
- }
-@@ -3343,6 +3345,7 @@
- tree wrap;
- if (TREE_CODE (decl) == VAR_DECL
- && !cp_unevaluated_operand
-+ && !processing_template_decl
- && DECL_THREAD_LOCAL_P (decl)
- && (wrap = get_tls_wrapper_fn (decl)))
- {
-@@ -7296,7 +7299,9 @@
- constructor_elt *inner = base_field_constructor_elt (n, ce->index);
- inner->value = elt;
- }
-- else if (ce->index && TREE_CODE (ce->index) == NOP_EXPR)
-+ else if (ce->index
-+ && (TREE_CODE (ce->index) == NOP_EXPR
-+ || TREE_CODE (ce->index) == POINTER_PLUS_EXPR))
- {
- /* This is an initializer for an empty base; now that we've
- checked that it's constant, we can ignore it. */
-Index: gcc/cp/parser.c
-===================================================================
---- gcc/cp/parser.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/cp/parser.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -12831,7 +12831,12 @@
- the effort required to do the parse, nor will we issue duplicate
- error messages about problems during instantiation of the
- template. */
-- if (start_of_id)
-+ if (start_of_id
-+ /* Don't do this if we had a parse error in a declarator; re-parsing
-+ might succeed if a name changes meaning (60361). */
-+ && !(cp_parser_error_occurred (parser)
-+ && cp_parser_parsing_tentatively (parser)
-+ && parser->in_declarator_p))
- {
- cp_token *token = cp_lexer_token_at (parser->lexer, start_of_id);
-
-@@ -23774,8 +23779,6 @@
- static void
- cp_parser_abort_tentative_parse (cp_parser* parser)
- {
-- gcc_assert (parser->context->status != CP_PARSER_STATUS_KIND_COMMITTED
-- || errorcount > 0);
- cp_parser_simulate_error (parser);
- /* Now, pretend that we want to see if the construct was
- successfully parsed. */
-Index: gcc/cp/call.c
-===================================================================
---- gcc/cp/call.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/cp/call.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1464,7 +1464,7 @@
- {
- maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
- conv = implicit_conversion (to, from, expr, c_cast_p,
-- flags, complain);
-+ flags|LOOKUP_NO_TEMP_BIND, complain);
- if (!CLASS_TYPE_P (to)
- && CONSTRUCTOR_NELTS (expr) == 1)
- {
-@@ -1624,9 +1624,9 @@
-
- /* [dcl.init.ref]
-
-- Otherwise, the reference shall be to a non-volatile const type.
--
-- Under C++0x, [8.5.3/5 dcl.init.ref] it may also be an rvalue reference */
-+ Otherwise, the reference shall be an lvalue reference to a
-+ non-volatile const type, or the reference shall be an rvalue
-+ reference. */
- if (!CP_TYPE_CONST_NON_VOLATILE_P (to) && !TYPE_REF_IS_RVALUE (rto))
- return NULL;
-
-@@ -1664,7 +1664,16 @@
- /* This reference binding, unlike those above, requires the
- creation of a temporary. */
- conv->need_temporary_p = true;
-- conv->rvaluedness_matches_p = TYPE_REF_IS_RVALUE (rto);
-+ if (TYPE_REF_IS_RVALUE (rto))
-+ {
-+ conv->rvaluedness_matches_p = 1;
-+ /* In the second case, if the reference is an rvalue reference and
-+ the second standard conversion sequence of the user-defined
-+ conversion sequence includes an lvalue-to-rvalue conversion, the
-+ program is ill-formed. */
-+ if (conv->user_conv_p && next_conversion (conv)->kind == ck_rvalue)
-+ conv->bad_p = 1;
-+ }
-
- return conv;
- }
-@@ -5811,7 +5820,7 @@
- && convs->kind != ck_list
- && convs->kind != ck_ambig
- && (convs->kind != ck_ref_bind
-- || convs->user_conv_p)
-+ || (convs->user_conv_p && next_conversion (convs)->bad_p))
- && (convs->kind != ck_rvalue
- || SCALAR_TYPE_P (totype))
- && convs->kind != ck_base)
-@@ -6110,7 +6119,8 @@
- if (convs->bad_p && !next_conversion (convs)->bad_p)
- {
- gcc_assert (TYPE_REF_IS_RVALUE (ref_type)
-- && real_lvalue_p (expr));
-+ && (real_lvalue_p (expr)
-+ || next_conversion(convs)->kind == ck_rvalue));
-
- error_at (loc, "cannot bind %qT lvalue to %qT",
- TREE_TYPE (expr), totype);
-Index: gcc/cp/friend.c
-===================================================================
---- gcc/cp/friend.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/cp/friend.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -502,7 +502,13 @@
- ? current_template_parms
- : NULL_TREE);
-
-- if (template_member_p && decl && TREE_CODE (decl) == FUNCTION_DECL)
-+ if ((template_member_p
-+ /* Always pull out the TEMPLATE_DECL if we have a friend
-+ template in a class template so that it gets tsubsted
-+ properly later on (59956). tsubst_friend_function knows
-+ how to tell this apart from a member template. */
-+ || (class_template_depth && friend_depth))
-+ && decl && TREE_CODE (decl) == FUNCTION_DECL)
- decl = DECL_TI_TEMPLATE (decl);
-
- if (decl)
-Index: gcc/haifa-sched.c
-===================================================================
---- gcc/haifa-sched.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/haifa-sched.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -2931,7 +2931,7 @@
- {
- advance_state (curr_state);
- if (sched_verbose >= 6)
-- fprintf (sched_dump, ";;\tAdvanced a state.\n");
-+ fprintf (sched_dump, ";;\tAdvance the current state.\n");
- }
-
- /* Update register pressure after scheduling INSN. */
-@@ -5964,6 +5964,7 @@
- modulo_insns_scheduled = 0;
-
- ls.modulo_epilogue = false;
-+ ls.first_cycle_insn_p = true;
-
- /* Loop until all the insns in BB are scheduled. */
- while ((*current_sched_info->schedule_more_p) ())
-@@ -6034,7 +6035,6 @@
- if (must_backtrack)
- goto do_backtrack;
-
-- ls.first_cycle_insn_p = true;
- ls.shadows_only_p = false;
- cycle_issued_insns = 0;
- ls.can_issue_more = issue_rate;
-@@ -6321,11 +6321,13 @@
- break;
- }
- }
-+ ls.first_cycle_insn_p = true;
- }
- if (ls.modulo_epilogue)
- success = true;
- end_schedule:
-- advance_one_cycle ();
-+ if (!ls.first_cycle_insn_p)
-+ advance_one_cycle ();
- perform_replacements_new_cycle ();
- if (modulo_ii > 0)
- {
-Index: gcc/double-int.c
-===================================================================
---- gcc/double-int.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/double-int.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -616,7 +616,7 @@
- == (unsigned HOST_WIDE_INT) htwice)
- && (labs_den <= ltwice)))
- {
-- if (*hquo < 0)
-+ if (quo_neg)
- /* quo = quo - 1; */
- add_double (*lquo, *hquo,
- (HOST_WIDE_INT) -1, (HOST_WIDE_INT) -1, lquo, hquo);
-Index: gcc/tree-ssa-math-opts.c
-===================================================================
---- gcc/tree-ssa-math-opts.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/tree-ssa-math-opts.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1537,7 +1537,7 @@
-
- struct symbolic_number {
- unsigned HOST_WIDEST_INT n;
-- int size;
-+ tree type;
- };
-
- /* Perform a SHIFT or ROTATE operation by COUNT bits on symbolic
-@@ -1549,13 +1549,15 @@
- struct symbolic_number *n,
- int count)
- {
-+ int bitsize = TYPE_PRECISION (n->type);
-+
- if (count % 8 != 0)
- return false;
-
- /* Zero out the extra bits of N in order to avoid them being shifted
- into the significant bits. */
-- if (n->size < (int)sizeof (HOST_WIDEST_INT))
-- n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
-+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
-+ n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
-
- switch (code)
- {
-@@ -1563,20 +1565,24 @@
- n->n <<= count;
- break;
- case RSHIFT_EXPR:
-+ /* Arithmetic shift of signed type: result is dependent on the value. */
-+ if (!TYPE_UNSIGNED (n->type)
-+ && (n->n & ((unsigned HOST_WIDEST_INT) 0xff << (bitsize - 8))))
-+ return false;
- n->n >>= count;
- break;
- case LROTATE_EXPR:
-- n->n = (n->n << count) | (n->n >> ((n->size * BITS_PER_UNIT) - count));
-+ n->n = (n->n << count) | (n->n >> (bitsize - count));
- break;
- case RROTATE_EXPR:
-- n->n = (n->n >> count) | (n->n << ((n->size * BITS_PER_UNIT) - count));
-+ n->n = (n->n >> count) | (n->n << (bitsize - count));
- break;
- default:
- return false;
- }
- /* Zero unused bits for size. */
-- if (n->size < (int)sizeof (HOST_WIDEST_INT))
-- n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
-+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
-+ n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
- return true;
- }
-
-@@ -1593,7 +1599,7 @@
- if (TREE_CODE (lhs_type) != INTEGER_TYPE)
- return false;
-
-- if (TYPE_PRECISION (lhs_type) != n->size * BITS_PER_UNIT)
-+ if (TYPE_PRECISION (lhs_type) != TYPE_PRECISION (n->type))
- return false;
-
- return true;
-@@ -1650,20 +1656,25 @@
- to initialize the symbolic number. */
- if (!source_expr1)
- {
-+ int size;
-+
- /* Set up the symbolic number N by setting each byte to a
- value between 1 and the byte size of rhs1. The highest
- order byte is set to n->size and the lowest order
- byte to 1. */
-- n->size = TYPE_PRECISION (TREE_TYPE (rhs1));
-- if (n->size % BITS_PER_UNIT != 0)
-+ n->type = TREE_TYPE (rhs1);
-+ size = TYPE_PRECISION (n->type);
-+ if (size % BITS_PER_UNIT != 0)
- return NULL_TREE;
-- n->size /= BITS_PER_UNIT;
-+ if (size > HOST_BITS_PER_WIDEST_INT)
-+ return NULL_TREE;
-+ size /= BITS_PER_UNIT;
- n->n = (sizeof (HOST_WIDEST_INT) < 8 ? 0 :
- (unsigned HOST_WIDEST_INT)0x08070605 << 32 | 0x04030201);
-
-- if (n->size < (int)sizeof (HOST_WIDEST_INT))
-+ if (size < (int)sizeof (HOST_WIDEST_INT))
- n->n &= ((unsigned HOST_WIDEST_INT)1 <<
-- (n->size * BITS_PER_UNIT)) - 1;
-+ (size * BITS_PER_UNIT)) - 1;
-
- source_expr1 = rhs1;
- }
-@@ -1672,12 +1683,12 @@
- {
- case BIT_AND_EXPR:
- {
-- int i;
-+ int i, size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
- unsigned HOST_WIDEST_INT val = widest_int_cst_value (rhs2);
- unsigned HOST_WIDEST_INT tmp = val;
-
- /* Only constants masking full bytes are allowed. */
-- for (i = 0; i < n->size; i++, tmp >>= BITS_PER_UNIT)
-+ for (i = 0; i < size; i++, tmp >>= BITS_PER_UNIT)
- if ((tmp & 0xff) != 0 && (tmp & 0xff) != 0xff)
- return NULL_TREE;
-
-@@ -1693,12 +1704,24 @@
- break;
- CASE_CONVERT:
- {
-- int type_size;
-+ int type_size, old_type_size;
-+ tree type;
-
-- type_size = TYPE_PRECISION (gimple_expr_type (stmt));
-+ type = gimple_expr_type (stmt);
-+ type_size = TYPE_PRECISION (type);
- if (type_size % BITS_PER_UNIT != 0)
- return NULL_TREE;
-+ if (type_size > (int) HOST_BITS_PER_WIDEST_INT)
-+ return NULL_TREE;
-
-+ /* Sign extension: result is dependent on the value. */
-+ old_type_size = TYPE_PRECISION (n->type);
-+ if (!TYPE_UNSIGNED (n->type)
-+ && type_size > old_type_size
-+ && n->n &
-+ ((unsigned HOST_WIDEST_INT) 0xff << (old_type_size - 8)))
-+ return NULL_TREE;
-+
- if (type_size / BITS_PER_UNIT < (int)(sizeof (HOST_WIDEST_INT)))
- {
- /* If STMT casts to a smaller type mask out the bits not
-@@ -1705,7 +1728,7 @@
- belonging to the target type. */
- n->n &= ((unsigned HOST_WIDEST_INT)1 << type_size) - 1;
- }
-- n->size = type_size / BITS_PER_UNIT;
-+ n->type = type;
- }
- break;
- default:
-@@ -1718,7 +1741,7 @@
-
- if (rhs_class == GIMPLE_BINARY_RHS)
- {
-- int i;
-+ int i, size;
- struct symbolic_number n1, n2;
- unsigned HOST_WIDEST_INT mask;
- tree source_expr2;
-@@ -1742,11 +1765,12 @@
- source_expr2 = find_bswap_1 (rhs2_stmt, &n2, limit - 1);
-
- if (source_expr1 != source_expr2
-- || n1.size != n2.size)
-+ || TYPE_PRECISION (n1.type) != TYPE_PRECISION (n2.type))
- return NULL_TREE;
-
-- n->size = n1.size;
-- for (i = 0, mask = 0xff; i < n->size; i++, mask <<= BITS_PER_UNIT)
-+ n->type = n1.type;
-+ size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
-+ for (i = 0, mask = 0xff; i < size; i++, mask <<= BITS_PER_UNIT)
- {
- unsigned HOST_WIDEST_INT masked1, masked2;
-
-@@ -1785,7 +1809,7 @@
-
- struct symbolic_number n;
- tree source_expr;
-- int limit;
-+ int limit, bitsize;
-
- /* The last parameter determines the depth search limit. It usually
- correlates directly to the number of bytes to be touched. We
-@@ -1800,13 +1824,14 @@
- return NULL_TREE;
-
- /* Zero out the extra bits of N and CMP. */
-- if (n.size < (int)sizeof (HOST_WIDEST_INT))
-+ bitsize = TYPE_PRECISION (n.type);
-+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
- {
- unsigned HOST_WIDEST_INT mask =
-- ((unsigned HOST_WIDEST_INT)1 << (n.size * BITS_PER_UNIT)) - 1;
-+ ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
-
- n.n &= mask;
-- cmp >>= (sizeof (HOST_WIDEST_INT) - n.size) * BITS_PER_UNIT;
-+ cmp >>= sizeof (HOST_WIDEST_INT) * BITS_PER_UNIT - bitsize;
- }
-
- /* A complete byte swap should make the symbolic number to start
-@@ -1828,7 +1853,7 @@
- bool changed = false;
- tree bswap16_type = NULL_TREE, bswap32_type = NULL_TREE, bswap64_type = NULL_TREE;
-
-- if (BITS_PER_UNIT != 8)
-+ if (BITS_PER_UNIT != 8 || CHAR_BIT != 8)
- return 0;
-
- if (sizeof (HOST_WIDEST_INT) < 8)
-Index: gcc/ifcvt.c
-===================================================================
---- gcc/ifcvt.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/ifcvt.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -294,6 +294,28 @@
-
- return (e) ? e->dest : NULL_BLOCK;
- }
-+
-+/* Return true if RTXs A and B can be safely interchanged. */
-+
-+static bool
-+rtx_interchangeable_p (const_rtx a, const_rtx b)
-+{
-+ if (!rtx_equal_p (a, b))
-+ return false;
-+
-+ if (GET_CODE (a) != MEM)
-+ return true;
-+
-+ /* A dead type-unsafe memory reference is legal, but a live type-unsafe memory
-+ reference is not. Interchanging a dead type-unsafe memory reference with
-+ a live type-safe one creates a live type-unsafe memory reference, in other
-+ words, it makes the program illegal.
-+ We check here conservatively whether the two memory references have equal
-+ memory attributes. */
-+
-+ return mem_attrs_eq_p (get_mem_attrs (a), get_mem_attrs (b));
-+}
-+
- \f
- /* Go through a bunch of insns, converting them to conditional
- execution format if possible. Return TRUE if all of the non-note
-@@ -1014,6 +1036,9 @@
- || (rtx_equal_p (if_info->a, XEXP (cond, 1))
- && rtx_equal_p (if_info->b, XEXP (cond, 0))))
- {
-+ if (!rtx_interchangeable_p (if_info->a, if_info->b))
-+ return FALSE;
-+
- y = (code == EQ) ? if_info->a : if_info->b;
-
- /* Avoid generating the move if the source is the destination. */
-@@ -2483,7 +2508,7 @@
- if (! insn_b
- || insn_b != last_active_insn (else_bb, FALSE)
- || (set_b = single_set (insn_b)) == NULL_RTX
-- || ! rtx_equal_p (x, SET_DEST (set_b)))
-+ || ! rtx_interchangeable_p (x, SET_DEST (set_b)))
- return FALSE;
- }
- else
-@@ -2496,7 +2521,7 @@
- || BLOCK_FOR_INSN (insn_b) != BLOCK_FOR_INSN (if_info->cond_earliest)
- || !NONJUMP_INSN_P (insn_b)
- || (set_b = single_set (insn_b)) == NULL_RTX
-- || ! rtx_equal_p (x, SET_DEST (set_b))
-+ || ! rtx_interchangeable_p (x, SET_DEST (set_b))
- || ! noce_operand_ok (SET_SRC (set_b))
- || reg_overlap_mentioned_p (x, SET_SRC (set_b))
- || modified_between_p (SET_SRC (set_b), insn_b, jump)
-@@ -2562,7 +2587,7 @@
-
- /* Look and see if A and B are really the same. Avoid creating silly
- cmove constructs that no one will fix up later. */
-- if (rtx_equal_p (a, b))
-+ if (rtx_interchangeable_p (a, b))
- {
- /* If we have an INSN_B, we don't have to create any new rtl. Just
- move the instruction that we already have. If we don't have an
-@@ -4246,6 +4271,9 @@
- old_dest = JUMP_LABEL (jump);
- if (other_bb != new_dest)
- {
-+ if (!any_condjump_p (jump))
-+ goto cancel;
-+
- if (JUMP_P (BB_END (dest_edge->src)))
- new_dest_label = JUMP_LABEL (BB_END (dest_edge->src));
- else if (new_dest == EXIT_BLOCK_PTR)
-Index: gcc/dwarf2out.c
-===================================================================
---- gcc/dwarf2out.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/dwarf2out.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -12234,7 +12234,7 @@
- op1 = mem_loc_descriptor (XEXP (rtl, 1), mode, mem_mode,
- VAR_INIT_STATUS_INITIALIZED);
- if (op1 == 0)
-- break;
-+ return NULL;
- add_loc_descr (&mem_loc_result, op1);
- add_loc_descr (&mem_loc_result,
- new_loc_descr (DW_OP_plus, 0, 0));
-@@ -13882,6 +13882,10 @@
- have_address = 1;
- break;
-
-+ case TARGET_MEM_REF:
-+ case SSA_NAME:
-+ return NULL;
-+
- case COMPOUND_EXPR:
- return loc_list_from_tree (TREE_OPERAND (loc, 1), want_address);
-
-Index: gcc/expr.c
-===================================================================
---- gcc/expr.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/expr.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -10603,7 +10603,7 @@
- || !host_integerp (TREE_OPERAND (offset, 1), 1)
- || compare_tree_int (TREE_OPERAND (offset, 1),
- BIGGEST_ALIGNMENT / BITS_PER_UNIT) <= 0
-- || !exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
-+ || exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
- return 0;
-
- /* Look at the first operand of BIT_AND_EXPR and strip any conversion.
-Index: gcc/ada/socket.c
-===================================================================
---- gcc/ada/socket.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/ada/socket.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -212,7 +212,7 @@
- struct hostent *rh;
- int ri;
-
--#if defined(__linux__) || defined(__GLIBC__)
-+#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
- (void) gethostbyname_r (name, ret, buf, buflen, &rh, h_errnop);
- #else
- rh = gethostbyname_r (name, ret, buf, buflen, h_errnop);
-Index: gcc/ada/uintp.adb
-===================================================================
---- gcc/ada/uintp.adb (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/ada/uintp.adb (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -171,22 +171,6 @@
- -- If Discard_Quotient is True, Quotient is set to No_Uint
- -- If Discard_Remainder is True, Remainder is set to No_Uint
-
-- function Vector_To_Uint
-- (In_Vec : UI_Vector;
-- Negative : Boolean) return Uint;
-- -- Functions that calculate values in UI_Vectors, call this function to
-- -- create and return the Uint value. In_Vec contains the multiple precision
-- -- (Base) representation of a non-negative value. Leading zeroes are
-- -- permitted. Negative is set if the desired result is the negative of the
-- -- given value. The result will be either the appropriate directly
-- -- represented value, or a table entry in the proper canonical format is
-- -- created and returned.
-- --
-- -- Note that Init_Operand puts a signed value in the result vector, but
-- -- Vector_To_Uint is always presented with a non-negative value. The
-- -- processing of signs is something that is done by the caller before
-- -- calling Vector_To_Uint.
--
- ------------
- -- Direct --
- ------------
-Index: gcc/ada/uintp.ads
-===================================================================
---- gcc/ada/uintp.ads (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/ada/uintp.ads (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -90,6 +90,18 @@
- Uint_Minus_80 : constant Uint;
- Uint_Minus_128 : constant Uint;
-
-+ type UI_Vector is array (Pos range <>) of Int;
-+ -- Vector containing the integer values of a Uint value
-+
-+ -- Note: An earlier version of this package used pointers of arrays of Ints
-+ -- (dynamically allocated) for the Uint type. The change leads to a few
-+ -- less natural idioms used throughout this code, but eliminates all uses
-+ -- of the heap except for the table package itself. For example, Uint
-+ -- parameters are often converted to UI_Vectors for internal manipulation.
-+ -- This is done by creating the local UI_Vector using the function N_Digits
-+ -- on the Uint to find the size needed for the vector, and then calling
-+ -- Init_Operand to copy the values out of the table into the vector.
-+
- -----------------
- -- Subprograms --
- -----------------
-@@ -252,6 +264,22 @@
- -- function is used for capacity checks, and it can be one bit off
- -- without affecting its usage.
-
-+ function Vector_To_Uint
-+ (In_Vec : UI_Vector;
-+ Negative : Boolean) return Uint;
-+ -- Functions that calculate values in UI_Vectors, call this function to
-+ -- create and return the Uint value. In_Vec contains the multiple precision
-+ -- (Base) representation of a non-negative value. Leading zeroes are
-+ -- permitted. Negative is set if the desired result is the negative of the
-+ -- given value. The result will be either the appropriate directly
-+ -- represented value, or a table entry in the proper canonical format is
-+ -- created and returned.
-+ --
-+ -- Note that Init_Operand puts a signed value in the result vector, but
-+ -- Vector_To_Uint is always presented with a non-negative value. The
-+ -- processing of signs is something that is done by the caller before
-+ -- calling Vector_To_Uint.
-+
- ---------------------
- -- Output Routines --
- ---------------------
-@@ -494,18 +522,6 @@
- -- UI_Vector is defined for this purpose and some internal subprograms
- -- used for converting from one to the other are defined.
-
-- type UI_Vector is array (Pos range <>) of Int;
-- -- Vector containing the integer values of a Uint value
--
-- -- Note: An earlier version of this package used pointers of arrays of Ints
-- -- (dynamically allocated) for the Uint type. The change leads to a few
-- -- less natural idioms used throughout this code, but eliminates all uses
-- -- of the heap except for the table package itself. For example, Uint
-- -- parameters are often converted to UI_Vectors for internal manipulation.
-- -- This is done by creating the local UI_Vector using the function N_Digits
-- -- on the Uint to find the size needed for the vector, and then calling
-- -- Init_Operand to copy the values out of the table into the vector.
--
- type Uint_Entry is record
- Length : Pos;
- -- Length of entry in Udigits table in digits (i.e. in words)
-Index: gcc/ada/ChangeLog
-===================================================================
---- gcc/ada/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/ada/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,3 +1,20 @@
-+2014-10-13 Eric Botcazou <ebotcazou@adacore.com>
-+ Alan Modra <amodra@gmail.com>
-+
-+ PR ada/63225
-+ * uintp.adb (Vector_To_Uint): Move from here to...
-+ * uintp.ads (UI_Vector): Make public.
-+ (Vector_To_Uint): ...here.
-+
-+2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
-+
-+ * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
-+ * gsocket.h Add include of <unistd.h> on RTEMS.
-+
-+2014-08-11 Joel Sherrill <joel.sherrill@oarcorp.com>
-+
-+ * s-osinte-rtems.adb: Correct formatting of line in license block.
-+
- 2014-05-22 Release Manager
-
- * GCC 4.8.3 released.
-Index: gcc/ada/s-osinte-rtems.adb
-===================================================================
---- gcc/ada/s-osinte-rtems.adb (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/ada/s-osinte-rtems.adb (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -22,7 +22,7 @@
- -- You should have received a copy of the GNU General Public License and --
- -- a copy of the GCC Runtime Library Exception along with this program; --
- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
---- <http://www.gnu.org/licenses/>.
-+-- <http://www.gnu.org/licenses/>. --
- -- --
- -- GNARL was developed by the GNARL team at Florida State University. It is --
- -- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
-Index: gcc/ada/gsocket.h
-===================================================================
---- gcc/ada/gsocket.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/ada/gsocket.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -183,6 +183,11 @@
- #include <sys/time.h>
- #endif
-
-+#if defined(__rtems__)
-+#include <unistd.h>
-+/* Required, for read(), write(), and close() */
-+#endif
-+
- /*
- * RTEMS has these .h files but not until you have built and installed RTEMS.
- * When building a C/C++ toolset, you also build the newlib C library, so the
-Index: gcc/tree-ssa-ifcombine.c
-===================================================================
---- gcc/tree-ssa-ifcombine.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/tree-ssa-ifcombine.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -105,7 +105,11 @@
- {
- gimple stmt = gsi_stmt (gsi);
-
-+ if (is_gimple_debug (stmt))
-+ continue;
-+
- if (gimple_has_side_effects (stmt)
-+ || gimple_could_trap_p (stmt)
- || gimple_vuse (stmt))
- return false;
- }
-@@ -197,7 +201,8 @@
- while (is_gimple_assign (stmt)
- && ((CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
- && (TYPE_PRECISION (TREE_TYPE (gimple_assign_lhs (stmt)))
-- <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt)))))
-+ <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt))))
-+ && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
- || gimple_assign_ssa_name_copy_p (stmt)))
- stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));
-
-Index: gcc/sel-sched-ir.c
-===================================================================
---- gcc/sel-sched-ir.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/sel-sched-ir.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -162,7 +162,7 @@
- static void free_av_set (basic_block);
- static void invalidate_av_set (basic_block);
- static void extend_insn_data (void);
--static void sel_init_new_insn (insn_t, int);
-+static void sel_init_new_insn (insn_t, int, int = -1);
- static void finish_insns (void);
- \f
- /* Various list functions. */
-@@ -4011,9 +4011,10 @@
- return seqno;
- }
-
--/* Compute seqno for INSN by its preds or succs. */
-+/* Compute seqno for INSN by its preds or succs. Use OLD_SEQNO to compute
-+ seqno in corner cases. */
- static int
--get_seqno_for_a_jump (insn_t insn)
-+get_seqno_for_a_jump (insn_t insn, int old_seqno)
- {
- int seqno;
-
-@@ -4069,8 +4070,16 @@
- if (seqno < 0)
- seqno = get_seqno_by_succs (insn);
-
-+ if (seqno < 0)
-+ {
-+ /* The only case where this could be here legally is that the only
-+ unscheduled insn was a conditional jump that got removed and turned
-+ into this unconditional one. Initialize from the old seqno
-+ of that jump passed down to here. */
-+ seqno = old_seqno;
-+ }
-+
- gcc_assert (seqno >= 0);
--
- return seqno;
- }
-
-@@ -4250,22 +4259,24 @@
- }
-
- /* This is used to initialize spurious jumps generated by
-- sel_redirect_edge (). */
-+ sel_redirect_edge (). OLD_SEQNO is used for initializing seqnos
-+ in corner cases within get_seqno_for_a_jump. */
- static void
--init_simplejump_data (insn_t insn)
-+init_simplejump_data (insn_t insn, int old_seqno)
- {
- init_expr (INSN_EXPR (insn), vinsn_create (insn, false), 0,
- REG_BR_PROB_BASE, 0, 0, 0, 0, 0, 0,
- vNULL, true, false, false,
- false, true);
-- INSN_SEQNO (insn) = get_seqno_for_a_jump (insn);
-+ INSN_SEQNO (insn) = get_seqno_for_a_jump (insn, old_seqno);
- init_first_time_insn_data (insn);
- }
-
- /* Perform deferred initialization of insns. This is used to process
-- a new jump that may be created by redirect_edge. */
--void
--sel_init_new_insn (insn_t insn, int flags)
-+ a new jump that may be created by redirect_edge. OLD_SEQNO is used
-+ for initializing simplejumps in init_simplejump_data. */
-+static void
-+sel_init_new_insn (insn_t insn, int flags, int old_seqno)
- {
- /* We create data structures for bb when the first insn is emitted in it. */
- if (INSN_P (insn)
-@@ -4292,7 +4303,7 @@
- if (flags & INSN_INIT_TODO_SIMPLEJUMP)
- {
- extend_insn_data ();
-- init_simplejump_data (insn);
-+ init_simplejump_data (insn, old_seqno);
- }
-
- gcc_assert (CONTAINING_RGN (BLOCK_NUM (insn))
-@@ -5578,8 +5589,7 @@
- }
-
- /* A wrapper for redirect_edge_and_branch_force, which also initializes
-- data structures for possibly created bb and insns. Returns the newly
-- added bb or NULL, when a bb was not needed. */
-+ data structures for possibly created bb and insns. */
- void
- sel_redirect_edge_and_branch_force (edge e, basic_block to)
- {
-@@ -5586,6 +5596,7 @@
- basic_block jump_bb, src, orig_dest = e->dest;
- int prev_max_uid;
- rtx jump;
-+ int old_seqno = -1;
-
- /* This function is now used only for bookkeeping code creation, where
- we'll never get the single pred of orig_dest block and thus will not
-@@ -5594,8 +5605,13 @@
- && !single_pred_p (orig_dest));
- src = e->src;
- prev_max_uid = get_max_uid ();
-+ /* Compute and pass old_seqno down to sel_init_new_insn only for the case
-+ when the conditional jump being redirected may become unconditional. */
-+ if (any_condjump_p (BB_END (src))
-+ && INSN_SEQNO (BB_END (src)) >= 0)
-+ old_seqno = INSN_SEQNO (BB_END (src));
-+
- jump_bb = redirect_edge_and_branch_force (e, to);
--
- if (jump_bb != NULL)
- sel_add_bb (jump_bb);
-
-@@ -5607,7 +5623,8 @@
-
- jump = find_new_jump (src, jump_bb, prev_max_uid);
- if (jump)
-- sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
-+ sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP,
-+ old_seqno);
- set_immediate_dominator (CDI_DOMINATORS, to,
- recompute_dominator (CDI_DOMINATORS, to));
- set_immediate_dominator (CDI_DOMINATORS, orig_dest,
-@@ -5626,6 +5643,7 @@
- edge redirected;
- bool recompute_toporder_p = false;
- bool maybe_unreachable = single_pred_p (orig_dest);
-+ int old_seqno = -1;
-
- latch_edge_p = (pipelining_p
- && current_loop_nest
-@@ -5634,6 +5652,12 @@
- src = e->src;
- prev_max_uid = get_max_uid ();
-
-+ /* Compute and pass old_seqno down to sel_init_new_insn only for the case
-+ when the conditional jump being redirected may become unconditional. */
-+ if (any_condjump_p (BB_END (src))
-+ && INSN_SEQNO (BB_END (src)) >= 0)
-+ old_seqno = INSN_SEQNO (BB_END (src));
-+
- redirected = redirect_edge_and_branch (e, to);
-
- gcc_assert (redirected && !last_added_blocks.exists ());
-@@ -5654,7 +5678,7 @@
-
- jump = find_new_jump (src, NULL, prev_max_uid);
- if (jump)
-- sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
-+ sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP, old_seqno);
-
- /* Only update dominator info when we don't have unreachable blocks.
- Otherwise we'll update in maybe_tidy_empty_bb. */
-Index: gcc/fortran/interface.c
-===================================================================
---- gcc/fortran/interface.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/fortran/interface.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1923,7 +1923,7 @@
- /* F2008, 12.5.2.5; IR F08/0073. */
- if (formal->ts.type == BT_CLASS && actual->expr_type != EXPR_NULL
- && ((CLASS_DATA (formal)->attr.class_pointer
-- && !formal->attr.intent == INTENT_IN)
-+ && formal->attr.intent != INTENT_IN)
- || CLASS_DATA (formal)->attr.allocatable))
- {
- if (actual->ts.type != BT_CLASS)
-Index: gcc/fortran/trans-expr.c
-===================================================================
---- gcc/fortran/trans-expr.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/fortran/trans-expr.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -7096,7 +7096,7 @@
-
- res_desc = gfc_evaluate_now (desc, &se->pre);
- gfc_conv_descriptor_data_set (&se->pre, res_desc, null_pointer_node);
-- se->expr = gfc_build_addr_expr (TREE_TYPE (se->expr), res_desc);
-+ se->expr = gfc_build_addr_expr (NULL_TREE, res_desc);
-
- /* Free the lhs after the function call and copy the result data to
- the lhs descriptor. */
-Index: gcc/fortran/decl.c
-===================================================================
---- gcc/fortran/decl.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/fortran/decl.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1996,6 +1996,13 @@
- if (gfc_notify_std (GFC_STD_GNU, "Old-style "
- "initialization at %C") == FAILURE)
- return MATCH_ERROR;
-+ else if (gfc_current_state () == COMP_DERIVED)
-+ {
-+ gfc_error ("Invalid old style initialization for derived type "
-+ "component at %C");
-+ m = MATCH_ERROR;
-+ goto cleanup;
-+ }
-
- return match_old_style_init (name);
- }
-Index: gcc/fortran/trans-openmp.c
-===================================================================
---- gcc/fortran/trans-openmp.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/fortran/trans-openmp.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -115,6 +115,16 @@
- if (GFC_DECL_RESULT (decl) && ! DECL_HAS_VALUE_EXPR_P (decl))
- return OMP_CLAUSE_DEFAULT_SHARED;
-
-+ /* These are either array or derived parameters, or vtables.
-+ In the former cases, the OpenMP standard doesn't consider them to be
-+ variables at all (they can't be redefined), but they can nevertheless appear
-+ in parallel/task regions and for default(none) purposes treat them as shared.
-+ For vtables likely the same handling is desirable. */
-+ if (TREE_CODE (decl) == VAR_DECL
-+ && TREE_READONLY (decl)
-+ && TREE_STATIC (decl))
-+ return OMP_CLAUSE_DEFAULT_SHARED;
-+
- return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
- }
-
-Index: gcc/fortran/ChangeLog
-===================================================================
---- gcc/fortran/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,3 +1,63 @@
-+2014-10-10 Jakub Jelinek <jakub@redhat.com>
-+
-+ PR fortran/59488
-+ * trans-openmp.c (gfc_omp_predetermined_sharing): Return
-+ OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
-+
-+2014-09-03 Marek Polacek <polacek@redhat.com>
-+
-+ Backport from trunk
-+ PR fortran/62270
-+ * interface.c (compare_parameter): Fix condition.
-+
-+2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
-+
-+ Backport from trunk
-+ PR fortran/62214
-+ * gfortran.dg/array_assignment_5.f90: New test.
-+
-+2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
-+
-+ Backport from trunk
-+ PR fortran/61999
-+ * simplify.c (gfc_simplify_dot_product): Convert types of
-+ vectors before calculating the result.
-+
-+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
-+
-+ Backport from trunk.
-+ PR fortran/61780
-+ * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
-+ that elements are skipped. This then correctly aligns 'reverse'
-+ with the scalarizer loops.
-+
-+2014-07-08 Paul Thomas <pault@gcc.gnu.org>
-+
-+ PR fortran/61459
-+ PR fortran/58883
-+ * trans-expr.c (fcncall_realloc_result): Use the natural type
-+ for the address expression of 'res_desc'.
-+
-+2014-07-02 Jakub Jelinek <jakub@redhat.com>
-+ Fritz Reese <Reese-Fritz@zai.com>
-+
-+ * decl.c (variable_decl): Reject old style initialization
-+ for derived type components.
-+
-+2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
-+
-+ Backport from trunk.
-+ PR fortran/45187
-+ * trans-decl.c (gfc_create_module_variable): Don't create
-+ Cray-pointee decls twice.
-+
-+2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
-+
-+ Backport from mainline
-+ PR libfortran/61310
-+ * intrinsics.texi (CTIME): Remove mention of locale-dependent
-+ behavior.
-+
- 2014-05-22 Release Manager
-
- * GCC 4.8.3 released.
-Index: gcc/fortran/frontend-passes.c
-===================================================================
---- gcc/fortran/frontend-passes.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/fortran/frontend-passes.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -874,6 +874,10 @@
- return true;
- break;
-
-+ case INTRINSIC_CONCAT:
-+ /* Do not do string concatenations. */
-+ break;
-+
- default:
- /* Binary operators. */
- if (optimize_binop_array_assignment (c, &e->value.op.op1, true))
-Index: gcc/fortran/trans-decl.c
-===================================================================
---- gcc/fortran/trans-decl.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/fortran/trans-decl.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -4084,8 +4084,8 @@
- }
-
- /* Don't generate variables from other modules. Variables from
-- COMMONs will already have been generated. */
-- if (sym->attr.use_assoc || sym->attr.in_common)
-+ COMMONs and Cray pointees will already have been generated. */
-+ if (sym->attr.use_assoc || sym->attr.in_common || sym->attr.cray_pointee)
- return;
-
- /* Equivalenced variables arrive here after creation. */
-Index: gcc/fortran/dependency.c
-===================================================================
---- gcc/fortran/dependency.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/fortran/dependency.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1779,6 +1779,7 @@
- gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
- {
- int n;
-+ int m;
- gfc_dependency fin_dep;
- gfc_dependency this_dep;
-
-@@ -1828,6 +1829,8 @@
- break;
- }
-
-+ /* Index for the reverse array. */
-+ m = -1;
- for (n=0; n < lref->u.ar.dimen; n++)
- {
- /* Assume dependency when either of array reference is vector
-@@ -1862,31 +1865,37 @@
- The ability to reverse or not is set by previous conditions
- in this dimension. If reversal is not activated, the
- value GFC_DEP_BACKWARD is reset to GFC_DEP_OVERLAP. */
-+
-+ /* Get the indexing right for the scalarizing loop. If this
-+ is an element, there is no corresponding loop. */
-+ if (lref->u.ar.dimen_type[n] != DIMEN_ELEMENT)
-+ m++;
-+
- if (rref->u.ar.dimen_type[n] == DIMEN_RANGE
- && lref->u.ar.dimen_type[n] == DIMEN_RANGE)
- {
- /* Set reverse if backward dependence and not inhibited. */
-- if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
-- reverse[n] = (this_dep == GFC_DEP_BACKWARD) ?
-- GFC_REVERSE_SET : reverse[n];
-+ if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
-+ reverse[m] = (this_dep == GFC_DEP_BACKWARD) ?
-+ GFC_REVERSE_SET : reverse[m];
-
- /* Set forward if forward dependence and not inhibited. */
-- if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
-- reverse[n] = (this_dep == GFC_DEP_FORWARD) ?
-- GFC_FORWARD_SET : reverse[n];
-+ if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
-+ reverse[m] = (this_dep == GFC_DEP_FORWARD) ?
-+ GFC_FORWARD_SET : reverse[m];
-
- /* Flag up overlap if dependence not compatible with
- the overall state of the expression. */
-- if (reverse && reverse[n] == GFC_REVERSE_SET
-+ if (reverse && reverse[m] == GFC_REVERSE_SET
- && this_dep == GFC_DEP_FORWARD)
- {
-- reverse[n] = GFC_INHIBIT_REVERSE;
-+ reverse[m] = GFC_INHIBIT_REVERSE;
- this_dep = GFC_DEP_OVERLAP;
- }
-- else if (reverse && reverse[n] == GFC_FORWARD_SET
-+ else if (reverse && reverse[m] == GFC_FORWARD_SET
- && this_dep == GFC_DEP_BACKWARD)
- {
-- reverse[n] = GFC_INHIBIT_REVERSE;
-+ reverse[m] = GFC_INHIBIT_REVERSE;
- this_dep = GFC_DEP_OVERLAP;
- }
-
-@@ -1893,7 +1902,7 @@
- /* If no intention of reversing or reversing is explicitly
- inhibited, convert backward dependence to overlap. */
- if ((reverse == NULL && this_dep == GFC_DEP_BACKWARD)
-- || (reverse != NULL && reverse[n] == GFC_INHIBIT_REVERSE))
-+ || (reverse != NULL && reverse[m] == GFC_INHIBIT_REVERSE))
- this_dep = GFC_DEP_OVERLAP;
- }
-
-Index: gcc/fortran/intrinsic.texi
-===================================================================
---- gcc/fortran/intrinsic.texi (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/fortran/intrinsic.texi (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -3343,10 +3343,8 @@
- @table @asis
- @item @emph{Description}:
- @code{CTIME} converts a system time value, such as returned by
--@code{TIME8}, to a string. Unless the application has called
--@code{setlocale}, the output will be in the default locale, of length
--24 and of the form @samp{Sat Aug 19 18:13:14 1995}. In other locales,
--a longer string may result.
-+@code{TIME8}, to a string. The output will be of the form @samp{Sat
-+Aug 19 18:13:14 1995}.
-
- This intrinsic is provided in both subroutine and function forms; however,
- only one form can be used in any given program unit.
-Index: gcc/fortran/simplify.c
-===================================================================
---- gcc/fortran/simplify.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/fortran/simplify.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1877,6 +1877,9 @@
- gfc_expr*
- gfc_simplify_dot_product (gfc_expr *vector_a, gfc_expr *vector_b)
- {
-+
-+ gfc_expr temp;
-+
- if (!is_constant_array_expr (vector_a)
- || !is_constant_array_expr (vector_b))
- return NULL;
-@@ -1883,8 +1886,14 @@
-
- gcc_assert (vector_a->rank == 1);
- gcc_assert (vector_b->rank == 1);
-- gcc_assert (gfc_compare_types (&vector_a->ts, &vector_b->ts));
-
-+ temp.expr_type = EXPR_OP;
-+ gfc_clear_ts (&temp.ts);
-+ temp.value.op.op = INTRINSIC_NONE;
-+ temp.value.op.op1 = vector_a;
-+ temp.value.op.op2 = vector_b;
-+ gfc_type_convert_binary (&temp, 1);
-+
- return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0, true);
- }
-
-Index: gcc/configure.ac
-===================================================================
---- gcc/configure.ac (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/configure.ac (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -3443,6 +3443,32 @@
- AC_MSG_RESULT($gcc_cv_lto_plugin)
-
- case "$target" in
-+
-+ aarch64*-*-*)
-+ # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
-+ AC_ARG_ENABLE(fix-cortex-a53-835769,
-+ [
-+AS_HELP_STRING([--enable-fix-cortex-a53-835769],
-+ [enable workaround for AArch64 Cortex-A53 erratum 835769 by default])
-+AS_HELP_STRING([--disable-fix-cortex-a53-835769],
-+ [disable workaround for AArch64 Cortex-A53 erratum 835769 by default])
-+ ],
-+ [
-+ case $enableval in
-+ yes)
-+ tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
-+ ;;
-+ no)
-+ ;;
-+ *)
-+ AC_MSG_ERROR(['$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
-+ Valid choices are 'yes' and 'no'.])
-+ ;;
-+
-+ esac
-+ ],
-+ [])
-+ ;;
- # All TARGET_ABI_OSF targets.
- alpha*-*-linux* | alpha*-*-*bsd*)
- gcc_GAS_CHECK_FEATURE([explicit relocation support],
-Index: gcc/function.c
-===================================================================
---- gcc/function.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/function.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1354,9 +1354,13 @@
- #define STACK_POINTER_OFFSET 0
- #endif
-
-+#if defined (REG_PARM_STACK_SPACE) && !defined (INCOMING_REG_PARM_STACK_SPACE)
-+#define INCOMING_REG_PARM_STACK_SPACE REG_PARM_STACK_SPACE
-+#endif
-+
- /* If not defined, pick an appropriate default for the offset of dynamically
- allocated memory depending on the value of ACCUMULATE_OUTGOING_ARGS,
-- REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE. */
-+ INCOMING_REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE. */
-
- #ifndef STACK_DYNAMIC_OFFSET
-
-@@ -1368,12 +1372,12 @@
- `crtl->outgoing_args_size'. Nevertheless, we must allow
- for it when allocating stack dynamic objects. */
-
--#if defined(REG_PARM_STACK_SPACE)
-+#ifdef INCOMING_REG_PARM_STACK_SPACE
- #define STACK_DYNAMIC_OFFSET(FNDECL) \
- ((ACCUMULATE_OUTGOING_ARGS \
- ? (crtl->outgoing_args_size \
- + (OUTGOING_REG_PARM_STACK_SPACE ((!(FNDECL) ? NULL_TREE : TREE_TYPE (FNDECL))) ? 0 \
-- : REG_PARM_STACK_SPACE (FNDECL))) \
-+ : INCOMING_REG_PARM_STACK_SPACE (FNDECL))) \
- : 0) + (STACK_POINTER_OFFSET))
- #else
- #define STACK_DYNAMIC_OFFSET(FNDECL) \
-@@ -2211,8 +2215,9 @@
- #endif
- all->args_so_far = pack_cumulative_args (&all->args_so_far_v);
-
--#ifdef REG_PARM_STACK_SPACE
-- all->reg_parm_stack_space = REG_PARM_STACK_SPACE (current_function_decl);
-+#ifdef INCOMING_REG_PARM_STACK_SPACE
-+ all->reg_parm_stack_space
-+ = INCOMING_REG_PARM_STACK_SPACE (current_function_decl);
- #endif
- }
-
-@@ -4518,6 +4523,7 @@
- /* ??? This could be set on a per-function basis by the front-end
- but is this worth the hassle? */
- cfun->can_throw_non_call_exceptions = flag_non_call_exceptions;
-+ cfun->can_delete_dead_exceptions = flag_delete_dead_exceptions;
- }
- }
-
-Index: gcc/tree-vectorizer.h
-===================================================================
---- gcc/tree-vectorizer.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/tree-vectorizer.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -324,9 +324,9 @@
- #define LOOP_VINFO_OPERANDS_SWAPPED(L) (L)->operands_swapped
-
- #define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \
--(L)->may_misalign_stmts.length () > 0
-+((L)->may_misalign_stmts.length () > 0)
- #define LOOP_REQUIRES_VERSIONING_FOR_ALIAS(L) \
--(L)->may_alias_ddrs.length () > 0
-+((L)->may_alias_ddrs.length () > 0)
-
- #define NITERS_KNOWN_P(n) \
- (host_integerp ((n),0) \
-@@ -931,7 +931,8 @@
- extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *);
- extern tree vect_create_data_ref_ptr (gimple, tree, struct loop *, tree,
- tree *, gimple_stmt_iterator *,
-- gimple *, bool, bool *);
-+ gimple *, bool, bool *,
-+ tree = NULL_TREE);
- extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree);
- extern tree vect_create_destination_var (tree, tree);
- extern bool vect_grouped_store_supported (tree, unsigned HOST_WIDE_INT);
-@@ -949,7 +950,8 @@
- extern int vect_get_place_in_interleaving_chain (gimple, gimple);
- extern tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *);
- extern tree vect_create_addr_base_for_vector_ref (gimple, gimple_seq *,
-- tree, struct loop *);
-+ tree, struct loop *,
-+ tree = NULL_TREE);
-
- /* In tree-vect-loop.c. */
- /* FORNOW: Used in tree-parloops.c. */
-Index: gcc/stor-layout.c
-===================================================================
---- gcc/stor-layout.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/stor-layout.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -234,12 +234,7 @@
- param_type = TREE_TYPE (ref);
- param_decl
- = build_decl (input_location, PARM_DECL, param_name, param_type);
-- if (targetm.calls.promote_prototypes (NULL_TREE)
-- && INTEGRAL_TYPE_P (param_type)
-- && TYPE_PRECISION (param_type) < TYPE_PRECISION (integer_type_node))
-- DECL_ARG_TYPE (param_decl) = integer_type_node;
-- else
-- DECL_ARG_TYPE (param_decl) = param_type;
-+ DECL_ARG_TYPE (param_decl) = param_type;
- DECL_ARTIFICIAL (param_decl) = 1;
- TREE_READONLY (param_decl) = 1;
-
-Index: gcc/tree-vect-loop.c
-===================================================================
---- gcc/tree-vect-loop.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/tree-vect-loop.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -2205,7 +2205,8 @@
- }
-
- def1 = SSA_NAME_DEF_STMT (op1);
-- if (flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
-+ if (gimple_bb (def1)
-+ && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
- && loop->inner
- && flow_bb_inside_loop_p (loop->inner, gimple_bb (def1))
- && is_gimple_assign (def1))
-Index: gcc/tree-vect-data-refs.c
-===================================================================
---- gcc/tree-vect-data-refs.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/tree-vect-data-refs.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -3553,6 +3553,9 @@
- is as follows:
- if LOOP=i_loop: &in (relative to i_loop)
- if LOOP=j_loop: &in+i*2B (relative to j_loop)
-+ BYTE_OFFSET: Optional, defaulted to NULL. If supplied, it is added to the
-+ initial address. Unlike OFFSET, which is number of elements to
-+ be added, BYTE_OFFSET is measured in bytes.
-
- Output:
- 1. Return an SSA_NAME whose value is the address of the memory location of
-@@ -3566,7 +3569,8 @@
- vect_create_addr_base_for_vector_ref (gimple stmt,
- gimple_seq *new_stmt_list,
- tree offset,
-- struct loop *loop)
-+ struct loop *loop,
-+ tree byte_offset)
- {
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
-@@ -3628,7 +3632,17 @@
- base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
- gimple_seq_add_seq (new_stmt_list, seq);
- }
-+ if (byte_offset)
-+ {
-+ tree tmp = create_tmp_var (sizetype, "offset");
-
-+ byte_offset = fold_convert (sizetype, byte_offset);
-+ base_offset = fold_build2 (PLUS_EXPR, sizetype,
-+ base_offset, byte_offset);
-+ base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
-+ gimple_seq_add_seq (new_stmt_list, seq);
-+ }
-+
- /* base + base_offset */
- if (loop_vinfo)
- addr_base = fold_build_pointer_plus (data_ref_base, base_offset);
-@@ -3692,6 +3706,10 @@
- 5. BSI: location where the new stmts are to be placed if there is no loop
- 6. ONLY_INIT: indicate if ap is to be updated in the loop, or remain
- pointing to the initial address.
-+ 7. BYTE_OFFSET (optional, defaults to NULL): a byte offset to be added
-+ to the initial address accessed by the data-ref in STMT. This is
-+ similar to OFFSET, but OFFSET is counted in elements, while BYTE_OFFSET
-+ in bytes.
-
- Output:
- 1. Declare a new ptr to vector_type, and have it point to the base of the
-@@ -3705,6 +3723,8 @@
- initial_address = &a[init];
- if OFFSET is supplied:
- initial_address = &a[init + OFFSET];
-+ if BYTE_OFFSET is supplied:
-+ initial_address = &a[init] + BYTE_OFFSET;
-
- Return the initial_address in INITIAL_ADDRESS.
-
-@@ -3722,7 +3742,7 @@
- vect_create_data_ref_ptr (gimple stmt, tree aggr_type, struct loop *at_loop,
- tree offset, tree *initial_address,
- gimple_stmt_iterator *gsi, gimple *ptr_incr,
-- bool only_init, bool *inv_p)
-+ bool only_init, bool *inv_p, tree byte_offset)
- {
- const char *base_name;
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
-@@ -3881,10 +3901,10 @@
- /* (2) Calculate the initial address of the aggregate-pointer, and set
- the aggregate-pointer to point to it before the loop. */
-
-- /* Create: (&(base[init_val+offset]) in the loop preheader. */
-+ /* Create: (&(base[init_val+offset]+byte_offset) in the loop preheader. */
-
- new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
-- offset, loop);
-+ offset, loop, byte_offset);
- if (new_stmt_list)
- {
- if (pe)
-Index: gcc/emit-rtl.c
-===================================================================
---- gcc/emit-rtl.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/emit-rtl.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -263,7 +263,7 @@
-
- /* Return true if the given memory attributes are equal. */
-
--static bool
-+bool
- mem_attrs_eq_p (const struct mem_attrs *p, const struct mem_attrs *q)
- {
- return (p->alias == q->alias
-Index: gcc/gimple-fold.c
-===================================================================
---- gcc/gimple-fold.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/gimple-fold.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -2955,8 +2955,8 @@
- result. */
- if (!AGGREGATE_TYPE_P (TREE_TYPE (ctor)) && !offset
- /* VIEW_CONVERT_EXPR is defined only for matching sizes. */
-- && operand_equal_p (TYPE_SIZE (type),
-- TYPE_SIZE (TREE_TYPE (ctor)), 0))
-+ && !compare_tree_int (TYPE_SIZE (type), size)
-+ && !compare_tree_int (TYPE_SIZE (TREE_TYPE (ctor)), size))
- {
- ret = canonicalize_constructor_val (unshare_expr (ctor), from_decl);
- ret = fold_unary (VIEW_CONVERT_EXPR, type, ret);
-Index: gcc/emit-rtl.h
-===================================================================
---- gcc/emit-rtl.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/emit-rtl.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -20,6 +20,9 @@
- #ifndef GCC_EMIT_RTL_H
- #define GCC_EMIT_RTL_H
-
-+/* Return whether two MEM_ATTRs are equal. */
-+bool mem_attrs_eq_p (const struct mem_attrs *, const struct mem_attrs *);
-+
- /* Set the alias set of MEM to SET. */
- extern void set_mem_alias_set (rtx, alias_set_type);
-
-Index: gcc/tree-cfgcleanup.c
-===================================================================
---- gcc/tree-cfgcleanup.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/tree-cfgcleanup.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -498,7 +498,20 @@
-
- /* First split basic block if stmt is not last. */
- if (stmt != gsi_stmt (gsi_last_bb (bb)))
-- split_block (bb, stmt);
-+ {
-+ if (stmt == gsi_stmt (gsi_last_nondebug_bb (bb)))
-+ {
-+ /* Don't split if there are only debug stmts
-+ after stmt, that can result in -fcompare-debug
-+ failures. Remove the debug stmts instead,
-+ they should be all unreachable anyway. */
-+ gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
-+ for (gsi_next (&gsi); !gsi_end_p (gsi); )
-+ gsi_remove (&gsi, true);
-+ }
-+ else
-+ split_block (bb, stmt);
-+ }
-
- changed |= remove_fallthru_edge (bb->succs);
-
-Index: gcc/tree-sra.c
-===================================================================
---- gcc/tree-sra.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/tree-sra.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1030,6 +1030,11 @@
- "component.");
- return NULL;
- }
-+ if (TREE_THIS_VOLATILE (expr))
-+ {
-+ disqualify_base_of_expr (expr, "part of a volatile reference.");
-+ return NULL;
-+ }
-
- switch (TREE_CODE (expr))
- {
-Index: gcc/common.opt
-===================================================================
---- gcc/common.opt (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/common.opt (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1226,6 +1226,10 @@
- Common Report Var(flag_tm)
- Enable support for GNU transactional memory
-
-+fgnu-unique
-+Common Report Var(flag_gnu_unique) Init(1)
-+Use STB_GNU_UNIQUE if supported by the assembler
-+
- floop-flatten
- Common Ignore
- Does nothing. Preserved for backward compatibility.
-Index: gcc/tree-vect-patterns.c
-===================================================================
---- gcc/tree-vect-patterns.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/tree-vect-patterns.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -395,7 +395,7 @@
- || !promotion)
- return NULL;
- oprnd00 = gimple_assign_rhs1 (def_stmt);
-- if (!type_conversion_p (oprnd0, stmt, true, &half_type1, &def_stmt,
-+ if (!type_conversion_p (oprnd1, stmt, true, &half_type1, &def_stmt,
- &promotion)
- || !promotion)
- return NULL;
-Index: gcc/sched-deps.c
-===================================================================
---- gcc/sched-deps.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/sched-deps.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -2744,7 +2744,8 @@
- Consider for instance a volatile asm that changes the fpu rounding
- mode. An insn should not be moved across this even if it only uses
- pseudo-regs because it might give an incorrectly rounded result. */
-- if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
-+ if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
-+ && !DEBUG_INSN_P (insn))
- reg_pending_barrier = TRUE_BARRIER;
-
- /* For all ASM_OPERANDS, we must traverse the vector of input operands.
-Index: gcc/tree-vect-stmts.c
-===================================================================
---- gcc/tree-vect-stmts.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/tree-vect-stmts.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -4319,6 +4319,7 @@
- int i, j, group_size;
- tree msq = NULL_TREE, lsq;
- tree offset = NULL_TREE;
-+ tree byte_offset = NULL_TREE;
- tree realignment_token = NULL_TREE;
- gimple phi = NULL;
- vec<tree> dr_chain = vNULL;
-@@ -4934,7 +4935,8 @@
- if (alignment_support_scheme == dr_explicit_realign_optimized)
- {
- phi = SSA_NAME_DEF_STMT (msq);
-- offset = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
-+ byte_offset = size_binop (MINUS_EXPR, TYPE_SIZE_UNIT (vectype),
-+ size_one_node);
- }
- }
- else
-@@ -4955,7 +4957,8 @@
- if (j == 0)
- dataref_ptr = vect_create_data_ref_ptr (first_stmt, aggr_type, at_loop,
- offset, &dummy, gsi,
-- &ptr_incr, false, &inv_p);
-+ &ptr_incr, false, &inv_p,
-+ byte_offset);
- else
- dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
- TYPE_SIZE_UNIT (aggr_type));
-Index: gcc/config/alpha/elf.h
-===================================================================
---- gcc/config/alpha/elf.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/alpha/elf.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -126,6 +126,10 @@
- "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
- %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
-
-+/* This variable should be set to 'true' if the target ABI requires
-+ unwinding tables even when exceptions are not used. */
-+#define TARGET_UNWIND_TABLES_DEFAULT true
-+
- /* Select a format to encode pointers in exception handling data. CODE
- is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
- true if the symbol may be affected by dynamic relocations.
-Index: gcc/config/alpha/alpha.c
-===================================================================
---- gcc/config/alpha/alpha.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/alpha/alpha.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -8658,6 +8658,11 @@
- }
- break;
-
-+ case BARRIER:
-+ /* __builtin_unreachable can expand to no code at all,
-+ leaving (barrier) RTXes in the instruction stream. */
-+ goto close_shadow_notrapb;
-+
- case JUMP_INSN:
- case CALL_INSN:
- case CODE_LABEL:
-@@ -8673,6 +8678,7 @@
- n = emit_insn_before (gen_trapb (), i);
- PUT_MODE (n, TImode);
- PUT_MODE (i, TImode);
-+ close_shadow_notrapb:
- trap_pending = 0;
- shadow.used.i = 0;
- shadow.used.fp = 0;
-Index: gcc/config/elfos.h
-===================================================================
---- gcc/config/elfos.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/elfos.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -287,7 +287,7 @@
- /* Write the extra assembler code needed to declare an object properly. */
-
- #ifdef HAVE_GAS_GNU_UNIQUE_OBJECT
--#define USE_GNU_UNIQUE_OBJECT 1
-+#define USE_GNU_UNIQUE_OBJECT flag_gnu_unique
- #else
- #define USE_GNU_UNIQUE_OBJECT 0
- #endif
-Index: gcc/config/sparc/sync.md
-===================================================================
---- gcc/config/sparc/sync.md (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/sparc/sync.md (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -64,11 +64,19 @@
- "stbar"
- [(set_attr "type" "multi")])
-
-+;; For LEON3, STB has the effect of membar #StoreLoad.
-+(define_insn "*membar_storeload_leon3"
-+ [(set (match_operand:BLK 0 "" "")
-+ (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
-+ "TARGET_LEON3"
-+ "stb\t%%g0, [%%sp-1]"
-+ [(set_attr "type" "store")])
-+
- ;; For V8, LDSTUB has the effect of membar #StoreLoad.
- (define_insn "*membar_storeload"
- [(set (match_operand:BLK 0 "" "")
- (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
-- "TARGET_V8"
-+ "TARGET_V8 && !TARGET_LEON3"
- "ldstub\t[%%sp-1], %%g0"
- [(set_attr "type" "multi")])
-
-Index: gcc/config/i386/i386.md
-===================================================================
---- gcc/config/i386/i386.md (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/i386/i386.md (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -5339,66 +5339,37 @@
-
- ;; Avoid store forwarding (partial memory) stall penalty by extending
- ;; SImode value to DImode through XMM register instead of pushing two
--;; SImode values to stack. Note that even !TARGET_INTER_UNIT_MOVES
--;; targets benefit from this optimization. Also note that fild
--;; loads from memory only.
-+;; SImode values to stack. Also note that fild loads from memory only.
-
--(define_insn "*floatunssi<mode>2_1"
-- [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
-+(define_insn_and_split "*floatunssi<mode>2_i387_with_xmm"
-+ [(set (match_operand:X87MODEF 0 "register_operand" "=f")
- (unsigned_float:X87MODEF
-- (match_operand:SI 1 "nonimmediate_operand" "x,m")))
-- (clobber (match_operand:DI 2 "memory_operand" "=m,m"))
-- (clobber (match_scratch:SI 3 "=X,x"))]
-+ (match_operand:SI 1 "nonimmediate_operand" "rm")))
-+ (clobber (match_scratch:DI 3 "=x"))
-+ (clobber (match_operand:DI 2 "memory_operand" "=m"))]
- "!TARGET_64BIT
- && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
-- && TARGET_SSE"
-+ && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES"
- "#"
-+ "&& reload_completed"
-+ [(set (match_dup 3) (zero_extend:DI (match_dup 1)))
-+ (set (match_dup 2) (match_dup 3))
-+ (set (match_dup 0)
-+ (float:X87MODEF (match_dup 2)))]
-+ ""
- [(set_attr "type" "multi")
- (set_attr "mode" "<MODE>")])
-
--(define_split
-- [(set (match_operand:X87MODEF 0 "register_operand")
-- (unsigned_float:X87MODEF
-- (match_operand:SI 1 "register_operand")))
-- (clobber (match_operand:DI 2 "memory_operand"))
-- (clobber (match_scratch:SI 3))]
-- "!TARGET_64BIT
-- && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
-- && TARGET_SSE
-- && reload_completed"
-- [(set (match_dup 2) (match_dup 1))
-- (set (match_dup 0)
-- (float:X87MODEF (match_dup 2)))]
-- "operands[1] = simplify_gen_subreg (DImode, operands[1], SImode, 0);")
--
--(define_split
-- [(set (match_operand:X87MODEF 0 "register_operand")
-- (unsigned_float:X87MODEF
-- (match_operand:SI 1 "memory_operand")))
-- (clobber (match_operand:DI 2 "memory_operand"))
-- (clobber (match_scratch:SI 3))]
-- "!TARGET_64BIT
-- && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
-- && TARGET_SSE
-- && reload_completed"
-- [(set (match_dup 2) (match_dup 3))
-- (set (match_dup 0)
-- (float:X87MODEF (match_dup 2)))]
--{
-- emit_move_insn (operands[3], operands[1]);
-- operands[3] = simplify_gen_subreg (DImode, operands[3], SImode, 0);
--})
--
- (define_expand "floatunssi<mode>2"
- [(parallel
- [(set (match_operand:X87MODEF 0 "register_operand")
- (unsigned_float:X87MODEF
- (match_operand:SI 1 "nonimmediate_operand")))
-- (clobber (match_dup 2))
-- (clobber (match_scratch:SI 3))])]
-+ (clobber (match_scratch:DI 3))
-+ (clobber (match_dup 2))])]
- "!TARGET_64BIT
- && ((TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
-- && TARGET_SSE)
-+ && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES)
- || (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))"
- {
- if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
-@@ -13545,7 +13516,8 @@
- (set (reg:CCFP FPSR_REG)
- (unspec:CCFP [(match_dup 2) (match_dup 3)]
- UNSPEC_C2_FLAG))]
-- "TARGET_USE_FANCY_MATH_387"
-+ "TARGET_USE_FANCY_MATH_387
-+ && flag_finite_math_only"
- "fprem"
- [(set_attr "type" "fpspc")
- (set_attr "mode" "XF")])
-@@ -13554,7 +13526,8 @@
- [(use (match_operand:XF 0 "register_operand"))
- (use (match_operand:XF 1 "general_operand"))
- (use (match_operand:XF 2 "general_operand"))]
-- "TARGET_USE_FANCY_MATH_387"
-+ "TARGET_USE_FANCY_MATH_387
-+ && flag_finite_math_only"
- {
- rtx label = gen_label_rtx ();
-
-@@ -13577,7 +13550,8 @@
- [(use (match_operand:MODEF 0 "register_operand"))
- (use (match_operand:MODEF 1 "general_operand"))
- (use (match_operand:MODEF 2 "general_operand"))]
-- "TARGET_USE_FANCY_MATH_387"
-+ "TARGET_USE_FANCY_MATH_387
-+ && flag_finite_math_only"
- {
- rtx (*gen_truncxf) (rtx, rtx);
-
-@@ -13616,7 +13590,8 @@
- (set (reg:CCFP FPSR_REG)
- (unspec:CCFP [(match_dup 2) (match_dup 3)]
- UNSPEC_C2_FLAG))]
-- "TARGET_USE_FANCY_MATH_387"
-+ "TARGET_USE_FANCY_MATH_387
-+ && flag_finite_math_only"
- "fprem1"
- [(set_attr "type" "fpspc")
- (set_attr "mode" "XF")])
-@@ -13625,7 +13600,8 @@
- [(use (match_operand:XF 0 "register_operand"))
- (use (match_operand:XF 1 "general_operand"))
- (use (match_operand:XF 2 "general_operand"))]
-- "TARGET_USE_FANCY_MATH_387"
-+ "TARGET_USE_FANCY_MATH_387
-+ && flag_finite_math_only"
- {
- rtx label = gen_label_rtx ();
-
-@@ -13648,7 +13624,8 @@
- [(use (match_operand:MODEF 0 "register_operand"))
- (use (match_operand:MODEF 1 "general_operand"))
- (use (match_operand:MODEF 2 "general_operand"))]
-- "TARGET_USE_FANCY_MATH_387"
-+ "TARGET_USE_FANCY_MATH_387
-+ && flag_finite_math_only"
- {
- rtx (*gen_truncxf) (rtx, rtx);
-
-Index: gcc/config/i386/driver-i386.c
-===================================================================
---- gcc/config/i386/driver-i386.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/i386/driver-i386.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -713,6 +713,11 @@
- /* Assume Core 2. */
- cpu = "core2";
- }
-+ else if (has_longmode)
-+ /* Perhaps some emulator? Assume x86-64, otherwise gcc
-+ -march=native would be unusable for 64-bit compilations,
-+ as all the CPUs below are 32-bit only. */
-+ cpu = "x86-64";
- else if (has_sse3)
- /* It is Core Duo. */
- cpu = "pentium-m";
-Index: gcc/config/i386/i386.c
-===================================================================
---- gcc/config/i386/i386.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/i386/i386.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -20505,7 +20505,7 @@
- t1 = gen_reg_rtx (V32QImode);
- t2 = gen_reg_rtx (V32QImode);
- t3 = gen_reg_rtx (V32QImode);
-- vt2 = GEN_INT (128);
-+ vt2 = GEN_INT (-128);
- for (i = 0; i < 32; i++)
- vec[i] = vt2;
- vt = gen_rtx_CONST_VECTOR (V32QImode, gen_rtvec_v (32, vec));
-@@ -24640,13 +24640,17 @@
- {
- edge e;
- edge_iterator ei;
-- /* Assume that region is SCC, i.e. all immediate predecessors
-- of non-head block are in the same region. */
-+
-+ /* Regions are SCCs with the exception of selective
-+ scheduling with pipelining of outer blocks enabled.
-+ So also check that immediate predecessors of a non-head
-+ block are in the same region. */
- FOR_EACH_EDGE (e, ei, bb->preds)
- {
- /* Avoid creating of loop-carried dependencies through
-- using topological odering in region. */
-- if (BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
-+ using topological ordering in the region. */
-+ if (rgn == CONTAINING_RGN (e->src->index)
-+ && BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
- add_dependee_for_func_arg (first_arg, e->src);
- }
- }
-@@ -38807,8 +38811,8 @@
- op0 = gen_lowpart (V4DImode, d->op0);
- op1 = gen_lowpart (V4DImode, d->op1);
- rperm[0]
-- = GEN_INT (((d->perm[0] & (nelt / 2)) ? 1 : 0)
-- || ((d->perm[nelt / 2] & (nelt / 2)) ? 2 : 0));
-+ = GEN_INT ((d->perm[0] / (nelt / 2))
-+ | ((d->perm[nelt / 2] / (nelt / 2)) * 16));
- emit_insn (gen_avx2_permv2ti (target, op0, op1, rperm[0]));
- return true;
- }
-Index: gcc/config/sh/sh.c
-===================================================================
---- gcc/config/sh/sh.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/sh/sh.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -808,6 +808,12 @@
- targetm.asm_out.aligned_op.di = NULL;
- targetm.asm_out.unaligned_op.di = NULL;
- }
-+
-+ /* User/priviledged mode is supported only on SH3*, SH4* and SH5*.
-+ Disable it for everything else. */
-+ if (! (TARGET_SH3 || TARGET_SH5) && TARGET_USERMODE)
-+ TARGET_USERMODE = false;
-+
- if (TARGET_SH1)
- {
- if (! strcmp (sh_div_str, "call-div1"))
-Index: gcc/config/sh/sync.md
-===================================================================
---- gcc/config/sh/sync.md (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/sh/sync.md (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -466,6 +466,7 @@
- (set (mem:SI (match_dup 1))
- (unspec:SI
- [(match_operand:SI 2 "arith_operand" "rI08")] UNSPEC_ATOMIC))
-+ (set (reg:SI T_REG) (const_int 1))
- (clobber (reg:SI R0_REG))]
- "TARGET_ATOMIC_HARD_LLCS
- || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
-@@ -484,6 +485,7 @@
- (set (mem:QIHI (match_dup 1))
- (unspec:QIHI
- [(match_operand:QIHI 2 "register_operand" "r")] UNSPEC_ATOMIC))
-+ (set (reg:SI T_REG) (const_int 1))
- (clobber (reg:SI R0_REG))
- (clobber (match_scratch:SI 3 "=&r"))
- (clobber (match_scratch:SI 4 "=1"))]
-@@ -617,6 +619,7 @@
- [(FETCHOP:SI (mem:SI (match_dup 1))
- (match_operand:SI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
- UNSPEC_ATOMIC))
-+ (set (reg:SI T_REG) (const_int 1))
- (clobber (reg:SI R0_REG))]
- "TARGET_ATOMIC_HARD_LLCS
- || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
-@@ -637,6 +640,7 @@
- [(FETCHOP:QIHI (mem:QIHI (match_dup 1))
- (match_operand:QIHI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
- UNSPEC_ATOMIC))
-+ (set (reg:SI T_REG) (const_int 1))
- (clobber (reg:SI R0_REG))
- (clobber (match_scratch:SI 3 "=&r"))
- (clobber (match_scratch:SI 4 "=1"))]
-@@ -784,6 +788,7 @@
- [(not:SI (and:SI (mem:SI (match_dup 1))
- (match_operand:SI 2 "logical_operand" "rK08")))]
- UNSPEC_ATOMIC))
-+ (set (reg:SI T_REG) (const_int 1))
- (clobber (reg:SI R0_REG))]
- "TARGET_ATOMIC_HARD_LLCS
- || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
-@@ -805,6 +810,7 @@
- [(not:QIHI (and:QIHI (mem:QIHI (match_dup 1))
- (match_operand:QIHI 2 "logical_operand" "rK08")))]
- UNSPEC_ATOMIC))
-+ (set (reg:SI T_REG) (const_int 1))
- (clobber (reg:SI R0_REG))
- (clobber (match_scratch:SI 3 "=&r"))
- (clobber (match_scratch:SI 4 "=1"))]
-@@ -903,7 +909,7 @@
- " and %0,%3" "\n"
- " not %3,%3" "\n"
- " mov.<bwl> %3,@%1" "\n"
-- " stc %4,sr";
-+ " ldc %4,sr";
- }
- [(set_attr "length" "20")])
-
-@@ -960,7 +966,8 @@
- (set (mem:SI (match_dup 1))
- (unspec:SI
- [(FETCHOP:SI (mem:SI (match_dup 1)) (match_dup 2))]
-- UNSPEC_ATOMIC))]
-+ UNSPEC_ATOMIC))
-+ (set (reg:SI T_REG) (const_int 1))]
- "TARGET_ATOMIC_HARD_LLCS
- || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
- {
-@@ -980,6 +987,7 @@
- (unspec:QIHI
- [(FETCHOP:QIHI (mem:QIHI (match_dup 1)) (match_dup 2))]
- UNSPEC_ATOMIC))
-+ (set (reg:SI T_REG) (const_int 1))
- (clobber (reg:SI R0_REG))
- (clobber (match_scratch:SI 3 "=&r"))
- (clobber (match_scratch:SI 4 "=1"))]
-@@ -1124,7 +1132,8 @@
- (set (mem:SI (match_dup 1))
- (unspec:SI
- [(not:SI (and:SI (mem:SI (match_dup 1)) (match_dup 2)))]
-- UNSPEC_ATOMIC))]
-+ UNSPEC_ATOMIC))
-+ (set (reg:SI T_REG) (const_int 1))]
- "TARGET_ATOMIC_HARD_LLCS
- || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
- {
-@@ -1145,6 +1154,7 @@
- (unspec:QIHI
- [(not:QIHI (and:QIHI (mem:QIHI (match_dup 1)) (match_dup 2)))]
- UNSPEC_ATOMIC))
-+ (set (reg:SI T_REG) (const_int 1))
- (clobber (reg:SI R0_REG))
- (clobber (match_scratch:SI 3 "=&r"))
- (clobber (match_scratch:SI 4 "=1"))]
-@@ -1353,7 +1363,7 @@
- " ldc r0,sr" "\n"
- " mov.b @%0,r0" "\n"
- " mov.b %1,@%0" "\n"
-- " stc %2,sr" "\n"
-+ " ldc %2,sr" "\n"
- " tst r0,r0";
- }
- [(set_attr "length" "16")])
-Index: gcc/config/sh/sh.opt
-===================================================================
---- gcc/config/sh/sh.opt (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/sh/sh.opt (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -343,7 +343,7 @@
- Cost to assume for a multiply insn
-
- musermode
--Target Report RejectNegative Var(TARGET_USERMODE)
-+Target Var(TARGET_USERMODE)
- Don't generate privileged-mode only code; implies -mno-inline-ic_invalidate if the inline code would not work in user mode.
-
- ;; We might want to enable this by default for TARGET_HARD_SH4, because
-Index: gcc/config/microblaze/predicates.md
-===================================================================
---- gcc/config/microblaze/predicates.md (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/microblaze/predicates.md (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -85,10 +85,6 @@
- (ior (match_operand 0 "const_0_operand")
- (match_operand 0 "register_operand")))
-
--(define_predicate "reg_or_mem_operand"
-- (ior (match_operand 0 "memory_operand")
-- (match_operand 0 "register_operand")))
--
- ;; Return if the operand is either the PC or a label_ref.
- (define_special_predicate "pc_or_label_operand"
- (ior (match_code "pc,label_ref")
-Index: gcc/config/microblaze/microblaze.md
-===================================================================
---- gcc/config/microblaze/microblaze.md (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/microblaze/microblaze.md (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1119,18 +1119,6 @@
- }
- )
-
--;;Load and store reverse
--(define_insn "movsi4_rev"
-- [(set (match_operand:SI 0 "reg_or_mem_operand" "=r,Q")
-- (bswap:SI (match_operand:SF 1 "reg_or_mem_operand" "Q,r")))]
-- "TARGET_REORDER"
-- "@
-- lwr\t%0,%y1,r0
-- swr\t%1,%y0,r0"
-- [(set_attr "type" "load,store")
-- (set_attr "mode" "SI")
-- (set_attr "length" "4,4")])
--
- ;; 32-bit floating point moves
-
- (define_expand "movsf"
-Index: gcc/config/avr/avr-fixed.md
-===================================================================
---- gcc/config/avr/avr-fixed.md (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/avr/avr-fixed.md (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -430,8 +430,8 @@
- }
-
- // Input and output of the libgcc function
-- const unsigned int regno_in[] = { -1, 22, 22, -1, 18 };
-- const unsigned int regno_out[] = { -1, 24, 24, -1, 22 };
-+ const unsigned int regno_in[] = { -1U, 22, 22, -1U, 18 };
-+ const unsigned int regno_out[] = { -1U, 24, 24, -1U, 22 };
-
- operands[3] = gen_rtx_REG (<MODE>mode, regno_out[(size_t) GET_MODE_SIZE (<MODE>mode)]);
- operands[4] = gen_rtx_REG (<MODE>mode, regno_in[(size_t) GET_MODE_SIZE (<MODE>mode)]);
-Index: gcc/config/avr/avr.md
-===================================================================
---- gcc/config/avr/avr.md (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/avr/avr.md (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -367,6 +367,15 @@
- ""
- {
- int i;
-+
-+ // Avoid (subreg (mem)) for non-generic address spaces below. Because
-+ // of the poor addressing capabilities of these spaces it's better to
-+ // load them in one chunk. And it avoids PR61443.
-+
-+ if (MEM_P (operands[0])
-+ && !ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (operands[0])))
-+ operands[0] = copy_to_mode_reg (<MODE>mode, operands[0]);
-+
- for (i = GET_MODE_SIZE (<MODE>mode) - 1; i >= 0; --i)
- {
- rtx part = simplify_gen_subreg (QImode, operands[0], <MODE>mode, i);
-Index: gcc/config/avr/avr.h
-===================================================================
---- gcc/config/avr/avr.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/avr/avr.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -250,18 +250,18 @@
- #define REG_CLASS_CONTENTS { \
- {0x00000000,0x00000000}, /* NO_REGS */ \
- {0x00000001,0x00000000}, /* R0_REG */ \
-- {3 << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
-- {3 << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
-- {3 << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
-+ {3u << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
-+ {3u << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
-+ {3u << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
- {0x00000000,0x00000003}, /* STACK_REG, STACK */ \
-- {(3 << REG_Y) | (3 << REG_Z), \
-+ {(3u << REG_Y) | (3u << REG_Z), \
- 0x00000000}, /* BASE_POINTER_REGS, r28 - r31 */ \
-- {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z), \
-+ {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z), \
- 0x00000000}, /* POINTER_REGS, r26 - r31 */ \
-- {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W), \
-+ {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z) | (3u << REG_W), \
- 0x00000000}, /* ADDW_REGS, r24 - r31 */ \
- {0x00ff0000,0x00000000}, /* SIMPLE_LD_REGS r16 - r23 */ \
-- {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16), \
-+ {(3u << REG_X)|(3u << REG_Y)|(3u << REG_Z)|(3u << REG_W)|(0xffu << 16),\
- 0x00000000}, /* LD_REGS, r16 - r31 */ \
- {0x0000ffff,0x00000000}, /* NO_LD_REGS r0 - r15 */ \
- {0xffffffff,0x00000000}, /* GENERAL_REGS, r0 - r31 */ \
-Index: gcc/config/aarch64/arm_neon.h
-===================================================================
---- gcc/config/aarch64/arm_neon.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/aarch64/arm_neon.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -13815,7 +13815,7 @@
- int16x4_t result;
- __asm__ ("sqdmulh %0.4h,%1.4h,%2.h[0]"
- : "=w"(result)
-- : "w"(a), "w"(b)
-+ : "w"(a), "x"(b)
- : /* No clobbers */);
- return result;
- }
-@@ -13837,7 +13837,7 @@
- int16x8_t result;
- __asm__ ("sqdmulh %0.8h,%1.8h,%2.h[0]"
- : "=w"(result)
-- : "w"(a), "w"(b)
-+ : "w"(a), "x"(b)
- : /* No clobbers */);
- return result;
- }
-Index: gcc/config/aarch64/aarch64.md
-===================================================================
---- gcc/config/aarch64/aarch64.md (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/aarch64/aarch64.md (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -3292,6 +3292,7 @@
- (unspec:DI [(match_operand:DI 0 "aarch64_valid_symref" "S")]
- UNSPEC_TLSDESC))
- (clobber (reg:DI LR_REGNUM))
-+ (clobber (reg:CC CC_REGNUM))
- (clobber (match_scratch:DI 1 "=r"))]
- "TARGET_TLS_DESC"
- "adrp\\tx0, %A0\;ldr\\t%1, [x0, #%L0]\;add\\tx0, x0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"
-Index: gcc/config/aarch64/aarch64.opt
-===================================================================
---- gcc/config/aarch64/aarch64.opt (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/aarch64/aarch64.opt (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -67,6 +67,10 @@
- Target Report RejectNegative Mask(GENERAL_REGS_ONLY)
- Generate code which uses only the general registers
-
-+mfix-cortex-a53-835769
-+Target Report Var(aarch64_fix_a53_err835769) Init(2)
-+Workaround for ARM Cortex-A53 Erratum number 835769
-+
- mlittle-endian
- Target Report RejectNegative InverseMask(BIG_END)
- Assume target CPU is configured as little endian
-Index: gcc/config/aarch64/aarch64-protos.h
-===================================================================
---- gcc/config/aarch64/aarch64-protos.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/aarch64/aarch64-protos.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -247,6 +247,8 @@
-
- extern void aarch64_split_combinev16qi (rtx operands[3]);
- extern void aarch64_expand_vec_perm (rtx target, rtx op0, rtx op1, rtx sel);
-+extern bool aarch64_madd_needs_nop (rtx);
-+extern void aarch64_final_prescan_insn (rtx);
- extern bool
- aarch64_expand_vec_perm_const (rtx target, rtx op0, rtx op1, rtx sel);
-
-Index: gcc/config/aarch64/aarch64.c
-===================================================================
---- gcc/config/aarch64/aarch64.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/aarch64/aarch64.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1201,6 +1201,7 @@
- CUMULATIVE_ARGS *pcum = get_cumulative_args (pcum_v);
- int ncrn, nvrn, nregs;
- bool allocate_ncrn, allocate_nvrn;
-+ HOST_WIDE_INT size;
-
- /* We need to do this once per argument. */
- if (pcum->aapcs_arg_processed)
-@@ -1208,6 +1209,11 @@
-
- pcum->aapcs_arg_processed = true;
-
-+ /* Size in bytes, rounded to the nearest multiple of 8 bytes. */
-+ size
-+ = AARCH64_ROUND_UP (type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode),
-+ UNITS_PER_WORD);
-+
- allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode);
- allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v,
- mode,
-@@ -1258,10 +1264,8 @@
- }
-
- ncrn = pcum->aapcs_ncrn;
-- nregs = ((type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode))
-- + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
-+ nregs = size / UNITS_PER_WORD;
-
--
- /* C6 - C9. though the sign and zero extension semantics are
- handled elsewhere. This is the case where the argument fits
- entirely general registers. */
-@@ -1309,13 +1313,12 @@
- pcum->aapcs_nextncrn = NUM_ARG_REGS;
-
- /* The argument is passed on stack; record the needed number of words for
-- this argument (we can re-use NREGS) and align the total size if
-- necessary. */
-+ this argument and align the total size if necessary. */
- on_stack:
-- pcum->aapcs_stack_words = nregs;
-+ pcum->aapcs_stack_words = size / UNITS_PER_WORD;
- if (aarch64_function_arg_alignment (mode, type) == 16 * BITS_PER_UNIT)
- pcum->aapcs_stack_size = AARCH64_ROUND_UP (pcum->aapcs_stack_size,
-- 16 / UNITS_PER_WORD) + 1;
-+ 16 / UNITS_PER_WORD);
- return;
- }
-
-@@ -4845,6 +4848,15 @@
- aarch64_tune = selected_tune->core;
- aarch64_tune_params = selected_tune->tune;
-
-+ if (aarch64_fix_a53_err835769 == 2)
-+ {
-+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
-+ aarch64_fix_a53_err835769 = 1;
-+#else
-+ aarch64_fix_a53_err835769 = 0;
-+#endif
-+ }
-+
- aarch64_override_options_after_change ();
- }
-
-@@ -6037,6 +6049,135 @@
- return NULL;
- }
-
-+
-+/* Return true iff X is a MEM rtx. */
-+
-+static int
-+is_mem_p (rtx *x, void *data ATTRIBUTE_UNUSED)
-+{
-+ return MEM_P (*x);
-+}
-+
-+
-+/* Return true if mem_insn contains a MEM RTX somewhere in it. */
-+
-+static bool
-+has_memory_op (rtx mem_insn)
-+{
-+ rtx pattern = PATTERN (mem_insn);
-+ return for_each_rtx (&pattern, is_mem_p, NULL);
-+}
-+
-+
-+/* Find the first rtx before insn that will generate an assembly
-+ instruction. */
-+
-+static rtx
-+aarch64_prev_real_insn (rtx insn)
-+{
-+ if (!insn)
-+ return NULL;
-+
-+ do
-+ {
-+ insn = prev_real_insn (insn);
-+ }
-+ while (insn && recog_memoized (insn) < 0);
-+
-+ return insn;
-+}
-+
-+/* Return true iff t1 is the v8type of a multiply-accumulate instruction. */
-+
-+static bool
-+is_madd_op (enum attr_v8type t1)
-+{
-+ return t1 == V8TYPE_MADD
-+ || t1 == V8TYPE_MADDL;
-+}
-+
-+
-+/* Check if there is a register dependency between a load and the insn
-+ for which we hold recog_data. */
-+
-+static bool
-+dep_between_memop_and_curr (rtx memop)
-+{
-+ rtx load_reg;
-+ int opno;
-+
-+ gcc_assert (GET_CODE (memop) == SET);
-+
-+ if (!REG_P (SET_DEST (memop)))
-+ return false;
-+
-+ load_reg = SET_DEST (memop);
-+ for (opno = 1; opno < recog_data.n_operands; opno++)
-+ {
-+ rtx operand = recog_data.operand[opno];
-+ if (REG_P (operand)
-+ && reg_overlap_mentioned_p (load_reg, operand))
-+ return true;
-+
-+ }
-+ return false;
-+}
-+
-+
-+
-+/* When working around the Cortex-A53 erratum 835769,
-+ given rtx_insn INSN, return true if it is a 64-bit multiply-accumulate
-+ instruction and has a preceding memory instruction such that a NOP
-+ should be inserted between them. */
-+
-+bool
-+aarch64_madd_needs_nop (rtx insn)
-+{
-+ enum attr_v8type attr_type;
-+ rtx prev;
-+ rtx body;
-+
-+ if (!aarch64_fix_a53_err835769)
-+ return false;
-+
-+ if (recog_memoized (insn) < 0)
-+ return false;
-+
-+ attr_type = get_attr_v8type (insn);
-+ if (!is_madd_op (attr_type))
-+ return false;
-+
-+ prev = aarch64_prev_real_insn (insn);
-+ /* aarch64_prev_real_insn can call recog_memoized on insns other than INSN.
-+ Restore recog state to INSN to avoid state corruption. */
-+ extract_constrain_insn_cached (insn);
-+
-+ if (!prev || !has_memory_op (prev))
-+ return false;
-+
-+ body = single_set (prev);
-+
-+ /* If the previous insn is a memory op and there is no dependency between
-+ it and the madd, emit a nop between them. If we know it's a memop but
-+ body is NULL, return true to be safe. */
-+ if (GET_MODE (recog_data.operand[0]) == DImode
-+ && (!body || !dep_between_memop_and_curr (body)))
-+ return true;
-+
-+ return false;
-+
-+}
-+
-+/* Implement FINAL_PRESCAN_INSN. */
-+
-+void
-+aarch64_final_prescan_insn (rtx insn)
-+{
-+ if (aarch64_madd_needs_nop (insn))
-+ fprintf (asm_out_file, "\tnop // between mem op and mult-accumulate\n");
-+}
-+
-+
- /* Return the equivalent letter for size. */
- static unsigned char
- sizetochar (int size)
-Index: gcc/config/aarch64/aarch64-linux.h
-===================================================================
---- gcc/config/aarch64/aarch64-linux.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/aarch64/aarch64-linux.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -43,4 +43,6 @@
- } \
- while (0)
-
-+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
-+
- #endif /* GCC_AARCH64_LINUX_H */
-Index: gcc/config/aarch64/aarch64.h
-===================================================================
---- gcc/config/aarch64/aarch64.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/aarch64/aarch64.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -465,6 +465,18 @@
- (TARGET_CPU_generic | (AARCH64_CPU_DEFAULT_FLAGS << 6))
- #endif
-
-+/* If inserting NOP before a mult-accumulate insn remember to adjust the
-+ length so that conditional branching code is updated appropriately. */
-+#define ADJUST_INSN_LENGTH(insn, length) \
-+ do \
-+ { \
-+ if (aarch64_madd_needs_nop (insn)) \
-+ length += 4; \
-+ } while (0)
-+
-+#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \
-+ aarch64_final_prescan_insn (INSN); \
-+
- /* The processor for which instructions should be scheduled. */
- extern enum aarch64_processor aarch64_tune;
-
-Index: gcc/config/rs6000/constraints.md
-===================================================================
---- gcc/config/rs6000/constraints.md (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/rs6000/constraints.md (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -65,6 +65,20 @@
- (define_register_constraint "wg" "rs6000_constraints[RS6000_CONSTRAINT_wg]"
- "If -mmfpgpr was used, a floating point register or NO_REGS.")
-
-+(define_register_constraint "wh" "rs6000_constraints[RS6000_CONSTRAINT_wh]"
-+ "Floating point register if direct moves are available, or NO_REGS.")
-+
-+;; At present, DImode is not allowed in the Altivec registers. If in the
-+;; future it is allowed, wi/wj can be set to VSX_REGS instead of FLOAT_REGS.
-+(define_register_constraint "wi" "rs6000_constraints[RS6000_CONSTRAINT_wi]"
-+ "FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS.")
-+
-+(define_register_constraint "wj" "rs6000_constraints[RS6000_CONSTRAINT_wj]"
-+ "FP or VSX register to hold 64-bit integers for direct moves or NO_REGS.")
-+
-+(define_register_constraint "wk" "rs6000_constraints[RS6000_CONSTRAINT_wk]"
-+ "FP or VSX register to hold 64-bit doubles for direct moves or NO_REGS.")
-+
- (define_register_constraint "wl" "rs6000_constraints[RS6000_CONSTRAINT_wl]"
- "Floating point register if the LFIWAX instruction is enabled or NO_REGS.")
-
-@@ -98,7 +112,7 @@
- "Floating point register if the STFIWX instruction is enabled or NO_REGS.")
-
- (define_register_constraint "wy" "rs6000_constraints[RS6000_CONSTRAINT_wy]"
-- "VSX vector register to hold scalar float values or NO_REGS.")
-+ "FP or VSX register to perform ISA 2.07 float ops or NO_REGS.")
-
- (define_register_constraint "wz" "rs6000_constraints[RS6000_CONSTRAINT_wz]"
- "Floating point register if the LFIWZX instruction is enabled or NO_REGS.")
-Index: gcc/config/rs6000/predicates.md
-===================================================================
---- gcc/config/rs6000/predicates.md (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/rs6000/predicates.md (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1795,7 +1795,7 @@
- (define_predicate "fusion_gpr_mem_load"
- (match_code "mem,sign_extend,zero_extend")
- {
-- rtx addr;
-+ rtx addr, base, offset;
-
- /* Handle sign/zero extend. */
- if (GET_CODE (op) == ZERO_EXTEND
-@@ -1825,24 +1825,79 @@
- }
-
- addr = XEXP (op, 0);
-+ if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
-+ return 0;
-+
-+ base = XEXP (addr, 0);
-+ if (!base_reg_operand (base, GET_MODE (base)))
-+ return 0;
-+
-+ offset = XEXP (addr, 1);
-+
- if (GET_CODE (addr) == PLUS)
-+ return satisfies_constraint_I (offset);
-+
-+ else if (GET_CODE (addr) == LO_SUM)
- {
-- rtx base = XEXP (addr, 0);
-- rtx offset = XEXP (addr, 1);
-+ if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
-+ return small_toc_ref (offset, GET_MODE (offset));
-
-- return (base_reg_operand (base, GET_MODE (base))
-- && satisfies_constraint_I (offset));
-+ else if (TARGET_ELF && !TARGET_POWERPC64)
-+ return CONSTANT_P (offset);
- }
-
-- else if (GET_CODE (addr) == LO_SUM)
-+ return 0;
-+})
-+
-+;; Match a GPR load (lbz, lhz, lwz, ld) that uses a combined address in the
-+;; memory field with both the addis and the memory offset. Sign extension
-+;; is not handled here, since lha and lwa are not fused.
-+(define_predicate "fusion_gpr_mem_combo"
-+ (match_code "mem,zero_extend")
-+{
-+ rtx addr, base, offset;
-+
-+ /* Handle zero extend. */
-+ if (GET_CODE (op) == ZERO_EXTEND)
- {
-- rtx base = XEXP (addr, 0);
-- rtx offset = XEXP (addr, 1);
-+ op = XEXP (op, 0);
-+ mode = GET_MODE (op);
-+ }
-
-- if (!base_reg_operand (base, GET_MODE (base)))
-+ if (!MEM_P (op))
-+ return 0;
-+
-+ switch (mode)
-+ {
-+ case QImode:
-+ case HImode:
-+ case SImode:
-+ break;
-+
-+ case DImode:
-+ if (!TARGET_POWERPC64)
- return 0;
-+ break;
-
-- else if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
-+ default:
-+ return 0;
-+ }
-+
-+ addr = XEXP (op, 0);
-+ if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
-+ return 0;
-+
-+ base = XEXP (addr, 0);
-+ if (!fusion_gpr_addis (base, GET_MODE (base)))
-+ return 0;
-+
-+ offset = XEXP (addr, 1);
-+ if (GET_CODE (addr) == PLUS)
-+ return satisfies_constraint_I (offset);
-+
-+ else if (GET_CODE (addr) == LO_SUM)
-+ {
-+ if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
- return small_toc_ref (offset, GET_MODE (offset));
-
- else if (TARGET_ELF && !TARGET_POWERPC64)
-Index: gcc/config/rs6000/htm.md
-===================================================================
---- gcc/config/rs6000/htm.md (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/rs6000/htm.md (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -179,7 +179,7 @@
- (const_int 0)]
- UNSPECV_HTM_TABORTWCI))
- (set (subreg:CC (match_dup 2) 0) (match_dup 1))
-- (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 24)))
-+ (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 28)))
- (parallel [(set (match_operand:SI 0 "int_reg_operand" "")
- (and:SI (match_dup 3) (const_int 15)))
- (clobber (scratch:CC))])]
-Index: gcc/config/rs6000/freebsd64.h
-===================================================================
---- gcc/config/rs6000/freebsd64.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/rs6000/freebsd64.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -367,7 +367,7 @@
- /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
- #undef ADJUST_FIELD_ALIGN
- #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
-- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
-+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
- ? 128 \
- : (TARGET_64BIT \
- && TARGET_ALIGN_NATURAL == 0 \
-Index: gcc/config/rs6000/rs6000-protos.h
-===================================================================
---- gcc/config/rs6000/rs6000-protos.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/rs6000/rs6000-protos.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -79,9 +79,9 @@
- extern bool gpr_or_gpr_p (rtx, rtx);
- extern bool direct_move_p (rtx, rtx);
- extern bool quad_load_store_p (rtx, rtx);
--extern bool fusion_gpr_load_p (rtx *, bool);
-+extern bool fusion_gpr_load_p (rtx, rtx, rtx, rtx);
- extern void expand_fusion_gpr_load (rtx *);
--extern const char *emit_fusion_gpr_load (rtx *);
-+extern const char *emit_fusion_gpr_load (rtx, rtx);
- extern enum reg_class (*rs6000_preferred_reload_class_ptr) (rtx,
- enum reg_class);
- extern enum reg_class (*rs6000_secondary_reload_class_ptr) (enum reg_class,
-@@ -153,6 +153,7 @@
-
- #ifdef TREE_CODE
- extern unsigned int rs6000_data_alignment (tree, unsigned int, enum data_align);
-+extern bool rs6000_special_adjust_field_align_p (tree, unsigned int);
- extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
- unsigned int);
- extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int,
-@@ -161,7 +162,7 @@
- extern rtx rs6000_libcall_value (enum machine_mode);
- extern rtx rs6000_va_arg (tree, tree);
- extern int function_ok_for_sibcall (tree);
--extern int rs6000_reg_parm_stack_space (tree);
-+extern int rs6000_reg_parm_stack_space (tree, bool);
- extern void rs6000_elf_declare_function_name (FILE *, const char *, tree);
- extern bool rs6000_elf_in_small_data_p (const_tree);
- #ifdef ARGS_SIZE_RTX
-Index: gcc/config/rs6000/rs6000-builtin.def
-===================================================================
---- gcc/config/rs6000/rs6000-builtin.def (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/rs6000/rs6000-builtin.def (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -622,20 +622,13 @@
- | RS6000_BTC_TERNARY), \
- CODE_FOR_ ## ICODE) /* ICODE */
-
--/* Miscellaneous builtins. */
--#define BU_MISC_1(ENUM, NAME, ATTR, ICODE) \
-+/* 128-bit long double floating point builtins. */
-+#define BU_LDBL128_2(ENUM, NAME, ATTR, ICODE) \
- RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
- "__builtin_" NAME, /* NAME */ \
-- RS6000_BTM_HARD_FLOAT, /* MASK */ \
-+ (RS6000_BTM_HARD_FLOAT /* MASK */ \
-+ | RS6000_BTM_LDBL128), \
- (RS6000_BTC_ ## ATTR /* ATTR */ \
-- | RS6000_BTC_UNARY), \
-- CODE_FOR_ ## ICODE) /* ICODE */
--
--#define BU_MISC_2(ENUM, NAME, ATTR, ICODE) \
-- RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
-- "__builtin_" NAME, /* NAME */ \
-- RS6000_BTM_HARD_FLOAT, /* MASK */ \
-- (RS6000_BTC_ ## ATTR /* ATTR */ \
- | RS6000_BTC_BINARY), \
- CODE_FOR_ ## ICODE) /* ICODE */
-
-@@ -1593,10 +1586,8 @@
- BU_DFP_MISC_2 (PACK_TD, "pack_dec128", CONST, packtd)
- BU_DFP_MISC_2 (UNPACK_TD, "unpack_dec128", CONST, unpacktd)
-
--BU_MISC_2 (PACK_TF, "pack_longdouble", CONST, packtf)
--BU_MISC_2 (UNPACK_TF, "unpack_longdouble", CONST, unpacktf)
--BU_MISC_1 (UNPACK_TF_0, "longdouble_dw0", CONST, unpacktf_0)
--BU_MISC_1 (UNPACK_TF_1, "longdouble_dw1", CONST, unpacktf_1)
-+BU_LDBL128_2 (PACK_TF, "pack_longdouble", CONST, packtf)
-+BU_LDBL128_2 (UNPACK_TF, "unpack_longdouble", CONST, unpacktf)
-
- BU_P7_MISC_2 (PACK_V1TI, "pack_vector_int128", CONST, packv1ti)
- BU_P7_MISC_2 (UNPACK_V1TI, "unpack_vector_int128", CONST, unpackv1ti)
-Index: gcc/config/rs6000/rs6000-c.c
-===================================================================
---- gcc/config/rs6000/rs6000-c.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/rs6000/rs6000-c.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -4126,7 +4126,8 @@
- argument) is reversed. Patch the arguments here before building
- the resolved CALL_EXPR. */
- if (desc->code == ALTIVEC_BUILTIN_VEC_VCMPGE_P
-- && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P)
-+ && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P
-+ && desc->overloaded_code != VSX_BUILTIN_XVCMPGEDP_P)
- {
- tree t;
- t = args[2], args[2] = args[1], args[1] = t;
-@@ -4184,6 +4185,14 @@
- if (TARGET_DEBUG_BUILTIN)
- fprintf (stderr, "altivec_resolve_overloaded_builtin, code = %4d, %s\n",
- (int)fcode, IDENTIFIER_POINTER (DECL_NAME (fndecl)));
-+
-+ /* vec_lvsl and vec_lvsr are deprecated for use with LE element order. */
-+ if (fcode == ALTIVEC_BUILTIN_VEC_LVSL && !VECTOR_ELT_ORDER_BIG)
-+ warning (OPT_Wdeprecated, "vec_lvsl is deprecated for little endian; use \
-+assignment for unaligned loads and stores");
-+ else if (fcode == ALTIVEC_BUILTIN_VEC_LVSR && !VECTOR_ELT_ORDER_BIG)
-+ warning (OPT_Wdeprecated, "vec_lvsr is deprecated for little endian; use \
-+assignment for unaligned loads and stores");
-
- /* For now treat vec_splats and vec_promote as the same. */
- if (fcode == ALTIVEC_BUILTIN_VEC_SPLATS
-Index: gcc/config/rs6000/linux64.h
-===================================================================
---- gcc/config/rs6000/linux64.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/rs6000/linux64.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -246,7 +246,7 @@
- /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
- #undef ADJUST_FIELD_ALIGN
- #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
-- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
-+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
- ? 128 \
- : (TARGET_64BIT \
- && TARGET_ALIGN_NATURAL == 0 \
-Index: gcc/config/rs6000/rs6000.c
-===================================================================
---- gcc/config/rs6000/rs6000.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/rs6000/rs6000.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -369,6 +369,7 @@
- enum insn_code reload_gpr_vsx; /* INSN to move from GPR to VSX. */
- enum insn_code reload_vsx_gpr; /* INSN to move from VSX to GPR. */
- addr_mask_type addr_mask[(int)N_RELOAD_REG]; /* Valid address masks. */
-+ bool scalar_in_vmx_p; /* Scalar value can go in VMX. */
- };
-
- static struct rs6000_reg_addr reg_addr[NUM_MACHINE_MODES];
-@@ -1704,8 +1705,7 @@
- asked for it. */
- if (TARGET_VSX && VSX_REGNO_P (regno)
- && (VECTOR_MEM_VSX_P (mode)
-- || (TARGET_VSX_SCALAR_FLOAT && mode == SFmode)
-- || (TARGET_VSX_SCALAR_DOUBLE && (mode == DFmode || mode == DImode))
-+ || reg_addr[mode].scalar_in_vmx_p
- || (TARGET_VSX_TIMODE && mode == TImode)
- || (TARGET_VADDUQM && mode == V1TImode)))
- {
-@@ -1714,12 +1714,9 @@
-
- if (ALTIVEC_REGNO_P (regno))
- {
-- if (mode == SFmode && !TARGET_UPPER_REGS_SF)
-+ if (GET_MODE_SIZE (mode) != 16 && !reg_addr[mode].scalar_in_vmx_p)
- return 0;
-
-- if ((mode == DFmode || mode == DImode) && !TARGET_UPPER_REGS_DF)
-- return 0;
--
- return ALTIVEC_REGNO_P (last_regno);
- }
- }
-@@ -1897,14 +1894,16 @@
- if (rs6000_vector_unit[m] != VECTOR_NONE
- || rs6000_vector_mem[m] != VECTOR_NONE
- || (reg_addr[m].reload_store != CODE_FOR_nothing)
-- || (reg_addr[m].reload_load != CODE_FOR_nothing))
-+ || (reg_addr[m].reload_load != CODE_FOR_nothing)
-+ || reg_addr[m].scalar_in_vmx_p)
- {
- fprintf (stderr,
-- " Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c",
-+ " Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c Upper=%c",
- rs6000_debug_vector_unit (rs6000_vector_unit[m]),
- rs6000_debug_vector_unit (rs6000_vector_mem[m]),
- (reg_addr[m].reload_store != CODE_FOR_nothing) ? 's' : '*',
-- (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*');
-+ (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*',
-+ (reg_addr[m].scalar_in_vmx_p) ? 'y' : 'n');
- }
-
- fputs ("\n", stderr);
-@@ -2021,6 +2020,10 @@
- "wd reg_class = %s\n"
- "wf reg_class = %s\n"
- "wg reg_class = %s\n"
-+ "wh reg_class = %s\n"
-+ "wi reg_class = %s\n"
-+ "wj reg_class = %s\n"
-+ "wk reg_class = %s\n"
- "wl reg_class = %s\n"
- "wm reg_class = %s\n"
- "wr reg_class = %s\n"
-@@ -2040,6 +2043,10 @@
- reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wd]],
- reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wf]],
- reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wg]],
-+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wh]],
-+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wi]],
-+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wj]],
-+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wk]],
- reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wl]],
- reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wm]],
- reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wr]],
-@@ -2324,6 +2331,8 @@
-
- for (m = 0; m < NUM_MACHINE_MODES; ++m)
- {
-+ enum machine_mode m2 = (enum machine_mode)m;
-+
- /* SDmode is special in that we want to access it only via REG+REG
- addressing on power7 and above, since we want to use the LFIWZX and
- STFIWZX instructions to load it. */
-@@ -2358,13 +2367,12 @@
-
- if (TARGET_UPDATE
- && (rc == RELOAD_REG_GPR || rc == RELOAD_REG_FPR)
-- && GET_MODE_SIZE (m) <= 8
-- && !VECTOR_MODE_P (m)
-- && !COMPLEX_MODE_P (m)
-+ && GET_MODE_SIZE (m2) <= 8
-+ && !VECTOR_MODE_P (m2)
-+ && !COMPLEX_MODE_P (m2)
- && !indexed_only_p
-- && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m) == 8)
-- && !(m == DFmode && TARGET_UPPER_REGS_DF)
-- && !(m == SFmode && TARGET_UPPER_REGS_SF))
-+ && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m2) == 8)
-+ && !reg_addr[m2].scalar_in_vmx_p)
- {
- addr_mask |= RELOAD_REG_PRE_INCDEC;
-
-@@ -2595,16 +2603,22 @@
- f - Register class to use with traditional SFmode instructions.
- v - Altivec register.
- wa - Any VSX register.
-+ wc - Reserved to represent individual CR bits (used in LLVM).
- wd - Preferred register class for V2DFmode.
- wf - Preferred register class for V4SFmode.
- wg - Float register for power6x move insns.
-+ wh - FP register for direct move instructions.
-+ wi - FP or VSX register to hold 64-bit integers for VSX insns.
-+ wj - FP or VSX register to hold 64-bit integers for direct moves.
-+ wk - FP or VSX register to hold 64-bit doubles for direct moves.
- wl - Float register if we can do 32-bit signed int loads.
- wm - VSX register for ISA 2.07 direct move operations.
-+ wn - always NO_REGS.
- wr - GPR if 64-bit mode is permitted.
- ws - Register class to do ISA 2.06 DF operations.
-+ wt - VSX register for TImode in VSX registers.
- wu - Altivec register for ISA 2.07 VSX SF/SI load/stores.
- wv - Altivec register for ISA 2.06 VSX DF/DI load/stores.
-- wt - VSX register for TImode in VSX registers.
- ww - Register class to do SF conversions in with VSX operations.
- wx - Float register if we can do 32-bit int stores.
- wy - Register class to do ISA 2.07 SF operations.
-@@ -2611,21 +2625,22 @@
- wz - Float register if we can do 32-bit unsigned int loads. */
-
- if (TARGET_HARD_FLOAT && TARGET_FPRS)
-- rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;
-+ rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS; /* SFmode */
-
- if (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
-- rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS;
-+ rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS; /* DFmode */
-
- if (TARGET_VSX)
- {
- rs6000_constraints[RS6000_CONSTRAINT_wa] = VSX_REGS;
-- rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;
-- rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;
-+ rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS; /* V2DFmode */
-+ rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS; /* V4SFmode */
-+ rs6000_constraints[RS6000_CONSTRAINT_wi] = FLOAT_REGS; /* DImode */
-
- if (TARGET_VSX_TIMODE)
-- rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;
-+ rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS; /* TImode */
-
-- if (TARGET_UPPER_REGS_DF)
-+ if (TARGET_UPPER_REGS_DF) /* DFmode */
- {
- rs6000_constraints[RS6000_CONSTRAINT_ws] = VSX_REGS;
- rs6000_constraints[RS6000_CONSTRAINT_wv] = ALTIVEC_REGS;
-@@ -2639,19 +2654,26 @@
- if (TARGET_ALTIVEC)
- rs6000_constraints[RS6000_CONSTRAINT_v] = ALTIVEC_REGS;
-
-- if (TARGET_MFPGPR)
-+ if (TARGET_MFPGPR) /* DFmode */
- rs6000_constraints[RS6000_CONSTRAINT_wg] = FLOAT_REGS;
-
- if (TARGET_LFIWAX)
-- rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;
-+ rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS; /* DImode */
-
- if (TARGET_DIRECT_MOVE)
-- rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
-+ {
-+ rs6000_constraints[RS6000_CONSTRAINT_wh] = FLOAT_REGS;
-+ rs6000_constraints[RS6000_CONSTRAINT_wj] /* DImode */
-+ = rs6000_constraints[RS6000_CONSTRAINT_wi];
-+ rs6000_constraints[RS6000_CONSTRAINT_wk] /* DFmode */
-+ = rs6000_constraints[RS6000_CONSTRAINT_ws];
-+ rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
-+ }
-
- if (TARGET_POWERPC64)
- rs6000_constraints[RS6000_CONSTRAINT_wr] = GENERAL_REGS;
-
-- if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)
-+ if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF) /* SFmode */
- {
- rs6000_constraints[RS6000_CONSTRAINT_wu] = ALTIVEC_REGS;
- rs6000_constraints[RS6000_CONSTRAINT_wy] = VSX_REGS;
-@@ -2666,10 +2688,10 @@
- rs6000_constraints[RS6000_CONSTRAINT_ww] = FLOAT_REGS;
-
- if (TARGET_STFIWX)
-- rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;
-+ rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS; /* DImode */
-
- if (TARGET_LFIWZX)
-- rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;
-+ rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS; /* DImode */
-
- /* Set up the reload helper and direct move functions. */
- if (TARGET_VSX || TARGET_ALTIVEC)
-@@ -2692,10 +2714,11 @@
- reg_addr[V2DFmode].reload_load = CODE_FOR_reload_v2df_di_load;
- if (TARGET_VSX && TARGET_UPPER_REGS_DF)
- {
-- reg_addr[DFmode].reload_store = CODE_FOR_reload_df_di_store;
-- reg_addr[DFmode].reload_load = CODE_FOR_reload_df_di_load;
-- reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_di_store;
-- reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_di_load;
-+ reg_addr[DFmode].reload_store = CODE_FOR_reload_df_di_store;
-+ reg_addr[DFmode].reload_load = CODE_FOR_reload_df_di_load;
-+ reg_addr[DFmode].scalar_in_vmx_p = true;
-+ reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_di_store;
-+ reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_di_load;
- }
- if (TARGET_P8_VECTOR)
- {
-@@ -2703,6 +2726,8 @@
- reg_addr[SFmode].reload_load = CODE_FOR_reload_sf_di_load;
- reg_addr[SDmode].reload_store = CODE_FOR_reload_sd_di_store;
- reg_addr[SDmode].reload_load = CODE_FOR_reload_sd_di_load;
-+ if (TARGET_UPPER_REGS_SF)
-+ reg_addr[SFmode].scalar_in_vmx_p = true;
- }
- if (TARGET_VSX_TIMODE)
- {
-@@ -2759,10 +2784,11 @@
- reg_addr[V2DFmode].reload_load = CODE_FOR_reload_v2df_si_load;
- if (TARGET_VSX && TARGET_UPPER_REGS_DF)
- {
-- reg_addr[DFmode].reload_store = CODE_FOR_reload_df_si_store;
-- reg_addr[DFmode].reload_load = CODE_FOR_reload_df_si_load;
-- reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_si_store;
-- reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_si_load;
-+ reg_addr[DFmode].reload_store = CODE_FOR_reload_df_si_store;
-+ reg_addr[DFmode].reload_load = CODE_FOR_reload_df_si_load;
-+ reg_addr[DFmode].scalar_in_vmx_p = true;
-+ reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_si_store;
-+ reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_si_load;
- }
- if (TARGET_P8_VECTOR)
- {
-@@ -2770,6 +2796,8 @@
- reg_addr[SFmode].reload_load = CODE_FOR_reload_sf_si_load;
- reg_addr[SDmode].reload_store = CODE_FOR_reload_sd_si_store;
- reg_addr[SDmode].reload_load = CODE_FOR_reload_sd_si_load;
-+ if (TARGET_UPPER_REGS_SF)
-+ reg_addr[SFmode].scalar_in_vmx_p = true;
- }
- if (TARGET_VSX_TIMODE)
- {
-@@ -2810,6 +2838,7 @@
-
- for (m = 0; m < NUM_MACHINE_MODES; ++m)
- {
-+ enum machine_mode m2 = (enum machine_mode)m;
- int reg_size2 = reg_size;
-
- /* TFmode/TDmode always takes 2 registers, even in VSX. */
-@@ -2818,7 +2847,7 @@
- reg_size2 = UNITS_PER_FP_WORD;
-
- rs6000_class_max_nregs[m][c]
-- = (GET_MODE_SIZE (m) + reg_size2 - 1) / reg_size2;
-+ = (GET_MODE_SIZE (m2) + reg_size2 - 1) / reg_size2;
- }
- }
-
-@@ -3014,7 +3043,8 @@
- | ((TARGET_CRYPTO) ? RS6000_BTM_CRYPTO : 0)
- | ((TARGET_HTM) ? RS6000_BTM_HTM : 0)
- | ((TARGET_DFP) ? RS6000_BTM_DFP : 0)
-- | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0));
-+ | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0)
-+ | ((TARGET_LONG_DOUBLE_128) ? RS6000_BTM_LDBL128 : 0));
- }
-
- /* Override command line options. Mostly we process the processor type and
-@@ -5861,6 +5891,34 @@
- return align;
- }
-
-+/* Previous GCC releases forced all vector types to have 16-byte alignment. */
-+
-+bool
-+rs6000_special_adjust_field_align_p (tree field, unsigned int computed)
-+{
-+ if (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (field)) == VECTOR_TYPE)
-+ {
-+ if (computed != 128)
-+ {
-+ static bool warned;
-+ if (!warned && warn_psabi)
-+ {
-+ warned = true;
-+ inform (input_location,
-+ "the layout of aggregates containing vectors with"
-+ " %d-byte alignment will change in a future GCC release",
-+ computed / BITS_PER_UNIT);
-+ }
-+ }
-+ /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
-+ keep the special treatment of vector types, but warn if there will
-+ be differences in future GCC releases. */
-+ return true;
-+ }
-+
-+ return false;
-+}
-+
- /* AIX increases natural record alignment to doubleword if the first
- field is an FP double while the FP fields remain word aligned. */
-
-@@ -6109,7 +6167,8 @@
- return false;
-
- extra = GET_MODE_SIZE (mode) - UNITS_PER_WORD;
-- gcc_assert (extra >= 0);
-+ if (extra < 0)
-+ extra = 0;
-
- if (GET_CODE (addr) == LO_SUM)
- /* For lo_sum addresses, we must allow any offset except one that
-@@ -9198,14 +9257,51 @@
- || (type && TREE_CODE (type) == VECTOR_TYPE
- && int_size_in_bytes (type) >= 16))
- return 128;
-- else if (((TARGET_MACHO && rs6000_darwin64_abi)
-- || DEFAULT_ABI == ABI_ELFv2
-- || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
-- && mode == BLKmode
-- && type && TYPE_ALIGN (type) > 64)
-+
-+ /* Aggregate types that need > 8 byte alignment are quadword-aligned
-+ in the parameter area in the ELFv2 ABI, and in the AIX ABI unless
-+ -mcompat-align-parm is used. */
-+ if (((DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm)
-+ || DEFAULT_ABI == ABI_ELFv2)
-+ && type && TYPE_ALIGN (type) > 64)
-+ {
-+ /* "Aggregate" means any AGGREGATE_TYPE except for single-element
-+ or homogeneous float/vector aggregates here. We already handled
-+ vector aggregates above, but still need to check for float here. */
-+ bool aggregate_p = (AGGREGATE_TYPE_P (type)
-+ && !SCALAR_FLOAT_MODE_P (elt_mode));
-+
-+ /* We used to check for BLKmode instead of the above aggregate type
-+ check. Warn when this results in any difference to the ABI. */
-+ if (aggregate_p != (mode == BLKmode))
-+ {
-+ static bool warned;
-+ if (!warned && warn_psabi)
-+ {
-+ warned = true;
-+ inform (input_location,
-+ "the ABI of passing aggregates with %d-byte alignment"
-+ " will change in a future GCC release",
-+ (int) TYPE_ALIGN (type) / BITS_PER_UNIT);
-+ }
-+ }
-+
-+ /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
-+ keep using the BLKmode check, but warn if there will be differences
-+ in future GCC releases. */
-+ if (mode == BLKmode)
-+ return 128;
-+ }
-+
-+ /* Similar for the Darwin64 ABI. Note that for historical reasons we
-+ implement the "aggregate type" check as a BLKmode check here; this
-+ means certain aggregate types are in fact not aligned. */
-+ if (TARGET_MACHO && rs6000_darwin64_abi
-+ && mode == BLKmode
-+ && type && TYPE_ALIGN (type) > 64)
- return 128;
-- else
-- return PARM_BOUNDARY;
-+
-+ return PARM_BOUNDARY;
- }
-
- /* The offset in words to the start of the parameter save area. */
-@@ -10243,6 +10339,7 @@
- rtx r, off;
- int i, k = 0;
- unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;
-+ int fpr_words;
-
- /* Do we also need to pass this argument in the parameter
- save area? */
-@@ -10271,6 +10368,37 @@
- rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
- }
-
-+ /* If there were not enough FPRs to hold the argument, the rest
-+ usually goes into memory. However, if the current position
-+ is still within the register parameter area, a portion may
-+ actually have to go into GPRs.
-+
-+ Note that it may happen that the portion of the argument
-+ passed in the first "half" of the first GPR was already
-+ passed in the last FPR as well.
-+
-+ For unnamed arguments, we already set up GPRs to cover the
-+ whole argument in rs6000_psave_function_arg, so there is
-+ nothing further to do at this point.
-+
-+ GCC 4.8/4.9 Note: This was implemented incorrectly in earlier
-+ GCC releases. To avoid any ABI change on the release branch,
-+ we retain that original implementation here, but warn if we
-+ encounter a case where the ABI will change in the future. */
-+ fpr_words = (i * GET_MODE_SIZE (elt_mode)) / (TARGET_32BIT ? 4 : 8);
-+ if (i < n_elts && align_words + fpr_words < GP_ARG_NUM_REG
-+ && cum->nargs_prototype > 0)
-+ {
-+ static bool warned;
-+ if (!warned && warn_psabi)
-+ {
-+ warned = true;
-+ inform (input_location,
-+ "the ABI of passing homogeneous float aggregates"
-+ " will change in a future GCC release");
-+ }
-+ }
-+
- return rs6000_finish_function_arg (mode, rvec, k);
- }
- else if (align_words < GP_ARG_NUM_REG)
-@@ -10497,10 +10625,9 @@
- list, or passes any parameter in memory. */
-
- static bool
--rs6000_function_parms_need_stack (tree fun)
-+rs6000_function_parms_need_stack (tree fun, bool incoming)
- {
-- function_args_iterator args_iter;
-- tree arg_type;
-+ tree fntype, result;
- CUMULATIVE_ARGS args_so_far_v;
- cumulative_args_t args_so_far;
-
-@@ -10507,26 +10634,57 @@
- if (!fun)
- /* Must be a libcall, all of which only use reg parms. */
- return false;
-+
-+ fntype = fun;
- if (!TYPE_P (fun))
-- fun = TREE_TYPE (fun);
-+ fntype = TREE_TYPE (fun);
-
- /* Varargs functions need the parameter save area. */
-- if (!prototype_p (fun) || stdarg_p (fun))
-+ if ((!incoming && !prototype_p (fntype)) || stdarg_p (fntype))
- return true;
-
-- INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fun, NULL_RTX);
-+ INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fntype, NULL_RTX);
- args_so_far = pack_cumulative_args (&args_so_far_v);
-
-- if (aggregate_value_p (TREE_TYPE (fun), fun))
-+ /* When incoming, we will have been passed the function decl.
-+ It is necessary to use the decl to handle K&R style functions,
-+ where TYPE_ARG_TYPES may not be available. */
-+ if (incoming)
- {
-- tree type = build_pointer_type (TREE_TYPE (fun));
-- rs6000_parm_needs_stack (args_so_far, type);
-+ gcc_assert (DECL_P (fun));
-+ result = DECL_RESULT (fun);
- }
-+ else
-+ result = TREE_TYPE (fntype);
-
-- FOREACH_FUNCTION_ARGS (fun, arg_type, args_iter)
-- if (rs6000_parm_needs_stack (args_so_far, arg_type))
-- return true;
-+ if (result && aggregate_value_p (result, fntype))
-+ {
-+ if (!TYPE_P (result))
-+ result = TREE_TYPE (result);
-+ result = build_pointer_type (result);
-+ rs6000_parm_needs_stack (args_so_far, result);
-+ }
-
-+ if (incoming)
-+ {
-+ tree parm;
-+
-+ for (parm = DECL_ARGUMENTS (fun);
-+ parm && parm != void_list_node;
-+ parm = TREE_CHAIN (parm))
-+ if (rs6000_parm_needs_stack (args_so_far, TREE_TYPE (parm)))
-+ return true;
-+ }
-+ else
-+ {
-+ function_args_iterator args_iter;
-+ tree arg_type;
-+
-+ FOREACH_FUNCTION_ARGS (fntype, arg_type, args_iter)
-+ if (rs6000_parm_needs_stack (args_so_far, arg_type))
-+ return true;
-+ }
-+
- return false;
- }
-
-@@ -10537,7 +10695,7 @@
- all parameters in registers. */
-
- int
--rs6000_reg_parm_stack_space (tree fun)
-+rs6000_reg_parm_stack_space (tree fun, bool incoming)
- {
- int reg_parm_stack_space;
-
-@@ -10555,7 +10713,7 @@
- case ABI_ELFv2:
- /* ??? Recomputing this every time is a bit expensive. Is there
- a place to cache this information? */
-- if (rs6000_function_parms_need_stack (fun))
-+ if (rs6000_function_parms_need_stack (fun, incoming))
- reg_parm_stack_space = TARGET_64BIT ? 64 : 32;
- else
- reg_parm_stack_space = 0;
-@@ -13544,11 +13702,15 @@
- else if ((fnmask & (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
- == (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
- error ("Builtin function %s requires the -mhard-dfp and"
-- "-mpower8-vector options", name);
-+ " -mpower8-vector options", name);
- else if ((fnmask & RS6000_BTM_DFP) != 0)
- error ("Builtin function %s requires the -mhard-dfp option", name);
- else if ((fnmask & RS6000_BTM_P8_VECTOR) != 0)
- error ("Builtin function %s requires the -mpower8-vector option", name);
-+ 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"
-+ " -mlong-double-128 options", name);
- else if ((fnmask & RS6000_BTM_HARD_FLOAT) != 0)
- error ("Builtin function %s requires the -mhard-float option", name);
- else
-@@ -13649,8 +13811,8 @@
- case ALTIVEC_BUILTIN_MASK_FOR_LOAD:
- case ALTIVEC_BUILTIN_MASK_FOR_STORE:
- {
-- int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr
-- : (int) CODE_FOR_altivec_lvsl);
-+ int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr_direct
-+ : (int) CODE_FOR_altivec_lvsl_direct);
- enum machine_mode tmode = insn_data[icode].operand[0].mode;
- enum machine_mode mode = insn_data[icode].operand[1].mode;
- tree arg;
-@@ -13678,7 +13840,6 @@
- || ! (*insn_data[icode].operand[0].predicate) (target, tmode))
- target = gen_reg_rtx (tmode);
-
-- /*pat = gen_altivec_lvsr (target, op);*/
- pat = GEN_FCN (icode) (target, op);
- if (!pat)
- return 0;
-@@ -17099,7 +17260,14 @@
- prefer Altivec loads.. */
- if (rclass == VSX_REGS)
- {
-- if (GET_MODE_SIZE (mode) <= 8)
-+ if (MEM_P (x) && reg_addr[mode].scalar_in_vmx_p)
-+ {
-+ rtx addr = XEXP (x, 0);
-+ if (rs6000_legitimate_offset_address_p (mode, addr, false, true)
-+ || legitimate_lo_sum_address_p (mode, addr, false))
-+ return FLOAT_REGS;
-+ }
-+ else if (GET_MODE_SIZE (mode) <= 8 && !reg_addr[mode].scalar_in_vmx_p)
- return FLOAT_REGS;
-
- if (VECTOR_UNIT_ALTIVEC_P (mode) || VECTOR_MEM_ALTIVEC_P (mode)
-@@ -31413,6 +31581,7 @@
- { "htm", RS6000_BTM_HTM, false, false },
- { "hard-dfp", RS6000_BTM_DFP, false, false },
- { "hard-float", RS6000_BTM_HARD_FLOAT, false, false },
-+ { "long-double-128", RS6000_BTM_LDBL128, false, false },
- };
-
- /* Option variables that we want to support inside attribute((target)) and
-@@ -32663,25 +32832,14 @@
- \f
- /* Return true if the peephole2 can combine a load involving a combination of
- an addis instruction and a load with an offset that can be fused together on
-- a power8.
-+ a power8. */
-
-- The operands are:
-- operands[0] register set with addis
-- operands[1] value set via addis
-- operands[2] target register being loaded
-- operands[3] D-form memory reference using operands[0].
--
-- In addition, we are passed a boolean that is true if this is a peephole2,
-- and we can use see if the addis_reg is dead after the insn and can be
-- replaced by the target register. */
--
- bool
--fusion_gpr_load_p (rtx *operands, bool peep2_p)
-+fusion_gpr_load_p (rtx addis_reg, /* register set via addis. */
-+ rtx addis_value, /* addis value. */
-+ rtx target, /* target register that is loaded. */
-+ rtx mem) /* bottom part of the memory addr. */
- {
-- rtx addis_reg = operands[0];
-- rtx addis_value = operands[1];
-- rtx target = operands[2];
-- rtx mem = operands[3];
- rtx addr;
- rtx base_reg;
-
-@@ -32695,9 +32853,6 @@
- if (!fusion_gpr_addis (addis_value, GET_MODE (addis_value)))
- return false;
-
-- if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
-- return false;
--
- /* Allow sign/zero extension. */
- if (GET_CODE (mem) == ZERO_EXTEND
- || (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN))
-@@ -32706,22 +32861,22 @@
- if (!MEM_P (mem))
- return false;
-
-+ if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
-+ return false;
-+
- addr = XEXP (mem, 0); /* either PLUS or LO_SUM. */
- if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
- return false;
-
- /* Validate that the register used to load the high value is either the
-- register being loaded, or we can safely replace its use in a peephole2.
-+ register being loaded, or we can safely replace its use.
-
-- If this is a peephole2, we assume that there are 2 instructions in the
-- peephole (addis and load), so we want to check if the target register was
-- not used in the memory address and the register to hold the addis result
-- is dead after the peephole. */
-+ This function is only called from the peephole2 pass and we assume that
-+ there are 2 instructions in the peephole (addis and load), so we want to
-+ check if the target register was not used in the memory address and the
-+ register to hold the addis result is dead after the peephole. */
- if (REGNO (addis_reg) != REGNO (target))
- {
-- if (!peep2_p)
-- return false;
--
- if (reg_mentioned_p (target, mem))
- return false;
-
-@@ -32762,9 +32917,6 @@
- enum machine_mode extend_mode = target_mode;
- enum machine_mode ptr_mode = Pmode;
- enum rtx_code extend = UNKNOWN;
-- rtx addis_reg = ((ptr_mode == target_mode)
-- ? target
-- : simplify_subreg (ptr_mode, target, target_mode, 0));
-
- if (GET_CODE (orig_mem) == ZERO_EXTEND
- || (TARGET_P8_FUSION_SIGN && GET_CODE (orig_mem) == SIGN_EXTEND))
-@@ -32781,13 +32933,14 @@
- gcc_assert (plus_or_lo_sum == PLUS || plus_or_lo_sum == LO_SUM);
-
- offset = XEXP (orig_addr, 1);
-- new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_reg, offset);
-- new_mem = change_address (orig_mem, target_mode, new_addr);
-+ new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_value, offset);
-+ new_mem = replace_equiv_address_nv (orig_mem, new_addr);
-
- if (extend != UNKNOWN)
- new_mem = gen_rtx_fmt_e (ZERO_EXTEND, extend_mode, new_mem);
-
-- emit_insn (gen_rtx_SET (VOIDmode, addis_reg, addis_value));
-+ new_mem = gen_rtx_UNSPEC (extend_mode, gen_rtvec (1, new_mem),
-+ UNSPEC_FUSION_GPR);
- emit_insn (gen_rtx_SET (VOIDmode, target, new_mem));
-
- if (extend == SIGN_EXTEND)
-@@ -32806,55 +32959,40 @@
- }
-
- /* Return a string to fuse an addis instruction with a gpr load to the same
-- register that we loaded up the addis instruction. The code is complicated,
-- so we call output_asm_insn directly, and just return "".
-+ register that we loaded up the addis instruction. The address that is used
-+ is the logical address that was formed during peephole2:
-+ (lo_sum (high) (low-part))
-
-- The operands are:
-- operands[0] register set with addis (must be same reg as target).
-- operands[1] value set via addis
-- operands[2] target register being loaded
-- operands[3] D-form memory reference using operands[0]. */
-+ The code is complicated, so we call output_asm_insn directly, and just
-+ return "". */
-
- const char *
--emit_fusion_gpr_load (rtx *operands)
-+emit_fusion_gpr_load (rtx target, rtx mem)
- {
-- rtx addis_reg = operands[0];
-- rtx addis_value = operands[1];
-- rtx target = operands[2];
-- rtx mem = operands[3];
-+ rtx addis_value;
- rtx fuse_ops[10];
- rtx addr;
- rtx load_offset;
- const char *addis_str = NULL;
- const char *load_str = NULL;
-- const char *extend_insn = NULL;
- const char *mode_name = NULL;
- char insn_template[80];
- enum machine_mode mode;
- const char *comment_str = ASM_COMMENT_START;
-- bool sign_p = false;
-
-- gcc_assert (REG_P (addis_reg) && REG_P (target));
-- gcc_assert (REGNO (addis_reg) == REGNO (target));
-+ if (GET_CODE (mem) == ZERO_EXTEND)
-+ mem = XEXP (mem, 0);
-
-+ gcc_assert (REG_P (target) && MEM_P (mem));
-+
- if (*comment_str == ' ')
- comment_str++;
-
-- /* Allow sign/zero extension. */
-- if (GET_CODE (mem) == ZERO_EXTEND)
-- mem = XEXP (mem, 0);
--
-- else if (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN)
-- {
-- sign_p = true;
-- mem = XEXP (mem, 0);
-- }
--
-- gcc_assert (MEM_P (mem));
- addr = XEXP (mem, 0);
- if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
- gcc_unreachable ();
-
-+ addis_value = XEXP (addr, 0);
- load_offset = XEXP (addr, 1);
-
- /* Now emit the load instruction to the same register. */
-@@ -32864,29 +33002,22 @@
- case QImode:
- mode_name = "char";
- load_str = "lbz";
-- extend_insn = "extsb %0,%0";
- break;
-
- case HImode:
- mode_name = "short";
- load_str = "lhz";
-- extend_insn = "extsh %0,%0";
- break;
-
- case SImode:
- mode_name = "int";
- load_str = "lwz";
-- extend_insn = "extsw %0,%0";
- break;
-
- case DImode:
-- if (TARGET_POWERPC64)
-- {
-- mode_name = "long";
-- load_str = "ld";
-- }
-- else
-- gcc_unreachable ();
-+ gcc_assert (TARGET_POWERPC64);
-+ mode_name = "long";
-+ load_str = "ld";
- break;
-
- default:
-@@ -33030,14 +33161,6 @@
- else
- fatal_insn ("Unable to generate load offset for fusion", load_offset);
-
-- /* Handle sign extension. The peephole2 pass generates this as a separate
-- insn, but we handle it just in case it got reattached. */
-- if (sign_p)
-- {
-- gcc_assert (extend_insn != NULL);
-- output_asm_insn (extend_insn, fuse_ops);
-- }
--
- return "";
- }
-
-Index: gcc/config/rs6000/vsx.md
-===================================================================
---- gcc/config/rs6000/vsx.md (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/rs6000/vsx.md (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -24,6 +24,13 @@
- ;; Iterator for the 2 64-bit vector types
- (define_mode_iterator VSX_D [V2DF V2DI])
-
-+;; Iterator for the 2 64-bit vector types + 128-bit types that are loaded with
-+;; lxvd2x to properly handle swapping words on little endian
-+(define_mode_iterator VSX_LE [V2DF
-+ V2DI
-+ V1TI
-+ (TI "VECTOR_MEM_VSX_P (TImode)")])
-+
- ;; Iterator for the 2 32-bit vector types
- (define_mode_iterator VSX_W [V4SF V4SI])
-
-@@ -79,19 +86,26 @@
- (V4SF "wf")
- (V2DI "wd")
- (V2DF "wd")
-+ (DI "wi")
- (DF "ws")
-- (SF "d")
-+ (SF "ww")
- (V1TI "v")
- (TI "wt")])
-
--;; Map the register class used for float<->int conversions
-+;; Map the register class used for float<->int conversions (floating point side)
-+;; VSr2 is the preferred register class, VSr3 is any register class that will
-+;; hold the data
- (define_mode_attr VSr2 [(V2DF "wd")
- (V4SF "wf")
-- (DF "ws")])
-+ (DF "ws")
-+ (SF "ww")
-+ (DI "wi")])
-
- (define_mode_attr VSr3 [(V2DF "wa")
- (V4SF "wa")
-- (DF "ws")])
-+ (DF "ws")
-+ (SF "ww")
-+ (DI "wi")])
-
- ;; Map the register class for sp<->dp float conversions, destination
- (define_mode_attr VSr4 [(SF "ws")
-@@ -99,12 +113,27 @@
- (V2DF "wd")
- (V4SF "v")])
-
--;; Map the register class for sp<->dp float conversions, destination
-+;; Map the register class for sp<->dp float conversions, source
- (define_mode_attr VSr5 [(SF "ws")
- (DF "f")
- (V2DF "v")
- (V4SF "wd")])
-
-+;; The VSX register class that a type can occupy, even if it is not the
-+;; preferred register class (VSr is the preferred register class that will get
-+;; allocated first).
-+(define_mode_attr VSa [(V16QI "wa")
-+ (V8HI "wa")
-+ (V4SI "wa")
-+ (V4SF "wa")
-+ (V2DI "wa")
-+ (V2DF "wa")
-+ (DI "wi")
-+ (DF "ws")
-+ (SF "ww")
-+ (V1TI "wa")
-+ (TI "wt")])
-+
- ;; Same size integer type for floating point data
- (define_mode_attr VSi [(V4SF "v4si")
- (V2DF "v2di")
-@@ -200,6 +229,16 @@
- (V2DF "V4DF")
- (V1TI "V2TI")])
-
-+;; Map register class for 64-bit element in 128-bit vector for direct moves
-+;; to/from gprs
-+(define_mode_attr VS_64dm [(V2DF "wk")
-+ (V2DI "wj")])
-+
-+;; Map register class for 64-bit element in 128-bit vector for normal register
-+;; to register moves
-+(define_mode_attr VS_64reg [(V2DF "ws")
-+ (V2DI "wi")])
-+
- ;; Constants for creating unspecs
- (define_c_enum "unspec"
- [UNSPEC_VSX_CONCAT
-@@ -228,8 +267,8 @@
- ;; The patterns for LE permuted loads and stores come before the general
- ;; VSX moves so they match first.
- (define_insn_and_split "*vsx_le_perm_load_<mode>"
-- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
-- (match_operand:VSX_D 1 "memory_operand" "Z"))]
-+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
-+ (match_operand:VSX_LE 1 "memory_operand" "Z"))]
- "!BYTES_BIG_ENDIAN && TARGET_VSX"
- "#"
- "!BYTES_BIG_ENDIAN && TARGET_VSX"
-@@ -251,7 +290,7 @@
- (set_attr "length" "8")])
-
- (define_insn_and_split "*vsx_le_perm_load_<mode>"
-- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
-+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
- (match_operand:VSX_W 1 "memory_operand" "Z"))]
- "!BYTES_BIG_ENDIAN && TARGET_VSX"
- "#"
-@@ -342,8 +381,8 @@
- (set_attr "length" "8")])
-
- (define_insn "*vsx_le_perm_store_<mode>"
-- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
-- (match_operand:VSX_D 1 "vsx_register_operand" "+wa"))]
-+ [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
-+ (match_operand:VSX_LE 1 "vsx_register_operand" "+<VSa>"))]
- "!BYTES_BIG_ENDIAN && TARGET_VSX"
- "#"
- [(set_attr "type" "vecstore")
-@@ -350,8 +389,8 @@
- (set_attr "length" "12")])
-
- (define_split
-- [(set (match_operand:VSX_D 0 "memory_operand" "")
-- (match_operand:VSX_D 1 "vsx_register_operand" ""))]
-+ [(set (match_operand:VSX_LE 0 "memory_operand" "")
-+ (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
- "!BYTES_BIG_ENDIAN && TARGET_VSX && !reload_completed"
- [(set (match_dup 2)
- (vec_select:<MODE>
-@@ -369,8 +408,8 @@
- ;; The post-reload split requires that we re-permute the source
- ;; register in case it is still live.
- (define_split
-- [(set (match_operand:VSX_D 0 "memory_operand" "")
-- (match_operand:VSX_D 1 "vsx_register_operand" ""))]
-+ [(set (match_operand:VSX_LE 0 "memory_operand" "")
-+ (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
- "!BYTES_BIG_ENDIAN && TARGET_VSX && reload_completed"
- [(set (match_dup 1)
- (vec_select:<MODE>
-@@ -388,7 +427,7 @@
-
- (define_insn "*vsx_le_perm_store_<mode>"
- [(set (match_operand:VSX_W 0 "memory_operand" "=Z")
-- (match_operand:VSX_W 1 "vsx_register_operand" "+wa"))]
-+ (match_operand:VSX_W 1 "vsx_register_operand" "+<VSa>"))]
- "!BYTES_BIG_ENDIAN && TARGET_VSX"
- "#"
- [(set_attr "type" "vecstore")
-@@ -578,8 +617,8 @@
-
-
- (define_insn "*vsx_mov<mode>"
-- [(set (match_operand:VSX_M 0 "nonimmediate_operand" "=Z,<VSr>,<VSr>,?Z,?wa,?wa,wQ,?&r,??Y,??r,??r,<VSr>,?wa,*r,v,wZ, v")
-- (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,wa,Z,wa,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
-+ [(set (match_operand:VSX_M 0 "nonimmediate_operand" "=Z,<VSr>,<VSr>,?Z,?<VSa>,?<VSa>,wQ,?&r,??Y,??r,??r,<VSr>,?<VSa>,*r,v,wZ, v")
-+ (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,<VSa>,Z,<VSa>,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
- "VECTOR_MEM_VSX_P (<MODE>mode)
- && (register_operand (operands[0], <MODE>mode)
- || register_operand (operands[1], <MODE>mode))"
-@@ -681,9 +720,9 @@
- ;; instructions are now combined with the insn for the traditional floating
- ;; point unit.
- (define_insn "*vsx_add<mode>3"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
-- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
-+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvadd<VSs> %x0,%x1,%x2"
- [(set_attr "type" "<VStype_simple>")
-@@ -690,9 +729,9 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "*vsx_sub<mode>3"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
-- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
-+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvsub<VSs> %x0,%x1,%x2"
- [(set_attr "type" "<VStype_simple>")
-@@ -699,9 +738,9 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "*vsx_mul<mode>3"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
-- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
-+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvmul<VSs> %x0,%x1,%x2"
- [(set_attr "type" "<VStype_simple>")
-@@ -708,9 +747,9 @@
- (set_attr "fp_type" "<VSfptype_mul>")])
-
- (define_insn "*vsx_div<mode>3"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
-- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
-+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvdiv<VSs> %x0,%x1,%x2"
- [(set_attr "type" "<VStype_div>")
-@@ -746,8 +785,8 @@
-
- (define_insn "*vsx_tdiv<mode>3_internal"
- [(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
-- (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")
-- (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,wa")]
-+ (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")
-+ (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,<VSa>")]
- UNSPEC_VSX_TDIV))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "x<VSv>tdiv<VSs> %0,%x1,%x2"
-@@ -755,8 +794,8 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "vsx_fre<mode>2"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
- UNSPEC_FRES))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvre<VSs> %x0,%x1"
-@@ -764,8 +803,8 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "*vsx_neg<mode>2"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvneg<VSs> %x0,%x1"
- [(set_attr "type" "<VStype_simple>")
-@@ -772,8 +811,8 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "*vsx_abs<mode>2"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvabs<VSs> %x0,%x1"
- [(set_attr "type" "<VStype_simple>")
-@@ -780,10 +819,10 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "vsx_nabs<mode>2"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
- (neg:VSX_F
- (abs:VSX_F
-- (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa"))))]
-+ (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>"))))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvnabs<VSs> %x0,%x1"
- [(set_attr "type" "<VStype_simple>")
-@@ -790,9 +829,9 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "vsx_smax<mode>3"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
-- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
-+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvmax<VSs> %x0,%x1,%x2"
- [(set_attr "type" "<VStype_simple>")
-@@ -799,9 +838,9 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "*vsx_smin<mode>3"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
-- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
-+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvmin<VSs> %x0,%x1,%x2"
- [(set_attr "type" "<VStype_simple>")
-@@ -808,8 +847,8 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "*vsx_sqrt<mode>2"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvsqrt<VSs> %x0,%x1"
- [(set_attr "type" "<VStype_sqrt>")
-@@ -816,8 +855,8 @@
- (set_attr "fp_type" "<VSfptype_sqrt>")])
-
- (define_insn "*vsx_rsqrte<mode>2"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
- UNSPEC_RSQRT))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvrsqrte<VSs> %x0,%x1"
-@@ -852,7 +891,7 @@
-
- (define_insn "*vsx_tsqrt<mode>2_internal"
- [(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
-- (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
-+ (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
- UNSPEC_VSX_TSQRT))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "x<VSv>tsqrt<VSs> %0,%x1"
-@@ -865,11 +904,11 @@
- ;; multiply.
-
- (define_insn "*vsx_fmav4sf4"
-- [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,ws,?wa,?wa,v")
-+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,wf,?wa,?wa,v")
- (fma:V4SF
-- (match_operand:V4SF 1 "vsx_register_operand" "%ws,ws,wa,wa,v")
-- (match_operand:V4SF 2 "vsx_register_operand" "ws,0,wa,0,v")
-- (match_operand:V4SF 3 "vsx_register_operand" "0,ws,0,wa,v")))]
-+ (match_operand:V4SF 1 "vsx_register_operand" "%wf,wf,wa,wa,v")
-+ (match_operand:V4SF 2 "vsx_register_operand" "wf,0,wa,0,v")
-+ (match_operand:V4SF 3 "vsx_register_operand" "0,wf,0,wa,v")))]
- "VECTOR_UNIT_VSX_P (V4SFmode)"
- "@
- xvmaddasp %x0,%x1,%x2
-@@ -880,11 +919,11 @@
- [(set_attr "type" "vecfloat")])
-
- (define_insn "*vsx_fmav2df4"
-- [(set (match_operand:V2DF 0 "vsx_register_operand" "=ws,ws,?wa,?wa")
-+ [(set (match_operand:V2DF 0 "vsx_register_operand" "=wd,wd,?wa,?wa")
- (fma:V2DF
-- (match_operand:V2DF 1 "vsx_register_operand" "%ws,ws,wa,wa")
-- (match_operand:V2DF 2 "vsx_register_operand" "ws,0,wa,0")
-- (match_operand:V2DF 3 "vsx_register_operand" "0,ws,0,wa")))]
-+ (match_operand:V2DF 1 "vsx_register_operand" "%wd,wd,wa,wa")
-+ (match_operand:V2DF 2 "vsx_register_operand" "wd,0,wa,0")
-+ (match_operand:V2DF 3 "vsx_register_operand" "0,wd,0,wa")))]
- "VECTOR_UNIT_VSX_P (V2DFmode)"
- "@
- xvmaddadp %x0,%x1,%x2
-@@ -894,12 +933,12 @@
- [(set_attr "type" "vecdouble")])
-
- (define_insn "*vsx_fms<mode>4"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
- (fma:VSX_F
-- (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,wa,wa")
-- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
-+ (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,<VSa>,<VSa>")
-+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
- (neg:VSX_F
-- (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
-+ (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "@
- xvmsuba<VSs> %x0,%x1,%x2
-@@ -909,12 +948,12 @@
- [(set_attr "type" "<VStype_mul>")])
-
- (define_insn "*vsx_nfma<mode>4"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
- (neg:VSX_F
- (fma:VSX_F
-- (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,wa,wa")
-- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
-- (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
-+ (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,<VSa>,<VSa>")
-+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
-+ (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "@
- xvnmadda<VSs> %x0,%x1,%x2
-@@ -959,9 +998,9 @@
-
- ;; Vector conditional expressions (no scalar version for these instructions)
- (define_insn "vsx_eq<mode>"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
-- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
-+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvcmpeq<VSs> %x0,%x1,%x2"
- [(set_attr "type" "<VStype_simple>")
-@@ -968,9 +1007,9 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "vsx_gt<mode>"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
-- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
-+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvcmpgt<VSs> %x0,%x1,%x2"
- [(set_attr "type" "<VStype_simple>")
-@@ -977,9 +1016,9 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "*vsx_ge<mode>"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
-- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
-+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvcmpge<VSs> %x0,%x1,%x2"
- [(set_attr "type" "<VStype_simple>")
-@@ -990,10 +1029,10 @@
- (define_insn "*vsx_eq_<mode>_p"
- [(set (reg:CC 74)
- (unspec:CC
-- [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
-- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
-+ [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
-+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
- UNSPEC_PREDICATE))
-- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
- (eq:VSX_F (match_dup 1)
- (match_dup 2)))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
-@@ -1003,10 +1042,10 @@
- (define_insn "*vsx_gt_<mode>_p"
- [(set (reg:CC 74)
- (unspec:CC
-- [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
-- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
-+ [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
-+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
- UNSPEC_PREDICATE))
-- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
- (gt:VSX_F (match_dup 1)
- (match_dup 2)))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
-@@ -1016,10 +1055,10 @@
- (define_insn "*vsx_ge_<mode>_p"
- [(set (reg:CC 74)
- (unspec:CC
-- [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
-- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
-+ [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
-+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
- UNSPEC_PREDICATE))
-- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
- (ge:VSX_F (match_dup 1)
- (match_dup 2)))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
-@@ -1028,23 +1067,23 @@
-
- ;; Vector select
- (define_insn "*vsx_xxsel<mode>"
-- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
-+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
- (if_then_else:VSX_L
-- (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
-+ (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
- (match_operand:VSX_L 4 "zero_constant" ""))
-- (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
-- (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
-+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
-+ (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
- "VECTOR_MEM_VSX_P (<MODE>mode)"
- "xxsel %x0,%x3,%x2,%x1"
- [(set_attr "type" "vecperm")])
-
- (define_insn "*vsx_xxsel<mode>_uns"
-- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
-+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
- (if_then_else:VSX_L
-- (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
-+ (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
- (match_operand:VSX_L 4 "zero_constant" ""))
-- (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
-- (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
-+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
-+ (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
- "VECTOR_MEM_VSX_P (<MODE>mode)"
- "xxsel %x0,%x3,%x2,%x1"
- [(set_attr "type" "vecperm")])
-@@ -1051,10 +1090,10 @@
-
- ;; Copy sign
- (define_insn "vsx_copysign<mode>3"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
- (unspec:VSX_F
-- [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
-- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")]
-+ [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
-+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")]
- UNSPEC_COPYSIGN))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvcpsgn<VSs> %x0,%x2,%x1"
-@@ -1067,7 +1106,7 @@
- ;; in rs6000.md so don't test VECTOR_UNIT_VSX_P, just test against VSX.
- ;; Don't use vsx_register_operand here, use gpc_reg_operand to match rs6000.md.
- (define_insn "vsx_float<VSi><mode>2"
-- [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
-+ [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
- (float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "x<VSv>cvsx<VSc><VSs> %x0,%x1"
-@@ -1075,7 +1114,7 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "vsx_floatuns<VSi><mode>2"
-- [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
-+ [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
- (unsigned_float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "x<VSv>cvux<VSc><VSs> %x0,%x1"
-@@ -1084,7 +1123,7 @@
-
- (define_insn "vsx_fix_trunc<mode><VSi>2"
- [(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
-- (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
-+ (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "x<VSv>cv<VSs>sx<VSc>s %x0,%x1"
- [(set_attr "type" "<VStype_simple>")
-@@ -1092,7 +1131,7 @@
-
- (define_insn "vsx_fixuns_trunc<mode><VSi>2"
- [(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
-- (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
-+ (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "x<VSv>cv<VSs>ux<VSc>s %x0,%x1"
- [(set_attr "type" "<VStype_simple>")
-@@ -1100,8 +1139,8 @@
-
- ;; Math rounding functions
- (define_insn "vsx_x<VSv>r<VSs>i"
-- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
-- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
-+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
- UNSPEC_VSX_ROUND_I))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "x<VSv>r<VSs>i %x0,%x1"
-@@ -1109,8 +1148,8 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "vsx_x<VSv>r<VSs>ic"
-- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
-- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
-+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
- UNSPEC_VSX_ROUND_IC))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "x<VSv>r<VSs>ic %x0,%x1"
-@@ -1118,8 +1157,8 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "vsx_btrunc<mode>2"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvr<VSs>iz %x0,%x1"
- [(set_attr "type" "<VStype_simple>")
-@@ -1126,8 +1165,8 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "*vsx_b2trunc<mode>2"
-- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
-- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
-+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
- UNSPEC_FRIZ))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "x<VSv>r<VSs>iz %x0,%x1"
-@@ -1135,8 +1174,8 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "vsx_floor<mode>2"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
- UNSPEC_FRIM))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvr<VSs>im %x0,%x1"
-@@ -1144,8 +1183,8 @@
- (set_attr "fp_type" "<VSfptype_simple>")])
-
- (define_insn "vsx_ceil<mode>2"
-- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
-- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
-+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
-+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
- UNSPEC_FRIP))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "xvr<VSs>ip %x0,%x1"
-@@ -1160,8 +1199,8 @@
- ;; scalar single precision instructions internally use the double format.
- ;; Prefer the altivec registers, since we likely will need to do a vperm
- (define_insn "vsx_<VS_spdp_insn>"
-- [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?wa")
-- (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,wa")]
-+ [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?<VSa>")
-+ (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,<VSa>")]
- UNSPEC_VSX_CVSPDP))]
- "VECTOR_UNIT_VSX_P (<MODE>mode)"
- "<VS_spdp_insn> %x0,%x1"
-@@ -1169,8 +1208,8 @@
-
- ;; xscvspdp, represent the scalar SF type as V4SF
- (define_insn "vsx_xscvspdp"
-- [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
-- (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
-+ [(set (match_operand:DF 0 "vsx_register_operand" "=ws")
-+ (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa")]
- UNSPEC_VSX_CVSPDP))]
- "VECTOR_UNIT_VSX_P (V4SFmode)"
- "xscvspdp %x0,%x1"
-@@ -1197,7 +1236,7 @@
-
- ;; ISA 2.07 xscvdpspn/xscvspdpn that does not raise an error on signalling NaNs
- (define_insn "vsx_xscvdpspn"
-- [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,?wa")
-+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=ww,?ww")
- (unspec:V4SF [(match_operand:DF 1 "vsx_register_operand" "wd,wa")]
- UNSPEC_VSX_CVDPSPN))]
- "TARGET_XSCVDPSPN"
-@@ -1205,8 +1244,8 @@
- [(set_attr "type" "fp")])
-
- (define_insn "vsx_xscvspdpn"
-- [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
-- (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
-+ [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?ws")
-+ (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wf,wa")]
- UNSPEC_VSX_CVSPDPN))]
- "TARGET_XSCVSPDPN"
- "xscvspdpn %x0,%x1"
-@@ -1213,8 +1252,8 @@
- [(set_attr "type" "fp")])
-
- (define_insn "vsx_xscvdpspn_scalar"
-- [(set (match_operand:V4SF 0 "vsx_register_operand" "=wa")
-- (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "f")]
-+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,?wa")
-+ (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "ww,ww")]
- UNSPEC_VSX_CVDPSPN))]
- "TARGET_XSCVDPSPN"
- "xscvdpspn %x0,%x1"
-@@ -1302,10 +1341,10 @@
- ;; since the xsrdpiz instruction does not truncate the value if the floating
- ;; point value is < LONG_MIN or > LONG_MAX.
- (define_insn "*vsx_float_fix_<mode>2"
-- [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?wa")
-+ [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?<VSa>")
- (float:VSX_DF
- (fix:<VSI>
-- (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?wa"))))]
-+ (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?<VSa>"))))]
- "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
- && VECTOR_UNIT_VSX_P (<MODE>mode) && flag_unsafe_math_optimizations
- && !flag_trapping_math && TARGET_FRIZ"
-@@ -1318,10 +1357,10 @@
-
- ;; Build a V2DF/V2DI vector from two scalars
- (define_insn "vsx_concat_<mode>"
-- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?wa")
-+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?<VSa>")
- (vec_concat:VSX_D
-- (match_operand:<VS_scalar> 1 "vsx_register_operand" "ws,wa")
-- (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")))]
-+ (match_operand:<VS_scalar> 1 "vsx_register_operand" "<VS_64reg>,<VSa>")
-+ (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")))]
- "VECTOR_MEM_VSX_P (<MODE>mode)"
- {
- if (BYTES_BIG_ENDIAN)
-@@ -1352,9 +1391,9 @@
- ;; xxpermdi for little endian loads and stores. We need several of
- ;; these since the form of the PARALLEL differs by mode.
- (define_insn "*vsx_xxpermdi2_le_<mode>"
-- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
-- (vec_select:VSX_D
-- (match_operand:VSX_D 1 "vsx_register_operand" "wa")
-+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
-+ (vec_select:VSX_LE
-+ (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
- (parallel [(const_int 1) (const_int 0)])))]
- "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
- "xxpermdi %x0,%x1,%x1,2"
-@@ -1361,9 +1400,9 @@
- [(set_attr "type" "vecperm")])
-
- (define_insn "*vsx_xxpermdi4_le_<mode>"
-- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
-+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
- (vec_select:VSX_W
-- (match_operand:VSX_W 1 "vsx_register_operand" "wa")
-+ (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
- (parallel [(const_int 2) (const_int 3)
- (const_int 0) (const_int 1)])))]
- "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
-@@ -1401,9 +1440,9 @@
- ;; lxvd2x for little endian loads. We need several of
- ;; these since the form of the PARALLEL differs by mode.
- (define_insn "*vsx_lxvd2x2_le_<mode>"
-- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
-- (vec_select:VSX_D
-- (match_operand:VSX_D 1 "memory_operand" "Z")
-+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
-+ (vec_select:VSX_LE
-+ (match_operand:VSX_LE 1 "memory_operand" "Z")
- (parallel [(const_int 1) (const_int 0)])))]
- "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
- "lxvd2x %x0,%y1"
-@@ -1410,7 +1449,7 @@
- [(set_attr "type" "vecload")])
-
- (define_insn "*vsx_lxvd2x4_le_<mode>"
-- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
-+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
- (vec_select:VSX_W
- (match_operand:VSX_W 1 "memory_operand" "Z")
- (parallel [(const_int 2) (const_int 3)
-@@ -1450,9 +1489,9 @@
- ;; stxvd2x for little endian stores. We need several of
- ;; these since the form of the PARALLEL differs by mode.
- (define_insn "*vsx_stxvd2x2_le_<mode>"
-- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
-- (vec_select:VSX_D
-- (match_operand:VSX_D 1 "vsx_register_operand" "wa")
-+ [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
-+ (vec_select:VSX_LE
-+ (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
- (parallel [(const_int 1) (const_int 0)])))]
- "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
- "stxvd2x %x1,%y0"
-@@ -1461,7 +1500,7 @@
- (define_insn "*vsx_stxvd2x4_le_<mode>"
- [(set (match_operand:VSX_W 0 "memory_operand" "=Z")
- (vec_select:VSX_W
-- (match_operand:VSX_W 1 "vsx_register_operand" "wa")
-+ (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
- (parallel [(const_int 2) (const_int 3)
- (const_int 0) (const_int 1)])))]
- "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
-@@ -1513,11 +1552,12 @@
-
- ;; Set the element of a V2DI/VD2F mode
- (define_insn "vsx_set_<mode>"
-- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?wa")
-- (unspec:VSX_D [(match_operand:VSX_D 1 "vsx_register_operand" "wd,wa")
-- (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")
-- (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
-- UNSPEC_VSX_SET))]
-+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?<VSa>")
-+ (unspec:VSX_D
-+ [(match_operand:VSX_D 1 "vsx_register_operand" "wd,<VSa>")
-+ (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")
-+ (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
-+ UNSPEC_VSX_SET))]
- "VECTOR_MEM_VSX_P (<MODE>mode)"
- {
- int idx_first = BYTES_BIG_ENDIAN ? 0 : 1;
-@@ -1582,7 +1622,7 @@
- (define_insn_and_split "vsx_extract_v4sf"
- [(set (match_operand:SF 0 "vsx_register_operand" "=f,f")
- (vec_select:SF
-- (match_operand:V4SF 1 "vsx_register_operand" "wa,wa")
-+ (match_operand:V4SF 1 "vsx_register_operand" "<VSa>,<VSa>")
- (parallel [(match_operand:QI 2 "u5bit_cint_operand" "O,i")])))
- (clobber (match_scratch:V4SF 3 "=X,0"))]
- "VECTOR_UNIT_VSX_P (V4SFmode)"
-@@ -1606,7 +1646,7 @@
- {
- if (GET_CODE (op3) == SCRATCH)
- op3 = gen_reg_rtx (V4SFmode);
-- emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, op2));
-+ emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, GEN_INT (ele)));
- tmp = op3;
- }
- emit_insn (gen_vsx_xscvspdp_scalar2 (op0, tmp));
-@@ -1765,9 +1805,9 @@
-
- ;; V2DF/V2DI splat
- (define_insn "vsx_splat_<mode>"
-- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?wa,?wa,?wa")
-+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?<VSa>,?<VSa>,?<VSa>")
- (vec_duplicate:VSX_D
-- (match_operand:<VS_scalar> 1 "splat_input_operand" "ws,f,Z,wa,wa,Z")))]
-+ (match_operand:<VS_scalar> 1 "splat_input_operand" "<VS_64reg>,f,Z,<VSa>,<VSa>,Z")))]
- "VECTOR_MEM_VSX_P (<MODE>mode)"
- "@
- xxpermdi %x0,%x1,%x1,0
-@@ -1780,10 +1820,10 @@
-
- ;; V4SF/V4SI splat
- (define_insn "vsx_xxspltw_<mode>"
-- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
-+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
- (vec_duplicate:VSX_W
- (vec_select:<VS_scalar>
-- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
-+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
- (parallel
- [(match_operand:QI 2 "u5bit_cint_operand" "i,i")]))))]
- "VECTOR_MEM_VSX_P (<MODE>mode)"
-@@ -1796,8 +1836,8 @@
- [(set_attr "type" "vecperm")])
-
- (define_insn "vsx_xxspltw_<mode>_direct"
-- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
-- (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
-+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
-+ (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
- (match_operand:QI 2 "u5bit_cint_operand" "i,i")]
- UNSPEC_VSX_XXSPLTW))]
- "VECTOR_MEM_VSX_P (<MODE>mode)"
-@@ -1806,11 +1846,11 @@
-
- ;; V4SF/V4SI interleave
- (define_insn "vsx_xxmrghw_<mode>"
-- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
-+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
- (vec_select:VSX_W
- (vec_concat:<VS_double>
-- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
-- (match_operand:VSX_W 2 "vsx_register_operand" "wf,wa"))
-+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
-+ (match_operand:VSX_W 2 "vsx_register_operand" "wf,<VSa>"))
- (parallel [(const_int 0) (const_int 4)
- (const_int 1) (const_int 5)])))]
- "VECTOR_MEM_VSX_P (<MODE>mode)"
-@@ -1823,11 +1863,11 @@
- [(set_attr "type" "vecperm")])
-
- (define_insn "vsx_xxmrglw_<mode>"
-- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
-+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
- (vec_select:VSX_W
- (vec_concat:<VS_double>
-- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
-- (match_operand:VSX_W 2 "vsx_register_operand" "wf,?wa"))
-+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
-+ (match_operand:VSX_W 2 "vsx_register_operand" "wf,?<VSa>"))
- (parallel [(const_int 2) (const_int 6)
- (const_int 3) (const_int 7)])))]
- "VECTOR_MEM_VSX_P (<MODE>mode)"
-@@ -1841,9 +1881,9 @@
-
- ;; Shift left double by word immediate
- (define_insn "vsx_xxsldwi_<mode>"
-- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=wa")
-- (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "wa")
-- (match_operand:VSX_L 2 "vsx_register_operand" "wa")
-+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSa>")
-+ (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "<VSa>")
-+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSa>")
- (match_operand:QI 3 "u5bit_cint_operand" "i")]
- UNSPEC_VSX_SLDWI))]
- "VECTOR_MEM_VSX_P (<MODE>mode)"
-@@ -1924,7 +1964,7 @@
- ;; to the top element of the V2DF array without doing an extract.
-
- (define_insn_and_split "*vsx_reduc_<VEC_reduc_name>_v2df_scalar"
-- [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?wa,ws,?wa")
-+ [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?ws,ws,?ws")
- (vec_select:DF
- (VEC_reduc:V2DF
- (vec_concat:V2DF
-Index: gcc/config/rs6000/rs6000.h
-===================================================================
---- gcc/config/rs6000/rs6000.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/rs6000/rs6000.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1438,6 +1438,10 @@
- RS6000_CONSTRAINT_wd, /* VSX register for V2DF */
- RS6000_CONSTRAINT_wf, /* VSX register for V4SF */
- RS6000_CONSTRAINT_wg, /* FPR register for -mmfpgpr */
-+ RS6000_CONSTRAINT_wh, /* FPR register for direct moves. */
-+ RS6000_CONSTRAINT_wi, /* FPR/VSX register to hold DImode */
-+ RS6000_CONSTRAINT_wj, /* FPR/VSX register for DImode direct moves. */
-+ RS6000_CONSTRAINT_wk, /* FPR/VSX register for DFmode direct moves. */
- RS6000_CONSTRAINT_wl, /* FPR register for LFIWAX */
- RS6000_CONSTRAINT_wm, /* VSX register for direct move */
- RS6000_CONSTRAINT_wr, /* GPR register if 64-bit */
-@@ -1462,6 +1466,9 @@
- #define VSX_REG_CLASS_P(CLASS) \
- ((CLASS) == VSX_REGS || (CLASS) == FLOAT_REGS || (CLASS) == ALTIVEC_REGS)
-
-+/* Return whether a given register class targets general purpose registers. */
-+#define GPR_REG_CLASS_P(CLASS) ((CLASS) == GENERAL_REGS || (CLASS) == BASE_REGS)
-+
- /* Given an rtx X being reloaded into a reg required to be
- in class CLASS, return the class of reg to actually use.
- In general this is just CLASS; but on some machines
-@@ -1593,8 +1600,15 @@
- /* Define this if stack space is still allocated for a parameter passed
- in a register. The value is the number of bytes allocated to this
- area. */
--#define REG_PARM_STACK_SPACE(FNDECL) rs6000_reg_parm_stack_space((FNDECL))
-+#define REG_PARM_STACK_SPACE(FNDECL) \
-+ rs6000_reg_parm_stack_space ((FNDECL), false)
-
-+/* Define this macro if space guaranteed when compiling a function body
-+ is different to space required when making a call, a situation that
-+ can arise with K&R style function definitions. */
-+#define INCOMING_REG_PARM_STACK_SPACE(FNDECL) \
-+ rs6000_reg_parm_stack_space ((FNDECL), true)
-+
- /* Define this if the above stack space is to be considered part of the
- space allocated by the caller. */
- #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
-@@ -2483,8 +2497,8 @@
- #define RS6000_BTC_SAT RS6000_BTC_MISC /* saturate sets VSCR. */
-
- /* Builtin targets. For now, we reuse the masks for those options that are in
-- target flags, and pick two random bits for SPE and paired which aren't in
-- target_flags. */
-+ target flags, and pick three random bits for SPE, paired and ldbl128 which
-+ aren't in target_flags. */
- #define RS6000_BTM_ALWAYS 0 /* Always enabled. */
- #define RS6000_BTM_ALTIVEC MASK_ALTIVEC /* VMX/altivec vectors. */
- #define RS6000_BTM_VSX MASK_VSX /* VSX (vector/scalar). */
-@@ -2501,6 +2515,7 @@
- #define RS6000_BTM_CELL MASK_FPRND /* Target is cell powerpc. */
- #define RS6000_BTM_DFP MASK_DFP /* Decimal floating point. */
- #define RS6000_BTM_HARD_FLOAT MASK_SOFT_FLOAT /* Hardware floating point. */
-+#define RS6000_BTM_LDBL128 MASK_MULTIPLE /* 128-bit long double. */
-
- #define RS6000_BTM_COMMON (RS6000_BTM_ALTIVEC \
- | RS6000_BTM_VSX \
-@@ -2514,7 +2529,8 @@
- | RS6000_BTM_POPCNTD \
- | RS6000_BTM_CELL \
- | RS6000_BTM_DFP \
-- | RS6000_BTM_HARD_FLOAT)
-+ | RS6000_BTM_HARD_FLOAT \
-+ | RS6000_BTM_LDBL128)
-
- /* Define builtin enum index. */
-
-Index: gcc/config/rs6000/altivec.md
-===================================================================
---- gcc/config/rs6000/altivec.md (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/rs6000/altivec.md (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -2297,7 +2297,31 @@
- "dststt %0,%1,%2"
- [(set_attr "type" "vecsimple")])
-
--(define_insn "altivec_lvsl"
-+(define_expand "altivec_lvsl"
-+ [(use (match_operand:V16QI 0 "register_operand" ""))
-+ (use (match_operand:V16QI 1 "memory_operand" ""))]
-+ "TARGET_ALTIVEC"
-+{
-+ if (VECTOR_ELT_ORDER_BIG)
-+ emit_insn (gen_altivec_lvsl_direct (operands[0], operands[1]));
-+ else
-+ {
-+ int i;
-+ rtx mask, perm[16], constv, vperm;
-+ mask = gen_reg_rtx (V16QImode);
-+ emit_insn (gen_altivec_lvsl_direct (mask, operands[1]));
-+ for (i = 0; i < 16; ++i)
-+ perm[i] = GEN_INT (i);
-+ constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
-+ constv = force_reg (V16QImode, constv);
-+ vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
-+ UNSPEC_VPERM);
-+ emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
-+ }
-+ DONE;
-+})
-+
-+(define_insn "altivec_lvsl_direct"
- [(set (match_operand:V16QI 0 "register_operand" "=v")
- (unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
- UNSPEC_LVSL))]
-@@ -2305,7 +2329,31 @@
- "lvsl %0,%y1"
- [(set_attr "type" "vecload")])
-
--(define_insn "altivec_lvsr"
-+(define_expand "altivec_lvsr"
-+ [(use (match_operand:V16QI 0 "register_operand" ""))
-+ (use (match_operand:V16QI 1 "memory_operand" ""))]
-+ "TARGET_ALTIVEC"
-+{
-+ if (VECTOR_ELT_ORDER_BIG)
-+ emit_insn (gen_altivec_lvsr_direct (operands[0], operands[1]));
-+ else
-+ {
-+ int i;
-+ rtx mask, perm[16], constv, vperm;
-+ mask = gen_reg_rtx (V16QImode);
-+ emit_insn (gen_altivec_lvsr_direct (mask, operands[1]));
-+ for (i = 0; i < 16; ++i)
-+ perm[i] = GEN_INT (i);
-+ constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
-+ constv = force_reg (V16QImode, constv);
-+ vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
-+ UNSPEC_VPERM);
-+ emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
-+ }
-+ DONE;
-+})
-+
-+(define_insn "altivec_lvsr_direct"
- [(set (match_operand:V16QI 0 "register_operand" "=v")
- (unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
- UNSPEC_LVSR))]
-Index: gcc/config/rs6000/rs6000.md
-===================================================================
---- gcc/config/rs6000/rs6000.md (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/rs6000/rs6000.md (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -134,6 +134,7 @@
- UNSPEC_UNPACK_128BIT
- UNSPEC_PACK_128BIT
- UNSPEC_LSQ
-+ UNSPEC_FUSION_GPR
- ])
-
- ;;
-@@ -317,8 +318,25 @@
- (define_mode_attr f32_sv [(SF "stxsspx %x1,%y0") (SD "stxsiwzx %x1,%y0")])
-
- ; Definitions for 32-bit fpr direct move
--(define_mode_attr f32_dm [(SF "wn") (SD "wm")])
-+; At present, the decimal modes are not allowed in the traditional altivec
-+; registers, so restrict the constraints to just the traditional FPRs.
-+(define_mode_attr f32_dm [(SF "wn") (SD "wh")])
-
-+; Definitions for 32-bit VSX
-+(define_mode_attr f32_vsx [(SF "ww") (SD "wn")])
-+
-+; Definitions for 32-bit use of altivec registers
-+(define_mode_attr f32_av [(SF "wu") (SD "wn")])
-+
-+; Definitions for 64-bit VSX
-+(define_mode_attr f64_vsx [(DF "ws") (DD "wn")])
-+
-+; Definitions for 64-bit direct move
-+(define_mode_attr f64_dm [(DF "wk") (DD "wh")])
-+
-+; Definitions for 64-bit use of altivec registers
-+(define_mode_attr f64_av [(DF "wv") (DD "wn")])
-+
- ; These modes do not fit in integer registers in 32-bit mode.
- ; but on e500v2, the gpr are 64 bit registers
- (define_mode_iterator DIFD [DI (DF "!TARGET_E500_DOUBLE") DD])
-@@ -424,7 +442,7 @@
- ;; either.
-
- ;; Mode attribute for boolean operation register constraints for output
--(define_mode_attr BOOL_REGS_OUTPUT [(TI "&r,r,r,wa,v")
-+(define_mode_attr BOOL_REGS_OUTPUT [(TI "&r,r,r,wt,v")
- (PTI "&r,r,r")
- (V16QI "wa,v,&?r,?r,?r")
- (V8HI "wa,v,&?r,?r,?r")
-@@ -435,7 +453,7 @@
- (V1TI "wa,v,&?r,?r,?r")])
-
- ;; Mode attribute for boolean operation register constraints for operand1
--(define_mode_attr BOOL_REGS_OP1 [(TI "r,0,r,wa,v")
-+(define_mode_attr BOOL_REGS_OP1 [(TI "r,0,r,wt,v")
- (PTI "r,0,r")
- (V16QI "wa,v,r,0,r")
- (V8HI "wa,v,r,0,r")
-@@ -446,7 +464,7 @@
- (V1TI "wa,v,r,0,r")])
-
- ;; Mode attribute for boolean operation register constraints for operand2
--(define_mode_attr BOOL_REGS_OP2 [(TI "r,r,0,wa,v")
-+(define_mode_attr BOOL_REGS_OP2 [(TI "r,r,0,wt,v")
- (PTI "r,r,0")
- (V16QI "wa,v,r,r,0")
- (V8HI "wa,v,r,r,0")
-@@ -459,7 +477,7 @@
- ;; Mode attribute for boolean operation register constraints for operand1
- ;; for one_cmpl. To simplify things, we repeat the constraint where 0
- ;; is used for operand1 or operand2
--(define_mode_attr BOOL_REGS_UNARY [(TI "r,0,0,wa,v")
-+(define_mode_attr BOOL_REGS_UNARY [(TI "r,0,0,wt,v")
- (PTI "r,0,0")
- (V16QI "wa,v,r,0,0")
- (V8HI "wa,v,r,0,0")
-@@ -566,7 +584,7 @@
- "")
-
- (define_insn "*zero_extendsidi2_lfiwzx"
-- [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wz,!wu")
-+ [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wz,!wu")
- (zero_extend:DI (match_operand:SI 1 "reg_or_mem_operand" "m,r,r,Z,Z")))]
- "TARGET_POWERPC64 && TARGET_LFIWZX"
- "@
-@@ -736,8 +754,8 @@
- "")
-
- (define_insn "*extendsidi2_lfiwax"
-- [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wl,!wu")
-- (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r,r,Z,Z")))]
-+ [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wl,!wu")
-+ (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r,r,Z,Z")))]
- "TARGET_POWERPC64 && TARGET_LFIWAX"
- "@
- lwa%U1%X1 %0,%1
-@@ -760,7 +778,7 @@
-
- (define_insn "*extendsidi2_nocell"
- [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
-- (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))]
-+ (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r")))]
- "TARGET_POWERPC64 && rs6000_gen_cell_microcode && !TARGET_LFIWAX"
- "@
- lwa%U1%X1 %0,%1
-@@ -5614,7 +5632,7 @@
- ; We don't define lfiwax/lfiwzx with the normal definition, because we
- ; don't want to support putting SImode in FPR registers.
- (define_insn "lfiwax"
-- [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
-+ [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
- (unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
- UNSPEC_LFIWAX))]
- "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWAX"
-@@ -5694,7 +5712,7 @@
- (set_attr "type" "fpload")])
-
- (define_insn "lfiwzx"
-- [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
-+ [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
- (unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
- UNSPEC_LFIWZX))]
- "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWZX"
-@@ -9210,8 +9228,8 @@
- }")
-
- (define_insn "mov<mode>_hardfloat"
-- [(set (match_operand:FMOVE32 0 "nonimmediate_operand" "=!r,!r,m,f,wa,wa,<f32_lr>,<f32_sm>,wu,Z,?<f32_dm>,?r,*c*l,!r,*h,!r,!r")
-- (match_operand:FMOVE32 1 "input_operand" "r,m,r,f,wa,j,<f32_lm>,<f32_sr>,Z,wu,r,<f32_dm>,r,h,0,G,Fn"))]
-+ [(set (match_operand:FMOVE32 0 "nonimmediate_operand" "=!r,!r,m,f,<f32_vsx>,<f32_vsx>,<f32_lr>,<f32_sm>,<f32_av>,Z,?<f32_dm>,?r,*c*l,!r,*h,!r,!r")
-+ (match_operand:FMOVE32 1 "input_operand" "r,m,r,f,<f32_vsx>,j,<f32_lm>,<f32_sr>,Z,<f32_av>,r,<f32_dm>,r, h, 0, G,Fn"))]
- "(gpc_reg_operand (operands[0], <MODE>mode)
- || gpc_reg_operand (operands[1], <MODE>mode))
- && (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT)"
-@@ -9422,8 +9440,8 @@
- ;; reloading.
-
- (define_insn "*mov<mode>_hardfloat32"
-- [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,wv,Z,wa,wa,Y,r,!r,!r,!r,!r")
-- (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,wv,wa,j,r,Y,r,G,H,F"))]
-+ [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,<f64_av>,Z,<f64_vsx>,<f64_vsx>,Y,r,!r,!r,!r,!r")
-+ (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,<f64_av>,<f64_vsx>,j,r,Y,r,G,H,F"))]
- "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
- && (gpc_reg_operand (operands[0], <MODE>mode)
- || gpc_reg_operand (operands[1], <MODE>mode))"
-@@ -9491,8 +9509,8 @@
- ; ld/std require word-aligned displacements -> 'Y' constraint.
- ; List Y->r and r->Y before r->r for reload.
- (define_insn "*mov<mode>_hardfloat64"
-- [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,wv,Z,wa,wa,Y,r,!r,*c*l,!r,*h,!r,!r,!r,r,wg,r,wm")
-- (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,wv,wa,j,r,Y,r,r,h,0,G,H,F,wg,r,wm,r"))]
-+ [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,<f64_av>,Z,<f64_vsx>,<f64_vsx>,Y,r,!r,*c*l,!r,*h,!r,!r,!r,r,wg,r,<f64_dm>")
-+ (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,<f64_av>,<f64_vsx>,j,r,Y,r,r,h,0,G,H,F,wg,r,<f64_dm>,r"))]
- "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
- && (gpc_reg_operand (operands[0], <MODE>mode)
- || gpc_reg_operand (operands[1], <MODE>mode))"
-@@ -10272,8 +10290,8 @@
- { rs6000_split_multireg_move (operands[0], operands[1]); DONE; })
-
- (define_insn "*movdi_internal64"
-- [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wm")
-- (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wm,r"))]
-+ [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wj,?*wi")
-+ (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wj,r,O"))]
- "TARGET_POWERPC64
- && (gpc_reg_operand (operands[0], DImode)
- || gpc_reg_operand (operands[1], DImode))"
-@@ -10293,7 +10311,8 @@
- mftgpr %0,%1
- mffgpr %0,%1
- mfvsrd %0,%x1
-- mtvsrd %x0,%1"
-+ mtvsrd %x0,%1
-+ xxlxor %x0,%x0,%x0"
- [(set_attr_alternative "type"
- [(if_then_else
- (match_test "update_indexed_address_mem (operands[0], VOIDmode)")
-@@ -10334,8 +10353,9 @@
- (const_string "mftgpr")
- (const_string "mffgpr")
- (const_string "mftgpr")
-- (const_string "mffgpr")])
-- (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4")])
-+ (const_string "mffgpr")
-+ (const_string "vecsimple")])
-+ (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4,4")])
-
- ;; immediate value valid for a single instruction hiding in a const_double
- (define_insn ""
-@@ -15751,23 +15771,10 @@
- ;; a GPR. The addis instruction must be adjacent to the load, and use the same
- ;; register that is being loaded. The fused ops must be physically adjacent.
-
--;; We use define_peephole for the actual addis/load, and the register used to
--;; hold the addis value must be the same as the register being loaded. We use
--;; define_peephole2 to change the register used for addis to be the register
--;; being loaded, since we can look at whether it is dead after the load insn.
-+;; Find cases where the addis that feeds into a load instruction is either used
-+;; once or is the same as the target register, and replace it with the fusion
-+;; insn
-
--(define_peephole
-- [(set (match_operand:P 0 "base_reg_operand" "")
-- (match_operand:P 1 "fusion_gpr_addis" ""))
-- (set (match_operand:INT1 2 "base_reg_operand" "")
-- (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
-- "TARGET_P8_FUSION && fusion_gpr_load_p (operands, false)"
--{
-- return emit_fusion_gpr_load (operands);
--}
-- [(set_attr "type" "load")
-- (set_attr "length" "8")])
--
- (define_peephole2
- [(set (match_operand:P 0 "base_reg_operand" "")
- (match_operand:P 1 "fusion_gpr_addis" ""))
-@@ -15774,9 +15781,8 @@
- (set (match_operand:INT1 2 "base_reg_operand" "")
- (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
- "TARGET_P8_FUSION
-- && (REGNO (operands[0]) != REGNO (operands[2])
-- || GET_CODE (operands[3]) == SIGN_EXTEND)
-- && fusion_gpr_load_p (operands, true)"
-+ && fusion_gpr_load_p (operands[0], operands[1], operands[2],
-+ operands[3])"
- [(const_int 0)]
- {
- expand_fusion_gpr_load (operands);
-@@ -15783,6 +15789,20 @@
- DONE;
- })
-
-+;; Fusion insn, created by the define_peephole2 above (and eventually by
-+;; reload)
-+
-+(define_insn "fusion_gpr_load_<mode>"
-+ [(set (match_operand:INT1 0 "base_reg_operand" "=&b")
-+ (unspec:INT1 [(match_operand:INT1 1 "fusion_gpr_mem_combo" "")]
-+ UNSPEC_FUSION_GPR))]
-+ "TARGET_P8_FUSION"
-+{
-+ return emit_fusion_gpr_load (operands[0], operands[1]);
-+}
-+ [(set_attr "type" "load")
-+ (set_attr "length" "8")])
-+
- \f
- ;; Miscellaneous ISA 2.06 (power7) instructions
- (define_insn "addg6s"
-@@ -15847,26 +15867,6 @@
- ""
- "")
-
--;; The Advance Toolchain 7.0-3 added private builtins: __builtin_longdouble_dw0
--;; and __builtin_longdouble_dw1 to optimize glibc. Add support for these
--;; builtins here.
--
--(define_expand "unpacktf_0"
-- [(set (match_operand:DF 0 "nonimmediate_operand" "")
-- (unspec:DF [(match_operand:TF 1 "register_operand" "")
-- (const_int 0)]
-- UNSPEC_UNPACK_128BIT))]
-- ""
-- "")
--
--(define_expand "unpacktf_1"
-- [(set (match_operand:DF 0 "nonimmediate_operand" "")
-- (unspec:DF [(match_operand:TF 1 "register_operand" "")
-- (const_int 1)]
-- UNSPEC_UNPACK_128BIT))]
-- ""
-- "")
--
- (define_insn_and_split "unpack<mode>_dm"
- [(set (match_operand:<FP128_64> 0 "nonimmediate_operand" "=d,m,d,r,m")
- (unspec:<FP128_64>
-Index: gcc/config/rs6000/sysv4.h
-===================================================================
---- gcc/config/rs6000/sysv4.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/rs6000/sysv4.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -292,7 +292,7 @@
- /* An expression for the alignment of a structure field FIELD if the
- alignment computed in the usual way is COMPUTED. */
- #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
-- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
-+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
- ? 128 : COMPUTED)
-
- #undef BIGGEST_FIELD_ALIGNMENT
-@@ -949,3 +949,27 @@
- #define TARGET_USES_SYSV4_OPT 1
-
- #undef DBX_REGISTER_NUMBER
-+
-+/* Link -lasan early on the command line. For -static-libasan, don't link
-+ it for -shared link, the executable should be compiled with -static-libasan
-+ in that case, and for executable link link with --{,no-}whole-archive around
-+ it to force everything into the executable. And similarly for -ltsan. */
-+#if defined(HAVE_LD_STATIC_DYNAMIC)
-+#undef LIBASAN_EARLY_SPEC
-+#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
-+ "%{static-libasan:%{!shared:" \
-+ LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
-+ LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
-+#undef LIBTSAN_EARLY_SPEC
-+#define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
-+ LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
-+ LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
-+#endif
-+
-+/* Additional libraries needed by -static-libasan. */
-+#undef STATIC_LIBASAN_LIBS
-+#define STATIC_LIBASAN_LIBS "-ldl -lpthread"
-+
-+/* Additional libraries needed by -static-libtsan. */
-+#undef STATIC_LIBTSAN_LIBS
-+#define STATIC_LIBTSAN_LIBS "-ldl -lpthread"
-Index: gcc/config/arm/arm.c
-===================================================================
---- gcc/config/arm/arm.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/arm/arm.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -82,7 +82,6 @@
- static reg_class_t arm_preferred_reload_class (rtx, reg_class_t);
- static rtx thumb_legitimize_address (rtx, rtx, enum machine_mode);
- inline static int thumb1_index_register_rtx_p (rtx, int);
--static bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
- static int thumb_far_jump_used_p (void);
- static bool thumb_force_lr_save (void);
- static unsigned arm_size_return_regs (void);
-@@ -24476,9 +24475,13 @@
- fputs (":\n", file);
- if (flag_pic)
- {
-- /* Output ".word .LTHUNKn-7-.LTHUNKPCn". */
-+ /* Output ".word .LTHUNKn-[3,7]-.LTHUNKPCn". */
- rtx tem = XEXP (DECL_RTL (function), 0);
-- tem = gen_rtx_PLUS (GET_MODE (tem), tem, GEN_INT (-7));
-+ /* For TARGET_THUMB1_ONLY the thunk is in Thumb mode, so the PC
-+ pipeline offset is four rather than eight. Adjust the offset
-+ accordingly. */
-+ tem = plus_constant (GET_MODE (tem), tem,
-+ TARGET_THUMB1_ONLY ? -3 : -7);
- tem = gen_rtx_MINUS (GET_MODE (tem),
- tem,
- gen_rtx_SYMBOL_REF (Pmode,
-@@ -27462,4 +27465,13 @@
-
- }
-
-+/* return TRUE if x is a reference to a value in a constant pool */
-+extern bool
-+arm_is_constant_pool_ref (rtx x)
-+{
-+ return (MEM_P (x)
-+ && GET_CODE (XEXP (x, 0)) == SYMBOL_REF
-+ && CONSTANT_POOL_ADDRESS_P (XEXP (x, 0)));
-+}
-+
- #include "gt-arm.h"
-Index: gcc/config/arm/arm-protos.h
-===================================================================
---- gcc/config/arm/arm-protos.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/arm/arm-protos.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -55,6 +55,7 @@
- extern int legitimate_pic_operand_p (rtx);
- extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
- extern rtx legitimize_tls_address (rtx, rtx);
-+extern bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
- extern int arm_legitimate_address_outer_p (enum machine_mode, rtx, RTX_CODE, int);
- extern int thumb_legitimate_offset_p (enum machine_mode, HOST_WIDE_INT);
- extern bool arm_legitimize_reload_address (rtx *, enum machine_mode, int, int,
-@@ -286,4 +287,6 @@
-
- extern void arm_emit_eabi_attribute (const char *, int, int);
-
-+extern bool arm_is_constant_pool_ref (rtx);
-+
- #endif /* ! GCC_ARM_PROTOS_H */
-Index: gcc/config/arm/constraints.md
-===================================================================
---- gcc/config/arm/constraints.md (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/arm/constraints.md (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -36,7 +36,7 @@
- ;; in Thumb-2 state: Pj, PJ, Ps, Pt, Pu, Pv, Pw, Px, Py
-
- ;; The following memory constraints have been used:
--;; in ARM/Thumb-2 state: Q, Ut, Uv, Uy, Un, Um, Us
-+;; in ARM/Thumb-2 state: Q, Uh, Ut, Uv, Uy, Un, Um, Us
- ;; in ARM state: Uq
- ;; in Thumb state: Uu, Uw
-
-@@ -310,6 +310,12 @@
- An address valid for loading/storing register exclusive"
- (match_operand 0 "mem_noofs_operand"))
-
-+(define_memory_constraint "Uh"
-+ "@internal
-+ An address suitable for byte and half-word loads which does not point inside a constant pool"
-+ (and (match_code "mem")
-+ (match_test "arm_legitimate_address_p (GET_MODE (op), XEXP (op, 0), false) && !arm_is_constant_pool_ref (op)")))
-+
- (define_memory_constraint "Ut"
- "@internal
- In ARM/Thumb-2 state an address valid for loading/storing opaque structure
-@@ -356,7 +362,8 @@
- (and (match_code "mem")
- (match_test "TARGET_ARM
- && arm_legitimate_address_outer_p (GET_MODE (op), XEXP (op, 0),
-- SIGN_EXTEND, 0)")))
-+ SIGN_EXTEND, 0)
-+ && !arm_is_constant_pool_ref (op)")))
-
- (define_memory_constraint "Q"
- "@internal
-Index: gcc/config/arm/arm.md
-===================================================================
---- gcc/config/arm/arm.md (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/arm/arm.md (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -4047,7 +4047,7 @@
- (define_insn "unaligned_loadhis"
- [(set (match_operand:SI 0 "s_register_operand" "=l,r")
- (sign_extend:SI
-- (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,m")]
-+ (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,Uh")]
- UNSPEC_UNALIGNED_LOAD)))]
- "unaligned_access && TARGET_32BIT"
- "ldr%(sh%)\t%0, %1\t@ unaligned"
-@@ -4655,7 +4655,7 @@
-
- (define_insn "*arm_zero_extendhisi2_v6"
- [(set (match_operand:SI 0 "s_register_operand" "=r,r")
-- (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
-+ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
- "TARGET_ARM && arm_arch6"
- "@
- uxth%?\\t%0, %1
-@@ -4748,7 +4748,7 @@
-
- (define_insn "*arm_zero_extendqisi2_v6"
- [(set (match_operand:SI 0 "s_register_operand" "=r,r")
-- (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
-+ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,Uh")))]
- "TARGET_ARM && arm_arch6"
- "@
- uxtb%(%)\\t%0, %1
-@@ -4980,7 +4980,7 @@
-
- (define_insn "*arm_extendhisi2"
- [(set (match_operand:SI 0 "s_register_operand" "=r,r")
-- (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
-+ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
- "TARGET_ARM && arm_arch4 && !arm_arch6"
- "@
- #
-@@ -4987,23 +4987,19 @@
- ldr%(sh%)\\t%0, %1"
- [(set_attr "length" "8,4")
- (set_attr "type" "alu_shift,load_byte")
-- (set_attr "predicable" "yes")
-- (set_attr "pool_range" "*,256")
-- (set_attr "neg_pool_range" "*,244")]
-+ (set_attr "predicable" "yes")]
- )
-
- ;; ??? Check Thumb-2 pool range
- (define_insn "*arm_extendhisi2_v6"
- [(set (match_operand:SI 0 "s_register_operand" "=r,r")
-- (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
-+ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
- "TARGET_32BIT && arm_arch6"
- "@
- sxth%?\\t%0, %1
- ldr%(sh%)\\t%0, %1"
- [(set_attr "type" "simple_alu_shift,load_byte")
-- (set_attr "predicable" "yes")
-- (set_attr "pool_range" "*,256")
-- (set_attr "neg_pool_range" "*,244")]
-+ (set_attr "predicable" "yes")]
- )
-
- (define_insn "*arm_extendhisi2addsi"
-@@ -5045,9 +5041,7 @@
- "TARGET_ARM && arm_arch4"
- "ldr%(sb%)\\t%0, %1"
- [(set_attr "type" "load_byte")
-- (set_attr "predicable" "yes")
-- (set_attr "pool_range" "256")
-- (set_attr "neg_pool_range" "244")]
-+ (set_attr "predicable" "yes")]
- )
-
- (define_expand "extendqisi2"
-@@ -5087,9 +5081,7 @@
- ldr%(sb%)\\t%0, %1"
- [(set_attr "length" "8,4")
- (set_attr "type" "alu_shift,load_byte")
-- (set_attr "predicable" "yes")
-- (set_attr "pool_range" "*,256")
-- (set_attr "neg_pool_range" "*,244")]
-+ (set_attr "predicable" "yes")]
- )
-
- (define_insn "*arm_extendqisi_v6"
-@@ -5101,9 +5093,7 @@
- sxtb%?\\t%0, %1
- ldr%(sb%)\\t%0, %1"
- [(set_attr "type" "simple_alu_shift,load_byte")
-- (set_attr "predicable" "yes")
-- (set_attr "pool_range" "*,256")
-- (set_attr "neg_pool_range" "*,244")]
-+ (set_attr "predicable" "yes")]
- )
-
- (define_insn "*arm_extendqisi2addsi"
-@@ -7630,12 +7620,13 @@
-
- (define_insn "*arm_cmpdi_unsigned"
- [(set (reg:CC_CZ CC_REGNUM)
-- (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r")
-- (match_operand:DI 1 "arm_di_operand" "rDi")))]
-+ (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r,r")
-+ (match_operand:DI 1 "arm_di_operand" "rDi,rDi")))]
- "TARGET_32BIT"
- "cmp\\t%R0, %R1\;it eq\;cmpeq\\t%Q0, %Q1"
- [(set_attr "conds" "set")
-- (set_attr "length" "8")]
-+ (set_attr "arch" "a,t2")
-+ (set_attr "length" "8,10")]
- )
-
- (define_insn "*arm_cmpdi_zero"
-Index: gcc/config/arm/t-rtems-eabi
-===================================================================
---- gcc/config/arm/t-rtems-eabi (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/arm/t-rtems-eabi (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,47 +1,167 @@
- # Custom RTEMS EABI multilibs
-
--MULTILIB_OPTIONS = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard
--MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard
-+MULTILIB_OPTIONS = mbig-endian mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon/mfpu=vfpv3-d16/mfpu=fpv4-sp-d16 mfloat-abi=hard
-+MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m neon vfpv3-d16 fpv4-sp-d16 hard
-
- # Enumeration of multilibs
-
- MULTILIB_EXCEPTIONS =
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon
-+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfloat-abi=hard
-+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mthumb
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m
-+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon
-+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16
-+MULTILIB_EXCEPTIONS += mbig-endian/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mbig-endian
- MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
- MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon
-+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16
- MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard
- # MULTILIB_EXCEPTIONS += mthumb/march=armv6-m
- # MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
- MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon
-+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16
- MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard
- # MULTILIB_EXCEPTIONS += mthumb/march=armv7-a
- MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
- MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon
-+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16
- MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard
- # MULTILIB_EXCEPTIONS += mthumb/march=armv7-r
- MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
- MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon
-+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16
-+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16
- MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard
- # MULTILIB_EXCEPTIONS += mthumb/march=armv7-m
- MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard
- MULTILIB_EXCEPTIONS += mthumb/mfpu=neon
-+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16
- MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard
- # MULTILIB_EXCEPTIONS += mthumb
- MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard
- MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon
-+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16
- MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard
- MULTILIB_EXCEPTIONS += march=armv6-m
- MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard
- MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon
-+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16
- MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard
- MULTILIB_EXCEPTIONS += march=armv7-a
- MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard
- MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon
-+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16
- MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard
- MULTILIB_EXCEPTIONS += march=armv7-r
- MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard
- MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon
-+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16
- MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard
- MULTILIB_EXCEPTIONS += march=armv7-m
- MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard
- MULTILIB_EXCEPTIONS += mfpu=neon
-+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16
-+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16/mfloat-abi=hard
-+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16
- MULTILIB_EXCEPTIONS += mfloat-abi=hard
-Index: gcc/config/pa/pa.c
-===================================================================
---- gcc/config/pa/pa.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/config/pa/pa.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -3237,7 +3237,12 @@
- && aligned_p
- && function_label_operand (x, VOIDmode))
- {
-- fputs (size == 8? "\t.dword\tP%" : "\t.word\tP%", asm_out_file);
-+ fputs (size == 8? "\t.dword\t" : "\t.word\t", asm_out_file);
-+
-+ /* We don't want an OPD when generating fast indirect calls. */
-+ if (!TARGET_FAST_INDIRECT_CALLS)
-+ fputs ("P%", asm_out_file);
-+
- output_addr_const (asm_out_file, x);
- fputc ('\n', asm_out_file);
- return true;
-@@ -4160,9 +4165,8 @@
- pa_output_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
- {
- rtx insn = get_last_insn ();
-+ bool extra_nop;
-
-- last_address = 0;
--
- /* pa_expand_epilogue does the dirty work now. We just need
- to output the assembler directives which denote the end
- of a function.
-@@ -4185,14 +4189,16 @@
- if (insn && GET_CODE (insn) == CALL_INSN)
- {
- fputs ("\tnop\n", file);
-- last_address += 4;
-+ extra_nop = true;
- }
-+ else
-+ extra_nop = false;
-
- fputs ("\t.EXIT\n\t.PROCEND\n", file);
-
- if (TARGET_SOM && TARGET_GAS)
- {
-- /* We done with this subspace except possibly for some additional
-+ /* We are done with this subspace except possibly for some additional
- debug information. Forget that we are in this subspace to ensure
- that the next function is output in its own subspace. */
- in_section = NULL;
-@@ -4199,12 +4205,20 @@
- cfun->machine->in_nsubspa = 2;
- }
-
-+ /* Thunks do their own insn accounting. */
-+ if (cfun->is_thunk)
-+ return;
-+
- if (INSN_ADDRESSES_SET_P ())
- {
-+ last_address = extra_nop ? 4 : 0;
- insn = get_last_nonnote_insn ();
-- last_address += INSN_ADDRESSES (INSN_UID (insn));
-- if (INSN_P (insn))
-- last_address += insn_default_length (insn);
-+ if (insn)
-+ {
-+ last_address += INSN_ADDRESSES (INSN_UID (insn));
-+ if (INSN_P (insn))
-+ last_address += insn_default_length (insn);
-+ }
- last_address = ((last_address + FUNCTION_BOUNDARY / BITS_PER_UNIT - 1)
- & ~(FUNCTION_BOUNDARY / BITS_PER_UNIT - 1));
- }
-@@ -8270,8 +8284,7 @@
- xoperands[1] = XEXP (DECL_RTL (thunk_fndecl), 0);
- xoperands[2] = GEN_INT (delta);
-
-- ASM_OUTPUT_LABEL (file, XSTR (xoperands[1], 0));
-- fprintf (file, "\t.PROC\n\t.CALLINFO FRAME=0,NO_CALLS\n\t.ENTRY\n");
-+ final_start_function (emit_barrier (), file, 1);
-
- /* Output the thunk. We know that the function is in the same
- translation unit (i.e., the same space) as the thunk, and that
-@@ -8301,12 +8314,16 @@
- || ((DECL_SECTION_NAME (thunk_fndecl)
- == DECL_SECTION_NAME (function))
- && last_address < 262132)))
-+ /* In this case, we need to be able to reach the start of
-+ the stub table even though the function is likely closer
-+ and can be jumped to directly. */
- || (targetm_common.have_named_sections
- && DECL_SECTION_NAME (thunk_fndecl) == NULL
- && DECL_SECTION_NAME (function) == NULL
-- && last_address < 262132)
-+ && total_code_bytes < MAX_PCREL17F_OFFSET)
-+ /* Likewise. */
- || (!targetm_common.have_named_sections
-- && last_address < 262132))))
-+ && total_code_bytes < MAX_PCREL17F_OFFSET))))
- {
- if (!val_14)
- output_asm_insn ("addil L'%2,%%r26", xoperands);
-@@ -8477,17 +8494,8 @@
- }
- }
-
-- fprintf (file, "\t.EXIT\n\t.PROCEND\n");
-+ final_end_function ();
-
-- if (TARGET_SOM && TARGET_GAS)
-- {
-- /* We done with this subspace except possibly for some additional
-- debug information. Forget that we are in this subspace to ensure
-- that the next function is output in its own subspace. */
-- in_section = NULL;
-- cfun->machine->in_nsubspa = 2;
-- }
--
- if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
- {
- switch_to_section (data_section);
-Index: gcc/tree-vect-slp.c
-===================================================================
---- gcc/tree-vect-slp.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/tree-vect-slp.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1837,7 +1837,10 @@
- && (stmt_vinfo = vinfo_for_stmt (use_stmt))
- && !STMT_SLP_TYPE (stmt_vinfo)
- && (STMT_VINFO_RELEVANT (stmt_vinfo)
-- || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo)))
-+ || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo))
-+ || (STMT_VINFO_IN_PATTERN_P (stmt_vinfo)
-+ && STMT_VINFO_RELATED_STMT (stmt_vinfo)
-+ && !STMT_SLP_TYPE (vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt_vinfo)))))
- && !(gimple_code (use_stmt) == GIMPLE_PHI
- && STMT_VINFO_DEF_TYPE (stmt_vinfo)
- == vect_reduction_def))
-Index: gcc/regcprop.c
-===================================================================
---- gcc/regcprop.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ gcc/regcprop.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1039,7 +1039,17 @@
- but instead among CLOBBERs on the CALL_INSN, we could wrongly
- assume the value in it is still live. */
- if (ksvd.ignore_set_reg)
-- note_stores (PATTERN (insn), kill_clobbered_value, vd);
-+ {
-+ note_stores (PATTERN (insn), kill_clobbered_value, vd);
-+ for (exp = CALL_INSN_FUNCTION_USAGE (insn);
-+ exp;
-+ exp = XEXP (exp, 1))
-+ {
-+ rtx x = XEXP (exp, 0);
-+ if (GET_CODE (x) == CLOBBER)
-+ kill_value (SET_DEST (x), vd);
-+ }
-+ }
- }
-
- /* Notice stores. */
-Index: libobjc/encoding.c
-===================================================================
---- libobjc/encoding.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libobjc/encoding.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -192,6 +192,8 @@
- ? MAX (MAX (COMPUTED, SPECIFIED), 64) \
- : MAX (COMPUTED, SPECIFIED));})
-
-+#define rs6000_special_adjust_field_align_p(FIELD, COMPUTED) \
-+ (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)
-
- /* Skip a variable name, enclosed in quotes ("). */
- static inline
-Index: libobjc/ChangeLog
-===================================================================
---- libobjc/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libobjc/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,3 +1,16 @@
-+2014-07-27 Ulrich Weigand <uweigand@de.ibm.com>
-+
-+ PR libobjc/61920
-+ * encoding.c (rs6000_special_adjust_field_align_p): Use definition
-+ that matches the 4.8 branch ABI.
-+
-+2014-07-27 Alan Modra <amodra@gmail.com>
-+ Matthias Klose <doko@ubuntu.com>
-+
-+ PR libobjc/61920
-+
-+ * encoding.c: Define rs6000_special_adjust_field_align_p.
-+
- 2014-05-22 Release Manager
-
- * GCC 4.8.3 released.
-Index: libgfortran/m4/in_pack.m4
-===================================================================
---- libgfortran/m4/in_pack.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/m4/in_pack.m4 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -79,7 +79,7 @@
- return source->base_addr;
-
- /* Allocate storage for the destination. */
-- destptr = ('rtype_name` *)xmalloc (ssize * sizeof ('rtype_name`));
-+ destptr = xmallocarray (ssize, sizeof ('rtype_name`));
- dest = destptr;
- src = source->base_addr;
- stride0 = stride[0];
-Index: libgfortran/m4/pack.m4
-===================================================================
---- libgfortran/m4/pack.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/m4/pack.m4 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -168,8 +168,8 @@
-
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (sizeof ('rtype_name`) * total);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (total, sizeof ('rtype_name`));
-
- if (total == 0)
- return;
-Index: libgfortran/m4/spread.m4
-===================================================================
---- libgfortran/m4/spread.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/m4/spread.m4 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -102,8 +102,8 @@
- }
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (rs * sizeof('rtype_name`));
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (rs, sizeof('rtype_name`));
- if (rs <= 0)
- return;
- }
-@@ -245,7 +245,7 @@
-
- if (ret->base_addr == NULL)
- {
-- ret->base_addr = xmalloc (ncopies * sizeof ('rtype_name`));
-+ ret->base_addr = xmallocarray (ncopies, sizeof ('rtype_name`));
- ret->offset = 0;
- GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
- }
-Index: libgfortran/m4/transpose.m4
-===================================================================
---- libgfortran/m4/transpose.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/m4/transpose.m4 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -61,7 +61,8 @@
- GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
- GFC_DESCRIPTOR_EXTENT(source, 1));
-
-- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) ret));
-+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
-+ sizeof ('rtype_name`));
- ret->offset = 0;
- } else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/m4/iforeach.m4
-===================================================================
---- libgfortran/m4/iforeach.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/m4/iforeach.m4 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -30,7 +30,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
- }
- else
- {
-@@ -133,7 +133,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
- }
- else
- {
-@@ -264,7 +264,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/m4/eoshift1.m4
-===================================================================
---- libgfortran/m4/eoshift1.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/m4/eoshift1.m4 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -106,8 +106,8 @@
- GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
-
- }
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (size * arraysize);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (arraysize, size);
-
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/m4/eoshift3.m4
-===================================================================
---- libgfortran/m4/eoshift3.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/m4/eoshift3.m4 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -90,7 +90,7 @@
- {
- int i;
-
-- ret->base_addr = xmalloc (size * arraysize);
-+ ret->base_addr = xmallocarray (arraysize, size);
- ret->offset = 0;
- ret->dtype = array->dtype;
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
-@@ -108,8 +108,8 @@
- GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
-
- }
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (size * arraysize);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (arraysize, size);
-
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/m4/shape.m4
-===================================================================
---- libgfortran/m4/shape.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/m4/shape.m4 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -50,7 +50,7 @@
- {
- GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
- ret->offset = 0;
-- ret->base_addr = xmalloc (sizeof ('rtype_name`) * rank);
-+ ret->base_addr = xmallocarray (rank, sizeof ('rtype_name`));
- }
-
- stride = GFC_DESCRIPTOR_STRIDE(ret,0);
-Index: libgfortran/m4/cshift1.m4
-===================================================================
---- libgfortran/m4/cshift1.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/m4/cshift1.m4 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -81,7 +81,7 @@
- {
- int i;
-
-- ret->base_addr = xmalloc (size * arraysize);
-+ ret->base_addr = xmallocarray (arraysize, size);
- ret->offset = 0;
- ret->dtype = array->dtype;
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
-Index: libgfortran/m4/matmull.m4
-===================================================================
---- libgfortran/m4/matmull.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/m4/matmull.m4 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -89,7 +89,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/m4/bessel.m4
-===================================================================
---- libgfortran/m4/bessel.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/m4/bessel.m4 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -56,7 +56,7 @@
- {
- size_t size = n2 < n1 ? 0 : n2-n1+1;
- GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
-- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
-+ ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
- ret->offset = 0;
- }
-
-@@ -123,7 +123,7 @@
- {
- size_t size = n2 < n1 ? 0 : n2-n1+1;
- GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
-- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
-+ ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
- ret->offset = 0;
- }
-
-@@ -163,7 +163,7 @@
-
- x2rev = GFC_REAL_'rtype_kind`_LITERAL(2.)/x;
-
-- for (i = 2; i <= n1+n2; i++)
-+ for (i = 2; i <= n2 - n1; i++)
- {
- #if defined('rtype_name`_INFINITY)
- if (unlikely (last2 == -'rtype_name`_INFINITY))
-Index: libgfortran/m4/unpack.m4
-===================================================================
---- libgfortran/m4/unpack.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/m4/unpack.m4 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -100,7 +100,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
-+ ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
- }
- else
- {
-@@ -245,7 +245,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
-+ ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
- }
- else
- {
-Index: libgfortran/m4/reshape.m4
-===================================================================
---- libgfortran/m4/reshape.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/m4/reshape.m4 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -115,11 +115,11 @@
- ret->offset = 0;
-
- if (unlikely (rs < 1))
-- alloc_size = 1;
-+ alloc_size = 0;
- else
-- alloc_size = rs * sizeof ('rtype_name`);
-+ alloc_size = rs;
-
-- ret->base_addr = xmalloc (alloc_size);
-+ ret->base_addr = xmallocarray (alloc_size, sizeof ('rtype_name`));
- ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
- }
-
-Index: libgfortran/m4/ifunction_logical.m4
-===================================================================
---- libgfortran/m4/ifunction_logical.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/m4/ifunction_logical.m4 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -89,8 +89,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -99,7 +98,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
- }
- else
- {
-Index: libgfortran/m4/ifunction.m4
-===================================================================
---- libgfortran/m4/ifunction.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/m4/ifunction.m4 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -85,10 +85,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -260,8 +259,7 @@
-
- }
-
-- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -273,7 +271,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
-
- }
- else
-@@ -417,8 +415,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -427,7 +424,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
- }
- else
- {
-Index: libgfortran/m4/matmul.m4
-===================================================================
---- libgfortran/m4/matmul.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/m4/matmul.m4 (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -125,7 +125,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/configure
-===================================================================
---- libgfortran/configure (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/configure (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -2595,6 +2595,7 @@
- as_fn_append ac_func_list " getegid"
- as_fn_append ac_func_list " secure_getenv"
- as_fn_append ac_func_list " __secure_getenv"
-+as_fn_append ac_func_list " strtok_r"
- as_fn_append ac_header_list " math.h"
- # Check that the precious variables saved in the cache have kept the same
- # value.
-@@ -12339,7 +12340,7 @@
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 12342 "configure"
-+#line 12343 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -12445,7 +12446,7 @@
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 12448 "configure"
-+#line 12449 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -16506,6 +16507,8 @@
-
-
-
-+
-+
-
-
-
-Index: libgfortran/runtime/in_pack_generic.c
-===================================================================
---- libgfortran/runtime/in_pack_generic.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/runtime/in_pack_generic.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -180,7 +180,7 @@
- return source->base_addr;
-
- /* Allocate storage for the destination. */
-- destptr = xmalloc (ssize * size);
-+ destptr = xmallocarray (ssize, size);
- dest = (char *)destptr;
- src = source->base_addr;
- stride0 = stride[0] * size;
-Index: libgfortran/runtime/memory.c
-===================================================================
---- libgfortran/runtime/memory.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/runtime/memory.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -25,8 +25,13 @@
-
- #include "libgfortran.h"
- #include <stdlib.h>
-+#include <errno.h>
-
-+#ifndef SIZE_MAX
-+#define SIZE_MAX ((size_t)-1)
-+#endif
-
-+
- void *
- xmalloc (size_t n)
- {
-@@ -44,12 +49,34 @@
- }
-
-
-+void *
-+xmallocarray (size_t nmemb, size_t size)
-+{
-+ void *p;
-+
-+ if (!nmemb || !size)
-+ size = nmemb = 1;
-+ else if (nmemb > SIZE_MAX / size)
-+ {
-+ errno = ENOMEM;
-+ os_error ("Integer overflow in xmallocarray");
-+ }
-+
-+ p = malloc (nmemb * size);
-+
-+ if (!p)
-+ os_error ("Memory allocation failed in xmallocarray");
-+
-+ return p;
-+}
-+
-+
- /* calloc wrapper that aborts on error. */
-
- void *
- xcalloc (size_t nmemb, size_t size)
- {
-- if (nmemb * size == 0)
-+ if (!nmemb || !size)
- nmemb = size = 1;
-
- void *p = calloc (nmemb, size);
-Index: libgfortran/runtime/convert_char.c
-===================================================================
---- libgfortran/runtime/convert_char.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/runtime/convert_char.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -44,7 +44,7 @@
- gfc_charlen_type i, l;
-
- l = len > 0 ? len : 0;
-- *dst = xmalloc ((l + 1) * sizeof (gfc_char4_t));
-+ *dst = xmallocarray ((l + 1), sizeof (gfc_char4_t));
-
- for (i = 0; i < l; i++)
- (*dst)[i] = src[i];
-@@ -60,7 +60,7 @@
- gfc_charlen_type i, l;
-
- l = len > 0 ? len : 0;
-- *dst = xmalloc ((l + 1) * sizeof (unsigned char));
-+ *dst = xmalloc (l + 1);
-
- for (i = 0; i < l; i++)
- (*dst)[i] = src[i];
-Index: libgfortran/runtime/environ.c
-===================================================================
---- libgfortran/runtime/environ.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/runtime/environ.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -833,7 +833,7 @@
- }
- else
- {
-- elist = xmalloc (unit_count * sizeof (exception_t));
-+ elist = xmallocarray (unit_count, sizeof (exception_t));
- do_count = 0;
- p = val;
- do_parse ();
-Index: libgfortran/runtime/main.c
-===================================================================
---- libgfortran/runtime/main.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/runtime/main.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -153,6 +153,16 @@
- }
-
-
-+#ifndef HAVE_STRTOK_R
-+static char*
-+gfstrtok_r (char *str, const char *delim,
-+ char **saveptr __attribute__ ((unused)))
-+{
-+ return strtok (str, delim);
-+}
-+#define strtok_r gfstrtok_r
-+#endif
-+
- char *addr2line_path;
-
- /* Find addr2line and store the path. */
-@@ -161,30 +171,32 @@
- find_addr2line (void)
- {
- #ifdef HAVE_ACCESS
--#define A2L_LEN 10
-+#define A2L_LEN 11
- char *path = secure_getenv ("PATH");
- if (!path)
- return;
-+ char *tp = strdup (path);
-+ if (!tp)
-+ return;
- size_t n = strlen (path);
-- char ap[n + 1 + A2L_LEN];
-- size_t ai = 0;
-- for (size_t i = 0; i < n; i++)
-+ char *ap = xmalloc (n + A2L_LEN);
-+ char *saveptr;
-+ for (char *str = tp;; str = NULL)
- {
-- if (path[i] != ':')
-- ap[ai++] = path[i];
-- else
-+ char *token = strtok_r (str, ":", &saveptr);
-+ if (!token)
-+ break;
-+ size_t toklen = strlen (token);
-+ memcpy (ap, token, toklen);
-+ memcpy (ap + toklen, "/addr2line", A2L_LEN);
-+ if (access (ap, R_OK|X_OK) == 0)
- {
-- ap[ai++] = '/';
-- memcpy (ap + ai, "addr2line", A2L_LEN);
-- if (access (ap, R_OK|X_OK) == 0)
-- {
-- addr2line_path = strdup (ap);
-- return;
-- }
-- else
-- ai = 0;
-+ addr2line_path = strdup (ap);
-+ break;
- }
- }
-+ free (tp);
-+ free (ap);
- #endif
- }
-
-Index: libgfortran/intrinsics/string_intrinsics_inc.c
-===================================================================
---- libgfortran/intrinsics/string_intrinsics_inc.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/intrinsics/string_intrinsics_inc.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -164,7 +164,7 @@
- else
- {
- /* Allocate space for result string. */
-- *dest = xmalloc (*len * sizeof (CHARTYPE));
-+ *dest = xmallocarray (*len, sizeof (CHARTYPE));
-
- /* Copy string if necessary. */
- memcpy (*dest, src, *len * sizeof (CHARTYPE));
-@@ -442,7 +442,7 @@
- *dest = &zero_length_string;
- else
- {
-- CHARTYPE *tmp = xmalloc (*rlen * sizeof (CHARTYPE));
-+ CHARTYPE *tmp = xmallocarray (*rlen, sizeof (CHARTYPE));
- memcpy (tmp, res, reslen * sizeof (CHARTYPE));
- MEMSET (&tmp[reslen], ' ', *rlen - reslen);
- *dest = tmp;
-Index: libgfortran/intrinsics/pack_generic.c
-===================================================================
---- libgfortran/intrinsics/pack_generic.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/intrinsics/pack_generic.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -152,8 +152,8 @@
- GFC_DIMENSION_SET(ret->dim[0], 0, total-1, 1);
-
- ret->offset = 0;
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (size * total);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (total, size);
-
- if (total == 0)
- return; /* In this case, nothing remains to be done. */
-@@ -519,7 +519,7 @@
-
- ret->offset = 0;
-
-- ret->base_addr = xmalloc (size * total);
-+ ret->base_addr = xmallocarray (total, size);
-
- if (total == 0)
- return;
-Index: libgfortran/intrinsics/transpose_generic.c
-===================================================================
---- libgfortran/intrinsics/transpose_generic.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/intrinsics/transpose_generic.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -60,7 +60,7 @@
- GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
- GFC_DESCRIPTOR_EXTENT(source, 1));
-
-- ret->base_addr = xmalloc (size * size0 ((array_t*)ret));
-+ ret->base_addr = xmallocarray (size0 ((array_t*)ret), size);
- ret->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/intrinsics/cshift0.c
-===================================================================
---- libgfortran/intrinsics/cshift0.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/intrinsics/cshift0.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -79,8 +79,8 @@
- GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
- }
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (size * arraysize);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (arraysize, size);
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/intrinsics/ctime.c
-===================================================================
---- libgfortran/intrinsics/ctime.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/intrinsics/ctime.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -31,31 +31,53 @@
- #include <string.h>
-
-
--/* strftime-like function that fills a C string with %c format which
-- is identical to ctime in the default locale. As ctime and ctime_r
-- are poorly specified and their usage not recommended, the
-- implementation instead uses strftime. */
-+/* Maximum space a ctime-like string might need. A "normal" ctime
-+ string is 26 bytes, and in our case 24 bytes as we don't include
-+ the trailing newline and null. However, the longest possible year
-+ number is -2,147,481,748 (1900 - 2,147,483,648, since tm_year is a
-+ 32-bit signed integer) so an extra 7 bytes are needed. */
-+#define CTIME_BUFSZ 31
-
--static size_t
--strctime (char *s, size_t max, const time_t *timep)
-+
-+/* Thread-safe ctime-like function that fills a Fortran
-+ string. ctime_r is a portability headache and marked as obsolescent
-+ in POSIX 2008, which recommends strftime in its place. However,
-+ strftime(..., "%c",...) doesn't produce ctime-like output on
-+ MinGW, so do it manually with snprintf. */
-+
-+static int
-+gf_ctime (char *s, size_t max, const time_t timev)
- {
- struct tm ltm;
- int failed;
-+ char buf[CTIME_BUFSZ + 1];
- /* Some targets provide a localtime_r based on a draft of the POSIX
- standard where the return type is int rather than the
- standardized struct tm*. */
-- __builtin_choose_expr (__builtin_classify_type (localtime_r (timep, <m))
-+ __builtin_choose_expr (__builtin_classify_type (localtime_r (&timev, <m))
- == 5,
-- failed = localtime_r (timep, <m) == NULL,
-- failed = localtime_r (timep, <m) != 0);
-+ failed = localtime_r (&timev, <m) == NULL,
-+ failed = localtime_r (&timev, <m) != 0);
- if (failed)
-- return 0;
-- return strftime (s, max, "%c", <m);
-+ goto blank;
-+ int n = snprintf (buf, sizeof (buf),
-+ "%3.3s %3.3s%3d %.2d:%.2d:%.2d %d",
-+ "SunMonTueWedThuFriSat" + ltm.tm_wday * 3,
-+ "JanFebMarAprMayJunJulAugSepOctNovDec" + ltm.tm_mon * 3,
-+ ltm.tm_mday, ltm.tm_hour, ltm.tm_min, ltm.tm_sec,
-+ 1900 + ltm.tm_year);
-+ if (n < 0)
-+ goto blank;
-+ if ((size_t) n <= max)
-+ {
-+ cf_strcpy (s, max, buf);
-+ return n;
-+ }
-+ blank:
-+ memset (s, ' ', max);
-+ return 0;
- }
-
--/* In the default locale, the date and time representation fits in 26
-- bytes. However, other locales might need more space. */
--#define CSZ 100
-
- extern void fdate (char **, gfc_charlen_type *);
- export_proto(fdate);
-@@ -64,8 +86,8 @@
- fdate (char ** date, gfc_charlen_type * date_len)
- {
- time_t now = time(NULL);
-- *date = xmalloc (CSZ);
-- *date_len = strctime (*date, CSZ, &now);
-+ *date = xmalloc (CTIME_BUFSZ);
-+ *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
- }
-
-
-@@ -76,10 +98,7 @@
- fdate_sub (char * date, gfc_charlen_type date_len)
- {
- time_t now = time(NULL);
-- char *s = xmalloc (date_len + 1);
-- size_t n = strctime (s, date_len + 1, &now);
-- fstrcpy (date, date_len, s, n);
-- free (s);
-+ gf_ctime (date, date_len, now);
- }
-
-
-@@ -91,8 +110,8 @@
- PREFIX(ctime) (char ** date, gfc_charlen_type * date_len, GFC_INTEGER_8 t)
- {
- time_t now = t;
-- *date = xmalloc (CSZ);
-- *date_len = strctime (*date, CSZ, &now);
-+ *date = xmalloc (CTIME_BUFSZ);
-+ *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
- }
-
-
-@@ -103,8 +122,5 @@
- ctime_sub (GFC_INTEGER_8 * t, char * date, gfc_charlen_type date_len)
- {
- time_t now = *t;
-- char *s = xmalloc (date_len + 1);
-- size_t n = strctime (s, date_len + 1, &now);
-- fstrcpy (date, date_len, s, n);
-- free (s);
-+ gf_ctime (date, date_len, now);
- }
-Index: libgfortran/intrinsics/spread_generic.c
-===================================================================
---- libgfortran/intrinsics/spread_generic.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/intrinsics/spread_generic.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -100,7 +100,7 @@
- GFC_DIMENSION_SET(ret->dim[n], 0, ub, stride);
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * size);
-+ ret->base_addr = xmallocarray (rs, size);
-
- if (rs <= 0)
- return;
-@@ -245,7 +245,7 @@
-
- if (ret->base_addr == NULL)
- {
-- ret->base_addr = xmalloc (ncopies * size);
-+ ret->base_addr = xmallocarray (ncopies, size);
- ret->offset = 0;
- GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
- }
-Index: libgfortran/intrinsics/unpack_generic.c
-===================================================================
---- libgfortran/intrinsics/unpack_generic.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/intrinsics/unpack_generic.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -125,7 +125,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * size);
-+ ret->base_addr = xmallocarray (rs, size);
- }
- else
- {
-Index: libgfortran/intrinsics/eoshift0.c
-===================================================================
---- libgfortran/intrinsics/eoshift0.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/intrinsics/eoshift0.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -86,8 +86,8 @@
-
- }
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (size * arraysize);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (arraysize, size);
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/intrinsics/eoshift2.c
-===================================================================
---- libgfortran/intrinsics/eoshift2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/intrinsics/eoshift2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -78,8 +78,8 @@
- ret->offset = 0;
- ret->dtype = array->dtype;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (size * arraysize);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (arraysize, size);
-
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
- {
-Index: libgfortran/intrinsics/reshape_generic.c
-===================================================================
---- libgfortran/intrinsics/reshape_generic.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/intrinsics/reshape_generic.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -99,11 +99,11 @@
- ret->offset = 0;
-
- if (unlikely (rs < 1))
-- alloc_size = 1;
-+ alloc_size = 0; /* xmalloc will allocate 1 byte. */
- else
-- alloc_size = rs * size;
-+ alloc_size = rs;
-
-- ret->base_addr = xmalloc (alloc_size);
-+ ret->base_addr = xmallocarray (alloc_size, size);
-
- ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
- }
-Index: libgfortran/configure.ac
-===================================================================
---- libgfortran/configure.ac (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/configure.ac (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -267,7 +267,7 @@
- strcasestr getrlimit gettimeofday stat fstat lstat getpwuid vsnprintf dup \
- getcwd localtime_r gmtime_r getpwuid_r ttyname_r clock_gettime \
- readlink getgid getpid getppid getuid geteuid umask getegid \
--secure_getenv __secure_getenv)
-+secure_getenv __secure_getenv strtok_r)
-
- # Check strerror_r, cannot be above as versions with two and three arguments exist
- LIBGFOR_CHECK_STRERROR_R
-Index: libgfortran/ChangeLog
-===================================================================
---- libgfortran/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,3 +1,94 @@
-+2014-10-20 Janne Blomqvist <jb@gcc.gnu.org>
-+
-+ PR libfortran/63589
-+ * configure.ac: Check for strtok_r.
-+ * runtime/main.c (gfstrtok_r): Fallback implementation of
-+ strtok_r.
-+ (find_addr2line): Use strtok_r to split PATH.
-+ * config.h.in: Regenerated.
-+ * configure: Regenerated.
-+
-+2014-08-20 Steven G. Kargl <kargl@gcc.gnu.org>
-+
-+ PR libgfortran/62188
-+ * m4/bessel.m4: Avoid indexing off the end of an array.
-+ * generated/bessel_r10.c: Regenerated.
-+ * generated/bessel_r16.c: Ditto.
-+ * generated/bessel_r4.c: Ditto.
-+ * generated/bessel_r8.c: Ditto.
-+
-+2014-07-31 Janne Blomqvist <jb@gcc.gnu.org>
-+
-+ Backport from mainline
-+ CVE-2014-5044
-+ * libgfortran.h (xmallocarray): New prototype.
-+ * runtime/memory.c (xmallocarray): New function.
-+ (xcalloc): Check for nonzero separately instead of multiplying.
-+ * generated/*.c: Regenerated.
-+ * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
-+ xmalloc.
-+ * intrinsics/eoshift0.c (eoshift0): Likewise.
-+ * intrinsics/eoshift2.c (eoshift2): Likewise.
-+ * intrinsics/pack_generic.c (pack_internal): Likewise.
-+ (pack_s_internal): Likewise.
-+ * intrinsics/reshape_generic.c (reshape_internal): Likewise.
-+ * intrinsics/spread_generic.c (spread_internal): Likewise.
-+ (spread_internal_scalar): Likewise.
-+ * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
-+ (string_minmax): Likewise.
-+ * intrinsics/transpose_generic.c (transpose_internal): Likewise.
-+ * intrinsics/unpack_generic.c (unpack_internal): Likewise.
-+ * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
-+ * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
-+ xmalloc.
-+ * io/unit.c (get_internal_unit): Likewise.
-+ (filename_from_unit): Don't cast xmalloc return value.
-+ * io/write.c (nml_write_obj): Likewise, formatting.
-+ * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
-+ instead of xmalloc.
-+ (besse_yn_r'rtype_kind`): Likewise.
-+ * m4/cshift1.m4 (cshift1): Likewise.
-+ * m4/eoshift1.m4 (eoshift1): Likewise.
-+ * m4/eoshift3.m4 (eoshift3): Likewise.
-+ * m4/iforeach.m4: Likewise.
-+ * m4/ifunction.m4: Likewise.
-+ * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
-+ Likewise.
-+ * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
-+ * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
-+ * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
-+ * m4/pack.m4 (pack_'rtype_code`): Likewise.
-+ * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
-+ * m4/shape.m4 (shape_'rtype_kind`): Likewise.
-+ * m4/spread.m4 (spread_'rtype_code`): Likewise.
-+ (spread_scalar_'rtype_code`): Likewise.
-+ * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
-+ * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
-+ (unpack1_'rtype_code`): Likewise.
-+ * runtime/convert_char.c (convert_char1_to_char4): Likewise.
-+ (convert_char4_to_char1): Simplify.
-+ * runtime/environ.c (init_unformatted): Call xmallocarray instead
-+ of xmalloc.
-+ * runtime/in_pack_generic.c (internal_pack): Likewise.
-+
-+2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
-+
-+ Backport from mainline
-+ PR libfortran/61310
-+ * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
-+ instead of strftime.
-+ (fdate): Use gf_ctime.
-+ (fdate_sub): Likewise.
-+ (ctime): Likewise.
-+ (ctime_sub): Likewise.
-+
-+2014-05-25 Janne Blomqvist <jb@gcc.gnu.org>
-+
-+ Backport from trunk.
-+ PR libfortran/61187
-+ * io/unix.c (raw_close): Check if s->fd is -1.
-+ (fd_to_stream): Check return value of fstat(), handle error.
-+
- 2014-05-22 Release Manager
-
- * GCC 4.8.3 released.
-Index: libgfortran/generated/spread_r10.c
-===================================================================
---- libgfortran/generated/spread_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/spread_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,8 @@
- }
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_10));
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_10));
- if (rs <= 0)
- return;
- }
-@@ -244,7 +244,7 @@
-
- if (ret->base_addr == NULL)
- {
-- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_10));
-+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_10));
- ret->offset = 0;
- GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
- }
-Index: libgfortran/generated/maxloc1_4_r8.c
-===================================================================
---- libgfortran/generated/maxloc1_4_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_4_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/norm2_r4.c
-===================================================================
---- libgfortran/generated/norm2_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/norm2_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,10 +101,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-Index: libgfortran/generated/parity_l2.c
-===================================================================
---- libgfortran/generated/parity_l2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/parity_l2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-Index: libgfortran/generated/eoshift3_4.c
-===================================================================
---- libgfortran/generated/eoshift3_4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/eoshift3_4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -89,7 +89,7 @@
- {
- int i;
-
-- ret->base_addr = xmalloc (size * arraysize);
-+ ret->base_addr = xmallocarray (arraysize, size);
- ret->offset = 0;
- ret->dtype = array->dtype;
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
-@@ -107,8 +107,8 @@
- GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
-
- }
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (size * arraysize);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (arraysize, size);
-
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/transpose_c8.c
-===================================================================
---- libgfortran/generated/transpose_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/transpose_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -60,7 +60,8 @@
- GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
- GFC_DESCRIPTOR_EXTENT(source, 1));
-
-- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) ret));
-+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
-+ sizeof (GFC_COMPLEX_8));
- ret->offset = 0;
- } else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/eoshift1_8.c
-===================================================================
---- libgfortran/generated/eoshift1_8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/eoshift1_8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -105,8 +105,8 @@
- GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
-
- }
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (size * arraysize);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (arraysize, size);
-
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/reshape_r16.c
-===================================================================
---- libgfortran/generated/reshape_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/reshape_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -111,11 +111,11 @@
- ret->offset = 0;
-
- if (unlikely (rs < 1))
-- alloc_size = 1;
-+ alloc_size = 0;
- else
-- alloc_size = rs * sizeof (GFC_REAL_16);
-+ alloc_size = rs;
-
-- ret->base_addr = xmalloc (alloc_size);
-+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
- ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
- }
-
-Index: libgfortran/generated/bessel_r4.c
-===================================================================
---- libgfortran/generated/bessel_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/bessel_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -55,7 +55,7 @@
- {
- size_t size = n2 < n1 ? 0 : n2-n1+1;
- GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
-- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
-+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
- ret->offset = 0;
- }
-
-@@ -122,7 +122,7 @@
- {
- size_t size = n2 < n1 ? 0 : n2-n1+1;
- GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
-- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
-+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
- ret->offset = 0;
- }
-
-@@ -162,7 +162,7 @@
-
- x2rev = GFC_REAL_4_LITERAL(2.)/x;
-
-- for (i = 2; i <= n1+n2; i++)
-+ for (i = 2; i <= n2 - n1; i++)
- {
- #if defined(GFC_REAL_4_INFINITY)
- if (unlikely (last2 == -GFC_REAL_4_INFINITY))
-Index: libgfortran/generated/any_l2.c
-===================================================================
---- libgfortran/generated/any_l2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/any_l2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -111,7 +110,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
- }
- else
- {
-Index: libgfortran/generated/product_r4.c
-===================================================================
---- libgfortran/generated/product_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/product_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
- }
- else
- {
-Index: libgfortran/generated/iany_i1.c
-===================================================================
---- libgfortran/generated/iany_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/iany_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
- }
- else
- {
-Index: libgfortran/generated/parity_l16.c
-===================================================================
---- libgfortran/generated/parity_l16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/parity_l16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-Index: libgfortran/generated/in_pack_r4.c
-===================================================================
---- libgfortran/generated/in_pack_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/in_pack_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -76,7 +76,7 @@
- return source->base_addr;
-
- /* Allocate storage for the destination. */
-- destptr = (GFC_REAL_4 *)xmalloc (ssize * sizeof (GFC_REAL_4));
-+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_4));
- dest = destptr;
- src = source->base_addr;
- stride0 = stride[0];
-Index: libgfortran/generated/product_i2.c
-===================================================================
---- libgfortran/generated/product_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/product_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
- }
- else
- {
-Index: libgfortran/generated/iparity_i4.c
-===================================================================
---- libgfortran/generated/iparity_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/iparity_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/minloc0_4_i1.c
-===================================================================
---- libgfortran/generated/minloc0_4_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_4_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/reshape_c4.c
-===================================================================
---- libgfortran/generated/reshape_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/reshape_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -111,11 +111,11 @@
- ret->offset = 0;
-
- if (unlikely (rs < 1))
-- alloc_size = 1;
-+ alloc_size = 0;
- else
-- alloc_size = rs * sizeof (GFC_COMPLEX_4);
-+ alloc_size = rs;
-
-- ret->base_addr = xmalloc (alloc_size);
-+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
- ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
- }
-
-Index: libgfortran/generated/maxloc0_4_r16.c
-===================================================================
---- libgfortran/generated/maxloc0_4_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_4_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/iall_i8.c
-===================================================================
---- libgfortran/generated/iall_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/iall_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/maxloc1_8_r16.c
-===================================================================
---- libgfortran/generated/maxloc1_8_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_8_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/sum_r16.c
-===================================================================
---- libgfortran/generated/sum_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/sum_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
- }
- else
- {
-Index: libgfortran/generated/sum_i1.c
-===================================================================
---- libgfortran/generated/sum_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/sum_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
- }
- else
- {
-Index: libgfortran/generated/in_pack_i2.c
-===================================================================
---- libgfortran/generated/in_pack_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/in_pack_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -76,7 +76,7 @@
- return source->base_addr;
-
- /* Allocate storage for the destination. */
-- destptr = (GFC_INTEGER_2 *)xmalloc (ssize * sizeof (GFC_INTEGER_2));
-+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_2));
- dest = destptr;
- src = source->base_addr;
- stride0 = stride[0];
-Index: libgfortran/generated/transpose_r10.c
-===================================================================
---- libgfortran/generated/transpose_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/transpose_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -60,7 +60,8 @@
- GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
- GFC_DESCRIPTOR_EXTENT(source, 1));
-
-- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) ret));
-+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
-+ sizeof (GFC_REAL_10));
- ret->offset = 0;
- } else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/maxloc1_16_r16.c
-===================================================================
---- libgfortran/generated/maxloc1_16_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_16_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/maxloc1_16_i4.c
-===================================================================
---- libgfortran/generated/maxloc1_16_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_16_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/spread_i1.c
-===================================================================
---- libgfortran/generated/spread_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/spread_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,8 @@
- }
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_1));
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_1));
- if (rs <= 0)
- return;
- }
-@@ -244,7 +244,7 @@
-
- if (ret->base_addr == NULL)
- {
-- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_1));
-+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_1));
- ret->offset = 0;
- GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
- }
-Index: libgfortran/generated/maxloc0_16_i8.c
-===================================================================
---- libgfortran/generated/maxloc0_16_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_16_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/maxval_r16.c
-===================================================================
---- libgfortran/generated/maxval_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxval_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
- }
- else
- {
-Index: libgfortran/generated/product_c10.c
-===================================================================
---- libgfortran/generated/product_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/product_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
- }
- else
- {
-Index: libgfortran/generated/minloc1_8_i4.c
-===================================================================
---- libgfortran/generated/minloc1_8_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_8_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/minloc0_16_i16.c
-===================================================================
---- libgfortran/generated/minloc0_16_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_16_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/matmul_r16.c
-===================================================================
---- libgfortran/generated/matmul_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/matmul_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -124,7 +124,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_16));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/minloc0_4_r4.c
-===================================================================
---- libgfortran/generated/minloc0_4_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_4_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/iany_i2.c
-===================================================================
---- libgfortran/generated/iany_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/iany_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
- }
- else
- {
-Index: libgfortran/generated/sum_r4.c
-===================================================================
---- libgfortran/generated/sum_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/sum_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
- }
- else
- {
-Index: libgfortran/generated/unpack_c8.c
-===================================================================
---- libgfortran/generated/unpack_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/unpack_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -99,7 +99,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
- }
- else
- {
-@@ -244,7 +244,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
- }
- else
- {
-Index: libgfortran/generated/in_pack_c16.c
-===================================================================
---- libgfortran/generated/in_pack_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/in_pack_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -76,7 +76,7 @@
- return source->base_addr;
-
- /* Allocate storage for the destination. */
-- destptr = (GFC_COMPLEX_16 *)xmalloc (ssize * sizeof (GFC_COMPLEX_16));
-+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_16));
- dest = destptr;
- src = source->base_addr;
- stride0 = stride[0];
-Index: libgfortran/generated/minloc0_4_i2.c
-===================================================================
---- libgfortran/generated/minloc0_4_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_4_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/spread_c10.c
-===================================================================
---- libgfortran/generated/spread_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/spread_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,8 @@
- }
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_10));
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_10));
- if (rs <= 0)
- return;
- }
-@@ -244,7 +244,7 @@
-
- if (ret->base_addr == NULL)
- {
-- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_10));
-+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_10));
- ret->offset = 0;
- GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
- }
-Index: libgfortran/generated/maxloc0_8_i1.c
-===================================================================
---- libgfortran/generated/maxloc0_8_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_8_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/spread_r4.c
-===================================================================
---- libgfortran/generated/spread_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/spread_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,8 @@
- }
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_4));
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_4));
- if (rs <= 0)
- return;
- }
-@@ -244,7 +244,7 @@
-
- if (ret->base_addr == NULL)
- {
-- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_4));
-+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_4));
- ret->offset = 0;
- GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
- }
-Index: libgfortran/generated/minloc0_8_i8.c
-===================================================================
---- libgfortran/generated/minloc0_8_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_8_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/matmul_c8.c
-===================================================================
---- libgfortran/generated/matmul_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/matmul_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -124,7 +124,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_8));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/minloc1_16_r10.c
-===================================================================
---- libgfortran/generated/minloc1_16_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_16_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/sum_i2.c
-===================================================================
---- libgfortran/generated/sum_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/sum_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
- }
- else
- {
-Index: libgfortran/generated/iparity_i16.c
-===================================================================
---- libgfortran/generated/iparity_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/iparity_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/minloc0_16_i1.c
-===================================================================
---- libgfortran/generated/minloc0_16_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_16_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/reshape_c16.c
-===================================================================
---- libgfortran/generated/reshape_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/reshape_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -111,11 +111,11 @@
- ret->offset = 0;
-
- if (unlikely (rs < 1))
-- alloc_size = 1;
-+ alloc_size = 0;
- else
-- alloc_size = rs * sizeof (GFC_COMPLEX_16);
-+ alloc_size = rs;
-
-- ret->base_addr = xmalloc (alloc_size);
-+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
- ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
- }
-
-Index: libgfortran/generated/pack_c4.c
-===================================================================
---- libgfortran/generated/pack_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/pack_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -167,8 +167,8 @@
-
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * total);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_4));
-
- if (total == 0)
- return;
-Index: libgfortran/generated/parity_l4.c
-===================================================================
---- libgfortran/generated/parity_l4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/parity_l4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-Index: libgfortran/generated/spread_i2.c
-===================================================================
---- libgfortran/generated/spread_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/spread_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,8 @@
- }
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_2));
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_2));
- if (rs <= 0)
- return;
- }
-@@ -244,7 +244,7 @@
-
- if (ret->base_addr == NULL)
- {
-- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_2));
-+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_2));
- ret->offset = 0;
- GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
- }
-Index: libgfortran/generated/any_l4.c
-===================================================================
---- libgfortran/generated/any_l4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/any_l4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -111,7 +110,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
- }
- else
- {
-Index: libgfortran/generated/maxloc1_4_i8.c
-===================================================================
---- libgfortran/generated/maxloc1_4_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_4_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/maxloc0_8_r4.c
-===================================================================
---- libgfortran/generated/maxloc0_8_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_8_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/maxloc1_4_i16.c
-===================================================================
---- libgfortran/generated/maxloc1_4_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_4_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/minloc0_4_r10.c
-===================================================================
---- libgfortran/generated/minloc0_4_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_4_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/minloc0_8_i16.c
-===================================================================
---- libgfortran/generated/minloc0_8_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_8_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/minloc1_8_r10.c
-===================================================================
---- libgfortran/generated/minloc1_8_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_8_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/minloc0_16_r4.c
-===================================================================
---- libgfortran/generated/minloc0_16_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_16_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/product_i4.c
-===================================================================
---- libgfortran/generated/product_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/product_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/sum_c16.c
-===================================================================
---- libgfortran/generated/sum_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/sum_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
- }
- else
- {
-Index: libgfortran/generated/transpose_c10.c
-===================================================================
---- libgfortran/generated/transpose_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/transpose_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -60,7 +60,8 @@
- GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
- GFC_DESCRIPTOR_EXTENT(source, 1));
-
-- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) ret));
-+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
-+ sizeof (GFC_COMPLEX_10));
- ret->offset = 0;
- } else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/maxloc1_16_r8.c
-===================================================================
---- libgfortran/generated/maxloc1_16_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_16_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/transpose_r4.c
-===================================================================
---- libgfortran/generated/transpose_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/transpose_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -60,7 +60,8 @@
- GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
- GFC_DESCRIPTOR_EXTENT(source, 1));
-
-- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) ret));
-+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
-+ sizeof (GFC_REAL_4));
- ret->offset = 0;
- } else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/cshift1_4.c
-===================================================================
---- libgfortran/generated/cshift1_4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/cshift1_4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -80,7 +80,7 @@
- {
- int i;
-
-- ret->base_addr = xmalloc (size * arraysize);
-+ ret->base_addr = xmallocarray (arraysize, size);
- ret->offset = 0;
- ret->dtype = array->dtype;
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
-Index: libgfortran/generated/maxloc0_8_i2.c
-===================================================================
---- libgfortran/generated/maxloc0_8_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_8_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/count_8_l.c
-===================================================================
---- libgfortran/generated/count_8_l.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/count_8_l.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -111,7 +110,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/in_pack_i4.c
-===================================================================
---- libgfortran/generated/in_pack_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/in_pack_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -76,7 +76,7 @@
- return source->base_addr;
-
- /* Allocate storage for the destination. */
-- destptr = (GFC_INTEGER_4 *)xmalloc (ssize * sizeof (GFC_INTEGER_4));
-+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_4));
- dest = destptr;
- src = source->base_addr;
- stride0 = stride[0];
-Index: libgfortran/generated/minloc0_16_i2.c
-===================================================================
---- libgfortran/generated/minloc0_16_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_16_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/minloc1_8_r8.c
-===================================================================
---- libgfortran/generated/minloc1_8_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_8_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/matmul_c16.c
-===================================================================
---- libgfortran/generated/matmul_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/matmul_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -124,7 +124,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_16));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/minval_i1.c
-===================================================================
---- libgfortran/generated/minval_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minval_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
- }
- else
- {
-Index: libgfortran/generated/shape_i16.c
-===================================================================
---- libgfortran/generated/shape_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/shape_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -49,7 +49,7 @@
- {
- GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
- ret->offset = 0;
-- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
-
- stride = GFC_DESCRIPTOR_STRIDE(ret,0);
-Index: libgfortran/generated/iany_i4.c
-===================================================================
---- libgfortran/generated/iany_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/iany_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/minloc0_16_r16.c
-===================================================================
---- libgfortran/generated/minloc0_16_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_16_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/product_i16.c
-===================================================================
---- libgfortran/generated/product_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/product_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/unpack_i1.c
-===================================================================
---- libgfortran/generated/unpack_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/unpack_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -99,7 +99,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
- }
- else
- {
-@@ -244,7 +244,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
- }
- else
- {
-Index: libgfortran/generated/minloc0_4_i4.c
-===================================================================
---- libgfortran/generated/minloc0_4_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_4_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/matmul_i1.c
-===================================================================
---- libgfortran/generated/matmul_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/matmul_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -124,7 +124,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof (GFC_INTEGER_1) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_1));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/minval_r4.c
-===================================================================
---- libgfortran/generated/minval_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minval_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
- }
- else
- {
-Index: libgfortran/generated/spread_i16.c
-===================================================================
---- libgfortran/generated/spread_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/spread_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,8 @@
- }
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_16));
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_16));
- if (rs <= 0)
- return;
- }
-@@ -244,7 +244,7 @@
-
- if (ret->base_addr == NULL)
- {
-- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_16));
-+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_16));
- ret->offset = 0;
- GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
- }
-Index: libgfortran/generated/sum_i4.c
-===================================================================
---- libgfortran/generated/sum_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/sum_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/unpack_r10.c
-===================================================================
---- libgfortran/generated/unpack_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/unpack_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -99,7 +99,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
- }
- else
- {
-@@ -244,7 +244,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
- }
- else
- {
-Index: libgfortran/generated/bessel_r16.c
-===================================================================
---- libgfortran/generated/bessel_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/bessel_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -59,7 +59,7 @@
- {
- size_t size = n2 < n1 ? 0 : n2-n1+1;
- GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
-- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
-+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
- ret->offset = 0;
- }
-
-@@ -126,7 +126,7 @@
- {
- size_t size = n2 < n1 ? 0 : n2-n1+1;
- GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
-- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
-+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
- ret->offset = 0;
- }
-
-@@ -166,7 +166,7 @@
-
- x2rev = GFC_REAL_16_LITERAL(2.)/x;
-
-- for (i = 2; i <= n1+n2; i++)
-+ for (i = 2; i <= n2 - n1; i++)
- {
- #if defined(GFC_REAL_16_INFINITY)
- if (unlikely (last2 == -GFC_REAL_16_INFINITY))
-Index: libgfortran/generated/norm2_r8.c
-===================================================================
---- libgfortran/generated/norm2_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/norm2_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,10 +101,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-Index: libgfortran/generated/spread_i4.c
-===================================================================
---- libgfortran/generated/spread_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/spread_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,8 @@
- }
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_4));
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_4));
- if (rs <= 0)
- return;
- }
-@@ -244,7 +244,7 @@
-
- if (ret->base_addr == NULL)
- {
-- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_4));
-+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_4));
- ret->offset = 0;
- GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
- }
-Index: libgfortran/generated/eoshift3_8.c
-===================================================================
---- libgfortran/generated/eoshift3_8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/eoshift3_8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -89,7 +89,7 @@
- {
- int i;
-
-- ret->base_addr = xmalloc (size * arraysize);
-+ ret->base_addr = xmallocarray (arraysize, size);
- ret->offset = 0;
- ret->dtype = array->dtype;
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
-@@ -107,8 +107,8 @@
- GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
-
- }
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (size * arraysize);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (arraysize, size);
-
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/minloc1_4_i1.c
-===================================================================
---- libgfortran/generated/minloc1_4_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_4_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/minval_i2.c
-===================================================================
---- libgfortran/generated/minval_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minval_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
- }
- else
- {
-Index: libgfortran/generated/bessel_r8.c
-===================================================================
---- libgfortran/generated/bessel_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/bessel_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -55,7 +55,7 @@
- {
- size_t size = n2 < n1 ? 0 : n2-n1+1;
- GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
-- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
-+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
- ret->offset = 0;
- }
-
-@@ -122,7 +122,7 @@
- {
- size_t size = n2 < n1 ? 0 : n2-n1+1;
- GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
-- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
-+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
- ret->offset = 0;
- }
-
-@@ -162,7 +162,7 @@
-
- x2rev = GFC_REAL_8_LITERAL(2.)/x;
-
-- for (i = 2; i <= n1+n2; i++)
-+ for (i = 2; i <= n2 - n1; i++)
- {
- #if defined(GFC_REAL_8_INFINITY)
- if (unlikely (last2 == -GFC_REAL_8_INFINITY))
-Index: libgfortran/generated/unpack_r4.c
-===================================================================
---- libgfortran/generated/unpack_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/unpack_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -99,7 +99,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
- }
- else
- {
-@@ -244,7 +244,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
- }
- else
- {
-Index: libgfortran/generated/product_r8.c
-===================================================================
---- libgfortran/generated/product_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/product_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
- }
- else
- {
-Index: libgfortran/generated/matmul_r4.c
-===================================================================
---- libgfortran/generated/matmul_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/matmul_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -124,7 +124,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_4));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/unpack_i2.c
-===================================================================
---- libgfortran/generated/unpack_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/unpack_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -99,7 +99,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
- }
- else
- {
-@@ -244,7 +244,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
- }
- else
- {
-Index: libgfortran/generated/in_pack_r8.c
-===================================================================
---- libgfortran/generated/in_pack_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/in_pack_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -76,7 +76,7 @@
- return source->base_addr;
-
- /* Allocate storage for the destination. */
-- destptr = (GFC_REAL_8 *)xmalloc (ssize * sizeof (GFC_REAL_8));
-+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_8));
- dest = destptr;
- src = source->base_addr;
- stride0 = stride[0];
-Index: libgfortran/generated/maxloc1_4_r16.c
-===================================================================
---- libgfortran/generated/maxloc1_4_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_4_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/minloc0_8_r16.c
-===================================================================
---- libgfortran/generated/minloc0_8_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_8_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/reshape_c8.c
-===================================================================
---- libgfortran/generated/reshape_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/reshape_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -111,11 +111,11 @@
- ret->offset = 0;
-
- if (unlikely (rs < 1))
-- alloc_size = 1;
-+ alloc_size = 0;
- else
-- alloc_size = rs * sizeof (GFC_COMPLEX_8);
-+ alloc_size = rs;
-
-- ret->base_addr = xmalloc (alloc_size);
-+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
- ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
- }
-
-Index: libgfortran/generated/iparity_i8.c
-===================================================================
---- libgfortran/generated/iparity_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/iparity_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/count_1_l.c
-===================================================================
---- libgfortran/generated/count_1_l.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/count_1_l.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -111,7 +110,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
- }
- else
- {
-Index: libgfortran/generated/maxloc0_8_i4.c
-===================================================================
---- libgfortran/generated/maxloc0_8_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_8_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/matmul_i2.c
-===================================================================
---- libgfortran/generated/matmul_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/matmul_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -124,7 +124,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof (GFC_INTEGER_2) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_2));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/minloc1_4_r4.c
-===================================================================
---- libgfortran/generated/minloc1_4_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_4_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/transpose_i16.c
-===================================================================
---- libgfortran/generated/transpose_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/transpose_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -60,7 +60,8 @@
- GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
- GFC_DESCRIPTOR_EXTENT(source, 1));
-
-- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) ret));
-+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
-+ sizeof (GFC_INTEGER_16));
- ret->offset = 0;
- } else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/minloc0_16_i4.c
-===================================================================
---- libgfortran/generated/minloc0_16_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_16_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/transpose_i4.c
-===================================================================
---- libgfortran/generated/transpose_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/transpose_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -60,7 +60,8 @@
- GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
- GFC_DESCRIPTOR_EXTENT(source, 1));
-
-- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) ret));
-+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
-+ sizeof (GFC_INTEGER_4));
- ret->offset = 0;
- } else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/maxloc1_16_i8.c
-===================================================================
---- libgfortran/generated/maxloc1_16_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_16_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/minloc1_4_i2.c
-===================================================================
---- libgfortran/generated/minloc1_4_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_4_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/matmul_l16.c
-===================================================================
---- libgfortran/generated/matmul_l16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/matmul_l16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -88,7 +88,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof (GFC_LOGICAL_16) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_16));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/maxloc1_8_i1.c
-===================================================================
---- libgfortran/generated/maxloc1_8_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_8_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/minloc1_8_i8.c
-===================================================================
---- libgfortran/generated/minloc1_8_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_8_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/minloc0_4_r8.c
-===================================================================
---- libgfortran/generated/minloc0_4_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_4_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/product_r16.c
-===================================================================
---- libgfortran/generated/product_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/product_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
- }
- else
- {
-Index: libgfortran/generated/sum_r8.c
-===================================================================
---- libgfortran/generated/sum_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/sum_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
- }
- else
- {
-Index: libgfortran/generated/norm2_r10.c
-===================================================================
---- libgfortran/generated/norm2_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/norm2_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,10 +101,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-Index: libgfortran/generated/unpack_c10.c
-===================================================================
---- libgfortran/generated/unpack_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/unpack_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -99,7 +99,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
- }
- else
- {
-@@ -244,7 +244,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
- }
- else
- {
-Index: libgfortran/generated/spread_r8.c
-===================================================================
---- libgfortran/generated/spread_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/spread_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,8 @@
- }
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_8));
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_8));
- if (rs <= 0)
- return;
- }
-@@ -244,7 +244,7 @@
-
- if (ret->base_addr == NULL)
- {
-- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_8));
-+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_8));
- ret->offset = 0;
- GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
- }
-Index: libgfortran/generated/minloc1_16_i16.c
-===================================================================
---- libgfortran/generated/minloc1_16_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_16_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/maxloc1_8_r4.c
-===================================================================
---- libgfortran/generated/maxloc1_8_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_8_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/minloc1_16_i1.c
-===================================================================
---- libgfortran/generated/minloc1_16_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_16_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/spread_r16.c
-===================================================================
---- libgfortran/generated/spread_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/spread_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,8 @@
- }
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_16));
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_16));
- if (rs <= 0)
- return;
- }
-@@ -244,7 +244,7 @@
-
- if (ret->base_addr == NULL)
- {
-- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_16));
-+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_16));
- ret->offset = 0;
- GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
- }
-Index: libgfortran/generated/pack_c8.c
-===================================================================
---- libgfortran/generated/pack_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/pack_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -167,8 +167,8 @@
-
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * total);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_8));
-
- if (total == 0)
- return;
-Index: libgfortran/generated/minval_r10.c
-===================================================================
---- libgfortran/generated/minval_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minval_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
- }
- else
- {
-Index: libgfortran/generated/parity_l8.c
-===================================================================
---- libgfortran/generated/parity_l8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/parity_l8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-Index: libgfortran/generated/minval_i4.c
-===================================================================
---- libgfortran/generated/minval_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minval_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/maxloc1_8_i2.c
-===================================================================
---- libgfortran/generated/maxloc1_8_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_8_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/any_l8.c
-===================================================================
---- libgfortran/generated/any_l8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/any_l8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -111,7 +110,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
- }
- else
- {
-Index: libgfortran/generated/maxloc0_16_r10.c
-===================================================================
---- libgfortran/generated/maxloc0_16_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_16_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/minloc0_4_i16.c
-===================================================================
---- libgfortran/generated/minloc0_4_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_4_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/maxloc0_8_r8.c
-===================================================================
---- libgfortran/generated/maxloc0_8_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_8_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/minloc1_4_r10.c
-===================================================================
---- libgfortran/generated/minloc1_4_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_4_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/minloc1_8_i16.c
-===================================================================
---- libgfortran/generated/minloc1_8_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_8_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/maxloc0_8_r10.c
-===================================================================
---- libgfortran/generated/maxloc0_8_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_8_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/unpack_i4.c
-===================================================================
---- libgfortran/generated/unpack_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/unpack_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -99,7 +99,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -244,7 +244,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/minloc1_16_r4.c
-===================================================================
---- libgfortran/generated/minloc1_16_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_16_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/product_i8.c
-===================================================================
---- libgfortran/generated/product_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/product_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/minloc0_16_r8.c
-===================================================================
---- libgfortran/generated/minloc0_16_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_16_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/count_2_l.c
-===================================================================
---- libgfortran/generated/count_2_l.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/count_2_l.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -111,7 +110,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
- }
- else
- {
-Index: libgfortran/generated/transpose_r8.c
-===================================================================
---- libgfortran/generated/transpose_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/transpose_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -60,7 +60,8 @@
- GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
- GFC_DESCRIPTOR_EXTENT(source, 1));
-
-- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) ret));
-+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
-+ sizeof (GFC_REAL_8));
- ret->offset = 0;
- } else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/cshift1_8.c
-===================================================================
---- libgfortran/generated/cshift1_8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/cshift1_8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -80,7 +80,7 @@
- {
- int i;
-
-- ret->base_addr = xmalloc (size * arraysize);
-+ ret->base_addr = xmallocarray (arraysize, size);
- ret->offset = 0;
- ret->dtype = array->dtype;
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
-Index: libgfortran/generated/matmul_i4.c
-===================================================================
---- libgfortran/generated/matmul_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/matmul_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -124,7 +124,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_4));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/pack_r10.c
-===================================================================
---- libgfortran/generated/pack_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/pack_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -167,8 +167,8 @@
-
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * total);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_10));
-
- if (total == 0)
- return;
-Index: libgfortran/generated/minloc1_16_i2.c
-===================================================================
---- libgfortran/generated/minloc1_16_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_16_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/in_pack_i8.c
-===================================================================
---- libgfortran/generated/in_pack_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/in_pack_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -76,7 +76,7 @@
- return source->base_addr;
-
- /* Allocate storage for the destination. */
-- destptr = (GFC_INTEGER_8 *)xmalloc (ssize * sizeof (GFC_INTEGER_8));
-+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_8));
- dest = destptr;
- src = source->base_addr;
- stride0 = stride[0];
-Index: libgfortran/generated/transpose_r16.c
-===================================================================
---- libgfortran/generated/transpose_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/transpose_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -60,7 +60,8 @@
- GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
- GFC_DESCRIPTOR_EXTENT(source, 1));
-
-- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) ret));
-+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
-+ sizeof (GFC_REAL_16));
- ret->offset = 0;
- } else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/minloc1_4_i4.c
-===================================================================
---- libgfortran/generated/minloc1_4_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_4_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/maxval_i1.c
-===================================================================
---- libgfortran/generated/maxval_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxval_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
- }
- else
- {
-Index: libgfortran/generated/product_c16.c
-===================================================================
---- libgfortran/generated/product_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/product_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
- }
- else
- {
-Index: libgfortran/generated/reshape_r4.c
-===================================================================
---- libgfortran/generated/reshape_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/reshape_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -111,11 +111,11 @@
- ret->offset = 0;
-
- if (unlikely (rs < 1))
-- alloc_size = 1;
-+ alloc_size = 0;
- else
-- alloc_size = rs * sizeof (GFC_REAL_4);
-+ alloc_size = rs;
-
-- ret->base_addr = xmalloc (alloc_size);
-+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
- ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
- }
-
-Index: libgfortran/generated/iany_i8.c
-===================================================================
---- libgfortran/generated/iany_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/iany_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/cshift1_16.c
-===================================================================
---- libgfortran/generated/cshift1_16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/cshift1_16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -80,7 +80,7 @@
- {
- int i;
-
-- ret->base_addr = xmalloc (size * arraysize);
-+ ret->base_addr = xmallocarray (arraysize, size);
- ret->offset = 0;
- ret->dtype = array->dtype;
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
-Index: libgfortran/generated/maxloc0_4_i1.c
-===================================================================
---- libgfortran/generated/maxloc0_4_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_4_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/minloc0_4_i8.c
-===================================================================
---- libgfortran/generated/minloc0_4_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_4_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/spread_c16.c
-===================================================================
---- libgfortran/generated/spread_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/spread_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,8 @@
- }
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_16));
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_16));
- if (rs <= 0)
- return;
- }
-@@ -244,7 +244,7 @@
-
- if (ret->base_addr == NULL)
- {
-- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_16));
-+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_16));
- ret->offset = 0;
- GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
- }
-Index: libgfortran/generated/maxval_r4.c
-===================================================================
---- libgfortran/generated/maxval_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxval_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
- }
- else
- {
-Index: libgfortran/generated/minval_r8.c
-===================================================================
---- libgfortran/generated/minval_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minval_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
- }
- else
- {
-Index: libgfortran/generated/minloc1_16_r16.c
-===================================================================
---- libgfortran/generated/minloc1_16_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_16_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/unpack_i16.c
-===================================================================
---- libgfortran/generated/unpack_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/unpack_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -99,7 +99,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -244,7 +244,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/sum_i8.c
-===================================================================
---- libgfortran/generated/sum_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/sum_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/pack_i1.c
-===================================================================
---- libgfortran/generated/pack_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/pack_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -167,8 +167,8 @@
-
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_1) * total);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_1));
-
- if (total == 0)
- return;
-Index: libgfortran/generated/any_l16.c
-===================================================================
---- libgfortran/generated/any_l16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/any_l16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -111,7 +110,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
- }
- else
- {
-Index: libgfortran/generated/spread_i8.c
-===================================================================
---- libgfortran/generated/spread_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/spread_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,8 @@
- }
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_8));
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_8));
- if (rs <= 0)
- return;
- }
-@@ -244,7 +244,7 @@
-
- if (ret->base_addr == NULL)
- {
-- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_8));
-+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_8));
- ret->offset = 0;
- GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
- }
-Index: libgfortran/generated/maxval_i2.c
-===================================================================
---- libgfortran/generated/maxval_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxval_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
- }
- else
- {
-Index: libgfortran/generated/maxloc1_8_i4.c
-===================================================================
---- libgfortran/generated/maxloc1_8_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_8_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/unpack_r8.c
-===================================================================
---- libgfortran/generated/unpack_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/unpack_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -99,7 +99,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
- }
- else
- {
-@@ -244,7 +244,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
- }
- else
- {
-Index: libgfortran/generated/maxloc0_4_r4.c
-===================================================================
---- libgfortran/generated/maxloc0_4_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_4_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/all_l1.c
-===================================================================
---- libgfortran/generated/all_l1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/all_l1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -111,7 +110,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
- }
- else
- {
-Index: libgfortran/generated/matmul_r8.c
-===================================================================
---- libgfortran/generated/matmul_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/matmul_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -124,7 +124,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_8));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/minloc0_4_r16.c
-===================================================================
---- libgfortran/generated/minloc0_4_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_4_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/maxloc0_4_i2.c
-===================================================================
---- libgfortran/generated/maxloc0_4_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_4_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/minloc1_8_r16.c
-===================================================================
---- libgfortran/generated/minloc1_8_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_8_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/pack_c10.c
-===================================================================
---- libgfortran/generated/pack_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/pack_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -167,8 +167,8 @@
-
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * total);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_10));
-
- if (total == 0)
- return;
-Index: libgfortran/generated/pack_r4.c
-===================================================================
---- libgfortran/generated/pack_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/pack_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -167,8 +167,8 @@
-
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * total);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_4));
-
- if (total == 0)
- return;
-Index: libgfortran/generated/transpose_c16.c
-===================================================================
---- libgfortran/generated/transpose_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/transpose_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -60,7 +60,8 @@
- GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
- GFC_DESCRIPTOR_EXTENT(source, 1));
-
-- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) ret));
-+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
-+ sizeof (GFC_COMPLEX_16));
- ret->offset = 0;
- } else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/maxloc0_8_i8.c
-===================================================================
---- libgfortran/generated/maxloc0_8_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_8_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/minloc1_4_r8.c
-===================================================================
---- libgfortran/generated/minloc1_4_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_4_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/minloc1_16_i4.c
-===================================================================
---- libgfortran/generated/minloc1_16_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_16_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/minloc0_16_i8.c
-===================================================================
---- libgfortran/generated/minloc0_16_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_16_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/pack_i2.c
-===================================================================
---- libgfortran/generated/pack_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/pack_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -167,8 +167,8 @@
-
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_2) * total);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_2));
-
- if (total == 0)
- return;
-Index: libgfortran/generated/transpose_i8.c
-===================================================================
---- libgfortran/generated/transpose_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/transpose_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -60,7 +60,8 @@
- GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
- GFC_DESCRIPTOR_EXTENT(source, 1));
-
-- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) ret));
-+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
-+ sizeof (GFC_INTEGER_8));
- ret->offset = 0;
- } else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/eoshift1_16.c
-===================================================================
---- libgfortran/generated/eoshift1_16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/eoshift1_16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -105,8 +105,8 @@
- GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
-
- }
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (size * arraysize);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (arraysize, size);
-
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/all_l2.c
-===================================================================
---- libgfortran/generated/all_l2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/all_l2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -111,7 +110,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
- }
- else
- {
-Index: libgfortran/generated/product_c4.c
-===================================================================
---- libgfortran/generated/product_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/product_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
- }
- else
- {
-Index: libgfortran/generated/iall_i1.c
-===================================================================
---- libgfortran/generated/iall_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/iall_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
- }
- else
- {
-Index: libgfortran/generated/reshape_i4.c
-===================================================================
---- libgfortran/generated/reshape_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/reshape_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -111,11 +111,11 @@
- ret->offset = 0;
-
- if (unlikely (rs < 1))
-- alloc_size = 1;
-+ alloc_size = 0;
- else
-- alloc_size = rs * sizeof (GFC_INTEGER_4);
-+ alloc_size = rs;
-
-- ret->base_addr = xmalloc (alloc_size);
-+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
- }
-
-Index: libgfortran/generated/in_pack_r10.c
-===================================================================
---- libgfortran/generated/in_pack_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/in_pack_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -76,7 +76,7 @@
- return source->base_addr;
-
- /* Allocate storage for the destination. */
-- destptr = (GFC_REAL_10 *)xmalloc (ssize * sizeof (GFC_REAL_10));
-+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_10));
- dest = destptr;
- src = source->base_addr;
- stride0 = stride[0];
-Index: libgfortran/generated/in_pack_c4.c
-===================================================================
---- libgfortran/generated/in_pack_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/in_pack_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -76,7 +76,7 @@
- return source->base_addr;
-
- /* Allocate storage for the destination. */
-- destptr = (GFC_COMPLEX_4 *)xmalloc (ssize * sizeof (GFC_COMPLEX_4));
-+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_4));
- dest = destptr;
- src = source->base_addr;
- stride0 = stride[0];
-Index: libgfortran/generated/all_l16.c
-===================================================================
---- libgfortran/generated/all_l16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/all_l16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -111,7 +110,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
- }
- else
- {
-Index: libgfortran/generated/maxloc0_16_i1.c
-===================================================================
---- libgfortran/generated/maxloc0_16_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_16_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/maxloc1_8_r8.c
-===================================================================
---- libgfortran/generated/maxloc1_8_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_8_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/minval_i16.c
-===================================================================
---- libgfortran/generated/minval_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minval_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/reshape_r10.c
-===================================================================
---- libgfortran/generated/reshape_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/reshape_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -111,11 +111,11 @@
- ret->offset = 0;
-
- if (unlikely (rs < 1))
-- alloc_size = 1;
-+ alloc_size = 0;
- else
-- alloc_size = rs * sizeof (GFC_REAL_10);
-+ alloc_size = rs;
-
-- ret->base_addr = xmalloc (alloc_size);
-+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
- ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
- }
-
-Index: libgfortran/generated/unpack_r16.c
-===================================================================
---- libgfortran/generated/unpack_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/unpack_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -99,7 +99,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
- }
- else
- {
-@@ -244,7 +244,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
- }
- else
- {
-Index: libgfortran/generated/maxval_i4.c
-===================================================================
---- libgfortran/generated/maxval_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxval_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/minval_i8.c
-===================================================================
---- libgfortran/generated/minval_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minval_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/maxloc0_16_i16.c
-===================================================================
---- libgfortran/generated/maxloc0_16_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_16_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/shape_i4.c
-===================================================================
---- libgfortran/generated/shape_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/shape_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -49,7 +49,7 @@
- {
- GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
- ret->offset = 0;
-- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
-
- stride = GFC_DESCRIPTOR_STRIDE(ret,0);
-Index: libgfortran/generated/minloc1_4_i16.c
-===================================================================
---- libgfortran/generated/minloc1_4_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_4_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/maxloc0_4_r10.c
-===================================================================
---- libgfortran/generated/maxloc0_4_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_4_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/maxloc0_8_i16.c
-===================================================================
---- libgfortran/generated/maxloc0_8_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_8_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/iall_i2.c
-===================================================================
---- libgfortran/generated/iall_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/iall_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
- }
- else
- {
-Index: libgfortran/generated/maxloc1_8_r10.c
-===================================================================
---- libgfortran/generated/maxloc1_8_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_8_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/maxloc0_16_r4.c
-===================================================================
---- libgfortran/generated/maxloc0_16_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_16_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/minloc0_8_i1.c
-===================================================================
---- libgfortran/generated/minloc0_8_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_8_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/minloc1_16_r8.c
-===================================================================
---- libgfortran/generated/minloc1_16_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_16_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/unpack_i8.c
-===================================================================
---- libgfortran/generated/unpack_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/unpack_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -99,7 +99,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -244,7 +244,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/maxloc0_4_i4.c
-===================================================================
---- libgfortran/generated/maxloc0_4_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_4_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/count_4_l.c
-===================================================================
---- libgfortran/generated/count_4_l.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/count_4_l.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -111,7 +110,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/sum_r10.c
-===================================================================
---- libgfortran/generated/sum_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/sum_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
- }
- else
- {
-Index: libgfortran/generated/sum_c4.c
-===================================================================
---- libgfortran/generated/sum_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/sum_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
- }
- else
- {
-Index: libgfortran/generated/maxloc1_16_r10.c
-===================================================================
---- libgfortran/generated/maxloc1_16_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_16_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/pack_i16.c
-===================================================================
---- libgfortran/generated/pack_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/pack_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -167,8 +167,8 @@
-
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * total);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_16));
-
- if (total == 0)
- return;
-Index: libgfortran/generated/matmul_i8.c
-===================================================================
---- libgfortran/generated/matmul_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/matmul_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -124,7 +124,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_8));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/maxloc0_16_i2.c
-===================================================================
---- libgfortran/generated/maxloc0_16_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_16_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/spread_c4.c
-===================================================================
---- libgfortran/generated/spread_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/spread_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,8 @@
- }
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_4));
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_4));
- if (rs <= 0)
- return;
- }
-@@ -244,7 +244,7 @@
-
- if (ret->base_addr == NULL)
- {
-- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_4));
-+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_4));
- ret->offset = 0;
- GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
- }
-Index: libgfortran/generated/maxval_r10.c
-===================================================================
---- libgfortran/generated/maxval_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxval_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
- }
- else
- {
-Index: libgfortran/generated/pack_i4.c
-===================================================================
---- libgfortran/generated/pack_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/pack_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -167,8 +167,8 @@
-
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * total);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_4));
-
- if (total == 0)
- return;
-Index: libgfortran/generated/maxloc1_4_i1.c
-===================================================================
---- libgfortran/generated/maxloc1_4_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_4_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/matmul_r10.c
-===================================================================
---- libgfortran/generated/matmul_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/matmul_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -124,7 +124,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_10));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/minloc1_4_i8.c
-===================================================================
---- libgfortran/generated/minloc1_4_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_4_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/minloc0_8_r4.c
-===================================================================
---- libgfortran/generated/minloc0_8_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_8_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/matmul_l4.c
-===================================================================
---- libgfortran/generated/matmul_l4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/matmul_l4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -88,7 +88,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof (GFC_LOGICAL_4) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_4));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/reshape_r8.c
-===================================================================
---- libgfortran/generated/reshape_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/reshape_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -111,11 +111,11 @@
- ret->offset = 0;
-
- if (unlikely (rs < 1))
-- alloc_size = 1;
-+ alloc_size = 0;
- else
-- alloc_size = rs * sizeof (GFC_REAL_8);
-+ alloc_size = rs;
-
-- ret->base_addr = xmalloc (alloc_size);
-+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
- ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
- }
-
-Index: libgfortran/generated/in_pack_c10.c
-===================================================================
---- libgfortran/generated/in_pack_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/in_pack_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -76,7 +76,7 @@
- return source->base_addr;
-
- /* Allocate storage for the destination. */
-- destptr = (GFC_COMPLEX_10 *)xmalloc (ssize * sizeof (GFC_COMPLEX_10));
-+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_10));
- dest = destptr;
- src = source->base_addr;
- stride0 = stride[0];
-Index: libgfortran/generated/all_l4.c
-===================================================================
---- libgfortran/generated/all_l4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/all_l4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -111,7 +110,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
- }
- else
- {
-Index: libgfortran/generated/minloc0_8_i2.c
-===================================================================
---- libgfortran/generated/minloc0_8_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_8_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/norm2_r16.c
-===================================================================
---- libgfortran/generated/norm2_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/norm2_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -105,10 +105,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-Index: libgfortran/generated/reshape_c10.c
-===================================================================
---- libgfortran/generated/reshape_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/reshape_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -111,11 +111,11 @@
- ret->offset = 0;
-
- if (unlikely (rs < 1))
-- alloc_size = 1;
-+ alloc_size = 0;
- else
-- alloc_size = rs * sizeof (GFC_COMPLEX_10);
-+ alloc_size = rs;
-
-- ret->base_addr = xmalloc (alloc_size);
-+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
- ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
- }
-
-Index: libgfortran/generated/unpack_c16.c
-===================================================================
---- libgfortran/generated/unpack_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/unpack_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -99,7 +99,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
- }
- else
- {
-@@ -244,7 +244,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
- }
- else
- {
-Index: libgfortran/generated/maxloc1_4_r4.c
-===================================================================
---- libgfortran/generated/maxloc1_4_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_4_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/maxval_r8.c
-===================================================================
---- libgfortran/generated/maxval_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxval_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
- }
- else
- {
-Index: libgfortran/generated/transpose_c4.c
-===================================================================
---- libgfortran/generated/transpose_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/transpose_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -60,7 +60,8 @@
- GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
- GFC_DESCRIPTOR_EXTENT(source, 1));
-
-- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) ret));
-+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
-+ sizeof (GFC_COMPLEX_4));
- ret->offset = 0;
- } else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/eoshift1_4.c
-===================================================================
---- libgfortran/generated/eoshift1_4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/eoshift1_4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -105,8 +105,8 @@
- GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
-
- }
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (size * arraysize);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (arraysize, size);
-
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/minval_r16.c
-===================================================================
---- libgfortran/generated/minval_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minval_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
- }
- else
- {
-Index: libgfortran/generated/iany_i16.c
-===================================================================
---- libgfortran/generated/iany_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/iany_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/maxloc1_4_i2.c
-===================================================================
---- libgfortran/generated/maxloc1_4_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_4_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/maxloc1_8_i8.c
-===================================================================
---- libgfortran/generated/maxloc1_8_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_8_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/maxloc0_4_r8.c
-===================================================================
---- libgfortran/generated/maxloc0_4_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_4_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/maxloc0_16_r16.c
-===================================================================
---- libgfortran/generated/maxloc0_16_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_16_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/sum_c10.c
-===================================================================
---- libgfortran/generated/sum_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/sum_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
- }
- else
- {
-Index: libgfortran/generated/iall_i4.c
-===================================================================
---- libgfortran/generated/iall_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/iall_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/minloc1_4_r16.c
-===================================================================
---- libgfortran/generated/minloc1_4_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_4_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/maxloc0_8_r16.c
-===================================================================
---- libgfortran/generated/maxloc0_8_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_8_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/pack_r8.c
-===================================================================
---- libgfortran/generated/pack_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/pack_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -167,8 +167,8 @@
-
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * total);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_8));
-
- if (total == 0)
- return;
-Index: libgfortran/generated/matmul_c10.c
-===================================================================
---- libgfortran/generated/matmul_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/matmul_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -124,7 +124,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_10));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/maxloc0_16_i4.c
-===================================================================
---- libgfortran/generated/maxloc0_16_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_16_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/pack_r16.c
-===================================================================
---- libgfortran/generated/pack_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/pack_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -167,8 +167,8 @@
-
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * total);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_16));
-
- if (total == 0)
- return;
-Index: libgfortran/generated/minloc1_16_i8.c
-===================================================================
---- libgfortran/generated/minloc1_16_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_16_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/minloc0_16_r10.c
-===================================================================
---- libgfortran/generated/minloc0_16_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_16_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/unpack_c4.c
-===================================================================
---- libgfortran/generated/unpack_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/unpack_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -99,7 +99,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
- }
- else
- {
-@@ -244,7 +244,7 @@
- rs *= extent[n];
- }
- ret->offset = 0;
-- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
-+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
- }
- else
- {
-Index: libgfortran/generated/iparity_i1.c
-===================================================================
---- libgfortran/generated/iparity_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/iparity_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
- }
- else
- {
-Index: libgfortran/generated/product_c8.c
-===================================================================
---- libgfortran/generated/product_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/product_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
- }
- else
- {
-Index: libgfortran/generated/in_pack_i16.c
-===================================================================
---- libgfortran/generated/in_pack_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/in_pack_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -76,7 +76,7 @@
- return source->base_addr;
-
- /* Allocate storage for the destination. */
-- destptr = (GFC_INTEGER_16 *)xmalloc (ssize * sizeof (GFC_INTEGER_16));
-+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_16));
- dest = destptr;
- src = source->base_addr;
- stride0 = stride[0];
-Index: libgfortran/generated/minloc0_8_i4.c
-===================================================================
---- libgfortran/generated/minloc0_8_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_8_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/matmul_c4.c
-===================================================================
---- libgfortran/generated/matmul_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/matmul_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -124,7 +124,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_4));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/reshape_i8.c
-===================================================================
---- libgfortran/generated/reshape_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/reshape_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -111,11 +111,11 @@
- ret->offset = 0;
-
- if (unlikely (rs < 1))
-- alloc_size = 1;
-+ alloc_size = 0;
- else
-- alloc_size = rs * sizeof (GFC_INTEGER_8);
-+ alloc_size = rs;
-
-- ret->base_addr = xmalloc (alloc_size);
-+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
- }
-
-Index: libgfortran/generated/in_pack_c8.c
-===================================================================
---- libgfortran/generated/in_pack_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/in_pack_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -76,7 +76,7 @@
- return source->base_addr;
-
- /* Allocate storage for the destination. */
-- destptr = (GFC_COMPLEX_8 *)xmalloc (ssize * sizeof (GFC_COMPLEX_8));
-+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_8));
- dest = destptr;
- src = source->base_addr;
- stride0 = stride[0];
-Index: libgfortran/generated/bessel_r10.c
-===================================================================
---- libgfortran/generated/bessel_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/bessel_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -55,7 +55,7 @@
- {
- size_t size = n2 < n1 ? 0 : n2-n1+1;
- GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
-- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
-+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
- ret->offset = 0;
- }
-
-@@ -122,7 +122,7 @@
- {
- size_t size = n2 < n1 ? 0 : n2-n1+1;
- GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
-- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
-+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
- ret->offset = 0;
- }
-
-@@ -162,7 +162,7 @@
-
- x2rev = GFC_REAL_10_LITERAL(2.)/x;
-
-- for (i = 2; i <= n1+n2; i++)
-+ for (i = 2; i <= n2 - n1; i++)
- {
- #if defined(GFC_REAL_10_INFINITY)
- if (unlikely (last2 == -GFC_REAL_10_INFINITY))
-Index: libgfortran/generated/iall_i16.c
-===================================================================
---- libgfortran/generated/iall_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/iall_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/maxloc1_16_i1.c
-===================================================================
---- libgfortran/generated/maxloc1_16_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_16_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/reshape_i16.c
-===================================================================
---- libgfortran/generated/reshape_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/reshape_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -111,11 +111,11 @@
- ret->offset = 0;
-
- if (unlikely (rs < 1))
-- alloc_size = 1;
-+ alloc_size = 0;
- else
-- alloc_size = rs * sizeof (GFC_INTEGER_16);
-+ alloc_size = rs;
-
-- ret->base_addr = xmalloc (alloc_size);
-+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
- }
-
-Index: libgfortran/generated/count_16_l.c
-===================================================================
---- libgfortran/generated/count_16_l.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/count_16_l.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -111,7 +110,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/minloc1_8_i1.c
-===================================================================
---- libgfortran/generated/minloc1_8_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_8_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/maxloc1_4_i4.c
-===================================================================
---- libgfortran/generated/maxloc1_4_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_4_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/maxval_i8.c
-===================================================================
---- libgfortran/generated/maxval_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxval_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/eoshift3_16.c
-===================================================================
---- libgfortran/generated/eoshift3_16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/eoshift3_16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -89,7 +89,7 @@
- {
- int i;
-
-- ret->base_addr = xmalloc (size * arraysize);
-+ ret->base_addr = xmallocarray (arraysize, size);
- ret->offset = 0;
- ret->dtype = array->dtype;
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
-@@ -107,8 +107,8 @@
- GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
-
- }
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (size * arraysize);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (arraysize, size);
-
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/shape_i8.c
-===================================================================
---- libgfortran/generated/shape_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/shape_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -49,7 +49,7 @@
- {
- GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
- ret->offset = 0;
-- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
-
- stride = GFC_DESCRIPTOR_STRIDE(ret,0);
-Index: libgfortran/generated/maxloc0_4_i16.c
-===================================================================
---- libgfortran/generated/maxloc0_4_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_4_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/maxloc1_4_r10.c
-===================================================================
---- libgfortran/generated/maxloc1_4_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_4_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- }
- else
- {
-Index: libgfortran/generated/maxloc1_8_i16.c
-===================================================================
---- libgfortran/generated/maxloc1_8_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_8_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/minloc0_8_r10.c
-===================================================================
---- libgfortran/generated/minloc0_8_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_8_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/iparity_i2.c
-===================================================================
---- libgfortran/generated/iparity_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/iparity_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
- }
- else
- {
-Index: libgfortran/generated/maxloc1_16_r4.c
-===================================================================
---- libgfortran/generated/maxloc1_16_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_16_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/maxloc0_16_r8.c
-===================================================================
---- libgfortran/generated/maxloc0_16_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_16_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/sum_i16.c
-===================================================================
---- libgfortran/generated/sum_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/sum_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/maxloc0_4_i8.c
-===================================================================
---- libgfortran/generated/maxloc0_4_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc0_4_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
- }
- else if (unlikely (compile_options.bounds_check))
- {
-Index: libgfortran/generated/pack_c16.c
-===================================================================
---- libgfortran/generated/pack_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/pack_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -167,8 +167,8 @@
-
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * total);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_16));
-
- if (total == 0)
- return;
-Index: libgfortran/generated/maxloc1_16_i16.c
-===================================================================
---- libgfortran/generated/maxloc1_16_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_16_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/minloc1_8_r4.c
-===================================================================
---- libgfortran/generated/minloc1_8_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_8_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/sum_c8.c
-===================================================================
---- libgfortran/generated/sum_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/sum_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
-
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
- }
- else
- {
-Index: libgfortran/generated/maxloc1_16_i2.c
-===================================================================
---- libgfortran/generated/maxloc1_16_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxloc1_16_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/parity_l1.c
-===================================================================
---- libgfortran/generated/parity_l1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/parity_l1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-Index: libgfortran/generated/maxval_i16.c
-===================================================================
---- libgfortran/generated/maxval_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/maxval_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -286,8 +285,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -299,7 +297,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
-
- }
- else
-@@ -472,8 +470,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -482,7 +479,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
- }
- else
- {
-Index: libgfortran/generated/spread_c8.c
-===================================================================
---- libgfortran/generated/spread_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/spread_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,8 @@
- }
- ret->offset = 0;
-
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_8));
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_8));
- if (rs <= 0)
- return;
- }
-@@ -244,7 +244,7 @@
-
- if (ret->base_addr == NULL)
- {
-- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_8));
-+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_8));
- ret->offset = 0;
- GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
- }
-Index: libgfortran/generated/matmul_i16.c
-===================================================================
---- libgfortran/generated/matmul_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/matmul_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -124,7 +124,7 @@
- }
+ if (result)
+ preserve_temp_slots (result);
+ pop_temp_slots ();
+@@ -5262,7 +5216,7 @@
+ temp = expand_expr_real (exp, tmp_target, GET_MODE (target),
+ (call_param_p
+ ? EXPAND_STACK_PARM : EXPAND_NORMAL),
+- &alt_rtl);
++ &alt_rtl, false);
+ }
+
+ /* If TEMP is a VOIDmode constant and the mode of the type of EXP is not
+@@ -7881,11 +7835,21 @@
+ address, and ALT_RTL is non-NULL, then *ALT_RTL is set to the
+ DECL_RTL of the VAR_DECL. *ALT_RTL is also set if EXP is a
+ COMPOUND_EXPR whose second argument is such a VAR_DECL, and so on
+- recursively. */
++ recursively.
+
++ If INNER_REFERENCE_P is true, we are expanding an inner reference.
++ In this case, we don't adjust a returned MEM rtx that wouldn't be
++ sufficiently aligned for its mode; instead, it's up to the caller
++ to deal with it afterwards. This is used to make sure that unaligned
++ base objects for which out-of-bounds accesses are supported, for
++ example record types with trailing arrays, aren't realigned behind
++ the back of the caller.
++ The normal operating mode is to pass FALSE for this parameter. */
++
+ rtx
+ expand_expr_real (tree exp, rtx target, enum machine_mode tmode,
+- enum expand_modifier modifier, rtx *alt_rtl)
++ enum expand_modifier modifier, rtx *alt_rtl,
++ bool inner_reference_p)
+ {
+ rtx ret;
- retarray->base_addr
-- = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_16));
- retarray->offset = 0;
+@@ -7897,7 +7861,8 @@
+ return ret ? ret : const0_rtx;
}
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/pack_i8.c
-===================================================================
---- libgfortran/generated/pack_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/pack_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -167,8 +167,8 @@
- ret->offset = 0;
+- ret = expand_expr_real_1 (exp, target, tmode, modifier, alt_rtl);
++ ret = expand_expr_real_1 (exp, target, tmode, modifier, alt_rtl,
++ inner_reference_p);
+ return ret;
+ }
-- /* xmalloc allocates a single byte for zero size. */
-- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * total);
-+ /* xmallocarray allocates a single byte for zero size. */
-+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_8));
+@@ -9190,7 +9155,8 @@
- if (total == 0)
- return;
-Index: libgfortran/generated/any_l1.c
-===================================================================
---- libgfortran/generated/any_l1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/any_l1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
+ rtx
+ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
+- enum expand_modifier modifier, rtx *alt_rtl)
++ enum expand_modifier modifier, rtx *alt_rtl,
++ bool inner_reference_p)
+ {
+ rtx op0, op1, temp, decl_rtl;
+ tree type;
+@@ -9336,7 +9302,7 @@
+
+ set_curr_insn_location (gimple_location (g));
+ r = expand_expr_real (gimple_assign_rhs_to_tree (g), target,
+- tmode, modifier, NULL);
++ tmode, modifier, NULL, inner_reference_p);
+ set_curr_insn_location (saved_loc);
+ if (REG_P (r) && !REG_EXPR (r))
+ set_reg_attrs_for_decl_rtl (SSA_NAME_VAR (exp), r);
+@@ -9557,7 +9523,8 @@
+ case SAVE_EXPR:
+ {
+ tree val = treeop0;
+- rtx ret = expand_expr_real_1 (val, target, tmode, modifier, alt_rtl);
++ rtx ret = expand_expr_real_1 (val, target, tmode, modifier, alt_rtl,
++ inner_reference_p);
-- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
+ if (!SAVE_EXPR_RESOLVED_P (exp))
+ {
+@@ -9706,6 +9673,7 @@
+ MEM_VOLATILE_P (temp) = 1;
+ if (modifier != EXPAND_WRITE
+ && modifier != EXPAND_MEMORY
++ && !inner_reference_p
+ && mode != BLKmode
+ && align < GET_MODE_ALIGNMENT (mode))
+ {
+@@ -9940,18 +9908,19 @@
+ computation, since it will need a temporary and TARGET is known
+ to have to do. This occurs in unchecked conversion in Ada. */
+ orig_op0 = op0
+- = expand_expr (tem,
+- (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
+- && COMPLETE_TYPE_P (TREE_TYPE (tem))
+- && (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem)))
+- != INTEGER_CST)
+- && modifier != EXPAND_STACK_PARM
+- ? target : NULL_RTX),
+- VOIDmode,
+- (modifier == EXPAND_INITIALIZER
+- || modifier == EXPAND_CONST_ADDRESS
+- || modifier == EXPAND_STACK_PARM)
+- ? modifier : EXPAND_NORMAL);
++ = expand_expr_real (tem,
++ (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
++ && COMPLETE_TYPE_P (TREE_TYPE (tem))
++ && (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem)))
++ != INTEGER_CST)
++ && modifier != EXPAND_STACK_PARM
++ ? target : NULL_RTX),
++ VOIDmode,
++ (modifier == EXPAND_INITIALIZER
++ || modifier == EXPAND_CONST_ADDRESS
++ || modifier == EXPAND_STACK_PARM)
++ ? modifier : EXPAND_NORMAL,
++ NULL, true);
+
+
+ /* If the bitfield is volatile, we want to access it in the
+@@ -10302,17 +10271,18 @@
+ {
+ /* See the normal_inner_ref case for the rationale. */
+ orig_op0
+- = expand_expr (tem,
+- (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
+- && (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem)))
+- != INTEGER_CST)
+- && modifier != EXPAND_STACK_PARM
+- ? target : NULL_RTX),
+- VOIDmode,
+- (modifier == EXPAND_INITIALIZER
+- || modifier == EXPAND_CONST_ADDRESS
+- || modifier == EXPAND_STACK_PARM)
+- ? modifier : EXPAND_NORMAL);
++ = expand_expr_real (tem,
++ (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
++ && (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem)))
++ != INTEGER_CST)
++ && modifier != EXPAND_STACK_PARM
++ ? target : NULL_RTX),
++ VOIDmode,
++ (modifier == EXPAND_INITIALIZER
++ || modifier == EXPAND_CONST_ADDRESS
++ || modifier == EXPAND_STACK_PARM)
++ ? modifier : EXPAND_NORMAL,
++ NULL, true);
+
+ if (MEM_P (orig_op0))
+ {
+@@ -10339,8 +10309,8 @@
+ }
- if (alloc_size == 0)
- {
-@@ -111,7 +110,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
- }
- else
- {
-Index: libgfortran/generated/minloc1_8_i2.c
-===================================================================
---- libgfortran/generated/minloc1_8_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc1_8_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -98,10 +98,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
+ if (!op0)
+- op0 = expand_expr (treeop0,
+- NULL_RTX, VOIDmode, modifier);
++ op0 = expand_expr_real (treeop0, NULL_RTX, VOIDmode, modifier,
++ NULL, inner_reference_p);
+
+ /* If the input and output modes are both the same, we are done. */
+ if (mode == GET_MODE (op0))
+@@ -10407,50 +10377,53 @@
+ op0 = copy_rtx (op0);
+ set_mem_align (op0, MAX (MEM_ALIGN (op0), TYPE_ALIGN (type)));
+ }
+- else if (mode != BLKmode
+- && MEM_ALIGN (op0) < GET_MODE_ALIGNMENT (mode)
+- /* If the target does have special handling for unaligned
+- loads of mode then use them. */
+- && ((icode = optab_handler (movmisalign_optab, mode))
+- != CODE_FOR_nothing))
+- {
+- rtx reg, insn;
+-
+- op0 = adjust_address (op0, mode, 0);
+- /* We've already validated the memory, and we're creating a
+- new pseudo destination. The predicates really can't
+- fail. */
+- reg = gen_reg_rtx (mode);
+-
+- /* Nor can the insn generator. */
+- insn = GEN_FCN (icode) (reg, op0);
+- emit_insn (insn);
+- return reg;
+- }
+- else if (STRICT_ALIGNMENT
++ else if (modifier != EXPAND_WRITE
++ && modifier != EXPAND_MEMORY
++ && !inner_reference_p
+ && mode != BLKmode
+ && MEM_ALIGN (op0) < GET_MODE_ALIGNMENT (mode))
+ {
+- tree inner_type = TREE_TYPE (treeop0);
+- HOST_WIDE_INT temp_size
+- = MAX (int_size_in_bytes (inner_type),
+- (HOST_WIDE_INT) GET_MODE_SIZE (mode));
+- rtx new_rtx
+- = assign_stack_temp_for_type (mode, temp_size, type);
+- rtx new_with_op0_mode
+- = adjust_address (new_rtx, GET_MODE (op0), 0);
++ /* If the target does have special handling for unaligned
++ loads of mode then use them. */
++ if ((icode = optab_handler (movmisalign_optab, mode))
++ != CODE_FOR_nothing)
++ {
++ rtx reg, insn;
+
+- gcc_assert (!TREE_ADDRESSABLE (exp));
++ op0 = adjust_address (op0, mode, 0);
++ /* We've already validated the memory, and we're creating a
++ new pseudo destination. The predicates really can't
++ fail. */
++ reg = gen_reg_rtx (mode);
+
+- if (GET_MODE (op0) == BLKmode)
+- emit_block_move (new_with_op0_mode, op0,
+- GEN_INT (GET_MODE_SIZE (mode)),
+- (modifier == EXPAND_STACK_PARM
+- ? BLOCK_OP_CALL_PARM : BLOCK_OP_NORMAL));
+- else
+- emit_move_insn (new_with_op0_mode, op0);
++ /* Nor can the insn generator. */
++ insn = GEN_FCN (icode) (reg, op0);
++ emit_insn (insn);
++ return reg;
++ }
++ else if (STRICT_ALIGNMENT)
++ {
++ tree inner_type = TREE_TYPE (treeop0);
++ HOST_WIDE_INT temp_size
++ = MAX (int_size_in_bytes (inner_type),
++ (HOST_WIDE_INT) GET_MODE_SIZE (mode));
++ rtx new_rtx
++ = assign_stack_temp_for_type (mode, temp_size, type);
++ rtx new_with_op0_mode
++ = adjust_address (new_rtx, GET_MODE (op0), 0);
+
+- op0 = new_rtx;
++ gcc_assert (!TREE_ADDRESSABLE (exp));
++
++ if (GET_MODE (op0) == BLKmode)
++ emit_block_move (new_with_op0_mode, op0,
++ GEN_INT (GET_MODE_SIZE (mode)),
++ (modifier == EXPAND_STACK_PARM
++ ? BLOCK_OP_CALL_PARM : BLOCK_OP_NORMAL));
++ else
++ emit_move_insn (new_with_op0_mode, op0);
++
++ op0 = new_rtx;
++ }
+ }
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
+ op0 = adjust_address (op0, mode, 0);
+@@ -10550,7 +10523,7 @@
+ /* WITH_SIZE_EXPR expands to its first argument. The caller should
+ have pulled out the size to use in whatever context it needed. */
+ return expand_expr_real (treeop0, original_target, tmode,
+- modifier, alt_rtl);
++ modifier, alt_rtl, inner_reference_p);
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -294,8 +293,7 @@
+ default:
+ return expand_expr_real_2 (&ops, target, tmode, modifier);
+Index: gcc/expr.h
+===================================================================
+--- gcc/expr.h (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/expr.h (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -41,7 +41,8 @@
+ is a constant that is not a legitimate address.
+ EXPAND_WRITE means we are only going to write to the resulting rtx.
+ EXPAND_MEMORY means we are interested in a memory result, even if
+- the memory is constant and we could have propagated a constant value. */
++ the memory is constant and we could have propagated a constant value,
++ or the memory is unaligned on a STRICT_ALIGNMENT target. */
+ enum expand_modifier {EXPAND_NORMAL = 0, EXPAND_STACK_PARM, EXPAND_SUM,
+ EXPAND_CONST_ADDRESS, EXPAND_INITIALIZER, EXPAND_WRITE,
+ EXPAND_MEMORY};
+@@ -428,9 +429,9 @@
+
+ /* Work horses for expand_expr. */
+ extern rtx expand_expr_real (tree, rtx, enum machine_mode,
+- enum expand_modifier, rtx *);
++ enum expand_modifier, rtx *, bool);
+ extern rtx expand_expr_real_1 (tree, rtx, enum machine_mode,
+- enum expand_modifier, rtx *);
++ enum expand_modifier, rtx *, bool);
+ extern rtx expand_expr_real_2 (sepops, rtx, enum machine_mode,
+ enum expand_modifier);
+
+@@ -441,13 +442,13 @@
+ expand_expr (tree exp, rtx target, enum machine_mode mode,
+ enum expand_modifier modifier)
+ {
+- return expand_expr_real (exp, target, mode, modifier, NULL);
++ return expand_expr_real (exp, target, mode, modifier, NULL, false);
+ }
- }
+ static inline rtx
+ expand_normal (tree exp)
+ {
+- return expand_expr_real (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL, NULL);
++ return expand_expr_real (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL, NULL, false);
+ }
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
+ /* At the start of a function, record that we have no previously-pushed
+Index: gcc/fortran/interface.c
+===================================================================
+--- gcc/fortran/interface.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/fortran/interface.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -3557,6 +3557,8 @@
+ gfc_user_op *uop;
+ gfc_intrinsic_op i;
+ const char *gname;
++ gfc_typebound_proc* tbo;
++ gfc_expr* tb_base;
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -307,7 +305,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
+ sym = NULL;
- }
- else
-@@ -485,8 +483,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
+@@ -3573,8 +3575,50 @@
-- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
+ i = fold_unary_intrinsic (e->value.op.op);
- if (alloc_size == 0)
- {
-@@ -495,7 +492,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
- }
- else
- {
-Index: libgfortran/generated/minloc0_8_r8.c
-===================================================================
---- libgfortran/generated/minloc0_8_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/minloc0_8_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -58,7 +58,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -199,7 +199,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else
- {
-@@ -367,7 +367,7 @@
- GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
- retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
- retarray->offset = 0;
-- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
-+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
- }
- else if (unlikely (compile_options.bounds_check))
++ /* See if we find a matching type-bound operator. */
+ if (i == INTRINSIC_USER)
++ tbo = matching_typebound_op (&tb_base, actual,
++ i, e->value.op.uop->name, &gname);
++ else
++ switch (i)
++ {
++#define CHECK_OS_COMPARISON(comp) \
++ case INTRINSIC_##comp: \
++ case INTRINSIC_##comp##_OS: \
++ tbo = matching_typebound_op (&tb_base, actual, \
++ INTRINSIC_##comp, NULL, &gname); \
++ if (!tbo) \
++ tbo = matching_typebound_op (&tb_base, actual, \
++ INTRINSIC_##comp##_OS, NULL, &gname); \
++ break;
++ CHECK_OS_COMPARISON(EQ)
++ CHECK_OS_COMPARISON(NE)
++ CHECK_OS_COMPARISON(GT)
++ CHECK_OS_COMPARISON(GE)
++ CHECK_OS_COMPARISON(LT)
++ CHECK_OS_COMPARISON(LE)
++#undef CHECK_OS_COMPARISON
++
++ default:
++ tbo = matching_typebound_op (&tb_base, actual, i, NULL, &gname);
++ break;
++ }
++
++ /* If there is a matching typebound-operator, replace the expression with
++ a call to it and succeed. */
++ if (tbo)
{
-Index: libgfortran/generated/matmul_l8.c
-===================================================================
---- libgfortran/generated/matmul_l8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/matmul_l8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -88,7 +88,7 @@
- }
-
- retarray->base_addr
-- = xmalloc (sizeof (GFC_LOGICAL_8) * size0 ((array_t *) retarray));
-+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_8));
- retarray->offset = 0;
- }
- else if (unlikely (compile_options.bounds_check))
-Index: libgfortran/generated/product_r10.c
-===================================================================
---- libgfortran/generated/product_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/product_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
- if (alloc_size == 0)
++ gcc_assert (tb_base);
++ build_compcall_for_operator (e, actual, tb_base, tbo, gname);
++
++ if (gfc_resolve_expr (e) == FAILURE)
++ return MATCH_ERROR;
++ else
++ return MATCH_YES;
++ }
++
++ if (i == INTRINSIC_USER)
++ {
+ for (ns = gfc_current_ns; ns; ns = ns->parent)
{
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
-
- }
-
-- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
+ uop = gfc_find_uop (e->value.op.uop->name, ns);
+@@ -3623,54 +3667,6 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
+ if (sym == NULL)
+ {
+- gfc_typebound_proc* tbo;
+- gfc_expr* tb_base;
+-
+- /* See if we find a matching type-bound operator. */
+- if (i == INTRINSIC_USER)
+- tbo = matching_typebound_op (&tb_base, actual,
+- i, e->value.op.uop->name, &gname);
+- else
+- switch (i)
+- {
+-#define CHECK_OS_COMPARISON(comp) \
+- case INTRINSIC_##comp: \
+- case INTRINSIC_##comp##_OS: \
+- tbo = matching_typebound_op (&tb_base, actual, \
+- INTRINSIC_##comp, NULL, &gname); \
+- if (!tbo) \
+- tbo = matching_typebound_op (&tb_base, actual, \
+- INTRINSIC_##comp##_OS, NULL, &gname); \
+- break;
+- CHECK_OS_COMPARISON(EQ)
+- CHECK_OS_COMPARISON(NE)
+- CHECK_OS_COMPARISON(GT)
+- CHECK_OS_COMPARISON(GE)
+- CHECK_OS_COMPARISON(LT)
+- CHECK_OS_COMPARISON(LE)
+-#undef CHECK_OS_COMPARISON
+-
+- default:
+- tbo = matching_typebound_op (&tb_base, actual, i, NULL, &gname);
+- break;
+- }
+-
+- /* If there is a matching typebound-operator, replace the expression with
+- a call to it and succeed. */
+- if (tbo)
+- {
+- gfc_try result;
+-
+- gcc_assert (tb_base);
+- build_compcall_for_operator (e, actual, tb_base, tbo, gname);
+-
+- result = gfc_resolve_expr (e);
+- if (result == FAILURE)
+- return MATCH_ERROR;
+-
+- return MATCH_YES;
+- }
+-
+ /* Don't use gfc_free_actual_arglist(). */
+ free (actual->next);
+ free (actual);
+Index: gcc/fortran/trans-array.c
+===================================================================
+--- gcc/fortran/trans-array.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/fortran/trans-array.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -4299,11 +4299,20 @@
- }
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
+ for (ss = rss; ss != gfc_ss_terminator; ss = ss->next)
+ {
+- if (ss->info->type != GFC_SS_SECTION)
+- continue;
-- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
+ ss_expr = ss->info->expr;
- if (alloc_size == 0)
++ if (ss->info->type != GFC_SS_SECTION)
++ {
++ /* Check for cases like c(:)(1:2) = c(2)(2:3) */
++ if (!nDepend && dest_expr->rank > 0
++ && dest_expr->ts.type == BT_CHARACTER
++ && ss_expr->expr_type == EXPR_VARIABLE)
++
++ nDepend = gfc_check_dependency (dest_expr, ss_expr, false);
++ continue;
++ }
++
+ if (dest_expr->symtree->n.sym != ss_expr->symtree->n.sym)
{
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
- }
- else
- {
-Index: libgfortran/generated/product_i1.c
+ if (gfc_could_be_alias (dest, ss)
+Index: gcc/fortran/ChangeLog
===================================================================
---- libgfortran/generated/product_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/product_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -97,10 +97,9 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
+--- gcc/fortran/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1,3 +1,42 @@
++2015-02-01 Jakub Jelinek <jakub@redhat.com>
++
++ Backported from mainline
++ 2015-01-13 Jakub Jelinek <jakub@redhat.com>
++
++ PR fortran/64528
++ * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
++ on dummy args with VALUE attribute.
++
++2015-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
++
++ PR fortran/56867
++ * trans-array.c (gfc_conv_resolve_dependencies): Also check
++ dependencies when there may be substrings of character arrays.
++
++2015-01-24 Thomas Koenig <tkoenig@netcologne.de>
++
++ Backport from trunk
++ PR fortran/57023
++ * dependency.c (callback_dummy_intent_not_int): New function.
++ (dummy_intent_not_in): New function.
++ (gfc_full_array_ref_p): Use dummy_intent_not_in.
++
++2015-01-12 Janus Weil <janus@gcc.gnu.org>
++
++ Backport from mainline
++ PR fortran/63733
++ * interface.c (gfc_extend_expr): Look for type-bound operators before
++ non-typebound ones.
++
++2014-12-23 Janus Weil <janus@gcc.gnu.org>
++
++ Backport from mainline
++ PR fortran/64244
++ * resolve.c (resolve_typebound_call): New argument to pass out the
++ non-overridable attribute of the specific procedure.
++ (resolve_typebound_subroutine): Get overridable flag from
++ resolve_typebound_call.
++
+ 2014-12-19 Release Manager
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
+ * GCC 4.8.4 released.
+Index: gcc/fortran/resolve.c
+===================================================================
+--- gcc/fortran/resolve.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/fortran/resolve.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -6048,7 +6048,7 @@
+ /* Resolve a call to a type-bound subroutine. */
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
- if (alloc_size == 0)
- {
- /* Make sure we have a zero-sized array. */
-@@ -272,8 +271,7 @@
+ static gfc_try
+-resolve_typebound_call (gfc_code* c, const char **name)
++resolve_typebound_call (gfc_code* c, const char **name, bool *overridable)
+ {
+ gfc_actual_arglist* newactual;
+ gfc_symtree* target;
+@@ -6072,6 +6072,10 @@
+ if (resolve_typebound_generic_call (c->expr1, name) == FAILURE)
+ return FAILURE;
- }
++ /* Pass along the NON_OVERRIDABLE attribute of the specific TBP. */
++ if (overridable)
++ *overridable = !c->expr1->value.compcall.tbp->non_overridable;
++
+ /* Transform into an ordinary EXEC_CALL for now. */
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
+ if (resolve_typebound_static (c->expr1, &target, &newactual) == FAILURE)
+@@ -6324,7 +6328,7 @@
+ if (c->ts.u.derived == NULL)
+ c->ts.u.derived = gfc_find_derived_vtab (declared);
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-@@ -285,7 +283,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
+- if (resolve_typebound_call (code, &name) == FAILURE)
++ if (resolve_typebound_call (code, &name, NULL) == FAILURE)
+ return FAILURE;
+ /* Use the generic name if it is there. */
+@@ -6356,7 +6360,7 @@
}
- else
-@@ -430,8 +428,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
+ if (st == NULL)
+- return resolve_typebound_call (code, NULL);
++ return resolve_typebound_call (code, NULL, NULL);
- if (alloc_size == 0)
- {
-@@ -440,7 +437,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
- }
- else
+ if (resolve_ref (code->expr1) == FAILURE)
+ return FAILURE;
+@@ -6369,10 +6373,10 @@
+ || (!class_ref && st->n.sym->ts.type != BT_CLASS))
{
-Index: libgfortran/generated/all_l8.c
-===================================================================
---- libgfortran/generated/all_l8.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/all_l8.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -101,8 +101,7 @@
- retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
-
-- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-- * extent[rank-1];
-+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
-
- if (alloc_size == 0)
- {
-@@ -111,7 +110,7 @@
- return;
- }
- else
-- retarray->base_addr = xmalloc (alloc_size);
-+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
+ gfc_free_ref_list (new_ref);
+- return resolve_typebound_call (code, NULL);
++ return resolve_typebound_call (code, NULL, NULL);
}
- else
+
+- if (resolve_typebound_call (code, &name) == FAILURE)
++ if (resolve_typebound_call (code, &name, &overridable) == FAILURE)
{
-Index: libgfortran/generated/in_pack_r16.c
+ gfc_free_ref_list (new_ref);
+ return FAILURE;
+Index: gcc/fortran/trans-decl.c
===================================================================
---- libgfortran/generated/in_pack_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/in_pack_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -76,7 +76,7 @@
- return source->base_addr;
-
- /* Allocate storage for the destination. */
-- destptr = (GFC_REAL_16 *)xmalloc (ssize * sizeof (GFC_REAL_16));
-+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_16));
- dest = destptr;
- src = source->base_addr;
- stride0 = stride[0];
-Index: libgfortran/generated/in_pack_i1.c
+--- gcc/fortran/trans-decl.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/fortran/trans-decl.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -2186,8 +2186,9 @@
+ /* Fill in arg stuff. */
+ DECL_CONTEXT (parm) = fndecl;
+ DECL_ARG_TYPE (parm) = TREE_VALUE (typelist);
+- /* All implementation args are read-only. */
+- TREE_READONLY (parm) = 1;
++ /* All implementation args except for VALUE are read-only. */
++ if (!f->sym->attr.value)
++ TREE_READONLY (parm) = 1;
+ if (POINTER_TYPE_P (type)
+ && (!f->sym->attr.proc_pointer
+ && f->sym->attr.flavor != FL_PROCEDURE))
+Index: gcc/fortran/dependency.c
===================================================================
---- libgfortran/generated/in_pack_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/generated/in_pack_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -76,7 +76,7 @@
- return source->base_addr;
+--- gcc/fortran/dependency.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/fortran/dependency.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1604,11 +1604,40 @@
+ return GFC_DEP_EQUAL;
+ }
- /* Allocate storage for the destination. */
-- destptr = (GFC_INTEGER_1 *)xmalloc (ssize * sizeof (GFC_INTEGER_1));
-+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_1));
- dest = destptr;
- src = source->base_addr;
- stride0 = stride[0];
-Index: libgfortran/libgfortran.h
-===================================================================
---- libgfortran/libgfortran.h (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/libgfortran.h (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -751,6 +751,9 @@
- extern void *xmalloc (size_t) __attribute__ ((malloc));
- internal_proto(xmalloc);
++/* Callback function for checking if an expression depends on a
++ dummy variable which is any other than INTENT(IN). */
-+extern void *xmallocarray (size_t, size_t) __attribute__ ((malloc));
-+internal_proto(xmallocarray);
++static int
++callback_dummy_intent_not_in (gfc_expr **ep,
++ int *walk_subtrees ATTRIBUTE_UNUSED,
++ void *data ATTRIBUTE_UNUSED)
++{
++ gfc_expr *e = *ep;
+
- extern void *xcalloc (size_t, size_t) __attribute__ ((malloc));
- internal_proto(xcalloc);
-
-Index: libgfortran/config.h.in
-===================================================================
---- libgfortran/config.h.in (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/config.h.in (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -711,6 +711,9 @@
- /* Define to 1 if you have the `strtof' function. */
- #undef HAVE_STRTOF
-
-+/* Define to 1 if you have the `strtok_r' function. */
-+#undef HAVE_STRTOK_R
++ if (e->expr_type == EXPR_VARIABLE && e->symtree
++ && e->symtree->n.sym->attr.dummy)
++ return e->symtree->n.sym->attr.intent != INTENT_IN;
++ else
++ return 0;
++}
+
- /* Define to 1 if you have the `strtold' function. */
- #undef HAVE_STRTOLD
-
-Index: libgfortran/io/list_read.c
-===================================================================
---- libgfortran/io/list_read.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/io/list_read.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -2354,7 +2354,7 @@
- {
- index_type len = strlen (nl->var_name) + 1;
- int dim;
-- char * ext_name = (char*)xmalloc (len + 1);
-+ char * ext_name = xmalloc (len + 1);
- memcpy (ext_name, nl->var_name, len-1);
- memcpy (ext_name + len - 1, "%", 2);
- for (nl = nl->next; nl; nl = nl->next)
-Index: libgfortran/io/unit.c
-===================================================================
---- libgfortran/io/unit.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/io/unit.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -455,7 +455,7 @@
- {
- iunit->rank = GFC_DESCRIPTOR_RANK (dtp->internal_unit_desc);
- iunit->ls = (array_loop_spec *)
-- xmalloc (iunit->rank * sizeof (array_loop_spec));
-+ xmallocarray (iunit->rank, sizeof (array_loop_spec));
- dtp->internal_unit_len *=
- init_loop_spec (dtp->internal_unit_desc, iunit->ls, &start_record);
++/* Auxiliary function to check if subexpressions have dummy variables which
++ are not intent(in).
++*/
++
++static bool
++dummy_intent_not_in (gfc_expr **ep)
++{
++ return gfc_expr_walker (ep, callback_dummy_intent_not_in, NULL);
++}
++
+ /* Determine if an array ref, usually an array section specifies the
+ entire array. In addition, if the second, pointer argument is
+ provided, the function will return true if the reference is
+- contiguous; eg. (:, 1) gives true but (1,:) gives false. */
++ contiguous; eg. (:, 1) gives true but (1,:) gives false.
++ If one of the bounds depends on a dummy variable which is
++ not INTENT(IN), also return false, because the user may
++ have changed the variable. */
-Index: libgfortran/io/unix.c
-===================================================================
---- libgfortran/io/unix.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/io/unix.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -407,7 +407,9 @@
+ bool
+ gfc_full_array_ref_p (gfc_ref *ref, bool *contiguous)
+@@ -1672,7 +1701,8 @@
+ && (!ref->u.ar.as
+ || !ref->u.ar.as->lower[i]
+ || gfc_dep_compare_expr (ref->u.ar.start[i],
+- ref->u.ar.as->lower[i])))
++ ref->u.ar.as->lower[i])
++ || dummy_intent_not_in (&ref->u.ar.start[i])))
+ lbound_OK = false;
+ /* Check the upper bound. */
+ if (ref->u.ar.end[i]
+@@ -1679,7 +1709,8 @@
+ && (!ref->u.ar.as
+ || !ref->u.ar.as->upper[i]
+ || gfc_dep_compare_expr (ref->u.ar.end[i],
+- ref->u.ar.as->upper[i])))
++ ref->u.ar.as->upper[i])
++ || dummy_intent_not_in (&ref->u.ar.end[i])))
+ ubound_OK = false;
+ /* Check the stride. */
+ if (ref->u.ar.stride[i]
+Index: gcc/alias.c
+===================================================================
+--- gcc/alias.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/alias.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -380,17 +380,9 @@
+ static inline int
+ mems_in_disjoint_alias_sets_p (const_rtx mem1, const_rtx mem2)
{
- int retval;
-
-- if (s->fd != STDOUT_FILENO
-+ if (s->fd == -1)
-+ retval = -1;
-+ else if (s->fd != STDOUT_FILENO
- && s->fd != STDERR_FILENO
- && s->fd != STDIN_FILENO)
- retval = close (s->fd);
-@@ -983,7 +985,15 @@
-
- /* Get the current length of the file. */
-
-- fstat (fd, &statbuf);
-+ if (fstat (fd, &statbuf) == -1)
-+ {
-+ s->st_dev = s->st_ino = -1;
-+ s->file_length = 0;
-+ if (errno == EBADF)
-+ s->fd = -1;
-+ raw_init (s);
-+ return (stream *) s;
-+ }
+-/* Perform a basic sanity check. Namely, that there are no alias sets
+- if we're not using strict aliasing. This helps to catch bugs
+- whereby someone uses PUT_CODE, but doesn't clear MEM_ALIAS_SET, or
+- where a MEM is allocated in some way other than by the use of
+- gen_rtx_MEM, and the MEM_ALIAS_SET is not cleared. If we begin to
+- use alias sets to indicate that spilled registers cannot alias each
+- other, we might need to remove this check. */
+- gcc_assert (flag_strict_aliasing
+- || (!MEM_ALIAS_SET (mem1) && !MEM_ALIAS_SET (mem2)));
+-
+- return ! alias_sets_conflict_p (MEM_ALIAS_SET (mem1), MEM_ALIAS_SET (mem2));
++ return (flag_strict_aliasing
++ && ! alias_sets_conflict_p (MEM_ALIAS_SET (mem1),
++ MEM_ALIAS_SET (mem2)));
+ }
- s->st_dev = statbuf.st_dev;
- s->st_ino = statbuf.st_ino;
-Index: libgfortran/io/transfer.c
+ /* Insert the NODE into the splay tree given by DATA. Used by
+Index: gcc/cfgexpand.c
===================================================================
---- libgfortran/io/transfer.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/io/transfer.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -3776,9 +3776,9 @@
- if (nml->var_rank > 0)
- {
- nml->dim = (descriptor_dimension*)
-- xmalloc (nml->var_rank * sizeof (descriptor_dimension));
-+ xmallocarray (nml->var_rank, sizeof (descriptor_dimension));
- nml->ls = (array_loop_spec*)
-- xmalloc (nml->var_rank * sizeof (array_loop_spec));
-+ xmallocarray (nml->var_rank, sizeof (array_loop_spec));
- }
+--- gcc/cfgexpand.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/cfgexpand.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -2111,7 +2111,7 @@
+ if (lhs)
+ expand_assignment (lhs, exp, false);
else
- {
-Index: libgfortran/io/write.c
-===================================================================
---- libgfortran/io/write.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libgfortran/io/write.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1863,7 +1863,7 @@
- base_var_name_len = base ? strlen (base->var_name) : 0;
- ext_name_len = base_name_len + base_var_name_len
- + strlen (obj->var_name) + obj->var_rank * NML_DIGITS + 1;
-- ext_name = (char*)xmalloc (ext_name_len);
-+ ext_name = xmalloc (ext_name_len);
+- expand_expr_real_1 (exp, const0_rtx, VOIDmode, EXPAND_NORMAL, NULL);
++ expand_expr (exp, const0_rtx, VOIDmode, EXPAND_NORMAL);
- memcpy (ext_name, base_name, base_name_len);
- clen = strlen (obj->var_name + base_var_name_len);
-@@ -1892,7 +1892,7 @@
- /* Now obj_name. */
-
- obj_name_len = strlen (obj->var_name) + 1;
-- obj_name = xmalloc (obj_name_len+1);
-+ obj_name = xmalloc (obj_name_len + 1);
- memcpy (obj_name, obj->var_name, obj_name_len-1);
- memcpy (obj_name + obj_name_len-1, "%", 2);
-
-Index: libada/Makefile.in
+ mark_transaction_restart_calls (stmt);
+ }
+Index: gcc/combine.c
===================================================================
---- libada/Makefile.in (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libada/Makefile.in (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -60,7 +60,7 @@
- PICFLAG = @PICFLAG@
- GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
- GNATLIBCFLAGS= -O2
--GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) \
-+GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \
- -fexceptions -DIN_RTS @have_getipinfo@
+--- gcc/combine.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/combine.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1527,8 +1527,8 @@
+ uns3 = TYPE_UNSIGNED (DECL_ARG_TYPE (arg));
- host_subdir = @host_subdir@
-Index: libada/ChangeLog
-===================================================================
---- libada/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libada/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,3 +1,7 @@
-+2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
-+
-+ * Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C.
-+
- 2014-05-22 Release Manager
+ /* The mode and signedness of the argument as it is actually passed,
+- after any TARGET_PROMOTE_FUNCTION_ARGS-driven ABI promotions. */
+- mode3 = promote_function_mode (DECL_ARG_TYPE (arg), mode2, &uns3,
++ see assign_parm_setup_reg in function.c. */
++ mode3 = promote_function_mode (TREE_TYPE (arg), mode1, &uns3,
+ TREE_TYPE (cfun->decl), 0);
- * GCC 4.8.3 released.
-Index: libffi/src/powerpc/linux64_closure.S
+ /* The mode of the register in which the argument is being passed. */
+Index: gcc/config/i386/i386.md
===================================================================
---- libffi/src/powerpc/linux64_closure.S (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libffi/src/powerpc/linux64_closure.S (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -381,7 +381,8 @@
- .align 3
- .LEFDE1:
-
--# if defined __ELF__ && defined __linux__
-+#endif
-+
-+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
- .section .note.GNU-stack,"",@progbits
--# endif
+--- gcc/config/i386/i386.md (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/config/i386/i386.md (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1945,7 +1945,8 @@
+ (const_string "ssemov")
+ (eq_attr "alternative" "15,16")
+ (const_string "ssecvt")
+- (match_operand 1 "pic_32bit_operand")
++ (and (match_operand 0 "register_operand")
++ (match_operand 1 "pic_32bit_operand"))
+ (const_string "lea")
+ ]
+ (const_string "imov")))
+@@ -2171,7 +2172,8 @@
+ (const_string "sselog1")
+ (eq_attr "alternative" "7,8,9,10,11")
+ (const_string "ssemov")
+- (match_operand 1 "pic_32bit_operand")
++ (and (match_operand 0 "register_operand")
++ (match_operand 1 "pic_32bit_operand"))
+ (const_string "lea")
+ ]
+ (const_string "imov")))
+Index: gcc/config/i386/avx2intrin.h
+===================================================================
+--- gcc/config/i386/avx2intrin.h (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/config/i386/avx2intrin.h (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -639,11 +639,20 @@
+ #ifdef __OPTIMIZE__
+ extern __inline __m256i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
++_mm256_bslli_epi128 (__m256i __A, const int __N)
++{
++ return (__m256i)__builtin_ia32_pslldqi256 (__A, __N * 8);
++}
++
++extern __inline __m256i
++__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm256_slli_si256 (__m256i __A, const int __N)
+ {
+ return (__m256i)__builtin_ia32_pslldqi256 (__A, __N * 8);
+ }
+ #else
++#define _mm256_bslli_epi128(A, N) \
++ ((__m256i)__builtin_ia32_pslldqi256 ((__m256i)(A), (int)(N) * 8))
+ #define _mm256_slli_si256(A, N) \
+ ((__m256i)__builtin_ia32_pslldqi256 ((__m256i)(A), (int)(N) * 8))
#endif
-Index: libffi/src/powerpc/linux64.S
-===================================================================
---- libffi/src/powerpc/linux64.S (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libffi/src/powerpc/linux64.S (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -254,7 +254,8 @@
- .align 3
- .LEFDE1:
-
--# if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
-+#endif
+@@ -721,11 +730,20 @@
+ #ifdef __OPTIMIZE__
+ extern __inline __m256i
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
++_mm256_bsrli_epi128 (__m256i __A, const int __N)
++{
++ return (__m256i)__builtin_ia32_psrldqi256 (__A, __N * 8);
++}
+
-+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
- .section .note.GNU-stack,"",@progbits
--# endif
++extern __inline __m256i
++__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+ _mm256_srli_si256 (__m256i __A, const int __N)
+ {
+ return (__m256i)__builtin_ia32_psrldqi256 (__A, __N * 8);
+ }
+ #else
++#define _mm256_bsrli_epi128(A, N) \
++ ((__m256i)__builtin_ia32_psrldqi256 ((__m256i)(A), (int)(N) * 8))
+ #define _mm256_srli_si256(A, N) \
+ ((__m256i)__builtin_ia32_psrldqi256 ((__m256i)(A), (int)(N) * 8))
#endif
-Index: libffi/ChangeLog
+Index: gcc/config/i386/sse.md
===================================================================
---- libffi/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libffi/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,3 +1,9 @@
-+2014-09-11 Jakub Jelinek <jakub@redhat.com>
-+
-+ * src/powerpc/linux64.S: Emit .note.GNU-stack even when
-+ POWERPC64 is not defined.
-+ * src/powerpc/linux64_closure.S: Likewise. Also test _CALL_ELF == 2.
-+
- 2014-05-22 Release Manager
-
- * GCC 4.8.3 released.
-Index: libcpp/ChangeLog
+--- gcc/config/i386/sse.md (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/config/i386/sse.md (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -7369,7 +7369,7 @@
+ movss\t{%2, %0|%0, %2}
+ movss\t{%2, %0|%0, %2}
+ vmovss\t{%2, %1, %0|%0, %1, %2}"
+- [(set_attr "isa" "sse2,*,noavx,noavx,avx")
++ [(set_attr "isa" "sse2,sse2,noavx,noavx,avx")
+ (set_attr "type" "ssemov")
+ (set_attr "prefix" "maybe_vex,maybe_vex,orig,orig,vex")
+ (set_attr "mode" "TI,TI,V4SF,SF,SF")])
+Index: gcc/config/i386/emmintrin.h
===================================================================
---- libcpp/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libcpp/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -1,3 +1,14 @@
-+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-+
-+ Backport from mainline r215873
-+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+--- gcc/config/i386/emmintrin.h (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/config/i386/emmintrin.h (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -1143,6 +1143,18 @@
+
+ #ifdef __OPTIMIZE__
+ extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
++_mm_bsrli_si128 (__m128i __A, const int __N)
++{
++ return (__m128i)__builtin_ia32_psrldqi128 (__A, __N * 8);
++}
+
-+ * lex.c (search_line_fast): Add new version to be used for Power8
-+ and later targets when Altivec is enabled. Restrict the existing
-+ Altivec version to big-endian systems so that lvsr is not used on
-+ little endian, where it is deprecated. Remove LE-specific code
-+ from the now-BE-only version.
++extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
++_mm_bslli_si128 (__m128i __A, const int __N)
++{
++ return (__m128i)__builtin_ia32_pslldqi128 (__A, __N * 8);
++}
+
- 2014-05-22 Release Manager
-
- * GCC 4.8.3 released.
-Index: libcpp/lex.c
-===================================================================
---- libcpp/lex.c (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ libcpp/lex.c (.../branches/gcc-4_8-branch) (revision 217117)
-@@ -515,9 +515,111 @@
- search_line_fast = impl;
++extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+ _mm_srli_si128 (__m128i __A, const int __N)
+ {
+ return (__m128i)__builtin_ia32_psrldqi128 (__A, __N * 8);
+@@ -1154,6 +1166,10 @@
+ return (__m128i)__builtin_ia32_pslldqi128 (__A, __N * 8);
}
+ #else
++#define _mm_bsrli_si128(A, N) \
++ ((__m128i)__builtin_ia32_psrldqi128 ((__m128i)(A), (int)(N) * 8))
++#define _mm_bslli_si128(A, N) \
++ ((__m128i)__builtin_ia32_pslldqi128 ((__m128i)(A), (int)(N) * 8))
+ #define _mm_srli_si128(A, N) \
+ ((__m128i)__builtin_ia32_psrldqi128 ((__m128i)(A), (int)(N) * 8))
+ #define _mm_slli_si128(A, N) \
+Index: gcc/config/i386/i386.c
+===================================================================
+--- gcc/config/i386/i386.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/config/i386/i386.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -5539,7 +5539,18 @@
+ if (abi == SYSV_ABI)
+ {
+ if (lookup_attribute ("ms_abi", TYPE_ATTRIBUTES (fntype)))
+- abi = MS_ABI;
++ {
++ if (TARGET_X32)
++ {
++ static bool warned = false;
++ if (!warned)
++ {
++ error ("X32 does not support ms_abi attribute");
++ warned = true;
++ }
++ }
++ abi = MS_ABI;
++ }
+ }
+ else if (lookup_attribute ("sysv_abi", TYPE_ATTRIBUTES (fntype)))
+ abi = SYSV_ABI;
+@@ -10483,6 +10494,10 @@
+ if (sp_is_cfa_reg)
+ m->fs.cfa_offset += UNITS_PER_WORD;
+ RTX_FRAME_RELATED_P (insn) = 1;
++ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
++ gen_rtx_SET (VOIDmode, stack_pointer_rtx,
++ plus_constant (Pmode, stack_pointer_rtx,
++ -UNITS_PER_WORD)));
+ }
+ }
--#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__)
-+#elif defined(_ARCH_PWR8) && defined(__ALTIVEC__)
+@@ -10496,6 +10511,10 @@
+ if (sp_is_cfa_reg)
+ m->fs.cfa_offset += UNITS_PER_WORD;
+ RTX_FRAME_RELATED_P (insn) = 1;
++ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
++ gen_rtx_SET (VOIDmode, stack_pointer_rtx,
++ plus_constant (Pmode, stack_pointer_rtx,
++ -UNITS_PER_WORD)));
+ }
+ }
--/* A vection of the fast scanner using AltiVec vectorized byte compares. */
-+/* A vection of the fast scanner using AltiVec vectorized byte compares
-+ and VSX unaligned loads (when VSX is available). This is otherwise
-+ the same as the pre-GCC 5 version. */
-+
-+static const uchar *
-+search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
-+{
-+ typedef __attribute__((altivec(vector))) unsigned char vc;
-+
-+ const vc repl_nl = {
-+ '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n',
-+ '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n'
-+ };
-+ const vc repl_cr = {
-+ '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r',
-+ '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r'
-+ };
-+ const vc repl_bs = {
-+ '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\',
-+ '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\'
-+ };
-+ const vc repl_qm = {
-+ '?', '?', '?', '?', '?', '?', '?', '?',
-+ '?', '?', '?', '?', '?', '?', '?', '?',
-+ };
-+ const vc zero = { 0 };
-+
-+ vc data, t;
-+
-+ /* Main loop processing 16 bytes at a time. */
-+ do
+Index: gcc/config/rs6000/rs6000-cpus.def
+===================================================================
+--- gcc/config/rs6000/rs6000-cpus.def (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/config/rs6000/rs6000-cpus.def (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -91,6 +91,7 @@
+ | OPTION_MASK_PPC_GFXOPT \
+ | OPTION_MASK_PPC_GPOPT \
+ | OPTION_MASK_QUAD_MEMORY \
++ | OPTION_MASK_QUAD_MEMORY_ATOMIC \
+ | OPTION_MASK_RECIP_PRECISION \
+ | OPTION_MASK_SOFT_FLOAT \
+ | OPTION_MASK_STRICT_ALIGN_OPTIONAL \
+Index: gcc/config/rs6000/rs6000.c
+===================================================================
+--- gcc/config/rs6000/rs6000.c (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/config/rs6000/rs6000.c (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -32628,6 +32628,14 @@
+ if (complement_op2_p)
+ op2 = gen_rtx_NOT (mode, op2);
+
++ /* For canonical RTL, if only one arm is inverted it is the first. */
++ if (!complement_op1_p && complement_op2_p)
+ {
-+ vc m_nl, m_cr, m_bs, m_qm;
-+
-+ data = *((const vc *)s);
-+ s += 16;
-+
-+ m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
-+ m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr);
-+ m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs);
-+ m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm);
-+ t = (m_nl | m_cr) | (m_bs | m_qm);
-+
-+ /* T now contains 0xff in bytes for which we matched one of the relevant
-+ characters. We want to exit the loop if any byte in T is non-zero.
-+ Below is the expansion of vec_any_ne(t, zero). */
++ rtx temp = op1;
++ op1 = op2;
++ op2 = temp;
+ }
-+ while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero));
-+
-+ /* Restore s to to point to the 16 bytes we just processed. */
-+ s -= 16;
-+
-+ {
-+#define N (sizeof(vc) / sizeof(long))
-+
-+ union {
-+ vc v;
-+ /* Statically assert that N is 2 or 4. */
-+ unsigned long l[(N == 2 || N == 4) ? N : -1];
-+ } u;
-+ unsigned long l, i = 0;
-+
-+ u.v = t;
-+
-+ /* Find the first word of T that is non-zero. */
-+ switch (N)
-+ {
-+ case 4:
-+ l = u.l[i++];
-+ if (l != 0)
-+ break;
-+ s += sizeof(unsigned long);
-+ l = u.l[i++];
-+ if (l != 0)
-+ break;
-+ s += sizeof(unsigned long);
-+ case 2:
-+ l = u.l[i++];
-+ if (l != 0)
-+ break;
-+ s += sizeof(unsigned long);
-+ l = u.l[i];
-+ }
-+
-+ /* L now contains 0xff in bytes for which we matched one of the
-+ relevant characters. We can find the byte index by finding
-+ its bit index and dividing by 8. */
-+#ifdef __BIG_ENDIAN__
-+ l = __builtin_clzl(l) >> 3;
-+#else
-+ l = __builtin_ctzl(l) >> 3;
-+#endif
-+ return s + l;
+
-+#undef N
-+ }
-+}
-+
-+#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__) && defined (__BIG_ENDIAN__)
-+
-+/* A vection of the fast scanner using AltiVec vectorized byte compares.
-+ This cannot be used for little endian because vec_lvsl/lvsr are
-+ deprecated for little endian and the code won't work properly. */
- /* ??? Unfortunately, attribute(target("altivec")) is not yet supported,
- so we can't compile this function without -maltivec on the command line
- (or implied by some other switch). */
-@@ -559,13 +661,8 @@
- beginning with all ones and shifting in zeros according to the
- mis-alignment. The LVSR instruction pulls the exact shift we
- want from the address. */
--#ifdef __BIG_ENDIAN__
- mask = __builtin_vec_lvsr(0, s);
- mask = __builtin_vec_perm(zero, ones, mask);
--#else
-- mask = __builtin_vec_lvsl(0, s);
-- mask = __builtin_vec_perm(ones, zero, mask);
--#endif
- data &= mask;
-
- /* While altivec loads mask addresses, we still need to align S so
-@@ -629,11 +726,7 @@
- /* L now contains 0xff in bytes for which we matched one of the
- relevant characters. We can find the byte index by finding
- its bit index and dividing by 8. */
--#ifdef __BIG_ENDIAN__
- l = __builtin_clzl(l) >> 3;
--#else
-- l = __builtin_ctzl(l) >> 3;
--#endif
- return s + l;
-
- #undef N
-Index: .
+ bool_rtx = ((code == NOT)
+ ? gen_rtx_NOT (mode, op1)
+ : gen_rtx_fmt_ee (code, mode, op1, op2));
+Index: gcc/config/rs6000/rs6000.md
===================================================================
---- . (.../tags/gcc_4_8_3_release) (revision 217117)
-+++ . (.../branches/gcc-4_8-branch) (revision 217117)
-
-Property changes on: .
-___________________________________________________________________
-Modified: svn:mergeinfo
- Merged /trunk:r211733,215049
+--- gcc/config/rs6000/rs6000.md (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/config/rs6000/rs6000.md (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -8622,8 +8622,8 @@
+ [(set (match_operand:BOOL_128 0 "vlogical_operand" "=<BOOL_REGS_OUTPUT>")
+ (match_operator:BOOL_128 3 "boolean_operator"
+ [(not:BOOL_128
+- (match_operand:BOOL_128 2 "vlogical_operand" "<BOOL_REGS_OP1>"))
+- (match_operand:BOOL_128 1 "vlogical_operand" "<BOOL_REGS_OP2>")]))]
++ (match_operand:BOOL_128 2 "vlogical_operand" "<BOOL_REGS_OP2>"))
++ (match_operand:BOOL_128 1 "vlogical_operand" "<BOOL_REGS_OP1>")]))]
+ "TARGET_P8_VECTOR || (GET_CODE (operands[3]) == AND)"
+ {
+ if (TARGET_VSX && vsx_register_operand (operands[0], <MODE>mode))
+@@ -8638,7 +8638,7 @@
+ && reload_completed && int_reg_operand (operands[0], <MODE>mode)"
+ [(const_int 0)]
+ {
+- rs6000_split_logical (operands, GET_CODE (operands[3]), false, true, false,
++ rs6000_split_logical (operands, GET_CODE (operands[3]), false, false, true,
+ NULL_RTX);
+ DONE;
+ }
+@@ -8660,14 +8660,14 @@
+ [(set (match_operand:TI2 0 "int_reg_operand" "=&r,r,r")
+ (match_operator:TI2 3 "boolean_operator"
+ [(not:TI2
+- (match_operand:TI2 1 "int_reg_operand" "r,0,r"))
+- (match_operand:TI2 2 "int_reg_operand" "r,r,0")]))]
++ (match_operand:TI2 2 "int_reg_operand" "r,0,r"))
++ (match_operand:TI2 1 "int_reg_operand" "r,r,0")]))]
+ "!TARGET_P8_VECTOR && (GET_CODE (operands[3]) != AND)"
+ "#"
+ "reload_completed && !TARGET_P8_VECTOR && (GET_CODE (operands[3]) != AND)"
+ [(const_int 0)]
+ {
+- rs6000_split_logical (operands, GET_CODE (operands[3]), false, true, false,
++ rs6000_split_logical (operands, GET_CODE (operands[3]), false, false, true,
+ NULL_RTX);
+ DONE;
+ }
+Index: gcc/config/arm/arm.h
+===================================================================
+--- gcc/config/arm/arm.h (.../tags/gcc_4_8_4_release) (revision 220382)
++++ gcc/config/arm/arm.h (.../branches/gcc-4_8-branch) (revision 220382)
+@@ -63,8 +63,8 @@
+ builtin_define_with_int_value ( \
+ "__ARM_SIZEOF_MINIMAL_ENUM", \
+ flag_short_enums ? 1 : 4); \
+- builtin_define_with_int_value ( \
+- "__ARM_SIZEOF_WCHAR_T", WCHAR_TYPE_SIZE); \
++ builtin_define_type_sizeof ("__ARM_SIZEOF_WCHAR_T", \
++ wchar_type_node); \
+ if (TARGET_ARM_ARCH_PROFILE) \
+ builtin_define_with_int_value ( \
+ "__ARM_ARCH_PROFILE", TARGET_ARM_ARCH_PROFILE); \