summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2014-08-07 13:20:35 +0000
committerdoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2014-08-07 13:20:35 +0000
commit1bf573a334526491ec222f814d0972e4a2458548 (patch)
treef2bccf39436d39a6a5b1bbe063b52f58274f2970
parenta3585719bfb77e462fec86cea3374a6d939d3cf4 (diff)
downloadgcc-49-1bf573a334526491ec222f814d0972e4a2458548.tar.gz
* Update to SVN 20140807 (r213709) from the gcc-4_9-branch.
git-svn-id: svn://svn.debian.org/svn/gcccvs/branches/sid/gcc-4.9@7559 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
-rw-r--r--debian/changelog4
-rw-r--r--debian/patches/libstdc++-python3.diff196
-rw-r--r--debian/patches/svn-updates.diff2278
-rw-r--r--debian/rules.patch4
4 files changed, 2245 insertions, 237 deletions
diff --git a/debian/changelog b/debian/changelog
index c8888ef..4b087d4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,10 @@
gcc-4.9 (4.9.1-5) UNRELEASED; urgency=medium
- * Update to SVN 20140802 (r213518) from the gcc-4_9-branch.
+ * Update to SVN 20140807 (r213709) from the gcc-4_9-branch.
- Fix PR tree-optimization/61964. LP: #1347147.
* Fix libphobos cross build.
- -- Matthias Klose <doko@debian.org> Sat, 02 Aug 2014 20:34:30 +0200
+ -- Matthias Klose <doko@debian.org> Thu, 07 Aug 2014 15:19:59 +0200
gcc-4.9 (4.9.1-4) unstable; urgency=high
diff --git a/debian/patches/libstdc++-python3.diff b/debian/patches/libstdc++-python3.diff
deleted file mode 100644
index 2a9fb12..0000000
--- a/debian/patches/libstdc++-python3.diff
+++ /dev/null
@@ -1,196 +0,0 @@
-# DP: Make the libstdc++-v3 pretty printer compatible with Python3.
-
-Index: b/src/libstdc++-v3/python/libstdcxx/v6/printers.py
-===================================================================
---- a/src/libstdc++-v3/python/libstdcxx/v6/printers.py
-+++ b/src/libstdc++-v3/python/libstdcxx/v6/printers.py
-@@ -51,7 +51,7 @@ def find_type(orig, name):
- # 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:
-@@ -97,7 +97,7 @@ class StdListPrinter:
- 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()
-@@ -144,7 +144,7 @@ class StdSlistPrinter:
- def __iter__(self):
- return self
-
-- def next(self):
-+ def __next__(self):
- if self.base == 0:
- raise StopIteration
- elt = self.base.cast(self.nodetype).dereference()
-@@ -198,7 +198,7 @@ class StdVectorPrinter:
- def __iter__(self):
- return self
-
-- def next(self):
-+ def __next__(self):
- count = self.count
- self.count = self.count + 1
- if self.bitvec:
-@@ -276,20 +276,20 @@ class StdTuplePrinter:
- # 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:
- 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.
-@@ -353,7 +353,7 @@ class RbtreeIterator:
- def __len__(self):
- return int (self.size)
-
-- def next(self):
-+ def __next__(self):
- if self.count == self.size:
- raise StopIteration
- result = self.node
-@@ -389,7 +389,7 @@ def get_value_from_Rb_tree_node(node):
- return p.dereference()
- except:
- pass
-- raise ValueError, "Unsupported implementation for %s" % str(node.type)
-+ raise ValueError("Unsupported implementation for %s" % str(node.type))
-
- # This is a pretty printer for std::_Rb_tree_iterator (which is
- # std::map::iterator), and has nothing to do with the RbtreeIterator
-@@ -431,9 +431,9 @@ class StdMapPrinter:
- 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()
- n = get_value_from_Rb_tree_node(n)
- self.pair = n
-@@ -474,8 +474,8 @@ class StdSetPrinter:
- 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()
- item = get_value_from_Rb_tree_node(item)
- # FIXME: this is weird ... what to do?
-@@ -553,7 +553,7 @@ class StdDequePrinter:
- def __iter__(self):
- return self
-
-- def next(self):
-+ def __next__(self):
- if self.p == self.last:
- raise StopIteration
-
-@@ -591,7 +591,7 @@ class StdDequePrinter:
-
- size = self.buffer_size * delta_n + delta_s + delta_e
-
-- return '%s with %d elements' % (self.typename, long (size))
-+ return '%s with %d elements' % (self.typename, int (size))
-
- def children(self):
- start = self.val['_M_impl']['_M_start']
-@@ -654,7 +654,7 @@ class Tr1HashtableIterator:
- def __iter__ (self):
- return self
-
-- def next (self):
-+ def __next__ (self):
- if self.node == 0:
- raise StopIteration
- node = self.node.cast(self.node_type)
-@@ -677,7 +677,7 @@ class StdHashtableIterator:
- def __iter__(self):
- return self
-
-- def next(self):
-+ def __next__(self):
- if self.node == 0:
- raise StopIteration
- elt = self.node.cast(self.node_type).dereference()
-@@ -706,10 +706,10 @@ class Tr1UnorderedSetPrinter:
- return '[%d]' % i
-
- def children (self):
-- counter = itertools.imap (self.format_count, itertools.count())
-+ counter = list(map (self.format_count, itertools.count()))
- if self.typename.startswith('std::tr1'):
-- return itertools.izip (counter, Tr1HashtableIterator (self.hashtable()))
-- return itertools.izip (counter, StdHashtableIterator (self.hashtable()))
-+ return list(zip (counter, Tr1HashtableIterator (self.hashtable())))
-+ return list(zip (counter, StdHashtableIterator (self.hashtable())))
-
- class Tr1UnorderedMapPrinter:
- "Print a tr1::unordered_map"
-@@ -741,15 +741,15 @@ class Tr1UnorderedMapPrinter:
- return '[%d]' % i
-
- def children (self):
-- counter = itertools.imap (self.format_count, itertools.count())
-+ counter = list(map (self.format_count, itertools.count()))
- # Map over the hash table and flatten the result.
- if self.typename.startswith('std::tr1'):
-- data = self.flatten (itertools.imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
-+ data = self.flatten (list(map (self.format_one, Tr1HashtableIterator (self.hashtable()))))
- # Zip the two iterators together.
-- return itertools.izip (counter, data)
-- data = self.flatten (itertools.imap (self.format_one, StdHashtableIterator (self.hashtable())))
-+ return list(zip (counter, data))
-+ data = self.flatten (list(map (self.format_one, StdHashtableIterator (self.hashtable()))))
- # Zip the two iterators together.
-- return itertools.izip (counter, data)
-+ return list(zip (counter, data))
-
-
- def display_hint (self):
-@@ -767,7 +767,7 @@ class StdForwardListPrinter:
- def __iter__(self):
- return self
-
-- def next(self):
-+ def __next__(self):
- if self.base == 0:
- raise StopIteration
- elt = self.base.cast(self.nodetype).dereference()
-@@ -827,7 +827,7 @@ class Printer(object):
- # 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
diff --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff
index 7a41a72..67a29a1 100644
--- a/debian/patches/svn-updates.diff
+++ b/debian/patches/svn-updates.diff
@@ -1,10 +1,10 @@
-# DP: updates from the 4.9 branch upto 20140802 (r213518).
+# DP: updates from the 4.9 branch upto 20140807 (r213709).
last_update()
{
cat > ${dir}LAST_UPDATED <EOF
-Sat Aug 2 20:28:45 CEST 2014
-Sat Aug 2 18:28:45 UTC 2014 (revision 213518)
+Thu Aug 7 15:12:59 CEST 2014
+Thu Aug 7 13:12:59 UTC 2014 (revision 213709)
EOF
}
@@ -727,11 +727,87 @@ Index: libgomp/task.c
child_task->prev_child->next_child = child_task->next_child;
child_task->next_child->prev_child = child_task->prev_child;
if (task->children == child_task)
+@@ -897,18 +1115,26 @@
+ if (taskgroup->children == NULL)
+ {
+ if (taskgroup->num_children)
+- goto do_wait;
+- gomp_mutex_unlock (&team->task_lock);
+- if (to_free)
+ {
+- gomp_finish_task (to_free);
+- free (to_free);
++ if (task->children == NULL)
++ goto do_wait;
++ child_task = task->children;
++ }
++ else
++ {
++ gomp_mutex_unlock (&team->task_lock);
++ if (to_free)
++ {
++ gomp_finish_task (to_free);
++ free (to_free);
++ }
++ goto finish;
+ }
+- goto finish;
+ }
+- if (taskgroup->children->kind == GOMP_TASK_WAITING)
++ else
++ child_task = taskgroup->children;
++ if (child_task->kind == GOMP_TASK_WAITING)
+ {
+- child_task = taskgroup->children;
+ cancelled
+ = gomp_task_run_pre (child_task, child_task->parent, taskgroup,
+ team);
+@@ -925,6 +1151,7 @@
+ }
+ else
+ {
++ child_task = NULL;
+ do_wait:
+ /* All tasks we are waiting for are already running
+ in other threads. Wait for them. */
+@@ -956,20 +1183,9 @@
+ finish_cancelled:;
+ size_t new_tasks
+ = gomp_task_run_post_handle_depend (child_task, team);
+- child_task->prev_taskgroup->next_taskgroup
+- = child_task->next_taskgroup;
+- child_task->next_taskgroup->prev_taskgroup
+- = child_task->prev_taskgroup;
+- --taskgroup->num_children;
+- if (taskgroup->children == child_task)
+- {
+- if (child_task->next_taskgroup != child_task)
+- taskgroup->children = child_task->next_taskgroup;
+- else
+- taskgroup->children = NULL;
+- }
+ gomp_task_run_post_remove_parent (child_task);
+ gomp_clear_parent (child_task->children);
++ gomp_task_run_post_remove_taskgroup (child_task);
+ to_free = child_task;
+ child_task = NULL;
+ team->task_count--;
Index: libgomp/ChangeLog
===================================================================
--- a/src/libgomp/ChangeLog (.../tags/gcc_4_9_1_release)
+++ b/src/libgomp/ChangeLog (.../branches/gcc-4_9-branch)
-@@ -1,3 +1,33 @@
+@@ -1,3 +1,44 @@
++2014-08-04 Jakub Jelinek <jakub@redhat.com>
++
++ * task.c (GOMP_taskgroup_end): If taskgroup->num_children
++ is not zero, but taskgroup->children is NULL and there are
++ any task->children, schedule those instead of waiting.
++ * testsuite/libgomp.c/depend-6.c: New test.
++ * testsuite/libgomp.c/depend-7.c: New test.
++ * testsuite/libgomp.c/depend-8.c: New test.
++ * testsuite/libgomp.c/depend-9.c: New test.
++ * testsuite/libgomp.c/depend-10.c: New test.
++
+2014-08-01 Jakub Jelinek <jakub@redhat.com>
+
+ * libgomp.h (struct gomp_task_depend_entry): Add redundant_out field.
@@ -765,6 +841,22 @@ Index: libgomp/ChangeLog
2014-07-16 Release Manager
* GCC 4.9.1 released.
+Index: libgomp/testsuite/libgomp.c/depend-8.c
+===================================================================
+--- a/src/libgomp/testsuite/libgomp.c/depend-8.c (.../tags/gcc_4_9_1_release)
++++ b/src/libgomp/testsuite/libgomp.c/depend-8.c (.../branches/gcc-4_9-branch)
+@@ -0,0 +1,3 @@
++/* { dg-set-target-env-var OMP_NUM_THREADS "1" } */
++
++#include "depend-3.c"
+Index: libgomp/testsuite/libgomp.c/depend-10.c
+===================================================================
+--- a/src/libgomp/testsuite/libgomp.c/depend-10.c (.../tags/gcc_4_9_1_release)
++++ b/src/libgomp/testsuite/libgomp.c/depend-10.c (.../branches/gcc-4_9-branch)
+@@ -0,0 +1,3 @@
++/* { dg-set-target-env-var OMP_NUM_THREADS "1" } */
++
++#include "depend-5.c"
Index: libgomp/testsuite/libgomp.c/depend-5.c
===================================================================
--- a/src/libgomp/testsuite/libgomp.c/depend-5.c (.../tags/gcc_4_9_1_release)
@@ -868,6 +960,796 @@ Index: libgomp/testsuite/libgomp.c/depend-5.c
+ f1 (1);
+ return 0;
+}
+Index: libgomp/testsuite/libgomp.c/depend-9.c
+===================================================================
+--- a/src/libgomp/testsuite/libgomp.c/depend-9.c (.../tags/gcc_4_9_1_release)
++++ b/src/libgomp/testsuite/libgomp.c/depend-9.c (.../branches/gcc-4_9-branch)
+@@ -0,0 +1,3 @@
++/* { dg-set-target-env-var OMP_NUM_THREADS "1" } */
++
++#include "depend-4.c"
+Index: libgomp/testsuite/libgomp.c/depend-6.c
+===================================================================
+--- a/src/libgomp/testsuite/libgomp.c/depend-6.c (.../tags/gcc_4_9_1_release)
++++ b/src/libgomp/testsuite/libgomp.c/depend-6.c (.../branches/gcc-4_9-branch)
+@@ -0,0 +1,3 @@
++/* { dg-set-target-env-var OMP_NUM_THREADS "1" } */
++
++#include "depend-1.c"
+Index: libgomp/testsuite/libgomp.c/depend-7.c
+===================================================================
+--- a/src/libgomp/testsuite/libgomp.c/depend-7.c (.../tags/gcc_4_9_1_release)
++++ b/src/libgomp/testsuite/libgomp.c/depend-7.c (.../branches/gcc-4_9-branch)
+@@ -0,0 +1,3 @@
++/* { dg-set-target-env-var OMP_NUM_THREADS "1" } */
++
++#include "depend-2.c"
+Index: libstdc++-v3/python/libstdcxx/v6/printers.py
+===================================================================
+--- a/src/libstdc++-v3/python/libstdcxx/v6/printers.py (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/python/libstdcxx/v6/printers.py (.../branches/gcc-4_9-branch)
+@@ -1,4 +1,4 @@
+-# Pretty-printers for libstc++.
++# Pretty-printers for libstdc++.
+
+ # Copyright (C) 2008-2014 Free Software Foundation, Inc.
+
+@@ -18,7 +18,51 @@
+ import gdb
+ import itertools
+ import re
++import sys
+
++### Python 2 + Python 3 compatibility code
++
++# 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>
++
++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
++
++ 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>
++ """
++
++ def next(self):
++ return self.__next__()
++
++ # 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
+
+@@ -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
+@@ -389,7 +433,7 @@
+ return p.dereference()
+ except:
+ pass
+- raise ValueError, "Unsupported implementation for %s" % str(node.type)
++ raise ValueError("Unsupported implementation for %s" % str(node.type))
+
+ # This is a pretty printer for std::_Rb_tree_iterator (which is
+ # std::map::iterator), and has nothing to do with the RbtreeIterator
+@@ -422,7 +466,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
+@@ -431,9 +475,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()
+ n = get_value_from_Rb_tree_node(n)
+ self.pair = n
+@@ -465,7 +509,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
+@@ -474,8 +518,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()
+ item = get_value_from_Rb_tree_node(item)
+ # FIXME: this is weird ... what to do?
+@@ -541,7 +585,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
+@@ -553,7 +597,7 @@
+ def __iter__(self):
+ return self
+
+- def next(self):
++ def __next__(self):
+ if self.p == self.last:
+ raise StopIteration
+
+@@ -638,7 +682,7 @@
+ def display_hint (self):
+ return 'string'
+
+-class Tr1HashtableIterator:
++class Tr1HashtableIterator(Iterator):
+ def __init__ (self, hash):
+ self.buckets = hash['_M_buckets']
+ self.bucket = 0
+@@ -654,7 +698,7 @@
+ def __iter__ (self):
+ return self
+
+- def next (self):
++ def __next__ (self):
+ if self.node == 0:
+ raise StopIteration
+ node = self.node.cast(self.node_type)
+@@ -669,7 +713,7 @@
+ self.bucket = self.bucket + 1
+ return result
+
+-class StdHashtableIterator:
++class StdHashtableIterator(Iterator):
+ def __init__(self, hash):
+ self.node = hash['_M_before_begin']['_M_nxt']
+ self.node_type = find_type(hash.type, '__node_type').pointer()
+@@ -677,7 +721,7 @@
+ def __iter__(self):
+ return self
+
+- def next(self):
++ def __next__(self):
+ if self.node == 0:
+ raise StopIteration
+ elt = self.node.cast(self.node_type).dereference()
+@@ -706,10 +750,10 @@
+ return '[%d]' % i
+
+ def children (self):
+- counter = itertools.imap (self.format_count, itertools.count())
++ counter = imap (self.format_count, itertools.count())
+ if self.typename.startswith('std::tr1'):
+- return itertools.izip (counter, Tr1HashtableIterator (self.hashtable()))
+- return itertools.izip (counter, StdHashtableIterator (self.hashtable()))
++ return izip (counter, Tr1HashtableIterator (self.hashtable()))
++ return izip (counter, StdHashtableIterator (self.hashtable()))
+
+ class Tr1UnorderedMapPrinter:
+ "Print a tr1::unordered_map"
+@@ -741,15 +785,15 @@
+ return '[%d]' % i
+
+ 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.
+ if self.typename.startswith('std::tr1'):
+- 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)
+- data = self.flatten (itertools.imap (self.format_one, StdHashtableIterator (self.hashtable())))
++ return izip (counter, data)
++ data = self.flatten (imap (self.format_one, StdHashtableIterator (self.hashtable())))
+ # Zip the two iterators together.
+- return itertools.izip (counter, data)
++ return izip (counter, data)
+
+
+ def display_hint (self):
+@@ -758,7 +802,7 @@
+ class StdForwardListPrinter:
+ "Print a std::forward_list"
+
+- class _iterator:
++ class _iterator(Iterator):
+ def __init__(self, nodetype, head):
+ self.nodetype = nodetype
+ self.base = head['_M_next']
+@@ -767,7 +811,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()
+@@ -827,7 +871,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/include/std/future
+===================================================================
+--- a/src/libstdc++-v3/include/std/future (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/include/std/future (.../branches/gcc-4_9-branch)
+@@ -1240,6 +1240,10 @@
+ {
+ _M_result->_M_set(_M_fn());
+ }
++ __catch(const __cxxabiv1::__forced_unwind&)
++ {
++ __throw_exception_again; // will cause broken_promise
++ }
+ __catch(...)
+ {
+ _M_result->_M_error = current_exception();
+@@ -1259,6 +1263,10 @@
+ {
+ _M_fn();
+ }
++ __catch(const __cxxabiv1::__forced_unwind&)
++ {
++ __throw_exception_again; // will cause broken_promise
++ }
+ __catch(...)
+ {
+ _M_result->_M_error = current_exception();
+@@ -1519,7 +1527,17 @@
+ : _M_result(new _Result<_Res>()), _M_fn(std::move(__fn))
+ {
+ _M_thread = std::thread{ [this] {
+- _M_set_result(_S_task_setter(_M_result, _M_fn));
++ __try
++ {
++ _M_set_result(_S_task_setter(_M_result, _M_fn));
++ }
++ __catch (const __cxxabiv1::__forced_unwind&)
++ {
++ // make the shared state ready on thread cancellation
++ if (static_cast<bool>(_M_result))
++ this->_M_break_promise(std::move(_M_result));
++ __throw_exception_again;
++ }
+ } };
+ }
+
+Index: libstdc++-v3/include/std/condition_variable
+===================================================================
+--- a/src/libstdc++-v3/include/std/condition_variable (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/include/std/condition_variable (.../branches/gcc-4_9-branch)
+@@ -189,7 +189,14 @@
+ ~_Unlock() noexcept(false)
+ {
+ if (uncaught_exception())
+- __try { _M_lock.lock(); } __catch(...) { }
++ {
++ __try
++ { _M_lock.lock(); }
++ __catch(const __cxxabiv1::__forced_unwind&)
++ { __throw_exception_again; }
++ __catch(...)
++ { }
++ }
+ else
+ _M_lock.lock();
+ }
+Index: libstdc++-v3/include/std/mutex
+===================================================================
+--- a/src/libstdc++-v3/include/std/mutex (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/include/std/mutex (.../branches/gcc-4_9-branch)
+@@ -44,6 +44,7 @@
+ #include <bits/functexcept.h>
+ #include <bits/gthr.h>
+ #include <bits/move.h> // for std::swap
++#include <bits/cxxabi_forced.h>
+
+ #ifdef _GLIBCXX_USE_C99_STDINT_TR1
+
+@@ -649,6 +650,8 @@
+ auto __locks = std::tie(__l1, __l2, __l3...);
+ __try
+ { __try_lock_impl<0>::__do_try_lock(__locks, __idx); }
++ __catch(const __cxxabiv1::__forced_unwind&)
++ { __throw_exception_again; }
+ __catch(...)
+ { }
+ return __idx;
+Index: libstdc++-v3/include/experimental/string_view
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/string_view (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/include/experimental/string_view (.../branches/gcc-4_9-branch)
+@@ -39,7 +39,6 @@
+ # include <bits/c++14_warning.h>
+ #else
+
+-#include <debug/debug.h>
+ #include <string>
+ #include <limits>
+
+@@ -66,18 +65,10 @@
+ * _CharT* _M_str
+ * size_t _M_len
+ * @endcode
+- *
+- * A basic_string_view represents an empty string with a static constexpr
+- * length one string:
+- *
+- * @code
+- * static constexpr value_type _S_empty_str[1]{0};
+- * @endcode
+ */
+- template<typename _CharT, typename _Traits = char_traits<_CharT>>
++ template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
+ class basic_string_view
+ {
+-
+ public:
+
+ // types
+@@ -99,7 +90,7 @@
+
+ constexpr
+ basic_string_view() noexcept
+- : _M_len{0}, _M_str{_S_empty_str}
++ : _M_len{0}, _M_str{nullptr}
+ { }
+
+ constexpr basic_string_view(const basic_string_view&) noexcept = default;
+@@ -112,12 +103,12 @@
+
+ constexpr basic_string_view(const _CharT* __str)
+ : _M_len{__str == nullptr ? 0 : traits_type::length(__str)},
+- _M_str{__str == nullptr ? _S_empty_str : __str}
++ _M_str{__str}
+ { }
+
+ constexpr basic_string_view(const _CharT* __str, size_type __len)
+- : _M_len{__str == nullptr ? 0 :__len},
+- _M_str{__str == nullptr ? _S_empty_str : __str}
++ : _M_len{__len},
++ _M_str{__str}
+ { }
+
+ basic_string_view&
+@@ -143,19 +134,19 @@
+
+ const_reverse_iterator
+ rbegin() const noexcept
+- { return std::reverse_iterator<const_iterator>(this->end()); }
++ { return const_reverse_iterator(this->end()); }
+
+ const_reverse_iterator
+ rend() const noexcept
+- { return std::reverse_iterator<const_iterator>(this->begin()); }
++ { return const_reverse_iterator(this->begin()); }
+
+ const_reverse_iterator
+ crbegin() const noexcept
+- { return std::reverse_iterator<const_iterator>(this->end()); }
++ { return const_reverse_iterator(this->end()); }
+
+ const_reverse_iterator
+ crend() const noexcept
+- { return std::reverse_iterator<const_iterator>(this->begin()); }
++ { return const_reverse_iterator(this->begin()); }
+
+ // [string.view.capacity], capacity
+
+@@ -169,8 +160,10 @@
+
+ constexpr size_type
+ max_size() const noexcept
+- { return ((npos - sizeof(size_type) - sizeof(void*))
+- / sizeof(value_type) / 4); }
++ {
++ return (npos - sizeof(size_type) - sizeof(void*))
++ / sizeof(value_type) / 4;
++ }
+
+ constexpr bool
+ empty() const noexcept
+@@ -195,7 +188,7 @@
+ "(which is %zu) >= this->size() "
+ "(which is %zu)"),
+ __pos, this->size()),
+- _S_empty_str[0]);
++ *this->_M_str);
+ }
+
+ constexpr const _CharT&
+@@ -219,11 +212,12 @@
+ { return this->_M_str; }
+
+ // [string.view.modifiers], modifiers:
++
+ void
+ clear() noexcept
+ {
+ this->_M_len = 0;
+- this->_M_str = _S_empty_str;
++ this->_M_str = nullptr;
+ }
+
+ void
+@@ -251,10 +245,16 @@
+ template<typename _Allocator>
+ explicit operator basic_string<_CharT, _Traits, _Allocator>() const
+ {
+- return basic_string<_CharT, _Traits, _Allocator>
+- (this->_M_len, this->_M_str);
++ return { this->_M_str, this->_M_len };
+ }
+
++ template<typename _Allocator = std::allocator<_CharT>>
++ basic_string<_CharT, _Traits, _Allocator>
++ to_string(const _Allocator& __alloc = _Allocator()) const
++ {
++ return { this->_M_str, this->_M_len, __alloc };
++ }
++
+ size_type
+ copy(_CharT* __str, size_type __n, size_type __pos = 0) const
+ {
+@@ -431,8 +431,6 @@
+ : static_cast<int>(difference_type{__n1 - __n2});
+ }
+
+- static constexpr value_type _S_empty_str[1]{};
+-
+ size_t _M_len;
+ const _CharT* _M_str;
+ };
+@@ -456,131 +454,119 @@
+ }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator==(basic_string_view<_CharT, _Traits> __x,
+ basic_string_view<_CharT, _Traits> __y) noexcept
+ { return __x.compare(__y) == 0; }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator==(basic_string_view<_CharT, _Traits> __x,
+ __detail::__idt<basic_string_view<_CharT, _Traits>> __y) noexcept
+ { return __x.compare(__y) == 0; }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator==(__detail::__idt<basic_string_view<_CharT, _Traits>> __x,
+ basic_string_view<_CharT, _Traits> __y) noexcept
+ { return __x.compare(__y) == 0; }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator!=(basic_string_view<_CharT, _Traits> __x,
+ basic_string_view<_CharT, _Traits> __y) noexcept
+ { return !(__x == __y); }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator!=(basic_string_view<_CharT, _Traits> __x,
+ __detail::__idt<basic_string_view<_CharT, _Traits>> __y) noexcept
+ { return !(__x == __y); }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator!=(__detail::__idt<basic_string_view<_CharT, _Traits>> __x,
+ basic_string_view<_CharT, _Traits> __y) noexcept
+ { return !(__x == __y); }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator< (basic_string_view<_CharT, _Traits> __x,
+ basic_string_view<_CharT, _Traits> __y) noexcept
+ { return __x.compare(__y) < 0; }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator< (basic_string_view<_CharT, _Traits> __x,
+ __detail::__idt<basic_string_view<_CharT, _Traits>> __y) noexcept
+ { return __x.compare(__y) < 0; }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator< (__detail::__idt<basic_string_view<_CharT, _Traits>> __x,
+ basic_string_view<_CharT, _Traits> __y) noexcept
+ { return __x.compare(__y) < 0; }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator> (basic_string_view<_CharT, _Traits> __x,
+ basic_string_view<_CharT, _Traits> __y) noexcept
+ { return __x.compare(__y) > 0; }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator> (basic_string_view<_CharT, _Traits> __x,
+ __detail::__idt<basic_string_view<_CharT, _Traits>> __y) noexcept
+ { return __x.compare(__y) > 0; }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator> (__detail::__idt<basic_string_view<_CharT, _Traits>> __x,
+ basic_string_view<_CharT, _Traits> __y) noexcept
+ { return __x.compare(__y) > 0; }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator<=(basic_string_view<_CharT, _Traits> __x,
+ basic_string_view<_CharT, _Traits> __y) noexcept
+ { return __x.compare(__y) <= 0; }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator<=(basic_string_view<_CharT, _Traits> __x,
+ __detail::__idt<basic_string_view<_CharT, _Traits>> __y) noexcept
+ { return __x.compare(__y) <= 0; }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator<=(__detail::__idt<basic_string_view<_CharT, _Traits>> __x,
+ basic_string_view<_CharT, _Traits> __y) noexcept
+ { return __x.compare(__y) <= 0; }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator>=(basic_string_view<_CharT, _Traits> __x,
+ basic_string_view<_CharT, _Traits> __y) noexcept
+ { return __x.compare(__y) >= 0; }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator>=(basic_string_view<_CharT, _Traits> __x,
+ __detail::__idt<basic_string_view<_CharT, _Traits>> __y) noexcept
+ { return __x.compare(__y) >= 0; }
+
+ template<typename _CharT, typename _Traits>
+- bool
++ inline bool
+ operator>=(__detail::__idt<basic_string_view<_CharT, _Traits>> __x,
+ basic_string_view<_CharT, _Traits> __y) noexcept
+ { return __x.compare(__y) >= 0; }
+
+- // [string.view.comparison], sufficient additional overloads of comparison functions
+-
+- // [string.view.nonmem], other non-member basic_string_view functions
+- template<typename _CharT, typename _Traits = char_traits<_CharT>,
+- typename _Allocator = allocator<_CharT>>
+- basic_string<_CharT, _Traits, _Allocator>
+- to_string(basic_string_view<_CharT, _Traits> __str,
+- const _Allocator& __alloc = _Allocator())
+- {
+- return basic_string<_CharT, _Traits, _Allocator>
+- (__str.begin(), __str.end(), __alloc);
+- }
+-
++ // [string.view.io], Inserters and extractors
+ template<typename _CharT, typename _Traits>
+- basic_ostream<_CharT, _Traits>&
+- operator<<(basic_ostream<_CharT, _Traits>& __os,
+- basic_string_view<_CharT,_Traits> __str)
+- { return __ostream_insert(__os, __str.data(), __str.size()); }
++ inline basic_ostream<_CharT, _Traits>&
++ operator<<(basic_ostream<_CharT, _Traits>& __os,
++ basic_string_view<_CharT,_Traits> __str)
++ { return __ostream_insert(__os, __str.data(), __str.size()); }
+
+
+ // basic_string_view typedef names
+Index: libstdc++-v3/include/experimental/string_view.tcc
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/string_view.tcc (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/include/experimental/string_view.tcc (.../branches/gcc-4_9-branch)
+@@ -47,10 +47,6 @@
+ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ template<typename _CharT, typename _Traits>
+- constexpr _CharT
+- basic_string_view<_CharT, _Traits>::_S_empty_str[1];
+-
+- template<typename _CharT, typename _Traits>
+ typename basic_string_view<_CharT, _Traits>::size_type
+ basic_string_view<_CharT, _Traits>::
+ find(const _CharT* __str, size_type __pos, size_type __n) const noexcept
+Index: libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/traits.hpp
+===================================================================
+--- a/src/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/traits.hpp (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/traits.hpp (.../branches/gcc-4_9-branch)
+@@ -55,7 +55,7 @@
+ class Cmp_Fn,
+ template<typename Node_CItr,
+ class Node_Itr,
+- class Cmp_Fn,
++ class _Cmp_Fn,
+ typename _Alloc>
+ class Node_Update,
+ class Node,
+@@ -161,7 +161,7 @@
+ class Cmp_Fn,
+ template<typename Node_CItr,
+ class Node_Itr,
+- class Cmp_Fn,
++ class _Cmp_Fn,
+ typename _Alloc>
+ class Node_Update,
+ class Node,
Index: libstdc++-v3/include/ext/random.tcc
===================================================================
--- a/src/libstdc++-v3/include/ext/random.tcc (.../tags/gcc_4_9_1_release)
@@ -881,6 +1763,48 @@ Index: libstdc++-v3/include/ext/random.tcc
__aurng(__urng);
result_type __a = __param.successful_size();
+Index: libstdc++-v3/include/ext/rope
+===================================================================
+--- a/src/libstdc++-v3/include/ext/rope (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/include/ext/rope (.../branches/gcc-4_9-branch)
+@@ -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());
+ }
+
+ rope(const rope& __x, const allocator_type& __a = allocator_type())
+Index: libstdc++-v3/include/bits/atomic_base.h
+===================================================================
+--- a/src/libstdc++-v3/include/bits/atomic_base.h (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/include/bits/atomic_base.h (.../branches/gcc-4_9-branch)
+@@ -675,10 +675,10 @@
+
+ // Factored out to facilitate explicit specialization.
+ constexpr ptrdiff_t
+- _M_type_size(ptrdiff_t __d) { return __d * sizeof(_PTp); }
++ _M_type_size(ptrdiff_t __d) const { return __d * sizeof(_PTp); }
+
+ constexpr ptrdiff_t
+- _M_type_size(ptrdiff_t __d) volatile { return __d * sizeof(_PTp); }
++ _M_type_size(ptrdiff_t __d) const volatile { return __d * sizeof(_PTp); }
+
+ public:
+ __atomic_base() noexcept = default;
Index: libstdc++-v3/include/bits/random.tcc
===================================================================
--- a/src/libstdc++-v3/include/bits/random.tcc (.../tags/gcc_4_9_1_release)
@@ -912,7 +1836,93 @@ Index: libstdc++-v3/ChangeLog
===================================================================
--- a/src/libstdc++-v3/ChangeLog (.../tags/gcc_4_9_1_release)
+++ b/src/libstdc++-v3/ChangeLog (.../branches/gcc-4_9-branch)
-@@ -1,3 +1,14 @@
+@@ -1,3 +1,100 @@
++2014-08-04 Jonathan Wakely <jwakely@redhat.com>
++
++ Backported from mainline
++ 2014-07-29 Jonathan Wakely <jwakely@redhat.com>
++
++ 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.
++
++2014-08-04 Zifei Tong <zifeitong@gmail.com>
++
++ * libsupc++/atexit_thread.cc (HAVE___CXA_THREAD_ATEXIT_IMPL): Add
++ _GLIBCXX_ prefix to macro.
++
++2014-08-04 Samuel Bronson <naesten@gmail.com>
++
++ Backport r212453 from trunk
++ 2014-07-11 Samuel Bronson <naesten@gmail.com>
++ Matthias Klose <doko@ubuntu.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)
++
++ Backport r210625 from trunk
++ 2014-05-19 Jonathan Wakely <jwakely@redhat.com>
++
++ * python/libstdcxx/v6/printers.py: Use Python3 raise syntax.
++
++2014-08-04 Jonathan Wakely <jwakely@redhat.com>
++
++ Backported from mainline
++ 2014-06-10 Jonathan Wakely <jwakely@redhat.com>
++
++ PR libstdc++/61390
++ * include/ext/pb_ds/detail/bin_search_tree_/traits.hpp
++ (bin_search_tree_traits): Do not redeclare template-parameters.
++ * testsuite/util/testsuite_iterators.h (test_container): Likewise.
++
++ Backported from mainline
++ 2014-06-02 Jonathan Wakely <jwakely@redhat.com>
++
++ * include/std/condition_variable (condition_variable_any::_Unlock): Do
++ not swallow __forced_unwind.
++ * include/std/future (__future_base::_Task_setter): Likewise.
++ (__future_base::_Async_state_impl): Turn __forced_unwind into broken
++ promise and rethrow.
++ * include/std/mutex (try_lock): Likewise.
++ * testsuite/30_threads/async/forced_unwind.cc: New.
++ * testsuite/30_threads/packaged_task/forced_unwind.cc: New.
++
++ Backported from mainline
++ 2014-06-01 Jonathan Wakely <jwakely@redhat.com>
++
++ PR libstdc++/61374
++ * include/experimental/string_view (operator basic_string): Correct
++ order of arguments.
++ (to_string): Replace with member function.
++ Add inline specifiers. Remove unused header. Remove _S_empty_rep and
++ allow _M_str to be null.
++ * testsuite/experimental/string_view/cons/char/1.cc: Adjust to new
++ default constructor semantics.
++ * testsuite/experimental/string_view/cons/wchar_t/1.cc: Likewise.
++ * testsuite/experimental/string_view/operations/copy/char/1.cc: Fix
++ copyright dates. Remove unused header.
++ * testsuite/experimental/string_view/operations/copy/wchar_t/1.cc:
++ Likewise.
++ * testsuite/experimental/string_view/operations/data/char/1.cc:
++ Fix copyright dates. Adjust to new default constructor semantics.
++ * testsuite/experimental/string_view/operations/data/wchar_t/1.cc:
++ Likewise.
++ * testsuite/experimental/string_view/operations/to_string/1.cc: New.
++
++ Backported from mainline
++ 2014-04-15 Jonathan Wakely <jwakely@redhat.com>
++
++ * include/bits/atomic_base.h (__atomic_base<_PTp*>::_M_type_size): Add
++ const to constexpr member functions.
++
+2014-07-29 Ed Smith-Rowland <3dw4rd@verizon.net>
+
+ PR libstdc++/60037 - SIGFPE in std::generate_canonical<unsigned int...>
@@ -927,6 +1937,34 @@ Index: libstdc++-v3/ChangeLog
2014-07-16 Release Manager
* GCC 4.9.1 released.
+Index: libstdc++-v3/libsupc++/atexit_thread.cc
+===================================================================
+--- a/src/libstdc++-v3/libsupc++/atexit_thread.cc (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/libsupc++/atexit_thread.cc (.../branches/gcc-4_9-branch)
+@@ -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/testsuite/26_numerics/random/pr60037-neg.cc
===================================================================
--- a/src/libstdc++-v3/testsuite/26_numerics/random/pr60037-neg.cc (.../tags/gcc_4_9_1_release)
@@ -947,6 +1985,305 @@ Index: libstdc++-v3/testsuite/26_numerics/random/pr60037-neg.cc
+// { dg-error "static assertion failed: template argument not a floating point type" "" { target *-*-* } 167 }
+
+// { dg-error "static assertion failed: template argument not a floating point type" "" { target *-*-* } 3466 }
+Index: libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc (.../branches/gcc-4_9-branch)
+@@ -0,0 +1,48 @@
++// { dg-do run { target *-*-linux* *-*-gnu* } }
++// { dg-options " -std=gnu++11 -pthread" { target *-*-linux* *-*-gnu* } }
++// { dg-require-cstdint "" }
++// { dg-require-gthreads "" }
++// { dg-require-atomic-builtins "" }
++
++// 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.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++
++// Test (non-standard) handling of __forced_unwind exception.
++
++#include <future>
++#include <stdexcept>
++#include <pthread.h>
++#include <testsuite_hooks.h>
++
++void f() { pthread_exit(nullptr); }
++
++int main()
++{
++ std::packaged_task<void()> p(f);
++ auto fut = p.get_future();
++ std::thread t(std::move(p));
++ try
++ {
++ fut.get();
++ throw std::logic_error("Unreachable");
++ }
++ catch (const std::future_error& e)
++ {
++ VERIFY( e.code() == std::future_errc::broken_promise );
++ }
++ t.join();
++}
+Index: libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc (.../branches/gcc-4_9-branch)
+@@ -0,0 +1,45 @@
++// { dg-do run { target *-*-linux* *-*-gnu* } }
++// { dg-options " -std=gnu++11 -pthread" { target *-*-linux* *-*-gnu* } }
++// { dg-require-cstdint "" }
++// { dg-require-gthreads "" }
++// { dg-require-atomic-builtins "" }
++
++// 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.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++
++// Test (non-standard) handling of __forced_unwind exception.
++
++#include <future>
++#include <stdexcept>
++#include <pthread.h>
++#include <testsuite_hooks.h>
++
++void f() { pthread_exit(nullptr); }
++
++int main()
++{
++ auto fut = std::async(std::launch::async, f);
++ try
++ {
++ fut.get();
++ throw std::logic_error("Unreachable");
++ }
++ catch (const std::future_error& e)
++ {
++ VERIFY( e.code() == std::future_errc::broken_promise );
++ }
++}
+Index: libstdc++-v3/testsuite/experimental/string_view/cons/wchar_t/1.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/string_view/cons/wchar_t/1.cc (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/testsuite/experimental/string_view/cons/wchar_t/1.cc (.../branches/gcc-4_9-branch)
+@@ -33,7 +33,7 @@
+ // basic_string_view()
+ const std::experimental::wstring_view str00{};
+ VERIFY( str00.length() == 0 );
+- VERIFY( str00.data() != nullptr );
++ VERIFY( str00.data() == nullptr );
+
+ // basic_string_view(const char*)
+ const wchar_t str_lit01[] = L"rodeo beach, marin";
+@@ -54,11 +54,6 @@
+ VERIFY( str05.length() == len_lit01 );
+ VERIFY( str05.data() == str_lit01 );
+
+- // basic_string_view(const wchar_t* s, std::size_t l)
+- std::experimental::wstring_view str06{nullptr, len_lit01};
+- VERIFY( str06.length() == 0 );
+- VERIFY( str06.data() != nullptr );
+-
+ // basic_string_view(basic_string& s)
+ std::wstring istr07(10, L'z');
+ std::experimental::wstring_view str07{istr07};
+Index: libstdc++-v3/testsuite/experimental/string_view/cons/char/1.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/string_view/cons/char/1.cc (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/testsuite/experimental/string_view/cons/char/1.cc (.../branches/gcc-4_9-branch)
+@@ -33,7 +33,7 @@
+ // basic_string_view()
+ const std::experimental::string_view str00{};
+ VERIFY( str00.length() == 0 );
+- VERIFY( str00.data() != nullptr );
++ VERIFY( str00.data() == nullptr );
+
+ // basic_string_view(const char*)
+ const char str_lit01[] = "rodeo beach, marin";
+@@ -54,11 +54,6 @@
+ VERIFY( str05.length() == len_lit01 );
+ VERIFY( str05.data() == str_lit01 );
+
+- // basic_string_view(const char* s, std::size_t l)
+- std::experimental::string_view str06{nullptr, len_lit01};
+- VERIFY( str06.length() == 0 );
+- VERIFY( str06.data() != nullptr );
+-
+ // basic_string_view(basic_string& s)
+ std::string istr07(10, 'z');
+ std::experimental::string_view str07{istr07};
+Index: libstdc++-v3/testsuite/experimental/string_view/operations/to_string/1.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/string_view/operations/to_string/1.cc (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/testsuite/experimental/string_view/operations/to_string/1.cc (.../branches/gcc-4_9-branch)
+@@ -0,0 +1,53 @@
++// { dg-options "-std=gnu++1y" }
++
++// 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.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++
++// basic_string_view::to_string
++
++#include <experimental/string_view>
++#include <algorithm>
++#include <testsuite_hooks.h>
++#include <testsuite_allocator.h>
++
++bool
++test01()
++{
++ bool test [[gnu::unused]] = true;
++
++ const char str_lit[] = "123456789A";
++ const std::experimental::string_view sv(str_lit);
++ char buffer[4] = { 0 };
++
++ auto s1 = sv.to_string();
++ VERIFY( s1 == str_lit );
++ using test_alloc = __gnu_test::tracker_allocator<char>;
++ auto s2 = sv.to_string( test_alloc{} );
++ static_assert( std::is_same<decltype(s2)::allocator_type, test_alloc>::value,
++ "to_string() uses custom allocator" );
++ VERIFY( std::equal(s1.begin(), s1.end(), s2.begin(), s2.end()) );
++ auto s3 = static_cast<std::string>(sv);
++ VERIFY( s3 == s1 );
++
++ return test;
++}
++
++int
++main()
++{
++ test01();
++}
+Index: libstdc++-v3/testsuite/experimental/string_view/operations/data/wchar_t/1.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/string_view/operations/data/wchar_t/1.cc (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/testsuite/experimental/string_view/operations/data/wchar_t/1.cc (.../branches/gcc-4_9-branch)
+@@ -1,6 +1,6 @@
+ // { dg-options "-std=gnu++1y" }
+
+-// Copyright (C) 2013 Free Software Foundation, Inc.
++// Copyright (C) 2013-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
+@@ -29,10 +29,9 @@
+
+ std::experimental::wstring_view empty;
+
+- // data() for size == 0 is non-NULL.
+ VERIFY( empty.size() == 0 );
+ const std::experimental::wstring_view::value_type* p = empty.data();
+- VERIFY( p );
++ VERIFY( p == nullptr );
+
+ return 0;
+ }
+Index: libstdc++-v3/testsuite/experimental/string_view/operations/data/char/1.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/string_view/operations/data/char/1.cc (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/testsuite/experimental/string_view/operations/data/char/1.cc (.../branches/gcc-4_9-branch)
+@@ -1,6 +1,6 @@
+ // { dg-options "-std=gnu++1y" }
+
+-// Copyright (C) 2013 Free Software Foundation, Inc.
++// Copyright (C) 2013-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
+@@ -29,10 +29,9 @@
+
+ std::experimental::string_view empty;
+
+- // data() for size == 0 is non-NULL.
+ VERIFY( empty.size() == 0 );
+ const std::experimental::string_view::value_type* p = empty.data();
+- VERIFY( p );
++ VERIFY( p == nullptr );
+
+ return 0;
+ }
+Index: libstdc++-v3/testsuite/experimental/string_view/operations/copy/wchar_t/1.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/string_view/operations/copy/wchar_t/1.cc (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/testsuite/experimental/string_view/operations/copy/wchar_t/1.cc (.../branches/gcc-4_9-branch)
+@@ -1,6 +1,6 @@
+ // { dg-options "-std=gnu++1y" }
+
+-// Copyright (C) 2013 Free Software Foundation, Inc.
++// Copyright (C) 2013-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
+@@ -20,7 +20,6 @@
+ // basic_string_view::copy
+
+ #include <experimental/string_view>
+-#include <stdexcept>
+ #include <testsuite_hooks.h>
+
+ bool
+Index: libstdc++-v3/testsuite/experimental/string_view/operations/copy/char/1.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/string_view/operations/copy/char/1.cc (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/testsuite/experimental/string_view/operations/copy/char/1.cc (.../branches/gcc-4_9-branch)
+@@ -1,6 +1,6 @@
+ // { dg-options "-std=gnu++1y" }
+
+-// Copyright (C) 2013 Free Software Foundation, Inc.
++// Copyright (C) 2013-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
+@@ -20,7 +20,6 @@
+ // basic_string_view::copy
+
+ #include <experimental/string_view>
+-#include <stdexcept>
+ #include <testsuite_hooks.h>
+
+ bool
Index: libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/pr60037.cc
===================================================================
--- a/src/libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/pr60037.cc (.../tags/gcc_4_9_1_release)
@@ -975,6 +2312,76 @@ Index: libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/pr60037.cc
+ hyperplot(500, 50, 30);
+ hyperplot(100, 20, 5);
+}
+Index: libstdc++-v3/testsuite/ext/rope/61946.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/ext/rope/61946.cc (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/testsuite/ext/rope/61946.cc (.../branches/gcc-4_9-branch)
+@@ -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.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++
++// { dg-do compile }
++
++#include <ext/rope>
++
++struct empty_char_prod : __gnu_cxx::char_producer<char>
++{
++ virtual void operator()(size_t, size_t, char*) {}
++};
++
++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
+===================================================================
+--- a/src/libstdc++-v3/testsuite/lib/gdb-test.exp (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/testsuite/lib/gdb-test.exp (.../branches/gcc-4_9-branch)
+@@ -91,7 +91,7 @@
+ }
+ }
+
+- 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/testsuite/util/testsuite_iterators.h
+===================================================================
+--- a/src/libstdc++-v3/testsuite/util/testsuite_iterators.h (.../tags/gcc_4_9_1_release)
++++ b/src/libstdc++-v3/testsuite/util/testsuite_iterators.h (.../branches/gcc-4_9-branch)
+@@ -518,7 +518,7 @@
+ * It takes two pointers representing a range and presents them as
+ * a container of iterators.
+ */
+- template <class T, template<class T> class ItType>
++ template <class T, template<class TT> class ItType>
+ struct test_container
+ {
+ typename ItType<T>::ContainerType bounds;
Index: configure.ac
===================================================================
--- a/src/configure.ac (.../tags/gcc_4_9_1_release)
@@ -1057,6 +2464,35 @@ Index: configure
hppa*-hp-hpux10*)
host_makefile_frag="config/mh-pa-hpux10"
;;
+Index: libgcc/ChangeLog
+===================================================================
+--- a/src/libgcc/ChangeLog (.../tags/gcc_4_9_1_release)
++++ b/src/libgcc/ChangeLog (.../branches/gcc-4_9-branch)
+@@ -1,3 +1,9 @@
++2014-08-04 Rohit <rohitarulraj@freescale.com>
++
++ PR target/60102
++ * config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Update
++ based on change in SPE high register numbers and 3 HTM registers.
++
+ 2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+Index: libgcc/config/rs6000/linux-unwind.h
+===================================================================
+--- a/src/libgcc/config/rs6000/linux-unwind.h (.../tags/gcc_4_9_1_release)
++++ b/src/libgcc/config/rs6000/linux-unwind.h (.../branches/gcc-4_9-branch)
+@@ -274,8 +274,8 @@
+ #ifdef __SPE__
+ for (i = 14; i < 32; i++)
+ {
+- fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].how = REG_SAVED_OFFSET;
+- fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].loc.offset
++ fs->regs.reg[i + FIRST_SPE_HIGH_REGNO - 4].how = REG_SAVED_OFFSET;
++ fs->regs.reg[i + FIRST_SPE_HIGH_REGNO - 4].loc.offset
+ = (long) &regs->vregs - new_cfa + 4 * i;
+ }
+ #endif
Index: gcc/tree-ssa-tail-merge.c
===================================================================
--- a/src/gcc/tree-ssa-tail-merge.c (.../tags/gcc_4_9_1_release)
@@ -1190,7 +2626,7 @@ Index: gcc/DATESTAMP
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_9-branch)
@@ -1 +1 @@
-20140716
-+20140802
++20140807
Index: gcc/omp-low.c
===================================================================
--- a/src/gcc/omp-low.c (.../tags/gcc_4_9_1_release)
@@ -1236,7 +2672,51 @@ Index: gcc/ChangeLog
===================================================================
--- a/src/gcc/ChangeLog (.../tags/gcc_4_9_1_release)
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_9-branch)
-@@ -1,3 +1,212 @@
+@@ -1,3 +1,256 @@
++2014-08-07 Ilya Tocar <ilya.tocar@intel.com>
++
++ * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Fix
++ constraint.
++
++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-08-06 Richard Biener <rguenther@suse.de>
++
++ PR tree-optimization/61320
++ * tree-ssa-loop-ivopts.c (may_be_unaligned_p): Properly
++ handle misaligned loads.
++
++2014-08-04 Rohit <rohitarulraj@freescale.com>
++
++ PR target/60102
++ * config/rs6000/rs6000.c
++ (rs6000_reg_names): Add SPE high register names.
++ (alt_reg_names): Likewise.
++ (rs6000_dwarf_register_span): For SPE high registers, replace
++ dwarf register numbers with GCC hard register numbers.
++ (rs6000_init_dwarf_reg_sizes_extra): Likewise.
++ (rs6000_dbx_register_number): For SPE high registers, return dwarf
++ register number for the corresponding GCC hard register number.
++ * config/rs6000/rs6000.h
++ (FIRST_PSEUDO_REGISTER): Update based on 32 newly added GCC hard
++ register numbers for SPE high registers.
++ (DWARF_FRAME_REGISTERS): Likewise.
++ (DWARF_REG_TO_UNWIND_COLUMN): Likewise.
++ (DWARF_FRAME_REGNUM): Likewise.
++ (FIXED_REGISTERS): Likewise.
++ (CALL_USED_REGISTERS): Likewise.
++ (CALL_REALLY_USED_REGISTERS): Likewise.
++ (REG_ALLOC_ORDER): Likewise.
++ (enum reg_class): Likewise.
++ (REG_CLASS_NAMES): Likewise.
++ (REG_CLASS_CONTENTS): Likewise.
++ (SPE_HIGH_REGNO_P): New macro to identify SPE high registers.
++
+2014-08-01 Vladimir Makarov <vmakarov@redhat.com>
+
+ * lra-constraints.c (remove_inheritance_pseudos): Process
@@ -1449,7 +2929,7 @@ Index: gcc/ChangeLog
2014-07-16 Release Manager
* GCC 4.9.1 released.
-@@ -4,14 +216,14 @@
+@@ -4,14 +260,14 @@
2014-07-10 Cary Coutant <ccoutant@google.com>
@@ -1468,7 +2948,7 @@ Index: gcc/ChangeLog
2014-07-10 Tom G. Christensen <tgc@jupiterrise.com>
-@@ -33,13 +245,13 @@
+@@ -33,13 +289,13 @@
PR target/61062
* config/arm/arm_neon.h (vtrn_s8, vtrn_s16, vtrn_u8, vtrn_u16, vtrn_p8,
vtrn_p16, vtrn_s32, vtrn_f32, vtrn_u32, vtrnq_s8, vtrnq_s16, vtrnq_s32,
@@ -1489,7 +2969,7 @@ Index: gcc/ChangeLog
2014-07-09 Alan Lawrence <alan.lawrence@arm.com>
-@@ -157,11 +369,9 @@
+@@ -157,11 +413,9 @@
2014-06-24 Jakub Jelinek <jakub@redhat.com>
* gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP,
@@ -1503,7 +2983,7 @@ Index: gcc/ChangeLog
(gimplify_adjust_omp_clauses): Likewise.
* omp-low.c (lower_rec_simd_input_clauses,
lower_rec_input_clauses, expand_omp_simd): Handle non-constant
-@@ -176,9 +386,8 @@
+@@ -176,9 +430,8 @@
2014-06-18 Jakub Jelinek <jakub@redhat.com>
@@ -1515,7 +2995,7 @@ Index: gcc/ChangeLog
(struct gimplify_adjust_omp_clauses_data): New type.
(gimplify_adjust_omp_clauses_1): Adjust for data being
a struct gimplify_adjust_omp_clauses_data pointer instead
-@@ -196,14 +405,12 @@
+@@ -196,14 +449,12 @@
gimple_seq * argument to omp_finish_clause hook.
* omp-low.c (scan_sharing_clauses): Call scan_omp_op on
non-DECL_P OMP_CLAUSE_DECL if ctx->outer.
@@ -1533,7 +3013,7 @@ Index: gcc/ChangeLog
2014-06-10 Jakub Jelinek <jakub@redhat.com>
-@@ -227,8 +434,7 @@
+@@ -227,8 +478,7 @@
OMP_CLAUSE_LINEAR_STMT.
* omp-low.c (lower_rec_input_clauses): Fix typo.
(maybe_add_implicit_barrier_cancel, lower_omp_1): Add
@@ -1543,7 +3023,7 @@ Index: gcc/ChangeLog
2014-06-30 Jason Merrill <jason@redhat.com>
-@@ -279,8 +485,7 @@
+@@ -279,8 +529,7 @@
(aarch64_sqdmlsl_lane<mode>): Likewise.
(aarch64_sqdmull_lane<mode>): Likewise.
(aarch64_sqdmull2_lane<mode>): Likewise.
@@ -1586,6 +3066,22 @@ Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c
+{
+}
+
+Index: gcc/testsuite/gcc.target/powerpc/pr60102.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/powerpc/pr60102.c (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/testsuite/gcc.target/powerpc/pr60102.c (.../branches/gcc-4_9-branch)
+@@ -0,0 +1,11 @@
++/* { dg-do compile } */
++/* { dg-skip-if "not an SPE target" { ! powerpc_spe_nocache } { "*" } { "" } } */
++/* { dg-options "-mcpu=8548 -mspe -mabi=spe -g -mfloat-gprs=double" } */
++
++double
++pr60102 (double x, int m)
++{
++ double y;
++ y = m % 2 ? x : 1;
++ return y;
++}
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c (.../tags/gcc_4_9_1_release)
@@ -1600,6 +3096,95 @@ Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c
+ 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/i386/avx512f-vpermt2pd-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/avx512f-vpermt2pd-2.c (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/testsuite/gcc.target/i386/avx512f-vpermt2pd-2.c (.../branches/gcc-4_9-branch)
+@@ -9,7 +9,6 @@
+ #define SIZE (AVX512F_LEN / 64)
+ #include "avx512f-mask-type.h"
+ #include "math.h"
+-#include "values.h"
+
+ static void
+ CALC (double *dst, double *src1, long long *ind, double *src2)
+Index: gcc/testsuite/gcc.target/i386/avx512f-vpermt2d-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/avx512f-vpermt2d-2.c (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/testsuite/gcc.target/i386/avx512f-vpermt2d-2.c (.../branches/gcc-4_9-branch)
+@@ -9,7 +9,6 @@
+ #define SIZE (AVX512F_LEN / 32)
+ #include "avx512f-mask-type.h"
+ #include "math.h"
+-#include "values.h"
+
+ static void
+ CALC (int *dst, int *src1, int *ind, int *src2)
+Index: gcc/testsuite/gcc.target/i386/avx512f-vpermi2q-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/avx512f-vpermi2q-2.c (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/testsuite/gcc.target/i386/avx512f-vpermi2q-2.c (.../branches/gcc-4_9-branch)
+@@ -9,7 +9,6 @@
+ #define SIZE (AVX512F_LEN / 64)
+ #include "avx512f-mask-type.h"
+ #include "math.h"
+-#include "values.h"
+
+ static void
+ CALC (long long *dst, long long *src1, long long *ind, long long *src2)
+Index: gcc/testsuite/gcc.target/i386/pr61923.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/pr61923.c (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/testsuite/gcc.target/i386/pr61923.c (.../branches/gcc-4_9-branch)
+@@ -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/avx512f-vpermi2d-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/avx512f-vpermi2d-2.c (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/testsuite/gcc.target/i386/avx512f-vpermi2d-2.c (.../branches/gcc-4_9-branch)
+@@ -9,7 +9,6 @@
+ #define SIZE (AVX512F_LEN / 32)
+ #include "avx512f-mask-type.h"
+ #include "math.h"
+-#include "values.h"
+
+ static void
+ CALC (int *dst, int *src1, int *ind, int *src2)
Index: gcc/testsuite/gcc.target/i386/pr61855.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/i386/pr61855.c (.../tags/gcc_4_9_1_release)
@@ -1615,33 +3200,108 @@ Index: gcc/testsuite/gcc.target/i386/pr61855.c
+ return _mm512_getmant_ps(x, _MM_MANT_NORM_1_2, _MM_MANT_SIGN_zero);
+}
+
+Index: gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c (.../branches/gcc-4_9-branch)
+@@ -6,7 +6,7 @@
+ #include "avx512f-check.h"
+ #include "avx512f-helper.h"
+ #include <math.h>
+-#include <values.h>
++#include <float.h>
+ #include "avx512f-mask-type.h"
+
+ void
+@@ -57,10 +57,10 @@
+ *r = M_PI_2;
+ break;
+ case 14:
+- *r = MAXFLOAT;
++ *r = FLT_MAX;
+ break;
+ case 15:
+- *r = -MAXFLOAT;
++ *r = -FLT_MAX;
+ break;
+ default:
+ abort ();
Index: gcc/testsuite/gcc.target/i386/pr61801.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/i386/pr61801.c (.../tags/gcc_4_9_1_release)
+++ b/src/gcc/testsuite/gcc.target/i386/pr61801.c (.../branches/gcc-4_9-branch)
-@@ -0,0 +1,22 @@
+@@ -0,0 +1,21 @@
++/* PR rtl-optimization/61801 */
+/* { dg-do compile } */
+/* { dg-options "-Os -fcompare-debug" } */
+
-+int a, b, c;
-+void fn1 ()
++int a, c;
++int bar (void);
++void baz (void);
++
++void
++foo (void)
+{
+ int d;
-+ if (fn2 () && !0)
++ if (bar ())
+ {
-+ b = (
-+ {
-+ int e;
-+ fn3 ();
-+ switch (0)
-+ default:
-+ asm volatile("" : "=a"(e) : "0"(a), "i"(0));
-+ e;
-+ });
-+ d = b;
++ int e;
++ baz ();
++ asm volatile ("" : "=a" (e) : "0" (a), "i" (0));
++ d = e;
+ }
+ c = d;
+}
+Index: gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c (.../branches/gcc-4_9-branch)
+@@ -6,7 +6,7 @@
+ #include "avx512f-check.h"
+ #include "avx512f-helper.h"
+ #include <math.h>
+-#include <values.h>
++#include <float.h>
+ #include "avx512f-mask-type.h"
+
+ void
+@@ -57,10 +57,10 @@
+ *r = M_PI_2;
+ break;
+ case 14:
+- *r = MAXDOUBLE;
++ *r = DBL_MAX;
+ break;
+ case 15:
+- *r = -MAXDOUBLE;
++ *r = -DBL_MAX;
+ break;
+ default:
+ abort ();
+Index: gcc/testsuite/gcc.target/i386/avx512f-vpermi2ps-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/avx512f-vpermi2ps-2.c (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/testsuite/gcc.target/i386/avx512f-vpermi2ps-2.c (.../branches/gcc-4_9-branch)
+@@ -9,7 +9,6 @@
+ #define SIZE (AVX512F_LEN / 32)
+ #include "avx512f-mask-type.h"
+ #include "math.h"
+-#include "values.h"
+
+ static void
+ CALC (float *dst, float *src1, int *ind, float *src2)
+Index: gcc/testsuite/gcc.target/i386/avx512f-vpermi2pd-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/avx512f-vpermi2pd-2.c (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/testsuite/gcc.target/i386/avx512f-vpermi2pd-2.c (.../branches/gcc-4_9-branch)
+@@ -9,7 +9,6 @@
+ #define SIZE (AVX512F_LEN / 64)
+ #include "avx512f-mask-type.h"
+ #include "math.h"
+-#include "values.h"
+
+ static void
+ CALC (double *dst, double *src1, long long *ind, double *src2)
Index: gcc/testsuite/gcc.target/i386/pr61794.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/i386/pr61794.c (.../tags/gcc_4_9_1_release)
@@ -1659,6 +3319,84 @@ Index: gcc/testsuite/gcc.target/i386/pr61794.c
+{
+ xmm = _mm512_extracti32x4_epi32 (zmm, 0);
+}
+Index: gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c (.../branches/gcc-4_9-branch)
+@@ -10,7 +10,7 @@
+ #define SIZE (AVX512F_LEN / 32)
+ #include "avx512f-mask-type.h"
+ #include "math.h"
+-#include "values.h"
++#include "float.h"
+
+ static void
+ CALC (float *r, float src, int tbl)
+@@ -60,10 +60,10 @@
+ *r = M_PI_2;
+ break;
+ case 14:
+- *r = MAXFLOAT;
++ *r = FLT_MAX;
+ break;
+ case 15:
+- *r = -MAXFLOAT;
++ *r = -FLT_MAX;
+ break;
+ default:
+ abort ();
+Index: gcc/testsuite/gcc.target/i386/avx512f-vpermt2q-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/avx512f-vpermt2q-2.c (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/testsuite/gcc.target/i386/avx512f-vpermt2q-2.c (.../branches/gcc-4_9-branch)
+@@ -9,7 +9,6 @@
+ #define SIZE (AVX512F_LEN / 64)
+ #include "avx512f-mask-type.h"
+ #include "math.h"
+-#include "values.h"
+
+ static void
+ CALC (long long *dst, long long *src1, long long *ind, long long *src2)
+Index: gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c (.../branches/gcc-4_9-branch)
+@@ -10,8 +10,9 @@
+ #define SIZE (AVX512F_LEN / 64)
+ #include "avx512f-mask-type.h"
+ #include "math.h"
+-#include "values.h"
++#include "float.h"
+
++
+ static void
+ CALC (double *r, double src, long long tbl)
+ {
+@@ -60,10 +61,10 @@
+ *r = M_PI_2;
+ break;
+ case 14:
+- *r = MAXDOUBLE;
++ *r = DBL_MAX;
+ break;
+ case 15:
+- *r = -MAXDOUBLE;
++ *r = -DBL_MAX;
+ break;
+ default:
+ abort ();
+Index: gcc/testsuite/gcc.target/i386/avx512f-vpermt2ps-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/avx512f-vpermt2ps-2.c (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/testsuite/gcc.target/i386/avx512f-vpermt2ps-2.c (.../branches/gcc-4_9-branch)
+@@ -9,7 +9,6 @@
+ #define SIZE (AVX512F_LEN / 32)
+ #include "avx512f-mask-type.h"
+ #include "math.h"
+-#include "values.h"
+
+ static void
+ CALC (float *dst, float *src1, int *ind, float *src2)
Index: gcc/testsuite/gfortran.dg/dependency_44.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/dependency_44.f90 (.../tags/gcc_4_9_1_release)
@@ -1938,7 +3676,39 @@ Index: gcc/testsuite/ChangeLog
===================================================================
--- a/src/gcc/testsuite/ChangeLog (.../tags/gcc_4_9_1_release)
+++ b/src/gcc/testsuite/ChangeLog (.../branches/gcc-4_9-branch)
-@@ -1,3 +1,129 @@
+@@ -1,3 +1,161 @@
++2014-08-07 Petr Murzin <petr.murzin@intel.com>
++
++ * gcc.target/i386/avx512f-vfixupimmpd-2.c: Include float.h instead of
++ values.h, change MAXDOUBLE for DBL_MAX.
++ * gcc.target/i386/avx512f-vfixupimmsd-2.c: Ditto.
++ * gcc.target/i386/avx512f-vfixupimmps-2.c: Include float.h instead of
++ values.h, change MAXFLOAT for FLT_MAX.
++ * gcc.target/i386/avx512f-vfixupimmss-2.c: Ditto.
++ * gcc.target/i386/avx512f-vpermi2d-2.c: Do not include values.h.
++ * gcc.target/i386/avx512f-vpermi2pd-2.c: Ditto.
++ * gcc.target/i386/avx512f-vpermi2ps-2.c: Ditto.
++ * gcc.target/i386/avx512f-vpermi2q-2.c: Ditto.
++ * gcc.target/i386/avx512f-vpermt2d-2.c: Ditto.
++ * gcc.target/i386/avx512f-vpermt2pd-2.c: Ditto.
++ * gcc.target/i386/avx512f-vpermt2ps-2.c: Ditto.
++ * gcc.target/i386/avx512f-vpermt2q-2.c: Ditto.
++
++2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
++
++ PR debug/61923
++ * gcc.target/i386/pr61923.c: New test.
++
++2014-08-06 Jakub Jelinek <jakub@redhat.com>
++
++ PR rtl-optimization/61801
++ * gcc.target/i386/pr61801.c: Rewritten.
++
++2014-08-04 Rohit <rohitarulraj@freescale.com>
++
++ PR target/60102
++ * gcc.target/powerpc/pr60102.c: New testcase.
++
+2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ PR other/61963
@@ -2068,7 +3838,7 @@ Index: gcc/testsuite/ChangeLog
2014-07-16 Release Manager
* GCC 4.9.1 released.
-@@ -17,7 +143,8 @@
+@@ -17,7 +175,8 @@
2014-06-09 Alan Lawrence <alan.lawrence@arm.com>
PR target/61062
@@ -2078,7 +3848,7 @@ Index: gcc/testsuite/ChangeLog
2014-07-08 Jakub Jelinek <jakub@redhat.com>
-@@ -34,8 +161,8 @@
+@@ -34,8 +193,8 @@
2014-07-08 Alan Lawrence <alan.lawrence@arm.com>
@@ -2296,6 +4066,63 @@ Index: gcc/cp/parser.c
{
if (cp_lexer_peek_token (parser->lexer)->type == CPP_CLOSE_SQUARE)
cp_lexer_consume_token (parser->lexer);
+Index: gcc/haifa-sched.c
+===================================================================
+--- a/src/gcc/haifa-sched.c (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/haifa-sched.c (.../branches/gcc-4_9-branch)
+@@ -2972,7 +2972,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. */
+@@ -6007,6 +6007,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) ())
+@@ -6077,7 +6078,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;
+@@ -6363,11 +6363,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/tree-ssa-loop-ivopts.c
+===================================================================
+--- a/src/gcc/tree-ssa-loop-ivopts.c (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/tree-ssa-loop-ivopts.c (.../branches/gcc-4_9-branch)
+@@ -1679,6 +1679,8 @@
+ return false;
+
+ unsigned int align = TYPE_ALIGN (TREE_TYPE (ref));
++ if (GET_MODE_ALIGNMENT (TYPE_MODE (TREE_TYPE (ref))) > align)
++ align = GET_MODE_ALIGNMENT (TYPE_MODE (TREE_TYPE (ref)));
+
+ unsigned HOST_WIDE_INT bitpos;
+ unsigned int ref_align;
Index: gcc/tree-ssa-math-opts.c
===================================================================
--- a/src/gcc/tree-ssa-math-opts.c (.../tags/gcc_4_9_1_release)
@@ -2340,6 +4167,22 @@ Index: gcc/expr.c
mode = smallest_mode_for_size (size * BITS_PER_UNIT, MODE_INT);
temp_target = gen_reg_rtx (mode);
emit_group_store (temp_target, temp, TREE_TYPE (exp), size);
+Index: gcc/go/gofrontend/parse.cc
+===================================================================
+--- a/src/gcc/go/gofrontend/parse.cc (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/go/gofrontend/parse.cc (.../branches/gcc-4_9-branch)
+@@ -2865,7 +2865,10 @@
+ // For a function literal, the next token must be a '{'. If we
+ // don't see that, then we may have a type expression.
+ if (!this->peek_token()->is_op(OPERATOR_LCURLY))
+- return Expression::make_type(type, location);
++ {
++ hold_enclosing_vars.swap(this->enclosing_vars_);
++ return Expression::make_type(type, location);
++ }
+
+ bool hold_is_erroneous_function = this->is_erroneous_function_;
+ if (fntype_is_error)
Index: gcc/fortran/ChangeLog
===================================================================
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_9_1_release)
@@ -2639,6 +4482,18 @@ Index: gcc/config/i386/sse.md
{
operands[2] = GEN_INT ((INTVAL (operands[2])) >> 2);
return "vextract<shuffletype>32x4\t{%2, %1, %0<mask_operand6>|%0<mask_operand6>, %1, %2}";
+@@ -5992,9 +5994,9 @@
+ (set_attr "mode" "<sseinsnmode>")])
+
+ (define_insn "vec_extract_lo_<mode><mask_name>"
+- [(set (match_operand:<ssehalfvecmode> 0 "<store_mask_predicate>" "=<store_mask_constraint>")
++ [(set (match_operand:<ssehalfvecmode> 0 "<store_mask_predicate>" "=<store_mask_constraint>,v")
+ (vec_select:<ssehalfvecmode>
+- (match_operand:V8FI 1 "nonimmediate_operand" "vm")
++ (match_operand:V8FI 1 "nonimmediate_operand" "v,m")
+ (parallel [(const_int 0) (const_int 1)
+ (const_int 2) (const_int 3)])))]
+ "TARGET_AVX512F && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
Index: gcc/config/i386/avx512fintrin.h
===================================================================
--- a/src/gcc/config/i386/avx512fintrin.h (.../tags/gcc_4_9_1_release)
@@ -3600,7 +5455,35 @@ Index: gcc/config/rs6000/rs6000.c
===================================================================
--- a/src/gcc/config/rs6000/rs6000.c (.../tags/gcc_4_9_1_release)
+++ b/src/gcc/config/rs6000/rs6000.c (.../branches/gcc-4_9-branch)
-@@ -5871,6 +5871,34 @@
+@@ -1221,7 +1221,12 @@
+ /* Soft frame pointer. */
+ "sfp",
+ /* HTM SPR registers. */
+- "tfhar", "tfiar", "texasr"
++ "tfhar", "tfiar", "texasr",
++ /* SPE High registers. */
++ "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"
+ };
+
+ #ifdef TARGET_REGNAMES
+@@ -1249,7 +1254,12 @@
+ /* Soft frame pointer. */
+ "sfp",
+ /* HTM SPR registers. */
+- "tfhar", "tfiar", "texasr"
++ "tfhar", "tfiar", "texasr",
++ /* SPE High registers. */
++ "%rh0", "%rh1", "%rh2", "%rh3", "%rh4", "%rh5", "%rh6", "%rh7",
++ "%rh8", "%rh9", "%rh10", "%r11", "%rh12", "%rh13", "%rh14", "%rh15",
++ "%rh16", "%rh17", "%rh18", "%rh19", "%rh20", "%rh21", "%rh22", "%rh23",
++ "%rh24", "%rh25", "%rh26", "%rh27", "%rh28", "%rh29", "%rh30", "%rh31"
+ };
+ #endif
+
+@@ -5871,6 +5881,34 @@
return align;
}
@@ -3635,7 +5518,7 @@ Index: gcc/config/rs6000/rs6000.c
/* AIX increases natural record alignment to doubleword if the first
field is an FP double while the FP fields remain word aligned. */
-@@ -9180,14 +9208,51 @@
+@@ -9180,14 +9218,51 @@
|| (type && TREE_CODE (type) == VECTOR_TYPE
&& int_size_in_bytes (type) >= 16))
return 128;
@@ -3694,7 +5577,7 @@ Index: gcc/config/rs6000/rs6000.c
}
/* The offset in words to the start of the parameter save area. */
-@@ -10225,6 +10290,7 @@
+@@ -10225,6 +10300,7 @@
rtx r, off;
int i, k = 0;
unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;
@@ -3702,7 +5585,7 @@ Index: gcc/config/rs6000/rs6000.c
/* Do we also need to pass this argument in the parameter
save area? */
-@@ -10253,6 +10319,37 @@
+@@ -10253,6 +10329,37 @@
rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
}
@@ -3740,6 +5623,331 @@ Index: gcc/config/rs6000/rs6000.c
return rs6000_finish_function_arg (mode, rvec, k);
}
else if (align_words < GP_ARG_NUM_REG)
+@@ -31074,13 +31181,13 @@
+ {
+ if (BYTES_BIG_ENDIAN)
+ {
+- parts[2 * i] = gen_rtx_REG (SImode, regno + 1200);
++ parts[2 * i] = gen_rtx_REG (SImode, regno + FIRST_SPE_HIGH_REGNO);
+ parts[2 * i + 1] = gen_rtx_REG (SImode, regno);
+ }
+ else
+ {
+ parts[2 * i] = gen_rtx_REG (SImode, regno);
+- parts[2 * i + 1] = gen_rtx_REG (SImode, regno + 1200);
++ parts[2 * i + 1] = gen_rtx_REG (SImode, regno + FIRST_SPE_HIGH_REGNO);
+ }
+ }
+
+@@ -31100,11 +31207,11 @@
+ rtx mem = gen_rtx_MEM (BLKmode, addr);
+ rtx value = gen_int_mode (4, mode);
+
+- for (i = 1201; i < 1232; i++)
++ for (i = FIRST_SPE_HIGH_REGNO; i < LAST_SPE_HIGH_REGNO+1; i++)
+ {
+- int column = DWARF_REG_TO_UNWIND_COLUMN (i);
+- HOST_WIDE_INT offset
+- = DWARF_FRAME_REGNUM (column) * GET_MODE_SIZE (mode);
++ int column = DWARF_REG_TO_UNWIND_COLUMN
++ (DWARF2_FRAME_REG_OUT (DWARF_FRAME_REGNUM (i), true));
++ HOST_WIDE_INT offset = column * GET_MODE_SIZE (mode);
+
+ emit_move_insn (adjust_address (mem, mode, offset), value);
+ }
+@@ -31123,9 +31230,9 @@
+
+ for (i = FIRST_ALTIVEC_REGNO; i < LAST_ALTIVEC_REGNO+1; i++)
+ {
+- int column = DWARF_REG_TO_UNWIND_COLUMN (i);
+- HOST_WIDE_INT offset
+- = DWARF_FRAME_REGNUM (column) * GET_MODE_SIZE (mode);
++ int column = DWARF_REG_TO_UNWIND_COLUMN
++ (DWARF2_FRAME_REG_OUT (DWARF_FRAME_REGNUM (i), true));
++ HOST_WIDE_INT offset = column * GET_MODE_SIZE (mode);
+
+ emit_move_insn (adjust_address (mem, mode, offset), value);
+ }
+@@ -31157,9 +31264,8 @@
+ return 99;
+ if (regno == SPEFSCR_REGNO)
+ return 612;
+- /* SPE high reg number. We get these values of regno from
+- rs6000_dwarf_register_span. */
+- gcc_assert (regno >= 1200 && regno < 1232);
++ if (SPE_HIGH_REGNO_P (regno))
++ return regno - FIRST_SPE_HIGH_REGNO + 1200;
+ return regno;
+ }
+
+Index: gcc/config/rs6000/rs6000.h
+===================================================================
+--- a/src/gcc/config/rs6000/rs6000.h (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/config/rs6000/rs6000.h (.../branches/gcc-4_9-branch)
+@@ -930,35 +930,36 @@
+
+ The 3 HTM registers aren't also included in DWARF_FRAME_REGISTERS. */
+
+-#define FIRST_PSEUDO_REGISTER 117
++#define FIRST_PSEUDO_REGISTER 149
+
+ /* This must be included for pre gcc 3.0 glibc compatibility. */
+ #define PRE_GCC3_DWARF_FRAME_REGISTERS 77
+
+-/* Add 32 dwarf columns for synthetic SPE registers. */
+-#define DWARF_FRAME_REGISTERS ((FIRST_PSEUDO_REGISTER - 4) + 32)
++/* True if register is an SPE High register. */
++#define SPE_HIGH_REGNO_P(N) \
++ ((N) >= FIRST_SPE_HIGH_REGNO && (N) <= LAST_SPE_HIGH_REGNO)
+
++/* SPE high registers added as hard regs.
++ The sfp register and 3 HTM registers
++ aren't included in DWARF_FRAME_REGISTERS. */
++#define DWARF_FRAME_REGISTERS (FIRST_PSEUDO_REGISTER - 4)
++
+ /* The SPE has an additional 32 synthetic registers, with DWARF debug
+ info numbering for these registers starting at 1200. While eh_frame
+ register numbering need not be the same as the debug info numbering,
+- we choose to number these regs for eh_frame at 1200 too. This allows
+- future versions of the rs6000 backend to add hard registers and
+- continue to use the gcc hard register numbering for eh_frame. If the
+- extra SPE registers in eh_frame were numbered starting from the
+- current value of FIRST_PSEUDO_REGISTER, then if FIRST_PSEUDO_REGISTER
+- changed we'd need to introduce a mapping in DWARF_FRAME_REGNUM to
+- avoid invalidating older SPE eh_frame info.
++ we choose to number these regs for eh_frame at 1200 too.
+
+ We must map them here to avoid huge unwinder tables mostly consisting
+ of unused space. */
+ #define DWARF_REG_TO_UNWIND_COLUMN(r) \
+- ((r) > 1200 ? ((r) - 1200 + (DWARF_FRAME_REGISTERS - 32)) : (r))
++ ((r) >= 1200 ? ((r) - 1200 + (DWARF_FRAME_REGISTERS - 32)) : (r))
+
+ /* Use standard DWARF numbering for DWARF debugging information. */
+ #define DBX_REGISTER_NUMBER(REGNO) rs6000_dbx_register_number (REGNO)
+
+ /* Use gcc hard register numbering for eh_frame. */
+-#define DWARF_FRAME_REGNUM(REGNO) (REGNO)
++#define DWARF_FRAME_REGNUM(REGNO) \
++ (SPE_HIGH_REGNO_P (REGNO) ? ((REGNO) - FIRST_SPE_HIGH_REGNO + 1200) : (REGNO))
+
+ /* Map register numbers held in the call frame info that gcc has
+ collected using DWARF_FRAME_REGNUM to those that should be output in
+@@ -992,7 +993,10 @@
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ 1, 1 \
+- , 1, 1, 1, 1, 1, 1 \
++ , 1, 1, 1, 1, 1, 1, \
++ /* SPE High registers. */ \
++ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
++ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 \
+ }
+
+ /* 1 for registers not available across function calls.
+@@ -1012,7 +1016,10 @@
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ 1, 1 \
+- , 1, 1, 1, 1, 1, 1 \
++ , 1, 1, 1, 1, 1, 1, \
++ /* SPE High registers. */ \
++ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
++ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 \
+ }
+
+ /* Like `CALL_USED_REGISTERS' except this macro doesn't require that
+@@ -1031,7 +1038,10 @@
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0 \
+- , 0, 0, 0, 0, 0, 0 \
++ , 0, 0, 0, 0, 0, 0, \
++ /* SPE High registers. */ \
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 \
+ }
+
+ #define TOTAL_ALTIVEC_REGS (LAST_ALTIVEC_REGNO - FIRST_ALTIVEC_REGNO + 1)
+@@ -1114,7 +1124,10 @@
+ 96, 95, 94, 93, 92, 91, \
+ 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, \
+ 109, 110, \
+- 111, 112, 113, 114, 115, 116 \
++ 111, 112, 113, 114, 115, 116, \
++ 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, \
++ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, \
++ 141, 142, 143, 144, 145, 146, 147, 148 \
+ }
+
+ /* True if register is floating-point. */
+@@ -1349,6 +1362,7 @@
+ CR_REGS,
+ NON_FLOAT_REGS,
+ CA_REGS,
++ SPE_HIGH_REGS,
+ ALL_REGS,
+ LIM_REG_CLASSES
+ };
+@@ -1380,6 +1394,7 @@
+ "CR_REGS", \
+ "NON_FLOAT_REGS", \
+ "CA_REGS", \
++ "SPE_HIGH_REGS", \
+ "ALL_REGS" \
+ }
+
+@@ -1387,30 +1402,54 @@
+ This is an initializer for a vector of HARD_REG_SET
+ of length N_REG_CLASSES. */
+
+-#define REG_CLASS_CONTENTS \
+-{ \
+- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, /* NO_REGS */ \
+- { 0xfffffffe, 0x00000000, 0x00000008, 0x00020000 }, /* BASE_REGS */ \
+- { 0xffffffff, 0x00000000, 0x00000008, 0x00020000 }, /* GENERAL_REGS */ \
+- { 0x00000000, 0xffffffff, 0x00000000, 0x00000000 }, /* FLOAT_REGS */ \
+- { 0x00000000, 0x00000000, 0xffffe000, 0x00001fff }, /* ALTIVEC_REGS */ \
+- { 0x00000000, 0xffffffff, 0xffffe000, 0x00001fff }, /* VSX_REGS */ \
+- { 0x00000000, 0x00000000, 0x00000000, 0x00002000 }, /* VRSAVE_REGS */ \
+- { 0x00000000, 0x00000000, 0x00000000, 0x00004000 }, /* VSCR_REGS */ \
+- { 0x00000000, 0x00000000, 0x00000000, 0x00008000 }, /* SPE_ACC_REGS */ \
+- { 0x00000000, 0x00000000, 0x00000000, 0x00010000 }, /* SPEFSCR_REGS */ \
+- { 0x00000000, 0x00000000, 0x00000000, 0x00040000 }, /* SPR_REGS */ \
+- { 0xffffffff, 0xffffffff, 0x00000008, 0x00020000 }, /* NON_SPECIAL_REGS */ \
+- { 0x00000000, 0x00000000, 0x00000002, 0x00000000 }, /* LINK_REGS */ \
+- { 0x00000000, 0x00000000, 0x00000004, 0x00000000 }, /* CTR_REGS */ \
+- { 0x00000000, 0x00000000, 0x00000006, 0x00000000 }, /* LINK_OR_CTR_REGS */ \
+- { 0x00000000, 0x00000000, 0x00000006, 0x00002000 }, /* SPECIAL_REGS */ \
+- { 0xffffffff, 0x00000000, 0x0000000e, 0x00022000 }, /* SPEC_OR_GEN_REGS */ \
+- { 0x00000000, 0x00000000, 0x00000010, 0x00000000 }, /* CR0_REGS */ \
+- { 0x00000000, 0x00000000, 0x00000ff0, 0x00000000 }, /* CR_REGS */ \
+- { 0xffffffff, 0x00000000, 0x00000ffe, 0x00020000 }, /* NON_FLOAT_REGS */ \
+- { 0x00000000, 0x00000000, 0x00001000, 0x00000000 }, /* CA_REGS */ \
+- { 0xffffffff, 0xffffffff, 0xfffffffe, 0x0007ffff } /* ALL_REGS */ \
++#define REG_CLASS_CONTENTS \
++{ \
++ /* NO_REGS. */ \
++ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, \
++ /* BASE_REGS. */ \
++ { 0xfffffffe, 0x00000000, 0x00000008, 0x00020000, 0x00000000 }, \
++ /* GENERAL_REGS. */ \
++ { 0xffffffff, 0x00000000, 0x00000008, 0x00020000, 0x00000000 }, \
++ /* FLOAT_REGS. */ \
++ { 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000 }, \
++ /* ALTIVEC_REGS. */ \
++ { 0x00000000, 0x00000000, 0xffffe000, 0x00001fff, 0x00000000 }, \
++ /* VSX_REGS. */ \
++ { 0x00000000, 0xffffffff, 0xffffe000, 0x00001fff, 0x00000000 }, \
++ /* VRSAVE_REGS. */ \
++ { 0x00000000, 0x00000000, 0x00000000, 0x00002000, 0x00000000 }, \
++ /* VSCR_REGS. */ \
++ { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000 }, \
++ /* SPE_ACC_REGS. */ \
++ { 0x00000000, 0x00000000, 0x00000000, 0x00008000, 0x00000000 }, \
++ /* SPEFSCR_REGS. */ \
++ { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000000 }, \
++ /* SPR_REGS. */ \
++ { 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0x00000000 }, \
++ /* NON_SPECIAL_REGS. */ \
++ { 0xffffffff, 0xffffffff, 0x00000008, 0x00020000, 0x00000000 }, \
++ /* LINK_REGS. */ \
++ { 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000 }, \
++ /* CTR_REGS. */ \
++ { 0x00000000, 0x00000000, 0x00000004, 0x00000000, 0x00000000 }, \
++ /* LINK_OR_CTR_REGS. */ \
++ { 0x00000000, 0x00000000, 0x00000006, 0x00000000, 0x00000000 }, \
++ /* SPECIAL_REGS. */ \
++ { 0x00000000, 0x00000000, 0x00000006, 0x00002000, 0x00000000 }, \
++ /* SPEC_OR_GEN_REGS. */ \
++ { 0xffffffff, 0x00000000, 0x0000000e, 0x00022000, 0x00000000 }, \
++ /* CR0_REGS. */ \
++ { 0x00000000, 0x00000000, 0x00000010, 0x00000000, 0x00000000 }, \
++ /* CR_REGS. */ \
++ { 0x00000000, 0x00000000, 0x00000ff0, 0x00000000, 0x00000000 }, \
++ /* NON_FLOAT_REGS. */ \
++ { 0xffffffff, 0x00000000, 0x00000ffe, 0x00020000, 0x00000000 }, \
++ /* CA_REGS. */ \
++ { 0x00000000, 0x00000000, 0x00001000, 0x00000000, 0x00000000 }, \
++ /* SPE_HIGH_REGS. */ \
++ { 0x00000000, 0x00000000, 0x00000000, 0xffe00000, 0x001fffff }, \
++ /* ALL_REGS. */ \
++ { 0xffffffff, 0xffffffff, 0xfffffffe, 0xffe7ffff, 0x001fffff } \
+ }
+
+ /* The same information, inverted:
+@@ -2349,6 +2388,39 @@
+ &rs6000_reg_names[114][0], /* tfhar */ \
+ &rs6000_reg_names[115][0], /* tfiar */ \
+ &rs6000_reg_names[116][0], /* texasr */ \
++ \
++ &rs6000_reg_names[117][0], /* SPE rh0. */ \
++ &rs6000_reg_names[118][0], /* SPE rh1. */ \
++ &rs6000_reg_names[119][0], /* SPE rh2. */ \
++ &rs6000_reg_names[120][0], /* SPE rh3. */ \
++ &rs6000_reg_names[121][0], /* SPE rh4. */ \
++ &rs6000_reg_names[122][0], /* SPE rh5. */ \
++ &rs6000_reg_names[123][0], /* SPE rh6. */ \
++ &rs6000_reg_names[124][0], /* SPE rh7. */ \
++ &rs6000_reg_names[125][0], /* SPE rh8. */ \
++ &rs6000_reg_names[126][0], /* SPE rh9. */ \
++ &rs6000_reg_names[127][0], /* SPE rh10. */ \
++ &rs6000_reg_names[128][0], /* SPE rh11. */ \
++ &rs6000_reg_names[129][0], /* SPE rh12. */ \
++ &rs6000_reg_names[130][0], /* SPE rh13. */ \
++ &rs6000_reg_names[131][0], /* SPE rh14. */ \
++ &rs6000_reg_names[132][0], /* SPE rh15. */ \
++ &rs6000_reg_names[133][0], /* SPE rh16. */ \
++ &rs6000_reg_names[134][0], /* SPE rh17. */ \
++ &rs6000_reg_names[135][0], /* SPE rh18. */ \
++ &rs6000_reg_names[136][0], /* SPE rh19. */ \
++ &rs6000_reg_names[137][0], /* SPE rh20. */ \
++ &rs6000_reg_names[138][0], /* SPE rh21. */ \
++ &rs6000_reg_names[139][0], /* SPE rh22. */ \
++ &rs6000_reg_names[140][0], /* SPE rh22. */ \
++ &rs6000_reg_names[141][0], /* SPE rh24. */ \
++ &rs6000_reg_names[142][0], /* SPE rh25. */ \
++ &rs6000_reg_names[143][0], /* SPE rh26. */ \
++ &rs6000_reg_names[144][0], /* SPE rh27. */ \
++ &rs6000_reg_names[145][0], /* SPE rh28. */ \
++ &rs6000_reg_names[146][0], /* SPE rh29. */ \
++ &rs6000_reg_names[147][0], /* SPE rh30. */ \
++ &rs6000_reg_names[148][0], /* SPE rh31. */ \
+ }
+
+ /* Table of additional register names to use in user input. */
+@@ -2404,7 +2476,17 @@
+ {"vs56", 101},{"vs57", 102},{"vs58", 103},{"vs59", 104}, \
+ {"vs60", 105},{"vs61", 106},{"vs62", 107},{"vs63", 108}, \
+ /* Transactional Memory Facility (HTM) Registers. */ \
+- {"tfhar", 114}, {"tfiar", 115}, {"texasr", 116} }
++ {"tfhar", 114}, {"tfiar", 115}, {"texasr", 116}, \
++ /* SPE high registers. */ \
++ {"rh0", 117}, {"rh1", 118}, {"rh2", 119}, {"rh3", 120}, \
++ {"rh4", 121}, {"rh5", 122}, {"rh6", 123}, {"rh7", 124}, \
++ {"rh8", 125}, {"rh9", 126}, {"rh10", 127}, {"rh11", 128}, \
++ {"rh12", 129}, {"rh13", 130}, {"rh14", 131}, {"rh15", 132}, \
++ {"rh16", 133}, {"rh17", 134}, {"rh18", 135}, {"rh19", 136}, \
++ {"rh20", 137}, {"rh21", 138}, {"rh22", 139}, {"rh23", 140}, \
++ {"rh24", 141}, {"rh25", 142}, {"rh26", 143}, {"rh27", 144}, \
++ {"rh28", 145}, {"rh29", 146}, {"rh30", 147}, {"rh31", 148}, \
++}
+
+ /* This is how to output an element of a case-vector that is relative. */
+
+Index: gcc/config/rs6000/rs6000.md
+===================================================================
+--- a/src/gcc/config/rs6000/rs6000.md (.../tags/gcc_4_9_1_release)
++++ b/src/gcc/config/rs6000/rs6000.md (.../branches/gcc-4_9-branch)
+@@ -56,6 +56,8 @@
+ (TFHAR_REGNO 114)
+ (TFIAR_REGNO 115)
+ (TEXASR_REGNO 116)
++ (FIRST_SPE_HIGH_REGNO 117)
++ (LAST_SPE_HIGH_REGNO 148)
+ ])
+
+ ;;
Index: gcc/config/rs6000/sysv4.h
===================================================================
--- a/src/gcc/config/rs6000/sysv4.h (.../tags/gcc_4_9_1_release)
diff --git a/debian/rules.patch b/debian/rules.patch
index 0f0cbaa..0c0e977 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -87,10 +87,6 @@ debian_patches += \
# FIXME: only needed for isl-0.13 for now
# isl-0.13-compat \
-ifeq (,$(filter $(distrelease),wheezy squeeze dapper hardy lucid maverick natty oneiric precise quantal raring))
- debian_patches += libstdc++-python3
-endif
-
# $(if $(filter yes, $(DEB_CROSS)),,gcc-print-file-name) \
# libstdc++-nothumb-check \
# TODO: update ...