aboutsummaryrefslogtreecommitdiff
path: root/3.4.6
diff options
context:
space:
mode:
authorMark Loeser <halcy0n@gentoo.org>2006-04-14 03:21:02 +0000
committerMark Loeser <halcy0n@gentoo.org>2006-04-14 03:21:02 +0000
commit00c64a1ebdcf6e6a1c9e50b5f5ac139de431fff5 (patch)
tree4e9f15879c8c7ec8a9b76d0ee58dd2e8041567ee /3.4.6
parentFixes bad altivec code; bug #129008 (diff)
downloadgcc-patches-00c64a1ebdcf6e6a1c9e50b5f5ac139de431fff5.tar.gz
gcc-patches-00c64a1ebdcf6e6a1c9e50b5f5ac139de431fff5.tar.bz2
gcc-patches-00c64a1ebdcf6e6a1c9e50b5f5ac139de431fff5.zip
Add fix for bug #126279
Diffstat (limited to '3.4.6')
-rw-r--r--3.4.6/gentoo/86_all_gcc4-gentoo126279.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/3.4.6/gentoo/86_all_gcc4-gentoo126279.patch b/3.4.6/gentoo/86_all_gcc4-gentoo126279.patch
new file mode 100644
index 0000000..057158c
--- /dev/null
+++ b/3.4.6/gentoo/86_all_gcc4-gentoo126279.patch
@@ -0,0 +1,71 @@
+Index: libiberty/splay-tree.c
+===================================================================
+--- libiberty/splay-tree.c (revision 91814)
++++ libiberty/splay-tree.c (revision 91815)
+@@ -59,18 +59,59 @@
+ splay_tree sp;
+ splay_tree_node node;
+ {
++ splay_tree_node pending = 0;
++ splay_tree_node active = 0;
++
+ if (!node)
+ return;
+
+- splay_tree_delete_helper (sp, node->left);
+- splay_tree_delete_helper (sp, node->right);
++#define KDEL(x) if (sp->delete_key) (*sp->delete_key)(x);
++#define VDEL(x) if (sp->delete_value) (*sp->delete_value)(x);
+
+- if (sp->delete_key)
+- (*sp->delete_key)(node->key);
+- if (sp->delete_value)
+- (*sp->delete_value)(node->value);
++ KDEL (node->key);
++ VDEL (node->value);
+
+- (*sp->deallocate) ((char*) node, sp->allocate_data);
++ /* We use the "key" field to hold the "next" pointer. */
++ node->key = (splay_tree_key)pending;
++ pending = (splay_tree_node)node;
++
++ /* Now, keep processing the pending list until there aren't any
++ more. This is a little more complicated than just recursing, but
++ it doesn't toast the stack for large trees. */
++
++ while (pending)
++ {
++ active = pending;
++ pending = 0;
++ while (active)
++ {
++ splay_tree_node temp;
++
++ /* active points to a node which has its key and value
++ deallocated, we just need to process left and right. */
++
++ if (active->left)
++ {
++ KDEL (active->left->key);
++ VDEL (active->left->value);
++ active->left->key = (splay_tree_key)pending;
++ pending = (splay_tree_node)(active->left);
++ }
++ if (active->right)
++ {
++ KDEL (active->right->key);
++ VDEL (active->right->value);
++ active->right->key = (splay_tree_key)pending;
++ pending = (splay_tree_node)(active->right);
++ }
++
++ temp = active;
++ active = (splay_tree_node)(temp->key);
++ (*sp->deallocate) ((char*) temp, sp->allocate_data);
++ }
++ }
++#undef KDEL
++#undef VDEL
+ }
+
+ /* Help splay SP around KEY. PARENT and GRANDPARENT are the parent